20220804考勤月记录校正数据方法优化

This commit is contained in:
杨红卫 2022-08-04 16:57:44 +08:00
parent 019e2fc83e
commit 03b773e8e4
8 changed files with 114 additions and 54 deletions

View File

@ -0,0 +1,4 @@
--ADD BY YangHongwei 2022-08-04
1、宏宜项目许洪涛考勤月记录校正数据方法优化。
2、现场人员同步门禁状态重置按钮功能实现。
--END

View File

@ -303,13 +303,16 @@ namespace BLL
{
SafeHours = getMaxInOutDate.WorkHours ?? 0;
}
else
{
SafeHours = db.SitePerson_PersonInOutNumber.Where(x => x.ProjectId == projectId && x.InOutDate < dateS).Max(x => x.WorkHours) ?? 0;
}
}
int getOutPersonCount = getPersonOutTimes.Select(x => x.PersonId).Distinct().Count();
SafeHours += getOutPersonCount * 8;
}
//SafeHours = Convert.ToInt32(SafeHours * 1.0 / 60);
if (itemNum != null)
{

View File

@ -1097,7 +1097,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
{
Model.QualityAudit_PersonQuality newPersonQuality = new Model.QualityAudit_PersonQuality
{
PersonQualityId = SQLHelper.GetNewID(typeof(Model.QualityAudit_PersonQuality)),
PersonQualityId = SQLHelper.GetNewID(),
PersonId = newPerson.PersonId,
CompileMan = this.CurrUser.UserId,
CompileDate = DateTime.Now

View File

@ -67,8 +67,8 @@
</f:TextBox>
<f:ToolbarFill runat="server">
</f:ToolbarFill>
<f:Button ID="btSearch" ToolTip="查询" Icon="SystemSearch" runat="server" OnClick="TextBox_TextChanged"></f:Button>
<f:Button ID="btnNew" ToolTip="增加" Icon="Add" runat="server" Hidden="true" OnClick="btnNew_Click">
<f:Button ID="btSearch" Text="查询" Icon="SystemSearch" runat="server" OnClick="TextBox_TextChanged"></f:Button>
<f:Button ID="btnNew" Text="增加" Icon="Add" runat="server" Hidden="true" OnClick="btnNew_Click">
</f:Button>
</Items>
</f:Toolbar>
@ -77,7 +77,7 @@
<f:Toolbar ID="Toolbar1" Position="Top" ToolbarAlign="Right" runat="server">
<Items>
<f:RadioButtonList ID="rblPost" runat="server" AutoPostBack="true" Width="220px"
OnSelectedIndexChanged="TextBox_TextChanged">
OnSelectedIndexChanged="TextBox_TextChanged" AutoColumnWidth="true">
<f:RadioItem Value="-1" Text="全部" Selected="true" />
<f:RadioItem Value="1" Text="在岗" />
<f:RadioItem Value="0" Text="不在岗" />
@ -92,17 +92,20 @@
AutoPostBack="true" OnCheckedChanged="TextBox_TextChanged">
</f:CheckBox>
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
<f:Button ID="btnPersonOut" ToolTip="批量出场" Icon="UserGo" runat="server" Hidden="true" OnClick="btnPersonOut_Click">
<f:Button ID="btnPersonOut" Text="批量出场" ToolTip="批量出场" Icon="UserGo" runat="server"
Hidden="true" OnClick="btnPersonOut_Click">
</f:Button>
<f:Button ID="btnImport" ToolTip="导入" Icon="ApplicationGet" Hidden="true" runat="server"
<f:Button ID="btnImport" Text="导入" ToolTip="导入" Icon="ApplicationGet" Hidden="true" runat="server"
OnClick="btnImport_Click">
</f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" ToolTip="导出" Icon="FolderUp"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
<f:Button ID="btnQR" ToolTip="批量生成二维码" Icon="TableRefresh" runat="server" OnClick="btnQR_Click">
<f:Button ID="btnQR" Text="二维码" ToolTip="批量生成二维码" Icon="TableRefresh" runat="server" OnClick="btnQR_Click">
</f:Button>
<f:Button ID="btnPhoto" ToolTip="刷新照片转二进制" Icon="ArrowRefresh" runat="server" OnClick="btnPhoto_Click">
<f:Button ID="btnPersonStates" Text="重置下发状态" ToolTip="重置下发状态" Icon="DatabaseRefresh" runat="server" OnClick="btnPersonStates_Click">
</f:Button>
<f:Button ID="btnPhoto" Text="照片二进制" ToolTip="刷新照片转二进制" Icon="ArrowRefresh" runat="server" OnClick="btnPhoto_Click">
</f:Button>
</Items>
</f:Toolbar>

View File

@ -684,5 +684,23 @@ namespace FineUIPro.Web.HSSE.SitePerson
{
this.drpPost.SelectedValueArray = Funs.RemoveDropDownListNull(this.drpPost.SelectedValueArray);
}
protected void btnPersonStates_Click(object sender, EventArgs e)
{
var getPersons = from x in Funs.DB.SitePerson_Person
where x.ProjectId == this.CurrUser.LoginProjectId && x.ExchangeTime.HasValue
select x;
int pcount = getPersons.Count();
if (pcount > 0)
{
foreach (var item in getPersons)
{
item.ExchangeTime = null;
item.ExchangeTime2 = null;
Funs.DB.SubmitChanges();
}
}
Alert.ShowInTop("操作完成,重置人员" + pcount.ToString() + "条", MessageBoxIcon.Success);
}
}
}

View File

@ -7,10 +7,12 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.HSSE.SitePerson {
namespace FineUIPro.Web.HSSE.SitePerson
{
public partial class PersonList {
public partial class PersonList
{
/// <summary>
/// form1 控件。
@ -246,6 +248,15 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// </remarks>
protected global::FineUIPro.Button btnQR;
/// <summary>
/// btnPersonStates 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnPersonStates;
/// <summary>
/// btnPhoto 控件。
/// </summary>

View File

@ -99,7 +99,8 @@
</f:DropDownBox>
<f:DropDownList ID="drpMainCNProfessional" runat="server" Label="主专业" EnableEdit="true" LabelAlign="Right" LabelWidth="110px">
</f:DropDownList>
<f:DropDownList ID="drpAuditor" runat="server" Label="审核人" LabelAlign="Right" EnableEdit="true" LabelWidth="110px">
<f:DropDownList ID="drpAuditor" runat="server" Label="审核人" LabelAlign="Right" EnableEdit="true" LabelWidth="110px"
AutoPostBack="true" OnSelectedIndexChanged="drpAuditor_SelectedIndexChanged">
</f:DropDownList>
<f:CheckBox runat="server" ID="ckIsForeign" Label="外籍" LabelAlign="Right" LabelWidth="110px"></f:CheckBox>
<f:DatePicker ID="txtBirthday" runat="server" Label="出生日期" LabelAlign="Right" LabelWidth="110px">

View File

@ -251,6 +251,11 @@ namespace FineUIPro.Web.HSSE.SitePerson
this.rblIsUsed.SelectedValue = "True";
this.rblIsCardUsed.SelectedValue = "True";
}
if (this.drpAuditor.SelectedValue != this.CurrUser.UserId)
{
this.txtAuditorDate.Readonly = true;
}
}
}
#endregion
@ -898,5 +903,20 @@ namespace FineUIPro.Web.HSSE.SitePerson
}
}
}
/// <summary>
/// 审核人下拉框
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void drpAuditor_SelectedIndexChanged(object sender, EventArgs e)
{
this.txtAuditorDate.Readonly = false;
/// 当审核人为当前人是 审核时间可读
if (this.drpAuditor.SelectedValue != this.CurrUser.UserId)
{
this.txtAuditorDate.Readonly = true;
}
}
}
}