From 98345cb94f57318d088d1a536de67a90d317754e Mon Sep 17 00:00:00 2001
From: gaofei1985 <181547018@qq.com>
Date: Sat, 7 Oct 2023 16:58:43 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../版本日志/SGGLDB_WH_2023-09-30.sql | 47 ++
.../版本日志/SGGLDB_WH_2023-10-07.sql | 4 +
SGGL/BLL/API/HSSE/APICheckSpecialService.cs | 228 ++++--
SGGL/BLL/ProjectData/ProjectService.cs | 4 +
SGGL/FineUIPro.Web/ErrLog.txt | 22 +
.../HSSE/Check/CheckSpecialView.aspx | 4 +-
.../ProjectData/Installation.aspx.cs | 763 +++++++++---------
.../ProjectData/ProjectSetSave.aspx | 6 +
.../ProjectData/ProjectSetSave.aspx.cs | 4 +
.../ProjectSetSave.aspx.designer.cs | 114 +--
.../ProjectData/ProjectSetView.aspx | 6 +
.../ProjectData/ProjectSetView.aspx.cs | 2 +
.../ProjectSetView.aspx.designer.cs | 18 +
SGGL/Model/APIItem/HSSE/CheckSpecialItem.cs | 5 +
SGGL/Model/Model.cs | 72 ++
.../HSSE/CheckSpecialController.cs | 27 +-
16 files changed, 829 insertions(+), 497 deletions(-)
create mode 100644 DataBase/版本日志/SGGLDB_WH_2023-09-30.sql
create mode 100644 DataBase/版本日志/SGGLDB_WH_2023-10-07.sql
diff --git a/DataBase/版本日志/SGGLDB_WH_2023-09-30.sql b/DataBase/版本日志/SGGLDB_WH_2023-09-30.sql
new file mode 100644
index 00000000..8c9b1c05
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_WH_2023-09-30.sql
@@ -0,0 +1,47 @@
+--ר¼
+alter table Check_CheckSpecial add ReceiveMan nvarchar(2000) null;
+
+--States0- 1-ύ 2-ͨ 3-ȷ
+
+
+--רϸͼ
+/****** Object: View [dbo].[View_CheckSpecialDetail] Script Date: 2023/9/30 11:19:54 ******/
+SET ANSI_NULLS ON
+GO
+
+SET QUOTED_IDENTIFIER ON
+GO
+/*LEFT JOIN Sys_Const AS const ON const.ConstValue = detail.HandleStep and const.GroupId='HandleStep'*/
+ALTER VIEW [dbo].[View_CheckSpecialDetail]
+AS
+SELECT detail.CheckSpecialDetailId, detail.CheckSpecialId, detail.CheckItem, checkItemSet.CheckItemName, detail.Unqualified,
+ detail.SortIndex, detail.UnitId, detail.HandleStep, detail.CompleteStatus,
+ (CASE WHEN detail.CompleteStatus = 1 THEN 'ϸ' ELSE 'ϸ' END) AS CompleteStatusName, detail.LimitedDate,
+ detail.CompletedDate, detail.CheckContent, detail.CheckArea,
+ workArea.UnitWorkName + (CASE WHEN workArea.ProjectType = '1' THEN '()' WHEN workArea.ProjectType = '2' THEN '(װ)'
+ ELSE '' END) AS CheckAreaName, detail.DataId, detail.DataType, unit.UnitName,
+ dbo.GetConstTextByIds(detail.HandleStep) AS HandleStepStr,
+ (CASE WHEN detail.DataType LIKE '%1%' THEN '·ĵ:' +
+ (SELECT RectifyNoticesCode
+ FROM Check_RectifyNotices
+ WHERE detail.DataId LIKE '%' + RectifyNoticesId + '%') ELSE '' END)
+ + (CASE WHEN detail.DataType LIKE '%2%' THEN '·:' +
+ (SELECT PunishNoticeCode
+ FROM Check_PunishNotice
+ WHERE detail.DataId LIKE '%' + PunishNoticeId + '%') ELSE '' END)
+ + (CASE WHEN detail.DataType = '3' THEN '·ͣ:' +
+ (SELECT PauseNoticeCode
+ FROM Check_PauseNotice
+ WHERE detail.DataId LIKE '%' + PauseNoticeId + '%') ELSE '' END) AS HandleStepLink, detail.HiddenHazardType,
+ (CASE WHEN detail.HiddenHazardType = '3' THEN 'ش' WHEN detail.HiddenHazardType = '2' THEN 'ϴ' WHEN detail.HiddenHazardType
+ = '1' THEN 'һ' ELSE '' END) AS HiddenHazardTypeName, detail.CheckItemSetId, detail.CheckItemSetContent,
+ detail.Rectification_Date
+FROM dbo.Check_CheckSpecialDetail AS detail LEFT OUTER JOIN
+ dbo.Technique_CheckItemSet AS checkItemSet ON checkItemSet.CheckItemSetId = detail.CheckItem LEFT OUTER JOIN
+ dbo.Base_Unit AS unit ON unit.UnitId = detail.UnitId LEFT OUTER JOIN
+ dbo.WBS_UnitWork AS workArea ON detail.CheckArea = workArea.UnitWorkId
+
+
+GO
+
+
diff --git a/DataBase/版本日志/SGGLDB_WH_2023-10-07.sql b/DataBase/版本日志/SGGLDB_WH_2023-10-07.sql
new file mode 100644
index 00000000..990bad7f
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_WH_2023-10-07.sql
@@ -0,0 +1,4 @@
+alter table Base_Project add ProjType nvarchar(50) null
+GO
+alter table Base_Project add ProjPhase nvarchar(50) null
+GO
\ No newline at end of file
diff --git a/SGGL/BLL/API/HSSE/APICheckSpecialService.cs b/SGGL/BLL/API/HSSE/APICheckSpecialService.cs
index 09c6c784..de0945c2 100644
--- a/SGGL/BLL/API/HSSE/APICheckSpecialService.cs
+++ b/SGGL/BLL/API/HSSE/APICheckSpecialService.cs
@@ -14,49 +14,96 @@ namespace BLL
///
///
///
- public static Model.CheckSpecialItem getCheckSpecialById(string CheckSpecialId)
+ public static Model.CheckSpecialItem getCheckSpecialById(string CheckSpecialId,string state="0")
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
- var getInfo = from x in db.Check_CheckSpecial
- where x.CheckSpecialId == CheckSpecialId
- select new Model.CheckSpecialItem
- {
- CheckSpecialId = x.CheckSpecialId,
- ProjectId = x.ProjectId,
- CheckSpecialCode = x.CheckSpecialCode,
- CheckTypeName = (x.CheckType == "1" ? "联合" : "专项"),
- CheckType = x.CheckType,
- CheckItemSetId = x.CheckItemSetId,
- CheckItemSetName = db.Technique_CheckItemSet.First(y => y.CheckItemSetId == x.CheckItemSetId).CheckItemName,
- CheckPersonId = x.CheckPerson,
- CheckPersonName = db.Sys_User.First(u => u.UserId == x.CheckPerson).UserName,
- CheckTime = string.Format("{0:yyyy-MM-dd}", x.CheckTime),
- DaySummary = x.DaySummary,
- PartInUnitIds = x.PartInUnits,
- PartInUnitNames = UnitService.getUnitNamesUnitIds(x.PartInUnits),
- PartInPersonIds = x.PartInPersonIds,
- PartInPersonNames = UserService.getUserNamesUserIds(x.PartInPersonIds),
- PartInPersonNames2 = x.PartInPersonNames,
- CompileManId = x.CompileMan,
- CompileManName = db.Sys_User.First(u => u.UserId == x.CompileMan).UserName,
- States = x.States,
- AttachUrl1 = APIUpLoadFileService.getFileUrl(x.CheckSpecialId, null),
- CheckSpecialDetailItems = getCheckSpecialDetailList(x.CheckSpecialId),
+ if (state == "0")
+ {
+ //状态是0的时候查看所有
+ var getInfo = from x in db.Check_CheckSpecial
+ where x.CheckSpecialId == CheckSpecialId
+ select new Model.CheckSpecialItem
+ {
+ CheckSpecialId = x.CheckSpecialId,
+ ProjectId = x.ProjectId,
+ CheckSpecialCode = x.CheckSpecialCode,
+ CheckTypeName = (x.CheckType == "1" ? "联合" : "专项"),
+ CheckType = x.CheckType,
+ CheckItemSetId = x.CheckItemSetId,
+ CheckItemSetName = db.Technique_CheckItemSet.First(y => y.CheckItemSetId == x.CheckItemSetId).CheckItemName,
+ CheckPersonId = x.CheckPerson,
+ CheckPersonName = db.Sys_User.First(u => u.UserId == x.CheckPerson).UserName,
+ CheckTime = string.Format("{0:yyyy-MM-dd}", x.CheckTime),
+ DaySummary = x.DaySummary,
+ PartInUnitIds = x.PartInUnits,
+ PartInUnitNames = UnitService.getUnitNamesUnitIds(x.PartInUnits),
+ PartInPersonIds = x.PartInPersonIds,
+ PartInPersonNames = UserService.getUserNamesUserIds(x.PartInPersonIds),
+ PartInPersonNames2 = x.PartInPersonNames,
+ CompileManId = x.CompileMan,
+ CompileManName = db.Sys_User.First(u => u.UserId == x.CompileMan).UserName,
+ States = x.States,
+ AttachUrl1 = APIUpLoadFileService.getFileUrl(x.CheckSpecialId, null),
+ CheckSpecialDetailItems = getCheckSpecialDetailList(x.CheckSpecialId,"0"),
- ResponsibleUnit=x.ResponsibleUnit,
- ResponsibleUnitName=UnitService.GetUnitNameByUnitId(x.ResponsibleUnit),
- WorkAreaId=x.WorkAreaId,
- WorkAreaName= UnitWorkService.GetUnitWorkName(x.WorkAreaId),
- QuestionType=x.QuestionType,
- QuestionTypeName=UnitService.GetQuestionTypeId(x.QuestionType),
+ ResponsibleUnit = x.ResponsibleUnit,
+ ResponsibleUnitName = UnitService.GetUnitNameByUnitId(x.ResponsibleUnit),
+ WorkAreaId = x.WorkAreaId,
+ WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
+ QuestionType = x.QuestionType,
+ QuestionTypeName = UnitService.GetQuestionTypeId(x.QuestionType),
- ResponsibleMan=x.ResponsibleMan,
+ ResponsibleMan = x.ResponsibleMan,
+ ReceiveMan = x.ReceiveMan
+ };
+ return getInfo.FirstOrDefault();
+ }
+ else {
+ //状态是1的时候查看不合格的子项
+ var getInfo = from x in db.Check_CheckSpecial
+ where x.CheckSpecialId == CheckSpecialId
+ select new Model.CheckSpecialItem
+ {
+ CheckSpecialId = x.CheckSpecialId,
+ ProjectId = x.ProjectId,
+ CheckSpecialCode = x.CheckSpecialCode,
+ CheckTypeName = (x.CheckType == "1" ? "联合" : "专项"),
+ CheckType = x.CheckType,
+ CheckItemSetId = x.CheckItemSetId,
+ CheckItemSetName = db.Technique_CheckItemSet.First(y => y.CheckItemSetId == x.CheckItemSetId).CheckItemName,
+ CheckPersonId = x.CheckPerson,
+ CheckPersonName = db.Sys_User.First(u => u.UserId == x.CheckPerson).UserName,
+ CheckTime = string.Format("{0:yyyy-MM-dd}", x.CheckTime),
+ DaySummary = x.DaySummary,
+ PartInUnitIds = x.PartInUnits,
+ PartInUnitNames = UnitService.getUnitNamesUnitIds(x.PartInUnits),
+ PartInPersonIds = x.PartInPersonIds,
+ PartInPersonNames = UserService.getUserNamesUserIds(x.PartInPersonIds),
+ PartInPersonNames2 = x.PartInPersonNames,
+ CompileManId = x.CompileMan,
+ CompileManName = db.Sys_User.First(u => u.UserId == x.CompileMan).UserName,
+ States = x.States,
+ AttachUrl1 = APIUpLoadFileService.getFileUrl(x.CheckSpecialId, null),
+ CheckSpecialDetailItems = getCheckSpecialDetailList(x.CheckSpecialId,"1"),
- };
- return getInfo.FirstOrDefault();
+ ResponsibleUnit = x.ResponsibleUnit,
+ ResponsibleUnitName = UnitService.GetUnitNameByUnitId(x.ResponsibleUnit),
+ WorkAreaId = x.WorkAreaId,
+ WorkAreaName = UnitWorkService.GetUnitWorkName(x.WorkAreaId),
+ QuestionType = x.QuestionType,
+ QuestionTypeName = UnitService.GetQuestionTypeId(x.QuestionType),
+
+ ResponsibleMan = x.ResponsibleMan,
+ ReceiveMan = x.ReceiveMan
+
+
+ };
+ return getInfo.FirstOrDefault();
+ }
+
}
}
#endregion
@@ -68,12 +115,14 @@ namespace BLL
///
///
///
- public static List getCheckSpecialList(string projectId, string states)
+ public static List getCheckSpecialList(string projectId, string states,string userid)
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var getCheckSpecial = from x in db.Check_CheckSpecial
where x.ProjectId == projectId && x.States ==states
+ //当前保存人、审核人、确认人能看到
+ &&(x.CompileMan==userid || x.ResponsibleMan==userid || userid.Contains(x.ReceiveMan))
orderby x.CheckSpecialCode descending
select new Model.CheckSpecialItem
{
@@ -97,6 +146,7 @@ namespace BLL
CompileManName = db.Sys_User.First(u => u.UserId == x.CompileMan).UserName,
States = x.States,
AttachUrl1 = APIUpLoadFileService.getFileUrl(x.CheckSpecialId, null),
+ ReceiveMan=x.ResponsibleMan
};
return getCheckSpecial.ToList();
}
@@ -237,43 +287,83 @@ namespace BLL
///
///
///
- public static List getCheckSpecialDetailList(string checkSpecialId)
+ public static List getCheckSpecialDetailList(string checkSpecialId,string CompleteStatus="0")
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
- var getInfo = from x in db.Check_CheckSpecialDetail
- where x.CheckSpecialId == checkSpecialId
- orderby x.SortIndex
- select new Model.CheckSpecialDetailItem
- {
- CheckSpecialDetailId = x.CheckSpecialDetailId,
- CheckSpecialId = x.CheckSpecialId,
- CheckItemSetId = x.CheckItem,
- CheckItemSetName = db.Technique_CheckItemSet.First(y => y.CheckItemSetId == x.CheckItem).CheckItemName,
- CheckContent = x.CheckContent,
- SortIndex = x.SortIndex,
- Unqualified = x.Unqualified,
- Suggestions = x.Suggestions,
- WorkArea = db.WBS_UnitWork.First(y=>y.UnitWorkId ==x.CheckArea).UnitWorkName,
- WorkAreaId=x.CheckArea,
- UnitId = x.UnitId,
- UnitName = db.Base_Unit.First(y => y.UnitId == x.UnitId).UnitName,
- HandleStep = x.HandleStep,
- HandleStepName = getNames(x.HandleStep),
- HiddenHazardType = x.HiddenHazardType,
- HiddenHazardTypeName = x.HiddenHazardType == "3" ? "重大" : (x.HiddenHazardType == "2" ? "较大" : "一般"),
- LimitedDate = string.Format("{0:yyyy-MM-dd}", x.LimitedDate),
- CompleteStatus = x.CompleteStatus,
- CompleteStatusName = x.CompleteStatus == true ? "已整改" : "待整改",
- CompletedDate = string.Format("{0:yyyy-MM-dd}", x.CompletedDate),
- AttachUrl1 = APIUpLoadFileService.getFileUrl(x.CheckSpecialDetailId, null),
+ if (CompleteStatus == "0")
+ {
+ var getInfo = from x in db.Check_CheckSpecialDetail
+ where x.CheckSpecialId == checkSpecialId
+ orderby x.SortIndex
+ select new Model.CheckSpecialDetailItem
+ {
+ CheckSpecialDetailId = x.CheckSpecialDetailId,
+ CheckSpecialId = x.CheckSpecialId,
+ CheckItemSetId = x.CheckItem,
+ CheckItemSetName = db.Technique_CheckItemSet.First(y => y.CheckItemSetId == x.CheckItem).CheckItemName,
+ CheckContent = x.CheckContent,
+ SortIndex = x.SortIndex,
+ Unqualified = x.Unqualified,
+ Suggestions = x.Suggestions,
+ WorkArea = db.WBS_UnitWork.First(y => y.UnitWorkId == x.CheckArea).UnitWorkName,
+ WorkAreaId = x.CheckArea,
+ UnitId = x.UnitId,
+ UnitName = db.Base_Unit.First(y => y.UnitId == x.UnitId).UnitName,
+ HandleStep = x.HandleStep,
+ HandleStepName = getNames(x.HandleStep),
+ HiddenHazardType = x.HiddenHazardType,
+ HiddenHazardTypeName = x.HiddenHazardType == "3" ? "重大" : (x.HiddenHazardType == "2" ? "较大" : "一般"),
+ LimitedDate = string.Format("{0:yyyy-MM-dd}", x.LimitedDate),
+ CompleteStatus = x.CompleteStatus,
+ CompleteStatusName = x.CompleteStatus == true ? "已整改" : "待整改",
+ CompletedDate = string.Format("{0:yyyy-MM-dd}", x.CompletedDate),
+ AttachUrl1 = APIUpLoadFileService.getFileUrl(x.CheckSpecialDetailId, null),
- CheckItemDetailSetId = x.CheckItemSetId,
- CheckItemDetailContent = x.CheckItemSetContent,
- Rectification_Date = string.Format("{0:yyyy-MM-dd}", x.Rectification_Date),
- CheckOpinions=x.CheckOpinions,
- };
- return getInfo.ToList();
+ CheckItemDetailSetId = x.CheckItemSetId,
+ CheckItemDetailContent = x.CheckItemSetContent,
+ Rectification_Date = string.Format("{0:yyyy-MM-dd}", x.Rectification_Date),
+ CheckOpinions = x.CheckOpinions,
+ };
+ return getInfo.ToList();
+ }
+ else {
+ //查询不合格子项
+ var getInfo = from x in db.Check_CheckSpecialDetail
+ where x.CheckSpecialId == checkSpecialId && x.CompleteStatus==false
+ orderby x.SortIndex
+ select new Model.CheckSpecialDetailItem
+ {
+ CheckSpecialDetailId = x.CheckSpecialDetailId,
+ CheckSpecialId = x.CheckSpecialId,
+ CheckItemSetId = x.CheckItem,
+ CheckItemSetName = db.Technique_CheckItemSet.First(y => y.CheckItemSetId == x.CheckItem).CheckItemName,
+ CheckContent = x.CheckContent,
+ SortIndex = x.SortIndex,
+ Unqualified = x.Unqualified,
+ Suggestions = x.Suggestions,
+ WorkArea = db.WBS_UnitWork.First(y => y.UnitWorkId == x.CheckArea).UnitWorkName,
+ WorkAreaId = x.CheckArea,
+ UnitId = x.UnitId,
+ UnitName = db.Base_Unit.First(y => y.UnitId == x.UnitId).UnitName,
+ HandleStep = x.HandleStep,
+ HandleStepName = getNames(x.HandleStep),
+ HiddenHazardType = x.HiddenHazardType,
+ HiddenHazardTypeName = x.HiddenHazardType == "3" ? "重大" : (x.HiddenHazardType == "2" ? "较大" : "一般"),
+ LimitedDate = string.Format("{0:yyyy-MM-dd}", x.LimitedDate),
+ CompleteStatus = x.CompleteStatus,
+ CompleteStatusName = x.CompleteStatus == true ? "已整改" : "待整改",
+ CompletedDate = string.Format("{0:yyyy-MM-dd}", x.CompletedDate),
+ AttachUrl1 = APIUpLoadFileService.getFileUrl(x.CheckSpecialDetailId, null),
+
+ CheckItemDetailSetId = x.CheckItemSetId,
+ CheckItemDetailContent = x.CheckItemSetContent,
+ Rectification_Date = string.Format("{0:yyyy-MM-dd}", x.Rectification_Date),
+ CheckOpinions = x.CheckOpinions,
+ };
+ return getInfo.ToList();
+ }
+
}
}
///
diff --git a/SGGL/BLL/ProjectData/ProjectService.cs b/SGGL/BLL/ProjectData/ProjectService.cs
index a7b50ff4..2db27732 100644
--- a/SGGL/BLL/ProjectData/ProjectService.cs
+++ b/SGGL/BLL/ProjectData/ProjectService.cs
@@ -138,6 +138,8 @@
HJProjectCode = project.HJProjectCode,
KZProjectCode = project.KZProjectCode,
Progress = project.Progress,
+ ProjType = project.ProjType,
+ ProjPhase = project.ProjPhase,
};
db.Base_Project.InsertOnSubmit(newProject);
db.SubmitChanges();
@@ -186,6 +188,8 @@
newProject.HJProjectCode = project.HJProjectCode;
newProject.KZProjectCode = project.KZProjectCode;
newProject.Progress = project.Progress;
+ newProject.ProjType = project.ProjType;
+ newProject.ProjPhase = project.ProjPhase;
db.SubmitChanges();
HSEDataCollectService.ProjectHSEDataCollectSubmission(newProject);
}
diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt
index 76e939ac..b012a6c2 100644
--- a/SGGL/FineUIPro.Web/ErrLog.txt
+++ b/SGGL/FineUIPro.Web/ErrLog.txt
@@ -3193,3 +3193,25 @@ IP地址:::1
出错时间:09/26/2023 18:55:14
+
+错误信息开始=====>
+错误类型:JsonReaderException
+错误信息:Error reading JArray from JsonReader. Current JsonReader item is not an array: StartObject. Path '', line 1, position 1.
+错误堆栈:
+ 在 Newtonsoft.Json.Linq.JArray.Load(JsonReader reader, JsonLoadSettings settings)
+ 在 Newtonsoft.Json.Linq.JArray.Parse(String json, JsonLoadSettings settings)
+ 在 Newtonsoft.Json.Linq.JArray.Parse(String json)
+ 在 FineUIPro.Web.ProjectData.Installation.btnMenuDown_Click(Object sender, EventArgs e) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\ProjectData\Installation.aspx.cs:行号 257
+ 在 FineUIPro.MenuButton.OnClick(EventArgs e)
+ 在 (MenuButton , EventArgs )
+ 在 FineUIPro.MenuButton.RaisePostBackEvent(String eventArgument)
+ 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
+ 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+ 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+出错时间:10/07/2023 16:42:46
+出错文件:http://localhost:8579/ProjectData/Installation.aspx
+IP地址:::1
+操作人员:JT
+
+出错时间:10/07/2023 16:42:46
+
diff --git a/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialView.aspx b/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialView.aspx
index 4eb70936..08a475e7 100644
--- a/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialView.aspx
+++ b/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecialView.aspx
@@ -81,9 +81,9 @@
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="整改期限">
- <%--
- --%>
+
x.CnProfessionName.Contains(name.Substring(0, 2)));
- //拷贝专业
- if (cn != null)
- {
- if (cn.CnProfessionName != "防腐绝热" && cn.CnProfessionName != "地勘" && cn.CnProfessionName != "全厂地下主管网" && cn.CnProfessionName != "临时设施" && cn.CnProfessionName != "总图")
- {
- Model.WBS_CnProfession cnProfession = new Model.WBS_CnProfession();
- cnProfession.CnProfessionId = id;
- cnProfession.CnProfessionName = cn.CnProfessionName;
- cnProfession.CnProfessionCode = cn.CnProfessionCode;
- cnProfession.InstallationId = parentId;
- cnProfession.ProjectId = this.CurrUser.LoginProjectId;
- cnProfession.StartDate = Funs.GetNewDateTime(planStart);
- cnProfession.EndDate = Funs.GetNewDateTime(planFinish);
- cnProfession.OldId = cn.CnProfessionId;
- db.WBS_CnProfession.InsertOnSubmit(cnProfession);
- db.SubmitChanges();
- //单位工程
- var unitProjects = unitProjectInits.Where(x => x.CnProfessionId == cn.CnProfessionId);
- foreach (var unitProjectInit in unitProjects)
- {
- Model.Wbs_UnitProject unitProject = new Model.Wbs_UnitProject();
- unitProject.UnitProjectId = SQLHelper.GetNewID(typeof(Model.Wbs_UnitProject));
- unitProject.UnitProjectCode = unitProjectInit.UnitProjectCode;
- unitProject.UnitProjectName = unitProjectInit.UnitProjectName;
- unitProject.InstallationId = parentId;
- unitProject.SortIndex = unitProjectInit.SortIndex;
- unitProject.SuperUnitProjectId = null;
- unitProject.ProjectId = this.CurrUser.LoginProjectId;
- unitProject.CnProfessionId = id;
- unitProject.StartDate = Funs.GetNewDateTime(planStart);
- unitProject.EndDate = Funs.GetNewDateTime(planFinish);
- unitProject.Remark = unitProjectInit.Remark;
- unitProject.IsIn = true;
- db.Wbs_UnitProject.InsertOnSubmit(unitProject);
- db.SubmitChanges();
- }
- //分部分项
- var wbsSets = wbsSetInits.Where(x => x.CnProfessionId == cn.CnProfessionId);
- foreach (var wbsSetInit in wbsSets)
- {
- Model.Wbs_WbsSet wbsSet = new Model.Wbs_WbsSet();
- wbsSet.WbsSetId = SQLHelper.GetNewID(typeof(Model.Wbs_WbsSet));
- wbsSet.WbsSetCode = wbsSetInit.WbsSetCode;
- wbsSet.WbsSetName = wbsSetInit.WbsSetName;
- wbsSet.InstallationId = parentId;
- wbsSet.CnProfessionId = id;
- wbsSet.UnitProjectId = (from x in db.Wbs_UnitProject where x.UnitProjectCode == wbsSetInit.UnitProjectCode && x.CnProfessionId == id select x.UnitProjectId).FirstOrDefault();
- if (wbsSetInit.SuperWbsSetCode == null)
- {
- wbsSet.SuperWbsSetId = null;
- }
- else
- {
- wbsSet.SuperWbsSetId = (from x in db.Wbs_WbsSet
- where x.WbsSetCode == wbsSetInit.SuperWbsSetCode && x.InstallationId == parentId && x.CnProfessionId == id
- select x.WbsSetId).FirstOrDefault();
- }
- wbsSet.ProjectId = this.CurrUser.LoginProjectId;
- wbsSet.StartDate = Funs.GetNewDateTime(planStart);
- wbsSet.EndDate = Funs.GetNewDateTime(planFinish);
- wbsSet.Flag = wbsSetInit.Flag;
- wbsSet.Way = wbsSetInit.Way;
- wbsSet.Weights = wbsSetInit.Weights;
- wbsSet.ControlItemDef = wbsSetInit.ControlItemDef;
- wbsSet.ControlPoint = wbsSetInit.ControlPoint;
- wbsSet.Remark = wbsSetInit.Remark;
- wbsSet.IsIn = true;
- db.Wbs_WbsSet.InsertOnSubmit(wbsSet);
- db.SubmitChanges();
- var wbsSetMatchCostControls = wbsSetMatchCostControlInits.Where(x => x.WbsSetCode == wbsSetInit.WbsSetCode);
- foreach (var wbsSetMatchCostControlInit in wbsSetMatchCostControls)
- {
- Model.WBS_WbsSetMatchCostControl wbsSetMatchCostControl = new Model.WBS_WbsSetMatchCostControl();
- wbsSetMatchCostControl.WbsSetMatchCostControlId = SQLHelper.GetNewID();
- wbsSetMatchCostControl.WbsSetId = wbsSet.WbsSetId;
- wbsSetMatchCostControl.CostControlCode = wbsSetMatchCostControlInit.CostControlInitCode;
- if (wbsSetMatchCostControl.WbsSetId != null)
- {
- db.WBS_WbsSetMatchCostControl.InsertOnSubmit(wbsSetMatchCostControl);
- db.SubmitChanges();
- //拷贝费用清单项
- var costControlInits = from x in totalCostControlInits where x.CostControlInitCode == wbsSetMatchCostControlInit.CostControlInitCode orderby x.CostControlInitCode select x;
- foreach (var costControlInit in costControlInits)
- {
- Model.WBS_CostControl costControl = new Model.WBS_CostControl();
- costControl.CostControlId = SQLHelper.GetNewID();
- costControl.ProjectId = this.CurrUser.LoginProjectId;
- costControl.WbsSetId = wbsSetMatchCostControl.WbsSetId;
- costControl.CostControlCode = costControlInit.CostControlInitCode;
- costControl.CostControlName = costControlInit.CostControlInitName;
- costControl.Unit = costControlInit.Unit;
- db.WBS_CostControl.InsertOnSubmit(costControl);
- db.SubmitChanges();
- }
- }
- }
- }
- }
- else
- {
- var oldInstallation = Funs.DB.Project_Installation.FirstOrDefault(x => x.InstallationName == name);
- if (oldInstallation == null)
- {
- Model.Project_Installation installation = new Model.Project_Installation();
- installation.InstallationId = id;
- installation.ProjectId = this.CurrUser.LoginProjectId;
- installation.InstallationCode = code;
- installation.InstallationName = name;
- installation.SuperInstallationId = sgId;
- installation.StartDate = Funs.GetNewDateTime(planStart);
- installation.EndDate = Funs.GetNewDateTime(planFinish);
- installation.IsEnd = true;
- installation.Def = remark;
- db.Project_Installation.InsertOnSubmit(installation);
- db.SubmitChanges();
- // 拷贝总图等专业下WBS内容
- //拷贝单位工程及子单位工程
- var unitProjects = unitProjectInits.Where(x => x.CnProfessionId == cn.CnProfessionId);
- foreach (var unitProjectInit in unitProjects)
- {
- Model.Wbs_UnitProject unitProject = new Model.Wbs_UnitProject();
- unitProject.UnitProjectId = SQLHelper.GetNewID(typeof(Model.Wbs_UnitProject));
- unitProject.UnitProjectCode = unitProjectInit.UnitProjectCode;
- unitProject.UnitProjectName = unitProjectInit.UnitProjectName;
- if (unitProjectInit.SuperUnitProject == null)
- {
- unitProject.SuperUnitProjectId = null;
- }
- else
- {
- unitProject.SuperUnitProjectId = (from x in Funs.DB.Wbs_UnitProject
- where x.UnitProjectCode == unitProjectInit.SuperUnitProject && x.InstallationId == id
- select x.UnitProjectId).FirstOrDefault();
- }
- unitProject.InstallationId = id;
- unitProject.SortIndex = unitProjectInit.SortIndex;
- unitProject.ProjectId = this.CurrUser.LoginProjectId;
- unitProject.StartDate = Funs.GetNewDateTime(planStart);
- unitProject.EndDate = Funs.GetNewDateTime(planFinish);
- unitProject.Remark = unitProjectInit.Remark;
- unitProject.IsIn = true;
- db.Wbs_UnitProject.InsertOnSubmit(unitProject);
- db.SubmitChanges();
- }
- //拷贝分部/子分部/分项/子分项
- var wbsSets = wbsSetInits.Where(x => x.CnProfessionId == cn.CnProfessionId);
- foreach (var wbsSetInit in wbsSets)
- {
- Model.Wbs_WbsSet wbsSet = new Model.Wbs_WbsSet();
- wbsSet.WbsSetId = SQLHelper.GetNewID(typeof(Model.Wbs_WbsSet));
- wbsSet.WbsSetCode = wbsSetInit.WbsSetCode;
- wbsSet.WbsSetName = wbsSetInit.WbsSetName;
- wbsSet.InstallationId = id;
- wbsSet.UnitProjectId = (from x in Funs.DB.Wbs_UnitProject where x.UnitProjectCode == wbsSetInit.UnitProjectCode && x.InstallationId == id select x.UnitProjectId).FirstOrDefault();
- if (wbsSetInit.SuperWbsSetCode == null)
- {
- wbsSet.SuperWbsSetId = null;
- }
- else
- {
- wbsSet.SuperWbsSetId = (from x in Funs.DB.Wbs_WbsSet
- where x.WbsSetCode == wbsSetInit.SuperWbsSetCode && x.InstallationId == id
- select x.WbsSetId).FirstOrDefault();
- }
- wbsSet.ProjectId = this.CurrUser.LoginProjectId;
- wbsSet.StartDate = Funs.GetNewDateTime(planStart);
- wbsSet.EndDate = Funs.GetNewDateTime(planFinish);
- wbsSet.Flag = wbsSetInit.Flag;
- wbsSet.Way = wbsSetInit.Way;
- wbsSet.Weights = wbsSetInit.Weights;
- wbsSet.ControlItemDef = wbsSetInit.ControlItemDef;
- wbsSet.ControlPoint = wbsSetInit.ControlPoint;
- wbsSet.Remark = wbsSetInit.Remark;
- wbsSet.IsIn = true;
- db.Wbs_WbsSet.InsertOnSubmit(wbsSet);
- db.SubmitChanges();
- var wbsSetMatchCostControls = wbsSetMatchCostControlInits.Where(x => x.WbsSetCode == wbsSetInit.WbsSetCode);
- foreach (var wbsSetMatchCostControlInit in wbsSetMatchCostControls)
- {
- Model.WBS_WbsSetMatchCostControl wbsSetMatchCostControl = new Model.WBS_WbsSetMatchCostControl();
- wbsSetMatchCostControl.WbsSetMatchCostControlId = SQLHelper.GetNewID();
- wbsSetMatchCostControl.WbsSetId = wbsSet.WbsSetId;
- wbsSetMatchCostControl.CostControlCode = wbsSetMatchCostControlInit.CostControlInitCode;
- if (wbsSetMatchCostControl.WbsSetId != null)
- {
- db.WBS_WbsSetMatchCostControl.InsertOnSubmit(wbsSetMatchCostControl);
- db.SubmitChanges();
- //拷贝费用清单项
- var costControlInits = from x in totalCostControlInits where x.CostControlInitCode == wbsSetMatchCostControlInit.CostControlInitCode orderby x.CostControlInitCode select x;
- foreach (var costControlInit in costControlInits)
- {
- Model.WBS_CostControl costControl = new Model.WBS_CostControl();
- costControl.CostControlId = SQLHelper.GetNewID();
- costControl.ProjectId = this.CurrUser.LoginProjectId;
- costControl.WbsSetId = wbsSetMatchCostControl.WbsSetId;
- costControl.CostControlCode = costControlInit.CostControlInitCode;
- costControl.CostControlName = costControlInit.CostControlInitName;
- costControl.Unit = costControlInit.Unit;
- db.WBS_CostControl.InsertOnSubmit(costControl);
- db.SubmitChanges();
- }
- }
- }
- }
- }
- }
- }
- }
- else if (level == "6" || level == "7")
- {
- if (name.Contains("防腐绝热") || name.Contains("地勘") || name.Contains("全厂地下主管网") || name.Contains("临时设施") || name.Contains("总图"))
- {
- var cn = cnProfessionInits.FirstOrDefault(x => x.CnProfessionName.Contains(name.Substring(0, 2)));
- if (cn != null)
- {
- var oldInstallation = Funs.DB.Project_Installation.FirstOrDefault(x => x.InstallationName == name);
- if (oldInstallation == null)
- {
- Model.Project_Installation installation = new Model.Project_Installation();
- installation.InstallationId = id;
- installation.ProjectId = this.CurrUser.LoginProjectId;
- installation.InstallationCode = code;
- installation.InstallationName = name;
- installation.SuperInstallationId = sgId;
- installation.StartDate = Funs.GetNewDateTime(planStart);
- installation.EndDate = Funs.GetNewDateTime(planFinish);
- installation.IsEnd = true;
- installation.Def = remark;
- db.Project_Installation.InsertOnSubmit(installation);
- db.SubmitChanges();
- // 拷贝总图等专业下WBS内容
- //拷贝单位工程及子单位工程
- var unitProjects = unitProjectInits.Where(x => x.CnProfessionId == cn.CnProfessionId);
- foreach (var unitProjectInit in unitProjects)
- {
- Model.Wbs_UnitProject unitProject = new Model.Wbs_UnitProject();
- unitProject.UnitProjectId = SQLHelper.GetNewID(typeof(Model.Wbs_UnitProject));
- unitProject.UnitProjectCode = unitProjectInit.UnitProjectCode;
- unitProject.UnitProjectName = unitProjectInit.UnitProjectName;
- if (unitProjectInit.SuperUnitProject == null)
- {
- unitProject.SuperUnitProjectId = null;
- }
- else
- {
- unitProject.SuperUnitProjectId = (from x in Funs.DB.Wbs_UnitProject
- where x.UnitProjectCode == unitProjectInit.SuperUnitProject && x.InstallationId == id
- select x.UnitProjectId).FirstOrDefault();
- }
- unitProject.InstallationId = id;
- unitProject.SortIndex = unitProjectInit.SortIndex;
- unitProject.ProjectId = this.CurrUser.LoginProjectId;
- unitProject.StartDate = Funs.GetNewDateTime(planStart);
- unitProject.EndDate = Funs.GetNewDateTime(planFinish);
- unitProject.Remark = unitProjectInit.Remark;
- unitProject.IsIn = true;
- db.Wbs_UnitProject.InsertOnSubmit(unitProject);
- db.SubmitChanges();
- }
- //拷贝分部/子分部/分项/子分项
- var wbsSets = wbsSetInits.Where(x => x.CnProfessionId == cn.CnProfessionId);
- foreach (var wbsSetInit in wbsSets)
- {
- Model.Wbs_WbsSet wbsSet = new Model.Wbs_WbsSet();
- wbsSet.WbsSetId = SQLHelper.GetNewID(typeof(Model.Wbs_WbsSet));
- wbsSet.WbsSetCode = wbsSetInit.WbsSetCode;
- wbsSet.WbsSetName = wbsSetInit.WbsSetName;
- wbsSet.InstallationId = id;
- wbsSet.UnitProjectId = (from x in Funs.DB.Wbs_UnitProject where x.UnitProjectCode == wbsSetInit.UnitProjectCode && x.InstallationId == id select x.UnitProjectId).FirstOrDefault();
- if (wbsSetInit.SuperWbsSetCode == null)
- {
- wbsSet.SuperWbsSetId = null;
- }
- else
- {
- wbsSet.SuperWbsSetId = (from x in Funs.DB.Wbs_WbsSet
- where x.WbsSetCode == wbsSetInit.SuperWbsSetCode && x.InstallationId == id
- select x.WbsSetId).FirstOrDefault();
- }
- wbsSet.ProjectId = this.CurrUser.LoginProjectId;
- wbsSet.StartDate = Funs.GetNewDateTime(planStart);
- wbsSet.EndDate = Funs.GetNewDateTime(planFinish);
- wbsSet.Flag = wbsSetInit.Flag;
- wbsSet.Way = wbsSetInit.Way;
- wbsSet.Weights = wbsSetInit.Weights;
- wbsSet.ControlItemDef = wbsSetInit.ControlItemDef;
- wbsSet.ControlPoint = wbsSetInit.ControlPoint;
- wbsSet.Remark = wbsSetInit.Remark;
- wbsSet.IsIn = true;
- db.Wbs_WbsSet.InsertOnSubmit(wbsSet);
- db.SubmitChanges();
- var wbsSetMatchCostControls = wbsSetMatchCostControlInits.Where(x => x.WbsSetCode == wbsSetInit.WbsSetCode);
- foreach (var wbsSetMatchCostControlInit in wbsSetMatchCostControls)
- {
- Model.WBS_WbsSetMatchCostControl wbsSetMatchCostControl = new Model.WBS_WbsSetMatchCostControl();
- wbsSetMatchCostControl.WbsSetMatchCostControlId = SQLHelper.GetNewID();
- wbsSetMatchCostControl.WbsSetId = wbsSet.WbsSetId;
- wbsSetMatchCostControl.CostControlCode = wbsSetMatchCostControlInit.CostControlInitCode;
- if (wbsSetMatchCostControl.WbsSetId != null)
- {
- db.WBS_WbsSetMatchCostControl.InsertOnSubmit(wbsSetMatchCostControl);
- db.SubmitChanges();
- //拷贝费用清单项
- var costControlInits = from x in totalCostControlInits where x.CostControlInitCode == wbsSetMatchCostControlInit.CostControlInitCode orderby x.CostControlInitCode select x;
- foreach (var costControlInit in costControlInits)
- {
- Model.WBS_CostControl costControl = new Model.WBS_CostControl();
- costControl.CostControlId = SQLHelper.GetNewID();
- costControl.ProjectId = this.CurrUser.LoginProjectId;
- costControl.WbsSetId = wbsSetMatchCostControl.WbsSetId;
- costControl.CostControlCode = costControlInit.CostControlInitCode;
- costControl.CostControlName = costControlInit.CostControlInitName;
- costControl.Unit = costControlInit.Unit;
- db.WBS_CostControl.InsertOnSubmit(costControl);
- db.SubmitChanges();
- }
- }
- }
- }
- }
- }
- }
+ proId= item["id"].ToString();
}
}
- ShowNotify("抽取成功!", MessageBoxIcon.Success);
- InitTreeMenu();
+ var returndata = BLL.APIGetHttpService.ControlHttp(Funs.ControlApiUrl + "/Projects/GetConstructionWbsList?ProjId=" + proId, "GET", contenttype, null, null);
+ if (!string.IsNullOrEmpty(returndata))
+ {
+ JObject obj = JObject.Parse(returndata);
+ JArray arr = JArray.Parse(obj["result"].ToString());
+ Model.SGGLDB db = Funs.DB;
+ //专业
+ var cnProfessionInits = from x in db.WBS_CnProfessionInit select x;
+ //单位工程及子单位工程
+ var unitProjectInits = from x in db.Wbs_UnitProjectInit orderby x.SuperUnitProject select x;
+ //分部/子分部/分项/子分项
+ var wbsSetInits = (from x in db.WBS_WbsSetInit orderby x.SuperWbsSetCode select x).ToList();
+ //费用清单对应关系
+ var wbsSetMatchCostControlInits = from x in db.WBS_WbsSetMatchCostControlInit orderby x.WbsSetCode select x;
+ //费用清单项
+ var totalCostControlInits = from x in db.WBS_CostControlInit orderby x.CostControlInitCode select x;
+ string sgId = string.Empty;
+ foreach (var item in arr)
+ {
+ string id = item["id"].ToString(); //记录Id,主键
+ string parentId = item["parentId"].ToString(); //上一级记录Id
+ string code = item["code"].ToString(); //WBS编码
+ string name = item["name"].ToString(); //WBS名称
+ string level = item["level"].ToString(); //级别,0-7依次表示:项目、阶段(施工)、装置、工序、主项、专业、分部工程、分项工程
+ string isLeaf = item["isLeaf"].ToString(); //是否末级
+ string ppsId = item["ppsId"].ToString(); //阶段ID,3代表施工
+ string projId = item["projId"].ToString(); //项目ID
+ string planStart = item["planStart"].ToString(); //计划开始日期
+ string planFinish = item["planFinish"].ToString(); //计划完成日期
+ string remark = item["remark"].ToString(); //备注
+ if (level == "0" || level == "1" || level == "2" || level == "3" || level == "4")
+ {
+ Model.Project_Installation installation = new Model.Project_Installation();
+ installation.InstallationId = id;
+ installation.ProjectId = this.CurrUser.LoginProjectId;
+ installation.InstallationCode = code;
+ installation.InstallationName = name;
+ installation.SuperInstallationId = parentId == "-1" ? "0" : parentId;
+ installation.StartDate = Funs.GetNewDateTime(planStart);
+ installation.EndDate = Funs.GetNewDateTime(planFinish);
+ installation.IsEnd = Convert.ToBoolean(isLeaf);
+ installation.Def = remark;
+ db.Project_Installation.InsertOnSubmit(installation);
+ db.SubmitChanges();
+ if (name == "施工")
+ {
+ sgId = id;
+ }
+ }
+ else if (level == "5")
+ {
+ var cn = cnProfessionInits.FirstOrDefault(x => x.CnProfessionName.Contains(name.Substring(0, 2)));
+ //拷贝专业
+ if (cn != null)
+ {
+ if (cn.CnProfessionName != "防腐绝热" && cn.CnProfessionName != "地勘" && cn.CnProfessionName != "全厂地下主管网" && cn.CnProfessionName != "临时设施" && cn.CnProfessionName != "总图")
+ {
+ Model.WBS_CnProfession cnProfession = new Model.WBS_CnProfession();
+ cnProfession.CnProfessionId = id;
+ cnProfession.CnProfessionName = cn.CnProfessionName;
+ cnProfession.CnProfessionCode = cn.CnProfessionCode;
+ cnProfession.InstallationId = parentId;
+ cnProfession.ProjectId = this.CurrUser.LoginProjectId;
+ cnProfession.StartDate = Funs.GetNewDateTime(planStart);
+ cnProfession.EndDate = Funs.GetNewDateTime(planFinish);
+ cnProfession.OldId = cn.CnProfessionId;
+ db.WBS_CnProfession.InsertOnSubmit(cnProfession);
+ db.SubmitChanges();
+ //单位工程
+ var unitProjects = unitProjectInits.Where(x => x.CnProfessionId == cn.CnProfessionId);
+ foreach (var unitProjectInit in unitProjects)
+ {
+ Model.Wbs_UnitProject unitProject = new Model.Wbs_UnitProject();
+ unitProject.UnitProjectId = SQLHelper.GetNewID(typeof(Model.Wbs_UnitProject));
+ unitProject.UnitProjectCode = unitProjectInit.UnitProjectCode;
+ unitProject.UnitProjectName = unitProjectInit.UnitProjectName;
+ unitProject.InstallationId = parentId;
+ unitProject.SortIndex = unitProjectInit.SortIndex;
+ unitProject.SuperUnitProjectId = null;
+ unitProject.ProjectId = this.CurrUser.LoginProjectId;
+ unitProject.CnProfessionId = id;
+ unitProject.StartDate = Funs.GetNewDateTime(planStart);
+ unitProject.EndDate = Funs.GetNewDateTime(planFinish);
+ unitProject.Remark = unitProjectInit.Remark;
+ unitProject.IsIn = true;
+ db.Wbs_UnitProject.InsertOnSubmit(unitProject);
+ db.SubmitChanges();
+ }
+ //分部分项
+ var wbsSets = wbsSetInits.Where(x => x.CnProfessionId == cn.CnProfessionId);
+ foreach (var wbsSetInit in wbsSets)
+ {
+ Model.Wbs_WbsSet wbsSet = new Model.Wbs_WbsSet();
+ wbsSet.WbsSetId = SQLHelper.GetNewID(typeof(Model.Wbs_WbsSet));
+ wbsSet.WbsSetCode = wbsSetInit.WbsSetCode;
+ wbsSet.WbsSetName = wbsSetInit.WbsSetName;
+ wbsSet.InstallationId = parentId;
+ wbsSet.CnProfessionId = id;
+ wbsSet.UnitProjectId = (from x in db.Wbs_UnitProject where x.UnitProjectCode == wbsSetInit.UnitProjectCode && x.CnProfessionId == id select x.UnitProjectId).FirstOrDefault();
+ if (wbsSetInit.SuperWbsSetCode == null)
+ {
+ wbsSet.SuperWbsSetId = null;
+ }
+ else
+ {
+ wbsSet.SuperWbsSetId = (from x in db.Wbs_WbsSet
+ where x.WbsSetCode == wbsSetInit.SuperWbsSetCode && x.InstallationId == parentId && x.CnProfessionId == id
+ select x.WbsSetId).FirstOrDefault();
+ }
+ wbsSet.ProjectId = this.CurrUser.LoginProjectId;
+ wbsSet.StartDate = Funs.GetNewDateTime(planStart);
+ wbsSet.EndDate = Funs.GetNewDateTime(planFinish);
+ wbsSet.Flag = wbsSetInit.Flag;
+ wbsSet.Way = wbsSetInit.Way;
+ wbsSet.Weights = wbsSetInit.Weights;
+ wbsSet.ControlItemDef = wbsSetInit.ControlItemDef;
+ wbsSet.ControlPoint = wbsSetInit.ControlPoint;
+ wbsSet.Remark = wbsSetInit.Remark;
+ wbsSet.IsIn = true;
+ db.Wbs_WbsSet.InsertOnSubmit(wbsSet);
+ db.SubmitChanges();
+ var wbsSetMatchCostControls = wbsSetMatchCostControlInits.Where(x => x.WbsSetCode == wbsSetInit.WbsSetCode);
+ foreach (var wbsSetMatchCostControlInit in wbsSetMatchCostControls)
+ {
+ Model.WBS_WbsSetMatchCostControl wbsSetMatchCostControl = new Model.WBS_WbsSetMatchCostControl();
+ wbsSetMatchCostControl.WbsSetMatchCostControlId = SQLHelper.GetNewID();
+ wbsSetMatchCostControl.WbsSetId = wbsSet.WbsSetId;
+ wbsSetMatchCostControl.CostControlCode = wbsSetMatchCostControlInit.CostControlInitCode;
+ if (wbsSetMatchCostControl.WbsSetId != null)
+ {
+ db.WBS_WbsSetMatchCostControl.InsertOnSubmit(wbsSetMatchCostControl);
+ db.SubmitChanges();
+ //拷贝费用清单项
+ var costControlInits = from x in totalCostControlInits where x.CostControlInitCode == wbsSetMatchCostControlInit.CostControlInitCode orderby x.CostControlInitCode select x;
+ foreach (var costControlInit in costControlInits)
+ {
+ Model.WBS_CostControl costControl = new Model.WBS_CostControl();
+ costControl.CostControlId = SQLHelper.GetNewID();
+ costControl.ProjectId = this.CurrUser.LoginProjectId;
+ costControl.WbsSetId = wbsSetMatchCostControl.WbsSetId;
+ costControl.CostControlCode = costControlInit.CostControlInitCode;
+ costControl.CostControlName = costControlInit.CostControlInitName;
+ costControl.Unit = costControlInit.Unit;
+ db.WBS_CostControl.InsertOnSubmit(costControl);
+ db.SubmitChanges();
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ var oldInstallation = Funs.DB.Project_Installation.FirstOrDefault(x => x.InstallationName == name);
+ if (oldInstallation == null)
+ {
+ Model.Project_Installation installation = new Model.Project_Installation();
+ installation.InstallationId = id;
+ installation.ProjectId = this.CurrUser.LoginProjectId;
+ installation.InstallationCode = code;
+ installation.InstallationName = name;
+ installation.SuperInstallationId = sgId;
+ installation.StartDate = Funs.GetNewDateTime(planStart);
+ installation.EndDate = Funs.GetNewDateTime(planFinish);
+ installation.IsEnd = true;
+ installation.Def = remark;
+ db.Project_Installation.InsertOnSubmit(installation);
+ db.SubmitChanges();
+ // 拷贝总图等专业下WBS内容
+ //拷贝单位工程及子单位工程
+ var unitProjects = unitProjectInits.Where(x => x.CnProfessionId == cn.CnProfessionId);
+ foreach (var unitProjectInit in unitProjects)
+ {
+ Model.Wbs_UnitProject unitProject = new Model.Wbs_UnitProject();
+ unitProject.UnitProjectId = SQLHelper.GetNewID(typeof(Model.Wbs_UnitProject));
+ unitProject.UnitProjectCode = unitProjectInit.UnitProjectCode;
+ unitProject.UnitProjectName = unitProjectInit.UnitProjectName;
+ if (unitProjectInit.SuperUnitProject == null)
+ {
+ unitProject.SuperUnitProjectId = null;
+ }
+ else
+ {
+ unitProject.SuperUnitProjectId = (from x in Funs.DB.Wbs_UnitProject
+ where x.UnitProjectCode == unitProjectInit.SuperUnitProject && x.InstallationId == id
+ select x.UnitProjectId).FirstOrDefault();
+ }
+ unitProject.InstallationId = id;
+ unitProject.SortIndex = unitProjectInit.SortIndex;
+ unitProject.ProjectId = this.CurrUser.LoginProjectId;
+ unitProject.StartDate = Funs.GetNewDateTime(planStart);
+ unitProject.EndDate = Funs.GetNewDateTime(planFinish);
+ unitProject.Remark = unitProjectInit.Remark;
+ unitProject.IsIn = true;
+ db.Wbs_UnitProject.InsertOnSubmit(unitProject);
+ db.SubmitChanges();
+ }
+ //拷贝分部/子分部/分项/子分项
+ var wbsSets = wbsSetInits.Where(x => x.CnProfessionId == cn.CnProfessionId);
+ foreach (var wbsSetInit in wbsSets)
+ {
+ Model.Wbs_WbsSet wbsSet = new Model.Wbs_WbsSet();
+ wbsSet.WbsSetId = SQLHelper.GetNewID(typeof(Model.Wbs_WbsSet));
+ wbsSet.WbsSetCode = wbsSetInit.WbsSetCode;
+ wbsSet.WbsSetName = wbsSetInit.WbsSetName;
+ wbsSet.InstallationId = id;
+ wbsSet.UnitProjectId = (from x in Funs.DB.Wbs_UnitProject where x.UnitProjectCode == wbsSetInit.UnitProjectCode && x.InstallationId == id select x.UnitProjectId).FirstOrDefault();
+ if (wbsSetInit.SuperWbsSetCode == null)
+ {
+ wbsSet.SuperWbsSetId = null;
+ }
+ else
+ {
+ wbsSet.SuperWbsSetId = (from x in Funs.DB.Wbs_WbsSet
+ where x.WbsSetCode == wbsSetInit.SuperWbsSetCode && x.InstallationId == id
+ select x.WbsSetId).FirstOrDefault();
+ }
+ wbsSet.ProjectId = this.CurrUser.LoginProjectId;
+ wbsSet.StartDate = Funs.GetNewDateTime(planStart);
+ wbsSet.EndDate = Funs.GetNewDateTime(planFinish);
+ wbsSet.Flag = wbsSetInit.Flag;
+ wbsSet.Way = wbsSetInit.Way;
+ wbsSet.Weights = wbsSetInit.Weights;
+ wbsSet.ControlItemDef = wbsSetInit.ControlItemDef;
+ wbsSet.ControlPoint = wbsSetInit.ControlPoint;
+ wbsSet.Remark = wbsSetInit.Remark;
+ wbsSet.IsIn = true;
+ db.Wbs_WbsSet.InsertOnSubmit(wbsSet);
+ db.SubmitChanges();
+ var wbsSetMatchCostControls = wbsSetMatchCostControlInits.Where(x => x.WbsSetCode == wbsSetInit.WbsSetCode);
+ foreach (var wbsSetMatchCostControlInit in wbsSetMatchCostControls)
+ {
+ Model.WBS_WbsSetMatchCostControl wbsSetMatchCostControl = new Model.WBS_WbsSetMatchCostControl();
+ wbsSetMatchCostControl.WbsSetMatchCostControlId = SQLHelper.GetNewID();
+ wbsSetMatchCostControl.WbsSetId = wbsSet.WbsSetId;
+ wbsSetMatchCostControl.CostControlCode = wbsSetMatchCostControlInit.CostControlInitCode;
+ if (wbsSetMatchCostControl.WbsSetId != null)
+ {
+ db.WBS_WbsSetMatchCostControl.InsertOnSubmit(wbsSetMatchCostControl);
+ db.SubmitChanges();
+ //拷贝费用清单项
+ var costControlInits = from x in totalCostControlInits where x.CostControlInitCode == wbsSetMatchCostControlInit.CostControlInitCode orderby x.CostControlInitCode select x;
+ foreach (var costControlInit in costControlInits)
+ {
+ Model.WBS_CostControl costControl = new Model.WBS_CostControl();
+ costControl.CostControlId = SQLHelper.GetNewID();
+ costControl.ProjectId = this.CurrUser.LoginProjectId;
+ costControl.WbsSetId = wbsSetMatchCostControl.WbsSetId;
+ costControl.CostControlCode = costControlInit.CostControlInitCode;
+ costControl.CostControlName = costControlInit.CostControlInitName;
+ costControl.Unit = costControlInit.Unit;
+ db.WBS_CostControl.InsertOnSubmit(costControl);
+ db.SubmitChanges();
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ else if (level == "6" || level == "7")
+ {
+ if (name.Contains("防腐绝热") || name.Contains("地勘") || name.Contains("全厂地下主管网") || name.Contains("临时设施") || name.Contains("总图"))
+ {
+ var cn = cnProfessionInits.FirstOrDefault(x => x.CnProfessionName.Contains(name.Substring(0, 2)));
+ if (cn != null)
+ {
+ var oldInstallation = Funs.DB.Project_Installation.FirstOrDefault(x => x.InstallationName == name);
+ if (oldInstallation == null)
+ {
+ Model.Project_Installation installation = new Model.Project_Installation();
+ installation.InstallationId = id;
+ installation.ProjectId = this.CurrUser.LoginProjectId;
+ installation.InstallationCode = code;
+ installation.InstallationName = name;
+ installation.SuperInstallationId = sgId;
+ installation.StartDate = Funs.GetNewDateTime(planStart);
+ installation.EndDate = Funs.GetNewDateTime(planFinish);
+ installation.IsEnd = true;
+ installation.Def = remark;
+ db.Project_Installation.InsertOnSubmit(installation);
+ db.SubmitChanges();
+ // 拷贝总图等专业下WBS内容
+ //拷贝单位工程及子单位工程
+ var unitProjects = unitProjectInits.Where(x => x.CnProfessionId == cn.CnProfessionId);
+ foreach (var unitProjectInit in unitProjects)
+ {
+ Model.Wbs_UnitProject unitProject = new Model.Wbs_UnitProject();
+ unitProject.UnitProjectId = SQLHelper.GetNewID(typeof(Model.Wbs_UnitProject));
+ unitProject.UnitProjectCode = unitProjectInit.UnitProjectCode;
+ unitProject.UnitProjectName = unitProjectInit.UnitProjectName;
+ if (unitProjectInit.SuperUnitProject == null)
+ {
+ unitProject.SuperUnitProjectId = null;
+ }
+ else
+ {
+ unitProject.SuperUnitProjectId = (from x in Funs.DB.Wbs_UnitProject
+ where x.UnitProjectCode == unitProjectInit.SuperUnitProject && x.InstallationId == id
+ select x.UnitProjectId).FirstOrDefault();
+ }
+ unitProject.InstallationId = id;
+ unitProject.SortIndex = unitProjectInit.SortIndex;
+ unitProject.ProjectId = this.CurrUser.LoginProjectId;
+ unitProject.StartDate = Funs.GetNewDateTime(planStart);
+ unitProject.EndDate = Funs.GetNewDateTime(planFinish);
+ unitProject.Remark = unitProjectInit.Remark;
+ unitProject.IsIn = true;
+ db.Wbs_UnitProject.InsertOnSubmit(unitProject);
+ db.SubmitChanges();
+ }
+ //拷贝分部/子分部/分项/子分项
+ var wbsSets = wbsSetInits.Where(x => x.CnProfessionId == cn.CnProfessionId);
+ foreach (var wbsSetInit in wbsSets)
+ {
+ Model.Wbs_WbsSet wbsSet = new Model.Wbs_WbsSet();
+ wbsSet.WbsSetId = SQLHelper.GetNewID(typeof(Model.Wbs_WbsSet));
+ wbsSet.WbsSetCode = wbsSetInit.WbsSetCode;
+ wbsSet.WbsSetName = wbsSetInit.WbsSetName;
+ wbsSet.InstallationId = id;
+ wbsSet.UnitProjectId = (from x in Funs.DB.Wbs_UnitProject where x.UnitProjectCode == wbsSetInit.UnitProjectCode && x.InstallationId == id select x.UnitProjectId).FirstOrDefault();
+ if (wbsSetInit.SuperWbsSetCode == null)
+ {
+ wbsSet.SuperWbsSetId = null;
+ }
+ else
+ {
+ wbsSet.SuperWbsSetId = (from x in Funs.DB.Wbs_WbsSet
+ where x.WbsSetCode == wbsSetInit.SuperWbsSetCode && x.InstallationId == id
+ select x.WbsSetId).FirstOrDefault();
+ }
+ wbsSet.ProjectId = this.CurrUser.LoginProjectId;
+ wbsSet.StartDate = Funs.GetNewDateTime(planStart);
+ wbsSet.EndDate = Funs.GetNewDateTime(planFinish);
+ wbsSet.Flag = wbsSetInit.Flag;
+ wbsSet.Way = wbsSetInit.Way;
+ wbsSet.Weights = wbsSetInit.Weights;
+ wbsSet.ControlItemDef = wbsSetInit.ControlItemDef;
+ wbsSet.ControlPoint = wbsSetInit.ControlPoint;
+ wbsSet.Remark = wbsSetInit.Remark;
+ wbsSet.IsIn = true;
+ db.Wbs_WbsSet.InsertOnSubmit(wbsSet);
+ db.SubmitChanges();
+ var wbsSetMatchCostControls = wbsSetMatchCostControlInits.Where(x => x.WbsSetCode == wbsSetInit.WbsSetCode);
+ foreach (var wbsSetMatchCostControlInit in wbsSetMatchCostControls)
+ {
+ Model.WBS_WbsSetMatchCostControl wbsSetMatchCostControl = new Model.WBS_WbsSetMatchCostControl();
+ wbsSetMatchCostControl.WbsSetMatchCostControlId = SQLHelper.GetNewID();
+ wbsSetMatchCostControl.WbsSetId = wbsSet.WbsSetId;
+ wbsSetMatchCostControl.CostControlCode = wbsSetMatchCostControlInit.CostControlInitCode;
+ if (wbsSetMatchCostControl.WbsSetId != null)
+ {
+ db.WBS_WbsSetMatchCostControl.InsertOnSubmit(wbsSetMatchCostControl);
+ db.SubmitChanges();
+ //拷贝费用清单项
+ var costControlInits = from x in totalCostControlInits where x.CostControlInitCode == wbsSetMatchCostControlInit.CostControlInitCode orderby x.CostControlInitCode select x;
+ foreach (var costControlInit in costControlInits)
+ {
+ Model.WBS_CostControl costControl = new Model.WBS_CostControl();
+ costControl.CostControlId = SQLHelper.GetNewID();
+ costControl.ProjectId = this.CurrUser.LoginProjectId;
+ costControl.WbsSetId = wbsSetMatchCostControl.WbsSetId;
+ costControl.CostControlCode = costControlInit.CostControlInitCode;
+ costControl.CostControlName = costControlInit.CostControlInitName;
+ costControl.Unit = costControlInit.Unit;
+ db.WBS_CostControl.InsertOnSubmit(costControl);
+ db.SubmitChanges();
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ ShowNotify("抽取成功!", MessageBoxIcon.Success);
+ InitTreeMenu();
+ }
}
}
else
diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx b/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx
index 4e4516d0..5c73709e 100644
--- a/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx
+++ b/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx
@@ -147,6 +147,12 @@
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs
index 871a857f..5d257036 100644
--- a/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs
+++ b/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs
@@ -168,6 +168,8 @@ namespace FineUIPro.Web.ProjectData
this.txtEnglishRemark.Text = project.EnglishRemark;
this.txtHJProjectCode.Text = project.HJProjectCode;
this.txtKZProjectCode.Text = project.KZProjectCode;
+ this.txtProjType.Text = project.ProjType;
+ this.txtProjPhase.Text = project.ProjPhase;
if (project.Progress != null)
{
this.txtProgress.Text = project.Progress.ToString();
@@ -209,6 +211,8 @@ namespace FineUIPro.Web.ProjectData
City = this.txtCity.Text.Trim(),
EnglishRemark = this.txtEnglishRemark.Text.Trim(),
Progress = Funs.GetNewDecimal(this.txtProgress.Text),
+ ProjType = this.txtProjType.Text.Trim(),
+ ProjPhase = this.txtProjPhase.Text.Trim(),
};
if (string.IsNullOrEmpty(project.JTProjectCode))
{
diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.designer.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.designer.cs
index 0429f13e..feb4f79d 100644
--- a/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.designer.cs
@@ -7,13 +7,11 @@
// 自动生成>
//------------------------------------------------------------------------------
-namespace FineUIPro.Web.ProjectData
-{
-
-
- public partial class ProjectSetSave
- {
-
+namespace FineUIPro.Web.ProjectData {
+
+
+ public partial class ProjectSetSave {
+
///
/// form1 控件。
///
@@ -22,7 +20,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
+
///
/// PageManager1 控件。
///
@@ -31,7 +29,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.PageManager PageManager1;
-
+
///
/// SimpleForm1 控件。
///
@@ -40,7 +38,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Form SimpleForm1;
-
+
///
/// txtProjectName 控件。
///
@@ -49,7 +47,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtProjectName;
-
+
///
/// txtProjectCode 控件。
///
@@ -58,7 +56,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtProjectCode;
-
+
///
/// txtShortName 控件。
///
@@ -67,7 +65,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtShortName;
-
+
///
/// drpProjectType 控件。
///
@@ -76,7 +74,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpProjectType;
-
+
///
/// drpProjectState 控件。
///
@@ -85,7 +83,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpProjectState;
-
+
///
/// drpProjectState2 控件。
///
@@ -94,7 +92,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpProjectState2;
-
+
///
/// txtStartDate 控件。
///
@@ -103,7 +101,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DatePicker txtStartDate;
-
+
///
/// txtEndDate 控件。
///
@@ -112,7 +110,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DatePicker txtEndDate;
-
+
///
/// txtContractNo 控件。
///
@@ -121,7 +119,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtContractNo;
-
+
///
/// txtDuration 控件。
///
@@ -130,7 +128,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.NumberBox txtDuration;
-
+
///
/// drpProjectManager 控件。
///
@@ -139,7 +137,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpProjectManager;
-
+
///
/// drpConstructionManager 控件。
///
@@ -148,7 +146,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpConstructionManager;
-
+
///
/// drpQAManager 控件。
///
@@ -157,7 +155,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpQAManager;
-
+
///
/// drpHSSEManager 控件。
///
@@ -166,7 +164,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpHSSEManager;
-
+
///
/// drpDriveManager 控件。
///
@@ -175,7 +173,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpDriveManager;
-
+
///
/// drpUnit 控件。
///
@@ -184,7 +182,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpUnit;
-
+
///
/// txtProjectAddress 控件。
///
@@ -193,7 +191,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtProjectAddress;
-
+
///
/// txtJTProjectCode 控件。
///
@@ -202,7 +200,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtJTProjectCode;
-
+
///
/// ckbIsForeign 控件。
///
@@ -211,7 +209,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.CheckBox ckbIsForeign;
-
+
///
/// txtWorkRange 控件。
///
@@ -220,7 +218,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextArea txtWorkRange;
-
+
///
/// txtRemark 控件。
///
@@ -229,7 +227,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextArea txtRemark;
-
+
///
/// txtProjectMoney 控件。
///
@@ -238,7 +236,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.NumberBox txtProjectMoney;
-
+
///
/// txtConstructionMoney 控件。
///
@@ -247,7 +245,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.NumberBox txtConstructionMoney;
-
+
///
/// txtTelephone 控件。
///
@@ -256,7 +254,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtTelephone;
-
+
///
/// drpCountry 控件。
///
@@ -265,7 +263,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpCountry;
-
+
///
/// drpProvince 控件。
///
@@ -274,7 +272,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpProvince;
-
+
///
/// txtCity 控件。
///
@@ -283,7 +281,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtCity;
-
+
///
/// txtMapCoordinates 控件。
///
@@ -292,7 +290,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtMapCoordinates;
-
+
///
/// bottomPanel 控件。
///
@@ -301,7 +299,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.ContentPanel bottomPanel;
-
+
///
/// txtEnglishRemark 控件。
///
@@ -310,7 +308,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtEnglishRemark;
-
+
///
/// txtHJProjectCode 控件。
///
@@ -319,7 +317,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtHJProjectCode;
-
+
///
/// txtKZProjectCode 控件。
///
@@ -328,7 +326,25 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtKZProjectCode;
-
+
+ ///
+ /// txtProjType 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtProjType;
+
+ ///
+ /// txtProjPhase 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtProjPhase;
+
///
/// txtProgress 控件。
///
@@ -337,7 +353,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.NumberBox txtProgress;
-
+
///
/// Toolbar1 控件。
///
@@ -346,7 +362,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar Toolbar1;
-
+
///
/// ckIsUpTotalMonth 控件。
///
@@ -355,7 +371,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.CheckBox ckIsUpTotalMonth;
-
+
///
/// btnAttachUrl 控件。
///
@@ -364,7 +380,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnAttachUrl;
-
+
///
/// btnSave 控件。
///
@@ -373,7 +389,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnSave;
-
+
///
/// btnClose 控件。
///
@@ -382,7 +398,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnClose;
-
+
///
/// hdCompileMan 控件。
///
@@ -391,7 +407,7 @@ namespace FineUIPro.Web.ProjectData
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.HiddenField hdCompileMan;
-
+
///
/// WindowAtt 控件。
///
diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectSetView.aspx b/SGGL/FineUIPro.Web/ProjectData/ProjectSetView.aspx
index 91db6d71..686dee6f 100644
--- a/SGGL/FineUIPro.Web/ProjectData/ProjectSetView.aspx
+++ b/SGGL/FineUIPro.Web/ProjectData/ProjectSetView.aspx
@@ -106,6 +106,12 @@
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectSetView.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectSetView.aspx.cs
index a9b1e359..92b46111 100644
--- a/SGGL/FineUIPro.Web/ProjectData/ProjectSetView.aspx.cs
+++ b/SGGL/FineUIPro.Web/ProjectData/ProjectSetView.aspx.cs
@@ -102,6 +102,8 @@ namespace FineUIPro.Web.ProjectData
this.txtEnglishRemark.Text = project.EnglishRemark;
this.txtHJProjectCode.Text = project.HJProjectCode;
this.txtKZProjectCode.Text = project.KZProjectCode;
+ this.txtProjType.Text = project.ProjType;
+ this.txtProjPhase.Text = project.ProjPhase;
if (project.Progress != null)
{
this.txtProgress.Text = project.Progress.ToString();
diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectSetView.aspx.designer.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectSetView.aspx.designer.cs
index cbd49494..0dddc5da 100644
--- a/SGGL/FineUIPro.Web/ProjectData/ProjectSetView.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/ProjectData/ProjectSetView.aspx.designer.cs
@@ -300,6 +300,24 @@ namespace FineUIPro.Web.ProjectData {
///
protected global::FineUIPro.TextBox txtKZProjectCode;
+ ///
+ /// txtProjType 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtProjType;
+
+ ///
+ /// txtProjPhase 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtProjPhase;
+
///
/// txtEnglishRemark 控件。
///
diff --git a/SGGL/Model/APIItem/HSSE/CheckSpecialItem.cs b/SGGL/Model/APIItem/HSSE/CheckSpecialItem.cs
index bda13b16..69814a79 100644
--- a/SGGL/Model/APIItem/HSSE/CheckSpecialItem.cs
+++ b/SGGL/Model/APIItem/HSSE/CheckSpecialItem.cs
@@ -240,5 +240,10 @@ namespace Model
///
public string AuditState { get; set; }
+ ///
+ /// 接收人
+ ///
+ public string ReceiveMan { get; set; }
+
}
}
diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs
index 339bc509..cf137fd9 100644
--- a/SGGL/Model/Model.cs
+++ b/SGGL/Model/Model.cs
@@ -25021,6 +25021,10 @@ namespace Model
private string _ProjectAttribute;
+ private string _ProjType;
+
+ private string _ProjPhase;
+
private EntitySet _Accident_AccidentHandle;
private EntitySet _Accident_AccidentPersonRecord;
@@ -25675,6 +25679,10 @@ namespace Model
partial void OnCLProjectCodeChanged();
partial void OnProjectAttributeChanging(string value);
partial void OnProjectAttributeChanged();
+ partial void OnProjTypeChanging(string value);
+ partial void OnProjTypeChanged();
+ partial void OnProjPhaseChanging(string value);
+ partial void OnProjPhaseChanged();
#endregion
public Base_Project()
@@ -26699,6 +26707,46 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjType", DbType="NVarChar(50)")]
+ public string ProjType
+ {
+ get
+ {
+ return this._ProjType;
+ }
+ set
+ {
+ if ((this._ProjType != value))
+ {
+ this.OnProjTypeChanging(value);
+ this.SendPropertyChanging();
+ this._ProjType = value;
+ this.SendPropertyChanged("ProjType");
+ this.OnProjTypeChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjPhase", DbType="NVarChar(50)")]
+ public string ProjPhase
+ {
+ get
+ {
+ return this._ProjPhase;
+ }
+ set
+ {
+ if ((this._ProjPhase != value))
+ {
+ this.OnProjPhaseChanging(value);
+ this.SendPropertyChanging();
+ this._ProjPhase = value;
+ this.SendPropertyChanged("ProjPhase");
+ this.OnProjPhaseChanged();
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Accident_AccidentHandle_Base_Project", Storage="_Accident_AccidentHandle", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")]
public EntitySet Accident_AccidentHandle
{
@@ -59591,6 +59639,8 @@ namespace Model
private string _ResponsibleMan;
+ private string _ReceiveMan;
+
private EntityRef _Base_Project;
private EntityRef _Technique_CheckItemSet;
@@ -59639,6 +59689,8 @@ namespace Model
partial void OnQuestionTypeChanged();
partial void OnResponsibleManChanging(string value);
partial void OnResponsibleManChanged();
+ partial void OnReceiveManChanging(string value);
+ partial void OnReceiveManChanged();
#endregion
public Check_CheckSpecial()
@@ -60056,6 +60108,26 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReceiveMan", DbType="NVarChar(2000)")]
+ public string ReceiveMan
+ {
+ get
+ {
+ return this._ReceiveMan;
+ }
+ set
+ {
+ if ((this._ReceiveMan != value))
+ {
+ this.OnReceiveManChanging(value);
+ this.SendPropertyChanging();
+ this._ReceiveMan = value;
+ this.SendPropertyChanged("ReceiveMan");
+ this.OnReceiveManChanged();
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_CheckSpecial_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
public Base_Project Base_Project
{
diff --git a/SGGL/WebAPI/Controllers/HSSE/CheckSpecialController.cs b/SGGL/WebAPI/Controllers/HSSE/CheckSpecialController.cs
index 98d016f0..66405e52 100644
--- a/SGGL/WebAPI/Controllers/HSSE/CheckSpecialController.cs
+++ b/SGGL/WebAPI/Controllers/HSSE/CheckSpecialController.cs
@@ -16,12 +16,12 @@ namespace WebAPI.Controllers
///
///
///
- public Model.ResponeData getCheckSpecialById(string CheckSpecialId)
+ public Model.ResponeData getCheckSpecialById(string CheckSpecialId,string state="0")
{
var responeData = new Model.ResponeData();
try
{
- responeData.data = APICheckSpecialService.getCheckSpecialById(CheckSpecialId);
+ responeData.data = APICheckSpecialService.getCheckSpecialById(CheckSpecialId, state);
}
catch (Exception ex)
{
@@ -41,12 +41,12 @@ namespace WebAPI.Controllers
///
///
///
- public Model.ResponeData getCheckSpecialList(string projectId, string states, int pageIndex)
+ public Model.ResponeData getCheckSpecialList(string projectId, string states, int pageIndex,string userid)
{
var responeData = new Model.ResponeData();
try
{
- var getDataList = APICheckSpecialService.getCheckSpecialList(projectId, states);
+ var getDataList = APICheckSpecialService.getCheckSpecialList(projectId, states, userid);
int pageCount = getDataList.Count();
if (pageCount > 0 && pageIndex > 0)
{
@@ -133,5 +133,24 @@ namespace WebAPI.Controllers
return responeData;
}
#endregion
+
+ ///
+ /// 加载措施
+ ///
+ ///
+ public Model.ResponeData getGroup_HandleStep()
+ {
+ var responeData = new Model.ResponeData();
+ try
+ {
+ responeData.data = ConstValue.drpConstItemList(BLL.ConstValue.Group_HandleStep);
+ }
+ catch (Exception ex)
+ {
+ responeData.code = 0;
+ responeData.message = ex.Message;
+ }
+ return responeData;
+ }
}
}