pu看板修改
This commit is contained in:
@@ -71,7 +71,13 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
projectDataItem.location = item.ProjectAddress ?? "";
|
||||
projectDataItem.safehours = Project_HSSEData_HSSEService.GetSafeWorkingHour(item.ProjectId).ToString() ?? "";
|
||||
|
||||
var safehoursData = (from x in Funs.DB.HSSE_MonthReportItem
|
||||
join y in Funs.DB.HSSE_MonthReport on x.MonthReportId equals y.MonthReportId
|
||||
// where ("成达公司HSE管理人数" == x.ReportItem || "分包商HSE管理人数" == x.ReportItem) && y.Years == DateTime.Now.Year && y.ProjectId==CurrUser.LoginProjectId
|
||||
where ("安全生产人工时数" == x.ReportItem) && y.Years == DateTime.Now.Year && y.ProjectId == item.ProjectId
|
||||
select x.YearTotal).Sum();
|
||||
projectDataItem.safehours = safehoursData.ToString() ?? "";
|
||||
projectDataItem.losshours = Project_HSSEData_HSSEService.GetLostWorkingHour(item.ProjectId).ToString() ?? "";
|
||||
List<Model.Comprehensive_NCRManagement> NondestructiveTestList = (from x in db.Comprehensive_NCRManagement
|
||||
where x.ProjectId == item.ProjectId && (x.IssuedDate ==null || x.IssuedDate >DateTime.Now) select x).ToList();
|
||||
@@ -93,6 +99,36 @@ namespace BLL
|
||||
projectDataItem.onsiteworkers = (ProjectTotal1.Value + ProjectTotal2.Value).ToString();//项目现场总人数
|
||||
}
|
||||
|
||||
// 获取当前月份
|
||||
int currentMonth = DateTime.Now.Month;
|
||||
int currentYear = DateTime.Now.Year;
|
||||
int ProjectTotal3Value = 0;
|
||||
int ProjectTotal4Value = 0;
|
||||
projectDataItem.onsiteperson = "";
|
||||
projectDataItem.maxperson = "";
|
||||
var ProjectTotal3 = (from x in Funs.DB.HSSE_MonthReportItem
|
||||
join y in Funs.DB.HSSE_MonthReport on x.MonthReportId equals y.MonthReportId
|
||||
where ("成达公司现场人数" == x.ReportItem)&& y.Years == currentYear && y.ProjectId == item.ProjectId
|
||||
select x).FirstOrDefault();
|
||||
if (ProjectTotal3 !=null)
|
||||
{
|
||||
ProjectTotal3Value = int.Parse((ProjectTotal3.GetType().GetProperty("Month" + currentMonth)?.GetValue(ProjectTotal3, null).ToString() ?? "0") );
|
||||
projectDataItem.onsiteperson = ProjectTotal3Value.ToString() ?? ""; // 本月现场人数
|
||||
}
|
||||
|
||||
var ProjectTotal4 = (from x in Funs.DB.HSSE_MonthReportItem
|
||||
join y in Funs.DB.HSSE_MonthReport on x.MonthReportId equals y.MonthReportId
|
||||
where ("成达公司HSE管理人数" == x.ReportItem) && y.Years == currentYear && y.ProjectId == item.ProjectId
|
||||
select x).FirstOrDefault();
|
||||
if (ProjectTotal4 != null)
|
||||
{
|
||||
ProjectTotal4Value = int.Parse((ProjectTotal4.GetType().GetProperty("Month" + currentMonth)?.GetValue(ProjectTotal4, null).ToString() ?? "0"));
|
||||
projectDataItem.maxperson = (ProjectTotal4Value + ProjectTotal3Value).ToString() ?? ""; //现场高峰人数
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
var getHazards = from x in Funs.DB.Hazard_HazardSelectedItem
|
||||
join y in Funs.DB.Base_RiskLevel on x.HazardLevel equals y.RiskLevelId
|
||||
where x.ProjectId == item.ProjectId && x.IsStart == true
|
||||
@@ -126,10 +162,11 @@ namespace BLL
|
||||
{
|
||||
request.AddJsonBody(JsonBody);
|
||||
}
|
||||
APICommonService.SaveSysHttpLog("CDPU", Baseurl," Body :" + JsonBody, "Request|" + request.Method.ToString());
|
||||
APICommonService.SaveSysHttpLog("CDPU", Baseurl, " Body :" + JsonBody, "Request|" + request.Method.ToString());
|
||||
IRestResponse response = client.Execute(request);
|
||||
APICommonService.SaveSysHttpLog("CDPU", Baseurl, "Header :" + response.Headers + "| Body :" + response.Content, "Response|" + request.Method.ToString());
|
||||
return response.Content;
|
||||
//return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user