20230921新增安全巡检新增分部分项选择、质量巡检新增分部分项选择
This commit is contained in:
@@ -103,21 +103,38 @@ namespace FineUIPro.Web.DigData
|
||||
if (item == "HSSE")
|
||||
{
|
||||
this.gpHSSE.Hidden = false;
|
||||
this.lbExpertArgument.Text = (from x in Funs.DB.Solution_LargerHazardListItem
|
||||
join y in Funs.DB.Solution_LargerHazardList on x.LargerHazardListId equals y.LargerHazardListId
|
||||
where y.ProjectId == this.ProjectId && x.WorkPackageId.Contains(workPackageId)
|
||||
&& y.States == Const.State_1
|
||||
&& (controlItemAndCycleId == null || x.WorkPackageId.Contains(controlItemAndCycleId))
|
||||
select x).Count().ToString();
|
||||
this.lbAccident.Text = (from x in Funs.DB.Accident_AccidentPersonRecord
|
||||
where x.ProjectId == this.ProjectId && x.WorkPackageId.Contains(workPackageId)
|
||||
&& x.States == Const.State_2
|
||||
&& (controlItemAndCycleId == null || x.WorkPackageId.Contains(controlItemAndCycleId))
|
||||
select x).Count().ToString();
|
||||
var getLargerHazardListItem =from x in Funs.DB.Solution_LargerHazardListItem
|
||||
join y in Funs.DB.Solution_LargerHazardList on x.LargerHazardListId equals y.LargerHazardListId
|
||||
where y.ProjectId == this.ProjectId && x.WorkPackageId.Contains(workPackageId)
|
||||
&& y.States == Const.State_1
|
||||
select x;
|
||||
if (!string.IsNullOrEmpty(controlItemAndCycleId))
|
||||
{
|
||||
getLargerHazardListItem = getLargerHazardListItem.Where(x => x.WorkPackageId.Contains(controlItemAndCycleId));
|
||||
}
|
||||
this.lbExpertArgument.Text = getLargerHazardListItem.Count().ToString();
|
||||
|
||||
|
||||
var getAccidentPersonRecord = from x in Funs.DB.Accident_AccidentPersonRecord
|
||||
where x.ProjectId == this.ProjectId && 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.ProjectId == this.ProjectId && x.States != "4" && x.States != "0"
|
||||
&& x.WorkPackageId.Contains(workPackageId)
|
||||
select x;
|
||||
if (!string.IsNullOrEmpty(controlItemAndCycleId))
|
||||
{
|
||||
getHazardRegister = getHazardRegister.Where(x => x.WorkPackageId.Contains(controlItemAndCycleId));
|
||||
}
|
||||
this.lbHSEProblemCount.Text= getHazardRegister.Count().ToString();
|
||||
|
||||
this.lbHSEProblemCount.Text= (from x in Funs.DB.HSSE_Hazard_HazardRegister
|
||||
where x.ProjectId == this.ProjectId && x.States != null && x.States !="4" && x.States != "0"
|
||||
select x).Count().ToString();
|
||||
}
|
||||
if (item == "CQMS")
|
||||
{
|
||||
@@ -126,9 +143,12 @@ 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 y.ProjectId == this.ProjectId && x.WorkPackageId.Contains(workPackageId)
|
||||
&& (controlItemAndCycleId == null || x.WorkPackageId.Contains(controlItemAndCycleId))
|
||||
&& y.State == "8"
|
||||
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(); //一次合格
|
||||
@@ -142,6 +162,15 @@ namespace FineUIPro.Web.DigData
|
||||
int okDateCount = getSpotCheckDetail.Where(x => x.IsDataOK == "1").Count(); //资料合格
|
||||
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
|
||||
where x.ProjectId == this.ProjectId && 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();
|
||||
|
||||
///实体质量问题整改率
|
||||
//int allNoOk = all - onesOKCount; ///问题数
|
||||
//int oKCount = getSpotCheckDetail.Where(x => x.IsOK == true).Count(); //合格数
|
||||
@@ -215,7 +244,6 @@ namespace FineUIPro.Web.DigData
|
||||
/////项目进度完成百分比
|
||||
//decimal s = Convert.ToDecimal(totalSJCost);
|
||||
//this.lbJDRate.Text = totalPlanCost > 0 ? Math.Round(s / totalPlanCost).ToString() + "%" : "0%";
|
||||
|
||||
}
|
||||
if (item == "HTGL")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user