Merge branch 'master' of http://47.104.102.122:3000/panhf/CNCEC_SUBQHSE_WUHUAN
This commit is contained in:
+11
@@ -38,3 +38,14 @@
|
||||
/SGGL/FineUIPro.Web/FileUpload/TestRun/TestRunMonthSummary/2024-06
|
||||
/SGGL/FineUIPro.Web/FileUpload/ProjectAttachUrl/2024-06
|
||||
/SGGLPackFile_20240730.rar
|
||||
/SGGL/FineUIPro.Web/FileUpload/Transfer/PunchlistFrom/2024-10
|
||||
/SGGL/FineUIPro.Web/ErrLog.txt
|
||||
/SGGL/FineUIPro.Web/Web.config
|
||||
/CreateModel2017.bat
|
||||
/SGGL/FineUIPro.Web/ErrLog.txt
|
||||
/.gitignore
|
||||
/.gitignore
|
||||
/SGGL/FineUIPro.Web/Properties/PublishProfiles/FolderProfile.pubxml
|
||||
/SGGL/FineUIPro.Web/Properties/PublishProfiles/FolderProfile1.pubxml
|
||||
|
||||
/SGGL/FineUIPro.Web/FileUpload/Transfer/PunchlistFrom/2024-11
|
||||
|
||||
Binary file not shown.
@@ -51,10 +51,6 @@
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:3:0:{f2bd8fb8-fc94-3dae-a733-fd993c73cc87}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:128:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
|
||||
},
|
||||
{
|
||||
"$type": "Bookmark",
|
||||
"Name": "ST:129:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
|
||||
|
||||
Binary file not shown.
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"ExpandedNodes": [
|
||||
""
|
||||
],
|
||||
"SelectedNode": "\\SGGL.sln",
|
||||
"PreviewInSolutionExplorer": false
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
@echo off
|
||||
REM ---------------
|
||||
REM 发布包生成工具
|
||||
REM 执行此文件前请先用Release生成WebOA项目
|
||||
REM --------------
|
||||
|
||||
|
||||
|
||||
REM --------------
|
||||
REM 环境变量设置 Project_Src为如WebOA这样的分支
|
||||
REM --------------
|
||||
set PROJECT_SRC=%CD%
|
||||
cd..
|
||||
|
||||
REM 源代码Model项目文件夹
|
||||
set Model_ROOT=%PROJECT_SRC%\SGGL\Model
|
||||
|
||||
|
||||
REM --------------
|
||||
REM 发布程序包文件夹相关
|
||||
REM --------------
|
||||
|
||||
|
||||
|
||||
|
||||
@echo 设置.net控制台环境
|
||||
@echo.
|
||||
@call "%VS150%"
|
||||
|
||||
SqlMetal /views /server:. /user:sa /password:1111 /database:SGGLDB_WH /code:%Model_ROOT%\Model.cs /namespace:Model
|
||||
|
||||
@ECHO 完成
|
||||
pause
|
||||
@@ -0,0 +1,228 @@
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES ('CB76394B-BDEB-4F45-9D19-F38612DC6591','安全生产治本攻坚三年行动工作台账','ZHGL/Information/ActionWorkLedger.aspx',150,'ERDXV53M-09B1-6UIO-3EFM-5DVZDF329001','Menu_ZHGL',1,1,1)
|
||||
GO
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('B269EF45-918E-42B0-9B28-65D1A1017CDF','CB76394B-BDEB-4F45-9D19-F38612DC6591','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('71B203E2-42C1-44CD-A0A1-8A75A96B79C7','CB76394B-BDEB-4F45-9D19-F38612DC6591','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('DB5C189E-0023-4174-AB83-B7D5028B3148','CB76394B-BDEB-4F45-9D19-F38612DC6591','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('BFF69201-1E48-46F4-A8CB-863A0304E6C6','CB76394B-BDEB-4F45-9D19-F38612DC6591','保存',4)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('70376B94-3340-4343-92B5-8543C6750F6B','CB76394B-BDEB-4F45-9D19-F38612DC6591','保存并上报',5)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('4B0AE23C-A03D-4146-A5CE-3AB563AF683C','CB76394B-BDEB-4F45-9D19-F38612DC6591','提交',6)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('7F968B8C-C31F-4D62-8AFC-D37D017C46BB','CB76394B-BDEB-4F45-9D19-F38612DC6591','导入',7)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('B318C22A-DBFF-46FE-919A-24F50BF190DC','CB76394B-BDEB-4F45-9D19-F38612DC6591','打印',8)
|
||||
GO
|
||||
|
||||
|
||||
CREATE TABLE [dbo].[Information_ActionWorkLedger](
|
||||
[ActionWorkLedgerId] [nvarchar](50) NOT NULL,
|
||||
[UnitId] [nvarchar](50) NULL,
|
||||
[ReportDate] [datetime] NULL,
|
||||
[Quarter] [int] NULL,
|
||||
[YearId] [int] NULL,
|
||||
[CompileMan] [nvarchar](50) NULL,
|
||||
[UpState] [char](1) NULL,
|
||||
[HandleState] [char](1) NULL,
|
||||
[HandleMan] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_Information_ActionWorkLedger] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[ActionWorkLedgerId] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
|
||||
GO
|
||||
|
||||
SET ANSI_PADDING OFF
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Information_ActionWorkLedger] WITH CHECK ADD CONSTRAINT [FK_Information_ActionWorkLedger_Base_Unit] FOREIGN KEY([UnitId])
|
||||
REFERENCES [dbo].[Base_Unit] ([UnitId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Information_ActionWorkLedger] CHECK CONSTRAINT [FK_Information_ActionWorkLedger_Base_Unit]
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'安全生产治本攻坚三年行动工作台账表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_ActionWorkLedger'
|
||||
GO
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CREATE TABLE [dbo].[Information_ActionWorkLedgerItem](
|
||||
[ActionWorkLedgerItemId] [nvarchar](50) NOT NULL,
|
||||
[ActionWorkLedgerId] [nvarchar](50) NULL,
|
||||
[SortIndex] [int] NULL,
|
||||
[Focus] [nvarchar](20) NULL,
|
||||
[SpecialTask] [nvarchar](100) NULL,
|
||||
[WorkPoints] [nvarchar](500) NULL,
|
||||
[FillingRequirements] [nvarchar](max) NULL,
|
||||
[CompletionDeadline] [nvarchar](50) NULL,
|
||||
[ImplementationStatus] [nvarchar](max) NULL,
|
||||
CONSTRAINT [PK_Information_ActionWorkLedgerItem] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[ActionWorkLedgerItemId] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Information_ActionWorkLedgerItem] WITH CHECK ADD CONSTRAINT [FK_Information_ActionWorkLedgerItem_Information_ActionWorkLedger] FOREIGN KEY([ActionWorkLedgerId])
|
||||
REFERENCES [dbo].[Information_ActionWorkLedger] ([ActionWorkLedgerId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Information_ActionWorkLedgerItem] CHECK CONSTRAINT [FK_Information_ActionWorkLedgerItem_Information_ActionWorkLedger]
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'安全生产治本攻坚三年行动工作台账明细表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_ActionWorkLedgerItem'
|
||||
GO
|
||||
|
||||
|
||||
|
||||
CREATE VIEW [dbo].[View_Information_ActionWorkLedger] AS
|
||||
SELECT
|
||||
Report.ActionWorkLedgerId,
|
||||
Report.UnitId,
|
||||
Report.ReportDate,
|
||||
Report.YearId,
|
||||
Report.Quarter,
|
||||
Report.UpState,
|
||||
Report.HandleState,
|
||||
(ISNULL(Group_0008.ConstText,'-') + ISNULL(Group_0011.ConstText,'-')) AS Quarters,
|
||||
u.UnitName,
|
||||
Report.HandleMan,
|
||||
US.UserName
|
||||
FROM dbo.Information_ActionWorkLedger AS Report
|
||||
LEFT JOIN Sys_Const AS Group_0008 ON Group_0008.GroupId='0008' AND Group_0008.ConstValue =Report.YearId
|
||||
LEFT JOIN Sys_Const AS Group_0011 ON Group_0011.GroupId='0011' AND Group_0011.ConstValue =Report.Quarter
|
||||
Left join Base_Unit as u on u.UnitId=Report.UnitId
|
||||
LEFT JOIN Sys_User AS US ON US.UserId=Report.HandleMan
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
GO
|
||||
|
||||
|
||||
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES ('C48087A8-4C9F-485D-B0A4-C85E112BA705','安全生产管理评价工作调度台账','ZHGL/Information/SafetyProductionEvaluation.aspx',160,'ERDXV53M-09B1-6UIO-3EFM-5DVZDF329001','Menu_ZHGL',1,1,1)
|
||||
GO
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('39A75960-F70A-4B60-ABFF-C72C919807A6','C48087A8-4C9F-485D-B0A4-C85E112BA705','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('9461B39D-D9FF-45CC-9D4C-38E49BCBCF6C','C48087A8-4C9F-485D-B0A4-C85E112BA705','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('E417A6A8-0666-49EB-A620-2E73D19C08CB','C48087A8-4C9F-485D-B0A4-C85E112BA705','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('07F975F0-D634-4554-A3B7-667E99278265','C48087A8-4C9F-485D-B0A4-C85E112BA705','保存',4)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('23B71591-E933-4C3A-BCBF-E398D94A6C88','C48087A8-4C9F-485D-B0A4-C85E112BA705','保存并上报',5)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('E97C8630-3DD7-4A4B-A3FD-7DE592B489BC','C48087A8-4C9F-485D-B0A4-C85E112BA705','提交',6)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('5F910FC4-183E-4037-9EE1-1400B96C4584','C48087A8-4C9F-485D-B0A4-C85E112BA705','导入',7)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('D08BCEF7-843F-4BB6-BE87-182EC476E455','C48087A8-4C9F-485D-B0A4-C85E112BA705','打印',8)
|
||||
GO
|
||||
|
||||
|
||||
|
||||
|
||||
CREATE TABLE [dbo].[Information_SafetyProductionEvaluation](
|
||||
[SafetyProductionEvaluationId] [nvarchar](50) NOT NULL,
|
||||
[UnitId] [nvarchar](50) NULL,
|
||||
[ReportDate] [datetime] NULL,
|
||||
[Quarter] [int] NULL,
|
||||
[YearId] [int] NULL,
|
||||
[CompileMan] [nvarchar](50) NULL,
|
||||
[UpState] [char](1) NULL,
|
||||
[HandleState] [char](1) NULL,
|
||||
[HandleMan] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_Information_SafetyProductionEvaluation] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[SafetyProductionEvaluationId] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
|
||||
GO
|
||||
|
||||
SET ANSI_PADDING OFF
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Information_SafetyProductionEvaluation] WITH CHECK ADD CONSTRAINT [FK_Information_SafetyProductionEvaluation_Base_Unit] FOREIGN KEY([UnitId])
|
||||
REFERENCES [dbo].[Base_Unit] ([UnitId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Information_SafetyProductionEvaluation] CHECK CONSTRAINT [FK_Information_SafetyProductionEvaluation_Base_Unit]
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'安全生产管理评价工作调度台账表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyProductionEvaluation'
|
||||
GO
|
||||
|
||||
|
||||
|
||||
|
||||
CREATE TABLE [dbo].[Information_SafetyProductionEvaluationItem](
|
||||
[SafetyProductionEvaluationItemId] [nvarchar](50) NOT NULL,
|
||||
[SafetyProductionEvaluationId] [nvarchar](50) NULL,
|
||||
[SortIndex] [int] NULL,
|
||||
[Type] [nvarchar](50) NULL,
|
||||
[EvaluateWork] [nvarchar](1000) NULL,
|
||||
[EvaluationContent] [nvarchar](1000) NULL,
|
||||
[FillingRequirements] [nvarchar](max) NULL,
|
||||
[CompletionDeadline] [nvarchar](50) NULL,
|
||||
[ImplementationStatus] [nvarchar](max) NULL,
|
||||
CONSTRAINT [PK_Information_SafetyProductionEvaluationItem] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[SafetyProductionEvaluationItemId] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Information_SafetyProductionEvaluationItem] WITH CHECK ADD CONSTRAINT [FK_Information_SafetyProductionEvaluationItem_Information_SafetyProductionEvaluation] FOREIGN KEY([SafetyProductionEvaluationId])
|
||||
REFERENCES [dbo].[Information_SafetyProductionEvaluation] ([SafetyProductionEvaluationId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Information_SafetyProductionEvaluationItem] CHECK CONSTRAINT [FK_Information_SafetyProductionEvaluationItem_Information_SafetyProductionEvaluation]
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'安全生产管理评价工作调度台账明细表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyProductionEvaluationItem'
|
||||
GO
|
||||
|
||||
|
||||
CREATE VIEW [dbo].[View_Information_SafetyProductionEvaluation] AS
|
||||
SELECT
|
||||
Report.SafetyProductionEvaluationId,
|
||||
Report.UnitId,
|
||||
Report.ReportDate,
|
||||
Report.YearId,
|
||||
Report.Quarter,
|
||||
Report.UpState,
|
||||
Report.HandleState,
|
||||
(ISNULL(Group_0008.ConstText,'-') + ISNULL(Group_0011.ConstText,'-')) AS Quarters,
|
||||
u.UnitName,
|
||||
Report.HandleMan,
|
||||
US.UserName
|
||||
FROM dbo.Information_SafetyProductionEvaluation AS Report
|
||||
LEFT JOIN Sys_Const AS Group_0008 ON Group_0008.GroupId='0008' AND Group_0008.ConstValue =Report.YearId
|
||||
LEFT JOIN Sys_Const AS Group_0011 ON Group_0011.GroupId='0011' AND Group_0011.ConstValue =Report.Quarter
|
||||
Left join Base_Unit as u on u.UnitId=Report.UnitId
|
||||
LEFT JOIN Sys_User AS US ON US.UserId=Report.HandleMan
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
GO
|
||||
@@ -0,0 +1,2 @@
|
||||
alter table Sys_User
|
||||
add CompanyProjectId nvarchar(2000) null;
|
||||
@@ -0,0 +1,111 @@
|
||||
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
values('FB94A120-921B-4AAB-B54F-EC11B6F561FD','单位分部分项工程划分、裁剪','CQMS/WBS/Control/DivisionDivideAndCrop.aspx',15,'3B322232-38A1-4291-9832-CD4A01C2A975','Menu_CQMS',0,1,1)
|
||||
go
|
||||
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
values('3829D89E-BFDE-4956-BC25-E00729DFCE62','FB94A120-921B-4AAB-B54F-EC11B6F561FD','保存',1)
|
||||
go
|
||||
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
values('BA250432-492B-49A3-8BB6-D04BF74D2EDD','单位分部分项工程划分表','CQMS/WBS/Control/DivisionDivideList.aspx',16,'3B322232-38A1-4291-9832-CD4A01C2A975','Menu_CQMS',0,1,1)
|
||||
go
|
||||
|
||||
CREATE TABLE [dbo].[WBS_DivisionDivide](
|
||||
[DivisionDivideId] [nvarchar](50) NOT NULL,
|
||||
[ProjectId] [nvarchar](50) NULL,
|
||||
[UnitWorkId] [nvarchar](50) NULL,
|
||||
[DivisionId] [varchar](50) NULL,
|
||||
CONSTRAINT [PK_Division_DivisionDivide] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[DivisionDivideId] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[WBS_DivisionDivide] WITH CHECK ADD CONSTRAINT [FK_WBS_DivisionDivide_Base_Project] FOREIGN KEY([ProjectId])
|
||||
REFERENCES [dbo].[Base_Project] ([ProjectId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[WBS_DivisionDivide] CHECK CONSTRAINT [FK_WBS_DivisionDivide_Base_Project]
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[WBS_DivisionDivide] WITH CHECK ADD CONSTRAINT [FK_WBS_DivisionDivide_Division_SubProjects] FOREIGN KEY([DivisionId])
|
||||
REFERENCES [dbo].[Division_SubProjects] ([DivisionId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[WBS_DivisionDivide] CHECK CONSTRAINT [FK_WBS_DivisionDivide_Division_SubProjects]
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[WBS_DivisionDivide] WITH CHECK ADD CONSTRAINT [FK_WBS_DivisionDivide_WBS_UnitWork] FOREIGN KEY([UnitWorkId])
|
||||
REFERENCES [dbo].[WBS_UnitWork] ([UnitWorkId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[WBS_DivisionDivide] CHECK CONSTRAINT [FK_WBS_DivisionDivide_WBS_UnitWork]
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_DivisionDivide', @level2type=N'COLUMN',@level2name=N'DivisionDivideId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_DivisionDivide', @level2type=N'COLUMN',@level2name=N'ProjectId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'单位工程/子单位工程Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_DivisionDivide', @level2type=N'COLUMN',@level2name=N'UnitWorkId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'分部分项' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'WBS_DivisionDivide', @level2type=N'COLUMN',@level2name=N'DivisionId'
|
||||
GO
|
||||
|
||||
|
||||
CREATE VIEW View_WBS_DivisionDivide
|
||||
AS
|
||||
/*********单位分部分项工程划分表*********/
|
||||
SELECT
|
||||
DD.DivisionDivideId,
|
||||
DD.ProjectId,
|
||||
DD.UnitWorkId,
|
||||
DD.DivisionId,
|
||||
SupUW.UnitWorkCode AS SupUnitWorkCode,
|
||||
SupUW.UnitWorkName AS SupUnitWorkName,
|
||||
NULL AS ChildUnitWorkCode,
|
||||
NULL AS ChildUnitWorkName,
|
||||
SupUW.SuperUnitWork,
|
||||
SP.BranchEngineeringCode,
|
||||
SP.BranchEngineeringName,
|
||||
SP.SubBranchEngineeringName,
|
||||
SP.ProEngineeringCode,
|
||||
SP.ProEngineeringName,
|
||||
SP.ProEngineeringNum,
|
||||
SP.DivisionLevel,
|
||||
SP.Sort,
|
||||
SP.ParentId
|
||||
FROM WBS_DivisionDivide DD
|
||||
LEFT JOIN WBS_UnitWork AS SupUW ON SupUW.UnitWorkId=DD.UnitWorkId
|
||||
LEFT JOIN WBS_UnitWork AS ChildUW ON ChildUW.SuperUnitWork = SupUW.UnitWorkId
|
||||
LEFT JOIN Division_SubProjects AS SP ON SP.DivisionId = DD.DivisionId
|
||||
WHERE (SupUW.SuperUnitWork='0' or SupUW.SuperUnitWork is null)
|
||||
|
||||
UNION
|
||||
|
||||
SELECT
|
||||
DD.DivisionDivideId,
|
||||
DD.ProjectId,
|
||||
DD.UnitWorkId,
|
||||
DD.DivisionId,
|
||||
SupUW.UnitWorkCode AS SupUnitWorkCode,
|
||||
SupUW.UnitWorkName AS SupUnitWorkName,
|
||||
ChildUW.UnitWorkCode AS ChildUnitWorkCode,
|
||||
ChildUW.UnitWorkName AS ChildUnitWorkName,
|
||||
ChildUW.SuperUnitWork,
|
||||
SP.BranchEngineeringCode,
|
||||
SP.BranchEngineeringName,
|
||||
SP.SubBranchEngineeringName,
|
||||
SP.ProEngineeringCode,
|
||||
SP.ProEngineeringName,
|
||||
SP.ProEngineeringNum,
|
||||
SP.DivisionLevel,
|
||||
SP.Sort,
|
||||
SP.ParentId
|
||||
FROM WBS_DivisionDivide DD
|
||||
LEFT JOIN WBS_UnitWork AS ChildUW ON ChildUW.UnitWorkId = DD.UnitWorkId
|
||||
LEFT JOIN WBS_UnitWork AS SupUW ON SupUW.UnitWorkId=ChildUW.SuperUnitWork
|
||||
LEFT JOIN Division_SubProjects AS SP ON SP.DivisionId = DD.DivisionId
|
||||
WHERE ChildUW.SuperUnitWork <> '0' AND ChildUW.SuperUnitWork IS NOT NULL
|
||||
Go
|
||||
@@ -0,0 +1,5 @@
|
||||
|
||||
CREATE NONCLUSTERED INDEX [t_d_facerecord_Projectid_Index]
|
||||
ON [dbo].[t_d_facerecord] ([ProjectId])
|
||||
INCLUDE ([ID],[EmployName],[DepartmentID],[DepartName],[AreaID],[AreaName],[EmployNO],[CardID],[RoleID],[DateTimeRecord],[RecordDes],[FaceIP],[InOrOut],[Des1],[Des2],[Des3],[Des4])
|
||||
;
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
values('0E1CCE60-6F9D-419D-B763-E9E0AF5621E6','单位分部分项工程划分、裁剪','',10,'3B322232-38A1-4291-9832-CD4A01C2A975','Menu_CQMS',0,0,1)
|
||||
go
|
||||
update Sys_Menu set SortIndex=10,MenuName='分部分项工程数据库',SuperMenu='0E1CCE60-6F9D-419D-B763-E9E0AF5621E6' where MenuId='17E206A1-E06B-40C0-8DCB-E3AAA2E3B339'
|
||||
go
|
||||
update Sys_Menu set SortIndex=20,SuperMenu='0E1CCE60-6F9D-419D-B763-E9E0AF5621E6' where MenuId='FB94A120-921B-4AAB-B54F-EC11B6F561FD'
|
||||
go
|
||||
update Sys_Menu set SortIndex=30,SuperMenu='0E1CCE60-6F9D-419D-B763-E9E0AF5621E6' where MenuId='BA250432-492B-49A3-8BB6-D04BF74D2EDD'
|
||||
go
|
||||
@@ -0,0 +1,3 @@
|
||||
CREATE NONCLUSTERED INDEX [SitePerson_Person_pid_isused_intime_index]
|
||||
ON [dbo].[SitePerson_Person] ([ProjectId],[IsUsed],[InTime],[OutTime])
|
||||
INCLUDE ([PersonName]);
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
update Sys_Menu set Url='CQMS/WBS/Control/DivisionSubProjectsNew.aspx' where MenuId='17E206A1-E06B-40C0-8DCB-E3AAA2E3B339'
|
||||
go
|
||||
|
||||
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
values('2037FD04-23E2-4286-9F85-AAF1D11384D5','17E206A1-E06B-40C0-8DCB-E3AAA2E3B339','Ôö¼Ó',1)
|
||||
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
values('C9D8D3DE-90A9-43AD-8694-85A017DCA9DC','17E206A1-E06B-40C0-8DCB-E3AAA2E3B339','ÐÞ¸Ä',2)
|
||||
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
values('0B422E48-08B6-4262-B541-CE149B452E84','17E206A1-E06B-40C0-8DCB-E3AAA2E3B339','ɾ³ý',3)
|
||||
insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
values('2469D37C-F6A0-49EB-AB85-62F88180C9B4','17E206A1-E06B-40C0-8DCB-E3AAA2E3B339','±£´æ',4)
|
||||
go
|
||||
@@ -0,0 +1,48 @@
|
||||
ALTER TABLE Solution_CQMSConstructSolution
|
||||
ADD CsUsers nvarchar(2000) null;
|
||||
|
||||
ALTER TABLE GJSX
|
||||
ADD CsUsers nvarchar(2000) null;
|
||||
|
||||
CREATE TABLE [dbo].[Solution_CQMSConstructSolutionApprove_Item](
|
||||
[Id] [nvarchar](50) NOT NULL,
|
||||
[TypeSortId] [int] NULL,
|
||||
[SortId] [int] NULL,
|
||||
[ConstructSolutionId] [nvarchar](50) NULL,
|
||||
[Chapter] [nvarchar](200) NULL,
|
||||
[Amendment] [nvarchar](200) NULL,
|
||||
[Proposer] [nvarchar](50) NULL,
|
||||
ProposerName [nvarchar](50) NULL,
|
||||
[Modification] [nvarchar](200) NULL,
|
||||
[ReviewerOpinion] [nvarchar](200) NULL,
|
||||
[IsAccept] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_Solution_CQMSConstructSolutionApprove_Item] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[Id] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类型序号(施工工程师1,HSE2,施工经理3)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_CQMSConstructSolutionApprove_Item', @level2type=N'COLUMN',@level2name=N'TypeSortId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'序号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_CQMSConstructSolutionApprove_Item', @level2type=N'COLUMN',@level2name=N'SortId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'章节' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_CQMSConstructSolutionApprove_Item', @level2type=N'COLUMN',@level2name=N'Chapter'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改意见' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_CQMSConstructSolutionApprove_Item', @level2type=N'COLUMN',@level2name=N'Amendment'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'提出人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_CQMSConstructSolutionApprove_Item', @level2type=N'COLUMN',@level2name=N'Proposer'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改情况' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_CQMSConstructSolutionApprove_Item', @level2type=N'COLUMN',@level2name=N'Modification'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'审核人意见' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_CQMSConstructSolutionApprove_Item', @level2type=N'COLUMN',@level2name=N'ReviewerOpinion'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否接受' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Solution_CQMSConstructSolutionApprove_Item', @level2type=N'COLUMN',@level2name=N'IsAccept'
|
||||
GO
|
||||
@@ -0,0 +1,61 @@
|
||||
ALTER PROCEDURE [dbo].[Sp_GJSX_getlist]
|
||||
-- Add the parameters for the stored procedure here
|
||||
@ProjectId nvarchar(max),
|
||||
@sql_where varchar(max)
|
||||
AS
|
||||
BEGIN
|
||||
--IF EXISTS(select * from tempdb..sysobjects where id=object_id('tempdb..#GJSX_List'))
|
||||
--BEGIN
|
||||
-- DROP TABLE #GJSX_List
|
||||
--END
|
||||
--DECLARE @Sql NVARCHAR(200)
|
||||
--select * into #GJSX_List from(
|
||||
-- select
|
||||
--a.GJSXID
|
||||
--,a.ProjectId
|
||||
--,a.detail
|
||||
--,b.username
|
||||
--,a.createDate
|
||||
--,User_ReceiveID=STUFF(( SELECT ',' + p2.UserName FROM dbo.Sys_User as p2 where PATINDEX('%,' + RTRIM(p2.UserId) + ',%',',' +a.User_ReceiveID + ',') >0 FOR XML PATH('')), 1, 1,'')
|
||||
--, CNProfessionalId=STUFF(( SELECT ',' + Base_CNProfessional.ProfessionalName FROM dbo.Base_CNProfessional where PATINDEX('%,' + RTRIM(Base_CNProfessional.CNProfessionalId) + ',%',',' +a.CNProfessional_ID + ',') >0 FOR XML PATH('')), 1, 1,'')
|
||||
--,Base_Project.ProjectName
|
||||
--,Base_Unit.unitname
|
||||
--,a.CloseDate
|
||||
--,case a.state when 2 then '正在进行' when 0 then '关闭' when 1 then '开放' end as state
|
||||
--,QuestionTypeName=STUFF(( SELECT ',' + Base_QuestionType.QuestionTypeName FROM dbo.Base_QuestionType where PATINDEX('%,' + RTRIM(Base_QuestionType.QuestionTypeID) + ',%',',' +a.QuestionTypeID + ',') >0 FOR XML PATH('')), 1, 1,'')
|
||||
--,a.IsManypeople
|
||||
--,a.CompleteDate
|
||||
--,a.AttachUrl
|
||||
--,user_Acceptance =STUFF(( SELECT ',' + p2.UserName FROM dbo.Sys_User as p2 where PATINDEX('%,' + RTRIM(p2.UserId) + ',%',',' +a.user_Acceptance + ',') >0 FOR XML PATH('')), 1, 1,'')
|
||||
--from GJSX as a left join Sys_User as b on a.UserId=b.UserId
|
||||
--left join [dbo].[Base_Project] on a.ProjectId =Base_Project.ProjectId
|
||||
--left join [dbo].[Base_Unit] on a.UnitId=Base_Unit.UnitId
|
||||
--left join [dbo].[Base_QuestionType] on a.QuestionTypeID=Base_QuestionType.QuestionTypeID ) as a
|
||||
|
||||
--set @Sql ='select * from #GJSX_List where ProjectId='''+@ProjectId+''' ' +@sql_where
|
||||
|
||||
--exec(@Sql)
|
||||
|
||||
select
|
||||
a.GJSXID
|
||||
,a.ProjectId
|
||||
,a.detail
|
||||
,b.username
|
||||
,a.createDate
|
||||
,User_ReceiveID=STUFF(( SELECT ',' + p2.UserName FROM dbo.Sys_User as p2 where PATINDEX('%,' + RTRIM(p2.UserId) + ',%',',' +a.User_ReceiveID + ',') >0 FOR XML PATH('')), 1, 1,'')
|
||||
, CNProfessionalId=STUFF(( SELECT ',' + Base_CNProfessional.ProfessionalName FROM dbo.Base_CNProfessional where PATINDEX('%,' + RTRIM(Base_CNProfessional.CNProfessionalId) + ',%',',' +a.CNProfessional_ID + ',') >0 FOR XML PATH('')), 1, 1,'')
|
||||
,Base_Project.ProjectName
|
||||
,Base_Unit.unitname
|
||||
,a.CloseDate
|
||||
,case a.state when 2 then '正在进行' when 3 then '待关闭' when 0 then '已关闭' when 1 then '开放' end as state
|
||||
,QuestionTypeName=STUFF(( SELECT ',' + Base_QuestionType.QuestionTypeName FROM dbo.Base_QuestionType where PATINDEX('%,' + RTRIM(Base_QuestionType.QuestionTypeID) + ',%',',' +a.QuestionTypeID + ',') >0 FOR XML PATH('')), 1, 1,'')
|
||||
,a.IsManypeople
|
||||
,a.CompleteDate
|
||||
,a.AttachUrl
|
||||
,user_Acceptance =STUFF(( SELECT ',' + p2.UserName FROM dbo.Sys_User as p2 where PATINDEX('%,' + RTRIM(p2.UserId) + ',%',',' +a.user_Acceptance + ',') >0 FOR XML PATH('')), 1, 1,'')
|
||||
from GJSX as a left join Sys_User as b on a.UserId=b.UserId
|
||||
left join [dbo].[Base_Project] on a.ProjectId =Base_Project.ProjectId
|
||||
left join [dbo].[Base_Unit] on a.UnitId=Base_Unit.UnitId
|
||||
left join [dbo].[Base_QuestionType] on a.QuestionTypeID=Base_QuestionType.QuestionTypeID
|
||||
where a.ProjectId=@ProjectId
|
||||
END
|
||||
@@ -0,0 +1,46 @@
|
||||
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
values('168A94C7-E37D-4B9C-8684-51DF4F8C5134','关键事项(内部)','',10,'0','Menu_PGJSX',0,0,1)
|
||||
go
|
||||
|
||||
update sys_menu set IsUsed='0' where menuid='5F3B18D6-9FBA-4EF5-A7E4-DC9F6A4EA680';
|
||||
update sys_menu set IsUsed='0' where menuid='CAA875A7-089B-4B79-87CE-742FDFD9DE43';
|
||||
|
||||
--0 我创建的,1待我处理,2我已处理、3我参与的
|
||||
--关键事项改成 我创建的
|
||||
update sys_menu set SuperMenu='3517DBE2-9728-4BA0-9EA5-AE2147DB883B',MenuName='我创建的',url='PZHGL/GJSX/GJSXList.aspx?classify=0'
|
||||
where menuid='0BEA2126-7A48-40EB-8E21-99148E91A22B';
|
||||
|
||||
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
values('4A9E60ED-24FF-4410-B3B7-2A5079615A78','待我处理','PZHGL/GJSX/GJSXList.aspx?classify=1',20,'168A94C7-E37D-4B9C-8684-51DF4F8C5134','Menu_PGJSX',0,1,1)
|
||||
go
|
||||
|
||||
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
values('BEF7850D-1BA5-45F9-BD40-E52F6D813E7C','我已处理','PZHGL/GJSX/GJSXList.aspx?classify=2',30,'168A94C7-E37D-4B9C-8684-51DF4F8C5134','Menu_PGJSX',0,1,1)
|
||||
go
|
||||
|
||||
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
values('3C129205-F6A9-480D-B36C-E35DED5D7CEC','我参与的','PZHGL/GJSX/GJSXList.aspx?classify=3',40,'168A94C7-E37D-4B9C-8684-51DF4F8C5134','Menu_PGJSX',0,1,1)
|
||||
go
|
||||
|
||||
--协调沟通
|
||||
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
values('42791ACB-7C72-481F-B1ED-158C7141522C','协调沟通(外部)','',20,'0','Menu_PGJSX',0,0,1)
|
||||
go
|
||||
|
||||
update sys_menu set SuperMenu='42791ACB-7C72-481F-B1ED-158C7141522C',MenuName='我创建的',url='DocManage/DocManage.aspx?classify=0',MenuType='Menu_PGJSX'
|
||||
where menuid='609F0D64-ABB8-4F5C-9646-FC1DFC8BAB85';
|
||||
|
||||
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
values('2FEF98BD-DBBD-4ADA-B600-18D3C113B22A','待我处理','DocManage/DocManage.aspx?classify=1',20,'42791ACB-7C72-481F-B1ED-158C7141522C','Menu_PGJSX',0,1,1)
|
||||
go
|
||||
|
||||
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
values('5BDEEA43-FFD7-4AEB-B760-24E70009EA0C','我已处理','DocManage/DocManage.aspx?classify=2',30,'42791ACB-7C72-481F-B1ED-158C7141522C','Menu_PGJSX',0,1,1)
|
||||
go
|
||||
|
||||
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
values('58B45CA6-AFFB-4624-80C6-F70C1A54FBE2','我参与的','DocManage/DocManage.aspx?classify=3',40,'42791ACB-7C72-481F-B1ED-158C7141522C','Menu_PGJSX',0,1,1)
|
||||
go
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
alter table ProcessControl_InspectionManagement add ChildUnitWorkId nvarchar(50)
|
||||
alter table ProcessControl_InspectionManagement add ChildBranch nvarchar(50)
|
||||
go
|
||||
ALTER TABLE [dbo].[ProcessControl_InspectionManagement] DROP CONSTRAINT [FK_ProcessControl_InspectionManagement_Base_CNProfessional]
|
||||
GO
|
||||
|
||||
update ProcessControl_InspectionManagement set CNProfessionalId='D03E079B-8B97-4C5A-BF1C-782887548B92' where CNProfessionalId='10487C07-DE54-4ED6-BBDF-2C7988A44665'--¹ÜµÀ
|
||||
update ProcessControl_InspectionManagement set CNProfessionalId='445B1EE6-901E-4A07-A4AB-4EE1066E742F' where CNProfessionalId='DEB367FF-AD35-41A0-B68E-FA8E68737B93'--µçÆø
|
||||
update ProcessControl_InspectionManagement set CNProfessionalId='E9AC9563-E338-48B7-867D-488222AD0557' where CNProfessionalId='F41C5022-F499-4BD7-84B6-E87E4CE53CAC'--ÍÁ½¨
|
||||
--update ProcessControl_InspectionManagement set CNProfessionalId='' where CNProfessionalId='FBC066BE-082F-4185-AE5C-016A12132ADE'--É豸
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
alter table Environmental_OperationReport drop column Code
|
||||
alter table Environmental_OperationReport drop column UnitLevel
|
||||
alter table Environmental_OperationReport drop column CreateDate
|
||||
alter table Environmental_OperationReport drop column Place
|
||||
alter table Environmental_OperationReport drop column PersonNum
|
||||
alter table Environmental_OperationReport drop column TotalAssets
|
||||
alter table Environmental_OperationReport drop column TotalValue
|
||||
alter table Environmental_OperationReport drop column NewInvestment
|
||||
GO
|
||||
|
||||
CREATE TABLE [dbo].[Environmental_OperationReportItem](
|
||||
[BusinessReportItemId] [nvarchar](50) NOT NULL,
|
||||
[BusinessReportId] [nvarchar](50) NULL,
|
||||
[SortIndex] [int] NULL,
|
||||
[Code] [nvarchar](50) NULL,
|
||||
[UnitLevel] [nvarchar](50) NULL,
|
||||
[CreateDate] [datetime] NULL,
|
||||
[Place] [nvarchar](200) NULL,
|
||||
[PersonNum] [int] NULL,
|
||||
[TotalAssets] [decimal](18, 4) NULL,
|
||||
[TotalValue] [decimal](18, 4) NULL,
|
||||
[NewInvestment] [decimal](18, 4) NULL,
|
||||
[UnitName] [nvarchar](200) NULL,
|
||||
[SortUnitName] [nvarchar](200) NULL,
|
||||
CONSTRAINT [PK_Environmental_OperationReportItem] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[BusinessReportItemId] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Environmental_OperationReportItem] WITH CHECK ADD CONSTRAINT [FK_Environmental_OperationReportItem_Environmental_OperationReport] FOREIGN KEY([BusinessReportId])
|
||||
REFERENCES [dbo].[Environmental_OperationReport] ([BusinessReportId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Environmental_OperationReportItem] CHECK CONSTRAINT [FK_Environmental_OperationReportItem_Environmental_OperationReport]
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'中央企业节能环保产业企业基本情况和经营情况报表明细表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Environmental_OperationReportItem'
|
||||
GO
|
||||
|
||||
update sys_menu set IsUsed=0 where menuid='EFA6E45F-1267-4804-BEE7-41E0C5461204';
|
||||
@@ -0,0 +1,7 @@
|
||||
--增加为了单位排序
|
||||
alter table Environmental_EnergyReportItem
|
||||
add SortUnit int NULL
|
||||
GO
|
||||
|
||||
update Environmental_EnergyReportItem set SortUnit=1 where EnergyReportId='template';
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
values('1FBC729D-0A8E-423C-B133-B64583BF9611','进度软件(新)','',70,'0','Menu_JDGL',0,0,0)
|
||||
go
|
||||
|
||||
insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
values('368DB90C-8A47-44F7-A69A-D2D60A6E338C','费用项裁剪','JDGL/Progress/WbsManager.aspx',10,'1FBC729D-0A8E-423C-B133-B64583BF9611','Menu_JDGL',0,1,0)
|
||||
go
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
|
||||
update ProcessControl_InspectionManagement set CNProfessionalId='10487C07-DE54-4ED6-BBDF-2C7988A44665' where CNProfessionalId='D03E079B-8B97-4C5A-BF1C-782887548B92'--¹ÜµÀ
|
||||
update ProcessControl_InspectionManagement set CNProfessionalId='DEB367FF-AD35-41A0-B68E-FA8E68737B93' where CNProfessionalId='445B1EE6-901E-4A07-A4AB-4EE1066E742F'--µçÆø
|
||||
update ProcessControl_InspectionManagement set CNProfessionalId='F41C5022-F499-4BD7-84B6-E87E4CE53CAC' where CNProfessionalId='E9AC9563-E338-48B7-867D-488222AD0557'--ÍÁ½¨
|
||||
go
|
||||
@@ -0,0 +1,48 @@
|
||||
|
||||
|
||||
--1、索引项目中,删除英文,保留中文
|
||||
update Sys_Menu set MenuName='尾项管理' where MenuId='016903B1-3B86-4CF5-AFF8-FF8BE389BEE5';
|
||||
update Sys_Menu set MenuName='非工艺系统清单' where MenuId='022428DC-FC99-4916-B8AF-6A9DC885DFAF';
|
||||
update Sys_Menu set MenuName='工艺系统清单' where MenuId='197F9A9A-480C-4CC3-B6B7-3A7D382DC3EB';
|
||||
update Sys_Menu set MenuName='尾项完成统计表' where MenuId='2352E44F-BE12-4012-B43F-AAF649EDAC32';
|
||||
update Sys_Menu set MenuName='移交状态汇总表' where MenuId='25C13642-AE77-42E2-B0FB-32663B68F93F';
|
||||
update Sys_Menu set MenuName='电气' where MenuId='296E75D2-192A-4D1F-8471-DD34263F8691';
|
||||
update Sys_Menu set MenuName='尾项进度跟踪表' where MenuId='549DD0B6-05CB-4C75-B8F5-9AADDEDF399F';
|
||||
update Sys_Menu set MenuName='电信' where MenuId='58FFBD80-ACB9-4830-A18A-E025D9600D94';
|
||||
update Sys_Menu set MenuName='移交统计图表' where MenuId='60838E30-4A46-4878-B299-C234900B10B7';
|
||||
update Sys_Menu set MenuName='动设备' where MenuId='7E2FB5F9-FB99-4455-B68F-460F1F9A2676';
|
||||
update Sys_Menu set MenuName='仪表' where MenuId='88F51059-55B4-4CD5-A38C-36404E5029F6';
|
||||
update Sys_Menu set MenuName='土建/建筑/结构' where MenuId='95C39F86-C060-452E-BA37-D891C466A39B';
|
||||
update Sys_Menu set MenuName='静设备' where MenuId='982F746C-084C-445C-9AE8-8C37BDFE7994';
|
||||
update Sys_Menu set MenuName='尾项分类表' where MenuId='CB76462E-9444-4946-B787-ECB33C21E6D0';
|
||||
update Sys_Menu set MenuName='管道' where MenuId='D94C1BA4-9DFD-4514-AE12-6F886C5D8C9B';
|
||||
update Sys_Menu set MenuName='移交统计表' where MenuId='E305689E-5D84-4C1A-BF67-85FA2D828115';
|
||||
go
|
||||
--2、删除项目中的地管和消防2个项目(隐藏菜单)
|
||||
update Sys_Menu set MenuName='消防',IsUsed=0 where MenuId='794E64E2-FDD2-4B7D-8408-F7FB06F9C92A';
|
||||
update Sys_Menu set MenuName='地管',IsUsed=0 where MenuId='95295BF7-FB51-480D-9902-6ADA4E8427FC';
|
||||
go
|
||||
--3、更新管道表的表格
|
||||
--判断字段不存在则添加
|
||||
IF NOT EXISTS(select * from sys.columns where name='TotalFactor' and [object_id]=object_id(N'Transfer_Piping'))
|
||||
BEGIN
|
||||
--总达因数
|
||||
ALTER TABLE Transfer_Piping ADD TotalFactor nvarchar(50) NULL;
|
||||
--完成达因数
|
||||
ALTER TABLE Transfer_Piping ADD CompleteFactor nvarchar(50) NULL;
|
||||
--完成比例
|
||||
ALTER TABLE Transfer_Piping ADD CompleteProportion nvarchar(50) NULL;
|
||||
--试压完成
|
||||
ALTER TABLE Transfer_Piping ADD PressureTestCompleted nvarchar(50) NULL;
|
||||
--冲洗吹扫
|
||||
ALTER TABLE Transfer_Piping ADD RinseAndBlowClean nvarchar(50) NULL;
|
||||
--复位
|
||||
ALTER TABLE Transfer_Piping ADD Reduction nvarchar(50) NULL;
|
||||
--电伴热
|
||||
ALTER TABLE Transfer_Piping ADD ElectricHeatTracing nvarchar(50) NULL;
|
||||
--保温/冷
|
||||
ALTER TABLE Transfer_Piping ADD Insulation nvarchar(50) NULL;
|
||||
END
|
||||
go
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
|
||||
--1、修改管道表字段数据类型
|
||||
ALTER TABLE Transfer_Piping ALTER COLUMN TotalFactor decimal(10, 2);
|
||||
ALTER TABLE Transfer_Piping ALTER COLUMN CompleteFactor decimal(10, 2);
|
||||
update Transfer_Piping set CompleteProportion='0'where CompleteProportion='' or CompleteProportion is null;
|
||||
go
|
||||
ALTER TABLE Transfer_Piping ALTER COLUMN CompleteProportion decimal(10, 2);
|
||||
go
|
||||
|
||||
|
||||
|
||||
--3、移交统计表补充电伴热和保温冷
|
||||
IF NOT EXISTS(select * from sys.columns where name='Insulation' and [object_id]=object_id(N'Transfer_SystemControl'))
|
||||
BEGIN
|
||||
--电伴热
|
||||
ALTER TABLE Transfer_SystemControl ADD ElectricHeatTracing nvarchar(50) NULL;
|
||||
--保温/冷
|
||||
ALTER TABLE Transfer_SystemControl ADD Insulation nvarchar(50) NULL;
|
||||
END
|
||||
go
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
--历史尾项数据修改
|
||||
update Transfer_PunchlistFrom set IsMatI='Y2' where IsMatI='Y';
|
||||
update Transfer_PunchlistFrom set Punch_Type='JWD' where Punch_Type='FWD';
|
||||
go
|
||||
|
||||
|
||||
update Transfer_PunchlistFrom set Sub_Sys_No='LHC1-CVL05-01-01' where Sub_Sys_No='CVL05-01';
|
||||
update Transfer_PunchlistFrom set Sub_Sys_No='LHC1-EL01-00-01' where Sub_Sys_No='EL01-01';
|
||||
|
||||
go
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
alter table Report_ConstructionProblems
|
||||
alter column ProblemDesrioption nvarchar(2000) null;
|
||||
|
||||
alter table Report_ConstructionProblems
|
||||
alter column TreatmentMeasures nvarchar(2000) null;
|
||||
|
||||
alter table Report_RowMaterialProblem
|
||||
alter column ProblemDesrioption nvarchar(2000) null;
|
||||
|
||||
alter table Report_RowMaterialProblem
|
||||
alter column TreatmentMeasures nvarchar(2000) null;
|
||||
File diff suppressed because one or more lines are too long
@@ -71,6 +71,30 @@ namespace BLL
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 根据项目名称获取项目信息
|
||||
/// <summary>
|
||||
/// 根据项目名称获取项目信息
|
||||
/// </summary>
|
||||
/// <param name="projectName"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.BaseInfoItem getProjectByName(string projectName)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var getDataLists = (from x in db.Base_Project
|
||||
where x.ProjectName == projectName
|
||||
select new Model.BaseInfoItem
|
||||
{
|
||||
BaseInfoId = x.ProjectId,
|
||||
BaseInfoCode = x.ProjectCode,
|
||||
BaseInfoName = x.ProjectName
|
||||
}
|
||||
).FirstOrDefault();
|
||||
return getDataLists;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 根据项目id获取区域表
|
||||
/// <summary>
|
||||
/// 根据项目id获取区域表
|
||||
|
||||
@@ -0,0 +1,393 @@
|
||||
using Model.CQMS;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL.API.CQMS
|
||||
{
|
||||
public class ApiInspectionManagementService
|
||||
{
|
||||
public static bool AddInspectionManagement(InspectionManagement inspectionManagement)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.ProcessControl_InspectionManagement newInspectionManagement = null;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.InspectionId))
|
||||
{
|
||||
newInspectionManagement = db.ProcessControl_InspectionManagement.FirstOrDefault(x => x.InspectionId == inspectionManagement.InspectionId);
|
||||
}
|
||||
if (newInspectionManagement == null)
|
||||
{
|
||||
newInspectionManagement = new Model.ProcessControl_InspectionManagement();
|
||||
newInspectionManagement.InspectionId = Guid.NewGuid().ToString();
|
||||
}
|
||||
newInspectionManagement.InspectionId = inspectionManagement.InspectionId;
|
||||
newInspectionManagement.ProjectId = inspectionManagement.ProjectId;
|
||||
newInspectionManagement.UnitId = inspectionManagement.UnitId;
|
||||
newInspectionManagement.CNProfessionalId = inspectionManagement.CNProfessionalId;
|
||||
newInspectionManagement.InspectionCode = inspectionManagement.InspectionCode;
|
||||
newInspectionManagement.UnitWorkId = inspectionManagement.UnitWorkId;
|
||||
newInspectionManagement.Branch = inspectionManagement.Branch;
|
||||
newInspectionManagement.ControlPointType = inspectionManagement.ControlPointType;
|
||||
newInspectionManagement.AcceptanceSite = inspectionManagement.AcceptanceSite;
|
||||
newInspectionManagement.IsOnceQualified = inspectionManagement.IsOnceQualified == "true" ? true : false;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.InspectionDate))
|
||||
newInspectionManagement.InspectionDate = DateTime.Parse(inspectionManagement.InspectionDate);
|
||||
newInspectionManagement.AttachUrl = inspectionManagement.AttachUrl;
|
||||
newInspectionManagement.AttachUrl2 = inspectionManagement.AttachUrl2;
|
||||
newInspectionManagement.NoticeCode = inspectionManagement.NoticeCode;
|
||||
newInspectionManagement.ParentDivisionProjectId = inspectionManagement.ParentDivisionProjectId;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.CheckDate))
|
||||
newInspectionManagement.CheckDate = DateTime.Parse(inspectionManagement.CheckDate);
|
||||
newInspectionManagement.CheckMan = inspectionManagement.CheckMan;
|
||||
newInspectionManagement.CompileMan = inspectionManagement.CompileMan;
|
||||
//newInspectionManagement.CompileMan2 = inspectionManagement.CompileMan2;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.CompileDate))
|
||||
newInspectionManagement.CompileDate = DateTime.Parse(inspectionManagement.CompileDate);
|
||||
newInspectionManagement.UnqualifiedReason = inspectionManagement.UnqualifiedReason;
|
||||
newInspectionManagement.AcceptanceCheckMan = inspectionManagement.AcceptanceCheckMan;
|
||||
newInspectionManagement.FileType = inspectionManagement.FileType;
|
||||
//newInspectionManagement.CCUnitIds = inspectionManagement.CCUnitIds;
|
||||
//newInspectionManagement.MainSendUnitId = inspectionManagement.MainSendUnitId;
|
||||
//newInspectionManagement.AuditMan = inspectionManagement.AuditMan;
|
||||
//newInspectionManagement.Status = inspectionManagement.Status;
|
||||
//if (!string.IsNullOrEmpty(inspectionManagement.PlanComplateDate))
|
||||
// newInspectionManagement.PlanComplateDate = DateTime.Parse(inspectionManagement.PlanComplateDate);
|
||||
db.ProcessControl_InspectionManagement.InsertOnSubmit(newInspectionManagement);
|
||||
db.SubmitChanges();
|
||||
|
||||
foreach (var InspectionDetail in inspectionManagement.inspectionManagementDetails)
|
||||
|
||||
{
|
||||
Model.ProcessControl_InspectionManagementDetail newInspectionDetail = new Model.ProcessControl_InspectionManagementDetail();
|
||||
newInspectionDetail.InspectionDetailId = InspectionDetail.InspectionDetailId;
|
||||
newInspectionDetail.InspectionId = newInspectionManagement.InspectionId;
|
||||
newInspectionDetail.UnitWorkId = InspectionDetail.UnitWorkId;
|
||||
newInspectionDetail.Branch = InspectionDetail.Branch;
|
||||
newInspectionDetail.ControlPointType = InspectionDetail.ControlPointType;
|
||||
if (!string.IsNullOrEmpty(InspectionDetail.CreateDate))
|
||||
newInspectionDetail.CreateDate = DateTime.Parse(InspectionDetail.CreateDate);
|
||||
|
||||
db.ProcessControl_InspectionManagementDetail.InsertOnSubmit(newInspectionDetail);
|
||||
}
|
||||
db.SubmitChanges();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取分部
|
||||
/// </summary>
|
||||
/// <param name="Branch"></param>
|
||||
/// <returns></returns>
|
||||
protected static string ConvertBranch(object Branch)
|
||||
{
|
||||
string name = string.Empty;
|
||||
if (Branch != null)
|
||||
{
|
||||
var branch = BLL.DivisionProjectService.GetDivisionProjectById(Branch.ToString());
|
||||
if (branch != null)
|
||||
{
|
||||
name = branch.DivisionName;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取控制点内容
|
||||
/// </summary>
|
||||
/// <param name="ControlPointType"></param>
|
||||
/// <returns></returns>
|
||||
protected static string ConvertControlPointType(object ControlPointType)
|
||||
{
|
||||
string name = string.Empty;
|
||||
if (ControlPointType != null)
|
||||
{
|
||||
var controlPointType = BLL.BreakdownProjectService.GetBreakdownProjectById(ControlPointType.ToString());
|
||||
if (controlPointType != null)
|
||||
{
|
||||
name = controlPointType.BreakdownName;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取控制点等级
|
||||
/// </summary>
|
||||
/// <param name="ControlPointType"></param>
|
||||
/// <returns></returns>
|
||||
protected static string ConvertClass(object ControlPointType)
|
||||
{
|
||||
string name = string.Empty;
|
||||
if (ControlPointType != null)
|
||||
{
|
||||
var controlPointType = BLL.BreakdownProjectService.GetBreakdownProjectById(ControlPointType.ToString());
|
||||
if (controlPointType != null)
|
||||
{
|
||||
name = controlPointType.Class;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
public static List<InspectionManagementDetail> getInspectionManagementDetail(string projectId, int index, int page, string state, string name)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var dataList = from x in db.ProcessControl_InspectionManagementDetail
|
||||
where x.ProcessControl_InspectionManagement.ProjectId == projectId
|
||||
select x;
|
||||
var listRes = dataList.Skip(index * page).Take(page);
|
||||
|
||||
List<InspectionManagementDetail> list = new List<InspectionManagementDetail>();
|
||||
foreach (var item in listRes)
|
||||
{
|
||||
InspectionManagementDetail detail = new InspectionManagementDetail()
|
||||
{
|
||||
InspectionDetailId = item.InspectionDetailId,
|
||||
UnitWorkId = item.UnitWorkId,
|
||||
UnitWorkName = db.WBS_UnitWork.FirstOrDefault(x => x.UnitWorkId == item.UnitWorkId).UnitWorkName,
|
||||
ControlPointType = item.ControlPointType,
|
||||
CreateDate = item.CreateDate.HasValue ? item.CreateDate.Value.ToString("yyyy-MM-dd") : "",
|
||||
Branch = item.Branch,
|
||||
|
||||
BranchName= ConvertBranch(item.Branch),
|
||||
ControlPointTypeName= ConvertControlPointType(item.ControlPointType),
|
||||
ControlPointTypeLevel= ConvertClass(item.ControlPointType)
|
||||
};
|
||||
InspectionManagement inspectionManagement = new InspectionManagement();
|
||||
|
||||
inspectionManagement.InspectionId = item.ProcessControl_InspectionManagement.InspectionId;
|
||||
inspectionManagement.ProjectId = item.ProcessControl_InspectionManagement.ProjectId;
|
||||
inspectionManagement.ProjectName = db.Base_Project.FirstOrDefault(x => x.ProjectId == item.ProcessControl_InspectionManagement.ProjectId).ProjectName;
|
||||
inspectionManagement.UnitId = item.ProcessControl_InspectionManagement.UnitId;
|
||||
inspectionManagement.UnitName = db.Base_Unit.FirstOrDefault(x => x.UnitId == item.ProcessControl_InspectionManagement.UnitId).UnitName;
|
||||
inspectionManagement.CNProfessionalId = item.ProcessControl_InspectionManagement.CNProfessionalId;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.CNProfessionalId))
|
||||
{
|
||||
inspectionManagement.CNProfessionalName = db.Base_CNProfessional.FirstOrDefault(x => x.CNProfessionalId == item.ProcessControl_InspectionManagement.CNProfessionalId).ProfessionalName;
|
||||
}
|
||||
inspectionManagement.InspectionCode = item.ProcessControl_InspectionManagement.InspectionCode;
|
||||
inspectionManagement.UnitWorkId = item.ProcessControl_InspectionManagement.UnitWorkId;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.UnitWorkId))
|
||||
{
|
||||
inspectionManagement.UnitWorkName = db.WBS_UnitWork.FirstOrDefault(x => x.UnitWorkId == item.ProcessControl_InspectionManagement.UnitWorkId).UnitWorkName;
|
||||
}
|
||||
inspectionManagement.Branch = item.ProcessControl_InspectionManagement.Branch;
|
||||
inspectionManagement.ControlPointType = item.ProcessControl_InspectionManagement.ControlPointType;
|
||||
inspectionManagement.AcceptanceSite = item.ProcessControl_InspectionManagement.AcceptanceSite;
|
||||
inspectionManagement.IsOnceQualified = item.ProcessControl_InspectionManagement.IsOnceQualified.HasValue ? item.ProcessControl_InspectionManagement.IsOnceQualified.Value.ToString() : "";
|
||||
inspectionManagement.InspectionDate = item.ProcessControl_InspectionManagement.InspectionDate.HasValue ? "" : "";
|
||||
inspectionManagement.AttachUrl = item.ProcessControl_InspectionManagement.AttachUrl;
|
||||
inspectionManagement.CheckDate = item.ProcessControl_InspectionManagement.CheckDate.HasValue ? item.ProcessControl_InspectionManagement.CheckDate.Value.ToString("yyyy-MM-dd") : "";
|
||||
inspectionManagement.CheckMan = item.ProcessControl_InspectionManagement.CheckMan;
|
||||
inspectionManagement.CheckMan = item.ProcessControl_InspectionManagement.CheckMan;
|
||||
inspectionManagement.UnqualifiedReason = item.ProcessControl_InspectionManagement.UnqualifiedReason;
|
||||
inspectionManagement.NoticeCode = item.ProcessControl_InspectionManagement.NoticeCode;
|
||||
inspectionManagement.AcceptanceCheckMan = item.ProcessControl_InspectionManagement.AcceptanceCheckMan;
|
||||
inspectionManagement.ParentDivisionProjectId = item.ProcessControl_InspectionManagement.ParentDivisionProjectId;
|
||||
inspectionManagement.CompileMan = item.ProcessControl_InspectionManagement.CompileMan;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.CompileMan))
|
||||
{
|
||||
inspectionManagement.CompileManName = db.Sys_User.FirstOrDefault(x => x.UserId == item.ProcessControl_InspectionManagement.CompileMan).UserName; //item.ProcessControl_InspectionManagement.CompileManName;
|
||||
}
|
||||
inspectionManagement.CompileDate = item.ProcessControl_InspectionManagement.CompileDate.HasValue ? item.ProcessControl_InspectionManagement.CompileDate.Value.ToString("yyyy-MM-dd") : "";
|
||||
inspectionManagement.FileType = item.ProcessControl_InspectionManagement.FileType;
|
||||
inspectionManagement.AttachUrl2 = item.ProcessControl_InspectionManagement.AttachUrl2;
|
||||
//inspectionManagement.MainSendUnitId = item.ProcessControl_InspectionManagement.MainSendUnitId;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.MainSendUnitId))
|
||||
inspectionManagement.MainSendUnitName = UnitService.getUnitNamesUnitIds(inspectionManagement.MainSendUnitId);//item.ProcessControl_InspectionManagement.MainSendUnitName;
|
||||
//inspectionManagement.CCUnitIds = item.ProcessControl_InspectionManagement.CCUnitIds;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.CCUnitIds))
|
||||
{
|
||||
inspectionManagement.CCUnitName = UnitService.getUnitNamesUnitIds(inspectionManagement.CCUnitIds);// item.ProcessControl_InspectionManagement.CCUnitName;
|
||||
}
|
||||
//inspectionManagement.PlanComplateDate = item.ProcessControl_InspectionManagement.PlanComplateDate.HasValue ? item.ProcessControl_InspectionManagement.PlanComplateDate.Value.ToString("yyyy-MM-dd") : "";
|
||||
|
||||
//inspectionManagement.Status = item.ProcessControl_InspectionManagement.Status;
|
||||
//inspectionManagement.CompileMan2 = item.ProcessControl_InspectionManagement.CompileMan2;
|
||||
|
||||
//inspectionManagement.AuditMan = item.ProcessControl_InspectionManagement.AuditMan;
|
||||
//if (!string.IsNullOrEmpty(inspectionManagement.AuditMan))
|
||||
//{ inspectionManagement.AuditManName = db.Sys_User.FirstOrDefault(x => x.UserId == item.ProcessControl_InspectionManagement.AuditMan).UserName; }
|
||||
detail.inspectionManagement = inspectionManagement;
|
||||
list.Add(detail);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
public static List<InspectionManagement> getInspectionManagement(string projectId, int index, int page, string state, string name)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var dataList = from x in db.ProcessControl_InspectionManagement
|
||||
where x.ProjectId == projectId
|
||||
select x;
|
||||
var listRes = dataList.Skip(index * page).Take(page);
|
||||
|
||||
List<InspectionManagement> list = new List<InspectionManagement>();
|
||||
foreach (var item in listRes)
|
||||
{
|
||||
|
||||
InspectionManagement inspectionManagement = new InspectionManagement();
|
||||
|
||||
inspectionManagement.InspectionId = item.InspectionId;
|
||||
inspectionManagement.ProjectId = item.ProjectId;
|
||||
inspectionManagement.ProjectName = db.Base_Project.FirstOrDefault(x => x.ProjectId == item.ProjectId).ProjectName;
|
||||
inspectionManagement.UnitId = item.UnitId;
|
||||
inspectionManagement.UnitName = db.Base_Unit.FirstOrDefault(x => x.UnitId == item.UnitId).UnitName;
|
||||
inspectionManagement.CNProfessionalId = item.CNProfessionalId;
|
||||
|
||||
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.CNProfessionalId))
|
||||
{
|
||||
inspectionManagement.CNProfessionalName = db.Base_CNProfessional.FirstOrDefault(x => x.CNProfessionalId == item.CNProfessionalId).ProfessionalName;
|
||||
}
|
||||
inspectionManagement.InspectionCode = item.InspectionCode;
|
||||
inspectionManagement.UnitWorkId = item.UnitWorkId;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.UnitWorkId))
|
||||
{
|
||||
inspectionManagement.UnitWorkName = db.WBS_UnitWork.FirstOrDefault(x => x.UnitWorkId == item.UnitWorkId).UnitWorkName;
|
||||
}
|
||||
inspectionManagement.Branch = item.Branch;
|
||||
inspectionManagement.ControlPointType = item.ControlPointType;
|
||||
inspectionManagement.AcceptanceSite = item.AcceptanceSite;
|
||||
inspectionManagement.IsOnceQualified = item.IsOnceQualified.HasValue ? item.IsOnceQualified.Value.ToString() : "";
|
||||
inspectionManagement.InspectionDate = item.InspectionDate.HasValue ? "" : "";
|
||||
inspectionManagement.AttachUrl = item.AttachUrl;
|
||||
inspectionManagement.CheckDate = item.CheckDate.HasValue ? item.CheckDate.Value.ToString("yyyy-MM-dd") : "";
|
||||
inspectionManagement.CheckMan = item.CheckMan;
|
||||
inspectionManagement.CheckMan = item.CheckMan;
|
||||
inspectionManagement.UnqualifiedReason = item.UnqualifiedReason;
|
||||
inspectionManagement.NoticeCode = item.NoticeCode;
|
||||
inspectionManagement.AcceptanceCheckMan = item.AcceptanceCheckMan;
|
||||
inspectionManagement.ParentDivisionProjectId = item.ParentDivisionProjectId;
|
||||
inspectionManagement.CompileMan = item.CompileMan;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.CompileMan))
|
||||
{
|
||||
inspectionManagement.CompileManName = db.Sys_User.FirstOrDefault(x => x.UserId == item.CompileMan).UserName; //item.CompileManName;
|
||||
}
|
||||
inspectionManagement.CompileDate = item.CompileDate.HasValue ? item.CompileDate.Value.ToString("yyyy-MM-dd") : "";
|
||||
inspectionManagement.FileType = item.FileType;
|
||||
inspectionManagement.AttachUrl2 = item.AttachUrl2;
|
||||
//inspectionManagement.MainSendUnitId = item.MainSendUnitId;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.MainSendUnitId))
|
||||
inspectionManagement.MainSendUnitName = UnitService.getUnitNamesUnitIds(inspectionManagement.MainSendUnitId);//item.MainSendUnitName;
|
||||
//inspectionManagement.CCUnitIds = item.CCUnitIds;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.CCUnitIds))
|
||||
{
|
||||
inspectionManagement.CCUnitName = UnitService.getUnitNamesUnitIds(inspectionManagement.CCUnitIds);// item.CCUnitName;
|
||||
}
|
||||
//inspectionManagement.PlanComplateDate = item.PlanComplateDate.HasValue ? item.PlanComplateDate.Value.ToString("yyyy-MM-dd") : "";
|
||||
|
||||
//inspectionManagement.Status = item.Status;
|
||||
//inspectionManagement.CompileMan2 = item.CompileMan2;
|
||||
|
||||
//inspectionManagement.AuditMan = item.AuditMan;
|
||||
//if (!string.IsNullOrEmpty(inspectionManagement.AuditMan))
|
||||
//{ inspectionManagement.AuditManName = db.Sys_User.FirstOrDefault(x => x.UserId == item.AuditMan).UserName; }
|
||||
|
||||
list.Add(inspectionManagement);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public static List<InspectionManagementDetail> getInspectionManagementDetailByinspectionId(string inspectionId)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var dataList = from x in db.ProcessControl_InspectionManagementDetail
|
||||
where x.InspectionId == inspectionId
|
||||
select x;
|
||||
var listRes = dataList.ToList();
|
||||
|
||||
List<InspectionManagementDetail> list = new List<InspectionManagementDetail>();
|
||||
foreach (var item in listRes)
|
||||
{
|
||||
InspectionManagementDetail detail = new InspectionManagementDetail(){ };
|
||||
detail.InspectionDetailId = item.InspectionDetailId;
|
||||
detail.UnitWorkId = item.UnitWorkId;
|
||||
detail.UnitWorkName = db.WBS_UnitWork.FirstOrDefault(x => x.UnitWorkId == item.UnitWorkId).UnitWorkName;
|
||||
detail.ControlPointType = item.ControlPointType;
|
||||
detail.CreateDate = item.CreateDate.HasValue ? item.CreateDate.Value.ToString("yyyy-MM-dd") : "";
|
||||
detail.Branch = item.Branch;
|
||||
detail.BranchName = ConvertBranch(item.Branch);
|
||||
detail.ControlPointTypeName = ConvertControlPointType(item.ControlPointType);
|
||||
detail.ControlPointTypeLevel = ConvertClass(item.ControlPointType);
|
||||
|
||||
InspectionManagement inspectionManagement = new InspectionManagement();
|
||||
|
||||
inspectionManagement.InspectionId = item.ProcessControl_InspectionManagement.InspectionId;
|
||||
inspectionManagement.ProjectId = item.ProcessControl_InspectionManagement.ProjectId;
|
||||
inspectionManagement.ProjectName = db.Base_Project.FirstOrDefault(x => x.ProjectId == item.ProcessControl_InspectionManagement.ProjectId).ProjectName;
|
||||
inspectionManagement.UnitId = item.ProcessControl_InspectionManagement.UnitId;
|
||||
inspectionManagement.UnitName = db.Base_Unit.FirstOrDefault(x => x.UnitId == item.ProcessControl_InspectionManagement.UnitId).UnitName;
|
||||
inspectionManagement.CNProfessionalId = item.ProcessControl_InspectionManagement.CNProfessionalId;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.CNProfessionalId))
|
||||
{
|
||||
inspectionManagement.CNProfessionalName = db.Base_CNProfessional.FirstOrDefault(x => x.CNProfessionalId == item.ProcessControl_InspectionManagement.CNProfessionalId).ProfessionalName;
|
||||
}
|
||||
inspectionManagement.InspectionCode = item.ProcessControl_InspectionManagement.InspectionCode;
|
||||
inspectionManagement.UnitWorkId = item.ProcessControl_InspectionManagement.UnitWorkId;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.UnitWorkId))
|
||||
{
|
||||
inspectionManagement.UnitWorkName = db.WBS_UnitWork.FirstOrDefault(x => x.UnitWorkId == item.ProcessControl_InspectionManagement.UnitWorkId).UnitWorkName;
|
||||
}
|
||||
inspectionManagement.Branch = item.ProcessControl_InspectionManagement.Branch;
|
||||
inspectionManagement.ControlPointType = item.ProcessControl_InspectionManagement.ControlPointType;
|
||||
inspectionManagement.AcceptanceSite = item.ProcessControl_InspectionManagement.AcceptanceSite;
|
||||
inspectionManagement.IsOnceQualified = item.ProcessControl_InspectionManagement.IsOnceQualified.HasValue ? item.ProcessControl_InspectionManagement.IsOnceQualified.Value.ToString() : "";
|
||||
inspectionManagement.InspectionDate = item.ProcessControl_InspectionManagement.InspectionDate.HasValue ? "" : "";
|
||||
|
||||
//inspectionManagement.AttachUrl = item.ProcessControl_InspectionManagement.AttachUrl;
|
||||
inspectionManagement.AttachUrl = APIUpLoadFileService.getFileUrl(item.InspectionId, null);
|
||||
|
||||
inspectionManagement.CheckDate = item.ProcessControl_InspectionManagement.CheckDate.HasValue ? item.ProcessControl_InspectionManagement.CheckDate.Value.ToString("yyyy-MM-dd") : "";
|
||||
inspectionManagement.CheckMan = item.ProcessControl_InspectionManagement.CheckMan;
|
||||
inspectionManagement.CheckMan = item.ProcessControl_InspectionManagement.CheckMan;
|
||||
inspectionManagement.UnqualifiedReason = item.ProcessControl_InspectionManagement.UnqualifiedReason;
|
||||
inspectionManagement.NoticeCode = item.ProcessControl_InspectionManagement.NoticeCode;
|
||||
inspectionManagement.AcceptanceCheckMan = item.ProcessControl_InspectionManagement.AcceptanceCheckMan;
|
||||
inspectionManagement.ParentDivisionProjectId = item.ProcessControl_InspectionManagement.ParentDivisionProjectId;
|
||||
inspectionManagement.CompileMan = item.ProcessControl_InspectionManagement.CompileMan;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.CompileMan))
|
||||
{
|
||||
inspectionManagement.CompileManName = db.Sys_User.FirstOrDefault(x => x.UserId == item.ProcessControl_InspectionManagement.CompileMan).UserName; //item.ProcessControl_InspectionManagement.CompileManName;
|
||||
}
|
||||
inspectionManagement.CompileDate = item.ProcessControl_InspectionManagement.CompileDate.HasValue ? item.ProcessControl_InspectionManagement.CompileDate.Value.ToString("yyyy-MM-dd") : "";
|
||||
inspectionManagement.FileType = item.ProcessControl_InspectionManagement.FileType;
|
||||
inspectionManagement.AttachUrl2 = item.ProcessControl_InspectionManagement.AttachUrl2;
|
||||
//inspectionManagement.MainSendUnitId = item.ProcessControl_InspectionManagement.MainSendUnitId;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.MainSendUnitId))
|
||||
inspectionManagement.MainSendUnitName = UnitService.getUnitNamesUnitIds(inspectionManagement.MainSendUnitId);//item.ProcessControl_InspectionManagement.MainSendUnitName;
|
||||
//inspectionManagement.CCUnitIds = item.ProcessControl_InspectionManagement.CCUnitIds;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.CCUnitIds))
|
||||
{
|
||||
inspectionManagement.CCUnitName = UnitService.getUnitNamesUnitIds(inspectionManagement.CCUnitIds);// item.ProcessControl_InspectionManagement.CCUnitName;
|
||||
}
|
||||
//inspectionManagement.PlanComplateDate = item.ProcessControl_InspectionManagement.PlanComplateDate.HasValue ? item.ProcessControl_InspectionManagement.PlanComplateDate.Value.ToString("yyyy-MM-dd") : "";
|
||||
|
||||
//inspectionManagement.Status = item.ProcessControl_InspectionManagement.Status;
|
||||
//inspectionManagement.CompileMan2 = item.ProcessControl_InspectionManagement.CompileMan2;
|
||||
|
||||
//inspectionManagement.AuditMan = item.ProcessControl_InspectionManagement.AuditMan;
|
||||
//if (!string.IsNullOrEmpty(inspectionManagement.AuditMan))
|
||||
//{ inspectionManagement.AuditManName = db.Sys_User.FirstOrDefault(x => x.UserId == item.ProcessControl_InspectionManagement.AuditMan).UserName; }
|
||||
detail.inspectionManagement = inspectionManagement;
|
||||
list.Add(detail);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
using Model.CQMS;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL.API.CQMS
|
||||
{
|
||||
public class BreakdownProjectService
|
||||
{
|
||||
public static List<BreakdownProject> getBreakdowns(string projectId, string keyWord)
|
||||
{
|
||||
List<BreakdownProject> res = new List<BreakdownProject>();
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var q = from x in db.View_WBS_BreakdownProject
|
||||
where x.ProjectId == projectId && x.IsSelected == true
|
||||
where keyWord == "" || x.BreakdownName.Contains(keyWord)
|
||||
select x;
|
||||
var list = q.ToList();
|
||||
foreach (var item in list)
|
||||
{
|
||||
BreakdownProject breakdownProject = new BreakdownProject();
|
||||
breakdownProject.AttachUrl = item.AttachUrl;
|
||||
breakdownProject.BreakdownProjectId = item.BreakdownProjectId;
|
||||
breakdownProject.ProjectId = item.ProjectId;
|
||||
breakdownProject.BreakdownCode = item.BreakdownCode;
|
||||
breakdownProject.BreakdownName = item.BreakdownName;
|
||||
breakdownProject.DivisionProjectId = item.DivisionProjectId;
|
||||
breakdownProject.Basis = item.Basis;
|
||||
breakdownProject.CheckPoints = item.CheckPoints;
|
||||
breakdownProject.RecordAndCode = item.RecordAndCode;
|
||||
breakdownProject.Class = item.Class;
|
||||
breakdownProject.SortIndex = item.SortIndex.HasValue ? item.SortIndex.Value.ToString() : "";
|
||||
breakdownProject.Remark = item.Remark;
|
||||
breakdownProject.AttachUrl = item.AttachUrl;
|
||||
breakdownProject.IsAcceptance = item.IsAcceptance.HasValue ? item.IsAcceptance.Value.ToString() : "";
|
||||
breakdownProject.FenBao = item.FenBao;
|
||||
breakdownProject.WuHuan = item.WuHuan;
|
||||
breakdownProject.JianLi = item.JianLi;
|
||||
breakdownProject.YeZhu = item.YeZhu;
|
||||
breakdownProject.IsSelected = item.IsSelected.HasValue ? "" : "";
|
||||
res.Add(breakdownProject);
|
||||
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -167,6 +167,37 @@ namespace BLL
|
||||
return getSiteInOutList;
|
||||
}
|
||||
}
|
||||
|
||||
public static List<Model.PageDataPersonInOutItem> getPersonNumByCompany(DateTime dateValue,string[] pids)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
List<Model.PageDataPersonInOutItem> getSiteInOutList = new List<Model.PageDataPersonInOutItem>();
|
||||
var getDayAll = from x in db.SitePerson_PersonInOutNow
|
||||
join y in db.SitePerson_Person on x.PersonId equals y.PersonId
|
||||
join z in db.Base_WorkPost on y.WorkPostId equals z.WorkPostId
|
||||
where x.ChangeTime.Value.Year == dateValue.Year && x.ChangeTime.Value.Month == dateValue.Month
|
||||
&& x.ChangeTime.Value.Day == dateValue.Day && pids.Contains(x.ProjectId)
|
||||
select new { x.PersonId, x.ChangeTime, x.IsIn, z.PostType };
|
||||
if (getDayAll.Count() > 0)
|
||||
{
|
||||
var getInMaxs = from x in getDayAll
|
||||
group x by x.PersonId into g
|
||||
select new Model.PageDataPersonInOutItem
|
||||
{
|
||||
PersonId = g.First().PersonId,
|
||||
ChangeTime = g.Max(x => x.ChangeTime),
|
||||
IsIn = g.First().IsIn,
|
||||
PostType = g.First().PostType
|
||||
};
|
||||
if (getInMaxs.Count() > 0)
|
||||
{
|
||||
getSiteInOutList = getInMaxs.Where(x => x.IsIn == true).ToList();
|
||||
}
|
||||
}
|
||||
return getSiteInOutList;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
+10
-4
@@ -10,7 +10,7 @@
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>BLL</RootNamespace>
|
||||
<AssemblyName>BLL</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
@@ -51,9 +51,6 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\FineUIPro\FineUIPro.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.QualityTools.Testing.Fakes, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.SQLServer.ManagedDTS, Version=16.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SqlServer.ManagedDTS\v4.0_16.0.0.0__89845dcd8080cc91\新建文件夹\Microsoft.SQLServer.ManagedDTS.dll</HintPath>
|
||||
@@ -96,6 +93,9 @@
|
||||
<Compile Include="API\APIUnitService.cs" />
|
||||
<Compile Include="API\APIUpLoadFileService.cs" />
|
||||
<Compile Include="API\APIUserService.cs" />
|
||||
<Compile Include="API\CQMS\ApiInspectionManagementService.cs" />
|
||||
<Compile Include="API\CQMS\BreakdownProjectService.cs" />
|
||||
<Compile Include="API\CQMS\QualityAssuranceService.cs" />
|
||||
<Compile Include="API\HJGL\APIGetHJDataService.cs" />
|
||||
<Compile Include="API\HJGL\APIHotProcessHardService.cs" />
|
||||
<Compile Include="API\HJGL\APINDETrustService.cs" />
|
||||
@@ -292,11 +292,13 @@
|
||||
<Compile Include="CQMS\WBS\ControlItemAndCycleService.cs" />
|
||||
<Compile Include="CQMS\WBS\ControlItemInitService.cs" />
|
||||
<Compile Include="CQMS\WBS\ControlItemProjectService.cs" />
|
||||
<Compile Include="CQMS\WBS\DivisionDivideService.cs" />
|
||||
<Compile Include="CQMS\WBS\DivisionProjectService.cs" />
|
||||
<Compile Include="CQMS\WBS\DivisionService.cs" />
|
||||
<Compile Include="CQMS\WBS\ForeignBreakdownProjectService.cs" />
|
||||
<Compile Include="CQMS\WBS\ForeignBreakdownService.cs" />
|
||||
<Compile Include="CQMS\WBS\ForeignCNProfessionalService.cs" />
|
||||
<Compile Include="CQMS\WBS\SubProjectsService.cs" />
|
||||
<Compile Include="CQMS\WBS\WBSsearchService.cs" />
|
||||
<Compile Include="CQMS\WBS\WorkPackageInitService.cs" />
|
||||
<Compile Include="CQMS\WBS\WorkPackageProjectService.cs" />
|
||||
@@ -843,10 +845,14 @@
|
||||
<Compile Include="ZHGL\HSSESystem\HSSEOrganizeService.cs" />
|
||||
<Compile Include="ZHGL\Information\AccidentCauseReportItemService.cs" />
|
||||
<Compile Include="ZHGL\Information\AccidentCauseReportService.cs" />
|
||||
<Compile Include="ZHGL\Information\ActionWorkLedgerItemService.cs" />
|
||||
<Compile Include="ZHGL\Information\ActionWorkLedgerService.cs" />
|
||||
<Compile Include="ZHGL\Information\EPSummaryReportService.cs" />
|
||||
<Compile Include="ZHGL\Information\QualityWorkSummaryReportService.cs" />
|
||||
<Compile Include="ZHGL\Information\QuarterlyProjectQualityService.cs" />
|
||||
<Compile Include="ZHGL\Information\SafetyBriefingService.cs" />
|
||||
<Compile Include="ZHGL\Information\SafetyProductionEvaluationItemService.cs" />
|
||||
<Compile Include="ZHGL\Information\SafetyProductionEvaluationService.cs" />
|
||||
<Compile Include="ZHGL\Information\UrgeReportService.cs" />
|
||||
<Compile Include="ZHGL\Information\AnalyseResourceService.cs" />
|
||||
<Compile Include="ZHGL\Information\DrillConductedQuarterlyReportItemService.cs" />
|
||||
|
||||
@@ -21,6 +21,11 @@ namespace BLL
|
||||
var q = (from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalHSEId orderby x.SortIndex select x).ToList();
|
||||
return q;
|
||||
}
|
||||
|
||||
public static List<Model.Control_PointCropping> GetCnProList()
|
||||
{
|
||||
return (from x in Funs.DB.Control_PointCropping where x.ParentId == null || x.ParentId == "" orderby x.OperateTime select x).ToList();
|
||||
}
|
||||
/// <summary>
|
||||
/// 添加
|
||||
/// </summary>
|
||||
|
||||
@@ -107,6 +107,7 @@ namespace BLL
|
||||
newEquipment.Status = SpecialEquipment.Status;
|
||||
newEquipment.PositionNum = SpecialEquipment.PositionNum;
|
||||
newEquipment.RemarkCode = SpecialEquipment.RemarkCode;
|
||||
newEquipment.ReportTime = SpecialEquipment.ReportTime;
|
||||
db.Comprehensive_SpecialEquipment.InsertOnSubmit(newEquipment);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
@@ -131,6 +132,7 @@ namespace BLL
|
||||
newEquipment.Status = SpecialEquipment.Status;
|
||||
newEquipment.PositionNum = SpecialEquipment.PositionNum;
|
||||
newEquipment.RemarkCode = SpecialEquipment.RemarkCode;
|
||||
newEquipment.ReportTime = SpecialEquipment.ReportTime;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,6 +250,8 @@ namespace BLL
|
||||
newInspectionManagement.UnqualifiedReason = inspectionManagement.UnqualifiedReason;
|
||||
newInspectionManagement.AcceptanceCheckMan = inspectionManagement.AcceptanceCheckMan;
|
||||
newInspectionManagement.FileType = inspectionManagement.FileType;
|
||||
newInspectionManagement.ChildUnitWorkId = inspectionManagement.ChildUnitWorkId;
|
||||
newInspectionManagement.ChildBranch = inspectionManagement.ChildBranch;
|
||||
db.ProcessControl_InspectionManagement.InsertOnSubmit(newInspectionManagement);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
@@ -282,6 +284,8 @@ namespace BLL
|
||||
newInspectionManagement.ParentDivisionProjectId = inspectionManagement.ParentDivisionProjectId;
|
||||
newInspectionManagement.UnqualifiedReason = inspectionManagement.UnqualifiedReason;
|
||||
newInspectionManagement.AcceptanceCheckMan = inspectionManagement.AcceptanceCheckMan;
|
||||
newInspectionManagement.ChildUnitWorkId = inspectionManagement.ChildUnitWorkId;
|
||||
newInspectionManagement.ChildBranch = inspectionManagement.ChildBranch;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,13 @@ namespace BLL
|
||||
return (from x in Funs.DB.Solution_CQMSConstructSolutionApprove where x.ConstructSolutionId == ConstructSolutionId && x.ApproveType != "S" && x.SignType == signType && x.Edition == edtion select x.ApproveMan).ToList();
|
||||
}
|
||||
|
||||
public static List<string> GetUserIdsApprovesBySignTypeNew(string ConstructSolutionId, string signType)
|
||||
{
|
||||
var edtion = GetUserIdsApprovesBySignTypeEditon(ConstructSolutionId);
|
||||
return (from x in Funs.DB.Solution_CQMSConstructSolutionApprove where x.ConstructSolutionId == ConstructSolutionId && x.ApproveType != "S"
|
||||
&& x.SignType == signType && x.Edition == edtion-1 select x.ApproveMan).ToList();
|
||||
}
|
||||
|
||||
public static int? GetUserIdsApprovesBySignTypeEditon(string ConstructSolutionId)
|
||||
{
|
||||
int edition = 0;
|
||||
@@ -54,7 +61,8 @@ namespace BLL
|
||||
/// <param name="managerRuleApprove">施工方案审批实体</param>
|
||||
public static void UpdateConstructSolutionApprove(Model.Solution_CQMSConstructSolutionApprove approve)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString)) {
|
||||
|
||||
Model.Solution_CQMSConstructSolutionApprove newApprove = db.Solution_CQMSConstructSolutionApprove.First(e => e.ConstructSolutionApproveId == approve.ConstructSolutionApproveId && e.ApproveDate == null);
|
||||
newApprove.ConstructSolutionId = approve.ConstructSolutionId;
|
||||
newApprove.ApproveMan = approve.ApproveMan;
|
||||
@@ -66,6 +74,7 @@ namespace BLL
|
||||
newApprove.Order=approve.Order;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据施工方案发布Id获取所以对应施工方案审批信息(查询全部会签状态)
|
||||
/// </summary>
|
||||
@@ -78,6 +87,13 @@ namespace BLL
|
||||
|
||||
}
|
||||
|
||||
public static List<Model.Solution_CQMSConstructSolutionApprove> GetHandleConstructSolutionApprovesByConstructSolutionId2(string ConstructSolutionId, int edition)
|
||||
{
|
||||
var list = Funs.DB.Solution_CQMSConstructSolutionApprove.Where(p => p.ConstructSolutionId == ConstructSolutionId && p.ApproveType == Const.CQMSConstructSolution_Audit1 && p.Edition == edition).ToList();
|
||||
return list;
|
||||
|
||||
}
|
||||
|
||||
public static List<Model.Solution_CQMSConstructSolutionApprove> GetHandleConstruct(string ConstructSolutionId, int edition)
|
||||
{
|
||||
var list = Funs.DB.Solution_CQMSConstructSolutionApprove.Where(p => p.ConstructSolutionId == ConstructSolutionId && p.ApproveType != "S" && p.ApproveDate != null && p.Edition == edition).ToList();
|
||||
@@ -162,10 +178,13 @@ namespace BLL
|
||||
/// <param name="ConstructSolutionId"></param>
|
||||
public static void delSolutionApprove(string constructSolutionId, string man)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = (from x in Funs.DB.Solution_CQMSConstructSolutionApprove where x.ConstructSolutionId == constructSolutionId && x.ApproveType != "S" && x.ApproveMan.Equals(man) && x.ApproveDate == null select x).ToList();
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var q = db.Solution_CQMSConstructSolutionApprove.Where(x => x.ConstructSolutionId == constructSolutionId && x.ApproveType != "S" && x.ApproveMan.Equals(man) && x.ApproveDate == null)
|
||||
.ToList();
|
||||
db.Solution_CQMSConstructSolutionApprove.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -177,7 +196,7 @@ namespace BLL
|
||||
public static void DeleteConstructSolutionApprovesByConstructSolutionId(string ConstructSolutionId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = (from x in Funs.DB.Solution_CQMSConstructSolutionApprove where x.ConstructSolutionId == ConstructSolutionId select x).ToList();
|
||||
var q = (from x in db.Solution_CQMSConstructSolutionApprove where x.ConstructSolutionId == ConstructSolutionId select x).ToList();
|
||||
db.Solution_CQMSConstructSolutionApprove.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
@@ -209,7 +228,7 @@ namespace BLL
|
||||
/// <param name="managerRuleApprove">施工方案审批实体</param>
|
||||
public static void AddConstructSolutionApprove(Model.Solution_CQMSConstructSolutionApprove approve)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString)) {
|
||||
Model.Solution_CQMSConstructSolutionApprove newApprove = new Model.Solution_CQMSConstructSolutionApprove();
|
||||
if (string.IsNullOrWhiteSpace(approve.ConstructSolutionApproveId))
|
||||
{
|
||||
@@ -227,10 +246,12 @@ namespace BLL
|
||||
newApprove.ApproveType = approve.ApproveType;
|
||||
newApprove.SignType = approve.SignType;
|
||||
newApprove.Edition = approve.Edition;
|
||||
newApprove.Order= GetMaxOrderByConstructSolutionId(approve.ConstructSolutionId);
|
||||
//newApprove.Order= GetMaxOrderByConstructSolutionId(approve.ConstructSolutionId);
|
||||
newApprove.Order = approve.Order;
|
||||
db.Solution_CQMSConstructSolutionApprove.InsertOnSubmit(newApprove);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
public static int GetMaxOrderByConstructSolutionId(string constructSolutionId)
|
||||
{
|
||||
@@ -254,19 +275,88 @@ namespace BLL
|
||||
select x).FirstOrDefault();
|
||||
return q;
|
||||
}
|
||||
public static string GetThisApproveNameByConstructSolutionId(object constructSolutionId)
|
||||
|
||||
public static List<Model.Solution_CQMSConstructSolutionApprove> GetThisApproveByConstructSolutionId(string constructSolutionId,string state)
|
||||
{
|
||||
var constructSolution =
|
||||
CQMSConstructSolutionService.GetConstructSolutionByConstructSolutionId(constructSolutionId.ToString());
|
||||
|
||||
var q = new List<Model.Solution_CQMSConstructSolutionApprove>();
|
||||
if (state == "2")
|
||||
{
|
||||
q = (from x in Funs.DB.Solution_CQMSConstructSolutionApprove
|
||||
where x.ConstructSolutionId == constructSolutionId && x.ApproveDate == null
|
||||
&& x.SignType == "Yi"
|
||||
&& x.Edition==constructSolution.Edition
|
||||
orderby x.Order
|
||||
select x).ToList();
|
||||
}
|
||||
else if (state == "3")
|
||||
{
|
||||
q = (from x in Funs.DB.Solution_CQMSConstructSolutionApprove
|
||||
where x.ConstructSolutionId == constructSolutionId && x.ApproveDate == null
|
||||
&& x.SignType == "Er"
|
||||
&& x.Edition == constructSolution.Edition
|
||||
orderby x.Order
|
||||
select x).ToList();
|
||||
}
|
||||
else {
|
||||
q = (from x in Funs.DB.Solution_CQMSConstructSolutionApprove
|
||||
where x.ConstructSolutionId == constructSolutionId && x.ApproveDate == null
|
||||
&& x.SignType == null
|
||||
&& x.Edition == constructSolution.Edition
|
||||
orderby x.Order
|
||||
select x).ToList();
|
||||
}
|
||||
return q;
|
||||
}
|
||||
|
||||
//加载审批人
|
||||
public static string GetThisApproveNameByConstructSolutionId(object constructSolutionId,object state)
|
||||
{
|
||||
var constructSolution =
|
||||
CQMSConstructSolutionService.GetConstructSolutionByConstructSolutionId(constructSolutionId.ToString());
|
||||
|
||||
string name = "";
|
||||
if (state.ToString() == "2")
|
||||
{
|
||||
var q = (from x in Funs.DB.Solution_CQMSConstructSolutionApprove
|
||||
where x.ConstructSolutionId == constructSolutionId.ToString() && x.ApproveDate == null
|
||||
&& x.Edition == constructSolution.Edition
|
||||
&& x.SignType == "Yi"
|
||||
orderby x.Order
|
||||
select x).FirstOrDefault();
|
||||
if (q!=null)
|
||||
select x).ToList();
|
||||
if (q.Count > 0)
|
||||
{
|
||||
name = UserService.GetUserNameByUserId(q.ApproveMan);
|
||||
foreach (var item in q)
|
||||
{
|
||||
name += UserService.GetUserNameByUserId(item.ApproveMan) + ",";
|
||||
}
|
||||
}
|
||||
return name;
|
||||
}
|
||||
else if (state.ToString() == "3")
|
||||
{
|
||||
var q = (from x in Funs.DB.Solution_CQMSConstructSolutionApprove
|
||||
where x.ConstructSolutionId == constructSolutionId.ToString() && x.ApproveDate == null
|
||||
&& x.SignType == "Er"
|
||||
&& x.Edition == constructSolution.Edition
|
||||
orderby x.Order
|
||||
select x).ToList();
|
||||
if (q.Count > 0)
|
||||
{
|
||||
foreach (var item in q)
|
||||
{
|
||||
name += UserService.GetUserNameByUserId(item.ApproveMan) + ",";
|
||||
}
|
||||
}
|
||||
return name;
|
||||
}
|
||||
else {
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 推送待办给下一步办理人
|
||||
/// </summary>
|
||||
|
||||
@@ -66,6 +66,8 @@ namespace BLL
|
||||
newConstructSolution.Edition = constructSolution.Edition;
|
||||
newConstructSolution.SpecialSchemeTypeId = constructSolution.SpecialSchemeTypeId;
|
||||
newConstructSolution.Content= constructSolution.Content;
|
||||
newConstructSolution.CsUsers = constructSolution.CsUsers;
|
||||
|
||||
db.Solution_CQMSConstructSolution.InsertOnSubmit(newConstructSolution);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
@@ -75,7 +77,7 @@ namespace BLL
|
||||
/// <param name="constructSolution">方案审查实体</param>
|
||||
public static void UpdateConstructSolution(Model.Solution_CQMSConstructSolution constructSolution)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString)) {
|
||||
Model.Solution_CQMSConstructSolution newConstructSolution = db.Solution_CQMSConstructSolution.First(e => e.ConstructSolutionId == constructSolution.ConstructSolutionId);
|
||||
newConstructSolution.Code = constructSolution.Code;
|
||||
newConstructSolution.UnitId = constructSolution.UnitId;
|
||||
@@ -88,8 +90,10 @@ namespace BLL
|
||||
newConstructSolution.Edition = constructSolution.Edition;
|
||||
newConstructSolution.SpecialSchemeTypeId = constructSolution.SpecialSchemeTypeId;
|
||||
newConstructSolution.Content= constructSolution.Content;
|
||||
newConstructSolution.CsUsers = constructSolution.CsUsers;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -112,7 +116,11 @@ namespace BLL
|
||||
}
|
||||
else if (state.ToString() == BLL.Const.CQMSConstructSolution_Audit)
|
||||
{
|
||||
return "会签";
|
||||
return "一级审批";
|
||||
}
|
||||
else if (state.ToString() == BLL.Const.CQMSConstructSolution_Audit1)
|
||||
{
|
||||
return "二级审核";
|
||||
}
|
||||
else if (state.ToString() == BLL.Const.CQMSConstructSolution_Complete)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class DivisionDivideService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据DivisionId获取分部分项工程划分
|
||||
/// </summary>
|
||||
/// <param name="divisionDivideId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.WBS_DivisionDivide GetDivisionDivideByDivisionId(string unitWorkId, string divisionId)
|
||||
{
|
||||
return Funs.DB.WBS_DivisionDivide.FirstOrDefault(e => e.UnitWorkId == unitWorkId && e.DivisionId == divisionId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加单位分部分项工程划分、裁剪
|
||||
/// </summary>
|
||||
/// <param name="divide"></param>
|
||||
public static void AddDivisionDivide(Model.WBS_DivisionDivide divide)
|
||||
{
|
||||
Model.WBS_DivisionDivide newDivide = new Model.WBS_DivisionDivide
|
||||
{
|
||||
DivisionDivideId = divide.DivisionDivideId,
|
||||
ProjectId = divide.ProjectId,
|
||||
DivisionId = divide.DivisionId,
|
||||
UnitWorkId = divide.UnitWorkId
|
||||
};
|
||||
Funs.DB.WBS_DivisionDivide.InsertOnSubmit(newDivide);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据分项Id删除
|
||||
/// </summary>
|
||||
/// <param name="divisionId"></param>
|
||||
public static void DeleteDivisionDivideByDivisionId(string divisionId)
|
||||
{
|
||||
Model.WBS_DivisionDivide divisionDivide = Funs.DB.WBS_DivisionDivide.FirstOrDefault(e => e.DivisionId == divisionId);
|
||||
if (divisionDivide!=null)
|
||||
{
|
||||
Funs.DB.WBS_DivisionDivide.DeleteOnSubmit(divisionDivide);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据单位工程/子单位工程删除
|
||||
/// </summary>
|
||||
/// <param name="unitWorkId"></param>
|
||||
public static void DeleteDivisionDivideByUnitWorkId(string unitWorkId)
|
||||
{
|
||||
var div = (from x in Funs.DB.WBS_DivisionDivide where x.UnitWorkId == unitWorkId select x).ToList();
|
||||
if (div != null)
|
||||
{
|
||||
Funs.DB.WBS_DivisionDivide.DeleteAllOnSubmit(div);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据单位工程Id获取数据
|
||||
/// </summary>
|
||||
/// <param name="unitWorkId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.WBS_DivisionDivide> GetDivisionDivideByUnitWorkId(string unitWorkId)
|
||||
{
|
||||
return (from x in Funs.DB.WBS_DivisionDivide where x.UnitWorkId == unitWorkId select x).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 分部分项工程
|
||||
/// </summary>
|
||||
public class SubProjectsService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取分部分项工程
|
||||
/// </summary>
|
||||
/// <param name="divisionId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Division_SubProjects GetSubProjectsById(string divisionId)
|
||||
{
|
||||
return Funs.DB.Division_SubProjects.FirstOrDefault(e => e.DivisionId == divisionId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据项目Id获取分部分项工程数量
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static int GetSubProjectsByProjectId(string projectId)
|
||||
{
|
||||
return (from x in Funs.DB.Division_SubProjects where x.ProjectId == projectId select x).Count();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加分部分项
|
||||
/// </summary>
|
||||
/// <param name="subProjects"></param>
|
||||
public static void AddSubProjects(Division_SubProjects subProjects)
|
||||
{
|
||||
Model.Division_SubProjects newSubProjects = new Division_SubProjects
|
||||
{
|
||||
DivisionId = subProjects.DivisionId,
|
||||
ProjectId = subProjects.ProjectId,
|
||||
ParentId = subProjects.ParentId,
|
||||
DivisionLevel = subProjects.DivisionLevel,
|
||||
BranchEngineeringCode = subProjects.BranchEngineeringCode,
|
||||
BranchEngineeringName = subProjects.BranchEngineeringName,
|
||||
SubBranchEngineeringName = subProjects.SubBranchEngineeringName,
|
||||
ProEngineeringCode = subProjects.ProEngineeringCode,
|
||||
ProEngineeringName = subProjects.ProEngineeringName,
|
||||
ProEngineeringNum = subProjects.ProEngineeringNum,
|
||||
Remark = subProjects.Remark,
|
||||
Status=subProjects.Status,
|
||||
AddUser=subProjects.AddUser,
|
||||
OperateTime=subProjects.OperateTime,
|
||||
Sort=subProjects.Sort
|
||||
};
|
||||
Funs.DB.Division_SubProjects.InsertOnSubmit(newSubProjects);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改分部分项
|
||||
/// </summary>
|
||||
/// <param name="subProjects"></param>
|
||||
public static void UpdateSubProjects(Division_SubProjects subProjects)
|
||||
{
|
||||
Model.Division_SubProjects newSubProjects = Funs.DB.Division_SubProjects.FirstOrDefault(e => e.DivisionId == subProjects.DivisionId);
|
||||
if (newSubProjects!=null)
|
||||
{
|
||||
newSubProjects.ParentId = subProjects.ParentId;
|
||||
newSubProjects.DivisionLevel = subProjects.DivisionLevel;
|
||||
newSubProjects.BranchEngineeringCode = subProjects.BranchEngineeringCode;
|
||||
newSubProjects.BranchEngineeringName = subProjects.BranchEngineeringName;
|
||||
newSubProjects.SubBranchEngineeringName = subProjects.SubBranchEngineeringName;
|
||||
newSubProjects.ProEngineeringCode = subProjects.ProEngineeringCode;
|
||||
newSubProjects.ProEngineeringName = subProjects.ProEngineeringName;
|
||||
newSubProjects.ProEngineeringNum = subProjects.ProEngineeringNum;
|
||||
newSubProjects.Remark = subProjects.Remark;
|
||||
newSubProjects.Status = subProjects.Status;
|
||||
newSubProjects.AddUser = subProjects.AddUser;
|
||||
newSubProjects.OperateTime = subProjects.OperateTime;
|
||||
newSubProjects.Sort = subProjects.Sort;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除分部分项工程
|
||||
/// </summary>
|
||||
/// <param name="divisionId"></param>
|
||||
public static void DeleteSubProjectsById(string divisionId)
|
||||
{
|
||||
var subProjects = Funs.DB.Division_SubProjects.FirstOrDefault(e => e.DivisionId == divisionId);
|
||||
if (subProjects != null)
|
||||
{
|
||||
Funs.DB.Division_SubProjects.DeleteOnSubmit(subProjects);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -501,6 +501,9 @@ namespace BLL
|
||||
list.Add(".txt");
|
||||
list.Add(".xlsx");
|
||||
list.Add(".xls");
|
||||
list.Add(".png");
|
||||
list.Add(".jpg");
|
||||
list.Add(".jpeg");
|
||||
foreach (var item in list)
|
||||
{
|
||||
if (item == FiletExtension)
|
||||
|
||||
@@ -5,10 +5,11 @@ namespace BLL
|
||||
{
|
||||
public static class Const
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 时间书签(用于筛选数据范围)
|
||||
/// 时间书签(用于筛选数据范围)修改日期 2024-10-19 18:55:14 由2023改成2020
|
||||
/// </summary>
|
||||
public static DateTime DtmarkTime = DateTime.Parse("2023-01-01");
|
||||
public static DateTime DtmarkTime = DateTime.Parse("2020-01-01");
|
||||
#region 查询字段:系统设置
|
||||
/// <summary>
|
||||
/// 系统管理员ID
|
||||
@@ -3364,6 +3365,11 @@ namespace BLL
|
||||
/// </summary>
|
||||
public const string HseMonthReportNewTemplateUrl = "File\\Word\\HSSE\\项目安全月报.doc";
|
||||
|
||||
/// <summary>
|
||||
/// 单位分部分项工程划分模板
|
||||
/// </summary>
|
||||
public const string DivisionDivideTempUrl = "File\\Excel\\DataIn\\单位分部分项工程划分导入模板.xls";
|
||||
|
||||
#region 导出模板
|
||||
/// <summary>
|
||||
/// 质量专项检查模板文件原始虚拟路径
|
||||
@@ -3778,6 +3784,21 @@ namespace BLL
|
||||
/// </summary>
|
||||
public const string ControlItemAndCycleShowMenuId = "94217974-201A-4D4F-A832-D9477ACD63A5";
|
||||
|
||||
/// <summary>
|
||||
/// 单位分部分项工程划分、裁剪
|
||||
/// </summary>
|
||||
public const string DivisionDivideAndCropMenuId = "FB94A120-921B-4AAB-B54F-EC11B6F561FD";
|
||||
|
||||
/// <summary>
|
||||
/// 单位分部分项工程划分表
|
||||
/// </summary>
|
||||
public const string DivisionDivideListMenuId = "BA250432-492B-49A3-8BB6-D04BF74D2EDD";
|
||||
|
||||
/// <summary>
|
||||
/// 分部分项工程数据库
|
||||
/// </summary>
|
||||
public const string DivisionSubProjectsMenuId = "17E206A1-E06B-40C0-8DCB-E3AAA2E3B339";
|
||||
|
||||
#endregion
|
||||
|
||||
#region 工序验收
|
||||
@@ -4636,14 +4657,21 @@ namespace BLL
|
||||
public static string CQMSConstructSolution_Compile = "1";
|
||||
|
||||
/// <summary>
|
||||
/// 会签
|
||||
/// 一级审批
|
||||
/// </summary>
|
||||
public static string CQMSConstructSolution_Audit = "2";
|
||||
|
||||
/// <summary>
|
||||
/// 二级审批
|
||||
/// </summary>
|
||||
public static string CQMSConstructSolution_Audit1 = "3";
|
||||
|
||||
/// <summary>
|
||||
/// 审批完成
|
||||
/// </summary>
|
||||
public static string CQMSConstructSolution_Complete = "3";
|
||||
public static string CQMSConstructSolution_Complete = "4";
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -6071,5 +6099,31 @@ namespace BLL
|
||||
/// HSSE管理月报新
|
||||
/// </summary>
|
||||
public const string ManagerMonthCNewMenuId = "9E4B28DF-8C8E-49F8-AB15-270BBDC73449";
|
||||
|
||||
/// <summary>
|
||||
/// 中央企业安全生产治本攻坚三年行动工作台账
|
||||
/// </summary>
|
||||
public const string ActionWorkLedgerMenuId = "CB76394B-BDEB-4F45-9D19-F38612DC6591";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 中央企业安全生产管理评价工作调度台账
|
||||
/// </summary>
|
||||
public const string SafetyProductionEvaluationMenuId = "C48087A8-4C9F-485D-B0A4-C85E112BA705";
|
||||
|
||||
/// <summary>
|
||||
/// 中央企业安全生产治本攻坚三年行动工作台账
|
||||
/// </summary>
|
||||
public const string ReportType_11 = "11";
|
||||
|
||||
/// <summary>
|
||||
/// 中央企业安全生产管理评价工作调度台账上报
|
||||
/// </summary>
|
||||
public const string ReportType_12 = "12";
|
||||
|
||||
/// <summary>
|
||||
/// 施工工程师(总包)
|
||||
/// </summary>
|
||||
public const string SGEngineer = "F7302DA3-B522-43F9-98CC-6317622A884E";
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ namespace BLL
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
/// <summary>
|
||||
@@ -1281,6 +1282,25 @@ namespace BLL
|
||||
IRestResponse response = client.Execute(request);
|
||||
return response.Content;
|
||||
}
|
||||
public static string GetMD5(string str)
|
||||
{
|
||||
using (MD5 md5 = MD5.Create())
|
||||
{
|
||||
// 将输入字符串转换为字节数组并计算哈希值
|
||||
byte[] inputBytes = Encoding.ASCII.GetBytes(str);
|
||||
byte[] hashBytes = md5.ComputeHash(inputBytes);
|
||||
|
||||
// 将字节数组转换为十六进制字符串
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < hashBytes.Length; i++)
|
||||
{
|
||||
sb.Append(hashBytes[i].ToString("X2"));
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/// <summary>
|
||||
/// 中央企业安全生产治本攻坚三年行动工作台账
|
||||
/// </summary>
|
||||
public const string ActionWorkLedgerMenuId = "CB76394B-BDEB-4F45-9D19-F38612DC6591";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 中央企业安全生产管理评价工作调度台账
|
||||
/// </summary>
|
||||
public const string SafetyProductionEvaluationMenuId = "C48087A8-4C9F-485D-B0A4-C85E112BA705";
|
||||
@@ -77,9 +77,13 @@ namespace BLL
|
||||
/// <param name="monthReportId">月报告主键</param>
|
||||
public static void DeleteCheckSortsByMonthReportId(string monthReportId)
|
||||
{
|
||||
var q = (from x in db.Manager_CheckSortC where x.MonthReportId == monthReportId select x).ToList();
|
||||
db.Manager_CheckSortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
var q = Funs.DB.Manager_CheckSortC.Where(x=>x.MonthReportId== monthReportId).ToList();
|
||||
if (q.Count>0)
|
||||
{
|
||||
Funs.DB.Manager_CheckSortC.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,5 +53,67 @@ namespace BLL
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
#region 施工方案审批
|
||||
public static void AddSolution_CQMSConstructSolutionApprove_Item(Model.Solution_CQMSConstructSolutionApprove_Item data)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString)) {
|
||||
Model.Solution_CQMSConstructSolutionApprove_Item newData = new Model.Solution_CQMSConstructSolutionApprove_Item
|
||||
{
|
||||
Id = data.Id,
|
||||
TypeSortId = data.TypeSortId,
|
||||
ConstructSolutionId = data.ConstructSolutionId,
|
||||
SortId = data.SortId,
|
||||
Chapter = data.Chapter,
|
||||
Amendment = data.Amendment,
|
||||
Proposer=data.Proposer,
|
||||
ProposerName=data.ProposerName,
|
||||
Modification = data.Modification,
|
||||
ReviewerOpinion = data.ReviewerOpinion,
|
||||
IsAccept = data.IsAccept,
|
||||
};
|
||||
db.Solution_CQMSConstructSolutionApprove_Item.InsertOnSubmit(newData);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
public static void UpdateSolution_CQMSConstructSolutionApprove_Item(Model.Solution_CQMSConstructSolutionApprove_Item data) {
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var result = db.Solution_CQMSConstructSolutionApprove_Item.FirstOrDefault(a => a.Id == data.Id);
|
||||
if (result != null)
|
||||
{
|
||||
result.Modification = data.Modification;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void UpdateSolution_CQMSConstructSolutionApprove_ItemNew(Model.Solution_CQMSConstructSolutionApprove_Item data)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var result = db.Solution_CQMSConstructSolutionApprove_Item.FirstOrDefault(a => a.Id == data.Id);
|
||||
if (result != null)
|
||||
{
|
||||
result.ReviewerOpinion = data.ReviewerOpinion;
|
||||
result.IsAccept = data.IsAccept;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void DeleteSolution_CQMSConstructSolutionApprove_Item(string ConstructSolutionId,string Proposer)
|
||||
{
|
||||
var q = (from x in Funs.DB.Solution_CQMSConstructSolutionApprove_Item where x.ConstructSolutionId == ConstructSolutionId
|
||||
&& x.Proposer== Proposer
|
||||
select x).ToList();
|
||||
if (q .Count>0)
|
||||
{
|
||||
Funs.DB.Solution_CQMSConstructSolutionApprove_Item.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,9 +55,12 @@ namespace BLL
|
||||
public static void DeletePersonSortsByMonthReportId(string monthReportId)
|
||||
{
|
||||
var q = (from x in db.Manager_PersonSortC where x.MonthReportId == monthReportId select x).ToList();
|
||||
if (q.Count>0)
|
||||
{
|
||||
db.Manager_PersonSortC.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报告主键删除对应的所有月报告HSE人力投入信息
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace BLL
|
||||
string newKeyID = SQLHelper.GetNewID(typeof(Model.GJSX_detail));
|
||||
Model.GJSX_detail newGJSXMX = new Model.GJSX_detail();
|
||||
|
||||
newGJSXMX.Cuid = newKeyID;
|
||||
newGJSXMX.Cuid = gjsxmx.Cuid;
|
||||
newGJSXMX.GJSXID = gjsxmx.GJSXID;
|
||||
newGJSXMX.Progress_user = gjsxmx.Progress_user;
|
||||
newGJSXMX.Progress_detail = gjsxmx.Progress_detail;
|
||||
|
||||
@@ -43,7 +43,9 @@ namespace BLL
|
||||
IsManypeople = _GJSX.IsManypeople,
|
||||
CompleteDate = _GJSX.CompleteDate,
|
||||
AttachUrl = _GJSX.AttachUrl,
|
||||
User_Acceptance = _GJSX.User_Acceptance
|
||||
User_Acceptance = _GJSX.User_Acceptance,
|
||||
|
||||
CsUsers=_GJSX.CsUsers
|
||||
};
|
||||
|
||||
db.GJSX.InsertOnSubmit(newGJSX);
|
||||
@@ -75,6 +77,7 @@ namespace BLL
|
||||
newGJSX.CompleteDate = _GJSX.CompleteDate;
|
||||
newGJSX.AttachUrl = _GJSX.AttachUrl;
|
||||
newGJSX.User_Acceptance = _GJSX.User_Acceptance;
|
||||
newGJSX.CsUsers = _GJSX.CsUsers;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,13 +251,24 @@
|
||||
/// 获取项目下拉选项
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Base_Project> GetAllProjectDropDownList()
|
||||
public static List<Model.Base_Project> GetAllProjectDropDownList(string[] pids = null)
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
var list = (from x in Funs.DB.Base_Project
|
||||
orderby x.ProjectCode descending
|
||||
select x).ToList();
|
||||
return list;
|
||||
}
|
||||
else {
|
||||
var list = (from x in Funs.DB.Base_Project
|
||||
where pids.Contains(x.ProjectId)
|
||||
orderby x.ProjectCode descending
|
||||
select x).ToList();
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -315,7 +326,7 @@
|
||||
/// 获取userId参与项目下拉框
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Base_Project> GetProjectByUserIdStateDropDownList(string userId, string state)
|
||||
public static List<Model.Base_Project> GetProjectByUserIdStateDropDownList(string userId, string state,string urlType="")
|
||||
{
|
||||
if (userId == Const.sysglyId || userId == Const.hfnbdId || userId == Const.sedinId)
|
||||
{
|
||||
@@ -329,6 +340,27 @@
|
||||
{
|
||||
/// 获取角色类型
|
||||
var getRoleP = Funs.DB.Sys_RolePower.FirstOrDefault(x => x.RoleId == getUser.RoleId && x.IsOffice == false);
|
||||
//如果是项目级别,获取到他的类型后,并且还要单位是五环的
|
||||
if (!string.IsNullOrEmpty(urlType))
|
||||
{
|
||||
//五环的能看所有项目,否则只能看项目用户中有自己或者所属单位是自己单位的
|
||||
if (getRoleP != null && getUser.UnitId== Const.UnitId_CWCEC)
|
||||
{
|
||||
return (from x in Funs.DB.Base_Project
|
||||
where x.ProjectState == state
|
||||
orderby x.ProjectCode descending
|
||||
select x).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
return (from x in Funs.DB.Base_Project
|
||||
join y in Funs.DB.Project_ProjectUser on x.ProjectId equals y.ProjectId
|
||||
where ( (y.UserId == userId && y.IsPost == true)|| x.UnitId== getUser.UnitId) && x.ProjectState == state
|
||||
orderby x.ProjectCode descending
|
||||
select x).Distinct().ToList();
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (getRoleP != null)
|
||||
{
|
||||
return (from x in Funs.DB.Base_Project
|
||||
@@ -345,6 +377,7 @@
|
||||
select x).Distinct().ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
@@ -448,11 +481,11 @@
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitProjectShortNameByStateDropDownList(FineUIPro.DropDownList dropName, string userId, string state, bool isShowPlease)
|
||||
public static void InitProjectShortNameByStateDropDownList(FineUIPro.DropDownList dropName, string userId, string state, bool isShowPlease,string urlType="")
|
||||
{
|
||||
dropName.DataValueField = "ProjectId";
|
||||
dropName.DataTextField = "ProjectName";
|
||||
var projectlist = GetProjectByUserIdStateDropDownList(userId, state);
|
||||
var projectlist = GetProjectByUserIdStateDropDownList(userId, state, urlType);
|
||||
dropName.DataSource = projectlist;
|
||||
dropName.DataBind();
|
||||
if (projectlist.Count() == 0)
|
||||
@@ -669,5 +702,27 @@
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
#region 加载公司级别项目
|
||||
public static List<Model.Base_Project> GetUnEndProjectByUserIdDropDownList(string projectState,
|
||||
string projectName = null, string projectCode = null) {
|
||||
IQueryable<Model.Base_Project> projects = (from x in Funs.DB.Base_Project
|
||||
where x.ProjectState == projectState
|
||||
orderby x.ProjectCode descending
|
||||
select x);
|
||||
if (!string.IsNullOrEmpty(projectName))
|
||||
{
|
||||
projects = from x in projects where x.ProjectName.Contains(projectName) select x;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(projectCode))
|
||||
{
|
||||
projects = from x in projects where x.ProjectCode.Contains(projectCode) select x;
|
||||
}
|
||||
return (from x in projects
|
||||
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
|
||||
select x).Distinct().ToList();
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -672,5 +672,14 @@ namespace BLL
|
||||
return (from x in Funs.DB.WBS_UnitWork where x.SuperUnitWork == superUnitWork select x).Count() > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据单位工程获取子单位工程信息
|
||||
/// </summary>
|
||||
/// <param name="supUnitWork"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.WBS_UnitWork> GetUnitWorksBySupUnitWork(string supUnitWork)
|
||||
{
|
||||
return (from x in Funs.DB.WBS_UnitWork where x.SuperUnitWork == supUnitWork select x).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -893,6 +893,27 @@
|
||||
#endregion
|
||||
|
||||
#region 中央企业环保产业企业基本情况和经营情况汇总表
|
||||
private static List<Model.reportItemListDto> getreportItemList(string BusinessReportId)
|
||||
{
|
||||
return Funs.DB.Environmental_OperationReportItem.Where(x => x.BusinessReportId == BusinessReportId)
|
||||
.OrderBy(x => x.SortIndex).OrderBy(x => x.SortUnitName).Select(x => new Model.reportItemListDto()
|
||||
{
|
||||
BusinessReportItemId = x.BusinessReportItemId,
|
||||
BusinessReportId = x.BusinessReportId,
|
||||
SortIndex = x.SortIndex,
|
||||
Code = x.Code,
|
||||
UnitLevel = x.UnitLevel,
|
||||
CreateDate = x.CreateDate,
|
||||
Place = x.Place,
|
||||
PersonNum = x.PersonNum,
|
||||
TotalAssets = x.TotalAssets,
|
||||
TotalValue = x.TotalValue,
|
||||
NewInvestment = x.NewInvestment,
|
||||
UnitName = x.UnitName,
|
||||
SortUnitName = x.SortUnitName
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
|
||||
public static string UpOperationReport(string businessReportId, Model.Sys_User CurrUser)
|
||||
{
|
||||
@@ -903,29 +924,22 @@
|
||||
{
|
||||
var upReport = from x in db.Environmental_OperationReport
|
||||
where x.BusinessReportId == businessReportId
|
||||
select new Model.OperationReportDto
|
||||
select new Model.Environmental_OperationReportDto
|
||||
{
|
||||
BusinessReportId = x.BusinessReportId,
|
||||
UnitId = x.UnitId,
|
||||
Year = x.Year,
|
||||
Quarters = x.Quarters,
|
||||
Code = x.Code,
|
||||
UnitLevel = x.UnitLevel,
|
||||
CreateDate = x.CreateDate,
|
||||
Place = x.Place,
|
||||
PersonNum = x.PersonNum,
|
||||
TotalAssets = x.TotalAssets,
|
||||
TotalValue = x.TotalValue,
|
||||
NewInvestment = x.NewInvestment,
|
||||
FillingMan = x.FillingMan,
|
||||
FillingDate = x.FillingDate,
|
||||
StatisticsDutyPerson = x.StatisticsDutyPerson,
|
||||
UnitDutyPerson = x.UnitDutyPerson,
|
||||
Remark = x.Remark
|
||||
Remark = x.Remark,
|
||||
reportItemList = getreportItemList(x.BusinessReportId)
|
||||
};
|
||||
|
||||
//新接口Api
|
||||
code = UpApiOperationReport(upReport).ToString();
|
||||
code = UpApiOperationReportNew(upReport).ToString();
|
||||
if (code == "1")
|
||||
{
|
||||
var report = db.Environmental_OperationReport.FirstOrDefault(e => e.BusinessReportId == businessReportId);
|
||||
@@ -951,6 +965,7 @@
|
||||
|
||||
}
|
||||
|
||||
#region 上报中央企业环保产业企业基本情况和经营情况季表
|
||||
private static int UpApiOperationReport(IQueryable<Model.OperationReportDto> upReport)
|
||||
{
|
||||
string baseurl = "/api/InformationData/SaveOperationReport";
|
||||
@@ -959,6 +974,16 @@
|
||||
return responeData.code;
|
||||
}
|
||||
|
||||
private static int UpApiOperationReportNew(IQueryable<Model.Environmental_OperationReportDto> upReport)
|
||||
{
|
||||
string baseurl = "/api/InformationData/SaveOperationReportNew";
|
||||
var resultJsonReport = JsonConvert.SerializeObject(upReport.FirstOrDefault());
|
||||
var responeData = BLL.ServerService.PushCNCEC(resultJsonReport, baseurl);
|
||||
return responeData.code;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -973,7 +998,7 @@
|
||||
{
|
||||
try
|
||||
{
|
||||
CNCECHSSEService.HSSEServiceClient hsseC = new CNCECHSSEService.HSSEServiceClient();
|
||||
|
||||
var upReport = from x in db.Environmental_EnergyReport
|
||||
where x.EnergyReportId == energyReportId
|
||||
select new Model.EnergyReport
|
||||
@@ -1014,6 +1039,7 @@
|
||||
ServiceOperatingIncome_BasePeriod = x.ServiceOperatingIncome_BasePeriod,
|
||||
ServiceOperatingIncome_LastYear = x.ServiceOperatingIncome_LastYear,
|
||||
ServiceOperatingIncome_ThisYear = x.ServiceOperatingIncome_ThisYear,
|
||||
SortUnit = x.SortUnit
|
||||
};
|
||||
|
||||
//老接口Serveice
|
||||
@@ -3305,6 +3331,192 @@
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 中央企业安全生产治本攻坚三年行动工作台账上报
|
||||
/// <summary>
|
||||
/// 中央企业安全生产治本攻坚三年行动工作台账上报
|
||||
/// </summary>
|
||||
public static string UpActionWorkLedger(string actionWorkLedgerId, Model.Sys_User CurrUser)
|
||||
{
|
||||
string code = "0";
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
try
|
||||
{
|
||||
CNCECHSSEService.HSSEServiceClient hsseC = new CNCECHSSEService.HSSEServiceClient();
|
||||
var upReport = from x in db.Information_ActionWorkLedger
|
||||
where x.ActionWorkLedgerId == actionWorkLedgerId
|
||||
select new Model.ActionWorkLedger
|
||||
{
|
||||
ActionWorkLedgerId = x.ActionWorkLedgerId,
|
||||
UnitId = x.UnitId,
|
||||
ReportDate = x.ReportDate,
|
||||
Quarter = x.Quarter,
|
||||
YearId = x.YearId,
|
||||
CompileMan = x.CompileMan,
|
||||
};
|
||||
|
||||
var upReportItem = from x in db.Information_ActionWorkLedgerItem
|
||||
where x.ActionWorkLedgerId == actionWorkLedgerId
|
||||
select new Model.ActionWorkLedgerItem
|
||||
{
|
||||
ActionWorkLedgerItemId = x.ActionWorkLedgerItemId,
|
||||
ActionWorkLedgerId = x.ActionWorkLedgerId,
|
||||
SortIndex = x.SortIndex,
|
||||
Focus = x.Focus,
|
||||
SpecialTask = x.SpecialTask,
|
||||
WorkPoints = x.WorkPoints,
|
||||
FillingRequirements = x.FillingRequirements,
|
||||
CompletionDeadline = x.CompletionDeadline,
|
||||
ImplementationStatus = x.ImplementationStatus,
|
||||
};
|
||||
|
||||
//var getR = hsseC.DataInsertInformation_DrillConductedQuarterlyReportTable(upReport.ToList(), upReportItem.ToList());
|
||||
//新接口Api
|
||||
code = UpApiSaveActionWorkLedger(upReport, upReportItem).ToString();
|
||||
if (code == "1")
|
||||
{
|
||||
foreach (var item in upReport.Select(p => p.ActionWorkLedgerId))
|
||||
{
|
||||
var report = db.Information_ActionWorkLedger.FirstOrDefault(e => e.ActionWorkLedgerId == item);
|
||||
if (report != null)
|
||||
{
|
||||
report.UpState = BLL.Const.UpState_3;
|
||||
db.SubmitChanges();
|
||||
////更新 当前人要处理的意见
|
||||
ProjectDataFlowSetService.CloseFlowOperate(Const.ActionWorkLedgerMenuId, item, string.Empty);
|
||||
////更新催报信息
|
||||
UrgeReportService.SetComplete(report.UnitId, Const.ReportType_11, report.YearId.ToString(), report.Quarter.ToString());
|
||||
}
|
||||
}
|
||||
LogService.AddSys_Log(CurrUser, "【中央企业安全生产治本攻坚三年行动工作台账上报】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogService.AddSys_Log(CurrUser, "【中央企业安全生产治本攻坚三年行动工作台账上报】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources);
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog("【中央企业安全生产治本攻坚三年行动工作台账上报】上传到服务器", ex);
|
||||
LogService.AddSys_Log(CurrUser, "【中央企业安全生产治本攻坚三年行动工作台账上报】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources);
|
||||
}
|
||||
|
||||
return code;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// DrillConductedQuarterlyReportApi调用
|
||||
/// </summary>
|
||||
/// <param name="upReport">主表</param>
|
||||
/// <param name="upReportItem">明细表</param>
|
||||
/// <returns></returns>
|
||||
private static int UpApiSaveActionWorkLedger(IQueryable<Model.ActionWorkLedger> upReport, IQueryable<Model.ActionWorkLedgerItem> upReportItem)
|
||||
{
|
||||
string baseurl = "/api/InformationData/SaveActionWorkLedger";
|
||||
//合并
|
||||
//var resultJson = JsonConvert.SerializeObject(new { upReport, ReportItem = upReportItem });
|
||||
var resultJson = JsonConvert.SerializeObject(upReport.FirstOrDefault());
|
||||
var resultJson1 = JsonConvert.SerializeObject(new { actionWorkLedgerItem = upReportItem });
|
||||
resultJson = "{\"InformationDataItems\":[" + (resultJson + resultJson1).Replace("}{", ",") + "]}";
|
||||
var responeData = BLL.ServerService.PushCNCEC(resultJson, baseurl);
|
||||
return responeData.code;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 中央企业安全生产管理评价工作调度台账上报
|
||||
/// <summary>
|
||||
/// 中央企业安全生产管理评价工作调度台账上报
|
||||
/// </summary>
|
||||
public static string UpSafetyProductionEvaluation(string safetyProductionEvaluationId, Model.Sys_User CurrUser)
|
||||
{
|
||||
string code = "0";
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
try
|
||||
{
|
||||
CNCECHSSEService.HSSEServiceClient hsseC = new CNCECHSSEService.HSSEServiceClient();
|
||||
var upReport = from x in db.Information_SafetyProductionEvaluation
|
||||
where x.SafetyProductionEvaluationId == safetyProductionEvaluationId
|
||||
select new Model.SafetyProductionEvaluation
|
||||
{
|
||||
SafetyProductionEvaluationId = x.SafetyProductionEvaluationId,
|
||||
UnitId = x.UnitId,
|
||||
ReportDate = x.ReportDate,
|
||||
Quarter = x.Quarter,
|
||||
YearId = x.YearId,
|
||||
CompileMan = x.CompileMan,
|
||||
};
|
||||
|
||||
var upReportItem = from x in db.Information_SafetyProductionEvaluationItem
|
||||
where x.SafetyProductionEvaluationId == safetyProductionEvaluationId
|
||||
select new Model.SafetyProductionEvaluationItem
|
||||
{
|
||||
SafetyProductionEvaluationItemId = x.SafetyProductionEvaluationItemId,
|
||||
SafetyProductionEvaluationId = x.SafetyProductionEvaluationId,
|
||||
SortIndex = x.SortIndex,
|
||||
Type = x.Type,
|
||||
EvaluateWork = x.EvaluateWork,
|
||||
EvaluationContent = x.EvaluationContent,
|
||||
FillingRequirements = x.FillingRequirements,
|
||||
CompletionDeadline = x.CompletionDeadline,
|
||||
ImplementationStatus = x.ImplementationStatus,
|
||||
};
|
||||
|
||||
//var getR = hsseC.DataInsertInformation_DrillConductedQuarterlyReportTable(upReport.ToList(), upReportItem.ToList());
|
||||
//新接口Api
|
||||
code = UpApiSaveSafetyProductionEvaluation(upReport, upReportItem).ToString();
|
||||
if (code == "1")
|
||||
{
|
||||
foreach (var item in upReport.Select(p => p.SafetyProductionEvaluationId))
|
||||
{
|
||||
var report = db.Information_SafetyProductionEvaluation.FirstOrDefault(e => e.SafetyProductionEvaluationId == item);
|
||||
if (report != null)
|
||||
{
|
||||
report.UpState = BLL.Const.UpState_3;
|
||||
db.SubmitChanges();
|
||||
////更新 当前人要处理的意见
|
||||
ProjectDataFlowSetService.CloseFlowOperate(Const.SafetyProductionEvaluationMenuId, item, string.Empty);
|
||||
////更新催报信息
|
||||
UrgeReportService.SetComplete(report.UnitId, Const.ReportType_12, report.YearId.ToString(), report.Quarter.ToString());
|
||||
}
|
||||
}
|
||||
LogService.AddSys_Log(CurrUser, "【中央企业安全生产管理评价工作调度台账上报】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogService.AddSys_Log(CurrUser, "【中央企业安全生产管理评价工作调度台账上报】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources);
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog("【中央企业安全生产管理评价工作调度台账上报】上传到服务器", ex);
|
||||
LogService.AddSys_Log(CurrUser, "【中央企业安全生产管理评价工作调度台账上报】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources);
|
||||
}
|
||||
|
||||
return code;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// DrillConductedQuarterlyReportApi调用
|
||||
/// </summary>
|
||||
/// <param name="upReport">主表</param>
|
||||
/// <param name="upReportItem">明细表</param>
|
||||
/// <returns></returns>
|
||||
private static int UpApiSaveSafetyProductionEvaluation(IQueryable<Model.SafetyProductionEvaluation> upReport, IQueryable<Model.SafetyProductionEvaluationItem> upReportItem)
|
||||
{
|
||||
string baseurl = "/api/InformationData/SaveSafetyProductionEvaluation";
|
||||
//合并
|
||||
//var resultJson = JsonConvert.SerializeObject(new { upReport, ReportItem = upReportItem });
|
||||
var resultJson = JsonConvert.SerializeObject(upReport.FirstOrDefault());
|
||||
var resultJson1 = JsonConvert.SerializeObject(new { safetyProductionEvaluationItem = upReportItem });
|
||||
resultJson = "{\"InformationDataItems\":[" + (resultJson + resultJson1).Replace("}{", ",") + "]}";
|
||||
var responeData = BLL.ServerService.PushCNCEC(resultJson, baseurl);
|
||||
return responeData.code;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -686,37 +686,68 @@ namespace BLL
|
||||
/// 获取企业负责人带班检查次数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetCompanyLeadShiftCheckNum()
|
||||
public static int GetCompanyLeadShiftCheckNum(string[] pids=null)
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
var result = (from x in Funs.DB.Supervise_SuperviseCheckReport
|
||||
where x.CheckType == "1" && x.CheckDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
var result = (from x in Funs.DB.Supervise_SuperviseCheckReport
|
||||
where x.CheckType == "1" && x.CheckDate > Const.DtmarkTime
|
||||
&& pids.Contains(x.ProjectId)
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取企业综合检查次数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetCompanyComprehensiveCheckNum()
|
||||
public static int GetCompanyComprehensiveCheckNum(string[] pids = null)
|
||||
{
|
||||
if (pids == null) {
|
||||
var result = (from x in Funs.DB.Supervise_SuperviseCheckReport
|
||||
where x.CheckType == "2" && x.CheckDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
var result = (from x in Funs.DB.Supervise_SuperviseCheckReport
|
||||
where x.CheckType == "2" && x.CheckDate > Const.DtmarkTime
|
||||
&& pids.Contains(x.ProjectId)
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取企业专项检查次数
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static int GetCompanySpecialCheckNum()
|
||||
public static int GetCompanySpecialCheckNum(string[] pids = null)
|
||||
{
|
||||
if (pids == null)
|
||||
{
|
||||
var result = (from x in Funs.DB.Supervise_SuperviseCheckReport
|
||||
where x.CheckType == "3" && x.CheckDate > Const.DtmarkTime
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
else {
|
||||
var result = (from x in Funs.DB.Supervise_SuperviseCheckReport
|
||||
where x.CheckType == "3" && x.CheckDate > Const.DtmarkTime
|
||||
&& pids.Contains(x.ProjectId)
|
||||
select x).Count();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取企业级综合预案数
|
||||
|
||||
@@ -30,21 +30,26 @@ namespace BLL
|
||||
Console.WriteLine(response.Content);
|
||||
var responeData = JsonConvert.DeserializeObject<Model.ResponeData>(response.Content.ToString());
|
||||
TokenItem tokenItem = new TokenItem();
|
||||
if (responeData.code==1&&string .IsNullOrEmpty(responeData.message) )
|
||||
if (responeData.code == 1 && string.IsNullOrEmpty(responeData.message))
|
||||
{
|
||||
var token = JsonConvert.DeserializeObject<Model.TokenItem>(responeData.data.ToString());
|
||||
tokenItem.Token=token.Token.ToString();
|
||||
tokenItem.ExpiryTime= token.ExpiryTime.ToString();
|
||||
tokenItem.Token = token.Token.ToString();
|
||||
tokenItem.ExpiryTime = token.ExpiryTime.ToString();
|
||||
SysConstSetService.SetToken(tokenItem.Token);
|
||||
SysConstSetService.SetTokenExpirationTime(tokenItem.ExpiryTime);
|
||||
}
|
||||
return tokenItem;
|
||||
|
||||
}
|
||||
public static Model.ReturnData PushCNCEC(string JsonBody,string apiurl)
|
||||
public static Model.ReturnData PushCNCEC(string JsonBody, string apiurl)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
Model.ReturnData responeData = new Model.ReturnData();
|
||||
string CNCECPath = SysConstSetService.CNCECPath;
|
||||
//string CNCECPath = "http://localhost:7143";
|
||||
if (string.IsNullOrEmpty(CNCECPath))
|
||||
{
|
||||
responeData.code = 0;
|
||||
@@ -63,14 +68,15 @@ namespace BLL
|
||||
IRestResponse response = client.Execute(request);
|
||||
APICommonService.SaveSysHttpLog("api_Out", baseurl, response.Content);
|
||||
var returnData = JsonConvert.DeserializeObject<Model.ResponeData>(response.Content.ToString());
|
||||
if (returnData.code == 0)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.code = returnData.code;
|
||||
responeData.message = returnData.message;
|
||||
return responeData;
|
||||
|
||||
}
|
||||
return responeData;
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
throw;
|
||||
}
|
||||
}
|
||||
public static Model.TokenItem GetToken()
|
||||
{
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace BLL
|
||||
{
|
||||
return (from x in Funs.DB.Environmental_EnergyReportItem
|
||||
where x.EnergyReportId == EnergyReportId
|
||||
orderby x.SortIndex
|
||||
orderby x.SortIndex,x.SortUnit
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
@@ -141,38 +141,39 @@ namespace BLL
|
||||
{
|
||||
var q = (from x in Funs.DB.Environmental_EnergyReportItem
|
||||
where x.EnergyReportId == EnergyReportId
|
||||
orderby x.SortIndex
|
||||
orderby x.SortIndex,x.SortUnit
|
||||
select x).ToList();
|
||||
List<Model.Environmental_EnergyReportItem> newItems = new List<Model.Environmental_EnergyReportItem>();
|
||||
foreach (var item in q)
|
||||
{
|
||||
Model.Environmental_EnergyReportItem newItem = new Model.Environmental_EnergyReportItem();
|
||||
//List<Model.Environmental_EnergyReportItem> newItems = new List<Model.Environmental_EnergyReportItem>();
|
||||
//foreach (var item in q)
|
||||
//{
|
||||
// Model.Environmental_EnergyReportItem newItem = new Model.Environmental_EnergyReportItem();
|
||||
|
||||
newItem.EnergyReportItemId = item.EnergyReportItemId;
|
||||
newItem.EnergyReportId = item.EnergyReportId;
|
||||
newItem.SortIndex = item.SortIndex;
|
||||
newItem.BusinessCategory = item.BusinessCategory;
|
||||
newItem.Throughput_BasePeriod = item.Throughput_BasePeriod;
|
||||
newItem.Throughput_LastPeriod = item.Throughput_LastPeriod;
|
||||
newItem.Throughput_ThisPeriod = item.Throughput_ThisPeriod;
|
||||
newItem.Throughput_UnitOfMeasurement = item.Throughput_UnitOfMeasurement;
|
||||
newItem.Yield_BasePeriod = item.Yield_BasePeriod;
|
||||
newItem.Yield_LastPeriod = item.Yield_LastPeriod;
|
||||
newItem.Yield_ThisPeriod = item.Yield_ThisPeriod;
|
||||
newItem.Yield_UnitOfMeasurement = item.Yield_UnitOfMeasurement;
|
||||
newItem.OutputValue_BasePeriod = item.OutputValue_BasePeriod;
|
||||
newItem.OutputValue_LastYear = item.OutputValue_LastYear;
|
||||
newItem.OutputValue_ThisYear = item.OutputValue_ThisYear;
|
||||
newItem.OperationScale_BasePeriod = item.OperationScale_BasePeriod;
|
||||
newItem.OperationScale_LastYear = item.OperationScale_LastYear;
|
||||
newItem.OperationScale_ThisYear = item.OperationScale_ThisYear;
|
||||
newItem.OperationScale_UnitOfMeasurement = item.OperationScale_UnitOfMeasurement;
|
||||
newItem.ServiceOperatingIncome_BasePeriod = item.ServiceOperatingIncome_BasePeriod;
|
||||
newItem.ServiceOperatingIncome_LastYear = item.ServiceOperatingIncome_LastYear;
|
||||
newItem.ServiceOperatingIncome_ThisYear = item.ServiceOperatingIncome_ThisYear;
|
||||
newItems.Add(newItem);
|
||||
}
|
||||
return newItems;
|
||||
// newItem.EnergyReportItemId = item.EnergyReportItemId;
|
||||
// newItem.EnergyReportId = item.EnergyReportId;
|
||||
// newItem.SortIndex = item.SortIndex;
|
||||
// newItem.BusinessCategory = item.BusinessCategory;
|
||||
// newItem.Throughput_BasePeriod = item.Throughput_BasePeriod;
|
||||
// newItem.Throughput_LastPeriod = item.Throughput_LastPeriod;
|
||||
// newItem.Throughput_ThisPeriod = item.Throughput_ThisPeriod;
|
||||
// newItem.Throughput_UnitOfMeasurement = item.Throughput_UnitOfMeasurement;
|
||||
// newItem.Yield_BasePeriod = item.Yield_BasePeriod;
|
||||
// newItem.Yield_LastPeriod = item.Yield_LastPeriod;
|
||||
// newItem.Yield_ThisPeriod = item.Yield_ThisPeriod;
|
||||
// newItem.Yield_UnitOfMeasurement = item.Yield_UnitOfMeasurement;
|
||||
// newItem.OutputValue_BasePeriod = item.OutputValue_BasePeriod;
|
||||
// newItem.OutputValue_LastYear = item.OutputValue_LastYear;
|
||||
// newItem.OutputValue_ThisYear = item.OutputValue_ThisYear;
|
||||
// newItem.OperationScale_BasePeriod = item.OperationScale_BasePeriod;
|
||||
// newItem.OperationScale_LastYear = item.OperationScale_LastYear;
|
||||
// newItem.OperationScale_ThisYear = item.OperationScale_ThisYear;
|
||||
// newItem.OperationScale_UnitOfMeasurement = item.OperationScale_UnitOfMeasurement;
|
||||
// newItem.ServiceOperatingIncome_BasePeriod = item.ServiceOperatingIncome_BasePeriod;
|
||||
// newItem.ServiceOperatingIncome_LastYear = item.ServiceOperatingIncome_LastYear;
|
||||
// newItem.ServiceOperatingIncome_ThisYear = item.ServiceOperatingIncome_ThisYear;
|
||||
|
||||
// newItems.Add(newItem);
|
||||
//}
|
||||
return q;
|
||||
}
|
||||
public static void AddEnvironmental_EnergyReportItem(Model.Environmental_EnergyReportItem newtable)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 中央企业安全生产治本攻坚三年行动工作台账明细表
|
||||
/// </summary>
|
||||
public static class ActionWorkLedgerItemService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取中央企业安全生产治本攻坚三年行动工作台账明细信息
|
||||
/// </summary>
|
||||
/// <param name="ActionWorkLedgerItemId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Information_ActionWorkLedgerItem GetActionWorkLedgerItemById(string ActionWorkLedgerItemId)
|
||||
{
|
||||
return Funs.DB.Information_ActionWorkLedgerItem.FirstOrDefault(e => e.ActionWorkLedgerItemId == ActionWorkLedgerItemId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据中央企业安全生产治本攻坚三年行动工作台账Id获取所有相关明细信息
|
||||
/// </summary>
|
||||
/// <param name="ActionWorkLedgerId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Information_ActionWorkLedgerItem> GetActionWorkLedgerItemList(string ActionWorkLedgerId)
|
||||
{
|
||||
return (from x in Funs.DB.Information_ActionWorkLedgerItem where x.ActionWorkLedgerId == ActionWorkLedgerId orderby x.SortIndex select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加中央企业安全生产治本攻坚三年行动工作台账明细信息
|
||||
/// </summary>
|
||||
/// <param name="ActionWorkLedgerItem"></param>
|
||||
public static void AddActionWorkLedgerItem(Model.Information_ActionWorkLedgerItem ActionWorkLedgerItem)
|
||||
{
|
||||
Model.Information_ActionWorkLedgerItem newActionWorkLedgerItem = new Model.Information_ActionWorkLedgerItem
|
||||
{
|
||||
ActionWorkLedgerItemId = ActionWorkLedgerItem.ActionWorkLedgerItemId,
|
||||
ActionWorkLedgerId = ActionWorkLedgerItem.ActionWorkLedgerId,
|
||||
Focus = ActionWorkLedgerItem.Focus,
|
||||
SpecialTask = ActionWorkLedgerItem.SpecialTask,
|
||||
WorkPoints = ActionWorkLedgerItem.WorkPoints,
|
||||
FillingRequirements = ActionWorkLedgerItem.FillingRequirements,
|
||||
CompletionDeadline = ActionWorkLedgerItem.CompletionDeadline,
|
||||
ImplementationStatus = ActionWorkLedgerItem.ImplementationStatus,
|
||||
SortIndex = ActionWorkLedgerItem.SortIndex
|
||||
};
|
||||
Funs.DB.Information_ActionWorkLedgerItem.InsertOnSubmit(newActionWorkLedgerItem);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改中央企业安全生产治本攻坚三年行动工作台账明细信息
|
||||
/// </summary>
|
||||
/// <param name="ActionWorkLedgerItem"></param>
|
||||
public static void UpdateActionWorkLedgerItem(Model.Information_ActionWorkLedgerItem ActionWorkLedgerItem)
|
||||
{
|
||||
Model.Information_ActionWorkLedgerItem newActionWorkLedgerItem = Funs.DB.Information_ActionWorkLedgerItem.FirstOrDefault(e => e.ActionWorkLedgerItemId == ActionWorkLedgerItem.ActionWorkLedgerItemId);
|
||||
if (newActionWorkLedgerItem != null)
|
||||
{
|
||||
newActionWorkLedgerItem.Focus = ActionWorkLedgerItem.Focus;
|
||||
newActionWorkLedgerItem.SpecialTask = ActionWorkLedgerItem.SpecialTask;
|
||||
newActionWorkLedgerItem.WorkPoints = ActionWorkLedgerItem.WorkPoints;
|
||||
newActionWorkLedgerItem.FillingRequirements = ActionWorkLedgerItem.FillingRequirements;
|
||||
newActionWorkLedgerItem.CompletionDeadline = ActionWorkLedgerItem.CompletionDeadline;
|
||||
newActionWorkLedgerItem.ImplementationStatus = ActionWorkLedgerItem.ImplementationStatus;
|
||||
newActionWorkLedgerItem.SortIndex = ActionWorkLedgerItem.SortIndex;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除中央企业安全生产治本攻坚三年行动工作台账明细信息
|
||||
/// </summary>
|
||||
/// <param name="ActionWorkLedgerItemId"></param>
|
||||
public static void DeleteActionWorkLedgerItemById(string ActionWorkLedgerItemId)
|
||||
{
|
||||
Model.Information_ActionWorkLedgerItem ActionWorkLedgerItem = Funs.DB.Information_ActionWorkLedgerItem.FirstOrDefault(e => e.ActionWorkLedgerItemId == ActionWorkLedgerItemId);
|
||||
if (ActionWorkLedgerItem != null)
|
||||
{
|
||||
Funs.DB.Information_ActionWorkLedgerItem.DeleteOnSubmit(ActionWorkLedgerItem);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据中央企业安全生产治本攻坚三年行动工作台账主表id删除所有相关明细信息
|
||||
/// </summary>
|
||||
/// <param name="ActionWorkLedgerId"></param>
|
||||
public static void DeleteActionWorkLedgerItemList(string ActionWorkLedgerId)
|
||||
{
|
||||
var q = (from x in Funs.DB.Information_ActionWorkLedgerItem where x.ActionWorkLedgerId == ActionWorkLedgerId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
Funs.DB.Information_ActionWorkLedgerItem.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 中央企业安全生产治本攻坚三年行动工作台账
|
||||
/// </summary>
|
||||
public static class ActionWorkLedgerService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取中央企业安全生产治本攻坚三年行动工作台账
|
||||
/// </summary>
|
||||
/// <param name="ActionWorkLedgerId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Information_ActionWorkLedger GetActionWorkLedgerById(string ActionWorkLedgerId)
|
||||
{
|
||||
return Funs.DB.Information_ActionWorkLedger.FirstOrDefault(e => e.ActionWorkLedgerId == ActionWorkLedgerId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 中央企业安全生产治本攻坚三年行动工作台账
|
||||
/// </summary>
|
||||
/// <param name="unitId">单位Id</param>
|
||||
/// <param name="year">年度</param>
|
||||
/// <param name="quarters">季度</param>
|
||||
/// <returns>中央企业安全生产治本攻坚三年行动工作台账</returns>
|
||||
public static Model.Information_ActionWorkLedger GetActionWorkLedgerByUnitIdAndYearAndQuarters(string unitId, int year, int quarters)
|
||||
{
|
||||
return Funs.DB.Information_ActionWorkLedger.FirstOrDefault(e => e.UnitId == unitId && e.Quarter == quarters && e.YearId == year);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据单位Id获取安全生产数据季报集合
|
||||
/// </summary>
|
||||
/// <param name="UnitId">单位Id</param>
|
||||
/// <returns>安全生产数据季报集合</returns>
|
||||
public static List<Model.View_Information_ActionWorkLedger> GetActionWorkLedgersByUnitId(string UnitId)
|
||||
{
|
||||
return (from x in Funs.DB.View_Information_ActionWorkLedger where x.UnitId == UnitId orderby x.ReportDate descending select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加中央企业安全生产治本攻坚三年行动工作台账
|
||||
/// </summary>
|
||||
/// <param name="ActionWorkLedger"></param>
|
||||
public static void AddActionWorkLedger(Model.Information_ActionWorkLedger ActionWorkLedger)
|
||||
{
|
||||
Model.Information_ActionWorkLedger newActionWorkLedger = new Model.Information_ActionWorkLedger
|
||||
{
|
||||
ActionWorkLedgerId = ActionWorkLedger.ActionWorkLedgerId,
|
||||
UnitId = ActionWorkLedger.UnitId,
|
||||
ReportDate = ActionWorkLedger.ReportDate,
|
||||
YearId = ActionWorkLedger.YearId,
|
||||
Quarter = ActionWorkLedger.Quarter,
|
||||
CompileMan = ActionWorkLedger.CompileMan,
|
||||
UpState = ActionWorkLedger.UpState,
|
||||
HandleState = ActionWorkLedger.HandleState,
|
||||
HandleMan = ActionWorkLedger.HandleMan
|
||||
};
|
||||
Funs.DB.Information_ActionWorkLedger.InsertOnSubmit(newActionWorkLedger);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改中央企业安全生产治本攻坚三年行动工作台账
|
||||
/// </summary>
|
||||
/// <param name="ActionWorkLedger"></param>
|
||||
public static void UpdateActionWorkLedger(Model.Information_ActionWorkLedger ActionWorkLedger)
|
||||
{
|
||||
Model.Information_ActionWorkLedger newActionWorkLedger = Funs.DB.Information_ActionWorkLedger.FirstOrDefault(e => e.ActionWorkLedgerId == ActionWorkLedger.ActionWorkLedgerId);
|
||||
if (newActionWorkLedger != null)
|
||||
{
|
||||
newActionWorkLedger.UnitId = ActionWorkLedger.UnitId;
|
||||
newActionWorkLedger.ReportDate = ActionWorkLedger.ReportDate;
|
||||
newActionWorkLedger.YearId = ActionWorkLedger.YearId;
|
||||
newActionWorkLedger.Quarter = ActionWorkLedger.Quarter;
|
||||
newActionWorkLedger.UpState = ActionWorkLedger.UpState;
|
||||
newActionWorkLedger.HandleState = ActionWorkLedger.HandleState;
|
||||
newActionWorkLedger.HandleMan = ActionWorkLedger.HandleMan;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除中央企业安全生产治本攻坚三年行动工作台账
|
||||
/// </summary>
|
||||
/// <param name="ActionWorkLedgerId"></param>
|
||||
public static void DeleteActionWorkLedgerById(string ActionWorkLedgerId)
|
||||
{
|
||||
Model.Information_ActionWorkLedger ActionWorkLedger = Funs.DB.Information_ActionWorkLedger.FirstOrDefault(e => e.ActionWorkLedgerId == ActionWorkLedgerId);
|
||||
if (ActionWorkLedger != null)
|
||||
{
|
||||
Funs.DB.Information_ActionWorkLedger.DeleteOnSubmit(ActionWorkLedger);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据单位、季度获取中央企业安全生产治本攻坚三年行动工作台账
|
||||
/// </summary>
|
||||
/// <param name="unitId"></param>
|
||||
/// <param name="quarter"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Information_ActionWorkLedger GetActionWorkLedgerByUnitIdDate(string unitId, int yearId, int quarter, string ActionWorkLedgerId)
|
||||
{
|
||||
return Funs.DB.Information_ActionWorkLedger.FirstOrDefault(e => e.UnitId == unitId && e.YearId == yearId && e.Quarter == quarter && ((ActionWorkLedgerId == null && e.ActionWorkLedgerId != null) || e.ActionWorkLedgerId != ActionWorkLedgerId));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 中央企业安全生产管理评价工作调度台账明细表
|
||||
/// </summary>
|
||||
public static class SafetyProductionEvaluationItemService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取中央企业安全生产管理评价工作调度台账明细信息
|
||||
/// </summary>
|
||||
/// <param name="SafetyProductionEvaluationItemId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Information_SafetyProductionEvaluationItem GetSafetyProductionEvaluationItemById(string SafetyProductionEvaluationItemId)
|
||||
{
|
||||
return Funs.DB.Information_SafetyProductionEvaluationItem.FirstOrDefault(e => e.SafetyProductionEvaluationItemId == SafetyProductionEvaluationItemId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据中央企业安全生产管理评价工作调度台账Id获取所有相关明细信息
|
||||
/// </summary>
|
||||
/// <param name="SafetyProductionEvaluationId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Information_SafetyProductionEvaluationItem> GetSafetyProductionEvaluationItemList(string SafetyProductionEvaluationId)
|
||||
{
|
||||
return (from x in Funs.DB.Information_SafetyProductionEvaluationItem where x.SafetyProductionEvaluationId == SafetyProductionEvaluationId orderby x.SortIndex select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加中央企业安全生产管理评价工作调度台账明细信息
|
||||
/// </summary>
|
||||
/// <param name="SafetyProductionEvaluationItem"></param>
|
||||
public static void AddSafetyProductionEvaluationItem(Model.Information_SafetyProductionEvaluationItem SafetyProductionEvaluationItem)
|
||||
{
|
||||
Model.Information_SafetyProductionEvaluationItem newSafetyProductionEvaluationItem = new Model.Information_SafetyProductionEvaluationItem
|
||||
{
|
||||
SafetyProductionEvaluationItemId = SafetyProductionEvaluationItem.SafetyProductionEvaluationItemId,
|
||||
SafetyProductionEvaluationId = SafetyProductionEvaluationItem.SafetyProductionEvaluationId,
|
||||
Type = SafetyProductionEvaluationItem.Type,
|
||||
EvaluateWork = SafetyProductionEvaluationItem.EvaluateWork,
|
||||
EvaluationContent = SafetyProductionEvaluationItem.EvaluationContent,
|
||||
FillingRequirements = SafetyProductionEvaluationItem.FillingRequirements,
|
||||
CompletionDeadline = SafetyProductionEvaluationItem.CompletionDeadline,
|
||||
ImplementationStatus = SafetyProductionEvaluationItem.ImplementationStatus,
|
||||
SortIndex = SafetyProductionEvaluationItem.SortIndex
|
||||
};
|
||||
Funs.DB.Information_SafetyProductionEvaluationItem.InsertOnSubmit(newSafetyProductionEvaluationItem);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改中央企业安全生产管理评价工作调度台账明细信息
|
||||
/// </summary>
|
||||
/// <param name="SafetyProductionEvaluationItem"></param>
|
||||
public static void UpdateSafetyProductionEvaluationItem(Model.Information_SafetyProductionEvaluationItem SafetyProductionEvaluationItem)
|
||||
{
|
||||
Model.Information_SafetyProductionEvaluationItem newSafetyProductionEvaluationItem = Funs.DB.Information_SafetyProductionEvaluationItem.FirstOrDefault(e => e.SafetyProductionEvaluationItemId == SafetyProductionEvaluationItem.SafetyProductionEvaluationItemId);
|
||||
if (newSafetyProductionEvaluationItem != null)
|
||||
{
|
||||
newSafetyProductionEvaluationItem.Type = SafetyProductionEvaluationItem.Type;
|
||||
newSafetyProductionEvaluationItem.EvaluateWork = SafetyProductionEvaluationItem.EvaluateWork;
|
||||
newSafetyProductionEvaluationItem.EvaluationContent = SafetyProductionEvaluationItem.EvaluationContent;
|
||||
newSafetyProductionEvaluationItem.FillingRequirements = SafetyProductionEvaluationItem.FillingRequirements;
|
||||
newSafetyProductionEvaluationItem.CompletionDeadline = SafetyProductionEvaluationItem.CompletionDeadline;
|
||||
newSafetyProductionEvaluationItem.ImplementationStatus = SafetyProductionEvaluationItem.ImplementationStatus;
|
||||
newSafetyProductionEvaluationItem.SortIndex = SafetyProductionEvaluationItem.SortIndex;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除中央企业安全生产管理评价工作调度台账明细信息
|
||||
/// </summary>
|
||||
/// <param name="SafetyProductionEvaluationItemId"></param>
|
||||
public static void DeleteSafetyProductionEvaluationItemById(string SafetyProductionEvaluationItemId)
|
||||
{
|
||||
Model.Information_SafetyProductionEvaluationItem SafetyProductionEvaluationItem = Funs.DB.Information_SafetyProductionEvaluationItem.FirstOrDefault(e => e.SafetyProductionEvaluationItemId == SafetyProductionEvaluationItemId);
|
||||
if (SafetyProductionEvaluationItem != null)
|
||||
{
|
||||
Funs.DB.Information_SafetyProductionEvaluationItem.DeleteOnSubmit(SafetyProductionEvaluationItem);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据中央企业安全生产管理评价工作调度台账主表id删除所有相关明细信息
|
||||
/// </summary>
|
||||
/// <param name="SafetyProductionEvaluationId"></param>
|
||||
public static void DeleteSafetyProductionEvaluationItemList(string SafetyProductionEvaluationId)
|
||||
{
|
||||
var q = (from x in Funs.DB.Information_SafetyProductionEvaluationItem where x.SafetyProductionEvaluationId == SafetyProductionEvaluationId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
Funs.DB.Information_SafetyProductionEvaluationItem.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 中央企业安全生产管理评价工作调度台账
|
||||
/// </summary>
|
||||
public static class SafetyProductionEvaluationService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取中央企业安全生产管理评价工作调度台账
|
||||
/// </summary>
|
||||
/// <param name="SafetyProductionEvaluationId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Information_SafetyProductionEvaluation GetSafetyProductionEvaluationById(string SafetyProductionEvaluationId)
|
||||
{
|
||||
return Funs.DB.Information_SafetyProductionEvaluation.FirstOrDefault(e => e.SafetyProductionEvaluationId == SafetyProductionEvaluationId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 中央企业安全生产管理评价工作调度台账
|
||||
/// </summary>
|
||||
/// <param name="unitId">单位Id</param>
|
||||
/// <param name="year">年度</param>
|
||||
/// <param name="quarters">季度</param>
|
||||
/// <returns>中央企业安全生产管理评价工作调度台账</returns>
|
||||
public static Model.Information_SafetyProductionEvaluation GetSafetyProductionEvaluationByUnitIdAndYearAndQuarters(string unitId, int year, int quarters)
|
||||
{
|
||||
return Funs.DB.Information_SafetyProductionEvaluation.FirstOrDefault(e => e.UnitId == unitId && e.Quarter == quarters && e.YearId == year);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据单位Id获取安全生产数据季报集合
|
||||
/// </summary>
|
||||
/// <param name="UnitId">单位Id</param>
|
||||
/// <returns>安全生产数据季报集合</returns>
|
||||
public static List<Model.View_Information_SafetyProductionEvaluation> GetSafetyProductionEvaluationsByUnitId(string UnitId)
|
||||
{
|
||||
return (from x in Funs.DB.View_Information_SafetyProductionEvaluation where x.UnitId == UnitId orderby x.ReportDate descending select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加中央企业安全生产管理评价工作调度台账
|
||||
/// </summary>
|
||||
/// <param name="SafetyProductionEvaluation"></param>
|
||||
public static void AddSafetyProductionEvaluation(Model.Information_SafetyProductionEvaluation SafetyProductionEvaluation)
|
||||
{
|
||||
Model.Information_SafetyProductionEvaluation newSafetyProductionEvaluation = new Model.Information_SafetyProductionEvaluation
|
||||
{
|
||||
SafetyProductionEvaluationId = SafetyProductionEvaluation.SafetyProductionEvaluationId,
|
||||
UnitId = SafetyProductionEvaluation.UnitId,
|
||||
ReportDate = SafetyProductionEvaluation.ReportDate,
|
||||
YearId = SafetyProductionEvaluation.YearId,
|
||||
Quarter = SafetyProductionEvaluation.Quarter,
|
||||
CompileMan = SafetyProductionEvaluation.CompileMan,
|
||||
UpState = SafetyProductionEvaluation.UpState,
|
||||
HandleState = SafetyProductionEvaluation.HandleState,
|
||||
HandleMan = SafetyProductionEvaluation.HandleMan
|
||||
};
|
||||
Funs.DB.Information_SafetyProductionEvaluation.InsertOnSubmit(newSafetyProductionEvaluation);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改中央企业安全生产管理评价工作调度台账
|
||||
/// </summary>
|
||||
/// <param name="SafetyProductionEvaluation"></param>
|
||||
public static void UpdateSafetyProductionEvaluation(Model.Information_SafetyProductionEvaluation SafetyProductionEvaluation)
|
||||
{
|
||||
Model.Information_SafetyProductionEvaluation newSafetyProductionEvaluation = Funs.DB.Information_SafetyProductionEvaluation.FirstOrDefault(e => e.SafetyProductionEvaluationId == SafetyProductionEvaluation.SafetyProductionEvaluationId);
|
||||
if (newSafetyProductionEvaluation != null)
|
||||
{
|
||||
newSafetyProductionEvaluation.UnitId = SafetyProductionEvaluation.UnitId;
|
||||
newSafetyProductionEvaluation.ReportDate = SafetyProductionEvaluation.ReportDate;
|
||||
newSafetyProductionEvaluation.YearId = SafetyProductionEvaluation.YearId;
|
||||
newSafetyProductionEvaluation.Quarter = SafetyProductionEvaluation.Quarter;
|
||||
newSafetyProductionEvaluation.UpState = SafetyProductionEvaluation.UpState;
|
||||
newSafetyProductionEvaluation.HandleState = SafetyProductionEvaluation.HandleState;
|
||||
newSafetyProductionEvaluation.HandleMan = SafetyProductionEvaluation.HandleMan;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除中央企业安全生产管理评价工作调度台账
|
||||
/// </summary>
|
||||
/// <param name="SafetyProductionEvaluationId"></param>
|
||||
public static void DeleteSafetyProductionEvaluationById(string SafetyProductionEvaluationId)
|
||||
{
|
||||
Model.Information_SafetyProductionEvaluation SafetyProductionEvaluation = Funs.DB.Information_SafetyProductionEvaluation.FirstOrDefault(e => e.SafetyProductionEvaluationId == SafetyProductionEvaluationId);
|
||||
if (SafetyProductionEvaluation != null)
|
||||
{
|
||||
Funs.DB.Information_SafetyProductionEvaluation.DeleteOnSubmit(SafetyProductionEvaluation);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据单位、季度获取中央企业安全生产管理评价工作调度台账
|
||||
/// </summary>
|
||||
/// <param name="unitId"></param>
|
||||
/// <param name="quarter"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Information_SafetyProductionEvaluation GetSafetyProductionEvaluationByUnitIdDate(string unitId, int yearId, int quarter, string SafetyProductionEvaluationId)
|
||||
{
|
||||
return Funs.DB.Information_SafetyProductionEvaluation.FirstOrDefault(e => e.UnitId == unitId && e.YearId == yearId && e.Quarter == quarter && ((SafetyProductionEvaluationId == null && e.SafetyProductionEvaluationId != null) || e.SafetyProductionEvaluationId != SafetyProductionEvaluationId));
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -61,4 +61,4 @@
|
||||
</wsHttpBinding>
|
||||
</bindings>
|
||||
</system.serviceModel>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration>
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
fileInfo: {
|
||||
name: '',
|
||||
ext: '',
|
||||
primary: '',
|
||||
primary: urlString,
|
||||
creator: '',
|
||||
createTime: new Date('20210505')
|
||||
},
|
||||
|
||||
@@ -0,0 +1,300 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OnlineEditingPrivate.aspx.cs" Inherits="FineUIPro.Web.AttachFile.OnlineEditingPrivate" %>
|
||||
<%@ Import Namespace="BLL" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
|
||||
<title>
|
||||
Spire.Office
|
||||
</title>
|
||||
|
||||
<style>
|
||||
html {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #fff;
|
||||
color: #333;
|
||||
font-family: Arial, Tahoma, sans-serif;
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
overflow-y: hidden;
|
||||
padding: 0;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
form {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
div {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="https://lygcgs.com.cn:8060/web/editors/spireapi/SpireCloudEditor.js"></script>
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
var docEditor;
|
||||
var fileName = "";
|
||||
var lang = "zh";
|
||||
var fileType = "";
|
||||
var token = null;
|
||||
var appid = null;
|
||||
var appkey = null;
|
||||
//console.log(Appid + "---" + appkey);
|
||||
var innerAlert = function (message) {
|
||||
if (console && console.log)
|
||||
console.log(message);
|
||||
};
|
||||
|
||||
var onReady = function () {
|
||||
innerAlert("Document editor ready");
|
||||
|
||||
};
|
||||
|
||||
var onDocumentStateChange = function (event) {
|
||||
var title = document.title.replace(/\*$/g, "");
|
||||
document.title = title + (event.data ? "*" : "");
|
||||
};
|
||||
|
||||
var onRequestEditRights = function () {
|
||||
location.href = location.href.replace(RegExp("action=view\&?", "i"), "");
|
||||
};
|
||||
|
||||
var onError = function (event) {
|
||||
if (event)
|
||||
innerAlert(event.data);
|
||||
};
|
||||
|
||||
var onOutdatedVersion = function (event) {
|
||||
location.reload(true);
|
||||
};
|
||||
|
||||
function ajax(options) {
|
||||
options = options || {};
|
||||
var method = (options.type || "GET").toUpperCase(),
|
||||
url = options.url,
|
||||
queryString = null;
|
||||
if (!url)
|
||||
return;
|
||||
if (options.data) {
|
||||
queryString = [];
|
||||
for (var attr in options.data) {
|
||||
queryString.push(attr + "=" + options.data[attr]);
|
||||
}
|
||||
queryString = queryString.join("&");
|
||||
}
|
||||
if (method === "GET" && queryString) {
|
||||
url += "?" + queryString;
|
||||
queryString = "";
|
||||
}
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open(method, url, true);
|
||||
if (method === "POST")
|
||||
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||
xhr.setRequestHeader("token", "<%=this.CurrUser.UserId%>");
|
||||
xhr.send(queryString);
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState === 4) {
|
||||
if (xhr.status === 200) {
|
||||
var data = xhr.responseText;
|
||||
if (options.dataType === "json")
|
||||
data = JSON.parse(data);
|
||||
options.success && options.success(data);
|
||||
} else {
|
||||
options.error && options.error(xhr.status);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var callbackfn = function (result) {
|
||||
console.log(result.data);
|
||||
if (result && result.data) {
|
||||
var data = result.data,
|
||||
fileName = data[0],
|
||||
url = data[1];
|
||||
if (fileName.indexOf('=') > -1)
|
||||
fileName = fileName.split('=')[1];
|
||||
var host = location.hostname;
|
||||
ajax({
|
||||
url: '<%=CallBackUrl%>',
|
||||
type: 'post',
|
||||
data: {
|
||||
'UrlStr': url,
|
||||
'PCUrl': '<%=PCUrl%>',
|
||||
},
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
success: function (json) {
|
||||
if (json.code == 1 || json.code == '1') {
|
||||
alert('保存成功');
|
||||
} else {
|
||||
this.error(json, '保存失败');
|
||||
}
|
||||
},
|
||||
error: function (json, msg) {
|
||||
alert(+msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var connectEditor = function () {
|
||||
var type = 'desktop';
|
||||
if (type == "desktop") {
|
||||
var app = navigator.appVersion;
|
||||
if (app.toLowerCase().indexOf('window') != -1) {
|
||||
type = "desktop";
|
||||
} else {
|
||||
type = "mobile";
|
||||
}
|
||||
};
|
||||
// var urlString = "https://cloud.e-iceblue.cn/demo/sample.docx";
|
||||
<%-- //var urlString = "<%=BLL.Funs.SGGLUrl%>" + "<%=PCUrl%>";--%>
|
||||
var urlString = "<%=urlString%>";
|
||||
|
||||
var arrfn = urlString.split(".");
|
||||
var strp = arrfn[arrfn.length - 1];
|
||||
var documentTypeValue = null;
|
||||
switch (strp) {
|
||||
case "xls":
|
||||
case "xlsx":
|
||||
case "xlsm":
|
||||
case "xlt":
|
||||
case "xltx":
|
||||
case "xltm":
|
||||
case "ods":
|
||||
case "fods":
|
||||
case "ots":
|
||||
case "csv":
|
||||
documentTypeValue = "spreadsheet";
|
||||
break;
|
||||
case "pps":
|
||||
case "ppsx":
|
||||
case "ppsm":
|
||||
case "ppt":
|
||||
case "pptx":
|
||||
case "pptm":
|
||||
case "pot":
|
||||
case "potx":
|
||||
case "potm":
|
||||
case "odp":
|
||||
case "fodp":
|
||||
case "otp":
|
||||
documentTypeValue = "presentation";
|
||||
break;
|
||||
default:
|
||||
documentTypeValue = "document";
|
||||
break;
|
||||
}
|
||||
|
||||
docEditor = new SpireCloudEditor.OpenApi("iframeEditor", {
|
||||
fileAttrs: {
|
||||
fileInfo: {
|
||||
name: '',
|
||||
ext: '',
|
||||
primary: '<%=urlStringMD5%>',
|
||||
creator: '',
|
||||
createTime: new Date('20210505')
|
||||
},
|
||||
sourceUrl: urlString,
|
||||
createUrl: '',
|
||||
callbackUrl: '', ////This item can be empty, but only if the 'onSave' callback function must be defined in events. If the callback function is undefined and this item is empty, Cloud Editor will not provide save function.
|
||||
verification: null, //用户文件系统下载文件时若需要验证类似token的数据可以写在这里
|
||||
canEdit: true
|
||||
},
|
||||
templates: "",
|
||||
whiteLabel: true,
|
||||
user: {
|
||||
primary: '',
|
||||
name: '<%=this.CurrUser.UserName%>',
|
||||
canSave: true,
|
||||
customization: {
|
||||
public: {
|
||||
common: {
|
||||
whiteLabel: true,
|
||||
defaultZoom: 1,
|
||||
openReviewChanges: false,
|
||||
permGroups: ['everyone'], //限制编辑分组
|
||||
viewVersion: false,
|
||||
header: {
|
||||
hideTitle: false,
|
||||
defaultView: 'full'
|
||||
}
|
||||
},
|
||||
word: null, //doc定制
|
||||
powerpoint: null, //ppt定制
|
||||
excel: null //xls定制
|
||||
},
|
||||
"private": {
|
||||
"token": null,
|
||||
"appid": null,
|
||||
"appkey": null
|
||||
}
|
||||
}
|
||||
},
|
||||
editorAttrs: { //编辑器配置
|
||||
editorWidth: '100%',
|
||||
editorHeight: '100%',
|
||||
editorMode: '<%=editorMode%>',
|
||||
editorType: 'document', //编辑器类型,可不配置,程序根据文件类型获取,结果为 document,presentation,spreadsheet
|
||||
platform: 'windows', //编辑器平台类型,可选windows, mobile, embedded
|
||||
viewLanguage: 'zh', //平台界面展示语言可选en/zh
|
||||
canChat: true, //是否可聊天
|
||||
canComment: true, //是否可批注
|
||||
canReview: true,
|
||||
canDownload: true,
|
||||
canForcesave: true,
|
||||
embedded: {
|
||||
saveUrl: '',
|
||||
embedUrl: '',
|
||||
shareUrl: ''
|
||||
},
|
||||
events: {
|
||||
'onReady': onReady,
|
||||
'onDocumentStateChange': onDocumentStateChange,
|
||||
'onError': onError,
|
||||
'onRequestEditRights': onRequestEditRights,
|
||||
'onOutdatedVersion': onOutdatedVersion,
|
||||
'onSave': callbackfn
|
||||
}
|
||||
}
|
||||
},
|
||||
appid,
|
||||
appkey
|
||||
);
|
||||
};
|
||||
if (window.addEventListener) {
|
||||
window.addEventListener("load", connectEditor);
|
||||
} else if (window.attachEvent) {
|
||||
window.attachEvent("load", connectEditor);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<form name="form1" method="post" action="./docEditor.aspx?fileID=demo+(2).docx&lang=zh" id="form1">
|
||||
<div>
|
||||
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
|
||||
value="/wEPDwUKMTkyMjc5MTU4M2RkBQQQBsVcOHQbzTlwYapiES2Trc9Z/U4CC+r9rluZubc=" />
|
||||
</div>
|
||||
<div>
|
||||
<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="C2EAC0DE" />
|
||||
</div>
|
||||
<div id="iframeEditor">
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using BLL;
|
||||
|
||||
namespace FineUIPro.Web.AttachFile
|
||||
{
|
||||
public partial class OnlineEditingPrivate : PageBase
|
||||
{
|
||||
#region 定义参数
|
||||
|
||||
public string CallBackUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
var sysSet = (from x in Funs.DB.Sys_Const where x.ConstText == "OnlineEditCallBackurl" select x).ToList().FirstOrDefault();
|
||||
if (sysSet != null)
|
||||
{
|
||||
return sysSet.ConstValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
public string ReadOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ReadOnly"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ReadOnly"] = value;
|
||||
}
|
||||
}
|
||||
public string PCUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["PCUrl"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["PCUrl"] = value;
|
||||
}
|
||||
}
|
||||
public string editorMode
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["editorMode"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["editorMode"] = value;
|
||||
}
|
||||
}
|
||||
public string urlString = String.Empty;
|
||||
public string urlStringMD5 = String.Empty;
|
||||
#endregion
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
/*UserId = Request.Params["UserId"];
|
||||
AttachFileId = Request.Params["AttachFileId"];
|
||||
ReadOnly = Request.Params["ReadOnly"];*/
|
||||
PCUrl = Request.Params["fileUrl"];
|
||||
editorMode = Request.Params["editorMode"];
|
||||
|
||||
urlString = Funs.SGGLUrl + PCUrl;
|
||||
urlStringMD5 = Funs.GetMD5(urlString);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.AttachFile
|
||||
{
|
||||
|
||||
|
||||
public partial class OnlineEditingPrivate
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -968,7 +968,17 @@ namespace FineUIPro.Web.AttachFile
|
||||
if (isSupportType)
|
||||
{
|
||||
url = url.Replace(Funs.RootPath, "");
|
||||
var sysSet4 = (from x in Funs.DB.Sys_Const where x.ConstText == "IsUseLoaclService" select x).ToList().FirstOrDefault();
|
||||
if (sysSet4!=null&& sysSet4.ConstValue=="1")
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../AttachFile/OnlineEditingPrivate.aspx?fileUrl={0}&&editorMode={1}", url, editorMode, "编辑 -")));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../AttachFile/OnlineEditing.aspx?fileUrl={0}&&editorMode={1}", url, editorMode, "编辑 -")));
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center">
|
||||
<f:TemplateField ColumnID="tfPageIndex" Width="80px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -490,7 +490,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
|
||||
Ins.TestCycle = pds.Rows[i][7].ToString().Trim();
|
||||
|
||||
Ins.IsOnSite = pds.Rows[i][8].ToString().Trim() == "是" ? true : false;
|
||||
Ins.IsVerification = pds.Rows[i][8].ToString().Trim() == "是" ? true : false;
|
||||
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][9].ToString().Trim()))
|
||||
{
|
||||
@@ -542,7 +542,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
|
||||
oldViewInfo.TestCycle = pds.Rows[i][7].ToString().Trim();
|
||||
|
||||
oldViewInfo.IsOnSite = pds.Rows[i][8].ToString().Trim() == "是" ? true : false;
|
||||
oldViewInfo.IsVerification = pds.Rows[i][8].ToString().Trim() == "是" ? true : false;
|
||||
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][9].ToString().Trim()))
|
||||
{
|
||||
|
||||
@@ -16,7 +16,8 @@ namespace FineUIPro.Web.CQMS.ManageReport
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack) {
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId);
|
||||
this.txtStartDate.Text = "2015-01-01";
|
||||
this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
@@ -104,8 +105,11 @@ namespace FineUIPro.Web.CQMS.ManageReport
|
||||
NCRStatisc.Num = i;
|
||||
NCRStatisc.WorkName = item.ProfessionalName;
|
||||
NCRStatisc.CheckNum = managementList.Count();
|
||||
NCRStatisc.OKNum = managementList.Count(x => x.Status == "3");
|
||||
NCRStatisc.NotOKNum = managementList.Count(x => x.Status != "3");
|
||||
//NCRStatisc.OKNum = managementList.Count(x => x.Status == "3");
|
||||
//NCRStatisc.NotOKNum = managementList.Count(x => x.Status != "3");
|
||||
int okNum = managementList.Where(x => x.ImplementationFrontState.Trim().Equals("已闭合")).Count();
|
||||
NCRStatisc.OKNum = okNum;
|
||||
NCRStatisc.NotOKNum = managementList.Count() - okNum;
|
||||
NCRStatisc.Remark = "";
|
||||
if (NCRStatisc.CheckNum != 0)//被除数不能为零
|
||||
{
|
||||
|
||||
@@ -916,7 +916,8 @@ namespace FineUIPro.Web.CQMS.ManageReport
|
||||
u.UnitId,
|
||||
u.UnitName,
|
||||
c.IssuedDate,
|
||||
c.Status
|
||||
c.Status,
|
||||
c.ImplementationFrontState,
|
||||
|
||||
};
|
||||
|
||||
@@ -926,8 +927,10 @@ namespace FineUIPro.Web.CQMS.ManageReport
|
||||
Model.NCRReportStatisc NCRStatisc = new Model.NCRReportStatisc();
|
||||
NCRStatisc.Num = i;
|
||||
NCRStatisc.WorkName = item.UnitName;
|
||||
NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Count(x => x.Status == "3");
|
||||
NCRStatisc.OKNum = AllList.Count(x => x.Status == "3");
|
||||
//NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Count(x => x.Status == "3");
|
||||
//NCRStatisc.OKNum = AllList.Count(x => x.Status == "3");
|
||||
NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Where(x => x.ImplementationFrontState.Trim().Equals("已闭合")).Count();
|
||||
NCRStatisc.OKNum = AllList.Where(x => x.ImplementationFrontState.Trim().Equals("已闭合")).Count();
|
||||
NCRStatisc.CheckNum = AllList.Count();
|
||||
if (NCRStatisc.CheckNum != 0)//被除数不能为零
|
||||
{
|
||||
|
||||
@@ -65,6 +65,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
#endregion
|
||||
|
||||
#region 加载所有单位
|
||||
[Serializable]
|
||||
public class UnitClass {
|
||||
public string UnitId { get; set; }
|
||||
public string UnitName { get; set; }
|
||||
@@ -72,16 +73,40 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
|
||||
public string UnitType { get; set; }
|
||||
}
|
||||
|
||||
public List<UnitClass> units = new List<UnitClass>();
|
||||
//public List<UnitClass> units = new List<UnitClass>();
|
||||
|
||||
public List<UnitClass> units
|
||||
{
|
||||
get
|
||||
{
|
||||
return (List<UnitClass>)ViewState["units"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["units"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载所有专业
|
||||
[Serializable]
|
||||
public class ProfessionalsClass {
|
||||
public string CNProfessionalId { get; set; }
|
||||
public string ProfessionalName { get; set; }
|
||||
}
|
||||
|
||||
public List<ProfessionalsClass> CNProfessionals = new List<ProfessionalsClass>();
|
||||
//public List<ProfessionalsClass> CNProfessionals = new List<ProfessionalsClass>();
|
||||
public List<ProfessionalsClass> CNProfessionals
|
||||
{
|
||||
get
|
||||
{
|
||||
return (List<ProfessionalsClass>)ViewState["CNProfessionals"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["CNProfessionals"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载页面
|
||||
|
||||
@@ -25,7 +25,18 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
if (!IsPostBack)
|
||||
{
|
||||
GetButtonPower();
|
||||
if (this.CurrUser.UserId == BLL.Const.hfnbdId)
|
||||
{
|
||||
this.drpCNProfessional.DataTextField = "DetectionItems";
|
||||
this.drpCNProfessional.DataValueField = "ControlId";
|
||||
this.drpCNProfessional.DataSource = BLL.CNProfessionalService.GetCnProList();
|
||||
this.drpCNProfessional.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpCNProfessional);
|
||||
}
|
||||
else
|
||||
{
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessional, true);//专业
|
||||
}
|
||||
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);//施工分包商
|
||||
BindGrid();
|
||||
}
|
||||
@@ -36,13 +47,16 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// </summary>
|
||||
public void BindGrid()
|
||||
{
|
||||
if (this.CurrUser.UserId==BLL.Const.hfnbdId)
|
||||
{
|
||||
|
||||
string strSql = @"SELECT P.InspectionId,
|
||||
P.ProjectId,
|
||||
P.UnitId,
|
||||
P.CNProfessionalId,
|
||||
P.UnitWorkId,
|
||||
U.UnitName,
|
||||
C.ProfessionalName,
|
||||
C.DetectionItems as ProfessionalName,
|
||||
P.NoticeCode,
|
||||
UnitWork.UnitWorkName,
|
||||
DP.DivisionName AS Branch,
|
||||
@@ -52,7 +66,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
P.AcceptanceCheckMan"
|
||||
+ @" FROM ProcessControl_InspectionManagement AS P"
|
||||
+ @" LEFT JOIN Base_Unit AS U ON U.UnitId = P.UnitId"
|
||||
+ @" LEFT JOIN Base_CNProfessional C ON C.CNProfessionalId = P.CNProfessionalId"
|
||||
+ @" LEFT JOIN Control_PointCropping C ON C.ControlId = P.CNProfessionalId"
|
||||
+ @" LEFT JOIN WBS_UnitWork AS UnitWork ON UnitWork.UnitWorkId = P.UnitWorkId"
|
||||
+ @" LEFT JOIN WBS_DivisionProject AS DP ON DP.DivisionProjectId = P.Branch"
|
||||
+ @" LEFT JOIN WBS_BreakdownProject AS BP ON BP.BreakdownProjectId = P.ControlPointType"
|
||||
@@ -87,6 +101,60 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
else
|
||||
{
|
||||
string strSql = @"SELECT P.InspectionId,
|
||||
P.ProjectId,
|
||||
P.UnitId,
|
||||
P.CNProfessionalId,
|
||||
P.UnitWorkId,
|
||||
U.UnitName,
|
||||
C.ProfessionalName as ProfessionalName,
|
||||
P.NoticeCode,
|
||||
UnitWork.UnitWorkName,
|
||||
DP.DivisionName AS Branch,
|
||||
BP.BreakdownName AS ControlPointType,
|
||||
BP.Class,
|
||||
P.AcceptanceSite,
|
||||
P.AcceptanceCheckMan"
|
||||
+ @" FROM ProcessControl_InspectionManagement AS P"
|
||||
+ @" LEFT JOIN Base_Unit AS U ON U.UnitId = P.UnitId"
|
||||
+ @" left join Base_CNProfessional c on c.CNProfessionalId = P.CNProfessionalId"
|
||||
+ @" LEFT JOIN WBS_UnitWork AS UnitWork ON UnitWork.UnitWorkId = P.UnitWorkId"
|
||||
+ @" LEFT JOIN WBS_DivisionProject AS DP ON DP.DivisionProjectId = P.Branch"
|
||||
+ @" LEFT JOIN WBS_BreakdownProject AS BP ON BP.BreakdownProjectId = P.ControlPointType"
|
||||
+ @" WHERE P.ProjectId=@ProjectId ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
if (drpUnit.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND P.UnitId=@UnitId";
|
||||
listStr.Add(new SqlParameter("@UnitId", drpUnit.SelectedValue));
|
||||
}
|
||||
if (drpCNProfessional.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND P.CNProfessionalId=@CNProfessionalId";
|
||||
listStr.Add(new SqlParameter("@CNProfessionalId", drpCNProfessional.SelectedValue));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtStarTime.Text.Trim()))
|
||||
{
|
||||
strSql += " AND P.InspectionDate >= @startTime";
|
||||
listStr.Add(new SqlParameter("@startTime", Funs.GetNewDateTime(txtStarTime.Text.Trim())));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtEndTime.Text.Trim()))
|
||||
{
|
||||
strSql += " AND P.InspectionDate <= @endTime";
|
||||
listStr.Add(new SqlParameter("@endTime", Funs.GetNewDateTime(txtEndTime.Text.Trim())));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 分页、排序
|
||||
|
||||
@@ -15,79 +15,56 @@
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnit" runat="server" Label="施工分包商" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="130px" >
|
||||
<f:DropDownList ID="drpUnit" runat="server" Label="施工分包商" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="130px">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpCNProfessionalId" runat="server" Label="专业" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="130px" ></f:DropDownList>
|
||||
<f:DropDownList ID="drpCNProfessionalId" runat="server" Label="专业" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="130px"></f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtNoticeCode" runat="server" Label="共检通知单编号" MaxLength="50" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="130px" ></f:TextBox>
|
||||
<f:TextBox runat="server" ID="txtAcceptanceSite" Label="验收部位" LabelAlign="Right" LabelWidth="130px" ></f:TextBox>
|
||||
<f:TextBox ID="txtNoticeCode" runat="server" Label="共检通知单" MaxLength="50" Required="true" ShowRedStar="true" LabelAlign="Right" LabelWidth="130px"></f:TextBox>
|
||||
<f:DropDownList ID="drpUnitWorkId" runat="server" Label="单位工程" LabelAlign="Right" LabelWidth="130px" EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="drpUnitWorkId_SelectedIndexChanged" Hidden="true"></f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<%--<f:FormRow ColumnWidths="95% 5%">
|
||||
<f:FormRow ID="fr1" runat="server" Hidden="true">
|
||||
<Items>
|
||||
<f:TextBox ID="txtUnitWork" Label="单位工程名称" runat="server" Readonly="true" LabelAlign="Right" LabelWidth="130px">
|
||||
</f:TextBox>
|
||||
<f:Button ID="btnSearch" OnClick="btnSearch_Click" ToolTip="搜索" Icon="Find" EnablePostBack="true" runat="server">
|
||||
</f:Button>
|
||||
<f:DropDownList ID="drpChirldUnitWorkId" runat="server" Label="子单位工程" LabelAlign="Right" LabelWidth="130px" EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="drpChirldUnitWorkId_SelectedIndexChanged"></f:DropDownList>
|
||||
<f:DropDownList ID="drpBranch" runat="server" Label="分部工程" LabelAlign="Right" LabelWidth="130px" EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="drpBranch_SelectedIndexChanged"></f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ID="fr2" runat="server" Hidden="true">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpChildBranch" runat="server" Label="子分部工程" LabelAlign="Right" LabelWidth="130px" EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="drpChildBranch_SelectedIndexChanged"></f:DropDownList>
|
||||
<f:DropDownList ID="drpProEngineering" runat="server" Label="分项工程" LabelAlign="Right" LabelWidth="130px" EnableEdit="true"></f:DropDownList>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="txtBranch" Label="分部" Readonly="true" LabelAlign="Right" LabelWidth="130px"></f:TextBox>
|
||||
<f:TextBox runat="server" ID="txtAcceptanceSite" Label="验收部位" LabelAlign="Right" LabelWidth="130px" Required="true" ShowRedStar="true"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="txtControlPointType" Label="控制点内容" LabelAlign="Right" LabelWidth="130px" Readonly="true"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="txtClass" Label="控制点等级" LabelAlign="Right" LabelWidth="130px" Readonly="true"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>--%>
|
||||
<f:FormRow ColumnWidths="50% 10% 30%">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpAcceptanceCheckMan" runat="server" Label="检查人" EnableCheckBoxSelect="true" LabelWidth="130px"
|
||||
EnableMultiSelect="true">
|
||||
</f:DropDownList>
|
||||
<%-- <f:TextBox runat="server" ID="txtAcceptanceCheckMan" Label="检查人" LabelAlign="Right" LabelWidth="130px" ></f:TextBox>--%>
|
||||
<f:Label ID="Label1" runat="server" Label="上传附件"
|
||||
LabelWidth="130px" LabelAlign="Right" >
|
||||
LabelWidth="130px" LabelAlign="Right">
|
||||
</f:Label>
|
||||
<f:Button ID="btnAttach" Icon="TableCell" EnablePostBack="true" Text="附件" runat="server" OnClick="btnAttach_Click" >
|
||||
<f:Button ID="btnAttach" Icon="TableCell" EnablePostBack="true" Text="附件" runat="server" OnClick="btnAttach_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Panel ID="Panel2" ShowHeader="false" ShowBorder="false" Layout="Column" CssClass="" runat="server">
|
||||
<Items>
|
||||
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="共检内容列表" EnableCollapse="false" runat="server"
|
||||
BoxFlex="1" DataKeyNames="InspectionDetailId,ControlPointType" AllowCellEditing="true" EnableColumnLines="true"
|
||||
ClicksToEdit="1" DataIDField="InspectionDetailId" OnRowCommand="Grid1_RowCommand" AllowSorting="true" ForceFit="true" SortField="CreateDate"
|
||||
EnableTextSelection="True" >
|
||||
EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar4" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
@@ -98,8 +75,7 @@
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RowNumberField Width="40px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:TemplateField ColumnID="UnitWork" Width="120px" HeaderText="单位工程名称" HeaderTextAlign="Center" TextAlign="Center"
|
||||
>
|
||||
<f:TemplateField ColumnID="UnitWork" Width="120px" HeaderText="单位工程名称" HeaderTextAlign="Center" TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label2" runat="server" Text='<%# ConvertUnitWork(Eval("UnitWorkId")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -18,11 +18,52 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
//测试阶段,仅hfnbd账号使用
|
||||
if (this.CurrUser.UserId == BLL.Const.hfnbdId)
|
||||
{
|
||||
this.drpUnitWorkId.Hidden = false;
|
||||
this.fr1.Hidden = false;
|
||||
this.fr2.Hidden = false;
|
||||
}
|
||||
GetButtonPower();
|
||||
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);//施工分包商
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);//专业
|
||||
|
||||
UserService.InitUserProjectIdUnitTypeDropDownList(this.drpAcceptanceCheckMan, this.CurrUser.LoginProjectId, string.Empty, false);
|
||||
//UserService.InitUserNameProjectIdUnitTypeDropDownList(this.drpAcceptanceCheckMan, this.CurrUser.LoginProjectId, string.Empty, false);
|
||||
if (this.CurrUser.UserId == BLL.Const.hfnbdId)//测试阶段,仅hfnbd账号使用
|
||||
{
|
||||
//专业
|
||||
this.drpCNProfessionalId.DataTextField = "DetectionItems";
|
||||
this.drpCNProfessionalId.DataValueField = "ControlId";
|
||||
this.drpCNProfessionalId.DataSource = BLL.CNProfessionalService.GetCnProList();
|
||||
this.drpCNProfessionalId.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpCNProfessionalId);
|
||||
}
|
||||
else
|
||||
{
|
||||
BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);//专业
|
||||
}
|
||||
|
||||
//单位工程
|
||||
var q = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.WBS_UnitWork on x.UnitWorkId equals y.UnitWorkId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& (y.SuperUnitWork == null || y.SuperUnitWork == "0")
|
||||
select new
|
||||
{
|
||||
y.UnitWorkId,
|
||||
UnitWorkName = y.UnitWorkCode + "-" + y.UnitWorkName
|
||||
}).Distinct().ToList();
|
||||
this.drpUnitWorkId.DataTextField = "UnitWorkName";
|
||||
this.drpUnitWorkId.DataValueField = "UnitWorkId";
|
||||
this.drpUnitWorkId.DataSource = q;
|
||||
this.drpUnitWorkId.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpUnitWorkId);//单位工程
|
||||
Funs.FineUIPleaseSelect(this.drpChirldUnitWorkId);//子单位工程
|
||||
Funs.FineUIPleaseSelect(this.drpBranch);//分部工程
|
||||
Funs.FineUIPleaseSelect(this.drpChildBranch);//子分部工程
|
||||
Funs.FineUIPleaseSelect(this.drpProEngineering);//分项工程
|
||||
|
||||
this.hdInspectionNoticeId.Text = Request.Params["inspectionId"];
|
||||
if (!string.IsNullOrEmpty(Request.Params["View"]))
|
||||
{
|
||||
@@ -46,6 +87,170 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
{
|
||||
this.drpAcceptanceCheckMan.SelectedValueArray = inspectionManagement.AcceptanceCheckMan.Split(',');
|
||||
}
|
||||
//单位工程、分部工程、分项工程
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.UnitWorkId))
|
||||
{
|
||||
this.drpUnitWorkId.SelectedValue = inspectionManagement.UnitWorkId;
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.ChildUnitWorkId))
|
||||
{
|
||||
//子单位工程
|
||||
var childUnitWorks = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.WBS_UnitWork on x.UnitWorkId equals y.UnitWorkId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& y.SuperUnitWork == inspectionManagement.UnitWorkId
|
||||
&& (y.SuperUnitWork != "0")
|
||||
select new
|
||||
{
|
||||
y.UnitWorkId,
|
||||
UnitWorkName = y.UnitWorkCode + "-" + y.UnitWorkName
|
||||
}).Distinct().ToList();
|
||||
this.drpChirldUnitWorkId.DataTextField = "UnitWorkName";
|
||||
this.drpChirldUnitWorkId.DataValueField = "UnitWorkId";
|
||||
this.drpChirldUnitWorkId.DataSource = childUnitWorks;
|
||||
this.drpChirldUnitWorkId.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpChirldUnitWorkId);
|
||||
this.drpChirldUnitWorkId.SelectedIndex = 0;
|
||||
this.drpChirldUnitWorkId.SelectedValue = inspectionManagement.ChildUnitWorkId;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.Branch))
|
||||
{
|
||||
if (string.IsNullOrEmpty(inspectionManagement.ChildUnitWorkId))//无子单位工程
|
||||
{
|
||||
//分部工程
|
||||
var a = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == inspectionManagement.UnitWorkId
|
||||
&& y.ParentId == null
|
||||
select new
|
||||
{
|
||||
y.DivisionId,
|
||||
y.BranchEngineeringName
|
||||
}).Distinct().ToList();
|
||||
this.drpBranch.DataTextField = "BranchEngineeringName";
|
||||
this.drpBranch.DataValueField = "DivisionId";
|
||||
this.drpBranch.DataSource = a;
|
||||
this.drpBranch.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpBranch);
|
||||
this.drpBranch.SelectedIndex = 0;
|
||||
this.drpBranch.SelectedValue = inspectionManagement.Branch;
|
||||
}
|
||||
else
|
||||
{
|
||||
//分部工程(有子单位工程)
|
||||
var a = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == inspectionManagement.ChildUnitWorkId
|
||||
&& y.ParentId == null
|
||||
select new
|
||||
{
|
||||
y.DivisionId,
|
||||
y.BranchEngineeringName
|
||||
}).Distinct().ToList();
|
||||
this.drpBranch.DataTextField = "BranchEngineeringName";
|
||||
this.drpBranch.DataValueField = "DivisionId";
|
||||
this.drpBranch.DataSource = a;
|
||||
this.drpBranch.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpBranch);
|
||||
this.drpBranch.SelectedIndex = 0;
|
||||
this.drpBranch.SelectedValue = inspectionManagement.Branch;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.ChildBranch))
|
||||
{
|
||||
#region 子分部工程
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.ChildUnitWorkId))
|
||||
{
|
||||
//子分部工程
|
||||
var childBranchs = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& y.ParentId == inspectionManagement.Branch
|
||||
&& x.UnitWorkId == inspectionManagement.ChildUnitWorkId
|
||||
&& y.SubBranchEngineeringName != null
|
||||
select new
|
||||
{
|
||||
y.DivisionId,
|
||||
y.SubBranchEngineeringName
|
||||
}).Distinct().ToList();
|
||||
this.drpChildBranch.DataTextField = "SubBranchEngineeringName";
|
||||
this.drpChildBranch.DataValueField = "DivisionId";
|
||||
this.drpChildBranch.DataSource = childBranchs;
|
||||
this.drpChildBranch.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpChildBranch);
|
||||
this.drpChildBranch.SelectedIndex = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
var childBranchs = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& y.ParentId == inspectionManagement.Branch
|
||||
&& x.UnitWorkId == inspectionManagement.UnitWorkId
|
||||
&& y.SubBranchEngineeringName != null
|
||||
select new
|
||||
{
|
||||
y.DivisionId,
|
||||
y.SubBranchEngineeringName
|
||||
}).Distinct().ToList();
|
||||
this.drpChildBranch.DataTextField = "SubBranchEngineeringName";
|
||||
this.drpChildBranch.DataValueField = "DivisionId";
|
||||
this.drpChildBranch.DataSource = childBranchs;
|
||||
this.drpChildBranch.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpChildBranch);
|
||||
this.drpChildBranch.SelectedIndex = 0;
|
||||
}
|
||||
this.drpChildBranch.SelectedValue = inspectionManagement.ChildBranch;
|
||||
#endregion
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(inspectionManagement.ControlPointType))
|
||||
{
|
||||
//分项工程
|
||||
var b = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == this.drpUnitWorkId.SelectedValue
|
||||
&& y.ParentId == this.drpBranch.SelectedValue
|
||||
&& y.ParentId != null
|
||||
select new
|
||||
{
|
||||
y.DivisionId,
|
||||
y.ProEngineeringName,
|
||||
y.SubBranchEngineeringName
|
||||
}).Distinct().ToList();
|
||||
if (b.Where(w => w.SubBranchEngineeringName == null).Count() > 0)
|
||||
{
|
||||
this.drpProEngineering.DataTextField = "ProEngineeringName";
|
||||
this.drpProEngineering.DataValueField = "DivisionId";
|
||||
this.drpProEngineering.DataSource = b;
|
||||
}
|
||||
else
|
||||
{
|
||||
var c = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
|
||||
join z in Funs.DB.Division_SubProjects on y.ParentId equals z.DivisionId
|
||||
join w in Funs.DB.Division_SubProjects on z.ParentId equals w.DivisionId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == this.drpUnitWorkId.SelectedValue
|
||||
&& z.ParentId == this.drpBranch.SelectedValue
|
||||
select new
|
||||
{
|
||||
y.DivisionId,
|
||||
y.ProEngineeringName
|
||||
}).Distinct().ToList();
|
||||
this.drpProEngineering.DataTextField = "ProEngineeringName";
|
||||
this.drpProEngineering.DataValueField = "DivisionId";
|
||||
this.drpProEngineering.DataSource = c;
|
||||
}
|
||||
this.drpProEngineering.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpProEngineering);
|
||||
this.drpProEngineering.SelectedIndex = 0;
|
||||
|
||||
this.drpProEngineering.SelectedValue = inspectionManagement.ControlPointType;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.txtNoticeCode.Text = inspectionManagement.NoticeCode;
|
||||
this.Grid1.DataSource = BLL.InspectionManagementDetailService.GetInspectionDetails(this.hdInspectionNoticeId.Text.Trim());
|
||||
this.Grid1.DataBind();
|
||||
@@ -58,7 +263,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
if (requestArg.StartsWith("ReloadGrid$"))
|
||||
{
|
||||
this.hdItemsString.Text = requestArg.Substring("ReloadGrid$".Length);
|
||||
Window1_Close(null,null);
|
||||
Window1_Close(null, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -72,7 +277,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpUnit.SelectedValue==BLL.Const._Null)
|
||||
if (this.drpUnit.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("请先选择施工分包商!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
@@ -112,6 +317,27 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
CheckManIds = CheckManIds.Substring(0, CheckManIds.LastIndexOf(","));
|
||||
}
|
||||
inspectionManagement.AcceptanceCheckMan = CheckManIds;
|
||||
|
||||
if (this.drpUnitWorkId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
inspectionManagement.UnitWorkId = this.drpUnitWorkId.SelectedValue;
|
||||
}
|
||||
if (this.drpChirldUnitWorkId.SelectedValue!=BLL.Const._Null)
|
||||
{
|
||||
inspectionManagement.ChildUnitWorkId = this.drpChirldUnitWorkId.SelectedValue;
|
||||
}
|
||||
if (this.drpBranch.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
inspectionManagement.Branch = this.drpBranch.SelectedValue;
|
||||
}
|
||||
if (this.drpChildBranch.SelectedValue!=BLL.Const._Null)
|
||||
{
|
||||
inspectionManagement.ChildBranch = this.drpChildBranch.SelectedValue;
|
||||
}
|
||||
if (this.drpProEngineering.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
inspectionManagement.ControlPointType = this.drpProEngineering.SelectedValue;
|
||||
}
|
||||
//inspectionManagement.AcceptanceCheckMan = this.txtAcceptanceCheckMan.Text.Trim();
|
||||
if (string.IsNullOrEmpty(Request.Params["inspectionId"]))
|
||||
{
|
||||
@@ -146,7 +372,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
{
|
||||
//编号不能重复
|
||||
var InspectionManagementModel = Funs.DB.ProcessControl_InspectionManagement.FirstOrDefault(x => x.NoticeCode == this.txtNoticeCode.Text.Trim()
|
||||
&& x.InspectionId!= Request.Params["inspectionId"]);
|
||||
&& x.InspectionId != Request.Params["inspectionId"]);
|
||||
if (InspectionManagementModel != null)
|
||||
{
|
||||
ShowNotify("共检通知单编号已存在,不能重复!", MessageBoxIcon.Warning);
|
||||
@@ -192,6 +418,12 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Grid1行内事件
|
||||
/// <summary>
|
||||
/// Grid1行内事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
|
||||
{
|
||||
string itemId = Grid1.DataKeys[e.RowIndex][0].ToString();
|
||||
@@ -210,6 +442,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
Grid1.DataBind();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 搜索
|
||||
/// <summary>
|
||||
@@ -400,5 +633,213 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
return name;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region DropDownList下拉选择事件
|
||||
/// <summary>
|
||||
/// 单位工程下拉选择事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpUnitWorkId_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.drpChirldUnitWorkId.Items.Clear();
|
||||
if (this.drpUnitWorkId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
//子单位工程
|
||||
var childUnitWorks = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.WBS_UnitWork on x.UnitWorkId equals y.UnitWorkId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& y.SuperUnitWork == this.drpUnitWorkId.SelectedValue
|
||||
&& (y.SuperUnitWork != "0")
|
||||
select new
|
||||
{
|
||||
y.UnitWorkId,
|
||||
UnitWorkName = y.UnitWorkCode + "-" + y.UnitWorkName
|
||||
}).Distinct().ToList();
|
||||
this.drpChirldUnitWorkId.DataTextField = "UnitWorkName";
|
||||
this.drpChirldUnitWorkId.DataValueField = "UnitWorkId";
|
||||
this.drpChirldUnitWorkId.DataSource = childUnitWorks;
|
||||
this.drpChirldUnitWorkId.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpChirldUnitWorkId);
|
||||
this.drpChirldUnitWorkId.SelectedIndex = 0;
|
||||
|
||||
//分部工程
|
||||
this.drpBranch.Items.Clear();
|
||||
var q = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == this.drpUnitWorkId.SelectedValue
|
||||
&& y.ParentId == null
|
||||
select new
|
||||
{
|
||||
y.DivisionId,
|
||||
y.BranchEngineeringName
|
||||
}).Distinct().ToList();
|
||||
this.drpBranch.DataTextField = "BranchEngineeringName";
|
||||
this.drpBranch.DataValueField = "DivisionId";
|
||||
this.drpBranch.DataSource = q;
|
||||
this.drpBranch.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpBranch);
|
||||
this.drpBranch.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 子单位工程下拉选择事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpChirldUnitWorkId_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpChirldUnitWorkId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
this.drpBranch.Items.Clear();
|
||||
var q = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == this.drpChirldUnitWorkId.SelectedValue
|
||||
&& y.ParentId == null
|
||||
select new
|
||||
{
|
||||
y.DivisionId,
|
||||
y.BranchEngineeringName
|
||||
}).Distinct().ToList();
|
||||
this.drpBranch.DataTextField = "BranchEngineeringName";
|
||||
this.drpBranch.DataValueField = "DivisionId";
|
||||
this.drpBranch.DataSource = q;
|
||||
this.drpBranch.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpBranch);
|
||||
this.drpBranch.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分部工程下拉选择事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpBranch_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.drpChildBranch.Items.Clear();
|
||||
if (this.drpBranch.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
#region 子分部工程
|
||||
if (this.drpChirldUnitWorkId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
//子分部工程
|
||||
var childBranchs = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& y.ParentId == this.drpBranch.SelectedValue
|
||||
&& x.UnitWorkId == this.drpChirldUnitWorkId.SelectedValue
|
||||
&& y.SubBranchEngineeringName != null
|
||||
select new
|
||||
{
|
||||
y.DivisionId,
|
||||
y.SubBranchEngineeringName
|
||||
}).Distinct().ToList();
|
||||
this.drpChildBranch.DataTextField = "SubBranchEngineeringName";
|
||||
this.drpChildBranch.DataValueField = "DivisionId";
|
||||
this.drpChildBranch.DataSource = childBranchs;
|
||||
this.drpChildBranch.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpChildBranch);
|
||||
this.drpChildBranch.SelectedIndex = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
var childBranchs = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& y.ParentId == this.drpBranch.SelectedValue
|
||||
&& x.UnitWorkId == this.drpUnitWorkId.SelectedValue
|
||||
&& y.SubBranchEngineeringName != null
|
||||
select new
|
||||
{
|
||||
y.DivisionId,
|
||||
y.SubBranchEngineeringName
|
||||
}).Distinct().ToList();
|
||||
this.drpChildBranch.DataTextField = "SubBranchEngineeringName";
|
||||
this.drpChildBranch.DataValueField = "DivisionId";
|
||||
this.drpChildBranch.DataSource = childBranchs;
|
||||
this.drpChildBranch.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpChildBranch);
|
||||
this.drpChildBranch.SelectedIndex = 0;
|
||||
}
|
||||
#endregion
|
||||
|
||||
//分项工程
|
||||
this.drpProEngineering.Items.Clear();
|
||||
var q = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == this.drpUnitWorkId.SelectedValue
|
||||
&& y.ParentId == this.drpBranch.SelectedValue
|
||||
&& y.ParentId != null
|
||||
select new
|
||||
{
|
||||
y.DivisionId,
|
||||
y.ProEngineeringName,
|
||||
y.SubBranchEngineeringName
|
||||
}).Distinct().ToList();
|
||||
if (q.Where(w => w.SubBranchEngineeringName == null).Count() > 0)
|
||||
{
|
||||
this.drpProEngineering.DataTextField = "ProEngineeringName";
|
||||
this.drpProEngineering.DataValueField = "DivisionId";
|
||||
this.drpProEngineering.DataSource = q;
|
||||
}
|
||||
else
|
||||
{
|
||||
var a = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
|
||||
join z in Funs.DB.Division_SubProjects on y.ParentId equals z.DivisionId
|
||||
join w in Funs.DB.Division_SubProjects on z.ParentId equals w.DivisionId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == this.drpUnitWorkId.SelectedValue
|
||||
&& z.ParentId == this.drpBranch.SelectedValue
|
||||
select new
|
||||
{
|
||||
y.DivisionId,
|
||||
y.ProEngineeringName
|
||||
}).Distinct().ToList();
|
||||
this.drpProEngineering.DataTextField = "ProEngineeringName";
|
||||
this.drpProEngineering.DataValueField = "DivisionId";
|
||||
this.drpProEngineering.DataSource = a;
|
||||
}
|
||||
this.drpProEngineering.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpProEngineering);
|
||||
}
|
||||
this.drpProEngineering.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 子分部工程下拉选择事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpChildBranch_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.drpProEngineering.Items.Clear();
|
||||
if (this.drpChildBranch.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
//分项工程
|
||||
var a = (from x in Funs.DB.WBS_DivisionDivide
|
||||
join y in Funs.DB.Division_SubProjects on x.DivisionId equals y.DivisionId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == this.drpUnitWorkId.SelectedValue
|
||||
&& y.ParentId == this.drpChildBranch.SelectedValue
|
||||
select new
|
||||
{
|
||||
y.DivisionId,
|
||||
y.ProEngineeringName
|
||||
}).Distinct().ToList();
|
||||
this.drpProEngineering.DataTextField = "ProEngineeringName";
|
||||
this.drpProEngineering.DataValueField = "DivisionId";
|
||||
this.drpProEngineering.DataSource = a;
|
||||
this.drpProEngineering.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpProEngineering);
|
||||
this.drpProEngineering.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+65
-13
@@ -7,12 +7,10 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
{
|
||||
namespace FineUIPro.Web.CQMS.ProcessControl {
|
||||
|
||||
|
||||
public partial class InspectionNoticeEdit
|
||||
{
|
||||
public partial class InspectionNoticeEdit {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -68,6 +66,69 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtNoticeCode;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnitWorkId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnitWorkId;
|
||||
|
||||
/// <summary>
|
||||
/// fr1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FormRow fr1;
|
||||
|
||||
/// <summary>
|
||||
/// drpChirldUnitWorkId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpChirldUnitWorkId;
|
||||
|
||||
/// <summary>
|
||||
/// drpBranch 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpBranch;
|
||||
|
||||
/// <summary>
|
||||
/// fr2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FormRow fr2;
|
||||
|
||||
/// <summary>
|
||||
/// drpChildBranch 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpChildBranch;
|
||||
|
||||
/// <summary>
|
||||
/// drpProEngineering 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpProEngineering;
|
||||
|
||||
/// <summary>
|
||||
/// txtAcceptanceSite 控件。
|
||||
/// </summary>
|
||||
@@ -104,15 +165,6 @@ namespace FineUIPro.Web.CQMS.ProcessControl
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAttach;
|
||||
|
||||
/// <summary>
|
||||
/// Panel2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel2;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -92,8 +92,8 @@
|
||||
<f:DropDownList ID="drpSolutionType" runat="server" Width="350px" Label="方案类别" LabelAlign="Right" EnableEdit="true">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpState" runat="server" Label="审批状态" LabelAlign="Right" EnableEdit="true" >
|
||||
<f:ListItem Text="已闭合" Value="1" />
|
||||
<f:ListItem Text="未闭合" Value="0" />
|
||||
<f:ListItem Text="已完成" Value="1" />
|
||||
<f:ListItem Text="未完成" Value="0" />
|
||||
</f:DropDownList>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
|
||||
@@ -108,56 +108,56 @@
|
||||
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
|
||||
<f:TemplateField ColumnID="tfPageIndex" minWidth="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField ColumnID="code" DataField="code" Width="50px"
|
||||
<f:RenderField ColumnID="code" DataField="code" minWidth="50px"
|
||||
SortField="code" FieldType="String" HeaderText="编号" TextAlign="Center"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="SolutionName" DataField="SolutionName" Width="130px"
|
||||
<f:RenderField ColumnID="SolutionName" DataField="SolutionName" minWidth="130px"
|
||||
SortField="SolutionName" FieldType="String" HeaderText="方案名称" TextAlign="Center"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField ColumnID="UnitName" DataField="UnitName" Width="160px"
|
||||
<f:RenderField ColumnID="UnitName" DataField="UnitName" minWidth="160px"
|
||||
SortField="UnitName" FieldType="String" HeaderText="施工单位" TextAlign="Center"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="UnitWorkIds" Width="120px" DataField="UnitWorkIds"
|
||||
<f:RenderField ColumnID="UnitWorkIds" minWidth="120px" DataField="UnitWorkIds"
|
||||
SortField="UnitWorkIds" FieldType="String" HeaderText="单位工程" TextAlign="Center"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="CNProfessionalCodes" DataField="CNProfessionalCodes" SortField="CNProfessionalCodes"
|
||||
<f:RenderField minWidth="120px" ColumnID="CNProfessionalCodes" DataField="CNProfessionalCodes" SortField="CNProfessionalCodes"
|
||||
FieldType="String" HeaderText="专业" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="120px" ColumnID="SolutionTempleteTypeName" DataField="SolutionTempleteTypeName" SortField="SolutionTempleteTypeName"
|
||||
<f:RenderField minWidth="120px" ColumnID="SolutionTempleteTypeName" DataField="SolutionTempleteTypeName" SortField="SolutionTempleteTypeName"
|
||||
FieldType="String" HeaderText="方案类别" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
|
||||
<f:RenderField ColumnID="CompileManName" Width="70px" DataField="CompileManName"
|
||||
<f:RenderField ColumnID="CompileManName" minWidth="70px" DataField="CompileManName"
|
||||
SortField="CompileManName" FieldType="String" HeaderText="编制人" TextAlign="Center"
|
||||
HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="100px" ColumnID="CompileDate" DataField="CompileDate" SortField="CompileDate"
|
||||
<f:RenderField minWidth="100px" ColumnID="CompileDate" DataField="CompileDate" SortField="CompileDate"
|
||||
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="编制时间" TextAlign="Center" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:TemplateField ColumnID="State" Width="60px" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center"
|
||||
<f:TemplateField ColumnID="State" minWidth="60px" HeaderText="状态" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# BLL.CQMSConstructSolutionService.ConvertState(Eval("State")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:TemplateField ColumnID="ApprovaMan" Width="60px" HeaderText="当前审批人" HeaderTextAlign="Center" TextAlign="Center"
|
||||
<f:TemplateField ColumnID="ApprovaMan" minWidth="120px" HeaderText="当前审批人" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label2" runat="server" Text='<%# BLL.CQMSConstructSolutionApproveService.GetThisApproveNameByConstructSolutionId(Eval("ConstructSolutionId")) %>'></asp:Label>
|
||||
<asp:Label ID="Label2" runat="server" Text='<%# BLL.CQMSConstructSolutionApproveService.GetThisApproveNameByConstructSolutionId(Eval("ConstructSolutionId"),Eval("State")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
</Columns>
|
||||
|
||||
@@ -128,12 +128,12 @@ namespace FineUIPro.Web.CQMS.Solution
|
||||
if (drpState.SelectedValue == "1") //已闭合
|
||||
{
|
||||
strSql += " AND State=@State";
|
||||
listStr.Add(new SqlParameter("@State", "3"));
|
||||
listStr.Add(new SqlParameter("@State", "4"));
|
||||
}
|
||||
else //未闭合
|
||||
{
|
||||
strSql += " AND State!=@State";
|
||||
listStr.Add(new SqlParameter("@State", "3"));
|
||||
listStr.Add(new SqlParameter("@State", "4"));
|
||||
}
|
||||
}
|
||||
strSql += " order by chec.code desc ";
|
||||
@@ -253,16 +253,21 @@ namespace FineUIPro.Web.CQMS.Solution
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (constructSolution.State == Const.CQMSConstructSolution_Audit || constructSolution.State == Const.CQMSConstructSolution_ReCompile)
|
||||
//一级审核、二级审批、重报
|
||||
else if (constructSolution.State == Const.CQMSConstructSolution_Audit
|
||||
|| constructSolution.State == Const.CQMSConstructSolution_Audit1
|
||||
|| constructSolution.State == Const.CQMSConstructSolution_ReCompile)
|
||||
{
|
||||
var approve = CQMSConstructSolutionApproveService.GetThisApproveByConstructSolutionId(id);
|
||||
if (approve!=null && approve.ApproveMan==this.CurrUser.UserId)
|
||||
//审批列表中是否包含当前用户
|
||||
var approve = CQMSConstructSolutionApproveService.GetThisApproveByConstructSolutionId(id, constructSolution.State);
|
||||
//if (approve!=null && approve.ApproveMan==this.CurrUser.UserId)
|
||||
if (approve.Any(x=>x.ApproveMan.IndexOf(CurrUser.UserId)>-1))
|
||||
{
|
||||
PageContext.RegisterStartupScript(window_tt.GetShowReference(String.Format("EditConstructSolution.aspx?constructSolutionId={0}", id)));
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您不是办理用户,无法操作!请右键查看", MessageBoxIcon.Warning);
|
||||
Alert.ShowInTop("您不是审核人员,无法操作!请右键查看", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
//Model.Solution_CQMSConstructSolutionApprove approve = CQMSConstructSolutionApproveService.GetConstructSolutionApproveByApproveMan(id, CurrUser.UserId);
|
||||
@@ -287,6 +292,7 @@ namespace FineUIPro.Web.CQMS.Solution
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void btnMenuView_Click(object sender, EventArgs e)
|
||||
@@ -324,7 +330,7 @@ namespace FineUIPro.Web.CQMS.Solution
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Success);
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -339,14 +345,14 @@ namespace FineUIPro.Web.CQMS.Solution
|
||||
Alert.ShowInTop("删除成功!", MessageBoxIcon.Success);
|
||||
return;
|
||||
}
|
||||
Alert.ShowInTop("删除失败,方案正在审批中!", MessageBoxIcon.Success);
|
||||
Alert.ShowInTop("删除失败,只能删除未上报的数据!", MessageBoxIcon.Warning);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Success);
|
||||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -144,6 +144,78 @@
|
||||
</f:DropDownBox>--%>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox Readonly="true" runat="server" ID="txtzyUserIds" Label="一级审核人员" LabelWidth="120px" ></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox Readonly="true" runat="server" ID="txtaqUserIds" Label="二级审批人员" LabelWidth="120px" ></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<%-- <f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox Readonly="true" runat="server" ID="txtsgUserIds" Label="总包会签施工经理" LabelWidth="160px" ></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>--%>
|
||||
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox Readonly="true" runat="server" ID="txtCsUsers" Label="抄送人员" LabelWidth="120px" ></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow ID="options1" Hidden="true">
|
||||
<Items>
|
||||
<f:Grid ID="gvOperateComplianceObligations" ShowBorder="true" ShowHeader="false" Title="" runat="server"
|
||||
AllowCellEditing="true" DataIDField="Id" DataKeyNames="Id"
|
||||
EnableMultiSelect="false" ShowGridHeader="true" Height="220px" EnableColumnLines="true">
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
|
||||
TextAlign="Center" />
|
||||
|
||||
<f:RenderField Width="250px" ColumnID="Chapter" DataField="Chapter" FieldType="String"
|
||||
HeaderText="章节" HeaderTextAlign="Center" TextAlign="Left">
|
||||
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="250px" ColumnID="Amendment" DataField="Amendment" FieldType="String"
|
||||
HeaderText="修改意见" HeaderTextAlign="Center" TextAlign="Left">
|
||||
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="100px" ColumnID="ProposerName" DataField="ProposerName" FieldType="String"
|
||||
HeaderText="提出人" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="250px" ColumnID="Modification" DataField="Modification" FieldType="String"
|
||||
HeaderText="修改情况" HeaderTextAlign="Center" TextAlign="Left">
|
||||
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="250px" ColumnID="ReviewerOpinion" DataField="ReviewerOpinion" FieldType="String"
|
||||
HeaderText="审核人意见" HeaderTextAlign="Center" TextAlign="Left">
|
||||
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="250px" ColumnID="IsAccept" DataField="IsAccept" FieldType="String"
|
||||
HeaderText="是否接受" HeaderTextAlign="Center" TextAlign="Left">
|
||||
|
||||
</f:RenderField>
|
||||
|
||||
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
|
||||
<%-- <f:TextArea ID="txtOptions" ShowRedStar="true" Required="true" runat="server" Label="办理意见" MaxLength="3000">
|
||||
</f:TextArea>--%>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
|
||||
<f:FormRow runat="server">
|
||||
<Items>
|
||||
<f:TabStrip ID="TabStrip1" IsFluid="true" Height="500px" ShowBorder="true" TabPosition="Top"
|
||||
@@ -188,7 +260,7 @@
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow>
|
||||
<f:FormRow Hidden="true">
|
||||
<Items>
|
||||
<f:Panel ID="Panel2" IsFluid="true" CssClass="mytable blockpanel" runat="server" ShowBorder="true"
|
||||
Layout="Table" TableConfigColumns="3" ShowHeader="true" Title="总包会签">
|
||||
@@ -278,7 +350,7 @@
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:BoundField Width="100px" DataField="ApproveDate" HeaderTextAlign="Center" TextAlign="Center" DataFormatString="{0:yyyy-MM-dd}" HeaderText="办理时间" />
|
||||
<f:BoundField Width="180px" DataField="ApproveIdea" HeaderTextAlign="Center" TextAlign="Center" HeaderText="办理意见" />
|
||||
<%--<f:BoundField Width="180px" DataField="ApproveIdea" HeaderTextAlign="Center" TextAlign="Center" HeaderText="办理意见" />--%>
|
||||
<f:LinkButtonField HeaderText="附件" ColumnID="download" Width="60px" Icon="ArrowDown" CommandName="download" />
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
|
||||
@@ -29,12 +29,35 @@ namespace FineUIPro.Web.CQMS.Solution
|
||||
String.Format("../../AttachFile/webuploader.aspx?type={0}&toKeyId={1}&path=FileUpload/Solution&menuId={2}",
|
||||
-1, ConstructSolutionId, Const.CQMSConstructSolutionMenuId)));
|
||||
}
|
||||
private string GetUserNames(string Ids)
|
||||
{
|
||||
string[] arr = Ids.Split(',');
|
||||
var data = Funs.DB.Sys_User.Where(t => arr.Contains(t.UserId)).Select(t => t.UserName).ToList();
|
||||
if (data.Count > 0)
|
||||
return string.Join(",", data);
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
|
||||
ConstructSolutionId = Request.Params["constructSolutionId"];
|
||||
if (Funs.DB.Solution_CQMSConstructSolutionApprove_Item.Where(x => x.ConstructSolutionId == ConstructSolutionId).OrderBy(x => x.SortId).ToList().Count > 0)
|
||||
{
|
||||
//有重报的情况,显示options1
|
||||
options1.Hidden = false;
|
||||
var complianceObligationsCs = Funs.DB.Solution_CQMSConstructSolutionApprove_Item.Where(x => x.ConstructSolutionId == ConstructSolutionId)
|
||||
.OrderBy(x => x.Proposer).OrderBy(x => x.SortId).ToList();
|
||||
if (complianceObligationsCs.Count > 0)
|
||||
{
|
||||
gvOperateComplianceObligations.DataSource = complianceObligationsCs;
|
||||
gvOperateComplianceObligations.DataBind();
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(ConstructSolutionId))
|
||||
{
|
||||
txtProjectName.Text = ProjectService.GetProjectByProjectId(CurrUser.LoginProjectId).ProjectName;
|
||||
@@ -79,21 +102,49 @@ namespace FineUIPro.Web.CQMS.Solution
|
||||
BindKZRole();
|
||||
BindSGRole();
|
||||
BindXMRole();
|
||||
var zyUserIds = CQMSConstructSolutionApproveService.GetUserIdsApprovesBySignType(ConstructSolutionId, "ZY");
|
||||
var zyUserIds = CQMSConstructSolutionApproveService.GetUserIdsApprovesBySignType(ConstructSolutionId, "Yi");
|
||||
if (zyUserIds.Count > 0)
|
||||
{
|
||||
var zyUserIdsStr = string.Join(",", zyUserIds);
|
||||
txtzyUserIds.Text = GetUserNames(zyUserIdsStr);
|
||||
|
||||
SetCheck(trOne, zyUserIds);
|
||||
}
|
||||
var zlUserIds = CQMSConstructSolutionApproveService.GetUserIdsApprovesBySignType(ConstructSolutionId, "ZL");
|
||||
if (zlUserIds.Count > 0)
|
||||
else {
|
||||
zyUserIds =
|
||||
CQMSConstructSolutionApproveService.GetUserIdsApprovesBySignTypeNew(ConstructSolutionId, "Yi");
|
||||
if (zyUserIds.Count > 0)
|
||||
{
|
||||
SetCheck(trTwo, zlUserIds);
|
||||
var zyUserIdsStr = string.Join(",", zyUserIds);
|
||||
txtzyUserIds.Text = GetUserNames(zyUserIdsStr);
|
||||
|
||||
SetCheck(trOne, zyUserIds);
|
||||
}
|
||||
var aqUserIds = CQMSConstructSolutionApproveService.GetUserIdsApprovesBySignType(ConstructSolutionId, "AQ");
|
||||
}
|
||||
//var zlUserIds = CQMSConstructSolutionApproveService.GetUserIdsApprovesBySignType(ConstructSolutionId, "Er");
|
||||
//if (zlUserIds.Count > 0)
|
||||
//{
|
||||
// SetCheck(trTwo, zlUserIds);
|
||||
//}
|
||||
var aqUserIds = CQMSConstructSolutionApproveService.GetUserIdsApprovesBySignType(ConstructSolutionId, "Er");
|
||||
if (aqUserIds.Count > 0)
|
||||
{
|
||||
var zyUserIdsStr = string.Join(",", aqUserIds);
|
||||
txtaqUserIds.Text = GetUserNames(zyUserIdsStr);
|
||||
|
||||
SetCheck(trThree, aqUserIds);
|
||||
}
|
||||
else {
|
||||
aqUserIds =
|
||||
CQMSConstructSolutionApproveService.GetUserIdsApprovesBySignTypeNew(ConstructSolutionId, "Er");
|
||||
if (aqUserIds.Count > 0)
|
||||
{
|
||||
var zyUserIdsStr = string.Join(",", aqUserIds);
|
||||
txtaqUserIds.Text = GetUserNames(zyUserIdsStr);
|
||||
|
||||
SetCheck(trThree, aqUserIds);
|
||||
}
|
||||
}
|
||||
var kzUserIds = CQMSConstructSolutionApproveService.GetUserIdsApprovesBySignType(ConstructSolutionId, "KZ");
|
||||
if (kzUserIds.Count > 0)
|
||||
{
|
||||
@@ -102,6 +153,9 @@ namespace FineUIPro.Web.CQMS.Solution
|
||||
var sgUserIds = CQMSConstructSolutionApproveService.GetUserIdsApprovesBySignType(ConstructSolutionId, "SG");
|
||||
if (sgUserIds.Count > 0)
|
||||
{
|
||||
var zyUserIdsStr = string.Join(",", sgUserIds);
|
||||
//txtsgUserIds.Text = GetUserNames(zyUserIdsStr);
|
||||
|
||||
SetCheck(trFive, sgUserIds);
|
||||
}
|
||||
var xmUserIds = CQMSConstructSolutionApproveService.GetUserIdsApprovesBySignType(ConstructSolutionId, "XM");
|
||||
@@ -118,6 +172,10 @@ namespace FineUIPro.Web.CQMS.Solution
|
||||
BLL.CQMSConstructSolutionApproveService.UpdateConstructSolutionApprove(approve);
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(constructSolution.CsUsers))
|
||||
{
|
||||
txtCsUsers.Text= GetUserNames(constructSolution.CsUsers);
|
||||
}
|
||||
|
||||
AddAttachTab();
|
||||
}
|
||||
|
||||
@@ -149,6 +149,51 @@ namespace FineUIPro.Web.CQMS.Solution
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtUnitWork;
|
||||
|
||||
/// <summary>
|
||||
/// txtzyUserIds 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtzyUserIds;
|
||||
|
||||
/// <summary>
|
||||
/// txtaqUserIds 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtaqUserIds;
|
||||
|
||||
/// <summary>
|
||||
/// txtCsUsers 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCsUsers;
|
||||
|
||||
/// <summary>
|
||||
/// options1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FormRow options1;
|
||||
|
||||
/// <summary>
|
||||
/// gvOperateComplianceObligations 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid gvOperateComplianceObligations;
|
||||
|
||||
/// <summary>
|
||||
/// TabStrip1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -111,6 +111,247 @@
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownBox runat="server" ID="drpzyUserIds" MultiSelectSeparator="," AutoPostBack="true" LabelWidth="120px"
|
||||
Label="一级审核人员" Required="true" ShowRedStar="true" EmptyText="请从下拉表格中选择" EnableMultiSelect="true" MatchFieldWidth="false">
|
||||
<PopPanel>
|
||||
<f:Grid ID="Grid1" Width="800px" Height="300px" Hidden="true"
|
||||
DataIDField="UserId" DataTextField="UserName" EnableMultiSelect="true" KeepCurrentSelection="true"
|
||||
PageSize="100" ShowBorder="true" ShowHeader="false"
|
||||
AllowPaging="true" IsDatabasePaging="true" runat="server" EnableCheckBoxSelect="true"
|
||||
DataKeyNames="UserId" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
AllowSorting="true" SortField="UserName" SortDirection="ASC"
|
||||
OnSort="Grid1_Sort">
|
||||
<Columns>
|
||||
<f:RowNumberField />
|
||||
<f:BoundField Width="200px" DataField="UserName" SortField="UserName" DataFormatString="{0}"
|
||||
HeaderText="姓名" />
|
||||
</Columns>
|
||||
<Toolbars>
|
||||
<f:Toolbar runat="server" Position="Top">
|
||||
<Items>
|
||||
<f:TwinTriggerBox Width="300px" runat="server" EmptyText="在姓名中查找" ShowLabel="false" ID="ttbSearch1"
|
||||
ShowTrigger1="false" OnTrigger1Click="ttbSearch_Trigger1Click1" OnTrigger2Click="ttbSearch_Trigger2Click1"
|
||||
Trigger1Icon="Clear" Trigger2Icon="Search">
|
||||
</f:TwinTriggerBox>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Grid>
|
||||
</PopPanel>
|
||||
</f:DropDownBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label runat="server" Text="一级审核人员必须选择施工工程师和HSE工程师" LabelWidth="120px" CssStyle="color:red"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownBox runat="server" ID="drpaqUserIds" MultiSelectSeparator="," AutoPostBack="true" LabelWidth="120px"
|
||||
Label="二级审批人员" Required="true" ShowRedStar="true" EmptyText="请从下拉表格中选择" EnableMultiSelect="true" MatchFieldWidth="false">
|
||||
<PopPanel>
|
||||
<f:Grid ID="Grid2" Width="800px" Height="300px" Hidden="true"
|
||||
DataIDField="UserId" DataTextField="UserName" EnableMultiSelect="true" KeepCurrentSelection="true"
|
||||
PageSize="100" ShowBorder="true" ShowHeader="false"
|
||||
AllowPaging="true" IsDatabasePaging="true" runat="server" EnableCheckBoxSelect="true"
|
||||
DataKeyNames="UserId" OnPageIndexChange="Grid2_PageIndexChange"
|
||||
AllowSorting="true" SortField="UserName" SortDirection="ASC"
|
||||
OnSort="Grid2_Sort">
|
||||
<Columns>
|
||||
<f:RowNumberField />
|
||||
<f:BoundField Width="200px" DataField="UserName" SortField="UserName" DataFormatString="{0}"
|
||||
HeaderText="姓名" />
|
||||
</Columns>
|
||||
<Toolbars>
|
||||
<f:Toolbar runat="server" Position="Top">
|
||||
<Items>
|
||||
<f:TwinTriggerBox Width="300px" runat="server" EmptyText="在姓名中查找" ShowLabel="false" ID="ttbSearch2"
|
||||
ShowTrigger1="false" OnTrigger1Click="ttbSearch_Trigger1Click2" OnTrigger2Click="ttbSearch_Trigger2Click2"
|
||||
Trigger1Icon="Clear" Trigger2Icon="Search">
|
||||
</f:TwinTriggerBox>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Grid>
|
||||
</PopPanel>
|
||||
</f:DropDownBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label runat="server" Text="二级审批人员必须选择施工经理、HSE经理、质量经理" LabelWidth="120px" CssStyle="color:red"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<%-- <f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownBox runat="server" ID="drpsgUserIds" MultiSelectSeparator="," AutoPostBack="true" LabelWidth="160px"
|
||||
Label="总包会签施工经理" Required="true" ShowRedStar="true" EmptyText="请从下拉表格中选择" EnableMultiSelect="true" MatchFieldWidth="false">
|
||||
<PopPanel>
|
||||
<f:Grid ID="Grid3" Width="800px" Height="300px" Hidden="true"
|
||||
DataIDField="UserId" DataTextField="UserName" EnableMultiSelect="true" KeepCurrentSelection="true"
|
||||
PageSize="100" ShowBorder="true" ShowHeader="false"
|
||||
AllowPaging="true" IsDatabasePaging="true" runat="server" EnableCheckBoxSelect="true"
|
||||
DataKeyNames="UserId" OnPageIndexChange="Grid3_PageIndexChange"
|
||||
AllowSorting="true" SortField="UserName" SortDirection="ASC"
|
||||
OnSort="Grid3_Sort">
|
||||
<Columns>
|
||||
<f:RowNumberField />
|
||||
<f:BoundField Width="200px" DataField="UserName" SortField="UserName" DataFormatString="{0}"
|
||||
HeaderText="姓名" />
|
||||
</Columns>
|
||||
<Toolbars>
|
||||
<f:Toolbar runat="server" Position="Top">
|
||||
<Items>
|
||||
<f:TwinTriggerBox Width="300px" runat="server" EmptyText="在姓名中查找" ShowLabel="false" ID="ttbSearch3"
|
||||
ShowTrigger1="false" OnTrigger1Click="ttbSearch_Trigger1Click3" OnTrigger2Click="ttbSearch_Trigger2Click3"
|
||||
Trigger1Icon="Clear" Trigger2Icon="Search">
|
||||
</f:TwinTriggerBox>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Grid>
|
||||
</PopPanel>
|
||||
</f:DropDownBox>
|
||||
</Items>
|
||||
</f:FormRow>--%>
|
||||
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownBox runat="server" ID="drpCsUsers" MultiSelectSeparator="," AutoPostBack="true" LabelWidth="120px"
|
||||
Label="抄送人员" EmptyText="请从下拉表格中选择" EnableMultiSelect="true" MatchFieldWidth="false">
|
||||
<PopPanel>
|
||||
<f:Grid ID="Grid4" Width="800px" Height="300px" Hidden="true"
|
||||
DataIDField="UserId" DataTextField="UserName" EnableMultiSelect="true" KeepCurrentSelection="true"
|
||||
PageSize="100" ShowBorder="true" ShowHeader="false"
|
||||
AllowPaging="true" IsDatabasePaging="true" runat="server" EnableCheckBoxSelect="true"
|
||||
DataKeyNames="UserId" OnPageIndexChange="Grid4_PageIndexChange"
|
||||
AllowSorting="true" SortField="UserName" SortDirection="ASC"
|
||||
OnSort="Grid4_Sort">
|
||||
<Columns>
|
||||
<f:RowNumberField />
|
||||
<f:BoundField Width="200px" DataField="UserName" SortField="UserName" DataFormatString="{0}"
|
||||
HeaderText="姓名" />
|
||||
</Columns>
|
||||
<Toolbars>
|
||||
<f:Toolbar runat="server" Position="Top">
|
||||
<Items>
|
||||
<f:TwinTriggerBox Width="300px" runat="server" EmptyText="在姓名中查找" ShowLabel="false" ID="ttbSearch4"
|
||||
ShowTrigger1="false" OnTrigger1Click="ttbSearch_Trigger1Click4" OnTrigger2Click="ttbSearch_Trigger2Click4"
|
||||
Trigger1Icon="Clear" Trigger2Icon="Search">
|
||||
</f:TwinTriggerBox>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Grid>
|
||||
</PopPanel>
|
||||
</f:DropDownBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow ID="agree">
|
||||
<Items>
|
||||
<f:RadioButtonList runat="server" ID="rblIsAgree" Label="是否同意" ShowRedStar="true" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="radChange">
|
||||
<f:RadioItem Text="同意" Value="true" Selected="true" />
|
||||
<f:RadioItem Text="不同意" Value="false" />
|
||||
</f:RadioButtonList>
|
||||
<f:Label runat="server" CssStyle="display:none"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow ID="options" Hidden="true">
|
||||
<Items>
|
||||
<f:Button ID="btnNew" Text="新增" ToolTip="新增" Icon="Add" runat="server" OnClick="btnNew_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ID="options1" Hidden="true">
|
||||
<Items>
|
||||
<f:Grid ID="gvOperateComplianceObligations" ShowBorder="true" ShowHeader="false" Title="" runat="server"
|
||||
AllowCellEditing="true" ClicksToEdit="1" DataIDField="Id" DataKeyNames="Id"
|
||||
EnableMultiSelect="false" ShowGridHeader="true" Height="220px" EnableColumnLines="true"
|
||||
OnRowCommand="gvOperateComplianceObligations_RowCommand">
|
||||
<Columns>
|
||||
<f:LinkButtonField Width="40px" ConfirmText="删除选中行?" ConfirmTarget="Parent" CommandName="Delete"
|
||||
ToolTip="删除" Icon="Delete" TextAlign="Center" />
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center"
|
||||
TextAlign="Center" />
|
||||
|
||||
<f:RenderField Width="150px" ColumnID="Chapter" DataField="Chapter" FieldType="String"
|
||||
HeaderText="章节" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<Editor>
|
||||
<f:TextBox runat="server" ID="TextBox7">
|
||||
</f:TextBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="250px" ColumnID="Amendment" DataField="Amendment" FieldType="String"
|
||||
HeaderText="修改意见" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<Editor>
|
||||
<f:TextBox runat="server" ID="TextBox1">
|
||||
</f:TextBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="100px" ColumnID="ProposerName" DataField="ProposerName" FieldType="String"
|
||||
HeaderText="提出人" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="250px" ColumnID="Modification" DataField="Modification" FieldType="String"
|
||||
HeaderText="修改情况" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<Editor>
|
||||
<f:TextBox runat="server" ID="TextBox2">
|
||||
</f:TextBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="250px" ColumnID="ReviewerOpinion" DataField="ReviewerOpinion" FieldType="String"
|
||||
HeaderText="审核人意见" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<Editor>
|
||||
<f:TextBox runat="server" ID="TextBox3">
|
||||
</f:TextBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="150px" ColumnID="IsAccept" DataField="IsAccept" FieldType="String"
|
||||
HeaderText="是否接受" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<Editor>
|
||||
<f:DropDownList runat="server" ID="drpIsAccept">
|
||||
<f:ListItem Value="接受AE" Text="接受AE" Selected="true"/>
|
||||
<f:ListItem Value="带意见接受AC" Text="带意见接受AC"/>
|
||||
<f:ListItem Value="拒绝AJ" Text="拒绝AJ"/>
|
||||
</f:DropDownList>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
|
||||
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
|
||||
<%-- <f:TextArea ID="txtOptions" ShowRedStar="true" Required="true" runat="server" Label="办理意见" MaxLength="3000">
|
||||
</f:TextArea>--%>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ID="optio">
|
||||
|
||||
<Items>
|
||||
<f:Panel ShowHeader="false" ShowBorder="false" Layout="Column" runat="server">
|
||||
<Items>
|
||||
<f:Label runat="server" Text="附件:" ShowRedStar="true" CssStyle="padding-left:53px" Width="100px" CssClass="marginr" ShowLabel="false"></f:Label>
|
||||
<f:Button ID="btnapprove" Text="附件" ToolTip="上传及查看" Icon="TableCell" OnClick="btnapprove_Click" runat="server">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
<f:FormRow runat="server">
|
||||
<Items>
|
||||
<f:TabStrip ID="TabStrip1" IsFluid="true" Height="500px" ShowBorder="true" TabPosition="Top"
|
||||
@@ -133,6 +374,8 @@
|
||||
</f:TabStrip>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
|
||||
<%-- <f:FormRow Hidden="True">
|
||||
<Items>
|
||||
<f:Panel ShowHeader="false" ShowBorder="false" Layout="Column" runat="server">
|
||||
@@ -149,102 +392,14 @@
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow runat="server">
|
||||
<%--<f:FormRow runat="server">
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="txtCopyMan" Label="总包会签人员" Readonly="True" Enabled="False"/>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Panel ID="Panel2" IsFluid="true" CssClass="mytable blockpanel" runat="server" AutoScroll="true" ShowBorder="true"
|
||||
Layout="Table" TableConfigColumns="3" ShowHeader="true" Title="总包会签">
|
||||
<Items>
|
||||
<f:Panel ID="Panel1" Title="Panel1" Width="200px"
|
||||
TableRowspan="5" runat="server" BodyPadding="10px" ShowBorder="false" ShowHeader="false" Height="200px">
|
||||
<Items>
|
||||
<f:Tree runat="server" ID="trOne" ShowHeader="false" AutoScroll="true" ShowBorder="false" OnNodeCheck="trOne_NodeCheck" EnableArrows="true">
|
||||
</f:Tree>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<%--<f:Panel ID="Panel3" Title="Panel1" Width="200px" AutoScroll="true" Height="200px"
|
||||
TableRowspan="5" runat="server" BodyPadding="10px" ShowBorder="false" ShowHeader="false" Hidden="True">
|
||||
<Items>
|
||||
<f:Tree runat="server" ID="trTwo" ShowHeader="false" ShowBorder="false" OnNodeCheck="trTwo_NodeCheck">
|
||||
<Nodes>
|
||||
</Nodes>
|
||||
</f:Tree>
|
||||
</Items>
|
||||
</f:Panel>--%>
|
||||
<f:Panel ID="Panel4" Title="Panel1" Width="200px" AutoScroll="true" Height="200px"
|
||||
TableRowspan="5" runat="server" BodyPadding="10px" ShowBorder="false" ShowHeader="false">
|
||||
<Items>
|
||||
<f:Tree runat="server" ID="trThree" ShowHeader="false" ShowBorder="false" OnNodeCheck="trThree_NodeCheck">
|
||||
<Nodes>
|
||||
</Nodes>
|
||||
</f:Tree>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<%--<f:Panel ID="Panel5" Title="Panel1" Width="200px" AutoScroll="true" Height="200px" Hidden="True"
|
||||
TableRowspan="5" runat="server" BodyPadding="10px" ShowBorder="false" ShowHeader="false">
|
||||
<Items>
|
||||
<f:Tree runat="server" ID="trFour" ShowHeader="false" ShowBorder="false" OnNodeCheck="trFour_NodeCheck">
|
||||
<Nodes>
|
||||
</Nodes>
|
||||
</f:Tree>
|
||||
</Items>
|
||||
</f:Panel>--%>
|
||||
<f:Panel ID="Panel6" Title="Panel1" Width="200px" AutoScroll="true" Height="200px"
|
||||
TableRowspan="5" runat="server" BodyPadding="10px" ShowBorder="false" ShowHeader="false">
|
||||
<Items>
|
||||
<f:Tree runat="server" ID="trFive" ShowHeader="false" ShowBorder="false" OnNodeCheck="trFive_NodeCheck">
|
||||
<Nodes>
|
||||
</Nodes>
|
||||
</f:Tree>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<%--<f:Panel ID="Panel7" Title="Panel1" Width="200px" AutoScroll="true" Height="200px" Hidden="True"
|
||||
TableRowspan="5" runat="server" BodyPadding="10px" ShowBorder="false" ShowHeader="false">
|
||||
<Items>
|
||||
<f:Tree runat="server" ID="trSixe" ShowHeader="false" ShowBorder="false" OnNodeCheck="trSixe_NodeCheck">
|
||||
<Nodes>
|
||||
</Nodes>
|
||||
</f:Tree>
|
||||
</Items>
|
||||
</f:Panel>--%>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ID="agree">
|
||||
<Items>
|
||||
</f:FormRow>--%>
|
||||
|
||||
<f:RadioButtonList runat="server" ID="rblIsAgree" Label="是否同意" ShowRedStar="true" AutoPostBack="true">
|
||||
<f:RadioItem Text="同意" Value="true" Selected="true" />
|
||||
<f:RadioItem Text="不同意" Value="false" />
|
||||
</f:RadioButtonList>
|
||||
<f:Label runat="server" CssStyle="display:none"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ID="options">
|
||||
<Items>
|
||||
<f:TextArea ID="txtOptions" ShowRedStar="true" Required="true" runat="server" Label="办理意见" MaxLength="3000">
|
||||
</f:TextArea>
|
||||
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ID="optio">
|
||||
|
||||
<Items>
|
||||
<f:Panel ShowHeader="false" ShowBorder="false" Layout="Column" runat="server">
|
||||
<Items>
|
||||
<f:Label runat="server" Text="附件:" ShowRedStar="true" CssStyle="padding-left:53px" Width="100px" CssClass="marginr" ShowLabel="false"></f:Label>
|
||||
<f:Button ID="btnapprove" Text="附件" ToolTip="上传及查看" Icon="TableCell" OnClick="btnapprove_Click" runat="server">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ID="plApprove2">
|
||||
<Items>
|
||||
|
||||
@@ -274,7 +429,7 @@
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:BoundField Width="100px" DataField="ApproveDate" HeaderTextAlign="Center" TextAlign="Center" DataFormatString="{0:yyyy-MM-dd}" HeaderText="办理时间" />
|
||||
<f:BoundField Width="180px" DataField="ApproveIdea" HeaderTextAlign="Center" TextAlign="Center" HeaderText="办理意见" />
|
||||
<%-- <f:BoundField Width="180px" DataField="ApproveIdea" HeaderTextAlign="Center" TextAlign="Center" HeaderText="办理意见" />--%>
|
||||
<f:LinkButtonField HeaderText="附件" ColumnID="download" Width="60px" Icon="ArrowDown" CommandName="download" />
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+110
-38
@@ -168,103 +168,85 @@ namespace FineUIPro.Web.CQMS.Solution
|
||||
protected global::FineUIPro.DatePicker txtCompileDate;
|
||||
|
||||
/// <summary>
|
||||
/// TabStrip1 控件。
|
||||
/// drpzyUserIds 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TabStrip TabStrip1;
|
||||
protected global::FineUIPro.DropDownBox drpzyUserIds;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm2 控件。
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.SimpleForm SimpleForm2;
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// txtDocContent 控件。
|
||||
/// ttbSearch1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HtmlEditor txtDocContent;
|
||||
protected global::FineUIPro.TwinTriggerBox ttbSearch1;
|
||||
|
||||
/// <summary>
|
||||
/// txtCopyMan 控件。
|
||||
/// drpaqUserIds 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtCopyMan;
|
||||
protected global::FineUIPro.DropDownBox drpaqUserIds;
|
||||
|
||||
/// <summary>
|
||||
/// Panel2 控件。
|
||||
/// Grid2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel2;
|
||||
protected global::FineUIPro.Grid Grid2;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// ttbSearch2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
protected global::FineUIPro.TwinTriggerBox ttbSearch2;
|
||||
|
||||
/// <summary>
|
||||
/// trOne 控件。
|
||||
/// drpCsUsers 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Tree trOne;
|
||||
protected global::FineUIPro.DropDownBox drpCsUsers;
|
||||
|
||||
/// <summary>
|
||||
/// Panel4 控件。
|
||||
/// Grid4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel4;
|
||||
protected global::FineUIPro.Grid Grid4;
|
||||
|
||||
/// <summary>
|
||||
/// trThree 控件。
|
||||
/// ttbSearch4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Tree trThree;
|
||||
|
||||
/// <summary>
|
||||
/// Panel6 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel6;
|
||||
|
||||
/// <summary>
|
||||
/// trFive 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Tree trFive;
|
||||
protected global::FineUIPro.TwinTriggerBox ttbSearch4;
|
||||
|
||||
/// <summary>
|
||||
/// agree 控件。
|
||||
@@ -294,13 +276,76 @@ namespace FineUIPro.Web.CQMS.Solution
|
||||
protected global::FineUIPro.FormRow options;
|
||||
|
||||
/// <summary>
|
||||
/// txtOptions 控件。
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtOptions;
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// options1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FormRow options1;
|
||||
|
||||
/// <summary>
|
||||
/// gvOperateComplianceObligations 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid gvOperateComplianceObligations;
|
||||
|
||||
/// <summary>
|
||||
/// TextBox7 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox TextBox7;
|
||||
|
||||
/// <summary>
|
||||
/// TextBox1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox TextBox1;
|
||||
|
||||
/// <summary>
|
||||
/// TextBox2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox TextBox2;
|
||||
|
||||
/// <summary>
|
||||
/// TextBox3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox TextBox3;
|
||||
|
||||
/// <summary>
|
||||
/// drpIsAccept 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpIsAccept;
|
||||
|
||||
/// <summary>
|
||||
/// optio 控件。
|
||||
@@ -320,6 +365,33 @@ namespace FineUIPro.Web.CQMS.Solution
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnapprove;
|
||||
|
||||
/// <summary>
|
||||
/// TabStrip1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TabStrip TabStrip1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.SimpleForm SimpleForm2;
|
||||
|
||||
/// <summary>
|
||||
/// txtDocContent 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HtmlEditor txtDocContent;
|
||||
|
||||
/// <summary>
|
||||
/// plApprove2 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DivisionDivideAndCrop.aspx.cs" Inherits="FineUIPro.Web.CQMS.WBS.Control.DivisionDivideAndCrop" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>单位分部分项工程划分、裁剪</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" CssClass="blockpanel" Margin="5px" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true" EnableCollapse="true" Layout="Fit"
|
||||
RegionPercent="20%" Title="单位工程/子单位工程" TitleToolTip="单位工程/子单位工程" ShowBorder="true" ShowHeader="true"
|
||||
BodyPadding="10px">
|
||||
<Items>
|
||||
<f:Tree ID="trUnitWork" EnableCollapse="true" ShowHeader="true" OnlyLeafCheck="true" OnNodeExpand="trUnitWork_NodeExpand" AutoLeafIdentification="true"
|
||||
runat="server" OnNodeCommand="trUnitWork_NodeCommand">
|
||||
<Listeners>
|
||||
<f:Listener Event="beforenodecontextmenu" Handler="onTreeNodeContextMenu" />
|
||||
</Listeners>
|
||||
</f:Tree>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" Layout="Fit"
|
||||
Title="中间面板" ShowBorder="true" ShowHeader="false" BodyPadding="10px">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" Width="870px" ShowBorder="true" ShowHeader="false" EnableCollapse="true" EnableColumnLines="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="DivisionId,ParentId,DivisionLevel,Status" EnableTree="true" TreeColumn="BranchEngineeringCode" ExpandAllTreeNodes="true"
|
||||
DataIDField="DivisionId" AllowPaging="false" DataParentIDField="ParentId" AllowCellEditing="false" ClicksToEdit="1" EnableCheckBoxSelect="true" KeepCurrentSelection="true"
|
||||
ForceFit="true" ShowSelectedCell="true" >
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar4" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnSave" ToolTip="保存" Icon="SystemSave" runat="server" Text="保存" Hidden="true"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnImport" ToolTip="导入" Text="导入" Icon="PackageIn" runat="server" OnClick="btnImport_Click" Hidden="true">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<%--<f:RowNumberField HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center" />--%>
|
||||
<f:RenderField ColumnID="BranchEngineeringCode" Width="120px" DataField="BranchEngineeringCode" HeaderText="分部工程编号" HeaderTextAlign="Center" >
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="BranchEngineeringName" Width="150px" DataField="BranchEngineeringName" HeaderText="分部工程名称" HeaderTextAlign="Center" >
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="SubBranchEngineeringName" Width="150px" DataField="SubBranchEngineeringName" HeaderText="子分部工程名称" HeaderTextAlign="Center" >
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="ProEngineeringName" ExpandUnusedSpace="true" Width="150px" DataField="ProEngineeringName" HeaderText="分项工程名称" HeaderTextAlign="Center" >
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="ProEngineeringCode" Width="100px" DataField="ProEngineeringCode" HeaderText="分项工程编号" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="ProEngineeringNum" Width="100px" DataField="ProEngineeringNum" HeaderText="分部分项码" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="DivisionLevel" Width="100px" DataField="DivisionLevel" HeaderText="级别" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="50px" ColumnID="Sort" DataField="Sort" HeaderText="排序" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</form>
|
||||
<f:Window ID="Window1" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Top" EnableResize="false" runat="server" IsModal="true"
|
||||
Width="700px" Height="560px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window2" Title="修改单位工程/子单位工程" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Top" EnableResize="false" runat="server" IsModal="true"
|
||||
Width="700px" Height="300px" OnClose="Window2_Close">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<Items>
|
||||
<f:MenuButton ID="btnCopy" EnablePostBack="true" runat="server" Text="拷贝" Icon="DatabaseCopy"
|
||||
OnClick="btnCopy_Click" Hidden="true">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnEdit" EnablePostBack="true" runat="server" Text="修改" Icon="Pencil"
|
||||
OnClick="btnEdit_Click" Hidden="true">
|
||||
</f:MenuButton>
|
||||
</Items>
|
||||
</f:Menu>
|
||||
<script type="text/javascript">
|
||||
var treeID = '<%= trUnitWork.ClientID %>';
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
// 保存当前菜单对应的树节点ID
|
||||
var currentNodeId;
|
||||
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onTreeNodeContextMenu(event, nodeId) {
|
||||
currentNodeId = nodeId;
|
||||
F(menuID).show();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,398 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.WBS.Control
|
||||
{
|
||||
public partial class DivisionDivideAndCrop : PageBase
|
||||
{
|
||||
#region 定义变量
|
||||
/// <summary>
|
||||
/// 被选择项列表
|
||||
/// </summary>
|
||||
public List<string> SelectedList
|
||||
{
|
||||
get
|
||||
{
|
||||
return (List<string>)ViewState["SelectedList"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["SelectedList"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 未被选择项列表
|
||||
/// </summary>
|
||||
public List<string> NoSelectedList
|
||||
{
|
||||
get
|
||||
{
|
||||
return (List<string>)ViewState["NoSelectedList"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["NoSelectedList"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.SelectedList = new List<string>();
|
||||
this.NoSelectedList = new List<string>();
|
||||
GetButtonPower();
|
||||
InitTreeMenu();
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载树
|
||||
/// <summary>
|
||||
/// 加载树
|
||||
/// </summary>
|
||||
private void InitTreeMenu()
|
||||
{
|
||||
this.trUnitWork.Nodes.Clear();
|
||||
this.trUnitWork.ShowBorder = false;
|
||||
this.trUnitWork.ShowHeader = false;
|
||||
this.trUnitWork.EnableIcons = true;
|
||||
this.trUnitWork.AutoScroll = true;
|
||||
this.trUnitWork.EnableSingleClickExpand = true;
|
||||
List<Model.WBS_UnitWork> supUnitWorkList = BLL.UnitWorkService.GetUnitWorkLists(this.CurrUser.LoginProjectId);
|
||||
if (supUnitWorkList.Count() > 0)
|
||||
{
|
||||
foreach (var item in supUnitWorkList)
|
||||
{
|
||||
TreeNode node = new TreeNode();
|
||||
node.Text = item.UnitWorkName;
|
||||
node.NodeID = item.UnitWorkId;
|
||||
node.CommandName = "supUnitWork";
|
||||
node.EnableClickEvent = true;
|
||||
node.EnableExpandEvent = true;
|
||||
this.trUnitWork.Nodes.Add(node);
|
||||
TreeNode emptyNode = new TreeNode();
|
||||
emptyNode.Text = "";
|
||||
emptyNode.NodeID = "";
|
||||
node.Nodes.Add(emptyNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 展开树
|
||||
/// <summary>
|
||||
/// 展开树
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void trUnitWork_NodeExpand(object sender, TreeNodeEventArgs e)
|
||||
{
|
||||
e.Node.Nodes.Clear();
|
||||
if (e.Node.CommandName == "supUnitWork") //展开单位工程节点
|
||||
{
|
||||
var unitWorks = from x in Funs.DB.WBS_UnitWork
|
||||
where x.SuperUnitWork == e.Node.NodeID
|
||||
orderby x.UnitWorkCode
|
||||
select x;
|
||||
foreach (var unitWork in unitWorks)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = unitWork.UnitWorkName;
|
||||
newNode.NodeID = unitWork.UnitWorkId;
|
||||
newNode.CommandName = "unitWork";
|
||||
newNode.EnableExpandEvent = true;
|
||||
newNode.EnableClickEvent = true;
|
||||
e.Node.Nodes.Add(newNode);
|
||||
var installation3s = from x in Funs.DB.WBS_UnitWork where x.SuperUnitWork == unitWork.UnitWorkId orderby x.UnitWorkCode select x;
|
||||
if (installation3s.Count() > 0)
|
||||
{
|
||||
TreeNode emptyNode = new TreeNode();
|
||||
emptyNode.Text = "";
|
||||
emptyNode.NodeID = "";
|
||||
newNode.Nodes.Add(emptyNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 节点选择事件
|
||||
/// <summary>
|
||||
/// tv节点选中事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void trUnitWork_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
for (int i = 0; i < this.Grid1.Rows.Count; i++)
|
||||
{
|
||||
if (this.Grid1.SelectedRowIDArray.Contains(this.Grid1.Rows[i].RowID))
|
||||
{
|
||||
SelectedList.Add(this.Grid1.Rows[i].RowID);
|
||||
}
|
||||
else
|
||||
{
|
||||
NoSelectedList.Add(this.Grid1.Rows[i].RowID);
|
||||
}
|
||||
}
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 数据绑定和事件
|
||||
/// <summary>
|
||||
/// 数据绑定
|
||||
/// </summary>
|
||||
public void BindGrid()
|
||||
{
|
||||
string strSql = @"select * from(select a.DivisionId,a.ProjectId,a.ParentId,a.DivisionLevel,a.BranchEngineeringCode,a.BranchEngineeringName,a.SubBranchEngineeringName,a.ProEngineeringCode,a.ProEngineeringName,a.ProEngineeringNum,a.Remark,a.AddUser,a.OperateTime,a.Sort,a.Status from Division_SubProjects as a where isnull(a.ProjectId,'')='' ";
|
||||
string strSql1 = @"select a.DivisionId,a.ProjectId,a.ParentId,a.DivisionLevel,a.BranchEngineeringCode,a.BranchEngineeringName,a.SubBranchEngineeringName,a.ProEngineeringCode,a.ProEngineeringName,a.ProEngineeringNum,a.Remark,a.AddUser,a.OperateTime,a.Sort,a.Status from Division_SubProjects as a inner join Base_Project as b on a.ProjectId=b.ProjectId where a.ProjectId=@ProjectId ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
var zxsql = strSql + " union all " + strSql1 + " ) as t order by t.BranchEngineeringCode,t.Sort,t.DivisionLevel,t.ProEngineeringNum asc";
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(zxsql, parameter);
|
||||
Grid1.DataSource = tb;
|
||||
Grid1.DataBind();
|
||||
|
||||
var selectIds = (from x in Funs.DB.WBS_DivisionDivide where x.UnitWorkId == this.trUnitWork.SelectedNodeID select x.DivisionId).ToList();
|
||||
if (selectIds.Count() > 0)
|
||||
{
|
||||
this.Grid1.SelectedRowIDArray = selectIds.ToArray();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 保存
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.trUnitWork.SelectedNodeID))
|
||||
{
|
||||
SelectedList.Clear();
|
||||
NoSelectedList.Clear();
|
||||
for (int i = 0; i < this.Grid1.Rows.Count; i++)
|
||||
{
|
||||
if (this.Grid1.SelectedRowIDArray.Contains(this.Grid1.Rows[i].RowID))
|
||||
{
|
||||
SelectedList.Add(this.Grid1.Rows[i].RowID);
|
||||
}
|
||||
else
|
||||
{
|
||||
NoSelectedList.Add(this.Grid1.Rows[i].RowID);
|
||||
}
|
||||
}
|
||||
foreach (var item in SelectedList.Distinct())
|
||||
{
|
||||
Model.WBS_DivisionDivide divisionDivide = BLL.DivisionDivideService.GetDivisionDivideByDivisionId(this.trUnitWork.SelectedNodeID, item);
|
||||
if (divisionDivide == null)
|
||||
{
|
||||
Model.WBS_DivisionDivide newdivisiondivide = new Model.WBS_DivisionDivide();
|
||||
newdivisiondivide.DivisionDivideId = SQLHelper.GetNewID(typeof(Model.WBS_DivisionDivide));
|
||||
newdivisiondivide.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newdivisiondivide.UnitWorkId = this.trUnitWork.SelectedNodeID;
|
||||
newdivisiondivide.DivisionId = item;
|
||||
BLL.DivisionDivideService.AddDivisionDivide(newdivisiondivide);
|
||||
}
|
||||
}
|
||||
NoSelectedList = NoSelectedList.Distinct().ToList();
|
||||
var q = NoSelectedList.Distinct().ToList();
|
||||
foreach (var item in q)
|
||||
{
|
||||
foreach (var i in SelectedList.Distinct())
|
||||
{
|
||||
if (item == i)
|
||||
{
|
||||
NoSelectedList.Remove(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach (var item in NoSelectedList)
|
||||
{
|
||||
Model.WBS_DivisionDivide divisionDivide = BLL.DivisionDivideService.GetDivisionDivideByDivisionId(this.trUnitWork.SelectedNodeID,item);
|
||||
if (divisionDivide != null)
|
||||
{
|
||||
BLL.DivisionDivideService.DeleteDivisionDivideByDivisionId(item);
|
||||
}
|
||||
}
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请先选择单位工程/子单位工程!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导入
|
||||
/// <summary>
|
||||
/// 导入
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DivisionDivideAndCropDataIn.aspx", "导入 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 拷贝
|
||||
/// <summary>
|
||||
/// 拷贝
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnCopy_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool isOk = false;
|
||||
if (!string.IsNullOrEmpty(this.trUnitWork.SelectedNodeID))
|
||||
{
|
||||
var unitwork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(this.trUnitWork.SelectedNodeID);
|
||||
if (unitwork != null)
|
||||
{
|
||||
Model.WBS_UnitWork newSupUnitWork = new Model.WBS_UnitWork();
|
||||
newSupUnitWork.UnitWorkId = SQLHelper.GetNewID(typeof(Model.WBS_UnitWork));
|
||||
newSupUnitWork.UnitWorkCode = unitwork.UnitWorkCode;
|
||||
newSupUnitWork.UnitWorkName = unitwork.UnitWorkName;
|
||||
newSupUnitWork.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newSupUnitWork.SuperUnitWork = unitwork.SuperUnitWork;
|
||||
BLL.UnitWorkService.AddUnitWork(newSupUnitWork);
|
||||
isOk = true;
|
||||
|
||||
var divisionDivides = BLL.DivisionDivideService.GetDivisionDivideByUnitWorkId(this.trUnitWork.SelectedNodeID);
|
||||
if (divisionDivides != null)
|
||||
{
|
||||
foreach (var item in divisionDivides)
|
||||
{
|
||||
Model.WBS_DivisionDivide newDivisionDivide = new Model.WBS_DivisionDivide();
|
||||
newDivisionDivide.DivisionDivideId = SQLHelper.GetNewID(typeof(Model.WBS_DivisionDivide));
|
||||
newDivisionDivide.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newDivisionDivide.UnitWorkId = newSupUnitWork.UnitWorkId;
|
||||
newDivisionDivide.DivisionId = item.DivisionId;
|
||||
BLL.DivisionDivideService.AddDivisionDivide(newDivisionDivide);
|
||||
isOk = true;
|
||||
}
|
||||
}
|
||||
|
||||
var unitworkList = BLL.UnitWorkService.GetUnitWorksBySupUnitWork(this.trUnitWork.SelectedNodeID);
|
||||
if (unitworkList.Count() > 0)
|
||||
{
|
||||
foreach (var item in unitworkList)
|
||||
{
|
||||
Model.WBS_UnitWork newUnitWork = new Model.WBS_UnitWork();
|
||||
newUnitWork.UnitWorkId = SQLHelper.GetNewID(typeof(Model.WBS_UnitWork));
|
||||
newUnitWork.UnitWorkCode = item.UnitWorkCode;
|
||||
newUnitWork.UnitWorkName = item.UnitWorkName;
|
||||
newUnitWork.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newUnitWork.SuperUnitWork = newSupUnitWork.UnitWorkId;
|
||||
BLL.UnitWorkService.AddUnitWork(newUnitWork);
|
||||
isOk = true;
|
||||
|
||||
var divisionDivideLists = BLL.DivisionDivideService.GetDivisionDivideByUnitWorkId(item.UnitWorkId);
|
||||
if (divisionDivideLists != null)
|
||||
{
|
||||
foreach (var divis in divisionDivideLists)
|
||||
{
|
||||
Model.WBS_DivisionDivide newDivisionDivide = new Model.WBS_DivisionDivide();
|
||||
newDivisionDivide.DivisionDivideId = SQLHelper.GetNewID(typeof(Model.WBS_DivisionDivide));
|
||||
newDivisionDivide.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newDivisionDivide.UnitWorkId = newUnitWork.UnitWorkId;
|
||||
newDivisionDivide.DivisionId = divis.DivisionId;
|
||||
BLL.DivisionDivideService.AddDivisionDivide(newDivisionDivide);
|
||||
isOk = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (isOk)
|
||||
{
|
||||
ShowNotify("拷贝成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("拷贝失败!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 修改
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.trUnitWork.SelectedNodeID))
|
||||
{
|
||||
var unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(this.trUnitWork.SelectedNodeID);
|
||||
if (unitWork != null)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../../../ProjectData/UnitWorkEdit.aspx?Id={0}&&SuperId={1}", this.trUnitWork.SelectedNode.NodeID, unitWork.SuperUnitWork, "编辑 - ")));
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 关闭弹出窗体
|
||||
/// <summary>
|
||||
/// 关闭弹出窗体
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window2_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
InitTreeMenu();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
if (Request.Params["value"] == "0")
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.DivisionDivideAndCropMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnSave))
|
||||
{
|
||||
this.btnSave.Hidden = false;
|
||||
this.btnImport.Hidden = false;
|
||||
this.btnCopy.Hidden = false;
|
||||
this.btnEdit.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.WBS.Control {
|
||||
|
||||
|
||||
public partial class DivisionDivideAndCrop {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// panelLeftRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
/// <summary>
|
||||
/// trUnitWork 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Tree trUnitWork;
|
||||
|
||||
/// <summary>
|
||||
/// panelCenterRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelCenterRegion;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar4;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Window2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnCopy 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnCopy;
|
||||
|
||||
/// <summary>
|
||||
/// btnEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnEdit;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DivisionDivideAndCropDataIn.aspx.cs" Inherits="FineUIPro.Web.CQMS.WBS.Control.DivisionDivideAndCropDataIn" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>单位分部分项工程划分、裁剪</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" OnCustomEvent="PageManager1_CustomEvent" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:HiddenField ID="hdFileName" runat="server">
|
||||
</f:HiddenField>
|
||||
<f:Button ID="btnAudit" Icon="ApplicationEdit" runat="server" ToolTip="审核" ValidateForms="SimpleForm1"
|
||||
OnClick="btnAudit_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnImport" Icon="ApplicationGet" runat="server" ToolTip="导入" ValidateForms="SimpleForm1"
|
||||
OnClick="btnImport_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" ToolTip="下载模板" OnClick="btnDownLoad_Click">
|
||||
</f:Button>
|
||||
<f:HiddenField ID="hdCheckResult" runat="server">
|
||||
</f:HiddenField>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:FileUpload runat="server" ID="fuAttachUrl" EmptyText="选择要导入的文件" Label="选择要导入的文件"
|
||||
LabelWidth="150px">
|
||||
</f:FileUpload>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="gvErrorInfo" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="单位分部分项工程划分、裁剪" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" AllowCellEditing="true" ClicksToEdit="2" AllowSorting="true"
|
||||
SortDirection="DESC" EnableColumnLines="true" ForceFit="true" AllowPaging="true" IsDatabasePaging="true" PageSize="10"
|
||||
EnableRowDoubleClickEvent="true" AllowFilters="true" EnableTextSelection="True">
|
||||
<Columns>
|
||||
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
|
||||
EnableLock="true" Locked="False">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblPageIndex" runat="server" Text='<%# gvErrorInfo.PageIndex * gvErrorInfo.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:BoundField DataField="Row" HeaderText="错误行号">
|
||||
</f:BoundField>
|
||||
<f:BoundField DataField="Column" HeaderText="错误列">
|
||||
</f:BoundField>
|
||||
<f:BoundField DataField="Reason" HeaderText="错误类型">
|
||||
</f:BoundField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,523 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.OleDb;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.WBS.Control
|
||||
{
|
||||
public partial class DivisionDivideAndCropDataIn : PageBase
|
||||
{
|
||||
#region 定义变量
|
||||
/// <summary>
|
||||
/// 上传预设的虚拟路径
|
||||
/// </summary>
|
||||
private string initPath = Const.ExcelUrl;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 错误集合
|
||||
/// </summary>
|
||||
public static List<Model.ErrorInfo> errorInfos = new List<Model.ErrorInfo>();
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.hdCheckResult.Text = string.Empty;
|
||||
this.hdFileName.Text = string.Empty;
|
||||
if (errorInfos != null)
|
||||
{
|
||||
errorInfos.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 审核
|
||||
/// <summary>
|
||||
/// 审核
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAudit_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this.fuAttachUrl.HasFile == false)
|
||||
{
|
||||
ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower();
|
||||
if (IsXls != ".xls")
|
||||
{
|
||||
ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (errorInfos != null)
|
||||
{
|
||||
errorInfos.Clear();
|
||||
}
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string initFullPath = rootPath + initPath;
|
||||
if (!Directory.Exists(initFullPath))
|
||||
{
|
||||
Directory.CreateDirectory(initFullPath);
|
||||
}
|
||||
|
||||
this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls;
|
||||
string filePath = initFullPath + this.hdFileName.Text;
|
||||
this.fuAttachUrl.PostedFile.SaveAs(filePath);
|
||||
ImportXlsToData(rootPath + initPath + this.hdFileName.Text);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
#region 读Excel提取数据
|
||||
/// <summary>
|
||||
/// 从Excel提取数据--》Dataset
|
||||
/// </summary>
|
||||
/// <param name="filename">Excel文件路径名</param>
|
||||
private void ImportXlsToData(string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
string oleDBConnString = String.Empty;
|
||||
oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
|
||||
oleDBConnString += "Data Source=";
|
||||
oleDBConnString += fileName;
|
||||
oleDBConnString += ";Extended Properties=Excel 8.0;";
|
||||
OleDbConnection oleDBConn = null;
|
||||
OleDbDataAdapter oleAdMaster = null;
|
||||
DataTable m_tableName = new DataTable();
|
||||
DataSet ds = new DataSet();
|
||||
|
||||
oleDBConn = new OleDbConnection(oleDBConnString);
|
||||
oleDBConn.Open();
|
||||
m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
|
||||
|
||||
if (m_tableName != null && m_tableName.Rows.Count > 0)
|
||||
{
|
||||
|
||||
m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
|
||||
|
||||
}
|
||||
string sqlMaster;
|
||||
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
|
||||
oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
|
||||
oleAdMaster.Fill(ds, "m_tableName");
|
||||
oleAdMaster.Dispose();
|
||||
oleDBConn.Close();
|
||||
oleDBConn.Dispose();
|
||||
|
||||
AddDatasetToSQL(ds.Tables[0], 11);
|
||||
hdCheckResult.Text = "1";
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Response.Write(exc);
|
||||
//return null;
|
||||
// return dt;
|
||||
}
|
||||
finally
|
||||
{
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 将Dataset的数据导入数据库
|
||||
/// <summary>
|
||||
/// 将Dataset的数据导入数据库
|
||||
/// </summary>
|
||||
/// <param name="pds">数据集</param>
|
||||
/// <param name="Cols">数据集行数</param>
|
||||
/// <returns></returns>
|
||||
private bool AddDatasetToSQL(DataTable pds, int Cols)
|
||||
{
|
||||
string result = string.Empty;
|
||||
int ic, ir;
|
||||
ic = pds.Columns.Count;
|
||||
if (ic < Cols)
|
||||
{
|
||||
ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
|
||||
return false;
|
||||
}
|
||||
|
||||
ir = pds.Rows.Count;
|
||||
if (pds != null && ir > 0)
|
||||
{
|
||||
var supUnitWorks = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId && (x.SuperUnitWork == "0" || x.SuperUnitWork == null) select x;//单位工程
|
||||
var childUnitWorks = from x in Funs.DB.WBS_UnitWork where x.ProjectId==this.CurrUser.LoginProjectId && (x.SuperUnitWork != null && x.SuperUnitWork != "0") select x;//子单位工程
|
||||
var branchEngineerings = from x in Funs.DB.Division_SubProjects where x.ProjectId == this.CurrUser.LoginProjectId select x; //分部、分项
|
||||
|
||||
for (int i = 1; i < ir; i++)
|
||||
{
|
||||
string row1 = pds.Rows[i][1].ToString().Trim();
|
||||
if (!string.IsNullOrEmpty(row1))
|
||||
{
|
||||
var supUnitWork = supUnitWorks.Where(y => y.UnitWorkName == row1).FirstOrDefault();//单位工程名称
|
||||
if (supUnitWork != null)
|
||||
{
|
||||
string row0 = pds.Rows[i][0].ToString();
|
||||
if (!string.IsNullOrEmpty(row0))
|
||||
{
|
||||
var supUnitWorkCode = supUnitWorks.Where(x => x.UnitWorkCode == row0).FirstOrDefault();//单位工程编码
|
||||
if (supUnitWorkCode == null)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "单位工程编码" + "," + "[" + row0 + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "单位工程编码" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
|
||||
string row2 = pds.Rows[i][2].ToString();
|
||||
if (!string.IsNullOrEmpty(row2))
|
||||
{
|
||||
var childUnitWorkCode = childUnitWorks.Where(x => x.UnitWorkCode == row2 && x.SuperUnitWork == supUnitWork.UnitWorkId).FirstOrDefault();
|
||||
if (childUnitWorkCode == null)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "子单位工程编码" + "," + "[" + row2 + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
string row3 = pds.Rows[i][3].ToString();
|
||||
if (!string.IsNullOrEmpty(row3))
|
||||
{
|
||||
var childUnitWorkName = childUnitWorks.Where(x => x.UnitWorkName == row3 && x.SuperUnitWork == supUnitWork.UnitWorkId).FirstOrDefault();
|
||||
if (childUnitWorkName == null)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "子单位工程名称" + "," + "[" + row3 + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row4 = pds.Rows[i][4].ToString();
|
||||
if (!string.IsNullOrEmpty(row4))
|
||||
{
|
||||
branchEngineerings = branchEngineerings.Where(x => x.BranchEngineeringCode == row4);
|
||||
if (branchEngineerings != null)
|
||||
{
|
||||
string row5 = pds.Rows[i][5].ToString();
|
||||
if (!string.IsNullOrEmpty(row5))
|
||||
{
|
||||
branchEngineerings = branchEngineerings.Where(x => x.BranchEngineeringName == row5);
|
||||
if (branchEngineerings.ToList().Count == 0)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "分部工程名称" + "," + "[" + row5 + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
string row6 = pds.Rows[i][6].ToString();
|
||||
if (!string.IsNullOrEmpty(row6))
|
||||
{
|
||||
branchEngineerings = branchEngineerings.Where(x => x.SubBranchEngineeringName == row6);
|
||||
if (branchEngineerings.ToList().Count == 0)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "子分部工程名称" + "," + "[" + row6 + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
string row7 = pds.Rows[i][7].ToString();
|
||||
if (!string.IsNullOrEmpty(row7))
|
||||
{
|
||||
branchEngineerings = branchEngineerings.Where(x => x.ProEngineeringCode == row7);
|
||||
if (branchEngineerings.ToList().Count == 0)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "分项工程编号" + "," + "[" + row7 + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "分项工程编号" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
string row8 = pds.Rows[i][8].ToString();
|
||||
if (!string.IsNullOrEmpty(row8))
|
||||
{
|
||||
|
||||
branchEngineerings = branchEngineerings.Where(x => x.ProEngineeringName == row8);
|
||||
if (branchEngineerings.ToList().Count == 0)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "分项工程名称" + "," + "[" + row8 + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][9].ToString()))
|
||||
{
|
||||
branchEngineerings = branchEngineerings.Where(x => x.ProEngineeringNum == pds.Rows[i][9].ToString());
|
||||
if (branchEngineerings.ToList().Count == 0)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "分部分项码" + "," + "[" + pds.Rows[i][9].ToString() + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "分部分项码" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][10].ToString()))
|
||||
{
|
||||
try
|
||||
{
|
||||
branchEngineerings = branchEngineerings.Where(x => x.DivisionLevel == Convert.ToInt32(pds.Rows[i][10].ToString()));
|
||||
if (branchEngineerings.ToList().Count == 0)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "级别" + "," + "[" + pds.Rows[i][10].ToString() + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "级别" + "," + "[" + pds.Rows[i][10].ToString() + "]错误!" + "|";
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "级别" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "分部工程编号" + "," + "[" + row4 + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "分部工程编号" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "单位工程名称" + "," + "[" + row1 + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "单位工程名称" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
{
|
||||
result = result.Substring(0, result.LastIndexOf("|"));
|
||||
}
|
||||
errorInfos.Clear();
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
{
|
||||
string results = result;
|
||||
List<string> errorInfoList = results.Split('|').ToList();
|
||||
foreach (var item in errorInfoList)
|
||||
{
|
||||
string[] errors = item.Split(',');
|
||||
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
|
||||
errorInfo.Row = errors[0];
|
||||
errorInfo.Column = errors[1];
|
||||
errorInfo.Reason = errors[2];
|
||||
errorInfos.Add(errorInfo);
|
||||
}
|
||||
if (errorInfos.Count > 0)
|
||||
{
|
||||
this.gvErrorInfo.DataSource = errorInfos;
|
||||
this.gvErrorInfo.DataBind();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 导入
|
||||
/// <summary>
|
||||
/// 导入
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(hdCheckResult.Text))
|
||||
{
|
||||
if (errorInfos.Count <= 0)
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
|
||||
hdCheckResult.Text = string.Empty;
|
||||
ShowNotify("导入成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
#region Excel提取数据
|
||||
/// <summary>
|
||||
/// 从Excel提取数据--》Dataset
|
||||
/// </summary>
|
||||
/// <param name="filename">Excel文件路径名</param>
|
||||
private void ImportXlsToData2(string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
string oleDBConnString = String.Empty;
|
||||
oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
|
||||
oleDBConnString += "Data Source=";
|
||||
oleDBConnString += fileName;
|
||||
oleDBConnString += ";Extended Properties=Excel 8.0;";
|
||||
OleDbConnection oleDBConn = null;
|
||||
OleDbDataAdapter oleAdMaster = null;
|
||||
DataTable m_tableName = new DataTable();
|
||||
DataSet ds = new DataSet();
|
||||
|
||||
oleDBConn = new OleDbConnection(oleDBConnString);
|
||||
oleDBConn.Open();
|
||||
m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
|
||||
|
||||
if (m_tableName != null && m_tableName.Rows.Count > 0)
|
||||
{
|
||||
|
||||
m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
|
||||
|
||||
}
|
||||
string sqlMaster;
|
||||
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
|
||||
oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
|
||||
oleAdMaster.Fill(ds, "m_tableName");
|
||||
oleAdMaster.Dispose();
|
||||
oleDBConn.Close();
|
||||
oleDBConn.Dispose();
|
||||
|
||||
AddDatasetToSQL2(ds.Tables[0], 11);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 将Dataset的数据导入数据库
|
||||
/// <summary>
|
||||
/// 将Dataset的数据导入数据库
|
||||
/// </summary>
|
||||
/// <param name="pds">数据集</param>
|
||||
/// <param name="Cols">数据集列数</param>
|
||||
/// <returns></returns>
|
||||
private bool AddDatasetToSQL2(DataTable pds, int Cols)
|
||||
{
|
||||
int ic, ir;
|
||||
ic = pds.Columns.Count;
|
||||
if (ic < Cols)
|
||||
{
|
||||
ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
|
||||
}
|
||||
string result = string.Empty;
|
||||
ir = pds.Rows.Count;
|
||||
if (pds != null && ir > 0)
|
||||
{
|
||||
var oldDivisionDivides = from x in Funs.DB.WBS_DivisionDivide where x.ProjectId == this.CurrUser.LoginProjectId select x;
|
||||
|
||||
var supUnitWorks = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId && (x.SuperUnitWork == "0" || x.SuperUnitWork == null) select x;//单位工程
|
||||
//var childUnitWorks = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId && (x.SuperUnitWork != null && x.SuperUnitWork != "0") select x;//子单位工程
|
||||
var branchEngineerings = from x in Funs.DB.Division_SubProjects where x.ProjectId == this.CurrUser.LoginProjectId select x; //分部、分项
|
||||
|
||||
for (int i = 1; i < ir; i++)
|
||||
{
|
||||
string row1 = pds.Rows[i][1].ToString().Trim();
|
||||
string row4 = pds.Rows[i][4].ToString().Trim();
|
||||
string row7 = pds.Rows[i][7].ToString().Trim();
|
||||
string row9 = pds.Rows[i][9].ToString().Trim();
|
||||
|
||||
var unitwork = supUnitWorks.Where(x => x.UnitWorkName == row1).FirstOrDefault();
|
||||
var division = branchEngineerings.Where(x => x.BranchEngineeringCode == row4 && x.ProEngineeringCode == row7 && x.ProEngineeringNum == row9).FirstOrDefault();
|
||||
if (unitwork != null && division != null)
|
||||
{
|
||||
Model.WBS_DivisionDivide divisionDivide = new Model.WBS_DivisionDivide();
|
||||
divisionDivide = oldDivisionDivides.FirstOrDefault(x => x.UnitWorkId == unitwork.UnitWorkId && x.DivisionId == division.DivisionId);
|
||||
if (divisionDivide == null)
|
||||
{
|
||||
Model.WBS_DivisionDivide newDivisionDivide = new Model.WBS_DivisionDivide();
|
||||
newDivisionDivide.DivisionDivideId = SQLHelper.GetNewID(typeof(Model.WBS_DivisionDivide));
|
||||
newDivisionDivide.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newDivisionDivide.UnitWorkId = unitwork.UnitWorkId;
|
||||
newDivisionDivide.DivisionId = division.DivisionId;
|
||||
BLL.DivisionDivideService.AddDivisionDivide(newDivisionDivide);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "分部分项工程" + "," + "[" + row4 + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 下载模板
|
||||
/// <summary>
|
||||
/// 下载模板按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDownLoad_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下载导入模板
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void PageManager1_CustomEvent(object sender, CustomEventArgs e)
|
||||
{
|
||||
if (e.EventArgument == "Confirm_OK")
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string uploadfilepath = rootPath + Const.DivisionDivideTempUrl;
|
||||
string filePath = Const.DivisionDivideTempUrl;
|
||||
string fileName = Path.GetFileName(filePath);
|
||||
FileInfo info = new FileInfo(uploadfilepath);
|
||||
long fileSize = info.Length;
|
||||
Response.ClearContent();
|
||||
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
Response.ContentType = "excel/plain";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
Response.AddHeader("Content-Length", fileSize.ToString().Trim());
|
||||
Response.TransmitFile(uploadfilepath, 0, fileSize);
|
||||
Response.End();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.WBS.Control {
|
||||
|
||||
|
||||
public partial class DivisionDivideAndCropDataIn {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// hdFileName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdFileName;
|
||||
|
||||
/// <summary>
|
||||
/// btnAudit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAudit;
|
||||
|
||||
/// <summary>
|
||||
/// btnImport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnImport;
|
||||
|
||||
/// <summary>
|
||||
/// btnDownLoad 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDownLoad;
|
||||
|
||||
/// <summary>
|
||||
/// hdCheckResult 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdCheckResult;
|
||||
|
||||
/// <summary>
|
||||
/// fuAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FileUpload fuAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// gvErrorInfo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid gvErrorInfo;
|
||||
|
||||
/// <summary>
|
||||
/// lblPageIndex 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblPageIndex;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DivisionDivideList.aspx.cs" Inherits="FineUIPro.Web.CQMS.WBS.Control.DivisionDivideList" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>单位分部分项工程划分表</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false" ShowHeader="false" Layout="VBox" AutoScroll="true" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" IsFluid="true" ShowBorder="true" ShowHeader="false" Title="单位分部分项工程划分表"
|
||||
runat="server" EnableCollapse="true" DataKeyNames="DivisionDivideId" EnableColumnLines="true" BoxFlex="1"
|
||||
DataIDField="DivisionDivideId" AllowPaging="false" AllowCellEditing="false" ExpandAllTreeNodes="true">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" runat="server">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnitWork" runat="server" Label="单位工程名称" LabelWidth="120px" LabelAlign="Right" EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="drpUnitWork_SelectedIndexChanged"></f:DropDownList>
|
||||
<f:DropDownList ID="drpBranchEngineering" runat="server" Label="分部工程名称" LabelWidth="120px" LabelAlign="Right" EnableEdit="true"></f:DropDownList>
|
||||
<f:Button ID="btnSearch" runat="server" Text="查询" Icon="SystemSearch" OnClick="btnSearch_Click"></f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RowNumberField HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center" Width="70px" />
|
||||
<f:RenderField ColumnID="SupUnitWorkCode" DataField="SupUnitWorkCode" Width="110px" HeaderText="单位工程编码" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="SupUnitWorkName" DataField="SupUnitWorkName" Width="150px" HeaderText="单位工程名称" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="ChildUnitWorkCode" DataField="ChildUnitWorkCode" Width="120px" HeaderText="子单位工程编码" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="ChildUnitWorkName" DataField="ChildUnitWorkName" Width="150px" HeaderText="子单位工程名称" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="BranchEngineeringCode" DataField="BranchEngineeringCode" Width="110px" HeaderText="分部工程编号" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="BranchEngineeringName" DataField="BranchEngineeringName" Width="150px" HeaderText="分部工程名称" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="SubBranchEngineeringName" DataField="SubBranchEngineeringName" Width="130px" HeaderText="子分部工程名称" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="ProEngineeringCode" DataField="ProEngineeringCode" Width="110px" HeaderText="分项工程编号" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="ProEngineeringName" DataField="ProEngineeringName" Width="150px" HeaderText="分项工程名称" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="ProEngineeringNum" DataField="ProEngineeringNum" Width="100px" HeaderText="分部分项码" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="DivisionLevel" DataField="DivisionLevel" Width="50px" HeaderText="级别" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<%--<Listeners>
|
||||
<f:Listener Event="dataload" Handler="onGridDataLoad" />
|
||||
</Listeners>--%>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</form>
|
||||
<%--<script type="text/javascript">
|
||||
function onGridDataLoad(event) {
|
||||
this.mergeColumns(['SupUnitWorkCode', 'SupUnitWorkName', 'ChildUnitWorkCode', 'ChildUnitWorkName']);
|
||||
}
|
||||
</script>--%>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,240 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.WBS.Control
|
||||
{
|
||||
public partial class DivisionDivideList : PageBase
|
||||
{
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BLL.UnitWorkService.InitUnitWorkDownList(this.drpUnitWork, this.CurrUser.LoginProjectId, true);
|
||||
|
||||
//var subProjectLists = from x in Funs.DB.Division_SubProjects where x.ProjectId==this.CurrUser.LoginProjectId && x.ParentId==null select x;
|
||||
//this.drpBranchEngineering.DataTextField = "BranchEngineeringName";
|
||||
//this.drpBranchEngineering.DataValueField = "DivisionId";
|
||||
//this.drpBranchEngineering.DataSource = subProjectLists;
|
||||
//this.drpBranchEngineering.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpBranchEngineering);
|
||||
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT * FROM View_WBS_DivisionDivide WHERE ProjectId = @projectId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId));
|
||||
if (this.drpUnitWork.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND (UnitWorkId =@unitWorkId or SuperUnitWork=@unitWorkId) ";
|
||||
listStr.Add(new SqlParameter("@unitWorkId", this.drpUnitWork.SelectedValue));
|
||||
}
|
||||
if (this.drpBranchEngineering.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND (DivisionId = @divisionId or ParentId=@divisionId) ";
|
||||
listStr.Add(new SqlParameter("@divisionId", this.drpBranchEngineering.SelectedValue));
|
||||
}
|
||||
strSql += " ORDER BY SupUnitWorkCode,ChildUnitWorkCode,Sort,DivisionLevel ";
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
//var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = tb;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查询
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string initTemplatePath = Const.DivisionDivideTempUrl;
|
||||
string uploadfilepath = string.Empty;
|
||||
string newUrl = string.Empty;
|
||||
uploadfilepath = rootPath + initTemplatePath;
|
||||
|
||||
var lists = (from x in Funs.DB.View_WBS_DivisionDivide
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x);
|
||||
if (this.drpUnitWork.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
lists = lists.Where(x => x.UnitWorkId == this.drpUnitWork.SelectedValue || x.SuperUnitWork == this.drpUnitWork.SelectedValue);
|
||||
}
|
||||
if (this.drpBranchEngineering.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
lists = lists.Where(x => x.DivisionId == this.drpBranchEngineering.SelectedValue || x.ParentId == this.drpBranchEngineering.SelectedValue);
|
||||
}
|
||||
lists = lists.OrderBy(x => x.SupUnitWorkCode).ThenBy(x => x.ChildUnitWorkCode).ThenBy(x => x.Sort).ThenBy(x => x.DivisionLevel);
|
||||
|
||||
if (lists != null)
|
||||
{
|
||||
string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId);
|
||||
newUrl = uploadfilepath.Replace("单位分部分项工程划分导入模板", projectName + "单位分部分项工程划分表");
|
||||
File.Copy(uploadfilepath, newUrl);
|
||||
// 第一步:读取文件流
|
||||
NPOI.SS.UserModel.IWorkbook workbook;
|
||||
using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
//workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
|
||||
workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream);
|
||||
}
|
||||
// 创建单元格样式
|
||||
NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle();
|
||||
cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
|
||||
cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
|
||||
cellStyle.WrapText = true;//自动换行
|
||||
var font = workbook.CreateFont();
|
||||
font.FontHeightInPoints = 11;
|
||||
cellStyle.SetFont(font);
|
||||
// 第二步:创建新数据行
|
||||
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
|
||||
NPOI.SS.UserModel.IRow row = sheet.GetRow(0);
|
||||
NPOI.SS.UserModel.ICell cell;
|
||||
int i = 2;
|
||||
foreach (var item in lists)
|
||||
{
|
||||
// 第二步:创建新数据行
|
||||
row = sheet.CreateRow(i);
|
||||
// 添加数据
|
||||
cell = row.CreateCell(0);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.SupUnitWorkCode);//单位工程编码
|
||||
|
||||
cell = row.CreateCell(1);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.SupUnitWorkName);//单位工程名称
|
||||
|
||||
cell = row.CreateCell(2);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.ChildUnitWorkCode);//子单位工程编码
|
||||
|
||||
cell = row.CreateCell(3);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.ChildUnitWorkName);//子单位工程名称
|
||||
|
||||
cell = row.CreateCell(4);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.BranchEngineeringCode);//分部工程编号
|
||||
|
||||
cell = row.CreateCell(5);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.BranchEngineeringName);//分部工程名称
|
||||
|
||||
cell = row.CreateCell(6);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.SubBranchEngineeringName);//子分部工程名称
|
||||
|
||||
cell = row.CreateCell(7);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.ProEngineeringCode);//分项工程编号
|
||||
|
||||
cell = row.CreateCell(8);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.ProEngineeringName);//分项工程名称
|
||||
|
||||
cell = row.CreateCell(9);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.ProEngineeringNum);//分部分项码
|
||||
|
||||
cell = row.CreateCell(10);
|
||||
cell.CellStyle = cellStyle;
|
||||
cell.SetCellValue(item.DivisionLevel.HasValue ? item.DivisionLevel.ToString() : "");//级别
|
||||
|
||||
i++;
|
||||
}
|
||||
// 第三步:写入文件流
|
||||
using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write))
|
||||
{
|
||||
workbook.Write(stream);
|
||||
workbook.Close();
|
||||
}
|
||||
string fileName = Path.GetFileName(newUrl);
|
||||
FileInfo info = new FileInfo(newUrl);
|
||||
long fileSize = info.Length;
|
||||
Response.Clear();
|
||||
Response.ContentType = "application/x-zip-compressed";
|
||||
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
Response.AddHeader("Content-Length", fileSize.ToString());
|
||||
Response.TransmitFile(newUrl, 0, fileSize);
|
||||
Response.Flush();
|
||||
Response.Close();
|
||||
File.Delete(newUrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("当前无记录,无法导出!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 单位工程下拉选择
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpUnitWork_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.drpBranchEngineering.Items.Clear();
|
||||
if (this.drpUnitWork.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpUnitWork.SelectedValue))
|
||||
{
|
||||
var q = (from x in Funs.DB.View_WBS_DivisionDivide
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == this.drpUnitWork.SelectedValue
|
||||
&& x.ParentId==null
|
||||
select new
|
||||
{
|
||||
x.DivisionId,
|
||||
x.BranchEngineeringName
|
||||
}).Distinct().ToList();
|
||||
this.drpBranchEngineering.DataTextField = "BranchEngineeringName";
|
||||
this.drpBranchEngineering.DataValueField = "DivisionId";
|
||||
this.drpBranchEngineering.DataSource = q;
|
||||
this.drpBranchEngineering.DataBind();
|
||||
Funs.FineUIPleaseSelect(this.drpBranchEngineering);
|
||||
this.drpBranchEngineering.SelectedIndex = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.WBS.Control {
|
||||
|
||||
|
||||
public partial class DivisionDivideList {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnitWork 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnitWork;
|
||||
|
||||
/// <summary>
|
||||
/// drpBranchEngineering 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpBranchEngineering;
|
||||
|
||||
/// <summary>
|
||||
/// btnSearch 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSearch;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnSearch" Icon="SystemSearch" ToolTip="搜索" EnablePostBack="true" runat="server" OnClick="btnSearch_Click"></f:Button>
|
||||
<%--<f:Button ID="btnSearch" Icon="SystemSearch" ToolTip="搜索" EnablePostBack="true" runat="server" OnClick="btnSearch_Click"></f:Button>--%>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnAdd" Icon="Add" ToolTip="新增" Text="新增" runat="server" OnClick="btnAdd_Click"></f:Button>
|
||||
<f:Button ID="btnParentAdd" Icon="Add" ToolTip="新增子级别" Text="新增子级别" runat="server" OnClick="btnParentAdd_Click"></f:Button>
|
||||
|
||||
@@ -74,10 +74,10 @@ namespace FineUIPro.Web.CQMS.WBS.Control
|
||||
/// <summary>
|
||||
/// 搜索
|
||||
/// </summary>
|
||||
protected void btnSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
DataBrid();
|
||||
}
|
||||
//protected void btnSearch_Click(object sender, EventArgs e)
|
||||
//{
|
||||
// DataBrid();
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
@@ -100,7 +100,7 @@ namespace FineUIPro.Web.CQMS.WBS.Control
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 新增
|
||||
/// 新增分部工程
|
||||
/// </summary>
|
||||
protected void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -7,12 +7,10 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.WBS.Control
|
||||
{
|
||||
namespace FineUIPro.Web.CQMS.WBS.Control {
|
||||
|
||||
|
||||
public partial class DivisionSubProjects
|
||||
{
|
||||
public partial class DivisionSubProjects {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -59,15 +57,6 @@ namespace FineUIPro.Web.CQMS.WBS.Control
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnSearch 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSearch;
|
||||
|
||||
/// <summary>
|
||||
/// btnAdd 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox runat="server" Label="排序" ID="txtSort" LabelAlign="Right" Required="true" LabelWidth="150"></f:NumberBox>
|
||||
<f:NumberBox runat="server" Label="排序" ID="txtSort" LabelAlign="Right" Required="true" LabelWidth="200px"></f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DivisionSubProjectsNew.aspx.cs" Inherits="FineUIPro.Web.CQMS.WBS.Control.DivisionSubProjectsNew" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>分部分项工程数据库</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false" ShowHeader="false" Layout="VBox" AutoScroll="true" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="分部分项工程数据库" EnableColumnLines="true"
|
||||
runat="server" BoxFlex="1" EnableCollapse="true" DataKeyNames="DivisionId,ParentId,DivisionLevel,Status" EnableTree="true"
|
||||
TreeColumn="BranchEngineeringCode" DataIDField="DivisionId" AllowPaging="false" DataParentIDField="ParentId"
|
||||
AllowCellEditing="false" ClicksToEdit="1" OnRowCommand="Grid1_RowCommand" EnableRowSelectEvent="true" OnRowSelect="Grid1_RowSelect" ExpandAllTreeNodes="true" EnableMultiSelect="false">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" runat="server">
|
||||
<Items>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnAdd" Icon="Add" ToolTip="新增分部工程" Text="新增分部工程" runat="server" OnClick="btnAdd_Click" Hidden="true"></f:Button>
|
||||
<f:Button ID="btnParentAdd" Icon="Add" ToolTip="新增分项工程" Text="新增分项工程" runat="server" OnClick="btnParentAdd_Click" Hidden="true"></f:Button>
|
||||
<f:Button ID="btnEdit" Icon="BulletEdit" ToolTip="编辑" Text="编辑" runat="server" OnClick="btnEdit_Click" Hidden="true"></f:Button>
|
||||
<f:Button ID="btnDelete" Text="删除" Icon="Delete" OnClick="btnDelete_Click" ConfirmText="删除当前选中数据和所有子节点数据?" runat="server" Hidden="true"></f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RowNumberField />
|
||||
<f:RenderField ColumnID="BranchEngineeringCode" Width="150px" DataField="BranchEngineeringCode" HeaderText="分部工程编号" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="BranchEngineeringName" Width="200px" DataField="BranchEngineeringName" HeaderText="分部工程名称" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="SubBranchEngineeringName" Width="200px" DataField="SubBranchEngineeringName" HeaderText="子分部工程名称" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="ProEngineeringName" Width="200px" DataField="ProEngineeringName" HeaderText="分项工程名称" HeaderTextAlign="Center" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="ProEngineeringCode" Width="150px" DataField="ProEngineeringCode" HeaderText="分项工程编号" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="ProEngineeringNum" Width="150px" DataField="ProEngineeringNum" HeaderText="分部分项码" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField ColumnID="DivisionLevel" Width="90px" DataField="DivisionLevel" HeaderText="级别" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="Sort" DataField="Sort" HeaderText="排序" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<%--<f:RenderField Width="120px" ColumnID="OperateTime" DataField="OperateTime" HeaderText="操作日期" FieldType="Date"
|
||||
Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderTextAlign="Center">
|
||||
</f:RenderField>--%>
|
||||
<%--<f:LinkButtonField Width="100px" ConfirmText="删除当前选中数据?" ColumnID="Delete" ToolTip="删除" HeaderText="删除" ConfirmTarget="Top"
|
||||
CommandName="Delete" Icon="Delete" HeaderTextAlign="Center" TextAlign="Center"/>--%>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Hidden="true" EnableIFrame="true" EnableMaximize="true" Title="编辑"
|
||||
Target="Parent" EnableResize="true" runat="server" IsModal="true" OnClose="Window1_Close" CloseAction="HidePostBack"
|
||||
Width="700px" Height="490px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<Items>
|
||||
<f:MenuButton ID="btnMenuParentAdd" EnablePostBack="true" runat="server" Text="新增子分部工程" Icon="Add"
|
||||
OnClick="btnMenuParentAdd_Click" Hidden="true">
|
||||
</f:MenuButton>
|
||||
</Items>
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,232 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.WBS.Control
|
||||
{
|
||||
public partial class DivisionSubProjectsNew : PageBase
|
||||
{
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
GetButtonPower();
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 数据绑定
|
||||
/// </summary>
|
||||
public void BindGrid()
|
||||
{
|
||||
string strSql = @"select * from(select a.DivisionId,a.ProjectId,a.ParentId,a.DivisionLevel,a.BranchEngineeringCode,a.BranchEngineeringName,a.SubBranchEngineeringName,a.ProEngineeringCode,a.ProEngineeringName,a.ProEngineeringNum,a.Remark,a.AddUser,a.OperateTime,a.Sort,a.Status from Division_SubProjects as a where isnull(a.ProjectId,'')='' ";
|
||||
string strSql1 = @"select a.DivisionId,a.ProjectId,a.ParentId,a.DivisionLevel,a.BranchEngineeringCode,a.BranchEngineeringName,a.SubBranchEngineeringName,a.ProEngineeringCode,a.ProEngineeringName,a.ProEngineeringNum,a.Remark,a.AddUser,a.OperateTime,a.Sort,a.Status from Division_SubProjects as a inner join Base_Project as b on a.ProjectId=b.ProjectId where a.ProjectId=@ProjectId ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
var zxsql = strSql + " union all " + strSql1 + " ) as t order by t.BranchEngineeringCode,t.Sort,t.DivisionLevel,t.ProEngineeringNum asc";
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(zxsql, parameter);
|
||||
Grid1.DataSource = tb;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 删除
|
||||
/// <summary>
|
||||
/// 行点击 事件
|
||||
/// </summary>
|
||||
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
|
||||
{
|
||||
if (e.CommandName == "Delete")
|
||||
{
|
||||
string rowID = e.RowID;
|
||||
if (!string.IsNullOrEmpty(rowID))
|
||||
{
|
||||
BLL.SubProjectsService.DeleteSubProjectsById(rowID);
|
||||
BindGrid();
|
||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
protected void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("至少选择一条数据!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
|
||||
if (!string.IsNullOrEmpty(rowID))
|
||||
{
|
||||
BLL.SubProjectsService.DeleteSubProjectsById(rowID);
|
||||
}
|
||||
}
|
||||
BindGrid();
|
||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 新增
|
||||
/// <summary>
|
||||
/// 新增分部工程
|
||||
/// </summary>
|
||||
protected void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DivisionSubProjectsNewEdit.aspx?type=1", "新增 - ")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 新增分项工程
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnParentAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请选择一条数据!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
var sub = BLL.SubProjectsService.GetSubProjectsById(this.Grid1.SelectedRowID);
|
||||
if (sub!=null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(sub.ProEngineeringName))
|
||||
{
|
||||
Alert.ShowInTop("分项工程下不能新增!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DivisionSubProjectsNewEdit.aspx?ParentId={0}&&type=2", this.Grid1.SelectedRowID, "新增分项工程 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 编辑
|
||||
/// <summary>
|
||||
/// 编辑
|
||||
/// </summary>
|
||||
protected void btnEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请选择一条数据!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
var rowId = this.Grid1.SelectedRowID;
|
||||
var division = BLL.SubProjectsService.GetSubProjectsById(rowId);
|
||||
if (division != null)
|
||||
{
|
||||
string type = string.Empty;
|
||||
if (!string.IsNullOrEmpty(division.SubBranchEngineeringName))
|
||||
{
|
||||
type = "1";//子分部工程
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(division.ProEngineeringName))
|
||||
{
|
||||
type = "2";//分项工程
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DivisionSubProjectsNewEdit.aspx?DivisionId={0}&ParentId={1}&type={2}", rowId, division.ParentId, type, "新增分项工程 - ")));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 关闭弹出窗口
|
||||
/// <summary>
|
||||
/// 关闭
|
||||
/// </summary>
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 右击新增子单位工程
|
||||
/// <summary>
|
||||
/// 右击新增子单位工程
|
||||
/// </summary>
|
||||
protected void btnMenuParentAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请选择一条数据!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DivisionSubProjectsNewEdit.aspx?ParentId={0}&&type=1", this.Grid1.SelectedRowID, "新增子分部工程 - ")));
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 行选择事件
|
||||
/// <summary>
|
||||
/// 行选择事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowSelect(object sender, GridRowSelectEventArgs e)
|
||||
{
|
||||
string rowid = e.RowID.ToString();
|
||||
if (!string.IsNullOrEmpty(rowid))
|
||||
{
|
||||
var sub = BLL.SubProjectsService.GetSubProjectsById(rowid);
|
||||
if (sub != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(sub.ParentId))
|
||||
{
|
||||
this.btnMenuParentAdd.Hidden = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.btnMenuParentAdd.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
if (Request.Params["value"] == "0")
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.DivisionSubProjectsMenuId);
|
||||
if (buttonList.Count > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
this.btnAdd.Hidden = false;
|
||||
this.btnMenuParentAdd.Hidden = false;
|
||||
this.btnParentAdd.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
this.btnEdit.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||
{
|
||||
this.btnDelete.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+123
@@ -0,0 +1,123 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.WBS.Control {
|
||||
|
||||
|
||||
public partial class DivisionSubProjectsNew {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnAdd 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAdd;
|
||||
|
||||
/// <summary>
|
||||
/// btnParentAdd 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnParentAdd;
|
||||
|
||||
/// <summary>
|
||||
/// btnEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDelete;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuParentAdd 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuParentAdd;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DivisionSubProjectsNewEdit.aspx.cs" Inherits="FineUIPro.Web.CQMS.WBS.Control.DivisionSubProjectsNewEdit" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>编辑分部分项工程</title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtBranchEngineeringCode" runat="server" Label="分部工程编号" LabelWidth="140px" Required="true" ShowRedStar="true" FocusOnPageLoad="true"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtBranchEngineeringName" runat="server" Label="分部工程名称" LabelWidth="140px" Required="true" ShowRedStar="true"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow ID="childBra" runat="server" Hidden="true">
|
||||
<Items>
|
||||
<f:TextBox ID="txtSubBranchEngineeringName" runat="server" Label="子分部工程名称" LabelWidth="140px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Hidden="true">
|
||||
<Items>
|
||||
<f:Form ID="Form2" runat="server" ShowBorder="false" ShowHeader="false">
|
||||
<Items>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtProEngineeringName" runat="server" Label="分项工程名称" LabelWidth="140px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtProEngineeringCode" runat="server" Label="分项工程编号" LabelWidth="140px" AutoPostBack="true" OnTextChanged="txtProEngineeringCode_TextChanged"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtProEngineeringNum" runat="server" Label="分部分项码" LabelWidth="140px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Items>
|
||||
</f:Form>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:NumberBox runat="server" Label="排序" ID="txtSort" LabelAlign="Right" Required="true" LabelWidth="140px"></f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea runat="server" ID="txtRemark" Label="备注" LabelAlign="Right" LabelWidth="140px"></f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存数据" ValidateForms="SimpleForm1"
|
||||
OnClick="btnSave_Click" Hidden="true">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,344 @@
|
||||
using BLL;
|
||||
using System;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.WBS.Control
|
||||
{
|
||||
public partial class DivisionSubProjectsNewEdit :PageBase
|
||||
{
|
||||
#region 定义变量
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string DivisionId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["DivisionId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["DivisionId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上级Id
|
||||
/// </summary>
|
||||
public string ParentId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ParentId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ParentId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 1-分部,2-分项
|
||||
/// </summary>
|
||||
public string Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Type"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Type"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
GetButtonPower();
|
||||
this.Type = Request.Params["type"];
|
||||
this.DivisionId = Request.Params["DivisionId"];
|
||||
this.ParentId = Request.Params["ParentId"];
|
||||
if (!string.IsNullOrEmpty(this.ParentId))
|
||||
{
|
||||
Model.Division_SubProjects subProjects = BLL.SubProjectsService.GetSubProjectsById(this.ParentId);
|
||||
if (subProjects != null)
|
||||
{
|
||||
this.txtBranchEngineeringCode.Text = subProjects.BranchEngineeringCode;
|
||||
this.txtBranchEngineeringName.Text = subProjects.BranchEngineeringName;
|
||||
|
||||
if (this.Type == "1")//子分部工程
|
||||
{
|
||||
this.txtSubBranchEngineeringName.Required = true;
|
||||
this.txtSubBranchEngineeringName.ShowRedStar = true;
|
||||
|
||||
if (!string.IsNullOrEmpty(this.DivisionId))
|
||||
{
|
||||
var divis = BLL.SubProjectsService.GetSubProjectsById(this.DivisionId);
|
||||
if (divis != null)
|
||||
{
|
||||
this.txtSubBranchEngineeringName.Text = divis.SubBranchEngineeringName;
|
||||
this.txtSort.Text = divis.Sort.HasValue ? divis.Sort.ToString() : "";
|
||||
this.txtRemark.Text = divis.Remark;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//自动获取排序号
|
||||
int sort = BLL.SubProjectsService.GetSubProjectsByProjectId(this.CurrUser.LoginProjectId);
|
||||
if (sort > 0)
|
||||
{
|
||||
this.txtSort.Text = (sort + 1).ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (this.Type == "2")//分项工程
|
||||
{
|
||||
this.txtSubBranchEngineeringName.Required = true;
|
||||
this.txtSubBranchEngineeringName.ShowRedStar = true;
|
||||
this.txtProEngineeringName.Required = true;
|
||||
this.txtProEngineeringName.ShowRedStar = true;
|
||||
this.txtProEngineeringCode.Required = true;
|
||||
this.txtProEngineeringCode.ShowRedStar = true;
|
||||
this.txtProEngineeringNum.Required = true;
|
||||
this.txtProEngineeringNum.ShowRedStar = true;
|
||||
|
||||
var sub = BLL.SubProjectsService.GetSubProjectsById(subProjects.ParentId);
|
||||
if (sub != null)
|
||||
{
|
||||
this.txtBranchEngineeringName.Text = sub.BranchEngineeringName;
|
||||
}
|
||||
this.txtSubBranchEngineeringName.Text = subProjects.SubBranchEngineeringName;
|
||||
if (!string.IsNullOrEmpty(this.DivisionId))
|
||||
{
|
||||
var divis = BLL.SubProjectsService.GetSubProjectsById(this.DivisionId);
|
||||
if (divis != null)
|
||||
{
|
||||
this.txtProEngineeringName.Text = divis.ProEngineeringName;
|
||||
this.txtProEngineeringCode.Text = divis.ProEngineeringCode;
|
||||
this.txtProEngineeringNum.Text = divis.ProEngineeringNum;
|
||||
this.txtSort.Text = divis.Sort.HasValue ? divis.Sort.ToString() : "";
|
||||
this.txtRemark.Text = divis.Remark;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//自动获取排序号
|
||||
int sort = BLL.SubProjectsService.GetSubProjectsByProjectId(this.CurrUser.LoginProjectId);
|
||||
if (sort > 0)
|
||||
{
|
||||
this.txtSort.Text = (sort + 1).ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else //分部工程
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.DivisionId))
|
||||
{
|
||||
Model.Division_SubProjects subProjects = BLL.SubProjectsService.GetSubProjectsById(this.DivisionId);
|
||||
if (subProjects != null)
|
||||
{
|
||||
this.txtBranchEngineeringCode.Text = subProjects.BranchEngineeringCode;
|
||||
this.txtBranchEngineeringName.Text = subProjects.BranchEngineeringName;
|
||||
this.txtRemark.Text = subProjects.Remark;
|
||||
this.txtSort.Text = subProjects.Sort.HasValue ? subProjects.Sort.ToString() : "";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//自动获取排序号
|
||||
int sort = BLL.SubProjectsService.GetSubProjectsByProjectId(this.CurrUser.LoginProjectId);
|
||||
if (sort > 0)
|
||||
{
|
||||
this.txtSort.Text = (sort + 1).ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.txtSort.Text = "1";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.ParentId))
|
||||
{
|
||||
this.txtBranchEngineeringCode.Readonly = true;
|
||||
this.txtBranchEngineeringName.Readonly = true;
|
||||
if (this.Type == "1")//子分部工程
|
||||
{
|
||||
this.Panel1.Hidden = true;
|
||||
this.childBra.Hidden = false;
|
||||
}
|
||||
else if (this.Type == "2")//分项工程
|
||||
{
|
||||
var pare = BLL.SubProjectsService.GetSubProjectsById(this.ParentId);
|
||||
if (pare != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(pare.ParentId))
|
||||
{
|
||||
this.childBra.Hidden = false;
|
||||
this.txtSubBranchEngineeringName.Readonly = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.childBra.Hidden = true;
|
||||
}
|
||||
}
|
||||
this.Panel1.Hidden = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Panel1.Hidden = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 保存
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
Model.Division_SubProjects newSubProjects = new Model.Division_SubProjects();
|
||||
newSubProjects.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newSubProjects.BranchEngineeringCode = this.txtBranchEngineeringCode.Text.Trim();
|
||||
newSubProjects.Remark = this.txtRemark.Text.Trim();
|
||||
newSubProjects.AddUser = this.CurrUser.UserId;
|
||||
newSubProjects.OperateTime = DateTime.Now;
|
||||
newSubProjects.Sort = Funs.GetNewInt(this.txtSort.Text.Trim());
|
||||
if (!string.IsNullOrEmpty(this.ParentId))
|
||||
{
|
||||
newSubProjects.ParentId = this.ParentId;
|
||||
if (this.Type == "1")//子分部工程
|
||||
{
|
||||
newSubProjects.SubBranchEngineeringName = this.txtSubBranchEngineeringName.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(this.DivisionId))
|
||||
{
|
||||
var div = BLL.SubProjectsService.GetSubProjectsById(this.DivisionId);
|
||||
if(div!=null)
|
||||
{
|
||||
newSubProjects.DivisionLevel = div.DivisionLevel;
|
||||
}
|
||||
newSubProjects.DivisionId = this.DivisionId;
|
||||
BLL.SubProjectsService.UpdateSubProjects(newSubProjects);
|
||||
}
|
||||
else
|
||||
{
|
||||
//var sub = BLL.SubProjectsService.GetSubProjectsById(this.ParentId);
|
||||
//if (sub.DivisionLevel == 1)
|
||||
//{
|
||||
newSubProjects.DivisionLevel = 2;
|
||||
//}
|
||||
newSubProjects.ProEngineeringName = this.txtProEngineeringName.Text.Trim();
|
||||
newSubProjects.DivisionId = SQLHelper.GetNewID(typeof(Model.Division_SubProjects));
|
||||
this.DivisionId = newSubProjects.DivisionId;
|
||||
BLL.SubProjectsService.AddSubProjects(newSubProjects);
|
||||
}
|
||||
}
|
||||
else if (this.Type == "2")//分项工程
|
||||
{
|
||||
newSubProjects.ProEngineeringName = this.txtProEngineeringName.Text.Trim();
|
||||
newSubProjects.ProEngineeringCode = this.txtProEngineeringCode.Text.Trim();
|
||||
newSubProjects.ProEngineeringNum = this.txtProEngineeringNum.Text.Trim();
|
||||
|
||||
if (!string.IsNullOrEmpty(this.DivisionId))
|
||||
{
|
||||
var div = BLL.SubProjectsService.GetSubProjectsById(this.DivisionId);
|
||||
if (div != null)
|
||||
{
|
||||
newSubProjects.DivisionLevel = div.DivisionLevel;
|
||||
}
|
||||
newSubProjects.DivisionId = this.DivisionId;
|
||||
BLL.SubProjectsService.UpdateSubProjects(newSubProjects);
|
||||
}
|
||||
else
|
||||
{
|
||||
//var sub = BLL.SubProjectsService.GetSubProjectsById(this.ParentId);
|
||||
//if (sub.DivisionLevel == 1)
|
||||
//{
|
||||
// newSubProjects.DivisionLevel = 2;
|
||||
//}
|
||||
//else if (sub.DivisionLevel==2)
|
||||
//{
|
||||
newSubProjects.DivisionLevel = 3;
|
||||
//}
|
||||
newSubProjects.DivisionId = SQLHelper.GetNewID(typeof(Model.Division_SubProjects));
|
||||
this.DivisionId = newSubProjects.DivisionId;
|
||||
BLL.SubProjectsService.AddSubProjects(newSubProjects);
|
||||
}
|
||||
}
|
||||
}
|
||||
else //分部工程
|
||||
{
|
||||
newSubProjects.BranchEngineeringName = this.txtBranchEngineeringName.Text.Trim();
|
||||
newSubProjects.DivisionLevel = 1;
|
||||
newSubProjects.ProEngineeringCode = "00";
|
||||
newSubProjects.ProEngineeringNum = newSubProjects.BranchEngineeringCode + "00";
|
||||
if (!string.IsNullOrEmpty(this.DivisionId))
|
||||
{
|
||||
newSubProjects.DivisionId = this.DivisionId;
|
||||
BLL.SubProjectsService.UpdateSubProjects(newSubProjects);
|
||||
}
|
||||
else
|
||||
{
|
||||
newSubProjects.DivisionId = SQLHelper.GetNewID(typeof(Model.Division_SubProjects));
|
||||
this.DivisionId = newSubProjects.DivisionId;
|
||||
BLL.SubProjectsService.AddSubProjects(newSubProjects);
|
||||
}
|
||||
}
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 分项工程编号触发事件
|
||||
/// <summary>
|
||||
/// 分项工程编号触发事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtProEngineeringCode_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.txtProEngineeringNum.Text = string.Empty;
|
||||
if (!string.IsNullOrEmpty(this.txtBranchEngineeringCode.Text.Trim())&&!string.IsNullOrEmpty(this.txtProEngineeringCode.Text.Trim()))
|
||||
{
|
||||
this.txtProEngineeringNum.Text = this.txtBranchEngineeringCode.Text.Trim() + this.txtProEngineeringCode.Text.Trim();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
if (Request.Params["value"] == "0")
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.DivisionSubProjectsMenuId);
|
||||
if (buttonList.Count > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnSave))
|
||||
{
|
||||
this.btnSave.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+159
@@ -0,0 +1,159 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.WBS.Control {
|
||||
|
||||
|
||||
public partial class DivisionSubProjectsNewEdit {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// txtBranchEngineeringCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtBranchEngineeringCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtBranchEngineeringName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtBranchEngineeringName;
|
||||
|
||||
/// <summary>
|
||||
/// childBra 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FormRow childBra;
|
||||
|
||||
/// <summary>
|
||||
/// txtSubBranchEngineeringName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSubBranchEngineeringName;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Form2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form Form2;
|
||||
|
||||
/// <summary>
|
||||
/// txtProEngineeringName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtProEngineeringName;
|
||||
|
||||
/// <summary>
|
||||
/// txtProEngineeringCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtProEngineeringCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtProEngineeringNum 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtProEngineeringNum;
|
||||
|
||||
/// <summary>
|
||||
/// txtSort 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtSort;
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtRemark;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user