From 16a51ca0cfa4ca7dd756264a3ed8f6fc7071494d Mon Sep 17 00:00:00 2001
From: fly-l <1420031550@qq.com>
Date: Mon, 4 Sep 2023 11:15:13 +0800
Subject: [PATCH 1/4] 2023-09-04
---
SGGL/BLL/HJGL/PointTrust/PointBatchService.cs | 240 +++++++++++++++++-
.../HJGL/WeldingManage/WeldReportEdit.aspx.cs | 41 ++-
.../HJGL/WeldingManage/WeldTask.aspx.cs | 10 +
3 files changed, 268 insertions(+), 23 deletions(-)
diff --git a/SGGL/BLL/HJGL/PointTrust/PointBatchService.cs b/SGGL/BLL/HJGL/PointTrust/PointBatchService.cs
index 6b396b5e..c1cb3789 100644
--- a/SGGL/BLL/HJGL/PointTrust/PointBatchService.cs
+++ b/SGGL/BLL/HJGL/PointTrust/PointBatchService.cs
@@ -1,5 +1,13 @@
-using System;
+using Microsoft.SqlServer.Dts.Runtime;
+using NPOI.SS.Formula.Functions;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
using System.Linq;
+using System.Windows.Media.Animation;
+using System.Windows;
+using Model;
namespace BLL
{
@@ -84,6 +92,236 @@ namespace BLL
db.HJGL_Batch_PointBatch.DeleteOnSubmit(batch);
db.SubmitChanges();
}
+ ///
+ /// 根据焊口id删除批信息
+ ///
+ ///
+ public static void DeleteBatchByWeldJointId(string weldJointId)
+ {
+ var newWeldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(weldJointId);
+
+ if (newWeldJoint != null )
+ {
+ var isTrust = from x in Funs.DB.HJGL_Batch_BatchTrustItem
+ where x.WeldJointId == weldJointId
+ select x; ;
+ if (!isTrust.Any())
+ {
+ var pointBatchItems = from x in Funs.DB.HJGL_Batch_PointBatchItem where x.WeldJointId == weldJointId select x;
+ string pointBatchId = pointBatchItems.FirstOrDefault()?.PointBatchId;
+
+ // 删除焊口所在批明细信息
+ BLL.PointBatchDetailService.DeleteBatchDetail(weldJointId);
+
+ // 删除批信息
+ var batch = from x in Funs.DB.HJGL_Batch_PointBatchItem where x.PointBatchId == pointBatchId select x;
+ if (!string .IsNullOrEmpty(pointBatchId) && !batch.Any())
+ {
+ DeleteBatch(pointBatchId);
+ }
+ //BLL.Batch_NDEItemService.DeleteAllNDEInfoToWeldJoint(item.WeldJointId);
+
+ }
+ else
+ {
+ // errlog += "焊口【" + newWeldJoint.WeldJointCode + "】已进委托单了,不能删除。";
+ }
+ }
+ }
+ ///
+ /// 根据焊口id组批
+ ///
+ public static string AddBatchByWeldJointId(string weldJointId, DateTime? weldingDate, string batchCondition)
+ {
+ string errlog = string.Empty;
+ string[] condition = batchCondition.Split('|');
+ var newWeldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(weldJointId);
+ var pipeline = BLL.PipelineService.GetPipelineByPipelineId(newWeldJoint.PipelineId);
+ var project = BLL.ProjectService.GetProjectByProjectId(pipeline.ProjectId);
+ var unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(pipeline.UnitWorkId);
+ var unit = BLL.UnitService.GetUnitByUnitId(pipeline.UnitId);
+ var ndt = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(newWeldJoint.DetectionTypeId);
+ var ndtr = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(pipeline.DetectionRateId);
+
+ if (newWeldJoint != null)
+ {
+ bool isPass = true;
+ foreach (string c in condition)
+ {
+ if (c == "1")
+ {
+ if (string.IsNullOrEmpty(pipeline.UnitWorkId))
+ {
+ isPass = false;
+ break;
+
+ }
+ }
+ if (c == "2")
+ {
+ if (string.IsNullOrEmpty(pipeline.UnitId))
+ {
+ isPass = false;
+ break;
+
+ }
+ }
+ if (c == "3")
+ {
+ if (string.IsNullOrEmpty(newWeldJoint.DetectionTypeId))
+ {
+ isPass = false;
+ break;
+ }
+ }
+ if (c == "4")
+ {
+ if (string.IsNullOrEmpty(pipeline.DetectionRateId))
+ {
+ isPass = false;
+ break;
+ }
+ }
+ if (c == "5")
+ {
+ if (string.IsNullOrEmpty(pipeline.PipingClassId))
+ {
+ isPass = false;
+ break;
+ }
+ }
+ // 6是管线,7是焊工都不可能为空,这里就不判断了
+ }
+ if (isPass)
+ {
+ string strSql = @"SELECT PointBatchId FROM dbo.HJGL_Batch_PointBatch
+ WHERE (EndDate IS NULL OR EndDate ='')
+ AND ProjectId = @ProjectId
+ AND UnitWorkId = @UnitWorkId AND UnitId =@UnitId
+ AND DetectionTypeId =@DetectionTypeId
+ AND DetectionRateId =@DetectionRateId";
+ List listStr = new List
+ {
+ new SqlParameter("@ProjectId", project.ProjectId),
+ new SqlParameter("@UnitWorkId", pipeline.UnitWorkId),
+ new SqlParameter("@UnitId", pipeline.UnitId),
+ new SqlParameter("@DetectionTypeId", newWeldJoint.DetectionTypeId),
+ new SqlParameter("@DetectionRateId", pipeline.DetectionRateId)
+ };
+
+ // 5,6,7项为可选项
+ if (condition.Contains("5"))
+ {
+ strSql += " AND PipingClassId =@PipingClassId";
+ listStr.Add(new SqlParameter("@PipingClassId", pipeline.PipingClassId));
+ }
+ if (condition.Contains("6"))
+ {
+ strSql += " AND PipelineId =@PipelineId";
+ listStr.Add(new SqlParameter("@PipelineId", newWeldJoint.PipelineId));
+ }
+ if (condition.Contains("7"))
+ {
+ strSql += " AND WelderId =@WelderId";
+ listStr.Add(new SqlParameter("@WelderId", newWeldJoint.CoverWelderId));
+ }
+
+ SqlParameter[] parameter = listStr.ToArray();
+ DataTable batchInfo = SQLHelper.GetDataTableRunText(strSql, parameter);
+
+ string batchId = string.Empty;
+ if (batchInfo.Rows.Count == 0)
+ {
+ Model.HJGL_Batch_PointBatch batch = new Model.HJGL_Batch_PointBatch();
+ batch.PointBatchId = SQLHelper.GetNewID(typeof(Model.HJGL_Batch_PointBatch));
+ batchId = batch.PointBatchId;
+ string perfix = project.ProjectCode + "-" + unitWork.UnitWorkCode + "-GD-DK-" + ndt.DetectionTypeCode + "-" + ndtr.DetectionRateValue.ToString() + "%-";
+ batch.PointBatchCode = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_Batch_PointBatch", "PointBatchCode", project.ProjectId, perfix);
+
+ batch.ProjectId = project.ProjectId;
+ batch.UnitWorkId = pipeline.UnitWorkId;
+ batch.BatchCondition = batchCondition;
+ batch.UnitId = pipeline.UnitId;
+ batch.DetectionTypeId = newWeldJoint.DetectionTypeId;
+ batch.DetectionRateId = pipeline.DetectionRateId;
+ if (condition.Contains("5"))
+ {
+ batch.PipingClassId = pipeline.PipingClassId;
+ }
+ if (condition.Contains("6"))
+ {
+ batch.PipelineId = newWeldJoint.PipelineId;
+ if (pipeline.PipeArea == PipelineService.PipeArea_FIELD)
+ {
+ perfix += "XC-";
+ batch.PointBatchCode = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_Batch_PointBatch", "PointBatchCode", project.ProjectId, perfix);
+
+ }
+ else if (pipeline.PipeArea == PipelineService.PipeArea_SHOP)
+ {
+ perfix += "GC-";
+ batch.PointBatchCode = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_Batch_PointBatch", "PointBatchCode", project.ProjectId, perfix);
+
+ }
+ }
+ if (condition.Contains("7"))
+ {
+ batch.WelderId = newWeldJoint.CoverWelderId;
+ }
+ batch.StartDate = DateTime.Now;
+ BLL.PointBatchService.AddPointBatch(batch);
+ }
+ else
+ {
+ batchId = batchInfo.Rows[0][0].ToString();
+ }
+
+ var b = BLL.PointBatchDetailService.GetBatchDetailByJotId(weldJointId);
+ if (b == null)
+ {
+ try
+ {
+ Model.HJGL_Batch_PointBatchItem batchDetail = new Model.HJGL_Batch_PointBatchItem();
+ string pointBatchItemId = SQLHelper.GetNewID(typeof(Model.HJGL_Batch_PointBatchItem));
+ batchDetail.PointBatchItemId = pointBatchItemId;
+ batchDetail.PointBatchId = batchId;
+ batchDetail.WeldJointId = weldJointId;
+ batchDetail.WeldingDate = weldingDate;
+ batchDetail.CreatDate = DateTime.Now;
+ BLL.Funs.DB.HJGL_Batch_PointBatchItem.InsertOnSubmit(batchDetail);
+ BLL.Funs.DB.SubmitChanges();
+
+ // 焊工首道口RT必点
+ var joints = from x in Funs.DB.HJGL_Batch_PointBatchItem
+ join y in Funs.DB.HJGL_Batch_PointBatch on x.PointBatchId equals y.PointBatchId
+ join z in Funs.DB.Base_DetectionType on y.DetectionTypeId equals z.DetectionTypeId
+ join j in Funs.DB.HJGL_WeldJoint on x.WeldJointId equals j.WeldJointId
+ where z.DetectionTypeCode == "RT"
+ && j.CoverWelderId == newWeldJoint.CoverWelderId
+ select x;
+ if (joints.Count() <= 1)
+ {
+ BLL.PointBatchDetailService.UpdatePointBatchDetail(pointBatchItemId, "1", System.DateTime.Now);
+ BLL.PointBatchDetailService.UpdateWelderFirst(pointBatchItemId, true);
+ }
+ }
+ catch
+ {
+
+ }
+ }
+ }
+ else
+ {
+ errlog += "焊口【" + newWeldJoint.WeldJointCode + "】组批条件不能为空。";
+ }
+
+ }
+
+ return errlog;
+ }
+
+
}
}
diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs
index 715faddb..558a3655 100644
--- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx.cs
@@ -526,7 +526,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
{
var t = BLL.WeldTaskService.GetWeldTaskById(row);
- errlog += InsertWeldingDailyItem(t.WeldJointId, t.CoverWelderId, t.BackingWelderId, t.JointAttribute, newWeldingDaily.WeldingDate, batchCondition, true);
+ errlog += InsertWeldingDailyItem(t.WeldJointId, t.CoverWelderId, t.BackingWelderId, t.JointAttribute, newWeldingDaily.WeldingDate, batchCondition, false);
}
}
else
@@ -536,12 +536,12 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
if (Grid1.SelectedRowIDArray.Contains(Grid1.Rows[i].RowID))
{
var t = BLL.WeldTaskService.GetWeldTaskById(Grid1.Rows[i].RowID);
- errlog += InsertWeldingDailyItem(t.WeldJointId, t.CoverWelderId, t.BackingWelderId, t.JointAttribute, newWeldingDaily.WeldingDate, batchCondition, true);
+ errlog += InsertWeldingDailyItem(t.WeldJointId, t.CoverWelderId, t.BackingWelderId, t.JointAttribute, newWeldingDaily.WeldingDate, batchCondition, false);
}
else
{
var t = BLL.WeldTaskService.GetWeldTaskById(Grid1.Rows[i].RowID);
- errlog += DeleteWeldingDailyItem(t.WeldJointId, t.CoverWelderId, t.BackingWelderId, t.JointAttribute, newWeldingDaily.WeldingDate, batchCondition, true);
+ errlog += DeleteWeldingDailyItem(t.WeldJointId);
}
}
}
@@ -827,22 +827,21 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
{
if (!string.IsNullOrEmpty(coverWelderId) && !string.IsNullOrEmpty(backingWelderId))
{
+ newWeldJoint.WeldingDailyId = this.WeldingDailyId;
+ newWeldJoint.WeldingDailyCode = this.txtWeldingDailyCode.Text.Trim();
+ newWeldJoint.CoverWelderId = coverWelderId;
+ newWeldJoint.BackingWelderId = backingWelderId;
+ //if (item.WeldingLocationId != Const._Null)
+ //{
+ // newWeldJoint.WeldingLocationId = item.WeldingLocationId;
+ //}
+ newWeldJoint.JointAttribute = jointAttribute;
+ BLL.WeldJointService.UpdateWeldJoint(newWeldJoint);
+
+ // 更新焊口号 修改固定焊口号后 +G
+ BLL.WeldJointService.UpdateWeldJointAddG(newWeldJoint.WeldJointId, newWeldJoint.JointAttribute, Const.BtnAdd);
if (isSave)
{
- newWeldJoint.WeldingDailyId = this.WeldingDailyId;
- newWeldJoint.WeldingDailyCode = this.txtWeldingDailyCode.Text.Trim();
- newWeldJoint.CoverWelderId = coverWelderId;
- newWeldJoint.BackingWelderId = backingWelderId;
- //if (item.WeldingLocationId != Const._Null)
- //{
- // newWeldJoint.WeldingLocationId = item.WeldingLocationId;
- //}
- newWeldJoint.JointAttribute = jointAttribute;
- BLL.WeldJointService.UpdateWeldJoint(newWeldJoint);
-
- // 更新焊口号 修改固定焊口号后 +G
- BLL.WeldJointService.UpdateWeldJointAddG(newWeldJoint.WeldJointId, newWeldJoint.JointAttribute, Const.BtnAdd);
-
// 进批
//BLL.Batch_PointBatchItemService.InsertPointBatch(this.ProjectId, this.drpUnit.SelectedValue, this.drpUnitWork.SelectedValue, item.CoverWelderId, item.WeldJointId, weldingDate);
bool isPass = true;
@@ -1035,7 +1034,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
///
///
///
- private string DeleteWeldingDailyItem(string weldJointId, string coverWelderId, string backingWelderId, string jointAttribute, DateTime? weldingDate, string batchCondition, bool isSave)
+ private string DeleteWeldingDailyItem(string weldJointId)
{
string errlog = string.Empty;
var newWeldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(weldJointId);
@@ -1063,7 +1062,7 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
var pointBatchItems = from x in Funs.DB.HJGL_Batch_PointBatchItem where x.WeldJointId == weldJointId select x;
string pointBatchId = pointBatchItems.FirstOrDefault().PointBatchId;
- // 删除焊口所在批明细信息
+ /*// 删除焊口所在批明细信息
BLL.PointBatchDetailService.DeleteBatchDetail(weldJointId);
// 删除批信息
@@ -1071,10 +1070,8 @@ namespace FineUIPro.Web.WeldingProcess.WeldingManage
if (pointBatchId != null && batch.Count() == 0)
{
BLL.PointBatchService.DeleteBatch(pointBatchId);
- }
- //BLL.Batch_NDEItemService.DeleteAllNDEInfoToWeldJoint(item.WeldJointId);
+ }*/
}
- //BLL.Sys_LogService.AddLog(BLL.Const.System_6, this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_WeldReportMenuId, Const.BtnDelete, weldingDailyId);
}
else
{
diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs
index b45da0d1..025e2f42 100644
--- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs
+++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx.cs
@@ -422,6 +422,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
jot.JointAttribute = item.JointAttribute;
}
BLL.WeldJointService.UpdateWeldJoint(jot);
+ // 获取组批条件
+ var batchC = BLL.Project_SysSetService.GetSysSetBySetId("5", CurrUser.LoginProjectId);
+ if (batchC != null)
+ {
+ string batchCondition = batchC.SetValue;
+ BLL.PointBatchService.AddBatchByWeldJointId(item.WeldJointId,null, batchCondition);
+
+ }
+
}
}
}
@@ -910,6 +919,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
if (task != null)
{
BLL.WeldTaskService.DeleteWeldingTask(task.WeldTaskId);
+ PointBatchService.DeleteBatchByWeldJointId(task.WeldJointId);
}
}
ShowNotify("删除成功!", MessageBoxIcon.Success);
From e1e1d5394abc5c743afeb88d3ee79e98f142e113 Mon Sep 17 00:00:00 2001
From: fly-l <1420031550@qq.com>
Date: Mon, 4 Sep 2023 15:14:11 +0800
Subject: [PATCH 2/4] 2023-09-4
---
SGGL/BLL/HJGL/PointTrust/PointBatchService.cs | 6 +++---
.../HJGL/WeldingManage/WeldJointBatchEdit.aspx.cs | 2 ++
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/SGGL/BLL/HJGL/PointTrust/PointBatchService.cs b/SGGL/BLL/HJGL/PointTrust/PointBatchService.cs
index c1cb3789..0f10bd28 100644
--- a/SGGL/BLL/HJGL/PointTrust/PointBatchService.cs
+++ b/SGGL/BLL/HJGL/PointTrust/PointBatchService.cs
@@ -140,7 +140,7 @@ namespace BLL
var project = BLL.ProjectService.GetProjectByProjectId(pipeline.ProjectId);
var unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(pipeline.UnitWorkId);
var unit = BLL.UnitService.GetUnitByUnitId(pipeline.UnitId);
- var ndt = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(newWeldJoint.DetectionTypeId);
+ var ndt = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(pipeline.DetectionType);
var ndtr = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(pipeline.DetectionRateId);
if (newWeldJoint != null)
@@ -205,7 +205,7 @@ namespace BLL
new SqlParameter("@ProjectId", project.ProjectId),
new SqlParameter("@UnitWorkId", pipeline.UnitWorkId),
new SqlParameter("@UnitId", pipeline.UnitId),
- new SqlParameter("@DetectionTypeId", newWeldJoint.DetectionTypeId),
+ new SqlParameter("@DetectionTypeId", pipeline.DetectionType),
new SqlParameter("@DetectionRateId", pipeline.DetectionRateId)
};
@@ -242,7 +242,7 @@ namespace BLL
batch.UnitWorkId = pipeline.UnitWorkId;
batch.BatchCondition = batchCondition;
batch.UnitId = pipeline.UnitId;
- batch.DetectionTypeId = newWeldJoint.DetectionTypeId;
+ batch.DetectionTypeId = pipeline.DetectionType;
batch.DetectionRateId = pipeline.DetectionRateId;
if (condition.Contains("5"))
{
diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointBatchEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointBatchEdit.aspx.cs
index 00d3ec46..fcbb4978 100644
--- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointBatchEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldJointBatchEdit.aspx.cs
@@ -568,6 +568,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
///
///
///
+ /// `
+ /// `
protected void drpWeldingRod_SelectedIndexChanged(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(txtWpqId.Text))
From 78871bae92f3424383b14aa9b3d360bb8b9df64b Mon Sep 17 00:00:00 2001
From: yhw0507
Date: Mon, 4 Sep 2023 17:13:55 +0800
Subject: [PATCH 3/4] =?UTF-8?q?20230904=20wbs=E7=BB=B4=E5=BA=A6=E6=95=B0?=
=?UTF-8?q?=E6=8D=AE=E4=BB=93=E5=BA=93=E5=AE=9E=E7=8E=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
DataBase/版本日志/SGGLDB_V2023-09-04.sql | 60 +++++
SGGL/BLL/CQMS/Check/SpotCheckDetailService.cs | 8 +-
.../CQMS/WBS/ControlItemAndCycleService.cs | 1 +
SGGL/BLL/CQMS/WBS/WorkPackageService.cs | 21 +-
.../Accident/AccidentPersonRecordService.cs | 6 +-
SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx | 77 ++++++-
.../DigData/ProjectWBSDW.aspx.cs | 104 ++++++++-
.../DigData/ProjectWBSDW.aspx.designer.cs | 129 +++++++++--
SGGL/FineUIPro.Web/DigData/WBSDW.aspx | 77 ++++++-
SGGL/FineUIPro.Web/DigData/WBSDW.aspx.cs | 90 +++++++-
.../DigData/WBSDW.aspx.designer.cs | 120 +++++++++-
.../HSSE/Accident/AccidentPersonRecord.aspx | 6 +-
.../Accident/AccidentPersonRecordEdit.aspx | 216 +++++++++---------
.../Accident/AccidentPersonRecordEdit.aspx.cs | 23 +-
.../AccidentPersonRecordEdit.aspx.designer.cs | 54 ++++-
.../Accident/AccidentPersonRecordView.aspx | 22 +-
.../Accident/AccidentPersonRecordView.aspx.cs | 1 +
.../AccidentPersonRecordView.aspx.designer.cs | 27 ++-
.../Filing/BidDocumentsStandingBook.aspx.cs | 33 ++-
SGGL/FineUIPro.Web/common/Menu_CQMS.xml | 2 +-
SGGL/Model/Model.cs | 96 ++++++++
21 files changed, 950 insertions(+), 223 deletions(-)
create mode 100644 DataBase/版本日志/SGGLDB_V2023-09-04.sql
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">