修改安全月报

This commit is contained in:
潘鸿锋 2024-10-24 16:46:16 +08:00
parent abb15b53fc
commit 6ca0a319b1
2 changed files with 9 additions and 6 deletions

View File

@ -1801,7 +1801,11 @@ namespace FineUIPro.Web.HSSE.Manager
int totalSumOutPersonNum = 0;//外聘 int totalSumOutPersonNum = 0;//外聘
int totalHSEPersonNum = 0; int totalHSEPersonNum = 0;
var spckList = db.SitePerson_Checking.Where(x => x.IntoOutTime >= startTime var spckList = db.SitePerson_Checking.Where(x => x.IntoOutTime >= startTime
&& x.IntoOutTime <= endTime && x.ProjectId == ProjectId && x.IntoOut == "1"); && x.IntoOutTime <= endTime && x.ProjectId == ProjectId && x.IntoOut == "1").Select(x=>new {
x.UnitId,
x.IdentityCard
});
if (units.Count() > 0) if (units.Count() > 0)
{ {
foreach (Model.Project_ProjectUnit u in units) foreach (Model.Project_ProjectUnit u in units)
@ -1815,12 +1819,11 @@ namespace FineUIPro.Web.HSSE.Manager
}; };
//本部本月人数,本年考勤人数除当前月份,取平均数 //本部本月人数,本年考勤人数除当前月份,取平均数
//年度 //年度
var yearList = spckList.Where(x => x.UnitId == u.UnitId).ToList().Select(x => new hseDayItem() var yearList = spckList.Where(x => x.UnitId == u.UnitId).Select(x => new hseDayItem()
{ {
IdentityCard = x.IdentityCard, IdentityCard = x.IdentityCard,
IntoOutTime = getShortTime(x.IntoOutTime) //IntoOutTime = getShortTime(x.IntoOutTime)
}).GroupBy(x => new { x.IdentityCard}) }).GroupBy(x => new { x.IdentityCard});
.ToList();
personSort.SumPersonNum = yearList.Count(); personSort.SumPersonNum = yearList.Count();

View File

@ -12,7 +12,7 @@
<appSettings> <appSettings>
<!--连接字符串--> <!--连接字符串-->
<!--<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>--> <!--<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>-->
<add key="ConnectionString" value="Server=.\SQL2012;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/> <add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
<!--系统名称--> <!--系统名称-->
<add key="SystemName" value="智慧施工管理信息系统V1.0"/> <add key="SystemName" value="智慧施工管理信息系统V1.0"/>
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/> <add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>