diff --git a/DataBase/版本日志/SGGLDB_V2023-09-04.sql b/DataBase/版本日志/SGGLDB_V2023-09-04.sql
new file mode 100644
index 00000000..51927248
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2023-09-04.sql
@@ -0,0 +1,60 @@
+ALTER TABLE WBS_ControlItemAndCycle ADD WorkPackageIds NVARCHAR(2000) NULL
+GO
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'WBSиڵַID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_ControlItemAndCycle', @level2type=N'COLUMN',@level2name=N'WorkPackageIds'
+GO
+
+ALTER VIEW [dbo].[View_WBS_WorkPackageDetail]
+AS
+/********ϸ********/
+SELECT detail.WorkPackageDetailId,
+detail.WorkPackageId,
+detail.Months,
+c.InitWorkPackageCode,
+c.WorkPackageCode,
+c.PackageContent,
+c.ProjectId,
+c.Unit, --λ
+c.PlanProjectQuantity, --㹤
+c.RealProjectQuantity, --ʵʹ
+c.PlanCost, --ڵƻܷ
+CONVERT(FLOAT,(select sum(ISNULL(PlanNum,0)) from WBS_WorkPackageDetail
+where WorkPackageId=detail.WorkPackageId and Months<=detail.Months)) as TotalPlanNum, --ۼƼƻ
+CONVERT(FLOAT,(select sum(ISNULL(ThisNum,0)) from WBS_WorkPackageDetail
+where WorkPackageId=detail.WorkPackageId and Months<=detail.Months)) as TotalThisNum, --ۼ
+CONVERT(FLOAT,(select sum(ISNULL(PlanValue,0)) from WBS_WorkPackageDetail
+where WorkPackageId=detail.WorkPackageId and Months<=detail.Months)) as TotalPlanValue, --ۼƸ
+CONVERT(FLOAT,(select sum(ISNULL(ThisValue,0)) from WBS_WorkPackageDetail
+where WorkPackageId=detail.WorkPackageId and Months<=detail.Months)) as TotalThisValue, --ۼʵʷ
+CONVERT(FLOAT,ISNULL(detail.PlanNum,0)) as PlanNum, --¼ƻ
+CONVERT(FLOAT,ISNULL(detail.ThisNum,0)) as ThisNum, --
+CONVERT(FLOAT,ISNULL(detail.PlanValue,0)) as PlanValue, --¸
+CONVERT(FLOAT,ISNULL(detail.ThisValue,0)) as ThisValue --ʵʷ
+FROM dbo.WBS_WorkPackageDetail AS detail
+LEFT JOIN WBS_WorkPackage AS c ON c.WorkPackageId=detail.WorkPackageId
+
+GO
+
+ALTER VIEW [dbo].[View_WBS_WorkPackageParentDetail]
+AS
+/********ϸ********/
+SELECT detail.WorkPackageParentDetailId,
+detail.ParentId,
+detail.ProjectId,
+detail.Months,
+c.InitWorkPackageCode,
+c.PlanCost, --ڵƻܷ
+CONVERT(FLOAT,ISNULL(detail.PlanNum,0)) as PlanNum, --¼ƻ
+CONVERT(FLOAT,ISNULL(detail.ThisNum,0)) as ThisNum, --ʵ
+CONVERT(FLOAT,ISNULL(detail.PlanValue,0)) as PlanValue, --¸
+CONVERT(FLOAT,ISNULL(detail.ThisValue,0)) as ThisValue, --ʵʷ
+CONVERT(FLOAT,(select sum(ISNULL(PlanNum,0)) from WBS_WorkPackageParentDetail
+where ParentId=detail.ParentId and Months<=detail.Months)) as TotalPlanNum, --ۼƼƻ
+CONVERT(FLOAT,(select sum(ISNULL(ThisNum,0)) from WBS_WorkPackageParentDetail
+where ParentId=detail.ParentId and Months<=detail.Months)) as TotalThisNum, --ۼ
+CONVERT(FLOAT,(select sum(ISNULL(PlanValue,0)) from WBS_WorkPackageParentDetail
+where ParentId=detail.ParentId and Months<=detail.Months)) as TotalPlanValue, --ۼƸ
+CONVERT(FLOAT,(select sum(ISNULL(ThisValue,0)) from WBS_WorkPackageParentDetail
+where ParentId=detail.ParentId and Months<=detail.Months)) as TotalThisValue --ۼʵʷ
+FROM dbo.WBS_WorkPackageParentDetail AS detail
+LEFT JOIN WBS_WorkPackage AS c ON c.WorkPackageId=detail.ParentId
+GO
diff --git a/SGGL/BLL/CQMS/Check/SpotCheckDetailService.cs b/SGGL/BLL/CQMS/Check/SpotCheckDetailService.cs
index db46a066..58a8e9cc 100644
--- a/SGGL/BLL/CQMS/Check/SpotCheckDetailService.cs
+++ b/SGGL/BLL/CQMS/Check/SpotCheckDetailService.cs
@@ -41,7 +41,7 @@ namespace BLL
newSpotCheckDetail.SpotCheckDetailId = SpotCheckDetail.SpotCheckDetailId;
newSpotCheckDetail.SpotCheckCode = SpotCheckDetail.SpotCheckCode;
newSpotCheckDetail.ControlItemAndCycleId = SpotCheckDetail.ControlItemAndCycleId;
- newSpotCheckDetail.WorkPackageId = WorkPackageService.getWorkPageIdsByControlItemAndCycle(SpotCheckDetail.ControlItemAndCycleId);
+ newSpotCheckDetail.WorkPackageId = WorkPackageService.getWorkPageIdsByControlItemAndCycle(null, SpotCheckDetail.ControlItemAndCycleId);
newSpotCheckDetail.IsOnesOK = SpotCheckDetail.IsOnesOK;
newSpotCheckDetail.IsOK = SpotCheckDetail.IsOK;
newSpotCheckDetail.ConfirmDate = SpotCheckDetail.ConfirmDate;
@@ -59,7 +59,7 @@ namespace BLL
newSpotCheckDetail.SpotCheckDetailId = SpotCheckDetail.SpotCheckDetailId;
newSpotCheckDetail.SpotCheckCode = SpotCheckDetail.SpotCheckCode;
newSpotCheckDetail.ControlItemAndCycleId = SpotCheckDetail.ControlItemAndCycleId;
- newSpotCheckDetail.WorkPackageId = WorkPackageService.getWorkPageIdsByControlItemAndCycle(SpotCheckDetail.ControlItemAndCycleId);
+ newSpotCheckDetail.WorkPackageId = WorkPackageService.getWorkPageIdsByControlItemAndCycle(null, SpotCheckDetail.ControlItemAndCycleId);
newSpotCheckDetail.IsOnesOK = SpotCheckDetail.IsOnesOK;
newSpotCheckDetail.IsOK = SpotCheckDetail.IsOK;
newSpotCheckDetail.ConfirmDate = SpotCheckDetail.ConfirmDate;
@@ -82,7 +82,7 @@ namespace BLL
{
newSpotCheckDetail.SpotCheckCode = SpotCheckDetail.SpotCheckCode;
newSpotCheckDetail.ControlItemAndCycleId = SpotCheckDetail.ControlItemAndCycleId;
- newSpotCheckDetail.WorkPackageId = WorkPackageService.getWorkPageIdsByControlItemAndCycle(SpotCheckDetail.ControlItemAndCycleId);
+ newSpotCheckDetail.WorkPackageId = WorkPackageService.getWorkPageIdsByControlItemAndCycle(null, SpotCheckDetail.ControlItemAndCycleId);
newSpotCheckDetail.IsOnesOK = SpotCheckDetail.IsOnesOK;
newSpotCheckDetail.IsOK = SpotCheckDetail.IsOK;
newSpotCheckDetail.ConfirmDate = SpotCheckDetail.ConfirmDate;
@@ -337,7 +337,7 @@ namespace BLL
newSpotCheckDetail.SpotCheckCode = SpotCheckDetail.SpotCheckCode;
if (!string.IsNullOrEmpty(SpotCheckDetail.ControlItemAndCycleId))
newSpotCheckDetail.ControlItemAndCycleId = SpotCheckDetail.ControlItemAndCycleId;
- newSpotCheckDetail.WorkPackageId = WorkPackageService.getWorkPageIdsByControlItemAndCycle(SpotCheckDetail.ControlItemAndCycleId);
+ newSpotCheckDetail.WorkPackageId = WorkPackageService.getWorkPageIdsByControlItemAndCycle(null, SpotCheckDetail.ControlItemAndCycleId);
if (SpotCheckDetail.IsOnesOK.HasValue)
newSpotCheckDetail.IsOnesOK = SpotCheckDetail.IsOnesOK;
if (SpotCheckDetail.IsOK.HasValue)
diff --git a/SGGL/BLL/CQMS/WBS/ControlItemAndCycleService.cs b/SGGL/BLL/CQMS/WBS/ControlItemAndCycleService.cs
index 3bd3e464..01a2b178 100644
--- a/SGGL/BLL/CQMS/WBS/ControlItemAndCycleService.cs
+++ b/SGGL/BLL/CQMS/WBS/ControlItemAndCycleService.cs
@@ -49,6 +49,7 @@ namespace BLL
newControlItemAndCycle.ControlItemAndCycleId = ControlItemAndCycle.ControlItemAndCycleId;
newControlItemAndCycle.ControlItemAndCycleCode = ControlItemAndCycle.ControlItemAndCycleCode;
newControlItemAndCycle.WorkPackageId = ControlItemAndCycle.WorkPackageId;
+ newControlItemAndCycle.WorkPackageIds = WorkPackageService.getWorkPageIdsByControlItemAndCycle(ControlItemAndCycle.WorkPackageId, ControlItemAndCycle.ControlItemAndCycleId);
newControlItemAndCycle.ProjectId = ControlItemAndCycle.ProjectId;
newControlItemAndCycle.ControlItemContent = ControlItemAndCycle.ControlItemContent;
newControlItemAndCycle.ControlPoint = ControlItemAndCycle.ControlPoint;
diff --git a/SGGL/BLL/CQMS/WBS/WorkPackageService.cs b/SGGL/BLL/CQMS/WBS/WorkPackageService.cs
index 98f1f8fc..0da0f05f 100644
--- a/SGGL/BLL/CQMS/WBS/WorkPackageService.cs
+++ b/SGGL/BLL/CQMS/WBS/WorkPackageService.cs
@@ -689,17 +689,28 @@ namespace BLL
///
///
///
- public static string getWorkPageIdsByControlItemAndCycle(string controlItemAndCycleId)
+ public static string getWorkPageIdsByControlItemAndCycle(string workPackageId, string controlItemAndCycleId)
{
string returnValues = string.Empty;
- var getControlItemAndCycle = Funs.DB.WBS_ControlItemAndCycle.FirstOrDefault(x => x.ControlItemAndCycleId == controlItemAndCycleId);
- if (getControlItemAndCycle != null)
+ if (!string.IsNullOrEmpty(controlItemAndCycleId))
{
- var getWorkPackage = Funs.DB.WBS_WorkPackage.FirstOrDefault(x => x.WorkPackageId == getControlItemAndCycle.WorkPackageId);
- if (getWorkPackage != null)
+ var getControlItemAndCycle = Funs.DB.WBS_ControlItemAndCycle.FirstOrDefault(x => x.ControlItemAndCycleId == controlItemAndCycleId);
+ if (getControlItemAndCycle != null)
+ {
+ workPackageId = getControlItemAndCycle.WorkPackageId;
+ }
+ }
+ var getWorkPackage = Funs.DB.WBS_WorkPackage.FirstOrDefault(x => x.WorkPackageId == workPackageId);
+ if (getWorkPackage != null)
+ {
+ if (!string.IsNullOrEmpty(controlItemAndCycleId))
{
returnValues = getSelectIds(getWorkPackage.WorkPackageId, getWorkPackage.WorkPackageId + "[" + getWorkPackage.InitWorkPackageCode + "]$" + controlItemAndCycleId);
}
+ else
+ {
+ returnValues = getSelectIds(getWorkPackage.WorkPackageId, getWorkPackage.WorkPackageId + "[" + getWorkPackage.InitWorkPackageCode + "]");
+ }
}
return returnValues;
diff --git a/SGGL/BLL/HSSE/Accident/AccidentPersonRecordService.cs b/SGGL/BLL/HSSE/Accident/AccidentPersonRecordService.cs
index 9df35c8f..06cdf486 100644
--- a/SGGL/BLL/HSSE/Accident/AccidentPersonRecordService.cs
+++ b/SGGL/BLL/HSSE/Accident/AccidentPersonRecordService.cs
@@ -44,7 +44,9 @@ namespace BLL
CompileMan = accidentPersonRecord.CompileMan,
CompileDate = accidentPersonRecord.CompileDate,
IsAttempt = accidentPersonRecord.IsAttempt,
- States = accidentPersonRecord.States
+ States = accidentPersonRecord.States,
+ WorkPackageName = accidentPersonRecord.WorkPackageName,
+ WorkPackageId = accidentPersonRecord.WorkPackageId,
};
db.Accident_AccidentPersonRecord.InsertOnSubmit(newAccidentPersonRecord);
db.SubmitChanges();
@@ -76,6 +78,8 @@ namespace BLL
newAccidentPersonRecord.CompileDate = accidentPersonRecord.CompileDate;
newAccidentPersonRecord.IsAttempt = accidentPersonRecord.IsAttempt;
newAccidentPersonRecord.States = accidentPersonRecord.States;
+ newAccidentPersonRecord.WorkPackageName = accidentPersonRecord.WorkPackageName;
+ newAccidentPersonRecord.WorkPackageId = accidentPersonRecord.WorkPackageId;
db.SubmitChanges();
}
}
diff --git a/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx b/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx
index 224d6294..3e3e41d3 100644
--- a/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx
+++ b/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx
@@ -38,8 +38,8 @@
-
-
+ <%--
+ --%>
@@ -53,15 +53,19 @@
+ Height="100px" AutoScroll="true">
-
+
+
+
+
+
@@ -69,19 +73,33 @@
+ Height="150px" AutoScroll="true">
-
-
+ <%--
+ --%>
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -89,18 +107,53 @@
+ Height="100px" AutoScroll="true">
+
+
+
+
+
+
+
+
+
+
+ Height="100px" AutoScroll="true">
+
+
+
+
+
+
+
+
+
+
+
+
+ Height="100px" AutoScroll="true">
+
+
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.cs b/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.cs
index f7a0605c..3f67a293 100644
--- a/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.cs
+++ b/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.cs
@@ -35,7 +35,7 @@ namespace FineUIPro.Web.DigData
////权限按钮方法
// this.ucTree.WorkPackageCode = this.WorkPackageCode;
this.ucTree.ProjectId = this.ProjectId;
- this.btnNew.OnClientClick = Window1.GetShowReference("ShowProjectWBSPackage.aspx") + "return false;";
+ //this.btnNew.OnClientClick = Window1.GetShowReference("ShowProjectWBSPackage.aspx") + "return false;";
}
}
@@ -105,29 +105,113 @@ namespace FineUIPro.Web.DigData
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
+ 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();
}
if (item == "CQMS")
{
this.gpCQMS.Hidden = false;
- var getDetail = from x in Funs.DB.Check_SpotCheckDetail
+ //// 实体验收 资料验收
+ 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) //&& y.States == Const.State_1
- && (controlItemAndCycleId == null || x.WorkPackageId.Contains(controlItemAndCycleId))
+ where y.ProjectId == this.ProjectId && x.WorkPackageId.Contains(workPackageId)
+ && (controlItemAndCycleId == null || x.WorkPackageId.Contains(controlItemAndCycleId))
+ && y.State == "8"
select x;
- int all = getDetail.Count();
- this.lbSpotCheck1.Text = all.ToString();
+ int all = getSpotCheckDetail.Count();
+ // this.lbSpotCheck1.Text = all.ToString();
+ int onesOKCount = getSpotCheckDetail.Where(x => x.IsOnesOK == true).Count(); //一次合格
+ // this.lbSpotCheck2.Text= okCount.ToString();
- int okCount = getDetail.Where(x => x.IsOK == true).Count();
- this.lbSpotCheck2.Text= okCount.ToString();
+ this.lbSpotCheckRate.Text= all > 0 ? Math.Round(onesOKCount * 100.0 / (all * 1.0)).ToString()+"%" : "0%";
- this.lbSpotCheck.Text= all > 0 ? Math.Round(okCount * 1.0 / (all * 1.0)).ToString() : "0";
+ /// 资料验收合格项目
+ var getOKSpotCheckDetail = getSpotCheckDetail.Where(x => x.IsOK == true);
+ int okYSCount = getOKSpotCheckDetail.Count(); //验收合格
+ int okDateCount = getSpotCheckDetail.Where(x => x.IsDataOK == "1").Count(); //资料合格
+ this.lbSpotCheckDataRate.Text = okYSCount > 0 ? Math.Round(okDateCount * 100.0 / (okYSCount * 1.0)).ToString() + "%" : "0%";
+
+ ///实体质量问题整改率
+ //int allNoOk = all - onesOKCount; ///问题数
+ //int oKCount = getSpotCheckDetail.Where(x => x.IsOK == true).Count(); //合格数
+ //int zgCount = oKCount - onesOKCount; ///整改数
+ //this.lbSpotCheckOkRate.Text = allNoOk > 0 ? Math.Round(zgCount * 100.0 / (allNoOk * 1.0)).ToString() + "%" : "0%";
+
+ ////控制点
+ //var getControlItemAndCycle=from x in Funs.DB.WBS_ControlItemAndCycle
+ // where x.ProjectId == this.ProjectId && x.WorkPackageId.Contains(workPackageId)
+ // && (controlItemAndCycleId == null || x.WorkPackageId.Contains(controlItemAndCycleId))
+ // && x.ControlPoint.Contains("A") && x.CheckNum >0
+ // select x;
+ /////A级控制点总量
+ //int allControlItemCount = getControlItemAndCycle.Count();
+ /////已完成A级控制点数
+ //var getOKSpotCheckDetailCheckNum = from x in getOKSpotCheckDetail
+ // group x by x.ControlItemAndCycleId
+ // into g select new { g.First().ControlItemAndCycleId, num = g.Count() };
+
+ //var getOKControlItemAndCycle = from x in getControlItemAndCycle
+ // join y in getOKSpotCheckDetailCheckNum on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
+ // where x.CheckNum == y.num
+ // select x;
+ //int okControlItemCount= getOKControlItemAndCycle.Count();
+ //this.lbControlItemRate.Text = allControlItemCount > 0 ? Math.Round(okControlItemCount * 100.0 / (allControlItemCount * 1.0)).ToString() + "%" : "0%";
}
if (item == "JDGL")
{
this.gpJDGL.Hidden = false;
+
+ //double totalSJCost = 0; ////累计实际费用
+ //decimal totalPlanCost = 0; ////计划费用
+ //var getWorkPackageDetail = Funs.DB.WBS_WorkPackageDetail.FirstOrDefault(x => x.WorkPackageId == workPackageId);
+ //if (getWorkPackageDetail != null)
+ //{
+ // ///末级节点
+ // var getMaxSJCost = Funs.DB.View_WBS_WorkPackageDetail.Where(x => x.WorkPackageId == workPackageId).OrderByDescending(x => x.Months).FirstOrDefault();
+ // if (getMaxSJCost != null)
+ // {
+ // totalSJCost = getMaxSJCost.TotalThisValue ?? 0;
+ // totalPlanCost = getMaxSJCost.PlanCost ?? 0;
+ // }
+ //}
+ //else
+ //{
+ // ///非末级节点
+ // var getMaxSJCost = Funs.DB.View_WBS_WorkPackageParentDetail.Where(x =>x.ProjectId == this.ProjectId
+ // && x.ParentId == workPackageId).OrderByDescending(x => x.Months).FirstOrDefault();
+ // if (getMaxSJCost != null)
+ // {
+ // totalSJCost = getMaxSJCost.TotalThisValue ?? 0;
+ // totalPlanCost = getMaxSJCost.PlanCost ?? 0;
+ // }
+ //}
+ ////// 根 节点 建筑工程 安装工程
+ //if (workPackageId == "1" || workPackageId == "2")
+ //{
+ // var getUnitWorkByType = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.ProjectId && x.ProjectType == workPackageId select x;
+ // if (getUnitWorkByType.Count() > 0)
+ // {
+ // totalPlanCost = getUnitWorkByType.Sum(x => x.PlanCost ?? 0);
+ // }
+ //}
+
+ //var getUnitWork = Funs.DB.WBS_UnitWork.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.UnitWorkId == workPackageId);
+ //if (getUnitWork != null)
+ //{
+ // totalPlanCost= getUnitWork.PlanCost ?? 0;
+ //}
+
+ /////项目进度完成百分比
+ //decimal s = Convert.ToDecimal(totalSJCost);
+ //this.lbJDRate.Text = totalPlanCost > 0 ? Math.Round(s / totalPlanCost).ToString() + "%" : "0%";
+
}
if (item == "HTGL")
{
diff --git a/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.designer.cs b/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.designer.cs
index 0bb5960b..f8ae1512 100644
--- a/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.designer.cs
@@ -104,15 +104,6 @@ namespace FineUIPro.Web.DigData
///
protected global::FineUIPro.TextBox hdWorkPackageId;
- ///
- /// btnNew 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.Button btnNew;
-
///
/// Panel_CurrentApproval 控件。
///
@@ -158,6 +149,24 @@ namespace FineUIPro.Web.DigData
///
protected global::FineUIPro.Label lbExpertArgument;
+ ///
+ /// lbAccident 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label lbAccident;
+
+ ///
+ /// Label3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label Label3;
+
///
/// gpCQMS 控件。
///
@@ -177,31 +186,58 @@ namespace FineUIPro.Web.DigData
protected global::FineUIPro.Form Form2;
///
- /// lbSpotCheck1 控件。
+ /// lbSpotCheckRate 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.Label lbSpotCheck1;
+ protected global::FineUIPro.Label lbSpotCheckRate;
///
- /// lbSpotCheck2 控件。
+ /// lbSpotCheckDataRate 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.Label lbSpotCheck2;
+ protected global::FineUIPro.Label lbSpotCheckDataRate;
///
- /// lbSpotCheck 控件。
+ /// Label2 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.Label lbSpotCheck;
+ protected global::FineUIPro.Label Label2;
+
+ ///
+ /// lbSpotCheckOkRate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label lbSpotCheckOkRate;
+
+ ///
+ /// lbControlItemRate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label lbControlItemRate;
+
+ ///
+ /// Label1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label Label1;
///
/// gpJDGL 控件。
@@ -212,6 +248,24 @@ namespace FineUIPro.Web.DigData
///
protected global::FineUIPro.GroupPanel gpJDGL;
+ ///
+ /// Form3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form Form3;
+
+ ///
+ /// lbJDRate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label lbJDRate;
+
///
/// gpHTGL 控件。
///
@@ -221,6 +275,33 @@ namespace FineUIPro.Web.DigData
///
protected global::FineUIPro.GroupPanel gpHTGL;
+ ///
+ /// Form4 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form Form4;
+
+ ///
+ /// Label4 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label Label4;
+
+ ///
+ /// Label6 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label Label6;
+
///
/// gpLW 控件。
///
@@ -230,6 +311,24 @@ namespace FineUIPro.Web.DigData
///
protected global::FineUIPro.GroupPanel gpLW;
+ ///
+ /// Form5 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form Form5;
+
+ ///
+ /// Label5 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label Label5;
+
///
/// Window1 控件。
///
diff --git a/SGGL/FineUIPro.Web/DigData/WBSDW.aspx b/SGGL/FineUIPro.Web/DigData/WBSDW.aspx
index c168b78b..e6688443 100644
--- a/SGGL/FineUIPro.Web/DigData/WBSDW.aspx
+++ b/SGGL/FineUIPro.Web/DigData/WBSDW.aspx
@@ -50,16 +50,20 @@
-
+
-
+
+
+
+
+
@@ -67,18 +71,32 @@
+ Height="150px" AutoScroll="true">
-
+
-
+ <%--
+ --%>
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -87,18 +105,53 @@
+ Height="100px" AutoScroll="true">
+
+
+
+
+
+
+
+
+
+
+ Height="100px" AutoScroll="true">
+
+
+
+
+
+
+
+
+
+
+
+
+ Height="100px" AutoScroll="true">
+
+
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/DigData/WBSDW.aspx.cs b/SGGL/FineUIPro.Web/DigData/WBSDW.aspx.cs
index 81d715e1..24c15c1a 100644
--- a/SGGL/FineUIPro.Web/DigData/WBSDW.aspx.cs
+++ b/SGGL/FineUIPro.Web/DigData/WBSDW.aspx.cs
@@ -87,28 +87,102 @@ namespace FineUIPro.Web.DigData
this.lbExpertArgument.Text = (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))
+ && (controlItemAndCycleId == null || x.WorkPackageId.Contains(controlItemAndCycleId))
select x).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();
}
if (item == "CQMS")
{
this.gpCQMS.Hidden = false;
- var getDetail = from x in Funs.DB.Check_SpotCheckDetail
+ //// 实体验收 资料验收
+ 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.States == Const.State_1
+ where x.WorkPackageId.Contains(workPackageId) && y.State == "8"
&& (controlItemAndCycleId == null || x.WorkPackageId.Contains(controlItemAndCycleId))
select x;
- int all = getDetail.Count();
- this.lbSpotCheck1.Text = all.ToString();
+ int all = getSpotCheckDetail.Count();
+ // this.lbSpotCheck1.Text = all.ToString();
+ int onesOKCount = getSpotCheckDetail.Where(x => x.IsOnesOK == true).Count();
+ /// this.lbSpotCheck2.Text = okCount.ToString();
+ this.lbSpotCheckRate.Text = all > 0 ? Math.Round(onesOKCount * 100.0 / (all * 1.0)).ToString() + "%" : "0%";
- int okCount = getDetail.Where(x => x.IsOK == true).Count();
- this.lbSpotCheck2.Text = okCount.ToString();
+ /// 资料验收合格项目
+ var getOKSpotCheckDetail = getSpotCheckDetail.Where(x => x.IsOK == true);
+ int okYSCount = getOKSpotCheckDetail.Count(); //验收合格
+ int okDateCount = getSpotCheckDetail.Where(x => x.IsDataOK == "1").Count(); //资料合格
+ this.lbSpotCheckDataRate.Text = okYSCount > 0 ? Math.Round(okDateCount * 100.0 / (okYSCount * 1.0)).ToString() + "%" : "0%";
- this.lbSpotCheck.Text = all > 0 ? Math.Round(okCount * 1.0 / (all * 1.0)).ToString() : "0";
+ /////实体质量问题整改率
+ //int allNoOk = all - onesOKCount; ///问题数
+ //int oKCount = getSpotCheckDetail.Where(x => x.IsOK == true).Count(); //合格数
+ //int zgCount = oKCount - onesOKCount; ///整改数
+ //this.lbSpotCheckOkRate.Text = allNoOk > 0 ? Math.Round(zgCount * 100.0 / (allNoOk * 1.0)).ToString() + "%" : "0%";
+
+ //////控制点
+ //var getControlItemAndCycle = from x in Funs.DB.WBS_ControlItemAndCycle
+ // where x.WorkPackageId.Contains(workPackageId)
+ // && (controlItemAndCycleId == null || x.WorkPackageId.Contains(controlItemAndCycleId))
+ // && x.ControlPoint.Contains("A") && x.CheckNum > 0
+ // select x;
+ /////A级控制点总量
+ //int allControlItemCount = getControlItemAndCycle.Count();
+ /////已完成A级控制点数
+ //var getOKSpotCheckDetailCheckNum = from x in getOKSpotCheckDetail
+ // group x by x.ControlItemAndCycleId
+ // into g
+ // select new { g.First().ControlItemAndCycleId, num = g.Count() };
+
+ //var getOKControlItemAndCycle = from x in getControlItemAndCycle
+ // join y in getOKSpotCheckDetailCheckNum on x.ControlItemAndCycleId equals y.ControlItemAndCycleId
+ // where x.CheckNum == y.num
+ // select x;
+ //int okControlItemCount = getOKControlItemAndCycle.Count();
+ //this.lbControlItemRate.Text = allControlItemCount > 0 ? Math.Round(okControlItemCount * 100.0 / (allControlItemCount * 1.0)).ToString() + "%" : "0%";
}
if (item == "JDGL")
{
this.gpJDGL.Hidden = false;
+ //double totalSJCost = 0; ////累计实际费用
+ //decimal totalPlanCost = 0; ////计划费用
+ //var getWorkPackageDetail = Funs.DB.View_WBS_WorkPackageDetail.FirstOrDefault(x => x.InitWorkPackageCode == workPackageId);
+ //if (getWorkPackageDetail != null)
+ //{
+ // ///末级节点
+ // var getMaxSJCost = Funs.DB.View_WBS_WorkPackageDetail.Where(x => x.InitWorkPackageCode == workPackageId).OrderByDescending(x => x.Months).FirstOrDefault();
+ // if (getMaxSJCost != null)
+ // {
+ // totalSJCost = getMaxSJCost.TotalThisValue ?? 0;
+ // totalPlanCost = getMaxSJCost.PlanCost ?? 0;
+ // }
+ //}
+ //else
+ //{
+ // ///非末级节点
+ // var getMaxSJCost = Funs.DB.View_WBS_WorkPackageParentDetail.Where(x => x.InitWorkPackageCode == workPackageId).OrderByDescending(x => x.Months).FirstOrDefault();
+ // if (getMaxSJCost != null)
+ // {
+ // totalSJCost = getMaxSJCost.TotalThisValue ?? 0;
+ // totalPlanCost = getMaxSJCost.PlanCost ?? 0;
+ // }
+ //}
+ ////// 根 节点 建筑工程 安装工程
+ //if (workPackageId == "1" || workPackageId == "2")
+ //{
+ // var getUnitWorkByType = from x in Funs.DB.WBS_UnitWork where x.ProjectType == workPackageId select x;
+ // if (getUnitWorkByType.Count() > 0)
+ // {
+ // totalPlanCost = getUnitWorkByType.Sum(x => x.PlanCost ?? 0);
+ // }
+ //}
+
+ /////项目进度完成百分比
+ //decimal s = Convert.ToDecimal(totalSJCost);
+ //this.lbJDRate.Text = totalPlanCost > 0 ? Math.Round(s / totalPlanCost).ToString() + "%" : "0%";
}
if (item == "HTGL")
{
diff --git a/SGGL/FineUIPro.Web/DigData/WBSDW.aspx.designer.cs b/SGGL/FineUIPro.Web/DigData/WBSDW.aspx.designer.cs
index b29aadf1..078da8cb 100644
--- a/SGGL/FineUIPro.Web/DigData/WBSDW.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/DigData/WBSDW.aspx.designer.cs
@@ -149,6 +149,24 @@ namespace FineUIPro.Web.DigData
///
protected global::FineUIPro.Label lbExpertArgument;
+ ///
+ /// lbAccident 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label lbAccident;
+
+ ///
+ /// Label3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label Label3;
+
///
/// gpCQMS 控件。
///
@@ -168,31 +186,58 @@ namespace FineUIPro.Web.DigData
protected global::FineUIPro.Form Form2;
///
- /// lbSpotCheck1 控件。
+ /// lbSpotCheckRate 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.Label lbSpotCheck1;
+ protected global::FineUIPro.Label lbSpotCheckRate;
///
- /// lbSpotCheck2 控件。
+ /// lbSpotCheckDataRate 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.Label lbSpotCheck2;
+ protected global::FineUIPro.Label lbSpotCheckDataRate;
///
- /// lbSpotCheck 控件。
+ /// Label2 控件。
///
///
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
- protected global::FineUIPro.Label lbSpotCheck;
+ protected global::FineUIPro.Label Label2;
+
+ ///
+ /// lbControlItemRate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label lbControlItemRate;
+
+ ///
+ /// Label1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label Label1;
+
+ ///
+ /// lbSpotCheckOkRate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label lbSpotCheckOkRate;
///
/// gpJDGL 控件。
@@ -203,6 +248,24 @@ namespace FineUIPro.Web.DigData
///
protected global::FineUIPro.GroupPanel gpJDGL;
+ ///
+ /// Form3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form Form3;
+
+ ///
+ /// lbJDRate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label lbJDRate;
+
///
/// gpHTGL 控件。
///
@@ -212,6 +275,33 @@ namespace FineUIPro.Web.DigData
///
protected global::FineUIPro.GroupPanel gpHTGL;
+ ///
+ /// Form4 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form Form4;
+
+ ///
+ /// Label4 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label Label4;
+
+ ///
+ /// Label6 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label Label6;
+
///
/// gpLW 控件。
///
@@ -220,5 +310,23 @@ namespace FineUIPro.Web.DigData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.GroupPanel gpLW;
+
+ ///
+ /// Form5 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form Form5;
+
+ ///
+ /// Label5 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label Label5;
}
}
diff --git a/SGGL/FineUIPro.Web/HSSE/Accident/AccidentPersonRecord.aspx b/SGGL/FineUIPro.Web/HSSE/Accident/AccidentPersonRecord.aspx
index cd49f388..8650d479 100644
--- a/SGGL/FineUIPro.Web/HSSE/Accident/AccidentPersonRecord.aspx
+++ b/SGGL/FineUIPro.Web/HSSE/Accident/AccidentPersonRecord.aspx
@@ -47,7 +47,7 @@
-
@@ -61,7 +61,7 @@
-
<%--
+ Height="650px">