20230921新增安全巡检新增分部分项选择、质量巡检新增分部分项选择
This commit is contained in:
@@ -84,17 +84,35 @@ namespace FineUIPro.Web.DigData
|
||||
if (item == "HSSE")
|
||||
{
|
||||
this.gpHSSE.Hidden = false;
|
||||
this.lbExpertArgument.Text = (from x in Funs.DB.Solution_LargerHazardListItem
|
||||
var getLargerHazardListItem = from x in Funs.DB.Solution_LargerHazardListItem
|
||||
join y in Funs.DB.Solution_LargerHazardList on x.LargerHazardListId equals y.LargerHazardListId
|
||||
where x.WorkPackageId.Contains(workPackageId) && y.States == Const.State_1
|
||||
&& (controlItemAndCycleId == null || x.WorkPackageId.Contains(controlItemAndCycleId))
|
||||
select x).Count().ToString();
|
||||
select x;
|
||||
if (!string.IsNullOrEmpty(controlItemAndCycleId))
|
||||
{
|
||||
getLargerHazardListItem = getLargerHazardListItem.Where(x => x.WorkPackageId.Contains(controlItemAndCycleId));
|
||||
}
|
||||
this.lbExpertArgument.Text = getLargerHazardListItem.Count().ToString();
|
||||
|
||||
this.lbAccident.Text = (from x in Funs.DB.Accident_AccidentPersonRecord
|
||||
where x.WorkPackageId.Contains(workPackageId)
|
||||
&& x.States == Const.State_2
|
||||
&& (controlItemAndCycleId == null || x.WorkPackageId.Contains(controlItemAndCycleId))
|
||||
select x).Count().ToString();
|
||||
|
||||
var getAccidentPersonRecord = from x in Funs.DB.Accident_AccidentPersonRecord
|
||||
where x.WorkPackageId.Contains(workPackageId)
|
||||
&& x.States == Const.State_2
|
||||
select x;
|
||||
if (!string.IsNullOrEmpty(controlItemAndCycleId))
|
||||
{
|
||||
getAccidentPersonRecord = getAccidentPersonRecord.Where(x => x.WorkPackageId.Contains(controlItemAndCycleId));
|
||||
}
|
||||
this.lbAccident.Text = getAccidentPersonRecord.Count().ToString();
|
||||
|
||||
var getHazardRegister = from x in Funs.DB.HSSE_Hazard_HazardRegister
|
||||
where x.WorkPackageId.Contains(workPackageId) && x.States != null && x.States != "4" && x.States != "0"
|
||||
select x;
|
||||
if (!string.IsNullOrEmpty(controlItemAndCycleId))
|
||||
{
|
||||
getHazardRegister = getHazardRegister.Where(x => x.WorkPackageId.Contains(controlItemAndCycleId));
|
||||
}
|
||||
this.lbHazardRegisterCount.Text= getHazardRegister.Count().ToString();
|
||||
}
|
||||
if (item == "CQMS")
|
||||
{
|
||||
@@ -103,8 +121,11 @@ namespace FineUIPro.Web.DigData
|
||||
var getSpotCheckDetail = from x in Funs.DB.Check_SpotCheckDetail
|
||||
join y in Funs.DB.Check_SpotCheck on x.SpotCheckCode equals y.SpotCheckCode
|
||||
where x.WorkPackageId.Contains(workPackageId) && y.State == "8"
|
||||
&& (controlItemAndCycleId == null || x.WorkPackageId.Contains(controlItemAndCycleId))
|
||||
select x;
|
||||
if (!string.IsNullOrEmpty(controlItemAndCycleId))
|
||||
{
|
||||
getSpotCheckDetail = getSpotCheckDetail.Where(x => x.WorkPackageId.Contains(controlItemAndCycleId));
|
||||
}
|
||||
int all = getSpotCheckDetail.Count();
|
||||
// this.lbSpotCheck1.Text = all.ToString();
|
||||
int onesOKCount = getSpotCheckDetail.Where(x => x.IsOnesOK == true).Count();
|
||||
@@ -118,8 +139,13 @@ namespace FineUIPro.Web.DigData
|
||||
this.lbSpotCheckDataRate.Text = okYSCount > 0 ? Math.Round(okDateCount * 100.0 / (okYSCount * 1.0)).ToString() + "%" : "0%";
|
||||
|
||||
//// 质量检查问题整改率
|
||||
var getCheck_CheckControl = from x in Funs.DB.Check_CheckControl select x;
|
||||
|
||||
var getCheck_CheckControl = from x in Funs.DB.Check_CheckControl
|
||||
where x.WorkPackageId.Contains(workPackageId)
|
||||
select x;
|
||||
if (!string.IsNullOrEmpty(controlItemAndCycleId))
|
||||
{
|
||||
getCheck_CheckControl = getCheck_CheckControl.Where(x => x.WorkPackageId.Contains(controlItemAndCycleId));
|
||||
}
|
||||
this.lbCheckControlCount.Text = getCheck_CheckControl.Count().ToString();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user