20230921新增安全巡检新增分部分项选择、质量巡检新增分部分项选择
This commit is contained in:
@@ -88,7 +88,7 @@
|
||||
</f:Label>
|
||||
<f:Label ID="lbSpotCheckDataRate" runat="server" Label="施工资料同步率">
|
||||
</f:Label>
|
||||
<f:Label ID="Label2" runat="server" Label="质量问题数">
|
||||
<f:Label ID="lbCheckControlCount" runat="server" Label="质量问题数">
|
||||
</f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
@@ -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")
|
||||
{
|
||||
|
||||
+2
-2
@@ -204,13 +204,13 @@ namespace FineUIPro.Web.DigData
|
||||
protected global::FineUIPro.Label lbSpotCheckDataRate;
|
||||
|
||||
/// <summary>
|
||||
/// Label2 控件。
|
||||
/// lbCheckControlCount 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label2;
|
||||
protected global::FineUIPro.Label lbCheckControlCount;
|
||||
|
||||
/// <summary>
|
||||
/// lbSpotCheckOkRate 控件。
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
</f:Label>
|
||||
<f:Label ID="lbAccident" runat="server" Label="安全事故数量">
|
||||
</f:Label>
|
||||
<f:Label ID="Label3" runat="server" Label="安全巡检问题总数">
|
||||
<f:Label ID="lbHazardRegisterCount" runat="server" Label="安全巡检问题总数">
|
||||
</f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
@@ -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();
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -159,13 +159,13 @@ namespace FineUIPro.Web.DigData
|
||||
protected global::FineUIPro.Label lbAccident;
|
||||
|
||||
/// <summary>
|
||||
/// Label3 控件。
|
||||
/// lbHazardRegisterCount 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label3;
|
||||
protected global::FineUIPro.Label lbHazardRegisterCount;
|
||||
|
||||
/// <summary>
|
||||
/// gpCQMS 控件。
|
||||
|
||||
Reference in New Issue
Block a user