diff --git a/DataBase/版本日志/SGGLDB_V2022-08-04-001修改明细.txt b/DataBase/版本日志/SGGLDB_V2022-08-04-001修改明细.txt new file mode 100644 index 00000000..8c882c0f --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2022-08-04-001修改明细.txt @@ -0,0 +1,4 @@ +--ADD BY YangHongwei 2022-08-04 +1、宏宜项目(许洪涛):考勤月记录校正数据方法优化。 +2、现场人员同步门禁状态重置按钮功能实现。 +--END \ No newline at end of file diff --git a/SGGL/BLL/OpenService/GetDataService.cs b/SGGL/BLL/OpenService/GetDataService.cs index 72bd272c..709758fb 100644 --- a/SGGL/BLL/OpenService/GetDataService.cs +++ b/SGGL/BLL/OpenService/GetDataService.cs @@ -277,7 +277,7 @@ namespace BLL var getNums = from x in db.SitePerson_PersonInOutNumber where x.ProjectId == projectId && x.InOutDate >= dateS orderby x.InOutDate - select x; + select x; var getInouts = from x in db.SitePerson_PersonInOut where x.ProjectId == projectId && x.ChangeTime.Value >= dateS select x; @@ -289,7 +289,7 @@ namespace BLL var getAllPersonInOutList = from x in getInouts where x.ChangeTime > date.AddDays(-1) && x.ChangeTime < date.AddDays(1) select x; - + if (getAllPersonInOutList.Count() > 0) { /// 出场记录 @@ -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) { diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonIn.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonIn.aspx.cs index eddc9f18..79baa63b 100644 --- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonIn.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonIn.aspx.cs @@ -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 diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx index 40819d71..4a15f61c 100644 --- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx +++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx @@ -67,8 +67,8 @@ - -