diff --git a/DataBase/版本日志/SGGLDB_V2025-07-02-001-bwj.sql b/DataBase/版本日志/SGGLDB_V2025-07-02-001-bwj.sql new file mode 100644 index 00000000..d9bfa7b2 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2025-07-02-001-bwj.sql @@ -0,0 +1,33 @@ + +alter table PTP_PipelineList add TestPackageNo varchar(50) +go + +ALTER VIEW [dbo].[View_TestPackage_PipelineList] +as +/*********ѹϸ**********/ +select l.PT_PipeId, +l.PTP_ID, +l.PipelineId, +l.TestPressure, +t.ProjectId, +t.TestPackageNo, +t.TestPackageName, +t.Remark, +t.UnitWorkId, +t.Tabler, +t.TableDate, +p.PipelineCode, +uw.UnitWorkCode, +uw.UnitWorkName, +uw.UnitId, +u.UnitCode, +u.UnitName, +t.adjustTestPressure +from PTP_PipelineList l +left join PTP_TestPackage as t on t.PTP_ID=l.PTP_ID +left join HJGL_Pipeline p on p.PipelineId = l.PipelineId +left join WBS_UnitWork uw on uw.UnitWorkId = t.UnitWorkId +left join Base_Unit u on u.UnitId =uw.UnitId +GO + + diff --git a/DataBase/版本日志/SGGLDB_V2025-07-10-001-bwj.sql b/DataBase/版本日志/SGGLDB_V2025-07-10-001-bwj.sql new file mode 100644 index 00000000..8b7c1f05 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2025-07-10-001-bwj.sql @@ -0,0 +1,9 @@ + +insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +values('244F69AE-EBD0-4DFA-A959-E13CE8D85968','ѹ','HJGL/TestPackage/TestPackageData.aspx',60,'A24B7926-EF69-456E-8A24-936D30384680','Menu_HJGL',0,1,1) +go + +alter table [dbo].[PTP_TestPackage] add PrintState int +go +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ӡ״̬δӡһ......δӡ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PTP_TestPackage', @level2type=N'COLUMN',@level2name=N'PrintState' +GO \ No newline at end of file diff --git a/DataBase/版本日志/SGGLDB_V2025-07-11-001-gaofei.sql b/DataBase/版本日志/SGGLDB_V2025-07-11-001-gaofei.sql new file mode 100644 index 00000000..222e2d5b --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2025-07-11-001-gaofei.sql @@ -0,0 +1,37 @@ +alter table Information_ActionWorkLedger add KeyWorkNum int null +alter table Information_ActionWorkLedger add KeyWorkOKNum int null +alter table Information_ActionWorkLedger add KeyWorkOKRate nvarchar(20) null +GO + + + +ALTER VIEW [dbo].[View_Information_ActionWorkLedger] AS +SELECT + Report.ActionWorkLedgerId, + Report.UnitId, + Report.ReportDate, + Report.YearId, + Report.Quarter, + Report.UpState, + Report.HandleState, + Report.KeyWorkNum, + Report.KeyWorkOKNum, + Report.KeyWorkOKRate, + (ISNULL(Group_0008.ConstText,'-') + ISNULL(Group_0011.ConstText,'-')) AS Quarters, + u.UnitName, + Report.HandleMan, + US.PersonName as 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 Person_Persons AS US ON US.PersonId=Report.HandleMan + + + + + + + +GO + diff --git a/DataBase/版本日志/SGGLDB_V2025-07-18-001-gaofei.sql b/DataBase/版本日志/SGGLDB_V2025-07-18-001-gaofei.sql new file mode 100644 index 00000000..290e0ce2 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2025-07-18-001-gaofei.sql @@ -0,0 +1,44 @@ +alter table Information_MillionsMonthlyReport add KeyWorkNum int null +alter table Information_MillionsMonthlyReport add KeyWorkOKNum int null +alter table Information_MillionsMonthlyReport add KeyWorkOKRate nvarchar(20) null +GO + + +/*************ҵʱȫͳ±**************/ +ALTER VIEW [dbo].[View_Information_MillionsMonthlyReport] +AS +SELECT +Report.MillionsMonthlyReportId, +Report.UnitId, +Report.FillingDate, +Report.UpState, +(ISNULL(Group_0008.ConstText,'-') + ISNULL(Group_0009.ConstText,'-')) AS ReportDate, +Group_0008.ConstText as YearStr, +Group_0009.ConstText as MonthStr, +U.UnitName, +Report.Year, +Report.Month, +Report.DutyPerson, +Report.RecordableIncidentRate, +Report.LostTimeRate, +Report.LostTimeInjuryRate, +Report.DeathAccidentFrequency, +Report.AccidentMortality, +Report.HandleState, +Report.KeyWorkNum, +Report.KeyWorkOKNum, +Report.KeyWorkOKRate, +Report.HandleMan, +US.PersonName AS UserName +FROM dbo.Information_MillionsMonthlyReport AS Report +LEFT JOIN Base_Unit AS U ON U.UnitId=Report.UnitId +LEFT JOIN Sys_Const AS Group_0008 ON Group_0008.GroupId='0008' AND Group_0008.ConstValue =Report.[Year] +LEFT JOIN Sys_Const AS Group_0009 ON Group_0009.GroupId='0009' AND Group_0009.ConstValue =Report.[Month] +LEFT JOIN Person_Persons AS US ON US.PersonId=Report.HandleMan + + + +GO + + + diff --git a/DataBase/版本日志/SGGLDB_V2025-07-23-001-bwj.sql b/DataBase/版本日志/SGGLDB_V2025-07-23-001-bwj.sql new file mode 100644 index 00000000..9936db78 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2025-07-23-001-bwj.sql @@ -0,0 +1,10 @@ + +update Sys_Menu set SortIndex='15' where MenuId='53948077-B51D-4FF3-BFB0-AB4E27C42875'--Ųƻ +update Sys_Menu set SortIndex='40' where MenuId='BD9C587E-17C2-49F1-82AE-A05117E41D89'--װ嵥 +update Sys_Menu set SortIndex='50' where MenuId='EEC0D060-C15E-4D25-B015-C2B91F735DAC'--ι +update Sys_Menu set SortIndex='60' where MenuId='25DED954-10C9-47CC-99F2-C44FDE9E0A81'-- +go + +update Sys_Menu set MenuName='װ' where MenuId='25DED954-10C9-47CC-99F2-C44FDE9E0A81'--Ϊװ +update Sys_Menu set MenuName='' where MenuId='EEC0D060-C15E-4D25-B015-C2B91F735DAC'--ιΪ +go \ No newline at end of file diff --git a/DataBase/版本日志/SGGLDB_V2025-08-01-001-gaofei.sql b/DataBase/版本日志/SGGLDB_V2025-08-01-001-gaofei.sql new file mode 100644 index 00000000..42cf6e6d --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2025-08-01-001-gaofei.sql @@ -0,0 +1,2 @@ +alter table SitePerson_Person add IsCQMSCheck bit null +GO \ No newline at end of file diff --git a/DataBase/版本日志/SGGLDB_V2025-08-03-001-bwj.sql b/DataBase/版本日志/SGGLDB_V2025-08-03-001-bwj.sql new file mode 100644 index 00000000..3ca5eb4b --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2025-08-03-001-bwj.sql @@ -0,0 +1,176 @@ +alter table HJGL_PackagingManage add CompileMan nvarchar(50) +alter table HJGL_PackagingManage add CompileDate datetime +go +ALTER TABLE [dbo].[PTP_TestPackage] DROP CONSTRAINT [FK_PTP_TestPackage_Base_Unit] +GO +alter table PTP_TestPackage alter column UnitId nvarchar(500) +go + +alter table HJGL_ProductionSchedulingPlan alter column CompletedCount decimal(18,2) +alter table HJGL_ProductionSchedulingPlan add OnDayCompleteDyne decimal(18,2) +alter table HJGL_ProductionSchedulingPlan add NextDayCompleteDyne decimal(18,2) +go +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HJGL_ProductionSchedulingPlan', @level2type=N'COLUMN',@level2name=N'OnDayCompleteDyne' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ӧ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HJGL_ProductionSchedulingPlan', @level2type=N'COLUMN',@level2name=N'NextDayCompleteDyne' +GO + + +ALTER PROCEDURE [dbo].[Sp_ProductionSchedulingPlanStatistics] + @projectId nvarchar(50)=null, + @unitWorkId nvarchar(50)=null, + @flowingSection nvarchar(50)=null, + @caliber nvarchar(50)=null +AS +/************Ųƻͳ**********/ +SELECT distinct unitWork.UnitWorkId, +unitWork.UnitWorkCode, +unitWork.UnitWorkName, +unitWork.ProjectId, +pipeline.FlowingSection, +p.SteelType, +(case p.SteelType when '1' then '̼' when '2' then '' when '3' then '' when '4' then 'ͺϽ' when '5' then 'Ͻ' when '6' then 'ѺϽ' when '7' then '' end) as Material, +'<'+ @caliber as Caliber +--isnull(weldJoint.Dia,0) as Dia, +--isnull(maxDia.maxTotalDia+weldJoint.Dia,0) as totalDia, +--isnull(cTotal.cTotalCount,0) as cTotalCount, +--(case when isnull(total.totalCount,0)>0 then +--isnull(cTotal.cTotalCount,0) / isnull(cast(total.totalCount as decimal(18,2)),0)*100.0 else 0 end) as rate, +--(case when isnull(ScTotal.ScTotalCount,0)>0 then +--isnull(Stotal.StotalCount,0)/isnull(cast(ScTotal.ScTotalCount as decimal(18,2)),0)*100.0 else 0 end)as Srate +FROM WBS_UnitWork AS unitWork +LEFT JOIN (select FlowingSection,UnitWorkId from HJGL_Pipeline where PipeArea='1' and FlowingSection is not null and FlowingSection!='') as pipeline on pipeline.UnitWorkId = unitWork.UnitWorkId +-- +left join (select SteelType,UnitWorkId from HJGL_Pipeline + left join Base_Material on Base_Material.MaterialId = HJGL_Pipeline.MaterialId + where PipeArea='1' and HJGL_Pipeline.MaterialId is not null and HJGL_Pipeline.MaterialId!='' + )as p on p.UnitWorkId = unitWork.UnitWorkId +---- +--LEFT JOIN (select sum(Size) as Dia,HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia from HJGL_WeldJoint +-- left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId +-- left join Base_Material on Base_Material.MaterialId = HJGL_WeldJoint.Material1Id +-- where HJGL_Pipeline.PipeArea='1' and HJGL_WeldJoint.JointAttribute='Ԥƿ' +-- and cast(SUBSTRING(HJGL_WeldJoint.DNDia,CHARINDEX('N',HJGL_WeldJoint.DNDia)+1,len(HJGL_WeldJoint.DNDia)-charindex('N',HJGL_WeldJoint.DNDia)) as int)<@caliber +-- group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia) as weldJoint on weldJoint.UnitWorkId =unitWork.UnitWorkId +-- and weldJoint.FlowingSection = pipeline.FlowingSection +----ڿھĴ +LEFT JOIN (select sum(Size) as maxTotalDia,HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia from HJGL_WeldJoint + left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId + left join Base_Material on Base_Material.MaterialId = HJGL_WeldJoint.Material1Id + where HJGL_Pipeline.PipeArea='1' and HJGL_WeldJoint.JointAttribute='Ԥƿ' + and cast(SUBSTRING(HJGL_WeldJoint.DNDia,CHARINDEX('N',HJGL_WeldJoint.DNDia)+1,len(HJGL_WeldJoint.DNDia)-charindex('N',HJGL_WeldJoint.DNDia)) as int)>=@caliber + group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia) as maxDia on maxDia.UnitWorkId =unitWork.UnitWorkId + and maxDia.FlowingSection = pipeline.FlowingSection +----ܺ +--LEFT JOIN (select count(*) as totalCount,HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia from HJGL_WeldJoint +-- left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId +-- left join Base_Material on Base_Material.MaterialId = HJGL_WeldJoint.Material1Id +-- where HJGL_Pipeline.PipeArea='1' and HJGL_WeldJoint.JointAttribute='Ԥƿ' +-- and cast(SUBSTRING(HJGL_WeldJoint.DNDia,CHARINDEX('N',HJGL_WeldJoint.DNDia)+1,len(HJGL_WeldJoint.DNDia)-charindex('N',HJGL_WeldJoint.DNDia)) as int)<@caliber +-- group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia) as total on total.UnitWorkId =unitWork.UnitWorkId +-- and total.FlowingSection = pipeline.FlowingSection +----ɺ +--LEFT JOIN (select count(*) as cTotalCount,HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia from HJGL_WeldJoint +-- left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId +-- left join Base_Material on Base_Material.MaterialId = HJGL_WeldJoint.Material1Id +-- where HJGL_Pipeline.PipeArea='1' and HJGL_WeldJoint.JointAttribute='Ԥƿ' +-- and cast(SUBSTRING(HJGL_WeldJoint.DNDia,CHARINDEX('N',HJGL_WeldJoint.DNDia)+1,len(HJGL_WeldJoint.DNDia)-charindex('N',HJGL_WeldJoint.DNDia)) as int)<@caliber +-- and HJGL_WeldJoint.WeldingDailyId is not null +-- group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia) as cTotal on cTotal.UnitWorkId =unitWork.UnitWorkId +-- and cTotal.FlowingSection = pipeline.FlowingSection +----ܺ +--LEFT JOIN (select count(*) as StotalCount,HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection from HJGL_WeldJoint +-- left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId +-- where HJGL_Pipeline.PipeArea='1' and HJGL_WeldJoint.JointAttribute='Ԥƿ' +-- group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection) as Stotal on Stotal.UnitWorkId =unitWork.UnitWorkId +-- and total.FlowingSection = pipeline.FlowingSection +----ɺ +--LEFT JOIN (select count(*) as ScTotalCount,HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection from HJGL_WeldJoint +-- left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId +-- where HJGL_Pipeline.PipeArea='1' and HJGL_WeldJoint.JointAttribute='Ԥƿ' +-- and HJGL_WeldJoint.WeldingDailyId is not null +-- group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection) as ScTotal on ScTotal.UnitWorkId =unitWork.UnitWorkId +-- and cTotal.FlowingSection = pipeline.FlowingSection +where (unitWork.ProjectId=@projectId or @projectId is null) +and (unitWork.UnitWorkId=@unitWorkId or @unitWorkId is null) +and (pipeline.FlowingSection=@flowingSection or @flowingSection is null) +union + +SELECT distinct unitWork.UnitWorkId, +unitWork.UnitWorkCode, +unitWork.UnitWorkName, +unitWork.ProjectId, +pipeline.FlowingSection, +p.SteelType, +(case p.SteelType when '1' then '̼' when '2' then '' when '3' then '' when '4' then 'ͺϽ' when '5' then 'Ͻ' when '6' then 'ѺϽ' when '7' then '' end) as Material, +''+@caliber as Caliber +--isnull(weldJoint.Dia,0) as Dia, +--isnull(weldJoint.Dia+minDia.minTotalDia,0) as TotalDia, +--isnull(cTotal.cTotalCount,0) as cTotalCount, +--(case when isnull(total.totalCount,0)>0 then +--isnull(cTotal.cTotalCount,0) / isnull(cast(total.totalCount as decimal(18,2)),0)*100.0 else 0 end) as rate, +--(case when isnull(ScTotal.ScTotalCount,0)>0 then +--isnull(Stotal.StotalCount,0)/isnull(cast(ScTotal.ScTotalCount as decimal(18,2)),0)*100.0 else 0 end)as Srate +FROM WBS_UnitWork AS unitWork +LEFT JOIN (select FlowingSection,UnitWorkId from HJGL_Pipeline where PipeArea='1' and FlowingSection is not null and FlowingSection!='') as pipeline on pipeline.UnitWorkId = unitWork.UnitWorkId + +-- +left join (select SteelType,UnitWorkId from HJGL_Pipeline + left join Base_Material on Base_Material.MaterialId = HJGL_Pipeline.MaterialId + where PipeArea='1' and HJGL_Pipeline.MaterialId is not null and HJGL_Pipeline.MaterialId!='' + )as p on p.UnitWorkId = unitWork.UnitWorkId + +--LEFT JOIN (select sum(Size) as Dia,HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia from HJGL_WeldJoint +-- left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId +-- left join Base_Material on Base_Material.MaterialId = HJGL_WeldJoint.Material1Id +-- where HJGL_Pipeline.PipeArea='1' and HJGL_WeldJoint.JointAttribute='Ԥƿ' +-- and cast(SUBSTRING(HJGL_WeldJoint.DNDia,CHARINDEX('N',HJGL_WeldJoint.DNDia)+1,len(HJGL_WeldJoint.DNDia)-charindex('N',HJGL_WeldJoint.DNDia)) as int)>=@caliber +-- group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia) as weldJoint on weldJoint.UnitWorkId =unitWork.UnitWorkId +-- and weldJoint.FlowingSection = pipeline.FlowingSection +----СڿھĴ +--LEFT JOIN (select sum(Size) as minTotalDia,HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia from HJGL_WeldJoint +-- left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId +-- left join Base_Material on Base_Material.MaterialId = HJGL_WeldJoint.Material1Id +-- where HJGL_Pipeline.PipeArea='1' and HJGL_WeldJoint.JointAttribute='Ԥƿ' +-- and cast(SUBSTRING(HJGL_WeldJoint.DNDia,CHARINDEX('N',HJGL_WeldJoint.DNDia)+1,len(HJGL_WeldJoint.DNDia)-charindex('N',HJGL_WeldJoint.DNDia)) as int)<@caliber +-- group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia) as minDia on minDia.UnitWorkId =unitWork.UnitWorkId +-- and minDia.FlowingSection = pipeline.FlowingSection + +----ܺ +--LEFT JOIN (select count(*) as totalCount,HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia from HJGL_WeldJoint +-- left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId +-- left join Base_Material on Base_Material.MaterialId = HJGL_WeldJoint.Material1Id +-- where HJGL_Pipeline.PipeArea='1' and HJGL_WeldJoint.JointAttribute='Ԥƿ' +-- and cast(SUBSTRING(HJGL_WeldJoint.DNDia,CHARINDEX('N',HJGL_WeldJoint.DNDia)+1,len(HJGL_WeldJoint.DNDia)-charindex('N',HJGL_WeldJoint.DNDia)) as int)>=@caliber +-- group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia) as total on total.UnitWorkId =unitWork.UnitWorkId +-- and total.FlowingSection = pipeline.FlowingSection +----ɺ +--LEFT JOIN (select count(*) as cTotalCount,HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia from HJGL_WeldJoint +-- left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId +-- left join Base_Material on Base_Material.MaterialId = HJGL_WeldJoint.Material1Id +-- where HJGL_Pipeline.PipeArea='1' and HJGL_WeldJoint.JointAttribute='Ԥƿ' +-- and cast(SUBSTRING(HJGL_WeldJoint.DNDia,CHARINDEX('N',HJGL_WeldJoint.DNDia)+1,len(HJGL_WeldJoint.DNDia)-charindex('N',HJGL_WeldJoint.DNDia)) as int)>=@caliber +-- and HJGL_WeldJoint.WeldingDailyId is not null +-- group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia) as cTotal on cTotal.UnitWorkId =unitWork.UnitWorkId +-- and cTotal.FlowingSection = pipeline.FlowingSection + +--ܺ +--LEFT JOIN (select count(*) as StotalCount,HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection from HJGL_WeldJoint +-- left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId +-- where HJGL_Pipeline.PipeArea='1' and HJGL_WeldJoint.JointAttribute='Ԥƿ' +-- group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection) as Stotal on Stotal.UnitWorkId =unitWork.UnitWorkId +-- and total.FlowingSection = pipeline.FlowingSection +----ɺ +--LEFT JOIN (select count(*) as ScTotalCount,HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection from HJGL_WeldJoint +-- left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId +-- where HJGL_Pipeline.PipeArea='1' and HJGL_WeldJoint.JointAttribute='Ԥƿ' +-- and HJGL_WeldJoint.WeldingDailyId is not null +-- group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection) as ScTotal on ScTotal.UnitWorkId =unitWork.UnitWorkId +-- and cTotal.FlowingSection = pipeline.FlowingSection +where (unitWork.ProjectId=@projectId or @projectId is null) +and (unitWork.UnitWorkId=@unitWorkId or @unitWorkId is null) +and (pipeline.FlowingSection=@flowingSection or @flowingSection is null) +GO + + diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 0c75a797..516e0284 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -56,6 +56,9 @@ ..\packages\EmitMapper.1.0.0\lib\EmitMapper.dll + + E:\工作\天辰施工平台\SGGL_TCC\SGGL\BLL\bin\Debug\FastReport.dll + False ..\FineUIPro\FineUIPro.dll diff --git a/SGGL/BLL/Common/FastReport.cs b/SGGL/BLL/Common/FastReport.cs index e4e7aef1..a044c483 100644 --- a/SGGL/BLL/Common/FastReport.cs +++ b/SGGL/BLL/Common/FastReport.cs @@ -1,6 +1,12 @@ -using System.Collections.Generic; +using System.Web; +using System.Web.Security; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; using System.Data; -using System.Web; +using FastReport; + namespace BLL { public static class FastReportService @@ -30,5 +36,58 @@ namespace BLL } + /// + /// 合并报表后打印 + /// + /// 报表实体集 + /// 导出的路径 + public static void ExportMergeReport(List fastReportItems, string path, string printType) + { + Report report = new Report(); + report.PrintSettings.ShowDialog = false; //隐藏弹窗 + FastReport.EnvironmentSettings settings = new EnvironmentSettings(); + settings.ReportSettings.ShowProgress = false; //隐藏进度条 + for (int i = 0; i < fastReportItems.Count; i++) + { + report.Load(Funs.RootPath + fastReportItems[i].ReportPath); //加载报表 + + List dataTables = fastReportItems[i].DataTables; + Dictionary ParameterValues = fastReportItems[i].ParameterValues; + if (dataTables != null && dataTables.Count > 0) + { + for (int j = 0; j < dataTables.Count; j++) + { + report.RegisterData(dataTables[j], dataTables[j].TableName);//绑定数据源 + } + } + if (ParameterValues.Count > 0) + { + foreach (KeyValuePair kvp in ParameterValues) + { + report.SetParameterValue(kvp.Key, kvp.Value);//绑定参数 + } + } + if (i == 0) + { + report.Prepare(); + } + else + { + report.Prepare(true); + } + } + if (printType == "1") + { + FastReport.Export.Pdf.PDFExport exp = new FastReport.Export.Pdf.PDFExport(); + report.Export(exp, path); + } + else if (printType == "2") + { + FastReport.Export.OoXML.Word2007Export exportBase = new FastReport.Export.OoXML.Word2007Export(); + report.Export(export: exportBase, fileName: path.Replace(oldValue: "pdf", newValue: "docx")); + } + } + + } } diff --git a/SGGL/BLL/HJGL/PointTrust/Batch_BatchTrustItemService.cs b/SGGL/BLL/HJGL/PointTrust/Batch_BatchTrustItemService.cs index bfddb0e5..56fc3fb9 100644 --- a/SGGL/BLL/HJGL/PointTrust/Batch_BatchTrustItemService.cs +++ b/SGGL/BLL/HJGL/PointTrust/Batch_BatchTrustItemService.cs @@ -144,5 +144,21 @@ namespace BLL return isShow; } #endregion + + + /// + /// 根据委托Id删除明细 + /// + /// + public static void DeleteTrustItemByTrustBatchId(string trustBatchId) + { + Model.SGGLDB db = Funs.DB; + var trustBatchItems = from x in db.HJGL_Batch_BatchTrustItem where x.TrustBatchId == trustBatchId select x; + if (trustBatchItems != null) + { + db.HJGL_Batch_BatchTrustItem.DeleteAllOnSubmit(trustBatchItems); + db.SubmitChanges(); + } + } } } diff --git a/SGGL/BLL/HJGL/PreDesign/HJGLPackagingmanagedetailService.cs b/SGGL/BLL/HJGL/PreDesign/HJGLPackagingmanagedetailService.cs index 7f2a10b4..a1d29f42 100644 --- a/SGGL/BLL/HJGL/PreDesign/HJGLPackagingmanagedetailService.cs +++ b/SGGL/BLL/HJGL/PreDesign/HJGLPackagingmanagedetailService.cs @@ -134,7 +134,7 @@ namespace BLL var result = new List(); if (pack.TypeInt == (int)HJGL_PackagingmanageService.TypeInt.预制散件) { - var q = from detail in Funs.DB.HJGL_PackagingManageDetail + var q = from detail in Funs.DB.HJGL_PackagingManageDetail join lib in Funs.DB.HJGL_MaterialCodeLib on detail.MaterialCode equals lib.MaterialCode into libJoin from libItem in libJoin.DefaultIfEmpty() join line in Funs.DB.HJGL_Pipeline on detail.PipelineId equals line.PipelineId into lineJoin @@ -152,7 +152,8 @@ namespace BLL Number = detail.Number, PipelineId = lineItem.PipelineId, PipelineCode = lineItem.PipelineCode, - UnitWorkId=lineItem.UnitWorkId, + UnitWorkId = lineItem.UnitWorkId, + FlowingSection = lineItem.FlowingSection, }; result= q.ToList(); @@ -177,6 +178,7 @@ namespace BLL Number = detail.Number, PipelineId = lineItem.PipelineId, PipelineCode = lineItem.PipelineCode, + FlowingSection = lineItem.FlowingSection, }; result = q.ToList(); diff --git a/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs b/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs index c6062033..f2ee57c6 100644 --- a/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs +++ b/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs @@ -133,7 +133,7 @@ namespace BLL State = x.State, TypeInt = x.TypeInt, TypeString = GetTypeString(x.TypeInt), - ReceiveMan = t.PersonName, + ReceiveMan = train.ContactName,//t.PersonName, ReceiveDate = x.ReceiveDate.HasValue ? string.Format("{0:g}", x.ReceiveDate) : "", PlanStartDate = GetMinPlanStartDate(x.PackagingManageId), TrainNumberOld = x.TrainNumber, @@ -179,7 +179,7 @@ namespace BLL if (!string.IsNullOrEmpty(model.PipelineComponentId)) { var PipelineComponentIds = model.PipelineComponentId.Split(','); - string strSql = @"select com.PipelineComponentId, com.PipelineComponentCode,isnull(pipe.PlanStartDate,getdate()) as PlanStartDate,unitwork.UnitWorkName,'1' as num ,'个' as CU + string strSql = @"select com.PipelineComponentId, com.PipelineComponentCode,isnull(pipe.PlanStartDate,getdate()) as PlanStartDate,unitwork.UnitWorkName,'1' as num ,'个' as CU,pipe.FlowingSection from HJGL_Pipeline_Component com left join HJGL_Pipeline pipe on com.PipelineId=pipe.PipelineId left join WBS_UnitWork unitwork on pipe.UnitWorkId=unitwork.UnitWorkId @@ -252,6 +252,8 @@ namespace BLL TrainNumber = newtable.TrainNumber, TrainNumberId = newtable.TrainNumberId, TypeInt = newtable.TypeInt, + CompileMan=newtable.CompileMan, + CompileDate = newtable.CompileDate }; var db1 = Funs.DB; db1.HJGL_PackagingManage.InsertOnSubmit(table); diff --git a/SGGL/BLL/HJGL/PreDesign/ProductionSchedulingPlanService.cs b/SGGL/BLL/HJGL/PreDesign/ProductionSchedulingPlanService.cs index 740c97ea..ab72d20e 100644 --- a/SGGL/BLL/HJGL/PreDesign/ProductionSchedulingPlanService.cs +++ b/SGGL/BLL/HJGL/PreDesign/ProductionSchedulingPlanService.cs @@ -26,7 +26,7 @@ namespace BLL public static Model.HJGL_ProductionSchedulingPlan GetProductionSchedulingPlan(string loginProjectId, string flowingSection, string unitWorkId, string material, string caliber) { - return Funs.DB.HJGL_ProductionSchedulingPlan.FirstOrDefault(e => e.ProjectId == loginProjectId && e.FlowNum == flowingSection && e.PipelineId == unitWorkId && e.Caliber == caliber); + return Funs.DB.HJGL_ProductionSchedulingPlan.FirstOrDefault(e => e.ProjectId == loginProjectId && e.FlowNum == flowingSection && e.PipelineId == unitWorkId && e.Material == material && e.Caliber == caliber); } /// @@ -85,6 +85,8 @@ namespace BLL newPlan.CompletedCount = plan.CompletedCount; newPlan.CompletedRate = plan.CompletedRate; newPlan.TotalCompletedRate = plan.TotalCompletedRate; + newPlan.OnDayCompleteDyne = plan.OnDayCompleteDyne; + newPlan.NextDayCompleteDyne = plan.NextDayCompleteDyne; try { db.SubmitChanges(System.Data.Linq.ConflictMode.ContinueOnConflict); @@ -122,5 +124,38 @@ namespace BLL } } + /// + /// 根据单位工程删除排产计划 + /// + /// + /// + public static void DeleteProductionSchedulingPlanByUnitWork(string projectId,string unitWorkName) + { + SGGLDB db = Funs.DB; + var q = (from x in db.HJGL_ProductionSchedulingPlan where x.ProjectId == projectId && x.MainItemName == unitWorkName select x).ToList(); + if (q.Count > 0) + { + db.HJGL_ProductionSchedulingPlan.DeleteAllOnSubmit(q); + db.SubmitChanges(); + } + } + + /// + /// 根据单位工程、流水号删除排产计划 + /// + /// + /// + /// + public static void DeleteProductionSchedulingPlanByUnitWorkIdAndFlowNum(string projectId, string unitWorkName, string flowNum) + { + SGGLDB db = Funs.DB; + var q = (from x in db.HJGL_ProductionSchedulingPlan where x.ProjectId == projectId && x.MainItemName == unitWorkName && x.FlowNum == flowNum select x).ToList(); + if (q.Count > 0) + { + db.HJGL_ProductionSchedulingPlan.DeleteAllOnSubmit(q); + db.SubmitChanges(); + } + } + } } diff --git a/SGGL/BLL/HJGL/TestPackage/TestPackageEditService.cs b/SGGL/BLL/HJGL/TestPackage/TestPackageEditService.cs index a3314e5e..fcf9ea3e 100644 --- a/SGGL/BLL/HJGL/TestPackage/TestPackageEditService.cs +++ b/SGGL/BLL/HJGL/TestPackage/TestPackageEditService.cs @@ -1,4 +1,6 @@ using Model; +using NPOI.SS.Formula.Functions; +using NPOI.SS.UserModel; using System; using System.Collections.Generic; using System.Linq; @@ -435,7 +437,7 @@ namespace BLL { foreach (var pipeline in oldPipeline) { - DeletePipelineListByPTP_ID(pipeline.PTP_ID); + DeletePipelineListByPTP_ID(pipeline.PTP_ID); } } @@ -455,5 +457,28 @@ namespace BLL db.SubmitChanges(); } } + + public static void AddPipelineLists(List pipelineList) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + db.PTP_PipelineList.InsertAllOnSubmit(pipelineList); + db.SubmitChanges(); + } + } + + /// + /// 修改试压包打印状态 + /// + /// + public static void UpdateTestPackagePrintState(Model.PTP_TestPackage testPackage) + { + Model.PTP_TestPackage newTestPackage = Funs.DB.PTP_TestPackage.FirstOrDefault(e => e.PTP_ID == testPackage.PTP_ID); + if (newTestPackage != null) + { + newTestPackage.PrintState = testPackage.PrintState; + Funs.DB.SubmitChanges(); + } + } } } diff --git a/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs b/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs index f2f06986..230f8d1e 100644 --- a/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs @@ -485,13 +485,13 @@ namespace BLL if (!string.IsNullOrEmpty(model.WeldJointCode)) baseQuery = baseQuery.Where(x => x.WeldJointCode.Contains(model.WeldJointCode)); - return baseQuery.ToList() ; + return baseQuery.ToList(); } - public static (List Data, int Total)GetDataBymodel(Model.View_HJGL_WeldJoint model, int pageIndex = 0, int pageSize = 20) + public static (List Data, int Total) GetDataBymodel(Model.View_HJGL_WeldJoint model, int pageIndex = 0, int pageSize = 20) { // 阶段一:构建基础查询 var baseQuery = Funs.DB.View_HJGL_WeldJoint.AsQueryable(); - + // 阶段二:构建动态查询条件 if (!string.IsNullOrEmpty(model.ProjectId)) baseQuery = baseQuery.Where(x => x.ProjectId == model.ProjectId); @@ -500,16 +500,16 @@ namespace BLL if (!string.IsNullOrEmpty(model.PipelineId)) baseQuery = baseQuery.Where(x => x.PipelineId == model.PipelineId); if (!string.IsNullOrEmpty(model.PipelineCode)) - baseQuery = baseQuery.Where(x => x.PipelineCode .Contains(model.PipelineCode)); + baseQuery = baseQuery.Where(x => x.PipelineCode.Contains(model.PipelineCode)); if (!string.IsNullOrEmpty(model.WeldJointCode)) - baseQuery = baseQuery.Where(x => x.WeldJointCode.Contains( model.WeldJointCode)); - + baseQuery = baseQuery.Where(x => x.WeldJointCode.Contains(model.WeldJointCode)); + // 阶段三:排序与分页控制(索引优化关键) - var orderedQuery = baseQuery.OrderBy(x=>x.PipelineId).ThenBy(x => x.WeldJointCode); + var orderedQuery = baseQuery.OrderBy(x => x.PipelineId).ThenBy(x => x.WeldJointCode); // 阶段四:分页执行(数据库层面分页) var pagedData = orderedQuery - .Skip((pageIndex ) * pageSize) + .Skip((pageIndex) * pageSize) .Take(pageSize) .ToList(); @@ -542,7 +542,7 @@ namespace BLL var pagedData = orderedQuery .Skip((pageIndex) * pageSize) .Take(pageSize) - .ToList(); + .ToList(); return pagedData; } @@ -629,5 +629,103 @@ namespace BLL return result; } + + + + /// + /// 根据单位工程、流水号、材质、口径获取达因数 + /// + /// + /// 单位工程 + /// 流水段 + /// 材质 + /// 口径 + /// 1-总达因,2-完成总达因 + /// + public static decimal? GetSizeSum(string projectId, string unitWorkId, string flowingSection, string steelType, string caliber,string type) + { + Model.SGGLDB db = Funs.DB; + decimal? sizeSum = 0; + int c = 0; + if (!string.IsNullOrEmpty(caliber)) + { + c = Convert.ToInt32(caliber.Substring(1, caliber.Length - 1)); + var weldjoints = (from x in db.HJGL_WeldJoint + join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId + join z in db.Base_Material on y.MaterialId equals z.MaterialId + where x.ProjectId == projectId && y.UnitWorkId == unitWorkId && y.FlowingSection == flowingSection && z.SteelType == steelType + && y.PipeArea == "1" && x.JointAttribute == "预制口" + //&& Convert.ToInt32(x.DNDia.Substring(2, x.DNDia.Length - 2)) < c + select x); + + foreach (var item in weldjoints) + { + int s = Convert.ToInt32(item.DNDia.Substring(2, item.DNDia.Length - 2)); + if (caliber.Substring(0, 1) == "<" && s < c) + { + if (type == "1") + { + sizeSum += item.Size; + } + else + { + if (!string.IsNullOrEmpty(item.WeldingDailyId)) + { + sizeSum += item.Size; + } + } + } + else if (caliber.Substring(0, 1) == "≥" && s >= c) + { + if (type == "1") + { + sizeSum += item.Size; + } + else + { + if (!string.IsNullOrEmpty(item.WeldingDailyId)) + { + sizeSum += item.Size; + } + } + } + } + } + return sizeSum; + } + + /// + /// 根据单位工程、流水段获取总达因 + /// + /// 项目id + /// 单位工程 + /// 流水段 + /// 1-总达因,2-完成总达因 + /// + public static decimal? GetSizeSumByUnitWorkIdAndFlowingSection(string projectId, string unitWorkId, string flowingSection,string type) + { + Model.SGGLDB db = Funs.DB; + decimal? sizeSum = 0; + if (type == "1") + { + sizeSum = (from x in db.HJGL_WeldJoint + join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId + join z in db.Base_Material on y.MaterialId equals z.MaterialId + where x.ProjectId == projectId && y.UnitWorkId == unitWorkId && y.FlowingSection == flowingSection + && y.PipeArea == "1" && x.JointAttribute == "预制口" + select x.Size).Sum(); + } + else + { + sizeSum = (from x in db.HJGL_WeldJoint + join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId + join z in db.Base_Material on y.MaterialId equals z.MaterialId + where x.ProjectId == projectId && y.UnitWorkId == unitWorkId && y.FlowingSection == flowingSection + && y.PipeArea == "1" && x.JointAttribute == "预制口" + && x.WeldingDailyId != "" && x.WeldingDailyId != null + select x.Size).Sum(); + } + return sizeSum; + } } } diff --git a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs index a65d77a0..85108c23 100644 --- a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs +++ b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs @@ -136,7 +136,12 @@ namespace BLL /// public static IEnumerable getInPersonListData(string projectId, string unitId, string personName, string identityCard, Grid Grid1) { - IQueryable getInPersonList = getInPersonLists.Where(x => x.ProjectId == projectId); + Model.SGGLDB db = Funs.DB; + + IQueryable getInPersonList = from x in db.SitePerson_Person + where x.States == Const.ProjectPersonStates_1 + select x; + getInPersonList = getInPersonList.Where(x => x.ProjectId == projectId); if (!string.IsNullOrEmpty(unitId) && unitId != Const._Null) { if (unitId == "0") @@ -171,7 +176,7 @@ namespace BLL x.CardNo, x.PersonName, x.UnitId, - Funs.DB.Base_Unit.First(u => u.UnitId == x.UnitId).UnitName, + db.Base_Unit.First(u => u.UnitId == x.UnitId).UnitName, x.IdentityCard, IsInName = "", InOuDate = DateTime.Now.ToShortDateString(), @@ -194,7 +199,7 @@ namespace BLL /// 定义变量 /// private static IQueryable getNowPersonLists = from x in Funs.DB.SitePerson_PersonInOutNow - select x; + select x; /// /// 获取分页列表 @@ -204,7 +209,7 @@ namespace BLL /// public static IEnumerable getNowPersonListData(string projectId, string unitId, string workPostId, string personName, string identityCard, DateTime dateValue, Grid Grid1) { - IQueryable getDayAll = getNowPersonLists.Where(x=>x.ProjectId == projectId + IQueryable getDayAll = getNowPersonLists.Where(x => x.ProjectId == projectId && x.ChangeTime.Value.Year == dateValue.Year && x.ChangeTime.Value.Month == dateValue.Month && x.ChangeTime.Value.Day == dateValue.Day); if (!string.IsNullOrEmpty(unitId) && unitId != Const._Null) @@ -230,7 +235,7 @@ namespace BLL group x by x.PersonId into g select new { - ProjectId = g.First().ProjectId, + ProjectId = g.First().ProjectId, PersonId = g.First().PersonId, personName = g.First().PersonName, identityCard = g.First().IdentityCard, @@ -260,18 +265,18 @@ namespace BLL x.PersonId, x.personName, x.identityCard, - CardNo =Funs.DB.SitePerson_Person.First(p=>p.PersonId == x.PersonId && p.ProjectId ==x.ProjectId).CardNo, + CardNo = Funs.DB.SitePerson_Person.First(p => p.PersonId == x.PersonId && p.ProjectId == x.ProjectId).CardNo, x.UnitName, x.UnitId, x.WorkPostId, x.WorkPostName, - TeamGroupName=TeamGroupService.GetTeamGroupNameByPersonId(x.ProjectId,x.PersonId), + TeamGroupName = TeamGroupService.GetTeamGroupNameByPersonId(x.ProjectId, x.PersonId), x.ChangeTime, }; } else { - inCount =0; + inCount = 0; return null; } } @@ -739,7 +744,7 @@ namespace BLL var getSitePerson = GetSitePersonByProjectIdPersonId(projectId, personId); if (getSitePerson != null && string.IsNullOrEmpty(getSitePerson.CardNo)) { - cardNo= SendCarNobySiteperson(getSitePerson.SitePersonId); + cardNo = SendCarNobySiteperson(getSitePerson.SitePersonId); } return cardNo; @@ -754,13 +759,13 @@ namespace BLL { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - string carNo = string.Empty; + string carNo = string.Empty; var item = db.SitePerson_Person.FirstOrDefault(x => x.SitePersonId == sitePersonId); if (item != null) { bool isok = false; int getPassScores = SysConstSetService.getPassScore(); - var getTestT = db.Training_TestRecord.FirstOrDefault(x => x.ProjectId == item.ProjectId && x.TestScores >= getPassScores && x.TestManId==item.PersonId); + var getTestT = db.Training_TestRecord.FirstOrDefault(x => x.ProjectId == item.ProjectId && x.TestScores >= getPassScores && x.TestManId == item.PersonId); if (getTestT != null) { isok = true; @@ -776,7 +781,7 @@ namespace BLL isok = true; } } - + if (isok) ////参加过培训的人员 { string prefix = UnitService.GetUnitCodeByUnitId(item.UnitId) + "-"; @@ -839,6 +844,7 @@ namespace BLL Isprint = "0", States = person.States, IsSafetyMonitoring = person.IsSafetyMonitoring, + IsCQMSCheck=person.IsCQMSCheck, }; if (newPerson.WorkPostId == Const.WorkPost_Welder) @@ -920,6 +926,7 @@ namespace BLL setPersonItemInOut = true; } newPerson.IsSafetyMonitoring = person.IsSafetyMonitoring; + newPerson.IsCQMSCheck = person.IsCQMSCheck; db.SubmitChanges(); if (!setPersonItemInOut) @@ -931,7 +938,7 @@ namespace BLL } else { - var getDatePItem = db.SitePerson_PersonItem.FirstOrDefault(x => x.ProjectId == person.ProjectId && x.IdentityCard == person.IdentityCard && x.OutTime .HasValue && x.OutTime < person.InTime); + var getDatePItem = db.SitePerson_PersonItem.FirstOrDefault(x => x.ProjectId == person.ProjectId && x.IdentityCard == person.IdentityCard && x.OutTime.HasValue && x.OutTime < person.InTime); if (getDatePItem != null) { setPersonItemInOut = true; @@ -949,13 +956,13 @@ namespace BLL db.SubmitChanges(); } } - } + } } } if (setPersonItemInOut) - { + { ////现场人员项目出入场记录 - SitePerson_PersonItemService.SetPersonItemInOut(newPerson,newlog); + SitePerson_PersonItemService.SetPersonItemInOut(newPerson, newlog); } } } @@ -1096,7 +1103,7 @@ namespace BLL info += "卡号应为单位代码+'-'+五位流水号!"; } } - + return info; } diff --git a/SGGL/BLL/Person/Person_PersonTrainService.cs b/SGGL/BLL/Person/Person_PersonTrainService.cs index 0273e636..f7da6fab 100644 --- a/SGGL/BLL/Person/Person_PersonTrainService.cs +++ b/SGGL/BLL/Person/Person_PersonTrainService.cs @@ -32,6 +32,9 @@ namespace BLL /// public static IEnumerable getListData(string personId, Grid Grid1) { + Model.SGGLDB db = Funs.DB; + IQueryable getDataLists = from x in Funs.DB.Person_PersonTrain + select x; IQueryable getDataList = getDataLists.Where(x => x.PersonId == personId); count = getDataList.Count(); if (count == 0) @@ -45,7 +48,7 @@ namespace BLL x.PersonTrainId, x.PersonId, x.TrainTypeId, - Funs.DB.Base_TrainType.First(u => u.TrainTypeId == x.TrainTypeId).TrainTypeName, + db.Base_TrainType.First(u => u.TrainTypeId == x.TrainTypeId).TrainTypeName, x.TrainDate, x.TrainPlace, x.TrainResult, diff --git a/SGGL/BLL/WebService/CNCECHSSEWebService.cs b/SGGL/BLL/WebService/CNCECHSSEWebService.cs index c77e3d26..2f314f9b 100644 --- a/SGGL/BLL/WebService/CNCECHSSEWebService.cs +++ b/SGGL/BLL/WebService/CNCECHSSEWebService.cs @@ -100,7 +100,7 @@ UnitId = x.UnitId, Year = x.Year, Month = x.Month, - FillingMan = x.FillingMan, + FillingMan = x.FillingMan + "|" + (x.KeyWorkNum ?? 0).ToString() + "|" + (x.KeyWorkOKNum ?? 0).ToString() + "|" + (x.KeyWorkOKRate ?? ""), FillingDate = x.FillingDate, DutyPerson = x.DutyPerson, RecordableIncidentRate = x.RecordableIncidentRate, @@ -1679,6 +1679,9 @@ Quarter = x.Quarter, YearId = x.YearId, CompileMan = x.CompileMan, + KeyWorkNum = x.KeyWorkNum, + KeyWorkOKNum = x.KeyWorkOKNum, + KeyWorkOKRate = x.KeyWorkOKRate, }; var upReportItem = from x in db.Information_ActionWorkLedgerItem diff --git a/SGGL/BLL/ZHGL/DataSync/BaseDataService.cs b/SGGL/BLL/ZHGL/DataSync/BaseDataService.cs index 0c7433e5..81f7efc6 100644 --- a/SGGL/BLL/ZHGL/DataSync/BaseDataService.cs +++ b/SGGL/BLL/ZHGL/DataSync/BaseDataService.cs @@ -24,7 +24,7 @@ namespace BLL from projectType in projectTypeJoin.DefaultIfEmpty() join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = project.ProjectState, GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin from sysConst in sysConstJoin.DefaultIfEmpty() - where project.ProjectState == "1" + where project.ProjectState == "1" && project.MasterSysId != null select new ProjectOutput { ProjectId = project.ProjectId, diff --git a/SGGL/BLL/ZHGL/DataSync/CQMSDataService.cs b/SGGL/BLL/ZHGL/DataSync/CQMSDataService.cs index c1b6f1ea..971a3370 100644 --- a/SGGL/BLL/ZHGL/DataSync/CQMSDataService.cs +++ b/SGGL/BLL/ZHGL/DataSync/CQMSDataService.cs @@ -16,7 +16,7 @@ namespace BLL public static class CQMSDataService { public static SGGLDB db = Funs.DB; - public static List BeUnderConstructionList = ProjectService.GetProjectWorkList().Select(x => x.ProjectId).ToList(); + public static List BeUnderConstructionList = BaseDataService.BeUnderConstructionList; #region 获取列表 @@ -592,6 +592,7 @@ namespace BLL var subdivisionalWorksNuTask = CQMSDataService.GetSubdivisionalWorksNumAsync(); //获取分项工程个数 var inspectionLotNumTask = CQMSDataService.GetInspectionLotNumAsync(); //获取检验批个数 var constructSolutionTask = CQMSDataService.GetConstructSolutionAsync(); //施工方案数量 + var comprehensiveMajorPlanTask = CQMSDataService.GetComprehensive_MajorPlanApprovalAsync(); //危大工程、超危大工程施工方案数量 var cqmsProblemTask = CQMSDataService.GetCQMSProblemAsync(); //获取企业级、项目级质量问题 var cqmsBranchMajorCheckTask = CQMSDataService.GetBranchMajorCheckAsync(); //获取分支机构质量大检查次数 var cqmsCompanyMajorCheckTask = CQMSDataService.GetCompanyMajorCheckAsync(); //获取企业质量大检查次数 @@ -621,7 +622,7 @@ namespace BLL inspectionEquipmentTask, inspectionPersonTask, inspectionMachineTask, useNumTask, okNumTask, singleProjectNumTask, unitProjectNumTask, subProjectNuTask, subdivisionalWorksNuTask, inspectionLotNumTask, - constructSolutionTask, + constructSolutionTask, comprehensiveMajorPlanTask, cqmsProblemTask, cqmsBranchMajorCheckTask, cqmsCompanyMajorCheckTask, keyProcessNumTask, keyProcessOKNumTask, specialProcessNumTask, specialProcessOKNumTask, concealedWorksNumTask, concealedWorksOKNumTask, unitProjectAcceptNumTask, unitProjectAcceptOKNumTask, subProjectAcceptNumTask, subProjectAcceptOKNumTask, subdivisionalWorksAcceptNumTask, subdivisionalWorksAcceptOKNumTask, @@ -651,6 +652,7 @@ namespace BLL var inspectionLotNum = await inspectionLotNumTask; var constructSolutionList = await constructSolutionTask; + var comprehensiveMajorPlanList = await comprehensiveMajorPlanTask; var cqmsProblemList = await cqmsProblemTask; var cqmsBranchMajorCheckList = await cqmsBranchMajorCheckTask; var cqmsCompanyMajorCheckList = await cqmsCompanyMajorCheckTask; @@ -692,7 +694,7 @@ namespace BLL EquipmentInspectionNum = inspectionEquipmentList.Count(), EquipmentInspectionQualifiedNum = inspectionEquipmentList.Count(), PersonInspectionNum = inspectionPersonList.Count(), - PersonInspectionQualifiedNum = inspectionPersonList.Where(x => x.IsOnSite.HasValue && x.IsOnSite == true).Count(), + PersonInspectionQualifiedNum = inspectionPersonList.Count(), MachineInspectionNum = inspectionMachineList.Count(), MachineInspectionQualifiedNum = inspectionMachineList.Where(x => x.IsCheckCertificate == true).Count(), @@ -708,9 +710,9 @@ namespace BLL ConstructSolutionNum = constructSolutionList.Count(), ConstructSolutionProjectApproveNum = constructSolutionList.Where(x => x.State == "1").Count(), - ConstructSolutionUnitApproveNum = 0,// + ConstructSolutionUnitApproveNum = comprehensiveMajorPlanList.Count(), SpecialEquipmentQualityAssuranceSystemNum = qualityAssuranceNum.Count(), - DesignDetailsNum = technicalDisclosePersonList.Sum(x => x.TrainPersonNum), + DesignDetailsNum = technicalDisclosePersonList.Count(), ProblemNum = cqmsProblemList.Count(), ProblemCompletedNum = cqmsProblemList.Where(x => x.State == "7").Count(), @@ -765,7 +767,7 @@ namespace BLL EquipmentInspectionNum = inspectionEquipmentList.Count(x => x.ProjectId == projectid), EquipmentInspectionQualifiedNum = inspectionEquipmentList.Where(x => x.ProjectId == projectid).Count(), PersonInspectionNum = inspectionPersonList.Count(x => x.ProjectId == projectid), - PersonInspectionQualifiedNum = inspectionPersonList.Where(x => x.IsOnSite.HasValue && x.IsOnSite == true && x.ProjectId == projectid).Count(), + PersonInspectionQualifiedNum = inspectionPersonList.Count(x => x.ProjectId == projectid), MachineInspectionNum = inspectionMachineList.Count(x => x.ProjectId == projectid), MachineInspectionQualifiedNum = inspectionMachineList.Where(x => x.IsCheckCertificate == true && x.ProjectId == projectid).Count(), MaterialInspectionNum = 0, @@ -780,9 +782,9 @@ namespace BLL ConstructSolutionNum = constructSolutionList.Count(x => x.ProjectId == projectid), ConstructSolutionProjectApproveNum = constructSolutionList.Where(x => x.State == "1" && x.ProjectId == projectid).Count(), - ConstructSolutionUnitApproveNum = 0,// + ConstructSolutionUnitApproveNum = comprehensiveMajorPlanList.Count(x => x.ProjectId == projectid), SpecialEquipmentQualityAssuranceSystemNum = qualityAssuranceNum.Count(x => x.ProjectId == projectid), - DesignDetailsNum = technicalDisclosePersonList.Where(x => x.ProjectId == projectid).Sum(x => x.TrainPersonNum), + DesignDetailsNum = technicalDisclosePersonList.Where(x => x.ProjectId == projectid).Count(), ProblemNum = cqmsProblemList.Count(x => x.ProjectId == projectid), ProblemCompletedNum = cqmsProblemList.Where(x => x.State == "7" && x.ProjectId == projectid).Count(), @@ -1158,7 +1160,7 @@ namespace BLL /// public static List GetTechnicalDisclosePerson() { - var result = (from x in Funs.DB.Comprehensive_DesignDetails + var result = (from x in Funs.DB.Comprehensive_ConTechnologyDisclosure join p in Funs.DB.Base_Project on x.ProjectId equals p.ProjectId into pGroup from p in pGroup.DefaultIfEmpty() where BeUnderConstructionList.Contains(p.ProjectId) && x.CompileDate > Const.DtmarkTime @@ -1167,11 +1169,11 @@ namespace BLL ProjectId = x.ProjectId, ProjectName = p.ProjectName, UnitName = "", - Id = x.DesignDetailsId, + Id = x.ConTechnologyDisclosureId, TrainTitle = "", TrainStartDate = null, TrainEndDate = null, - TrainPersonNum = x.JoinPersonNum ?? 0, + TrainPersonNum = x.DisclosurePersonNum ?? 0, }).ToList(); return result; } @@ -1210,10 +1212,10 @@ namespace BLL /// 获取人员报验 /// /// - public static List GetComprehensive_InspectionPerson() + public static List GetComprehensive_InspectionPerson() { - var result = (from x in Funs.DB.Comprehensive_InspectionPerson - where BeUnderConstructionList.Contains(x.ProjectId) && x.CompileDate > Const.DtmarkTime + var result = (from x in Funs.DB.SitePerson_Person + where BeUnderConstructionList.Contains(x.ProjectId) && x.IsCQMSCheck.HasValue && x.IsCQMSCheck == true select x).ToList(); return result; } @@ -1222,7 +1224,7 @@ namespace BLL /// 获取人员报验(异步) /// /// - public static async Task> GetComprehensive_InspectionPersonAsync() + public static async Task> GetComprehensive_InspectionPersonAsync() { return await Task.Run(GetComprehensive_InspectionPerson); } @@ -1423,6 +1425,26 @@ namespace BLL return await Task.Run(GetConstructSolution); } + /// + /// 危大(超危大)工程施工方案数量 + /// + /// + public static List GetComprehensive_MajorPlanApproval() + { + var result = (from x in Funs.DB.Solution_LargerHazard + where BeUnderConstructionList.Contains(x.ProjectId) + select x).ToList(); + return result; + } + /// + /// 危大(超危大)工程施工方案数量(异步) + /// + /// + public static async Task> GetComprehensive_MajorPlanApprovalAsync() + { + return await Task.Run(GetComprehensive_MajorPlanApproval); + } + /// /// 获取施工技术交底 /// diff --git a/SGGL/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs b/SGGL/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs index 57eb0136..e3785929 100644 --- a/SGGL/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs +++ b/SGGL/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs @@ -2988,7 +2988,7 @@ namespace BLL from projectType in projectTypeJoin.DefaultIfEmpty() join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = "", GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin from sysConst in sysConstJoin.DefaultIfEmpty() - where project.ProjectState == "1" + where project.ProjectState == "1" && project.MasterSysId != null select new ProjectOutput { ProjectId = project.ProjectId, @@ -3050,7 +3050,7 @@ namespace BLL ConstructionMoney = project.ConstructionMoney, ProjectStateName = project.ProjectState == BLL.Const.ProjectState_2 ? "暂停中" : (project.ProjectState == BLL.Const.ProjectState_3 ? "已完工" : "施工中"), ProjectState = project.ProjectState, - ProjectAttributeName = "工程", + ProjectAttributeName = "工程", ProjectMoney = project.ProjectMoney, DayCount = DateTime.Now.Subtract(project.StartDate.Value).Days, ProjectTypeName = projectType.ProjectTypeName, @@ -4016,7 +4016,7 @@ namespace BLL from y in yGroup.DefaultIfEmpty() join z in Funs.DB.Base_RiskLevel on y.HazardLevel equals z.RiskLevelId into zGroup from z in zGroup.DefaultIfEmpty() - where BeUnderConstructionList.Contains(x.ProjectId) + where BeUnderConstructionList.Contains(x.ProjectId) group new { y, z } by new { x.ProjectId, x.ProjectName, x.ProjectCode } into gg select new SecurityRiskOutput { @@ -4063,6 +4063,8 @@ namespace BLL SuperConstructionNum = gg.Count(x => x.States == "2" && x.IsSuperLargerHazard == true), SuperFinishedNum = gg.Count(x => x.States == "3" && x.IsSuperLargerHazard == true), SuperArgumentNum = gg.Count(x => x.IsArgument == true && x.IsSuperLargerHazard == true), + OperativesNum = gg.Where(x => x.IsSuperLargerHazard == false).Sum(x => x.OperativesNum) ?? 0, + SuperOperativesNum = gg.Where(x => x.IsSuperLargerHazard == true).Sum(x => x.OperativesNum) ?? 0, }).ToList(); return query; @@ -4232,7 +4234,7 @@ namespace BLL from bc in bcGroup.DefaultIfEmpty() join su1 in Funs.DB.Person_Persons on q.AuditorId equals su1.PersonId into su1Group from su1 in su1Group.DefaultIfEmpty() - where BeUnderConstructionList.Contains(p.ProjectId) && m.PostType == Const.PostType_2 + where BeUnderConstructionList.Contains(p.ProjectId) && m.PostType == Const.PostType_2 select new Model.OfSafetySupervisorsOutput { ProjectId = p.ProjectId, diff --git a/SGGL/BLL/ZHGL/Information/ActionWorkLedgerService.cs b/SGGL/BLL/ZHGL/Information/ActionWorkLedgerService.cs index 603f472f..ed3eb2c9 100644 --- a/SGGL/BLL/ZHGL/Information/ActionWorkLedgerService.cs +++ b/SGGL/BLL/ZHGL/Information/ActionWorkLedgerService.cs @@ -81,6 +81,9 @@ namespace BLL newActionWorkLedger.UpState = ActionWorkLedger.UpState; newActionWorkLedger.HandleState = ActionWorkLedger.HandleState; newActionWorkLedger.HandleMan = ActionWorkLedger.HandleMan; + newActionWorkLedger.KeyWorkNum = ActionWorkLedger.KeyWorkNum; + newActionWorkLedger.KeyWorkOKNum = ActionWorkLedger.KeyWorkOKNum; + newActionWorkLedger.KeyWorkOKRate = ActionWorkLedger.KeyWorkOKRate; Funs.DB.SubmitChanges(); } } diff --git a/SGGL/BLL/ZHGL/Information/MillionsMonthlyReportService.cs b/SGGL/BLL/ZHGL/Information/MillionsMonthlyReportService.cs index a807d8fa..b19cb2fa 100644 --- a/SGGL/BLL/ZHGL/Information/MillionsMonthlyReportService.cs +++ b/SGGL/BLL/ZHGL/Information/MillionsMonthlyReportService.cs @@ -73,6 +73,9 @@ namespace BLL BreakGroundLicenseNum = MillionsMonthlyReport.BreakGroundLicenseNum, ElectricityLicenseNum = MillionsMonthlyReport.ElectricityLicenseNum, RTLicenseNum = MillionsMonthlyReport.RTLicenseNum, + KeyWorkNum = MillionsMonthlyReport.KeyWorkNum, + KeyWorkOKNum = MillionsMonthlyReport.KeyWorkOKNum, + KeyWorkOKRate = MillionsMonthlyReport.KeyWorkOKRate, NightLicenseNum = MillionsMonthlyReport.NightLicenseNum, CommissionerNum = MillionsMonthlyReport.CommissionerNum, SoleDutyNum = MillionsMonthlyReport.SoleDutyNum, @@ -120,6 +123,9 @@ namespace BLL newMillionsMonthlyReport.NightLicenseNum = MillionsMonthlyReport.NightLicenseNum; newMillionsMonthlyReport.CommissionerNum = MillionsMonthlyReport.CommissionerNum; newMillionsMonthlyReport.SoleDutyNum = MillionsMonthlyReport.SoleDutyNum; + newMillionsMonthlyReport.KeyWorkNum = MillionsMonthlyReport.KeyWorkNum; + newMillionsMonthlyReport.KeyWorkOKNum = MillionsMonthlyReport.KeyWorkOKNum; + newMillionsMonthlyReport.KeyWorkOKRate = MillionsMonthlyReport.KeyWorkOKRate; Funs.DB.SubmitChanges(); } diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/试压包导入模版.xlsx b/SGGL/FineUIPro.Web/File/Excel/DataIn/试压包导入模版.xlsx new file mode 100644 index 00000000..8eee13d8 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/试压包导入模版.xlsx differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataOut/排产计划导出模板.xlsx b/SGGL/FineUIPro.Web/File/Excel/DataOut/排产计划导出模板.xlsx index 24e30a80..0a4d300e 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataOut/排产计划导出模板.xlsx and b/SGGL/FineUIPro.Web/File/Excel/DataOut/排产计划导出模板.xlsx differ diff --git a/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道压力包文件资料目录.frx b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道压力包文件资料目录.frx new file mode 100644 index 00000000..42f0ebf2 --- /dev/null +++ b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道压力包文件资料目录.frx @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道压力试验技术要求.frx b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道压力试验技术要求.frx new file mode 100644 index 00000000..dc0a28f4 --- /dev/null +++ b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道压力试验技术要求.frx @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道无损检测数量统计表.frx b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道无损检测数量统计表.frx new file mode 100644 index 00000000..403719ab --- /dev/null +++ b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道无损检测数量统计表.frx @@ -0,0 +1,341 @@ + + + using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Windows.Forms; +using System.Drawing; +using System.Data; +using FastReport; +using FastReport.Data; +using FastReport.Dialog; +using FastReport.Barcode; +using FastReport.Table; +using FastReport.Utils; + +namespace FastReport +{ + public class ReportScript + { + + private void Table3_ManualBuild(object sender, EventArgs e) + { + DataSourceBase rowData = Report.GetDataSource("Data"); + // init the data source + rowData.Init(); + + // print the first table row - it is a header + + // now enumerate the data source and print the table body + while (rowData.HasMoreRows) + { + // print the table body + Table3.PrintRow(0); + Table3.PrintColumns(); + + // go next data source row + rowData.Next(); + } + } + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道无损检测结果汇总表.frx b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道无损检测结果汇总表.frx new file mode 100644 index 00000000..f67dfe60 --- /dev/null +++ b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道无损检测结果汇总表.frx @@ -0,0 +1,368 @@ + + + using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Windows.Forms; +using System.Drawing; +using System.Data; +using FastReport; +using FastReport.Data; +using FastReport.Dialog; +using FastReport.Barcode; +using FastReport.Table; +using FastReport.Utils; + +namespace FastReport +{ + public class ReportScript + { + + private int x; + private string header=""; + private string s=""; + + private void Table9_ManualBuild(object sender, EventArgs e) + { + DataSourceBase rowData = Report.GetDataSource("Data"); + // init the data source + rowData.Init(); + x=0; + // print the first table row - it is a header + + // now enumerate the data source and print the table body + while (rowData.HasMoreRows) + { + // print the table body + x++; + Table9.PrintRow(0); + Table9.PrintColumns(); + + // go next data source row + rowData.Next(); + } + } + + private void Cell2_BeforePrint(object sender, EventArgs e) + { + if (Report.Engine.PageNo>1) + { + header="(续)"; + + } + } + + private void Cell1_BeforePrint(object sender, EventArgs e) + { + if (Report.Engine.PageNo>1) + { + s="2"; + } + else + { + s="1"; + } + } + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道材料材质标识检查记录.frx b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道材料材质标识检查记录.frx new file mode 100644 index 00000000..eeb29ab2 --- /dev/null +++ b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道材料材质标识检查记录.frx @@ -0,0 +1,202 @@ + + + using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Windows.Forms; +using System.Drawing; +using System.Data; +using FastReport; +using FastReport.Data; +using FastReport.Dialog; +using FastReport.Barcode; +using FastReport.Table; +using FastReport.Utils; + +namespace FastReport +{ + public class ReportScript + { + + private void Table2_ManualBuild(object sender, EventArgs e) + { + DataSourceBase rowData = Report.GetDataSource("Data"); + // init the data source + rowData.Init(); + + // print the first table row - it is a header + + // now enumerate the data source and print the table body + while (rowData.HasMoreRows) + { + // print the table body + Table2.PrintRow(0); + Table2.PrintColumns(); + + // go next data source row + rowData.Next(); + } + } + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道焊接工作记录.frx b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道焊接工作记录.frx new file mode 100644 index 00000000..b3415779 --- /dev/null +++ b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道焊接工作记录.frx @@ -0,0 +1,224 @@ + + + using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Windows.Forms; +using System.Drawing; +using System.Data; +using FastReport; +using FastReport.Data; +using FastReport.Dialog; +using FastReport.Barcode; +using FastReport.Table; +using FastReport.Utils; + +namespace FastReport +{ + public class ReportScript + { + + private void Table2_ManualBuild(object sender, EventArgs e) + { + DataSourceBase rowData = Report.GetDataSource("Data"); + // init the data source + rowData.Init(); + + // print the first table row - it is a header + + // now enumerate the data source and print the table body + while (rowData.HasMoreRows) + { + // print the table body + Table2.PrintRow(0); + Table2.PrintColumns(); + + // go next data source row + rowData.Next(); + } + } + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道系统压力试验条件确认记录.frx b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道系统压力试验条件确认记录.frx new file mode 100644 index 00000000..648a0914 --- /dev/null +++ b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道系统压力试验条件确认记录.frx @@ -0,0 +1,293 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道系统压力试验记录.frx b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道系统压力试验记录.frx new file mode 100644 index 00000000..99fa687c --- /dev/null +++ b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道系统压力试验记录.frx @@ -0,0 +1,271 @@ + + + using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Windows.Forms; +using System.Drawing; +using System.Data; +using FastReport; +using FastReport.Data; +using FastReport.Dialog; +using FastReport.Barcode; +using FastReport.Table; +using FastReport.Utils; + +namespace FastReport +{ + public class ReportScript + { + + private void Table2_ManualBuild(object sender, EventArgs e) + { + DataSourceBase rowData = Report.GetDataSource("Data"); + // init the data source + rowData.Init(); + + // print the first table row - it is a header + + // now enumerate the data source and print the table body + while (rowData.HasMoreRows) + { + // print the table body + Table2.PrintRow(0); + Table2.PrintColumns(); + + // go next data source row + rowData.Next(); + } + } + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道试压包尾项清单.frx b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道试压包尾项清单.frx new file mode 100644 index 00000000..83eee40a --- /dev/null +++ b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道试压包尾项清单.frx @@ -0,0 +1,177 @@ + + + using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Windows.Forms; +using System.Drawing; +using System.Data; +using FastReport; +using FastReport.Data; +using FastReport.Dialog; +using FastReport.Barcode; +using FastReport.Table; +using FastReport.Utils; + +namespace FastReport +{ + public class ReportScript + { + + private void Table2_ManualBuild(object sender, EventArgs e) + { + DataSourceBase rowData = Report.GetDataSource("Data"); + // init the data source + rowData.Init(); + + // print the first table row - it is a header + + // now enumerate the data source and print the table body + while (rowData.HasMoreRows) + { + // print the table body + Table2.PrintRow(0); + Table2.PrintColumns(); + + // go next data source row + rowData.Next(); + } + } + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道试压包文件资料.frx b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道试压包文件资料.frx new file mode 100644 index 00000000..9af7e298 --- /dev/null +++ b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道试压包文件资料.frx @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/装箱单.frx b/SGGL/FineUIPro.Web/File/Fastreport/装箱单.frx index 5ca4de20..124997e3 100644 --- a/SGGL/FineUIPro.Web/File/Fastreport/装箱单.frx +++ b/SGGL/FineUIPro.Web/File/Fastreport/装箱单.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -42,7 +42,7 @@ namespace FastReport } - + @@ -50,6 +50,7 @@ namespace FastReport + @@ -58,12 +59,12 @@ namespace FastReport - - + + - + - + @@ -76,59 +77,65 @@ namespace FastReport - + - + - - + + + + - + - + - - + + + + - - + + - + - - + + + + - + diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 1f8781f0..7c91181a 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -307,6 +307,9 @@ + + + @@ -1584,6 +1587,7 @@ + @@ -1612,6 +1616,7 @@ + @@ -10795,6 +10800,13 @@ TrainNumberManageEdit.aspx + + TrainNumberManagerPrint.aspx + ASPXCodeBehind + + + TrainNumberManagerPrint.aspx + TrainNumberManagerView.aspx ASPXCodeBehind @@ -10991,6 +11003,13 @@ TestPackageCompleteEdit.aspx + + TestPackageData.aspx + ASPXCodeBehind + + + TestPackageData.aspx + TestPackageEdit.aspx ASPXCodeBehind @@ -16785,7 +16804,7 @@ - + diff --git a/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatchImport.aspx.cs b/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatchImport.aspx.cs index bb89fc04..3a322824 100644 --- a/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatchImport.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/NDT/NDTBatchImport.aspx.cs @@ -1,4 +1,5 @@ -using BLL; +using Aspose.Words.Lists; +using BLL; using MiniExcelLibs; using Model; using NPOI.SS.Util; @@ -202,6 +203,8 @@ namespace FineUIPro.Web.HJGL.NDT //设置生成下拉框的行和列 SetCellDropdownList(sheet, 6, 6, new List() { "合格", "不合格" }.ToArray());//是否合格 SetCellDropdownList(sheet, 7, 7, new List() { "Ⅰ", "Ⅱ", "Ⅲ", "Ⅳ", "Ⅴ" }.ToArray());//评定级别 + var defects = from x in Funs.DB.Base_Defect select x.DefectName;//缺陷 + SetCellDropdownList(sheet, 8, 8, new List() { string.Join(",", defects.ToList())}.ToArray()); //添加数据 cell = row.CreateCell(7); diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx.cs index 229f1e7b..590a5b8e 100644 --- a/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx.cs @@ -1032,7 +1032,7 @@ namespace FineUIPro.Web.HJGL.PointTrust protected void btnBack_Click(object sender, EventArgs e) { Model.SGGLDB db = Funs.DB; - string trustBatchId = string.Empty; + //string trustBatchId = string.Empty; var lists = this.Grid1.SelectedRowIDArray; if (lists.Count() > 0) { @@ -1047,8 +1047,10 @@ namespace FineUIPro.Web.HJGL.PointTrust var batchTrustItem = (from x in db.HJGL_Batch_BatchTrustItem where x.PointBatchItemId == pointBatchItemId select x).FirstOrDefault(); if (batchTrustItem != null) { - trustBatchId = batchTrustItem.TrustBatchId; - BLL.Batch_BatchTrustItemService.DeleteTrustItemByTrustBatchItemId(batchTrustItem.TrustBatchItemId); + //trustBatchId = batchTrustItem.TrustBatchId; + BLL.Batch_BatchTrustItemService.DeleteTrustItemByTrustBatchId(batchTrustItem.TrustBatchId); + BLL.Batch_BatchTrustService.DeleteBatchTrustById(batchTrustItem.TrustBatchId); + //BLL.Batch_BatchTrustItemService.DeleteTrustItemByTrustBatchItemId(batchTrustItem.TrustBatchItemId); } //修改点口中的委托状态 @@ -1071,11 +1073,11 @@ namespace FineUIPro.Web.HJGL.PointTrust } } - var trustItemList = BLL.Batch_BatchTrustItemService.GetBatchTrustItemByTrustBatchId(trustBatchId); - if (trustItemList.Count == 0) - { - BLL.Batch_BatchTrustService.DeleteBatchTrustById(trustBatchId); - } + //var trustItemList = BLL.Batch_BatchTrustItemService.GetBatchTrustItemByTrustBatchId(trustBatchId); + //if (trustItemList.Count == 0) + //{ + // BLL.Batch_BatchTrustService.DeleteBatchTrustById(trustBatchId); + //} PageInfo(); BindGrid(); ShowNotify("退回成功!", MessageBoxIcon.Success); diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx index 607a9290..62d2da0f 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx @@ -19,8 +19,8 @@ - + @@ -59,7 +59,7 @@ + runat="server" OnClick="btnSearch_Click"> @@ -69,9 +69,9 @@ - + + diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx.cs index 31f1e319..cc196643 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx.cs @@ -228,8 +228,9 @@ namespace FineUIPro.Web.HJGL.PreDesign /// private DataTable BindData() { - string strSql = @"WITH cte as (select pipeline.PipelineCode as PipelineCode, + string strSql = @"WITH cte as (select newid()as id,pipeline.PipelineCode as PipelineCode, comonent.PipelineComponentCode as PipelineComponentCode, + '预制组件' as Stype, '' as matdef, packdetail.Number as Number, pack.PackagingCode as PackagingCode, @@ -244,8 +245,9 @@ namespace FineUIPro.Web.HJGL.PreDesign left join HJGL_TrainNumberManage trainnumber on pack.TrainNumberId = TrainNumber.Id where (packdetail.PipelineComponentId is not null or packdetail.PipelineComponentId != '') union all - select pipeline.PipelineCode as PipelineCode, + select newid()as id,pipeline.PipelineCode as PipelineCode, packdetail.MaterialCode as PipelineComponentCode, + '预制散件' as Stype, matlib.MaterialDef as matdef, packdetail.Number as Number, pack.PackagingCode as PackagingCode, @@ -287,6 +289,11 @@ namespace FineUIPro.Web.HJGL.PreDesign // strSql += " AND cte.FlowingSection =@FlowingSection"; // listStr.Add(new SqlParameter("@FlowingSection", drpFlowingSection.SelectedValue.ToString())); //} + if (!string.IsNullOrEmpty(txtPipelineCode.Text)) + { + strSql += " AND cte.PipelineCode like @pipeline"; + listStr.Add(new SqlParameter("@pipeline", "%" + this.txtPipelineCode.Text.Trim() + "%")); + } strSql += " ORDER BY PipelineCode,PipelineComponentCode "; SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); @@ -351,13 +358,14 @@ namespace FineUIPro.Web.HJGL.PreDesign /// /// /// - protected void TextBox_TextChanged(object sender, EventArgs e) - { - this.BindGrid(); - } + //protected void TextBox_TextChanged(object sender, EventArgs e) + //{ + // this.BindGrid(); + //} protected void btnTreeFind_Click1(object sender, EventArgs e) { this.InitTreeMenu(); + this.BindGrid(); } #endregion @@ -388,6 +396,7 @@ namespace FineUIPro.Web.HJGL.PreDesign select new { 管线号 = x.Field("PipelineCode"), + 类型 = x.Field("Stype"), 组件编号 = x.Field("PipelineComponentCode"), 预制散件材料描述 = !string.IsNullOrWhiteSpace(x.Field("matdef")) ? x.Field("matdef") : "-", 数量 = x.Field("Number"), @@ -396,11 +405,11 @@ namespace FineUIPro.Web.HJGL.PreDesign 流水段 = x.Field("FlowingSection") }); string path = Funs.RootPath + @"File\Excel\Temp\PrePipelineInstallList.xlsx"; - path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HHmm}", DateTime.Now) + ".xlsx"); + path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd}", DateTime.Now) + ".xlsx"); MiniExcel.SaveAs(path, q); - string fileName = $"安装清单({(string.Format("{0:yyyy-MM-dd-HHmm}", DateTime.Now))}).xlsx"; + string fileName = $"安装清单-" + this.tvControlItem.SelectedNode.Text + "-" + string.Format("{0:yyyy-MM-dd}", DateTime.Now) + ".xlsx"; FileInfo info = new FileInfo(path); long fileSize = info.Length; System.Web.HttpContext.Current.Response.Clear(); diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx index e0c6536d..a313113b 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx @@ -15,8 +15,8 @@ @@ -40,22 +40,22 @@ - - + <%-- --%> - + - - - - - --%> + - - - + + @@ -107,7 +107,7 @@ - diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx.cs index 562bbcdb..31f06ce4 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx.cs @@ -308,16 +308,29 @@ namespace FineUIPro.Web.HJGL.PreDesign } protected void btnOutPrint_Click(object sender, EventArgs e) { - string Id = this.Grid1.SelectedRowID; - var model = HJGL_PackagingmanageService.GetHJGL_PackagingManageById(Id); - var PipelineComponent = model.PipelineComponentId.Split(','); - foreach (var item in PipelineComponent) + if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) { - HJGL_PipelineComponentService.UpdateOutState(item, model.PackagingCode); + string Id = this.Grid1.SelectedRowID; + var model = HJGL_PackagingmanageService.GetHJGL_PackagingManageById(Id); + if (model != null) + { + if (!string.IsNullOrEmpty(model.PipelineComponentId)) + { + var PipelineComponent = model.PipelineComponentId.Split(','); + foreach (var item in PipelineComponent) + { + HJGL_PipelineComponentService.UpdateOutState(item, model.PackagingCode); + } + } + HJGL_PackagingmanageService.PutOutOrder(Id); + Pring(Id); + } + } + else + { + ShowNotify("请选择要生成的出库单", MessageBoxIcon.Warning); + return; } - HJGL_PackagingmanageService.PutOutOrder(Id); - Pring(Id); - } private void Pring(string Id) { @@ -329,38 +342,41 @@ namespace FineUIPro.Web.HJGL.PreDesign return; } DataTable tb = BLL.HJGL_PackagingmanageService.GetPackagingDetailById(Id); - var model = HJGL_PackagingmanageService.GetHJGL_PackagingManageById(Id); - - var dtTable = tb.AsEnumerable().OrderBy(o => o["PlanStartDate"]).CopyToDataTable(); - string PlanStartDate = ""; - if (dtTable.Rows != null && dtTable.Rows.Count > 0) + if (tb.Rows.Count > 0) { - PlanStartDate = dtTable.Rows[0]["PlanStartDate"].ToString(); - } - Dictionary keyValuePairs = new Dictionary(); - keyValuePairs.Add("ProjectName", ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId)); - keyValuePairs.Add("PackagingCode", model.PackagingCode); - keyValuePairs.Add("PlanStartDate", PlanStartDate); - keyValuePairs.Add("StackingPosition", model.StackingPosition); - keyValuePairs.Add("ContactName", model.ContactName + "| " + model.ContactPhone); - keyValuePairs.Add("ID", "PackagingManage$" + model.PackagingManageId); - DataRow dataRow = tb.NewRow(); - dataRow["num"] = "合计:" + tb.Rows.Count; - tb.Rows.Add(dataRow); - if (tb != null) - { - tb.TableName = "Data"; - } - BLL.FastReportService.AddFastreportTable(tb); - BLL.FastReportService.AddFastreportParameter(keyValuePairs); - string initTemplatePath = ""; - string rootPath = Server.MapPath("~/"); - initTemplatePath = "File\\Fastreport\\装箱单.frx"; + var model = HJGL_PackagingmanageService.GetHJGL_PackagingManageById(Id); - if (File.Exists(rootPath + initTemplatePath)) - { - PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath))); + var dtTable = tb.AsEnumerable().OrderBy(o => o["PlanStartDate"]).CopyToDataTable(); + string PlanStartDate = ""; + if (dtTable.Rows != null && dtTable.Rows.Count > 0) + { + PlanStartDate = dtTable.Rows[0]["PlanStartDate"].ToString(); + } + Dictionary keyValuePairs = new Dictionary(); + keyValuePairs.Add("ProjectName", ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId)); + keyValuePairs.Add("PackagingCode", model.PackagingCode); + keyValuePairs.Add("PlanStartDate", PlanStartDate); + keyValuePairs.Add("StackingPosition", model.StackingPosition); + keyValuePairs.Add("ContactName", model.ContactName + "| " + model.ContactPhone); + keyValuePairs.Add("ID", "PackagingManage$" + model.PackagingManageId); + DataRow dataRow = tb.NewRow(); + dataRow["num"] = "合计:" + tb.Rows.Count; + tb.Rows.Add(dataRow); + if (tb != null) + { + tb.TableName = "Data"; + } + BLL.FastReportService.AddFastreportTable(tb); + BLL.FastReportService.AddFastreportParameter(keyValuePairs); + string initTemplatePath = ""; + string rootPath = Server.MapPath("~/"); + initTemplatePath = "File\\Fastreport\\装箱单.frx"; + if (File.Exists(rootPath + initTemplatePath)) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath))); + + } } } #endregion diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx index 147a8c7e..2cc6caaf 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx @@ -17,8 +17,8 @@ - + @@ -32,20 +32,24 @@ DataKeyNames="PipelineComponentId" AllowSorting="true" SortField="PipelineComponentCode" SortDirection="ASC"> - - + + + + + + - - - + <%-- @@ -119,7 +123,6 @@ CommandName="delete" Icon="Delete" /> - diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.cs index 15f29f23..bd4bb451 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.cs @@ -97,10 +97,11 @@ namespace FineUIPro.Web.HJGL.PreDesign //table.ContactPhone = txtContactPhone.Text; table.TrainNumberId = drpTrainNumber.SelectedValue; table.TypeInt = int.Parse(drpTypeInt.SelectedValue); + table.CompileMan = this.CurrUser.PersonId; + table.CompileDate = DateTime.Now; if (drpTypeInt.SelectedValue == ((int)HJGL_PackagingmanageService.TypeInt.预制组件).ToString()) { table.PipelineComponentId = string.Join(",", dropPipelineComponentCode.Values); - } BLL.HJGL_PackagingmanageService.AddHJGL_PackagingManage(table); diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.designer.cs index d1023ab2..4bd77055 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.designer.cs @@ -7,13 +7,11 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HJGL.PreDesign -{ - - - public partial class PackagingManageEdit - { - +namespace FineUIPro.Web.HJGL.PreDesign { + + + public partial class PackagingManageEdit { + /// /// form1 控件。 /// @@ -22,7 +20,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -31,7 +29,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Form2 控件。 /// @@ -40,7 +38,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form Form2; - + /// /// txtPackagingCode 控件。 /// @@ -49,7 +47,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtPackagingCode; - + /// /// drpTypeInt 控件。 /// @@ -58,7 +56,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpTypeInt; - + /// /// dropPipelineComponentCode 控件。 /// @@ -67,7 +65,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownBox dropPipelineComponentCode; - + /// /// Grid1 控件。 /// @@ -76,7 +74,16 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + /// /// Label3 控件。 /// @@ -85,7 +92,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label Label3; - + /// /// txtpipelineCode 控件。 /// @@ -94,7 +101,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtpipelineCode; - + /// /// txtpipelineComponentCode 控件。 /// @@ -103,7 +110,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtpipelineComponentCode; - + /// /// txtflowingSection 控件。 /// @@ -112,7 +119,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtflowingSection; - + /// /// btnFind 控件。 /// @@ -121,7 +128,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnFind; - + /// /// txtStackingPosition 控件。 /// @@ -130,7 +137,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtStackingPosition; - + /// /// drpTrainNumber 控件。 /// @@ -139,7 +146,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpTrainNumber; - + /// /// Grid2 控件。 /// @@ -148,7 +155,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid2; - + /// /// Toolbar3 控件。 /// @@ -157,7 +164,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar3; - + /// /// btnSelect 控件。 /// @@ -166,7 +173,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSelect; - + /// /// btnSelectStock 控件。 /// @@ -175,7 +182,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSelectStock; - + /// /// tbNumber 控件。 /// @@ -184,7 +191,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox tbNumber; - + /// /// Toolbar2 控件。 /// @@ -193,7 +200,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// btnSave 控件。 /// @@ -202,7 +209,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + /// /// btnClose 控件。 /// @@ -211,7 +218,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnClose; - + /// /// Window1 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageView.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageView.aspx index 319a54a9..e4e2858b 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageView.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageView.aspx @@ -35,6 +35,9 @@ + + diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageView.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageView.aspx.cs index bab5b46e..51b03139 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageView.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageView.aspx.cs @@ -67,7 +67,8 @@ namespace FineUIPro.Web.HJGL.PreDesign PipelineComponentCode = x.MaterialCode, num = x.Number, CU = x.MaterialUnit, - UnitWorkName = x.UnitWorkId == null ? "" : UnitWorkService.GetNameById(x.UnitWorkId) + UnitWorkName = x.UnitWorkId == null ? "" : UnitWorkService.GetNameById(x.UnitWorkId), + x.FlowingSection, }; Grid1.RecordCount = detailList.Count(); Grid1.DataSource = detailList; diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx index 7af24a42..adee1de5 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx @@ -12,62 +12,62 @@
- + - + - + - + - - + + - + - + - + - + - - + + - + - - + --%> @@ -81,71 +81,84 @@ Width="90px"> + DataField="TotalDyne" SortField="TotalDyne" FieldType="String" HeaderTextAlign="Center" TextAlign="Left" + Width="90px"> - + - + - + - + - + - + - + - + - - - + <%-- + + --%> - + DataField="AvgDailyWorkload" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left" + Width="140px"> + - + - + + + + + + + + + + + DataField="CompletedRate" FieldType="String" HeaderTextAlign="Center" TextAlign="Left" + Width="130px"> + DataField="TotalCompletedRate" FieldType="String" HeaderTextAlign="Center" TextAlign="Left" + Width="150px"> - - + + - - - - + + + @@ -158,11 +171,11 @@ - + - + - + endDate) { + alert("计划开始时间不能大于计划结束时间"); + return; + } + // 计算时间差(毫秒) + const timeDifference = endDate - startDate; + // 将时间差转换为天数 + const daysDifference = timeDifference / (1000 * 60 * 60 * 24); + //平均每天工作量=总达因/天数 + const avgDailyWorkload = totalDia / (daysDifference + 1); + //次日应完成量=平均每天完成量-已完成量+平均每天完成量 + if (onDayCompleteDyne != "") { + var nextDayCompleteDyne = avgDailyWorkload - onDayCompleteDyne + avgDailyWorkload; + } + + me.updateCellValue(rowId, 'Days', daysDifference + 1);//天数 + me.updateCellValue(rowId, 'AvgDailyWorkload', avgDailyWorkload);//平均每天工作量 + me.updateCellValue(rowId, 'NextDayCompleteDyne', nextDayCompleteDyne);//次日应完成量 + } } diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.cs index e12f8d35..d2a474a6 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.cs @@ -251,27 +251,47 @@ namespace FineUIPro.Web.HJGL.PreDesign SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunProc("Sp_ProductionSchedulingPlanStatistics", parameter); + //删除原有数据 + BLL.ProductionSchedulingPlanService.DeleteProductionSchedulingPlanByUnitWorkIdAndFlowNum(this.CurrUser.LoginProjectId,this.tvControlItem.SelectedNode.ParentNode.Text, this.tvControlItem.SelectedNode.Text); for (int i = 0; i < tb.Rows.Count; i++) { - //decimal totalDia = 0; - //totalDia += Convert.ToDecimal(tb.Rows[i]["Dia"].ToString());//总达因 + string unitWorkId = tb.Rows[i]["UnitWorkId"].ToString();//单位工程 + string flowingSection = tb.Rows[i]["FlowingSection"].ToString();//流水号 + string steelType = tb.Rows[i]["SteelType"].ToString();//材质Value + string material = tb.Rows[i]["Material"].ToString();//材质Text + string caliber = tb.Rows[i]["Caliber"].ToString();//寸径 - var plan = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlan(this.CurrUser.LoginProjectId, tb.Rows[i]["FlowingSection"].ToString(), tb.Rows[i]["UnitWorkId"].ToString(), tb.Rows[i]["Material"].ToString(), tb.Rows[i]["Caliber"].ToString()); + var plan = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlan(this.CurrUser.LoginProjectId, flowingSection, unitWorkId, material, caliber); if (plan == null) { Model.HJGL_ProductionSchedulingPlan newPlan = new HJGL_ProductionSchedulingPlan(); newPlan.ProductionSchedulingPlanId = SQLHelper.GetNewID(typeof(Model.HJGL_ProductionSchedulingPlan)); newPlan.ProjectId = this.CurrUser.LoginProjectId; - newPlan.PipelineId = tb.Rows[i]["UnitWorkId"].ToString();//装置ID - newPlan.FlowNum = tb.Rows[i]["FlowingSection"].ToString(); + newPlan.PipelineId = unitWorkId; + newPlan.FlowNum = flowingSection; newPlan.MainItemName = tb.Rows[i]["UnitWorkName"].ToString(); - newPlan.Material = tb.Rows[i]["Material"].ToString(); - newPlan.Caliber = tb.Rows[i]["Caliber"].ToString(); - newPlan.Dain = Funs.GetNewDecimalOrZero(tb.Rows[i]["Dia"].ToString()); - newPlan.TotalDyne = Funs.GetNewDecimalOrZero(tb.Rows[i]["TotalDia"].ToString()); - newPlan.CompletedCount = Funs.GetNewIntOrZero(tb.Rows[i]["cTotalCount"].ToString()); - newPlan.CompletedRate = Funs.GetNewDecimalOrZero(tb.Rows[i]["rate"].ToString()); - newPlan.TotalCompletedRate = Funs.GetNewDecimalOrZero(tb.Rows[i]["Srate"].ToString()); + newPlan.Material = material; + newPlan.Caliber = caliber; + newPlan.Dain = BLL.WeldJointService.GetSizeSum(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, steelType, caliber,"1"); + newPlan.TotalDyne = BLL.WeldJointService.GetSizeSumByUnitWorkIdAndFlowingSection(this.CurrUser.LoginProjectId, unitWorkId, flowingSection,"1"); + newPlan.CompletedCount = BLL.WeldJointService.GetSizeSum(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, steelType, caliber, "2"); + if (newPlan.Dain > 0) + { + newPlan.CompletedRate = (newPlan.CompletedCount / newPlan.Dain) * 100; + } + else + { + newPlan.CompletedRate = 0; + } + if (newPlan.TotalDyne > 0) + { + decimal? completeDinSum = BLL.WeldJointService.GetSizeSumByUnitWorkIdAndFlowingSection(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, "2"); + newPlan.TotalCompletedRate = (completeDinSum / newPlan.TotalDyne) * 100; + } + else + { + newPlan.TotalCompletedRate = 0; + } BLL.ProductionSchedulingPlanService.AddProductionSchedulingPlan(newPlan); } } @@ -296,74 +316,96 @@ namespace FineUIPro.Web.HJGL.PreDesign SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunProc("Sp_ProductionSchedulingPlanStatistics", parameter); - + //删除原有数据 + BLL.ProductionSchedulingPlanService.DeleteProductionSchedulingPlanByUnitWork(this.CurrUser.LoginProjectId, this.tvControlItem.SelectedNode.Text); for (int i = 0; i < tb.Rows.Count; i++) { - var plan = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlan(this.CurrUser.LoginProjectId, tb.Rows[i]["FlowingSection"].ToString(), tb.Rows[i]["UnitWorkId"].ToString(), tb.Rows[i]["Material"].ToString(), tb.Rows[i]["Caliber"].ToString()); + string unitWorkId = tb.Rows[i]["UnitWorkId"].ToString();//单位工程 + string flowingSection = tb.Rows[i]["FlowingSection"].ToString();//流水号 + string steelType = tb.Rows[i]["SteelType"].ToString();//材质Value + string material = tb.Rows[i]["Material"].ToString();//材质Text + string caliber = tb.Rows[i]["Caliber"].ToString();//寸径 + var plan = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlan(this.CurrUser.LoginProjectId, flowingSection, unitWorkId, material, caliber); if (plan == null) { Model.HJGL_ProductionSchedulingPlan newPlan = new HJGL_ProductionSchedulingPlan(); newPlan.ProductionSchedulingPlanId = SQLHelper.GetNewID(typeof(Model.HJGL_ProductionSchedulingPlan)); newPlan.ProjectId = this.CurrUser.LoginProjectId; - newPlan.PipelineId = tb.Rows[i]["UnitWorkId"].ToString();//装置ID - newPlan.FlowNum = tb.Rows[i]["FlowingSection"].ToString(); + newPlan.PipelineId = unitWorkId; + newPlan.FlowNum = flowingSection; newPlan.MainItemName = tb.Rows[i]["UnitWorkName"].ToString(); - newPlan.Material = tb.Rows[i]["Material"].ToString(); - newPlan.Caliber = tb.Rows[i]["Caliber"].ToString(); - newPlan.Dain = Funs.GetNewDecimalOrZero(tb.Rows[i]["Dia"].ToString()); - newPlan.TotalDyne = Funs.GetNewDecimalOrZero(tb.Rows[i]["TotalDia"].ToString()); - newPlan.CompletedCount = Funs.GetNewIntOrZero(tb.Rows[i]["cTotalCount"].ToString()); - newPlan.CompletedRate = Funs.GetNewDecimalOrZero(tb.Rows[i]["rate"].ToString()); - newPlan.TotalCompletedRate = Funs.GetNewDecimalOrZero(tb.Rows[i]["Srate"].ToString()); + newPlan.Material = material; + newPlan.Caliber = caliber; + newPlan.Dain = BLL.WeldJointService.GetSizeSum(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, steelType, caliber, "1"); + newPlan.TotalDyne = BLL.WeldJointService.GetSizeSumByUnitWorkIdAndFlowingSection(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, "1"); + newPlan.CompletedCount = BLL.WeldJointService.GetSizeSum(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, steelType, caliber, "2"); + if (newPlan.Dain > 0) + { + newPlan.CompletedRate = (newPlan.CompletedCount / newPlan.Dain) * 100; + } + else + { + newPlan.CompletedRate = 0; + } + if (newPlan.TotalDyne > 0) + { + decimal? completeDinSum = BLL.WeldJointService.GetSizeSumByUnitWorkIdAndFlowingSection(this.CurrUser.LoginProjectId, unitWorkId, flowingSection, "2"); + newPlan.TotalCompletedRate = (completeDinSum / newPlan.TotalDyne) * 100; + } + else + { + newPlan.TotalCompletedRate = 0; + } + BLL.ProductionSchedulingPlanService.AddProductionSchedulingPlan(newPlan); } } } - else if (this.tvControlItem.SelectedNodeID == "1" || this.tvControlItem.SelectedNodeID == "2") - { - List listStr = new List(); - listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId)); - if (!string.IsNullOrEmpty(this.hdUnitWorkId.Text)) - { - listStr.Add(new SqlParameter("@unitWorkId", this.hdUnitWorkId.Text)); - } - else - { - listStr.Add(new SqlParameter("@unitWorkId", null)); - } - if (!string.IsNullOrEmpty(this.txtSize.Text.Trim())) - { - listStr.Add(new SqlParameter("@caliber", this.txtSize.Text.Trim())); - } + //else if (this.tvControlItem.SelectedNodeID == "1" || this.tvControlItem.SelectedNodeID == "2") + //{ + // List listStr = new List(); + // listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId)); + // if (!string.IsNullOrEmpty(this.hdUnitWorkId.Text)) + // { + // listStr.Add(new SqlParameter("@unitWorkId", this.hdUnitWorkId.Text)); + // } + // else + // { + // listStr.Add(new SqlParameter("@unitWorkId", null)); + // } + // if (!string.IsNullOrEmpty(this.txtSize.Text.Trim())) + // { + // listStr.Add(new SqlParameter("@caliber", this.txtSize.Text.Trim())); + // } - SqlParameter[] parameter = listStr.ToArray(); - DataTable tb = SQLHelper.GetDataTableRunProc("Sp_ProductionSchedulingPlanStatistics", parameter); + // SqlParameter[] parameter = listStr.ToArray(); + // DataTable tb = SQLHelper.GetDataTableRunProc("Sp_ProductionSchedulingPlanStatistics", parameter); - for (int i = 0; i < tb.Rows.Count; i++) - { - if (!string.IsNullOrEmpty(tb.Rows[i]["FlowingSection"].ToString())) - { - var plan = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlan(this.CurrUser.LoginProjectId, tb.Rows[i]["FlowingSection"].ToString(), tb.Rows[i]["UnitWorkId"].ToString(), tb.Rows[i]["Material"].ToString(), tb.Rows[i]["Caliber"].ToString()); - if (plan == null) - { - Model.HJGL_ProductionSchedulingPlan newPlan = new HJGL_ProductionSchedulingPlan(); - newPlan.ProductionSchedulingPlanId = SQLHelper.GetNewID(typeof(Model.HJGL_ProductionSchedulingPlan)); - newPlan.ProjectId = this.CurrUser.LoginProjectId; - newPlan.PipelineId = tb.Rows[i]["UnitWorkId"].ToString();//装置ID - newPlan.FlowNum = tb.Rows[i]["FlowingSection"].ToString(); - newPlan.MainItemName = tb.Rows[i]["UnitWorkName"].ToString(); - newPlan.Material = tb.Rows[i]["Material"].ToString(); - newPlan.Caliber = tb.Rows[i]["Caliber"].ToString(); - newPlan.Dain = Funs.GetNewDecimalOrZero(tb.Rows[i]["Dia"].ToString()); - newPlan.TotalDyne = Funs.GetNewDecimalOrZero(tb.Rows[i]["TotalDia"].ToString()); - newPlan.CompletedCount = Funs.GetNewIntOrZero(tb.Rows[i]["cTotalCount"].ToString()); - newPlan.CompletedRate = Funs.GetNewDecimalOrZero(tb.Rows[i]["rate"].ToString()); - newPlan.TotalCompletedRate = Funs.GetNewDecimalOrZero(tb.Rows[i]["Srate"].ToString()); - BLL.ProductionSchedulingPlanService.AddProductionSchedulingPlan(newPlan); - } - } - } - } + // for (int i = 0; i < tb.Rows.Count; i++) + // { + // if (!string.IsNullOrEmpty(tb.Rows[i]["FlowingSection"].ToString())) + // { + // var plan = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlan(this.CurrUser.LoginProjectId, tb.Rows[i]["FlowingSection"].ToString(), tb.Rows[i]["UnitWorkId"].ToString(), tb.Rows[i]["Material"].ToString(), tb.Rows[i]["Caliber"].ToString()); + // if (plan == null) + // { + // Model.HJGL_ProductionSchedulingPlan newPlan = new HJGL_ProductionSchedulingPlan(); + // newPlan.ProductionSchedulingPlanId = SQLHelper.GetNewID(typeof(Model.HJGL_ProductionSchedulingPlan)); + // newPlan.ProjectId = this.CurrUser.LoginProjectId; + // newPlan.PipelineId = tb.Rows[i]["UnitWorkId"].ToString();//装置ID + // newPlan.FlowNum = tb.Rows[i]["FlowingSection"].ToString(); + // newPlan.MainItemName = tb.Rows[i]["UnitWorkName"].ToString(); + // newPlan.Material = tb.Rows[i]["Material"].ToString(); + // newPlan.Caliber = tb.Rows[i]["Caliber"].ToString(); + // newPlan.Dain = Funs.GetNewDecimalOrZero(tb.Rows[i]["Dia"].ToString()); + // newPlan.TotalDyne = Funs.GetNewDecimalOrZero(tb.Rows[i]["TotalDia"].ToString()); + // newPlan.CompletedCount = Funs.GetNewIntOrZero(tb.Rows[i]["cTotalCount"].ToString()); + // newPlan.CompletedRate = Funs.GetNewDecimalOrZero(tb.Rows[i]["rate"].ToString()); + // newPlan.TotalCompletedRate = Funs.GetNewDecimalOrZero(tb.Rows[i]["Srate"].ToString()); + // BLL.ProductionSchedulingPlanService.AddProductionSchedulingPlan(newPlan); + // } + // } + // } + //} } } #endregion @@ -393,7 +435,9 @@ namespace FineUIPro.Web.HJGL.PreDesign w.ProjectType, p.CompletedCount, p.CompletedRate, - p.TotalCompletedRate + p.TotalCompletedRate, + p.OnDayCompleteDyne, + p.NextDayCompleteDyne FROM HJGL_ProductionSchedulingPlan p left join WBS_UnitWork w on w.UnitWorkId=p.PipelineId WHERE 1=1 "; @@ -518,6 +562,11 @@ namespace FineUIPro.Web.HJGL.PreDesign newPlan.PlanEndDate = Funs.GetNewDateTime(values.Value("PlanEndDate")); newPlan.Days = Funs.GetNewInt(values.Value("Days")); newPlan.AvgDailyWorkload = Funs.GetNewDecimal(values.Value("AvgDailyWorkload")); + newPlan.OnDayCompleteDyne = Funs.GetNewDecimal(values.Value("OnDayCompleteDyne")); + newPlan.NextDayCompleteDyne = Funs.GetNewDecimal(values.Value("NextDayCompleteDyne")); + newPlan.CompletedCount = Funs.GetNewInt(values.Value("CompletedCount")); + newPlan.CompletedRate = Funs.GetNewDecimal(values.Value("CompletedRate")); + newPlan.TotalCompletedRate = Funs.GetNewDecimal(values.Value("TotalCompletedRate")); BLL.ProductionSchedulingPlanService.UpdateProductionSchedulingPlan(newPlan); } } @@ -546,12 +595,12 @@ namespace FineUIPro.Web.HJGL.PreDesign } else if (tvControlItem.SelectedNode.CommandName == "流水段") { - lists = lists.Where(x => x.FlowNum == this.tvControlItem.SelectedNode.Text); + lists = lists.Where(x => x.MainItemName == this.tvControlItem.SelectedNode.ParentNode.Text && x.FlowNum == this.tvControlItem.SelectedNode.Text); } - + lists = lists.OrderBy(x => x.Caliber).OrderBy(x => x.Material).OrderBy(x => x.FlowNum).OrderBy(x => x.MainItemName); if (lists != null) { - newUrl = uploadfilepath.Replace("排产计划导出模板", "排产计划(" + DateTime.Now.ToString("yyyyMMdd") + ")"); + newUrl = uploadfilepath.Replace("排产计划导出模板", "排产计划-" + this.tvControlItem.SelectedNode.Text + "-" + DateTime.Now.ToString("yyyyMMdd")); if (File.Exists(newUrl)) { File.Delete(newUrl); @@ -636,13 +685,21 @@ namespace FineUIPro.Web.HJGL.PreDesign cell = row.CreateCell(12); cell.CellStyle = cellStyle; - cell.SetCellValue(item.CompletedCount.HasValue ? item.CompletedCount.ToString() : "");//已完成量 - + cell.SetCellValue(item.OnDayCompleteDyne.HasValue ? item.OnDayCompleteDyne.ToString() : "");//当日已完成量 + cell = row.CreateCell(13); cell.CellStyle = cellStyle; + cell.SetCellValue(item.NextDayCompleteDyne.HasValue ? item.NextDayCompleteDyne.ToString() : "");//次日应完成量 + + cell = row.CreateCell(14); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.CompletedCount.HasValue ? item.CompletedCount.ToString() : "");//累计已完成量 + + cell = row.CreateCell(15); + cell.CellStyle = cellStyle; cell.SetCellValue(item.CompletedRate.HasValue ? item.CompletedRate.ToString() : "");//已完成百分比 - cell = row.CreateCell(14); + cell = row.CreateCell(16); cell.CellStyle = cellStyle; cell.SetCellValue(item.TotalCompletedRate.HasValue ? item.TotalCompletedRate.ToString() : "");//已完成百分比汇总 @@ -707,7 +764,7 @@ namespace FineUIPro.Web.HJGL.PreDesign SaveProductionSchedulingPlan(); } } - else + else //建筑工程/安装工程 { var unitWorkList = (from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.designer.cs index b90feb56..47f27654 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.designer.cs @@ -7,13 +7,11 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HJGL.PreDesign -{ - - - public partial class ProductionSchedulingPlan - { - +namespace FineUIPro.Web.HJGL.PreDesign { + + + public partial class ProductionSchedulingPlan { + /// /// form1 控件。 /// @@ -22,7 +20,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -31,7 +29,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -40,7 +38,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// panelLeftRegion 控件。 /// @@ -49,7 +47,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelLeftRegion; - + /// /// txtSize 控件。 /// @@ -58,7 +56,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtSize; - + /// /// btnStatics 控件。 /// @@ -67,7 +65,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnStatics; - + /// /// hdUnitWorkId 控件。 /// @@ -76,7 +74,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdUnitWorkId; - + /// /// tvControlItem 控件。 /// @@ -85,7 +83,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tree tvControlItem; - + /// /// panelCenterRegion 控件。 /// @@ -94,7 +92,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelCenterRegion; - + /// /// Toolbar3 控件。 /// @@ -103,7 +101,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar3; - + /// /// ToolbarFill1 控件。 /// @@ -112,7 +110,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnSave 控件。 /// @@ -121,7 +119,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + /// /// btnOut 控件。 /// @@ -130,7 +128,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnOut; - + /// /// Grid1 控件。 /// @@ -139,7 +137,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// txtTotalPriority 控件。 /// @@ -148,7 +146,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtTotalPriority; - + /// /// txtPriorityTotalDyne 控件。 /// @@ -157,7 +155,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtPriorityTotalDyne; - + /// /// txtPlanStartDate 控件。 /// @@ -166,7 +164,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtPlanStartDate; - + /// /// txtPlanEndDate 控件。 /// @@ -175,16 +173,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtPlanEndDate; - - /// - /// txtDays 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.NumberBox txtDays; - + /// /// txtAvgDailyWorkload 控件。 /// @@ -193,7 +182,25 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtAvgDailyWorkload; - + + /// + /// NumberBox1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox NumberBox1; + + /// + /// NumberBox2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox NumberBox2; + /// /// ToolbarSeparator1 控件。 /// @@ -202,7 +209,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -211,7 +218,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -220,7 +227,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Menu1 控件。 /// @@ -229,7 +236,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuDelete 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx index 63716924..2aea6e55 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx @@ -45,6 +45,7 @@ + @@ -77,7 +78,7 @@ - + @@ -106,7 +107,7 @@ Title="编辑" EnableIFrame="true" Height="650px" Width="1200px"> - diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.cs index 0d2f18de..fab1b868 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.cs @@ -198,7 +198,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { Response.ClearContent(); string filename = Funs.GetNewFileName(); - Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("车次管理表" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("发货管理" + filename, System.Text.Encoding.UTF8) + ".xls"); Response.ContentType = "application/excel"; Response.ContentEncoding = System.Text.Encoding.UTF8; this.Grid1.PageSize = 500; @@ -254,5 +254,20 @@ namespace FineUIPro.Web.HJGL.PreDesign PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format(url, id, "操作 - "))); } } + + protected void btnPrint_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) + { + string id = Grid1.SelectedRowID; + string url = "TrainNumberManagerPrint.aspx?TrainNumberId={0}"; + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format(url, id, "打印 - "))); + } + else + { + Alert.ShowInTop("请选择要打印的数据", MessageBoxIcon.Warning); + return; + } + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.designer.cs index bccac748..a4592435 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.designer.cs @@ -7,13 +7,11 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HJGL.PreDesign -{ - - - public partial class TrainNumberManager - { - +namespace FineUIPro.Web.HJGL.PreDesign { + + + public partial class TrainNumberManager { + /// /// form1 控件。 /// @@ -22,7 +20,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -31,7 +29,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -40,7 +38,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Grid1 控件。 /// @@ -49,7 +47,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// Toolbar2 控件。 /// @@ -58,7 +56,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// btnNew 控件。 /// @@ -67,7 +65,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// btnOut 控件。 /// @@ -76,7 +74,16 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnOut; - + + /// + /// btnPrint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnPrint; + /// /// lblNumber 控件。 /// @@ -85,7 +92,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label lblNumber; - + /// /// ToolbarSeparator1 控件。 /// @@ -94,7 +101,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -103,7 +110,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -112,7 +119,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -121,7 +128,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Window2 控件。 /// @@ -130,7 +137,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window2; - + /// /// Menu1 控件。 /// @@ -139,7 +146,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuEdit 控件。 /// @@ -148,7 +155,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuEdit; - + /// /// btnMenuDelete 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManagerPrint.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManagerPrint.aspx new file mode 100644 index 00000000..cc604af3 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManagerPrint.aspx @@ -0,0 +1,41 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TrainNumberManagerPrint.aspx.cs" Inherits="FineUIPro.Web.HJGL.PreDesign.TrainNumberManagerPrint" %> + + + + + + + 打印包装明细 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManagerPrint.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManagerPrint.aspx.cs new file mode 100644 index 00000000..80125356 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManagerPrint.aspx.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.HJGL.PreDesign +{ + public partial class TrainNumberManagerPrint : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManagerPrint.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManagerPrint.aspx.designer.cs new file mode 100644 index 00000000..a399ed54 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManagerPrint.aspx.designer.cs @@ -0,0 +1,69 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HJGL.PreDesign { + + + public partial class TrainNumberManagerPrint { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManagerView.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManagerView.aspx index 1d0cfcb9..462d1d65 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManagerView.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManagerView.aspx @@ -29,6 +29,9 @@ + + diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/ItemEndCheck.aspx b/SGGL/FineUIPro.Web/HJGL/TestPackage/ItemEndCheck.aspx index 4f906477..33fe1cfc 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/ItemEndCheck.aspx +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/ItemEndCheck.aspx @@ -27,6 +27,14 @@ + + + + + + + + testPackageLists = (from x in Funs.DB.PTP_TestPackage - where x.ProjectId == this.CurrUser.LoginProjectId - select x).ToList(); + List testPackageLists = new List(); + if (!string.IsNullOrEmpty(this.txtCode.Text.Trim())) + { + testPackageLists = (from x in Funs.DB.PTP_TestPackage + where x.ProjectId == this.CurrUser.LoginProjectId + && x.TestPackageNo.Contains(this.txtCode.Text.Trim()) + select x).ToList(); + } + else + { + testPackageLists = (from x in Funs.DB.PTP_TestPackage + where x.ProjectId == this.CurrUser.LoginProjectId + select x).ToList(); + } List unitWork1 = null; List unitWork2 = null; @@ -364,7 +375,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { if (this.tvControlItem.SelectedNode.CommandName == "TestPackage") { - if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.AItemEndCheckMenuId, Const.BtnAdd)) + if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.AItemEndCheckMenuId, Const.BtnSave)) { string url = "ItemEndCheckEdit.aspx?PTP_ID={0}"; PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format(url, tvControlItem.SelectedNodeID, "操作 - "))); @@ -585,5 +596,17 @@ namespace FineUIPro.Web.HJGL.TestPackage ShowNotify("您没有这个权限,请与管理员联系!"); } } + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void txtCode_TextChanged(object sender, EventArgs e) + { + InitTreeMenu(); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/ItemEndCheck.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/ItemEndCheck.aspx.designer.cs index 26995e98..32659e13 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/ItemEndCheck.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/ItemEndCheck.aspx.designer.cs @@ -57,6 +57,15 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// protected global::FineUIPro.Panel panelLeftRegion; + /// + /// txtCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCode; + /// /// tvControlItem 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/ItemEndCheckEdit.aspx b/SGGL/FineUIPro.Web/HJGL/TestPackage/ItemEndCheckEdit.aspx index 11be2440..9925e252 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/ItemEndCheckEdit.aspx +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/ItemEndCheckEdit.aspx @@ -96,7 +96,7 @@ - - + + + + + + + + - + diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageAudit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageAudit.aspx.cs index f9d01d85..e93bcea7 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageAudit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageAudit.aspx.cs @@ -86,9 +86,20 @@ namespace FineUIPro.Web.HJGL.TestPackage where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null select x).ToList(); - List testPackageLists = (from x in Funs.DB.PTP_TestPackage - where x.ProjectId == this.CurrUser.LoginProjectId - select x).ToList(); + List testPackageLists = new List(); + if (!string.IsNullOrEmpty(this.txtCode.Text.Trim())) + { + testPackageLists = (from x in Funs.DB.PTP_TestPackage + where x.ProjectId == this.CurrUser.LoginProjectId + && x.TestPackageNo.Contains(this.txtCode.Text.Trim()) + select x).ToList(); + } + else + { + testPackageLists = (from x in Funs.DB.PTP_TestPackage + where x.ProjectId == this.CurrUser.LoginProjectId + select x).ToList(); + } List unitWork1 = null; List unitWork2 = null; @@ -332,7 +343,11 @@ namespace FineUIPro.Web.HJGL.TestPackage var pipeline = db.HJGL_Pipeline.FirstOrDefault(x => x.PipelineId == pipelineItem.PipelineId); var totalJoint = from x in db.HJGL_WeldJoint join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId - where y.UnitWorkId == pipeline.UnitWorkId && y.DetectionRateId == pipeline.DetectionRateId && y.DetectionType.Contains(pipeline.DetectionType) + join z in db.PTP_PipelineList on y.PipelineId equals z.PipelineId + //where y.UnitWorkId == pipeline.UnitWorkId + where z.PTP_ID == this.PTP_ID + && y.DetectionRateId == pipeline.DetectionRateId + && y.DetectionType.Contains(pipeline.DetectionType) select x; string rateStr = string.Empty; var rate = Funs.DB.Base_DetectionRate.FirstOrDefault(x => x.DetectionRateId == pipeline.DetectionRateId); @@ -340,24 +355,34 @@ namespace FineUIPro.Web.HJGL.TestPackage { rateStr = rate.DetectionRateValue + "%"; } - this.lab12.Label = "本单位工程检测比例为" + rateStr + "的管线未焊接焊口数"; + this.lab12.Label = "本试压包检测比例为" + rateStr + "的管线未焊接焊口数"; int totalJointNum = totalJoint.Count(); //总焊口 int totalWeldingJointNum = totalJoint.Count(x => x.WeldingDailyId != null); //已焊总焊口 int notCloseBatch = (from x in db.HJGL_Batch_PointBatch - where x.UnitWorkId == pipeline.UnitWorkId && x.DetectionRateId == pipeline.DetectionRateId + join y in db.PTP_PipelineList on x.PipelineId equals y.PipelineId + where y.PTP_ID==this.PTP_ID //x.UnitWorkId == pipeline.UnitWorkId + && x.DetectionRateId == pipeline.DetectionRateId && x.DetectionTypeId == pipeline.DetectionType && x.EndDate == null select x).Count(); //未关闭批 int allPointJointNum = (from x in db.HJGL_Batch_PointBatchItem join y in db.HJGL_Batch_PointBatch on x.PointBatchId equals y.PointBatchId - where y.UnitWorkId == pipeline.UnitWorkId && y.DetectionRateId == pipeline.DetectionRateId + join j in db.HJGL_WeldJoint on x.WeldJointId equals j.WeldJointId + join p in db.PTP_PipelineList on j.PipelineId equals p.PipelineId + where p.PTP_ID == this.PTP_ID //x.UnitWorkId == pipeline.UnitWorkId + && y.DetectionRateId == pipeline.DetectionRateId && y.DetectionTypeId == pipeline.DetectionType && x.PointState != null select x).Count(); //全部点口(含扩透) int allOKCheckNum = (from x in db.HJGL_Batch_NDEItem join y in db.HJGL_Batch_NDE on x.NDEID equals y.NDEID - join z in db.HJGL_Batch_BatchTrust on y.TrustBatchId equals z.TrustBatchId - where z.UnitWorkId == pipeline.UnitWorkId && z.DetectionRateId == pipeline.DetectionRateId - && z.DetectionTypeId == pipeline.DetectionType && x.CheckResult == "1" - select x).Count(); //全部检测合格口 + join t in db.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in db.HJGL_Batch_BatchTrust on t.TrustBatchId equals z.TrustBatchId + join j in db.HJGL_WeldJoint on t.WeldJointId equals j.WeldJointId + join p in db.PTP_PipelineList on j.PipelineId equals p.PipelineId + where p.PTP_ID == this.PTP_ID //x.UnitWorkId == pipeline.UnitWorkId + && z.DetectionRateId == pipeline.DetectionRateId + && x.DetectionTypeId == pipeline.DetectionType && x.CheckResult == "1" + select x).Count(); //全部检测合格口 + if (totalJointNum > totalWeldingJointNum) //未全部焊完 { Count1 = totalJointNum - totalWeldingJointNum; @@ -534,9 +559,9 @@ namespace FineUIPro.Web.HJGL.TestPackage string isnoHot = BLL.TestPackageEditService.IsExistNoHotHardItem(this.PTP_ID); if (string.IsNullOrEmpty(isnoHot)) { - string inspectionIsoRate = BLL.TestPackageEditService.InspectionIsoRate(this.PTP_ID); - if (string.IsNullOrEmpty(inspectionIsoRate)) - { + //string inspectionIsoRate = BLL.TestPackageEditService.InspectionIsoRate(this.PTP_ID); + //if (string.IsNullOrEmpty(inspectionIsoRate)) + //{ updateTestPackage.Check1 = drpInstallationSpecification.SelectedValue; updateTestPackage.Check2 = drpPressureTest.SelectedValue; updateTestPackage.Check3 = drpWorkRecord.SelectedValue; @@ -555,12 +580,12 @@ namespace FineUIPro.Web.HJGL.TestPackage this.InitTreeMenu(); this.BindGrid(); ShowNotify("保存成功!", MessageBoxIcon.Success); - } - else - { - Alert.ShowInTop(inspectionIsoRate, MessageBoxIcon.Warning); - return; - } + //} + //else + //{ + // Alert.ShowInTop(inspectionIsoRate, MessageBoxIcon.Warning); + // return; + //} } else { @@ -635,5 +660,17 @@ namespace FineUIPro.Web.HJGL.TestPackage } } #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void txtCode_TextChanged(object sender, EventArgs e) + { + InitTreeMenu(); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageAudit.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageAudit.aspx.designer.cs index ef5ac8e7..5799cbc8 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageAudit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageAudit.aspx.designer.cs @@ -57,6 +57,15 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// protected global::FineUIPro.Panel panelLeftRegion; + /// + /// txtCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCode; + /// /// tvControlItem 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx index 9927d305..0037daf8 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx @@ -46,6 +46,14 @@ + + + + + + + + - + diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx.cs index 4e160bba..900817fe 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx.cs @@ -136,9 +136,20 @@ where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null select x).ToList(); - List testPackageLists = (from x in Funs.DB.PTP_TestPackage - where x.ProjectId == this.CurrUser.LoginProjectId - select x).ToList(); + List testPackageLists = new List(); + if (!string.IsNullOrEmpty(this.txtCode.Text.Trim())) + { + testPackageLists = (from x in Funs.DB.PTP_TestPackage + where x.ProjectId == this.CurrUser.LoginProjectId + && x.TestPackageNo.Contains(this.txtCode.Text.Trim()) + select x).ToList(); + } + else + { + testPackageLists = (from x in Funs.DB.PTP_TestPackage + where x.ProjectId == this.CurrUser.LoginProjectId + select x).ToList(); + } List unitWork1 = null; List unitWork2 = null; @@ -796,4 +807,16 @@ return; } } + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void txtCode_TextChanged(object sender, EventArgs e) + { + InitTreeMenu(); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx.designer.cs index 2134dac8..47dc3a8e 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx.designer.cs @@ -57,6 +57,15 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// protected global::FineUIPro.Panel panelLeftRegion; + /// + /// txtCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCode; + /// /// tvControlItem 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageData.aspx b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageData.aspx new file mode 100644 index 00000000..c05f9df3 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageData.aspx @@ -0,0 +1,93 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestPackageData.aspx.cs" Inherits="FineUIPro.Web.HJGL.TestPackage.TestPackageData" %> + + + + + + + 试压包资料 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageData.aspx.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageData.aspx.cs new file mode 100644 index 00000000..313955b1 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageData.aspx.cs @@ -0,0 +1,1591 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data.SqlClient; +using System.Data; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.IO; +using Model; +using Microsoft.SqlServer.Server; +using NPOI.SS.Formula.Functions; + +namespace FineUIPro.Web.HJGL.TestPackage +{ + public partial class TestPackageData : PageBase + { + #region 定义项 + /// + /// 试压包主键 + /// + public string PTP_ID + { + get + { + return (string)ViewState["PTP_ID"]; + } + set + { + ViewState["PTP_ID"] = value; + } + } + + /// + /// 单位工程Id + /// + public string UnitWorkId + { + get + { + return (string)ViewState["UnitWorkId"]; + } + set + { + ViewState["UnitWorkId"] = value; + } + } + #endregion + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + this.InitTreeMenu();//加载树 + BindGrid(); + } + } + + #region 加载树装置-单位-工作区 + /// + /// 加载树 + /// + private void InitTreeMenu() + { + this.tvControlItem.Nodes.Clear(); + + TreeNode rootNode1 = new TreeNode(); + rootNode1.NodeID = "1"; + rootNode1.Text = "建筑工程"; + rootNode1.CommandName = "建筑工程"; + rootNode1.Selectable = false; + rootNode1.EnableClickEvent = true; + this.tvControlItem.Nodes.Add(rootNode1); + + TreeNode rootNode2 = new TreeNode(); + rootNode2.NodeID = "2"; + rootNode2.Text = "安装工程"; + rootNode2.CommandName = "安装工程"; + rootNode2.Expanded = true; + rootNode2.EnableClickEvent = true; + this.tvControlItem.Nodes.Add(rootNode2); + var pUnits = (from x in Funs.DB.Project_ProjectUnit where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList(); + // 获取当前用户所在单位 + var currUnit = pUnits.FirstOrDefault(x => x.UnitId == this.CurrUser.UnitId); + + var unitWorkList = (from x in Funs.DB.WBS_UnitWork + where x.ProjectId == this.CurrUser.LoginProjectId + && x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null + select x).ToList(); + //List testPackageLists = (from x in Funs.DB.PTP_TestPackage + //where x.ProjectId == this.CurrUser.LoginProjectId + //select x).ToList(); + List unitWork1 = null; + List unitWork2 = null; + + //// 当前为施工单位,只能操作本单位的数据 + //if (currUnit != null && currUnit.UnitType == Const.ProjectUnitType_2) + //{ + // unitWork1 = (from x in unitWorkList + // where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "1" + // select x).ToList(); + // unitWork2 = (from x in unitWorkList + // where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "2" + // select x).ToList(); + //} + //else + //{ + unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); + unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); + //} + + if (unitWork1.Count() > 0) + { + foreach (var q in unitWork1) + { + var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId); + TreeNode tn1 = new TreeNode(); + tn1.NodeID = q.UnitWorkId; + tn1.Text = q.UnitWorkName; + tn1.ToolTip = "施工单位:" + unitNamesUnitIds; + tn1.CommandName = "单位工程"; + tn1.EnableClickEvent = true; + rootNode1.Nodes.Add(tn1); + //var testPackageUnitList = testPackageLists.Where(x => x.UnitWorkId == q.UnitWorkId).ToList(); + //BindNodes(tn1, testPackageUnitList); + } + } + if (unitWork2.Count() > 0) + { + foreach (var q in unitWork2) + { + var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId); + TreeNode tn2 = new TreeNode(); + tn2.NodeID = q.UnitWorkId; + tn2.Text = q.UnitWorkName; + tn2.ToolTip = "施工单位:" + unitNamesUnitIds; + tn2.CommandName = "单位工程"; + tn2.EnableClickEvent = true; + rootNode2.Nodes.Add(tn2); + //var testPackageUnitList = testPackageLists.Where(x => x.UnitWorkId == q.UnitWorkId).ToList(); + //BindNodes(tn2, testPackageUnitList); + } + } + } + #endregion + + #region 点击TreeView + /// + /// 点击TreeView + /// + /// + /// + protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e) + { + this.UnitWorkId = tvControlItem.SelectedNodeID; + this.BindGrid(); + } + #endregion + + #region 数据绑定 + /// + /// 数据绑定 + /// + private void BindGrid() + { + string strSql = @" select t.PTP_ID, + t.ProjectId, + t.UnitId, + t.UnitWorkId, + t.TestPackageNo, + t.TestPackageName, + (case when t.PrintState>0 then '第'+convert(varchar(10),t.PrintState)+'次打印' else '未打印' end) as PrintState, + t.TableDate + from PTP_TestPackage t where t.ProjectId=@projectId"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + if (!string.IsNullOrEmpty(this.UnitWorkId)) + { + strSql += " and t.UnitWorkId =@unitWorkId"; + listStr.Add(new SqlParameter("@unitWorkId", this.UnitWorkId)); + } + if (!string.IsNullOrEmpty(this.txtTestPackageNo.Text.Trim())) + { + strSql += " and t.TestPackageNo like @testPackageNo"; + listStr.Add(new SqlParameter("@testPackageNo", "%" + this.txtTestPackageNo.Text.Trim() + "%")); + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + // 2.获取当前分页数据 + //var table = this.GetPagedDataTable(Grid1, tb1); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + #endregion + + #region 分页排序 + #region 页索引改变事件 + /// + /// 页索引改变事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + #endregion + + #region 排序 + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + #endregion + + #region 分页选择下拉改变事件 + /// + /// 分页选择下拉改变事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + #endregion + #endregion + + #region 打印 + /// + /// 打印按钮 + /// + /// + /// + protected void btnPrint_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) + { + this.PTP_ID = this.Grid1.SelectedRowID; + exportWord("1"); + } + else + { + Alert.ShowInTop("请选择一条试压包", MessageBoxIcon.Warning); + return; + } + } + + protected void exportWord(string type) + { + if (!string.IsNullOrEmpty(this.PTP_ID)) + { + //修改试压包打印状态 + var updateTestPackage = Funs.DB.PTP_TestPackage.FirstOrDefault(x => x.PTP_ID == this.PTP_ID); + if (updateTestPackage != null) + { + if (updateTestPackage.PrintState.HasValue && updateTestPackage.PrintState > 0) + { + updateTestPackage.PrintState = updateTestPackage.PrintState + 1; + } + else + { + updateTestPackage.PrintState = 1; + } + BLL.TestPackageEditService.UpdateTestPackagePrintState(updateTestPackage); + + string rootPath = Server.MapPath("~/"); + BLL.FastReportService.ResetData(); + + if (this.drpPrintType.SelectedValue == "1")//pdf格式 + { + ListItem[] list = new ListItem[10]; + list[0] = new ListItem("0", "File\\Fastreport\\JGZL\\管道试压包文件资料.frx"); + list[1] = new ListItem("1", "File\\Fastreport\\JGZL\\管道压力试验技术要求.frx"); + list[2] = new ListItem("2", "File\\Fastreport\\JGZL\\管道压力包文件资料目录.frx"); + list[3] = new ListItem("3", "File\\Fastreport\\JGZL\\管道系统压力试验条件确认记录.frx"); + list[4] = new ListItem("4", "File\\Fastreport\\JGZL\\管道试压包尾项清单.frx"); + list[5] = new ListItem("5", "File\\Fastreport\\JGZL\\管道系统压力试验记录.frx"); + list[6] = new ListItem("6", "File\\Fastreport\\JGZL\\管道材料材质标识检查记录.frx"); + list[7] = new ListItem("7", "File\\Fastreport\\JGZL\\管道焊接工作记录.frx"); + list[8] = new ListItem("8", "File\\Fastreport\\JGZL\\管道无损检测数量统计表.frx"); + list[9] = new ListItem("9", "File\\Fastreport\\JGZL\\无损检测结果汇总表.frx"); + + List FastReportItemList = new List(); + foreach (var item in list) + { + FastReportItemList.Add(GetFastReportItem(updateTestPackage, item.Text)); + } + + var Path = Funs.RootPath + "FileUpload/" + this.PTP_ID + ".pdf"; + + BLL.FastReportService.ExportMergeReport(FastReportItemList, Path, this.drpPrintType.SelectedValue); + FileInfo info = new FileInfo(Path); + long fileSize = info.Length; + + System.Web.HttpContext.Current.Response.Clear(); + System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed"; + System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode("试压包资料.pdf", System.Text.Encoding.UTF8)); + System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString()); + System.Web.HttpContext.Current.Response.TransmitFile(Path, 0, fileSize); + System.Web.HttpContext.Current.Response.Flush(); + System.Web.HttpContext.Current.Response.Close(); + File.Delete(Path); + } + else if (this.drpPrintType.SelectedValue == "2")//word格式 + { + ListItem[] list = new ListItem[3]; + list[0] = new ListItem("0", "File\\Fastreport\\JGZL\\管道试压包文件资料.frx"); + list[1] = new ListItem("1", "File\\Fastreport\\JGZL\\管道压力试验技术要求.frx"); + list[2] = new ListItem("2", "File\\Fastreport\\JGZL\\管道压力包文件资料目录.frx"); + + List FastReportItemList = new List(); + foreach (var item in list) + { + FastReportItemList.Add(GetFastReportItem(updateTestPackage, item.Text)); + } + var PathA = Funs.RootPath + "FileUpload/" + this.PTP_ID + ".docx"; + BLL.FastReportService.ExportMergeReport(FastReportItemList, PathA, this.drpPrintType.SelectedValue); + Aspose.Words.Document doc1 = new Aspose.Words.Document(PathA); + + ListItem[] list2 = new ListItem[1]; + list2[0] = new ListItem("3", "File\\Fastreport\\JGZL\\管道系统压力试验条件确认记录.frx"); + List FastReportItemList2 = new List(); + foreach (var item in list2) + { + FastReportItemList2.Add(GetFastReportItem(updateTestPackage, item.Text)); + } + var PathB = Funs.RootPath + "FileUpload/" + this.PTP_ID + "2.docx"; + BLL.FastReportService.ExportMergeReport(FastReportItemList2, PathB, this.drpPrintType.SelectedValue); + Aspose.Words.Document doc2 = new Aspose.Words.Document(PathB); + + // 合并 Word DOcx 文档 + doc1.AppendDocument(doc2, Aspose.Words.ImportFormatMode.KeepSourceFormatting); + + + ListItem[] list3 = new ListItem[1]; + list3[0] = new ListItem("4", "File\\Fastreport\\JGZL\\管道试压包尾项清单.frx"); + List FastReportItemList3 = new List(); + foreach (var item in list3) + { + FastReportItemList3.Add(GetFastReportItem(updateTestPackage, item.Text)); + } + var PathC = Funs.RootPath + "FileUpload/" + this.PTP_ID + "3.docx"; + BLL.FastReportService.ExportMergeReport(FastReportItemList3, PathC, this.drpPrintType.SelectedValue); + Aspose.Words.Document doc3 = new Aspose.Words.Document(PathC); + // 合并 Word DOcx 文档 + doc1.AppendDocument(doc3, Aspose.Words.ImportFormatMode.KeepSourceFormatting); + + ListItem[] list4 = new ListItem[2]; + list4[0] = new ListItem("5", "File\\Fastreport\\JGZL\\管道系统压力试验记录.frx"); + list4[1] = new ListItem("6", "File\\Fastreport\\JGZL\\管道材料材质标识检查记录.frx"); + List FastReportItemList4 = new List(); + foreach (var item in list4) + { + FastReportItemList4.Add(GetFastReportItem(updateTestPackage, item.Text)); + } + var PathD = Funs.RootPath + "FileUpload/" + this.PTP_ID + "4.docx"; + BLL.FastReportService.ExportMergeReport(FastReportItemList4, PathD, this.drpPrintType.SelectedValue); + Aspose.Words.Document doc4 = new Aspose.Words.Document(PathD); + // 合并 Word DOcx 文档 + doc1.AppendDocument(doc4, Aspose.Words.ImportFormatMode.KeepSourceFormatting); + + ListItem[] list5 = new ListItem[3]; + list5[0] = new ListItem("7", "File\\Fastreport\\JGZL\\管道焊接工作记录.frx"); + list5[1] = new ListItem("8", "File\\Fastreport\\JGZL\\管道无损检测数量统计表.frx"); + list5[2] = new ListItem("9", "File\\Fastreport\\JGZL\\无损检测结果汇总表.frx"); + List FastReportItemList5 = new List(); + foreach (var item in list5) + { + FastReportItemList5.Add(GetFastReportItem(updateTestPackage, item.Text)); + } + var PathE = Funs.RootPath + "FileUpload/" + this.PTP_ID + "5.docx"; + BLL.FastReportService.ExportMergeReport(FastReportItemList5, PathE, this.drpPrintType.SelectedValue); + Aspose.Words.Document doc5 = new Aspose.Words.Document(PathE); + // 合并 Word DOcx 文档 + doc1.AppendDocument(doc5, Aspose.Words.ImportFormatMode.KeepSourceFormatting); + + //将合并的文档保存为 DOCX 文件 + doc1.Save(Funs.RootPath + "FileUpload/doc.docx"); + + var Path = Funs.RootPath + "FileUpload/doc.docx"; + FileInfo info = new FileInfo(Path); + long fileSize = info.Length; + + System.Web.HttpContext.Current.Response.Clear(); + System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed"; + System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode("交工资料.docx", System.Text.Encoding.UTF8)); + System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString()); + System.Web.HttpContext.Current.Response.TransmitFile(Path, 0, fileSize); + System.Web.HttpContext.Current.Response.Flush(); + System.Web.HttpContext.Current.Response.Close(); + File.Delete(Path); + File.Delete(PathA); + File.Delete(PathB); + File.Delete(PathC); + File.Delete(PathD); + File.Delete(PathE); + } + } + } + else + { + Alert.ShowInTop("请选择要打印的单据!", MessageBoxIcon.Warning); + return; + } + } + + + protected Model.FastReportItem GetFastReportItem(Model.PTP_TestPackage updateTestPackage, string printType) + { + string initTemplatePath = ""; + Model.FastReportItem fastReportItem = new Model.FastReportItem(); + switch (printType) + { + case "0"://管道试压包文件资料 + { + Dictionary keyValuePairs = new Dictionary(); + var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId); + var InstallationName = BLL.UnitWorkService.getUnitWorkByUnitWorkId(updateTestPackage.UnitWorkId).UnitWorkName; + keyValuePairs.Add("ProjectName", projectName); + keyValuePairs.Add("InstallationName", projectName + InstallationName); + keyValuePairs.Add("TestPackageNo", updateTestPackage.TestPackageNo); + BLL.FastReportService.AddFastreportParameter(keyValuePairs); + + initTemplatePath = "File\\Fastreport\\JGZL\\管道试压包文件资料.frx"; + fastReportItem.ReportPath = initTemplatePath; + fastReportItem.ParameterValues = keyValuePairs; + } + break; + case "1"://管道压力试验技术要求 + { + Dictionary keyValuePairs = new Dictionary(); + BLL.FastReportService.AddFastreportParameter(keyValuePairs); + + initTemplatePath = "File\\Fastreport\\JGZL\\管道压力试验技术要求.frx"; + fastReportItem.ReportPath = initTemplatePath; + fastReportItem.ParameterValues = keyValuePairs; + } + break; + case "2"://管道压力包文件资料目录 + { + Dictionary keyValuePairs = new Dictionary(); + BLL.FastReportService.AddFastreportParameter(keyValuePairs); + + initTemplatePath = "File\\Fastreport\\JGZL\\管道压力包文件资料目录.frx"; + fastReportItem.ReportPath = initTemplatePath; + fastReportItem.ParameterValues = keyValuePairs; + } + break; + case "3"://管道系统压力试验条件确认记录 + { + Dictionary keyValuePairs = new Dictionary(); + var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId); + var InstallationName = BLL.UnitWorkService.getUnitWorkByUnitWorkId(updateTestPackage.UnitWorkId).UnitWorkName; + keyValuePairs.Add("ProjectName", projectName); + keyValuePairs.Add("InstallationName", InstallationName); + keyValuePairs.Add("TestPackageNo", updateTestPackage.TestPackageNo); + keyValuePairs.Add("TestPackageName", updateTestPackage.TestPackageName); + BLL.FastReportService.AddFastreportParameter(keyValuePairs); + + initTemplatePath = "File\\Fastreport\\JGZL\\管道系统压力试验条件确认记录.frx"; + fastReportItem.ReportPath = initTemplatePath; + fastReportItem.ParameterValues = keyValuePairs; + } + break; + case "4"://管道试压包尾项清单 + { + string sql = @"select ItemCheckId,PTP_ID,PTP_ItemEndCheck.PipelineId,Content,ItemType,Result,HJGL_Pipeline.PipelineCode from PTP_ItemEndCheck + left join PTP_ItemEndCheckList on PTP_ItemEndCheckList.ItemEndCheckListId = PTP_ItemEndCheck.ItemEndCheckListId + left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = PTP_ItemEndCheck.PipelineId + where PTP_ItemEndCheckList.PTP_ID=@ptp_id"; + List listStr = new List + { + new SqlParameter("@ptp_id", this.PTP_ID), + }; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(sql, parameter); + + DataTable dt = new DataTable(); + dt.TableName = "Data"; + dt.Columns.Add("SortNumber"); + dt.Columns.Add("PipelineCode"); + dt.Columns.Add("Content"); + dt.Columns.Add("ItemType"); + + for (int i = 0; i < tb.Rows.Count; i++) + { + var newRows = dt.NewRow(); + newRows["SortNumber"] = (i + 1).ToString(); + newRows["PipelineCode"] = tb.Rows[i]["PipelineCode"].ToString(); + newRows["Content"] = tb.Rows[i]["Content"].ToString(); + newRows["ItemType"] = tb.Rows[i]["ItemType"].ToString(); + + dt.Rows.Add(newRows); + } + BLL.FastReportService.AddFastreportTable(dt); + + Dictionary keyValuePairs = new Dictionary(); + keyValuePairs.Add("TestPackageNo", updateTestPackage.TestPackageNo); + BLL.FastReportService.AddFastreportParameter(keyValuePairs); + + initTemplatePath = "File\\Fastreport\\JGZL\\管道试压包尾项清单.frx"; + + List dataTables = new List(); + dataTables.Add(dt); + fastReportItem.ReportPath = initTemplatePath; + fastReportItem.ParameterValues = keyValuePairs; + fastReportItem.DataTables = dataTables; + } + break; + case "5"://管道系统压力试验记录 + { + string sql = @"SELECT ptpPipe.PT_PipeId, + ptpPipe.PTP_ID, + ptpPipe.PipelineId, + ptpPipe.DesignPress, --设计压力 + ptpPipe.DesignTemperature, --设计温度 + ptpPipe.TestPressure, --试验压力 + IsoInfo.PipelineCode,--管道编号/单线号 + testMedium.MediumName,--试验介质 + testPackage.AmbientTemperature,--试验环境温度 + testPackage.TestMediumTemperature--试验介质温度 + FROM dbo.PTP_PipelineList AS ptpPipe + LEFT JOIN dbo.HJGL_Pipeline AS IsoInfo ON ptpPipe.PipelineId = IsoInfo.PipelineId + LEFT JOIN dbo.Base_TestMedium AS testMedium ON testMedium.TestMediumId = IsoInfo.TestMedium + left join PTP_TestPackage as testPackage on testPackage.PTP_ID = ptpPipe.PTP_ID + where ptpPipe.PTP_ID=@ptp_id"; + List listStr = new List + { + new SqlParameter("@ptp_id", this.PTP_ID), + }; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(sql, parameter); + + DataTable dt = new DataTable(); + dt.TableName = "Data"; + dt.Columns.Add("PipelineCode"); + dt.Columns.Add("DesignPress"); + dt.Columns.Add("DesignTemperature"); + dt.Columns.Add("MediumName"); + dt.Columns.Add("TestPressure"); + dt.Columns.Add("AmbientTemperature"); + dt.Columns.Add("TestMediumTemperature"); + + for (int i = 0; i < tb.Rows.Count; i++) + { + var newRows = dt.NewRow(); + newRows["PipelineCode"] = tb.Rows[i]["PipelineCode"].ToString(); + newRows["DesignPress"] = tb.Rows[i]["DesignPress"].ToString(); + newRows["DesignTemperature"] = tb.Rows[i]["DesignTemperature"].ToString(); + newRows["MediumName"] = tb.Rows[i]["MediumName"].ToString(); + newRows["TestPressure"] = tb.Rows[i]["TestPressure"].ToString(); + newRows["AmbientTemperature"] = tb.Rows[i]["AmbientTemperature"].ToString(); + var temp = tb.Rows[i]["TestMediumTemperature"].ToString(); + newRows["TestMediumTemperature"] = tb.Rows[i]["TestMediumTemperature"].ToString(); + + dt.Rows.Add(newRows); + } + BLL.FastReportService.AddFastreportTable(dt); + + var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId); + var InstallationName = BLL.UnitWorkService.getUnitWorkByUnitWorkId(updateTestPackage.UnitWorkId).UnitWorkName; + Dictionary keyValuePairs = new Dictionary(); + keyValuePairs.Add("ProjectName", projectName); + keyValuePairs.Add("InstallationName", InstallationName); + keyValuePairs.Add("TestPackageNo", updateTestPackage.TestPackageNo); + keyValuePairs.Add("TestPackageName", updateTestPackage.TestPackageName); + BLL.FastReportService.AddFastreportParameter(keyValuePairs); + + initTemplatePath = "File\\Fastreport\\JGZL\\管道系统压力试验记录.frx"; + + List dataTables = new List(); + dataTables.Add(dt); + fastReportItem.ReportPath = initTemplatePath; + fastReportItem.ParameterValues = keyValuePairs; + fastReportItem.DataTables = dataTables; + } + break; + case "6"://管道材料材质标识检查记录 + { + string sql = @"select PT_PipeId, PTP_ID,pipelineList.PipelineId,pipeline.PipelineCode + from PTP_PipelineList as pipelineList + left join HJGL_Pipeline as pipeline on pipeline.PipelineId = pipelineList.PipelineId + where PTP_ID=@ptp_id"; + List listStr = new List + { + new SqlParameter("@ptp_id", this.PTP_ID), + }; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(sql, parameter); + + DataTable dt = new DataTable(); + dt.TableName = "Data"; + dt.Columns.Add("PipelineCode"); + dt.Columns.Add("ManterialCode"); + dt.Columns.Add("Specification"); + + for (int i = 0; i < tb.Rows.Count; i++) + { + var newRows = dt.NewRow(); + newRows["PipelineCode"] = tb.Rows[i]["PipelineCode"].ToString(); + newRows["ManterialCode"] = getMaterialCodeByPipelineId(tb.Rows[i]["PipelineId"].ToString()); + newRows["Specification"] = getSpecificationByPipelineId(tb.Rows[i]["PipelineId"].ToString()); + + dt.Rows.Add(newRows); + } + BLL.FastReportService.AddFastreportTable(dt); + + var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId); + var InstallationName = BLL.UnitWorkService.getUnitWorkByUnitWorkId(updateTestPackage.UnitWorkId).UnitWorkName; + Dictionary keyValuePairs = new Dictionary(); + keyValuePairs.Add("ProjectName", projectName); + keyValuePairs.Add("InstallationName", InstallationName); + BLL.FastReportService.AddFastreportParameter(keyValuePairs); + + initTemplatePath = "File\\Fastreport\\JGZL\\管道材料材质标识检查记录.frx"; + + List dataTables = new List(); + dataTables.Add(dt); + fastReportItem.ReportPath = initTemplatePath; + fastReportItem.ParameterValues = keyValuePairs; + fastReportItem.DataTables = dataTables; + } + break; + case "7"://管道焊接工作记录 + { + var iosList = BLL.TestPackageEditService.GetPipeLineListByPTP_ID(this.PTP_ID); + if (iosList.Count > 0) + { + var q = iosList[0]; + var isoIds = string.Join("','", iosList.Select(x => x.PipelineId).ToArray()); + string sql = @"select weldJoint.WeldJointId, + weldJoint.PipelineId, + weldJoint.ProjectId, + weldJoint.PipelineCode,--管线号 + weldJoint.WeldJointCode,--焊口号 + (case when person.WelderCode is not null then + case when person2.WelderCode is not null and person.WelderCode<>person2.WelderCode + then person.WelderCode+'/'+person2.WelderCode + else person2.WelderCode end + else person.WelderCode end) as WelderCode,--焊工代号 + weldJoint.Specification, --规格 + (case when material1.MaterialCode is not null then + case when material2.MaterialCode is not null and material1.MaterialCode<>material2.MaterialCode + then material1.MaterialCode+'/'+material2.MaterialCode + else material2.MaterialCode end + else material1.MaterialCode end) as MaterialCode, --材质 + weldJoint.WeldingLocationId,--焊接位置 + weldingMethod.WeldingMethodCode,--焊接方法 + (case when consumables1.ConsumablesName is not null then + case when consumables2.ConsumablesName is not null and consumables1.ConsumablesName<>consumables2.ConsumablesName + then consumables1.ConsumablesName+'+'+consumables2.ConsumablesName + else consumables2.ConsumablesName end + else consumables1.ConsumablesName end) as WeldingMaterial,--焊材牌号 + convert(varchar(10),weldingDaily.WeldingDate,111) as WeldingDate --焊接日期 + from HJGL_WeldJoint as weldJoint + left join HJGL_Pipeline as pipeline on pipeline.PipelineId = weldJoint.PipelineId + left join SitePerson_Person as person on person.PersonId = weldJoint.CoverWelderId + left join SitePerson_Person as person2 on person2.PersonId = weldJoint.BackingWelderId + left join Base_Material as material1 on material1.MaterialId = weldJoint.Material1Id + left join Base_Material as material2 on material2.MaterialId = weldJoint.Material2Id + left join HJGL_WeldingDaily as weldingDaily on weldingDaily.WeldingDailyId = weldJoint.WeldingDailyId + left join Base_WeldingMethod as weldingMethod on weldingMethod.WeldingMethodId = weldJoint.WeldingMethodId + left join Base_Consumables as consumables1 on consumables1.ConsumablesId = weldJoint.WeldingWire + left join Base_Consumables as consumables2 on consumables2.ConsumablesId = weldJoint.WeldingRod + where weldJoint.WeldingDailyId is not null and weldJoint.PipelineId in ('" + isoIds + "')"; + + List listStr = new List + { + //new SqlParameter("@ptp_id", this.PTP_ID), + }; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(sql, parameter); + + DataTable dt = new DataTable(); + dt.TableName = "Data"; + dt.Columns.Add("PipelineCode"); + dt.Columns.Add("WeldJointCode"); + dt.Columns.Add("WelderCode"); + dt.Columns.Add("Specification"); + dt.Columns.Add("MaterialCode"); + dt.Columns.Add("WeldingLocationId"); + dt.Columns.Add("WeldingMethodCode"); + dt.Columns.Add("WeldingMaterial"); + dt.Columns.Add("WeldingDate"); + + for (int i = 0; i < tb.Rows.Count; i++) + { + var newRows = dt.NewRow(); + newRows["PipelineCode"] = tb.Rows[i]["PipelineCode"].ToString(); + newRows["WeldJointCode"] = tb.Rows[i]["WeldJointCode"].ToString(); + newRows["WelderCode"] = tb.Rows[i]["WelderCode"].ToString(); + newRows["Specification"] = tb.Rows[i]["Specification"].ToString(); + newRows["MaterialCode"] = tb.Rows[i]["MaterialCode"].ToString(); + newRows["WeldingLocationId"] = tb.Rows[i]["WeldingLocationId"].ToString(); + newRows["WeldingMethodCode"] = tb.Rows[i]["WeldingMethodCode"].ToString(); + newRows["WeldingMaterial"] = tb.Rows[i]["WeldingMaterial"].ToString(); + newRows["WeldingDate"] = tb.Rows[i]["WeldingDate"].ToString(); + + dt.Rows.Add(newRows); + } + BLL.FastReportService.AddFastreportTable(dt); + + var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId); + var InstallationName = BLL.UnitWorkService.getUnitWorkByUnitWorkId(updateTestPackage.UnitWorkId).UnitWorkName; + Dictionary keyValuePairs = new Dictionary(); + keyValuePairs.Add("ProjectName", projectName); + keyValuePairs.Add("InstallationName", InstallationName); + BLL.FastReportService.AddFastreportParameter(keyValuePairs); + + initTemplatePath = "File\\Fastreport\\JGZL\\管道焊接工作记录.frx"; + + List dataTables = new List(); + dataTables.Add(dt); + fastReportItem.ReportPath = initTemplatePath; + fastReportItem.ParameterValues = keyValuePairs; + fastReportItem.DataTables = dataTables; + } + } + break; + case "8"://管道无损检测数量统计表 + { + var iosList = BLL.TestPackageEditService.GetPipeLineListByPTP_ID(this.PTP_ID); + if (iosList.Count > 0) + { + var q = iosList[0]; + var isoIds = string.Join("','", iosList.Select(x => x.PipelineId).ToArray()); + Dictionary keyValuePairs = new Dictionary(); + var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId); + var UnitWorkName = BLL.UnitWorkService.getUnitWorkByUnitWorkId(updateTestPackage.UnitWorkId).UnitWorkName; + keyValuePairs.Add("projectName", projectName); + keyValuePairs.Add("UnitWorkName", UnitWorkName); + BLL.FastReportService.AddFastreportParameter(keyValuePairs); + string sql3 = @"SELECT isoList.PT_PipeId, + isoList.PTP_ID, + isoList.PipelineId, + testPackage.ProjectId, + isoInfo.PipelineCode, + isoInfo.SingleNumber, + (convert(nvarchar(10),dr.DetectionRateValue)+'%') as DetectionRateValue, + '' as totalJotCountBW, + '' as RTtotalJotCountBW, + '' as UTtotalJotCountBW, + '' as MTtotalJotCountBW, + '' as PTtotalJotCountBW, + '' as totalJotCountFW, + '' as MTtotalJotCountFW, + '' as PTtotalJotCountFW, + '' as totalJotCountDW, + '' as RTtotalJotCountDW, + '' as UTtotalJotCountDW, + '' as MTtotalJotCountDW, + '' as PTtotalJotCountDW + FROM PTP_PipelineList AS isoList + LEFT JOIN PTP_TestPackage AS testPackage ON testPackage.PTP_ID = isoList.PTP_ID + LEFT JOIN HJGL_Pipeline AS isoInfo ON isoInfo.PipelineId = isoList.PipelineId + left join Base_DetectionRate as dr on dr.DetectionRateId = isoInfo.DetectionRateId + where isoList.PipelineId in ('" + isoIds + "')"; + DataTable dt = SQLHelper.GetDataTableRunText(sql3, null); + if (dt != null) + { + dt.TableName = "Data"; + + for (int i = 0; i < dt.Rows.Count; i++) + { + #region 对接焊接头 + int totalJotCountBW = (from x in Funs.DB.HJGL_Batch_NDEItem + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId + join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId + where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() + && x.CheckResult == "1" + && z.WeldTypeCode == "BW" + select x).Count();//对接检测合格数量 + int RTtotalJotCountBW = (from x in Funs.DB.HJGL_Batch_NDEItem + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId + join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId + join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId + where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() + && x.CheckResult == "1" + && z.WeldTypeCode == "BW" + && w.DetectionTypeCode == "RT" + select x).Count();//RT对接检测合格数量 + int UTtotalJotCountBW = (from x in Funs.DB.HJGL_Batch_NDEItem + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId + join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId + join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId + where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() + && x.CheckResult == "1" + && z.WeldTypeCode == "BW" + && w.DetectionTypeCode == "UT" + select x).Count();//UT对接检测合格数量 + int MTtotalJotCountBW = (from x in Funs.DB.HJGL_Batch_NDEItem + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId + join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId + join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId + where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() + && x.CheckResult == "1" + && z.WeldTypeCode == "BW" + && w.DetectionTypeCode == "MT" + select x).Count();// MT对接检测合格数量 + int PTtotalJotCountBW = (from x in Funs.DB.HJGL_Batch_NDEItem + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId + join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId + join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId + where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() + && x.CheckResult == "1" + && z.WeldTypeCode == "BW" + && w.DetectionTypeCode == "PT" + select x).Count();//PT对接检测合格数量 + + dt.Rows[i]["totalJotCountBW"] = totalJotCountBW.ToString(); + dt.Rows[i]["RTtotalJotCountBW"] = RTtotalJotCountBW.ToString(); + dt.Rows[i]["UTtotalJotCountBW"] = UTtotalJotCountBW.ToString(); + dt.Rows[i]["MTtotalJotCountBW"] = MTtotalJotCountBW.ToString(); + dt.Rows[i]["PTtotalJotCountBW"] = PTtotalJotCountBW.ToString(); + #endregion + + #region 角焊接头 + int totalJotCountFW = (from x in Funs.DB.HJGL_Batch_NDEItem + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId + join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId + where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() + && x.CheckResult == "1" + && (z.WeldTypeCode == "C"|| z.WeldTypeCode == "E") + select x).Count();//对接检测合格数量 + int MTtotalJotCountFW = (from x in Funs.DB.HJGL_Batch_NDEItem + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId + join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId + join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId + where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() + && x.CheckResult == "1" + && (z.WeldTypeCode == "C" || z.WeldTypeCode == "E") + && w.DetectionTypeCode == "MT" + select x).Count();//MT对接检测合格数量 + int PTtotalJotCountFW = (from x in Funs.DB.HJGL_Batch_NDEItem + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId + join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId + join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId + where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() + && x.CheckResult == "1" + && (z.WeldTypeCode == "C" || z.WeldTypeCode == "E") + && w.DetectionTypeCode == "PT" + select x).Count();//PT对接检测合格数量 + + dt.Rows[i]["totalJotCountFW"] = totalJotCountFW.ToString(); + dt.Rows[i]["MTtotalJotCountFW"] = MTtotalJotCountFW.ToString(); + dt.Rows[i]["PTtotalJotCountFW"] = PTtotalJotCountFW.ToString(); + #endregion + + #region 支管连接接头 + int totalJotCountDW = (from x in Funs.DB.HJGL_Batch_NDEItem + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId + join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId + where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() + && x.CheckResult == "1" + && z.WeldTypeCode == "D" + select x).Count();//支管检测合格数量 + int RTtotalJotCountDW = (from x in Funs.DB.HJGL_Batch_NDEItem + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId + join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId + join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId + where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() + && x.CheckResult == "1" + && z.WeldTypeCode == "D" + && w.DetectionTypeCode == "RT" + select x).Count();//支管检测合格数量 + int UTtotalJotCountDW = (from x in Funs.DB.HJGL_Batch_NDEItem + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId + join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId + join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId + where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() + && x.CheckResult == "1" + && z.WeldTypeCode == "D" + && w.DetectionTypeCode == "UT" + select x).Count();//支管检测合格数量 + int MTtotalJotCountDW = (from x in Funs.DB.HJGL_Batch_NDEItem + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId + join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId + join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId + where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() + && x.CheckResult == "1" + && z.WeldTypeCode == "D" + && w.DetectionTypeCode == "MT" + select x).Count();//支管检测合格数量 + int PTtotalJotCountDW = (from x in Funs.DB.HJGL_Batch_NDEItem + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId + join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId + join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId + where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() + && x.CheckResult == "1" + && z.WeldTypeCode == "D" + && w.DetectionTypeCode == "PT" + select x).Count();//支管检测合格数量 + + dt.Rows[i]["totalJotCountDW"] = totalJotCountDW.ToString(); + dt.Rows[i]["RTtotalJotCountDW"] = RTtotalJotCountDW.ToString(); + dt.Rows[i]["UTtotalJotCountDW"] = UTtotalJotCountDW.ToString(); + dt.Rows[i]["MTtotalJotCountDW"] = MTtotalJotCountDW.ToString(); + dt.Rows[i]["PTtotalJotCountDW"] = PTtotalJotCountDW.ToString(); + #endregion + } + } + BLL.FastReportService.AddFastreportTable(dt); + initTemplatePath = "File\\Fastreport\\JGZL\\管道无损检测数量统计表.frx"; + List dataTables = new List(); + dataTables.Add(dt); + fastReportItem.ReportPath = initTemplatePath; + fastReportItem.ParameterValues = keyValuePairs; + fastReportItem.DataTables = dataTables; + } + } + break; + case "9"://无损检测结果汇总表 + { + var iosList = BLL.TestPackageEditService.GetPipeLineListByPTP_ID(this.PTP_ID); + if (iosList.Count > 0) + { + var q = iosList[0]; + var isoNos = string.Join(",", iosList.Select(x => x.PipelineCode).ToArray()); + var isoIds = string.Join("','", iosList.Select(x => x.PipelineId).ToArray()); + Dictionary keyValuePairs = new Dictionary(); + var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId); + var UnitWorkName = BLL.UnitWorkService.getUnitWorkByUnitWorkId(updateTestPackage.UnitWorkId).UnitWorkName; + var unitNames = BLL.UnitService.GetUnitNameByUnitId(updateTestPackage.UnitId); + keyValuePairs.Add("ProjectName", projectName); + keyValuePairs.Add("UnitWorkName", UnitWorkName); + keyValuePairs.Add("UnitName2", unitNames);//施工单位 + if (!string.IsNullOrEmpty(q.PipingClassId)) + { + var PipingClass = BLL.Base_PipingClassService.GetPipingClassByPipingClassId(q.PipingClassId); + if (PipingClass != null) + { + keyValuePairs.Add("ISOLevel", PipingClass.PipingClassName); + } + } + keyValuePairs.Add("isoCode", isoNos); + + //监理单位 + var Unit1 = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_3); + if (Unit1 != null) + { + var unitNames1 = string.Join(",", Unit1.Select(x => x.UnitName).ToArray()); + keyValuePairs.Add("UnitName1", unitNames1); + + } + #region 定义变量 + int rtdjJoint = 0;//RT对接焊口数 + int? rtdjFilm = 0;//RT对接片数 + int rtjhJoint = 0;//RT角焊焊口数 + int? rtjhFilm = 0;//RT角焊片数 + int rtzgJoint = 0;//RT支管连接焊口数 + int? rtzgFilm = 0;//RT支管连接片数 + + int utdjJoint = 0;//UT对接焊口数 + //int? utdjFilm = 0;//UT对接片数 + int utjhJoint = 0;//UT角焊焊口数 + //int? utjhFilm = 0;//UT角焊片数 + int utzgJoint = 0;//UT支管连接焊口数 + //int? utzgFilm = 0;//UT支管连接片数 + + int mtdjJoint = 0;//MT对接焊口数 + //int? mtdjFilm = 0;//MT对接片数 + int mtjhJoint = 0;//MT角焊焊口数 + //int? mtjhFilm = 0;//MT角焊片数 + int mtzgJoint = 0;//MT支管连接焊口数 + //int? mtzgFilm = 0;//MT支管连接片数 + + int ptdjJoint = 0;//PT对接焊口数 + //int? ptdjFilm = 0;//PT对接片数 + int ptjhJoint = 0;//PT角焊焊口数 + //int? ptjhFilm = 0;//PT角焊片数 + int ptzgJoint = 0;//PT支管连接焊口数 + //int? ptzgFilm = 0;//PT支管连接片数 + + int rtdjNoPassJoint = 0; + int? rtdjNoPassFilm = 0; + int rtjhNoPassJoint = 0; + int? rtjhNoPassFilm = 0; + int rtzgNoPassJoint = 0; + int? rtzgNoPassFilm = 0; + + int utdjNoPassJoint = 0; + decimal? utdjNoPassFilm = 0; + int utjhNoPassJoint = 0; + decimal? utjhNoPassFilm = 0; + int utzgNoPassJoint = 0; + decimal? utzgNoPassFilm = 0; + + int mtdjNoPassJoint = 0; + decimal? mtdjNoPassFilm = 0; + int mtjhNoPassJoint = 0; + decimal? mtjhNoPassFilm = 0; + int mtzgNoPassJoint = 0; + decimal? mtzgNoPassFilm = 0; + + int ptdjNoPassJoint = 0; + decimal? ptdjNoPassFilm = 0; + int ptjhNoPassJoint = 0; + decimal? ptjhNoPassFilm = 0; + int ptzgNoPassJoint = 0; + decimal? ptzgNoPassFilm = 0; + #endregion + foreach (var iso in iosList) + { + #region 检测数量统计 + #region RT对焊接头 + rtdjJoint += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "RT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId + select x).Count();//RT对接焊口数 + + rtdjFilm += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "RT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId + select x.TotalFilm).Sum();//RT对接片数 + #endregion + #region RT角焊接头 + rtjhJoint += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "RT" && (w.WeldTypeCode == "C"|| w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId + select x).Count();//RT角焊焊口数 + + rtjhFilm += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "RT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId + select x.TotalFilm).Sum();//RT角焊片数 + #endregion + #region RT支管连接焊口数 + rtzgJoint += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "RT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId + select x).Count();//RT支管连接焊口数 + + rtzgFilm += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "RT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId + select x.TotalFilm).Sum();//RT支管连接片数 + #endregion + + #region UT对焊接头 + utdjJoint += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId + select x).Count();//UT对接焊口数 + + //utdjFilm += (from x in Funs.DB.CH_CheckItem + // join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId + // join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID + // join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId + // where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "BW" && z.ISO_ID == iso.ISO_ID + // select x.CHT_TotalFilm).Sum();//UT对接片数 + #endregion + #region UT角焊接头 + utjhJoint += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "UT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId + select x).Count();//UT角焊焊口数 + //utjhFilm += (from x in Funs.DB.CH_CheckItem + // join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId + // join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID + // join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId + // where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "FW" && z.ISO_ID == iso.ISO_ID + // select x.CHT_TotalFilm).Sum();//UT角焊片数 + #endregion + #region UT支管连接焊口数 + utzgJoint += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId + select x).Count();//UT支管连接焊口数 + + //utzgFilm += (from x in Funs.DB.CH_CheckItem + // join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId + // join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID + // join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId + // where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "DW" && z.ISO_ID == iso.ISO_ID + // select x.CHT_TotalFilm).Sum();//UT支管连接片数 + #endregion + + #region MT对焊接头 + mtdjJoint += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId + select x).Count();//MT对接焊口数 + + //mtdjFilm += (from x in Funs.DB.CH_CheckItem + // join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId + // join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID + // join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId + // where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "BW" && z.ISO_ID == iso.ISO_ID + // select x.CHT_TotalFilm).Sum();//MT对接片数 + #endregion + #region MT角焊接头 + mtjhJoint += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "MT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId + select x).Count();//MT角焊焊口数 + + //mtjhFilm += (from x in Funs.DB.CH_CheckItem + // join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId + // join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID + // join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId + // where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "FW" && z.ISO_ID == iso.ISO_ID + // select x.CHT_TotalFilm).Sum();//MT角焊片数 + #endregion + #region MT支管连接焊口数 + mtzgJoint += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId + select x).Count();//MT支管连接焊口数 + //mtzgFilm += (from x in Funs.DB.CH_CheckItem + // join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId + // join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID + // join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId + // where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "DW" && z.ISO_ID == iso.ISO_ID + // select x.CHT_TotalFilm).Sum();//MT支管连接片数 + #endregion + + #region PT对焊接头 + ptdjJoint += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId + select x).Count();//PT对接焊口数 + //ptdjFilm += (from x in Funs.DB.CH_CheckItem + // join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId + // join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID + // join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId + // where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "BW" && z.ISO_ID == iso.ISO_ID + // select x.CHT_TotalFilm).Sum();//PT对接片数 + #endregion + #region PT角焊接头 + ptjhJoint += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "PT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId + select x).Count();//PT角焊焊口数 + //ptjhFilm += (from x in Funs.DB.CH_CheckItem + // join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId + // join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID + // join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId + // where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "FW" && z.ISO_ID == iso.ISO_ID + // select x.CHT_TotalFilm).Sum();//PT角焊片数 + #endregion + #region PT支管连接焊口数 + ptzgJoint += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId + select x).Count();//PT支管连接焊口数 + //ptzgFilm += (from x in Funs.DB.CH_CheckItem + // join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId + // join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID + // join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId + // where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "DW" && z.ISO_ID == iso.ISO_ID + // select x.CHT_TotalFilm).Sum();//PT支管连接片数 + #endregion + #endregion + + #region 不合格情况统计 + #region RT对焊接头 + rtdjNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "RT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" + select x).Count();//RT对接焊口数 + rtdjNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "RT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" + select (x.TotalFilm - x.PassFilm)).Sum();//RT对接片数 + #endregion + #region RT角焊接头 + rtjhNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "RT" && (w.WeldTypeCode == "C" || w.WeldTypeCode=="E") && z.PipelineId == iso.PipelineId && x.CheckResult == "2" + select x).Count();//RT角焊焊口数 + + rtjhNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "RT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId && x.CheckResult == "2" + select (x.TotalFilm - x.PassFilm)).Sum();//RT角焊片数 + #endregion + #region RT支管连接焊口数 + rtzgNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "RT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" + select x).Count();//RT支管连接焊口数 + rtzgNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "RT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" + select (x.TotalFilm - x.PassFilm)).Sum();//RT支管连接片数 + #endregion + + #region UT对焊接头 + utdjNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" + select x).Count();//UT对接焊口数 + + utdjNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" + select x.TotalFilm - x.PassFilm).Sum();//UT对接片数 + #endregion + #region UT角焊接头 + utjhNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "UT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId && x.CheckResult == "2" + select x).Count();//UT角焊焊口数 + utjhNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "UT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId && x.CheckResult == "2" + select x.TotalFilm - x.PassFilm).Sum();//UT角焊片数 + #endregion + #region UT支管连接焊口数 + utzgNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" + select x).Count();//UT支管连接焊口数 + utzgNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" + select x.TotalFilm - x.PassFilm).Sum();//UT支管连接片数 + #endregion + + #region MT对焊接头 + mtdjNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" + select x).Count();//MT对接焊口数 + mtdjNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" + select x.TotalFilm - x.PassFilm).Sum();//MT对接片数 + #endregion + #region MT角焊接头 + mtjhNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "MT" && (w.WeldTypeCode == "C"|| w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId && x.CheckResult == "2" + select x).Count();//MT角焊焊口数 + mtjhNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "MT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId && x.CheckResult == "2" + select x.TotalFilm - x.PassFilm).Sum();//MT角焊片数 + #endregion + #region MT支管连接焊口数 + mtzgNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" + select x).Count();//MT支管连接焊口数 + mtzgNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" + select x.TotalFilm - x.PassFilm).Sum();//MT支管连接片数 + #endregion + + #region PT对焊接头 + ptdjNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" + select x).Count();//PT对接焊口数 + ptdjNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" + select x.TotalFilm - x.PassFilm).Sum();//PT对接片数 + #endregion + #region PT角焊接头 + ptjhNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "PT" && (w.WeldTypeCode == "C"|| w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId && x.CheckResult == "2" + select x).Count();//PT角焊焊口数 + ptjhNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "PT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId && x.CheckResult == "2" + select x.TotalFilm - x.PassFilm).Sum();//PT角焊片数 + #endregion + #region PT支管连接焊口数 + ptzgNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" + select x).Count();//PT支管连接焊口数 + ptzgNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem + join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId + join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId + join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId + where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" + select x.TotalFilm - x.PassFilm).Sum();//PT支管连接片数 + #endregion + #endregion + } + keyValuePairs.Add("RTBW", (rtdjJoint > 0 ? rtdjJoint.ToString() + "道" : "") + "/" + (rtdjFilm > 0 ? rtdjFilm.ToString() + "张" : "")); + keyValuePairs.Add("RTFW", (rtjhJoint > 0 ? rtjhJoint.ToString() + "道" : "") + "/" + (rtjhFilm > 0 ? rtjhFilm.ToString() + "张" : "")); + keyValuePairs.Add("RTDW", (rtzgJoint > 0 ? rtzgJoint.ToString() + "道" : "") + "/" + (rtzgFilm > 0 ? rtzgFilm.ToString() + "张" : "")); + keyValuePairs.Add("UTBW", (utdjJoint > 0 ? utdjJoint.ToString() + "道" : "") + "/" + (utdjJoint > 0 ? utdjJoint.ToString() + "米" : "")); + keyValuePairs.Add("UTFW", (utjhJoint > 0 ? utjhJoint.ToString() + "道" : "") + "/" + (utjhJoint > 0 ? utjhJoint.ToString() + "米" : "")); + keyValuePairs.Add("UTDW", (utzgJoint > 0 ? utzgJoint.ToString() + "道" : "") + "/" + (utzgJoint > 0 ? utzgJoint.ToString() + "米" : "")); + keyValuePairs.Add("MTBW", (mtdjJoint > 0 ? mtdjJoint.ToString() + "道" : "") + "/" + (mtdjJoint > 0 ? mtdjJoint.ToString() + "米" : "")); + keyValuePairs.Add("MTFW", (mtjhJoint > 0 ? mtjhJoint.ToString() + "道" : "") + "/" + (mtjhJoint > 0 ? mtjhJoint.ToString() + "米" : "")); + keyValuePairs.Add("MTDW", (mtzgJoint > 0 ? mtzgJoint.ToString() + "道" : "") + "/" + (mtzgJoint > 0 ? mtzgJoint.ToString() + "米" : "")); + keyValuePairs.Add("PTBW", (ptdjJoint > 0 ? ptdjJoint.ToString() + "道" : "") + "/" + (ptdjJoint > 0 ? ptdjJoint.ToString() + "米" : "")); + keyValuePairs.Add("PTFW", (ptjhJoint > 0 ? ptjhJoint.ToString() + "道" : "") + "/" + (ptjhJoint > 0 ? ptjhJoint.ToString() + "米" : "")); + keyValuePairs.Add("PTDW", (ptzgJoint > 0 ? ptzgJoint.ToString() + "道" : "") + "/" + (ptzgJoint > 0 ? ptzgJoint.ToString() + "米" : "")); + + keyValuePairs.Add("RTNoPassBW", (rtdjNoPassJoint > 0 ? rtdjNoPassJoint.ToString() + "道" : "") + "/" + (rtdjNoPassFilm > 0 ? rtdjNoPassFilm.ToString() + "张" : "")); + keyValuePairs.Add("RTNoPassFW", (rtjhNoPassJoint > 0 ? rtjhNoPassJoint.ToString() + "道" : "") + "/" + (rtjhNoPassFilm > 0 ? rtjhNoPassFilm.ToString() + "张" : "")); + keyValuePairs.Add("RTNoPassDW", (rtzgNoPassJoint > 0 ? rtzgNoPassJoint.ToString() + "道" : "") + "/" + (rtzgNoPassFilm > 0 ? rtzgNoPassFilm.ToString() + "张" : "")); + keyValuePairs.Add("UTNoPassBW", (utdjNoPassJoint > 0 ? utdjNoPassJoint.ToString() + "道" : "") + "/" + (utdjNoPassFilm > 0 ? utdjNoPassFilm.ToString() + "处" : "")); + keyValuePairs.Add("UTNoPassFW", (utjhNoPassJoint > 0 ? utjhNoPassJoint.ToString() + "道" : "") + "/" + (utjhNoPassFilm > 0 ? utjhNoPassFilm.ToString() + "处" : "")); + keyValuePairs.Add("UTNoPassDW", (utzgNoPassJoint > 0 ? utzgNoPassJoint.ToString() + "道" : "") + "/" + (utzgNoPassFilm > 0 ? utzgNoPassFilm.ToString() + "处" : "")); + keyValuePairs.Add("MTNoPassBW", (mtdjNoPassJoint > 0 ? mtdjNoPassJoint.ToString() + "道" : "") + "/" + (mtdjNoPassFilm > 0 ? mtdjNoPassFilm.ToString() + "处" : "")); + keyValuePairs.Add("MTNoPassFW", (mtjhNoPassJoint > 0 ? mtjhNoPassJoint.ToString() + "道" : "") + "/" + (mtjhNoPassFilm > 0 ? mtjhNoPassFilm.ToString() + "处" : "")); + keyValuePairs.Add("MTNoPassDW", (mtzgNoPassJoint > 0 ? mtzgNoPassJoint.ToString() + "道" : "") + "/" + (mtzgNoPassFilm > 0 ? mtzgNoPassFilm.ToString() + "处" : "")); + keyValuePairs.Add("PTNoPassBW", (ptdjNoPassJoint > 0 ? ptdjNoPassJoint.ToString() + "道" : "") + "/" + (ptdjNoPassFilm > 0 ? ptdjNoPassFilm.ToString() + "处" : "")); + keyValuePairs.Add("PTNoPassFW", (ptjhNoPassJoint > 0 ? ptjhNoPassJoint.ToString() + "道" : "") + "/" + (ptjhNoPassFilm > 0 ? ptjhNoPassFilm.ToString() + "处" : "")); + keyValuePairs.Add("PTNoPassDW", (ptzgNoPassJoint > 0 ? ptzgNoPassJoint.ToString() + "道" : "") + "/" + (ptzgNoPassFilm > 0 ? ptzgNoPassFilm.ToString() + "处" : "")); + keyValuePairs.Add("isoIds", isoIds); + + BLL.FastReportService.AddFastreportParameter(keyValuePairs); + string sql3 = @"select nDEItem.NDEItemID, + i.SingleName, + i.PipelineCode, + j.WeldJointCode, + (case when j.CoverWelderId is not null then ( + case when j.BackingWelderId is not null and j.CoverWelderId<>j.BackingWelderId + then cWelder.JobNum+'/'+fWelder.JobNum + else cWelder.JobNum end) else fWelder.JobNum end) as WelderCode, + (case when d.DetectionTypeCode='RT' or d.DetectionTypeCode='UT' then + (case nDEItem.CheckResult when '1' then '合格' when '2' then '不合格' else '/' end) else '/' end) as RTUTResult, + (case when d.DetectionTypeCode='RT' or d.DetectionTypeCode='UT' then nDEItem.NDEReportNo else '/' end) as RTUTCheckNo, + (case when d.DetectionTypeCode='MT' or d.DetectionTypeCode='PT' then + (case nDEItem.CheckResult when '1' then '合格' when '2' then '不合格' else '/' end) else '/' end) as MTPTResult, + (case when d.DetectionTypeCode='MT' or d.DetectionTypeCode='PT' then nDEItem.NDEReportNo else '/' end) as MTPTCheckNo, + nDEItem.Remark as CHT_Remark,pointBatch.PointBatchCode + from HJGL_Batch_NDEItem as nDEItem + left join HJGL_Batch_NDE as c on c.NDEID = nDEItem.NDEID + left join HJGL_Batch_BatchTrustItem as t on t.TrustBatchItemId = nDEItem.TrustBatchItemId + left join HJGL_WeldJoint as j on j.WeldJointId = t.WeldJointId + left join HJGL_Pipeline as i on i.PipelineId =j.PipelineId + left join Person_Persons as cWelder on cWelder.PersonId = j.CoverWelderId + left join Person_Persons as fWelder on fWelder.PersonId = j.BackingWelderId + left join Base_DetectionType as d on d.DetectionTypeId = nDEItem.DetectionTypeId + left join HJGL_Batch_PointBatchItem as pointBatchItem on pointBatchItem.PointBatchItemId = t.PointBatchItemId + left join HJGL_Batch_PointBatch as pointBatch on pointBatch.PointBatchId = pointBatchItem.PointBatchId + where j.PipelineId in ('" + isoIds + "')"; + + List listStr = new List(); + SqlParameter[] parameter = listStr.ToArray(); + DataTable dt0 = SQLHelper.GetDataTableRunText(sql3, parameter); + + sql3 += " order by PipelineCode,WeldJointCode"; + + DataTable dt = new DataTable(); + dt.TableName = "Data"; + dt.Columns.Add("SingleName"); + dt.Columns.Add("WeldJointCode"); + dt.Columns.Add("WelderCode"); + dt.Columns.Add("PointBatchCode"); + dt.Columns.Add("RTUTResult"); + dt.Columns.Add("RTUTCheckNo"); + dt.Columns.Add("MTPTResult"); + dt.Columns.Add("MTPTCheckNo"); + dt.Columns.Add("CHT_Remark"); + + dt0.DefaultView.Sort = "PipelineCode,WeldJointCode asc"; + DataRow[] rows = dt0.DefaultView.ToTable().Select(); + + foreach (var row in rows) + { + var newRow = dt.NewRow(); + newRow["SingleName"] = row["SingleName"].ToString(); + newRow["WeldJointCode"] = row["WeldJointCode"].ToString(); + newRow["WelderCode"] = row["WelderCode"].ToString(); + newRow["PointBatchCode"] = row["PointBatchCode"].ToString(); + newRow["RTUTResult"] = row["RTUTResult"].ToString(); + newRow["RTUTCheckNo"] = row["RTUTCheckNo"].ToString(); + newRow["MTPTResult"] = row["MTPTResult"].ToString(); + newRow["MTPTCheckNo"] = row["MTPTCheckNo"].ToString(); + newRow["CHT_Remark"] = row["CHT_Remark"].ToString(); + dt.Rows.Add(newRow); + } + BLL.FastReportService.AddFastreportTable(dt); + initTemplatePath = "File\\Fastreport\\JGZL\\管道无损检测结果汇总表.frx"; + List dataTables = new List(); + dataTables.Add(dt); + fastReportItem.ReportPath = initTemplatePath; + fastReportItem.ParameterValues = keyValuePairs; + fastReportItem.DataTables = dataTables; + } + } + break; + } + return fastReportItem; + } + #endregion + + #region 格式化字符串 + protected string getMaterialCodeByPipelineId(string pipelineId) + { + string materialCode = string.Empty; + if (!string.IsNullOrEmpty(pipelineId)) + { + var weldjoint = (from x in Funs.DB.HJGL_WeldJoint + join y in Funs.DB.Base_Material on x.Material1Id equals y.MaterialId + join z in Funs.DB.Base_Material on x.Material2Id equals z.MaterialId + where x.PipelineId == pipelineId + select new { MaterialCode1 = y.MaterialCode, MaterialCode2 = z.MaterialCode }).FirstOrDefault(); + if (weldjoint != null) + { + if (!string.IsNullOrEmpty(weldjoint.MaterialCode1)&&!string.IsNullOrEmpty(weldjoint.MaterialCode2)) + { + materialCode = weldjoint.MaterialCode1 + "/" + weldjoint.MaterialCode2; + } + else + { + if (!string.IsNullOrEmpty(weldjoint.MaterialCode1)) + { + materialCode = weldjoint.MaterialCode1; + } + else + { + materialCode = weldjoint.MaterialCode2; + } + } + + } + } + return materialCode; + } + + protected string getSpecificationByPipelineId(string pipelineId) + { + string spcificaation = string.Empty; + if (!string.IsNullOrEmpty(pipelineId)) + { + var weldjoint = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == pipelineId select x).FirstOrDefault(); + if (weldjoint != null) + { + spcificaation = weldjoint.Specification; + } + } + return spcificaation; + } + #endregion + + #region 搜索 + /// + /// 查询 + /// + /// + /// + protected void txtTestPackageNo_TextChanged(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageData.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageData.aspx.designer.cs new file mode 100644 index 00000000..9e2309bc --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageData.aspx.designer.cs @@ -0,0 +1,159 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HJGL.TestPackage { + + + public partial class TestPackageData { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// panelLeftRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelLeftRegion; + + /// + /// tvControlItem 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tree tvControlItem; + + /// + /// hdPTP_ID 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdPTP_ID; + + /// + /// Panel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel2; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtTestPackageNo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTestPackageNo; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// drpPrintType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpPrintType; + + /// + /// btnPrint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnPrint; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx index 7438d6ff..47142db7 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx @@ -15,6 +15,14 @@ + + + + + + + + -
- - - - - - - - - - diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageImport.aspx.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageImport.aspx.cs index 99040cf3..73e9e87a 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageImport.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageImport.aspx.cs @@ -63,6 +63,7 @@ namespace FineUIPro.Web.HJGL.TestPackage } } #endregion + //void BindGrid2() //{ // string strSql = @" select Import.DesignBasisDataImportId @@ -154,6 +155,7 @@ namespace FineUIPro.Web.HJGL.TestPackage alert.Show(); } } + #region 读Excel提取数据 /// /// 从Excel提取数据--》Dataset @@ -192,8 +194,6 @@ namespace FineUIPro.Web.HJGL.TestPackage } #endregion - - #region 将Dataset的数据导入数据库 /// /// 将Dataset的数据导入数据库 @@ -216,8 +216,12 @@ namespace FineUIPro.Web.HJGL.TestPackage if (pds.Count > 0 && pds != null) { Model.SGGLDB db = Funs.DB; - var getPipeline = from x in db.View_HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x; - + //var getPipeline = from x in db.View_HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x; + var getPipeline = from x in db.HJGL_Pipeline + where x.ProjectId == this.CurrUser.LoginProjectId + && x.UnitWorkId == Request.Params["UnitWorkId"] + select x; + Model.WBS_UnitWork unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(Request.Params["UnitWorkId"]); for (int i = 1; i < pds.Count; i++) { @@ -229,46 +233,67 @@ namespace FineUIPro.Web.HJGL.TestPackage pipeline.UnitId = unitWork.UnitId; } - string col0 = pds[i].A; - if (string.IsNullOrEmpty(col0)) + if (pds[i].A != null) + { + string col0 = pds[i].A.ToString(); + if (string.IsNullOrEmpty(col0)) + { + result.Add("第" + (i + 1).ToString() + "行," + "试压包编号" + "," + "此项为必填项!" + "|"); + } + else + { + pipeline.TestPackageNo = col0; + } + } + else { result.Add("第" + (i + 1).ToString() + "行," + "试压包编号" + "," + "此项为必填项!" + "|"); } - else + if (pds[i].B != null) { - pipeline.TestPackageNo = col0; + pipeline.TestPackageName = pds[i].B.ToString();//系统名称 } - - pipeline.TestPackageName = pds[i].B;//系统名称 - - string col2 = pds[i].C; - if (string.IsNullOrEmpty(col2)) + if (pds[i].C != null) + { + string col2 = pds[i].C.ToString(); + if (string.IsNullOrEmpty(col2)) + { + result.Add("第" + (i + 1).ToString() + "行," + "管线号" + "," + "此项为必填项!" + "|"); + } + else + { + var line = getPipeline.FirstOrDefault(u => u.PipelineCode == col2); + if (line != null) + { + var ptpLineList = from x in db.PTP_PipelineList where x.PipelineId == line.PipelineId select x; + if (ptpLineList.Count() > 0 && DrpType.SelectedValue == "0") + { + result.Add("第" + (i + 1).ToString() + "行," + "管线号[" + col2 + "]已试压!" + "|"); + } + else + { + pipeline.PipelineId = line.PipelineId; + pipeline.PipelineCode = col2; + } + } + else + { + result.Add("第" + (i + 1).ToString() + "行," + "管线号[" + col2 + "]不存在!" + "|"); + } + } + } + else { result.Add("第" + (i + 1).ToString() + "行," + "管线号" + "," + "此项为必填项!" + "|"); } - else + if (pds[i].D != null) { - var line = getPipeline.FirstOrDefault(u => u.PipelineCode == col2); - if (line!=null) - { - pipeline.PipelineId = line.PipelineId; - pipeline.PipelineCode = col2; - } + pipeline.AdjustTestPressure = pds[i].D.ToString(); } - string col3 = pds[i].D; - if (!string.IsNullOrEmpty(col3)) + if (pds[i].E != null) { - try - { - decimal testPressure = Convert.ToDecimal(col3); - pipeline.TestPressure = testPressure; - } - catch (Exception) - { - result.Add("第" + (i + 1).ToString() + "行," + "调整试验压力格式输入有误" + "|"); - } - } - pipeline.Remark = pds[i].E; + pipeline.Remark = pds[i].E.ToString(); + } pipeline.Tabler = this.CurrUser.PersonId; pipeline.TableDate = DateTime.Now; @@ -289,7 +314,6 @@ namespace FineUIPro.Web.HJGL.TestPackage { errorInfos = string.Empty; } - } else { @@ -339,6 +363,7 @@ namespace FineUIPro.Web.HJGL.TestPackage } #endregion + #region 提交 /// /// 提交 @@ -371,9 +396,9 @@ namespace FineUIPro.Web.HJGL.TestPackage if (DrpType.SelectedValue == "1")//更新导入 { //BLL.PipelineMatService.DeletePipeLineMatByUnitWorkId(unitworkId);//删除原有管线对应材料 - BLL.WeldJointService.DeleteWeldJointByUnitWorkId(unitworkId);////删除原有管线对应焊口 - BLL.PipelineService.DeletePipelineByUnitworkId(unitworkId);//删除原有管线 - AddView_HJGL_WeldJoint(PipelineList);//导入数据 + //BLL.WeldJointService.DeleteWeldJointByUnitWorkId(unitworkId);////删除原有管线对应焊口 + //BLL.PipelineService.DeletePipelineByUnitworkId(unitworkId);//删除原有管线 + AddView_TestPackage_PipelineList(PipelineList);//导入数据 //Model.HJGL_DesignBasisDataImport hJGL_DesignBasisDataImport = new Model.HJGL_DesignBasisDataImport(); //hJGL_DesignBasisDataImport.DesignBasisDataImportId = SQLHelper.GetNewID(); @@ -396,7 +421,7 @@ namespace FineUIPro.Web.HJGL.TestPackage } else //补充导入 { - AddView_HJGL_WeldJoint(PipelineList); + AddView_TestPackage_PipelineList(PipelineList); //Model.HJGL_DesignBasisDataImport hJGL_DesignBasisDataImport = new Model.HJGL_DesignBasisDataImport(); //hJGL_DesignBasisDataImport.DesignBasisDataImportId = SQLHelper.GetNewID(); @@ -427,12 +452,12 @@ namespace FineUIPro.Web.HJGL.TestPackage ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning); } } - public void AddView_HJGL_WeldJoint(List PipelineList) + public void AddView_TestPackage_PipelineList(List PipelineList) { string unitworkId = Request.Params["UnitWorkId"]; addTestPackage(PipelineList, unitworkId); - addHJGL_WeldJoints(PipelineList, unitworkId); + addPTP_PipelineList(PipelineList, unitworkId); } void addTestPackage(List PipelineList, string UnitWorkId) @@ -448,7 +473,8 @@ namespace FineUIPro.Web.HJGL.TestPackage TestPackageName=x.TestPackageName, Tabler =x.Tabler, TableDate=x.TableDate, - Remark = x.Remark + Remark = x.Remark, + AdjustTestPressure=x.AdjustTestPressure }).DistinctBy(temp => new { temp.PTP_ID, @@ -457,7 +483,8 @@ namespace FineUIPro.Web.HJGL.TestPackage temp.UnitWorkId, temp.TestPackageNo, temp.TestPackageName, - temp.Remark + temp.Remark, + temp.AdjustTestPressure }).ToList(); for (int i = 0; i < pipelines.Count(); i++) { @@ -471,6 +498,7 @@ namespace FineUIPro.Web.HJGL.TestPackage pipeline.Tabler = pipelines[i].Tabler; pipeline.TableDate = pipelines[i].TableDate; pipeline.Remark = pipelines[i].Remark; + pipeline.AdjustTestPressure = pipelines[i].AdjustTestPressure; var isExistTestPackageNo = TestPackageEditService.GetTestPackageByNo(pipeline.TestPackageNo, pipeline.UnitWorkId); if (isExistTestPackageNo != null) // 更新试压包 @@ -485,40 +513,41 @@ namespace FineUIPro.Web.HJGL.TestPackage } } } - void addHJGL_WeldJoints(List PipelineList, string UnitWorkId) + void addPTP_PipelineList(List PipelineList, string UnitWorkId) { Model.SGGLDB db = Funs.DB; - var getpipelines = from y in db.PTP_TestPackage where y.UnitWorkId == UnitWorkId select y; - var allWeldJoints = from x in db.PTP_PipelineList + var getTestPackage = from y in db.PTP_TestPackage where y.UnitWorkId == UnitWorkId select y; + var allPipelineLists = from x in db.PTP_PipelineList join y in db.PTP_TestPackage on x.PTP_ID equals y.PTP_ID where y.UnitWorkId == UnitWorkId select x; - List weldJoints_add = new List(); + List pipelineList_add = new List(); var weldJoints = (from x in PipelineList select new Model.PTP_PipelineList - { + { PTP_ID = x.PTP_ID, + TestPackageNo=x.TestPackageNo, PipelineId = x.PipelineId, - TestPressure = x.TestPressure, + //TestPressure = x.TestPressure, }).DistinctBy(temp => new { temp.PTP_ID, + temp.TestPackageNo, temp.PipelineId, - temp.TestPressure + //temp.TestPressure }).ToList(); var pipelineCodes = weldJoints.Select(x => x.PTP_ID).Distinct().ToList(); for (int i = 0; i < weldJoints.Count(); i++) { Model.PTP_PipelineList weldJoint = new Model.PTP_PipelineList(); - //weldJoint.PipelineId = getpipelines.Where(x => x.TestPackageNo == weldJoints[i].PipelineCode).FirstOrDefault().PipelineId; - //weldJoint.WeldJointCode = weldJoints[i].WeldJointCode; - //weldJoint.PipelineCode = weldJoints[i].PipelineCode; - + weldJoint.PTP_ID = getTestPackage.Where(x => x.TestPackageNo == weldJoints[i].TestPackageNo).FirstOrDefault().PTP_ID; + weldJoint.PipelineId = weldJoints[i].PipelineId; + //weldJoint.TestPressure = weldJoints[i].TestPressure; - var isExistJot = allWeldJoints.FirstOrDefault(x => x.PTP_ID == weldJoint.PTP_ID && x.PipelineId == weldJoint.PipelineId); - if (isExistJot != null) // 更新焊口 + var isExistJot = allPipelineLists.FirstOrDefault(x => x.PTP_ID == weldJoint.PTP_ID && x.PipelineId == weldJoint.PipelineId); + if (isExistJot != null) // 更新试压管线 { weldJoint.PT_PipeId = isExistJot.PT_PipeId; BLL.TestPackageEditService.UpdatePipelineList(weldJoint); @@ -526,130 +555,43 @@ namespace FineUIPro.Web.HJGL.TestPackage else // 增加试压管线 { weldJoint.PT_PipeId = SQLHelper.GetNewID(); - weldJoints_add.Add(weldJoint); + pipelineList_add.Add(weldJoint); } } - if (weldJoints_add.Count > 0) + if (pipelineList_add.Count > 0) { - //BLL.TestPackageEditService.AddPipelineList(weldJoints_add); - } - Model.SGGLDB db2 = Funs.DB; - List delJoints = new List(); - var allWeldJoints2 = from x in db2.PTP_PipelineList - join y in db2.PTP_TestPackage on x.PTP_ID equals y.PTP_ID - where y.UnitWorkId == Request.Params["UnitWorkId"] - select x; - foreach (var pipelineCode in pipelineCodes) - { - var pipelineWeldJointCodes = weldJoints.Where(x => x.PTP_ID == pipelineCode).Select(x => x.PipelineId).ToList(); - var q = allWeldJoints2.Where(x => x.PTP_ID == pipelineCode && !pipelineWeldJointCodes.Contains(x.PipelineId)).ToList(); - delJoints.AddRange(q); - } - if (delJoints.Count() > 0) - { - try - { - db2.PTP_PipelineList.DeleteAllOnSubmit(delJoints); - db2.SubmitChanges(); - } - catch (Exception) - { - string weldJointCodes = string.Empty; - foreach (var item in delJoints) - { - weldJointCodes += item.PipelineId + ","; - } - Alert.ShowInParent(weldJointCodes, MessageBoxIcon.Warning); - } + BLL.TestPackageEditService.AddPipelineLists(pipelineList_add); } + //Model.SGGLDB db2 = Funs.DB; + //List delJoints = new List(); + //var allWeldJoints2 = from x in db2.PTP_PipelineList + // join y in db2.PTP_TestPackage on x.PTP_ID equals y.PTP_ID + // where y.UnitWorkId == Request.Params["UnitWorkId"] + // select x; + //foreach (var pipelineCode in pipelineCodes) + //{ + // var pipelineWeldJointCodes = weldJoints.Where(x => x.PTP_ID == pipelineCode).Select(x => x.PipelineId).ToList(); + // var q = allWeldJoints2.Where(x => x.PTP_ID == pipelineCode && !pipelineWeldJointCodes.Contains(x.PipelineId)).ToList(); + // delJoints.AddRange(q); + //} + //if (delJoints.Count() > 0) + //{ + // try + // { + // db2.PTP_PipelineList.DeleteAllOnSubmit(delJoints); + // db2.SubmitChanges(); + // } + // catch (Exception) + // { + // string weldJointCodes = string.Empty; + // foreach (var item in delJoints) + // { + // weldJointCodes += item.PipelineId + ","; + // } + // Alert.ShowInParent(weldJointCodes, MessageBoxIcon.Warning); + // } + //} } - - //public void AddView_HJGL_WeldJoint(List PipelineList) - //{ - // string unitworkId = Request.Params["UnitWorkId"]; - - // var getPipeline = from x in Funs.DB.View_HJGL_WeldJoint where x.UnitWorkId== unitworkId select x; - // List weldJoints_add = new List(); - - // for (int i = 0; i < PipelineList.Count(); i++) - // { - // var pipeLineId = string.Empty; - // var WeldJointId = string.Empty; - - // Model.HJGL_Pipeline pipeline = new Model.HJGL_Pipeline(); - // pipeline.PipelineId = PipelineList[i].PipelineId; - // pipeline.ProjectId = this.CurrUser.LoginProjectId; - // pipeline.UnitId = PipelineList[i].UnitId; - // pipeline.UnitWorkId = PipelineList[i].UnitWorkId; - // pipeline.PipelineCode = PipelineList[i].PipelineCode; - // pipeline.SingleName = PipelineList[i].SingleName; - // pipeline.SingleNumber = PipelineList[i].SingleNumber; - // pipeline.MediumId = PipelineList[i].MediumId; - // pipeline.PipingClassId = PipelineList[i].PipingClassId; - // pipeline.DetectionRateId = PipelineList[i].DetectionRateId; - // pipeline.DetectionType = PipelineList[i].DetectionType; - // pipeline.DesignPress = PipelineList[i].DesignPress; - // pipeline.DesignTemperature = PipelineList[i].DesignTemperature; - // pipeline.TestMedium = PipelineList[i].TestMedium; - // pipeline.TestPressure = PipelineList[i].TestPressure; - // pipeline.PressurePipingClassId = PipelineList[i].PressurePipingClassId; - // pipeline.PipeLenth = PipelineList[i].PipeLenth; - // pipeline.LeakMedium = PipelineList[i].LeakMedium; - // pipeline.LeakPressure = PipelineList[i].LeakPressure; - // pipeline.VacuumPressure = PipelineList[i].VacuumPressure; - // pipeline.PCMedium = PipelineList[i].PCMedium; - // pipeline.MaterialId = PipelineList[i].MaterialId; - // pipeline.Remark = PipelineList[i].Remark; - - // var isExistPipelineCode = getPipeline.FirstOrDefault(x => x.PipelineCode == pipeline.PipelineCode && x.UnitWorkId == Request.Params["UnitWorkId"]); - // if (isExistPipelineCode != null) // 更新管线 - // { - // pipeLineId = isExistPipelineCode.PipelineId; - // pipeline.PipelineId = isExistPipelineCode.PipelineId; - // BLL.PipelineService.UpdatePipeline(pipeline); - // } - // else // 增加管线 - // { - // pipeLineId = SQLHelper.GetNewID(); - // pipeline.PipelineId = pipeLineId; - // BLL.PipelineService.AddPipeline(pipeline); - - // } - - // Model.HJGL_WeldJoint weldJoint = new Model.HJGL_WeldJoint(); - // weldJoint.PipelineId = pipeLineId; - // weldJoint.WeldJointCode = PipelineList[i].WeldJointCode; - // weldJoint.PipelineCode = PipelineList[i].PipelineCode; - // weldJoint.Material1Id = PipelineList[i].Material1Id; - // weldJoint.Material2Id = PipelineList[i].Material2Id; - // weldJoint.Dia = PipelineList[i].Dia; - // weldJoint.Size = PipelineList[i].Size; - // weldJoint.Thickness = PipelineList[i].Thickness; - // weldJoint.Specification = PipelineList[i].Specification; - // weldJoint.WeldTypeId = PipelineList[i].WeldTypeId; - // weldJoint.DetectionTypeId = PipelineList[i].DetectionTypeId; - // weldJoint.JointAttribute = PipelineList[i].JointAttribute; - // weldJoint.ProjectId= PipelineList[i].ProjectId; - // var isExistJot = getPipeline.FirstOrDefault(x => x.PipelineId == pipeLineId && x.WeldJointCode == PipelineList[i].WeldJointCode); - // if (isExistJot != null) // 更新焊口 - // { - // weldJoint.WeldJointId = isExistJot.WeldJointId; - // BLL.WeldJointService.UpdateWeldJoint(weldJoint); - // } - // else // 增加焊口 - // { - // weldJoint.WeldJointId=SQLHelper.GetNewID(); - // weldJoints_add.Add(weldJoint); - // //BLL.WeldJointService.AddWeldJoint(weldJoint); - // } - // } - // if (weldJoints_add.Count>0) - // { - // BLL.WeldJointService.AddBulkWeldJoint(weldJoints_add); - - // } - - //} #endregion /// diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx index f1f153d1..723a506a 100644 --- a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx +++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx @@ -31,8 +31,7 @@ <%-- --%> - - + diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.cs index 5f6ab11d..eae45c38 100644 --- a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.cs @@ -52,7 +52,7 @@ namespace FineUIPro.Web.HSSE.CostGoods { this.btnClose.OnClientClick = ActiveWindow.GetHideRefreshReference(); this.ProjectId = this.CurrUser.LoginProjectId; - BLL.ContractService.InitCompletedContractsDropDownList(this.ProjectId,this.drpContractNum); + //BLL.ContractService.InitCompletedContractsDropDownList(this.ProjectId,this.drpContractNum); BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, false); this.CostManageId = Request.Params["CostManageId"] ?? SQLHelper.GetNewID(); var costManage = BLL.CostManageService.GetCostManageById(this.CostManageId); @@ -68,7 +68,8 @@ namespace FineUIPro.Web.HSSE.CostGoods { this.drpUnit.SelectedValue = costManage.UnitId; } - this.drpContractNum.SelectedValue = costManage.ContractNum; + //this.drpContractNum.SelectedValue = costManage.ContractNum; + this.txtContractNum.Text = costManage.ContractNum; this.txtCostManageDate.Text = string.Format("{0:yyyy-MM-dd}", costManage.CostManageDate); } @@ -303,7 +304,8 @@ namespace FineUIPro.Web.HSSE.CostGoods { ProjectId = this.ProjectId, UnitId = this.drpUnit.SelectedValue == Const._Null ? null : this.drpUnit.SelectedValue, - ContractNum = this.drpContractNum.SelectedValue, + //ContractNum = this.drpContractNum.SelectedValue, + ContractNum = this.txtContractNum.Text.Trim(), CostManageDate = Funs.GetNewDateTime(this.txtCostManageDate.Text.Trim()), States = BLL.Const.State_0, CompileMan = this.CurrUser.PersonId, diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.designer.cs index eb84ce00..923daaf9 100644 --- a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.designer.cs @@ -7,13 +7,11 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HSSE.CostGoods -{ - - - public partial class CostManageEdit - { - +namespace FineUIPro.Web.HSSE.CostGoods { + + + public partial class CostManageEdit { + /// /// form1 控件。 /// @@ -22,7 +20,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -31,7 +29,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -40,7 +38,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// txtProjectName 控件。 /// @@ -49,7 +47,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtProjectName; - + /// /// drpUnit 控件。 /// @@ -58,16 +56,16 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnit; - + /// - /// drpContractNum 控件。 + /// txtContractNum 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.DropDownList drpContractNum; - + protected global::FineUIPro.TextBox txtContractNum; + /// /// txtCostManageDate 控件。 /// @@ -76,7 +74,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtCostManageDate; - + /// /// txtHseCost 控件。 /// @@ -85,7 +83,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtHseCost; - + /// /// txtGetCost 控件。 /// @@ -94,7 +92,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtGetCost; - + /// /// txtSumMoney 控件。 /// @@ -103,7 +101,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtSumMoney; - + /// /// Grid1 控件。 /// @@ -112,7 +110,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// Toolbar2 控件。 /// @@ -121,7 +119,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// ToolbarFill2 控件。 /// @@ -130,7 +128,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill2; - + /// /// btnNew 控件。 /// @@ -139,7 +137,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// lb 控件。 /// @@ -148,7 +146,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lb; - + /// /// drpNextMan 控件。 /// @@ -157,7 +155,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpNextMan; - + /// /// Grid2 控件。 /// @@ -166,7 +164,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid2; - + /// /// Toolbar1 控件。 /// @@ -175,7 +173,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// lbTemp 控件。 /// @@ -184,7 +182,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbTemp; - + /// /// btnAttachUrl 控件。 /// @@ -193,7 +191,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAttachUrl; - + /// /// ToolbarFill1 控件。 /// @@ -202,7 +200,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnSave 控件。 /// @@ -211,7 +209,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + /// /// btnSubmit 控件。 /// @@ -220,7 +218,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSubmit; - + /// /// btnClose 控件。 /// @@ -229,7 +227,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnClose; - + /// /// Window1 控件。 /// @@ -238,7 +236,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// WindowAtt 控件。 /// @@ -247,7 +245,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window WindowAtt; - + /// /// Menu1 控件。 /// @@ -256,7 +254,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuEdit 控件。 /// @@ -265,7 +263,7 @@ namespace FineUIPro.Web.HSSE.CostGoods /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuEdit; - + /// /// btnMenuDelete 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRisk.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRisk.aspx.cs index e0cb47ed..0f451d46 100644 --- a/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRisk.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Hazard/ConstructionRisk.aspx.cs @@ -251,12 +251,12 @@ namespace FineUIPro.Web.HSSE.Hazard var DateWeek = (from x in Funs.DB.HSSE_ConstructionRisk where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == node.NodeID - select x.DateWeek).Distinct().ToList().OrderByDescending(x => x); + select new { x.DateWeek, x.DateA }).Distinct().ToList().OrderByDescending(x => x.DateA); foreach (var d in DateWeek) { TreeNode newNode = new TreeNode(); - newNode.Text = d; //string.Format("{0:yyyy-MM-dd}", d.AssessmentDate); - newNode.NodeID = node.NodeID + "|" + d; + newNode.Text = d.DateWeek; //string.Format("{0:yyyy-MM-dd}", d.AssessmentDate); + newNode.NodeID = node.NodeID + "|" + d.DateWeek; newNode.EnableClickEvent = true; newNode.ToolTip = "标签"; node.Nodes.Add(newNode); diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonIn.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonIn.aspx.cs index db26b6fe..5ea2b913 100644 --- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonIn.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonIn.aspx.cs @@ -1060,16 +1060,54 @@ namespace FineUIPro.Web.HSSE.SitePerson int a = persons.Count(); for (int i = 0; i < a; i++) { + var person = Person_PersonsService.GetPerson_PersonsByIdCard(persons[i].IdentityCard); + if (person == null) + { + string newKeyID = SQLHelper.GetNewID(typeof(Model.SitePerson_Person)); + person = new Model.Person_Persons + { + PersonId = newKeyID, + PersonName = persons[i].PersonName, + UnitId = persons[i].UnitId, + WorkPostId = persons[i].WorkPostId, + PersonType = "1", + IdcardType = persons[i].IdcardType, + IdentityCard = persons[i].IdentityCard, + IdcardForever = persons[i].IdcardForever, + IdcardStartDate = persons[i].IdcardStartDate, + IdcardEndDate = persons[i].IdcardEndDate, + IdcardAddress = persons[i].IdcardAddress, + Telephone = persons[i].Telephone, + Sex = persons[i].SexName == "男" ? "1" : "2", + Birthday = persons[i].Birthday, + //Major = this.txtMajor.Text.Trim(), + //ForeignLanguage = this.txtForeignLanguage.Text.Trim(), + CountryCode = persons[i].CountryCode, + ProvinceCode = persons[i].ProvinceCode, + Nation = persons[i].Nation, + PoliticsStatus = persons[i].PoliticsStatus, + EduLevel = persons[i].EduLevel, + MaritalStatus = persons[i].MaritalStatus, + //RelativeName = this.txtRelativeName.Text.Trim(), + //RelativeTel = this.txtRelativeTel.Text.Trim(), + Address = persons[i].Address, + //RoleIds = Funs.GetStringByArray(this.drpProjectRole.SelectedValueArray), + }; + BLL.Person_PersonsService.AddPerson(person); + } + + var getPerson = SitePerson_PersonService.GetSitePersonByProjectIdIdentityCard(Request.Params["ProjectId"], persons[i].IdentityCard); //!BLL.PersonService.IsExistPersonByUnit(persons[i].UnitId, persons[i].IdentityCard, Request.Params["ProjectId"]) && if (getPerson == null) { Model.SitePerson_Person newPerson = new Model.SitePerson_Person(); - string newKeyID = SQLHelper.GetNewID(typeof(Model.SitePerson_Person)); - newPerson.PersonId = newKeyID; + newPerson.SitePersonId = SQLHelper.GetNewID(); + newPerson.PersonId = person.PersonId; newPerson.ProjectId = Request.Params["ProjectId"]; newPerson.CardNo = persons[i].CardNo; newPerson.PersonName = persons[i].PersonName; + newPerson.IdentityCard = persons[i].IdentityCard; //newPerson.Sex = persons[i].SexName == "男" ? "1" : "2"; //newPerson.IdcardType = persons[i].IdcardType; //newPerson.IdentityCard = persons[i].IdentityCard; diff --git a/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx b/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx index fe622030..f85a9049 100644 --- a/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx +++ b/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx @@ -162,13 +162,14 @@ - + + diff --git a/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs b/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs index a7426c81..1fbba3a0 100644 --- a/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs @@ -382,6 +382,10 @@ namespace FineUIPro.Web.Person { this.ckIsSafetyMonitoring.Checked = getProjectPerson.IsSafetyMonitoring.Value; } + if (getProjectPerson.IsCQMSCheck.HasValue) + { + this.ckIsCQMSCheck.Checked = getProjectPerson.IsCQMSCheck.Value; + } } else { @@ -884,7 +888,8 @@ namespace FineUIPro.Web.Person OutTime = Funs.GetNewDateTime(this.txtOutTime.Text), OutResult = this.txtOutResult.Text.Trim(), States = string.IsNullOrEmpty(this.hdStates.Text) ? Const.ProjectPersonStates_0 : this.hdStates.Text, - IsSafetyMonitoring=this.ckIsSafetyMonitoring.Checked + IsSafetyMonitoring=this.ckIsSafetyMonitoring.Checked, + IsCQMSCheck = this.ckIsCQMSCheck.Checked }; if (newPerson.States == Const.ProjectPersonStates_2 || newPerson.States == Const.ProjectPersonStates_R) { diff --git a/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.designer.cs index c0ed4227..843c870a 100644 --- a/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.designer.cs @@ -7,13 +7,11 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.Person -{ - - - public partial class ProjectPersonEdit - { - +namespace FineUIPro.Web.Person { + + + public partial class ProjectPersonEdit { + /// /// _form1 控件。 /// @@ -22,7 +20,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm _form1; - + /// /// PageManager1 控件。 /// @@ -31,7 +29,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// panel1 控件。 /// @@ -40,7 +38,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panel1; - + /// /// Toolbar1 控件。 /// @@ -49,7 +47,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// btnAudit 控件。 /// @@ -58,7 +56,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAudit; - + /// /// btnRepulse 控件。 /// @@ -67,7 +65,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnRepulse; - + /// /// btnOut 控件。 /// @@ -76,7 +74,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnOut; - + /// /// btnSave 控件。 /// @@ -85,7 +83,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + /// /// btnClose 控件。 /// @@ -94,7 +92,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnClose; - + /// /// Toolbar2 控件。 /// @@ -103,7 +101,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// drpProject 控件。 /// @@ -112,7 +110,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpProject; - + /// /// lbStates 控件。 /// @@ -121,7 +119,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbStates; - + /// /// hdStates 控件。 /// @@ -130,7 +128,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdStates; - + /// /// SimpleForm1 控件。 /// @@ -139,7 +137,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// txtPersonName 控件。 /// @@ -148,7 +146,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtPersonName; - + /// /// drpUnit 控件。 /// @@ -157,7 +155,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnit; - + /// /// drpIdcardType 控件。 /// @@ -166,7 +164,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpIdcardType; - + /// /// txtIdentityCard 控件。 /// @@ -175,7 +173,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtIdentityCard; - + /// /// txtIdcardAddress 控件。 /// @@ -184,7 +182,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtIdcardAddress; - + /// /// rblIdcardForever 控件。 /// @@ -193,7 +191,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RadioButtonList rblIdcardForever; - + /// /// ckIsForeign 控件。 /// @@ -202,7 +200,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox ckIsForeign; - + /// /// txtIdcardStartDate 控件。 /// @@ -211,7 +209,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtIdcardStartDate; - + /// /// txtIdcardEndDate 控件。 /// @@ -220,7 +218,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtIdcardEndDate; - + /// /// txtTelephone 控件。 /// @@ -229,7 +227,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtTelephone; - + /// /// txtCardNo 控件。 /// @@ -238,7 +236,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtCardNo; - + /// /// txtAccount 控件。 /// @@ -247,7 +245,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtAccount; - + /// /// trRole 控件。 /// @@ -256,7 +254,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.FormRow trRole; - + /// /// drpProjectWorkPost 控件。 /// @@ -265,7 +263,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpProjectWorkPost; - + /// /// drpProjectRole 控件。 /// @@ -274,7 +272,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpProjectRole; - + /// /// drpTeamGroup 控件。 /// @@ -283,7 +281,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpTeamGroup; - + /// /// txtWorkArea 控件。 /// @@ -292,7 +290,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownBox txtWorkArea; - + /// /// gvWorkArea 控件。 /// @@ -301,7 +299,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid gvWorkArea; - + /// /// txtInTime 控件。 /// @@ -310,7 +308,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtInTime; - + /// /// rbPersonType 控件。 /// @@ -319,7 +317,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RadioButtonList rbPersonType; - + /// /// ckIsSafetyMonitoring 控件。 /// @@ -328,7 +326,16 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox ckIsSafetyMonitoring; - + + /// + /// ckIsCQMSCheck 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.CheckBox ckIsCQMSCheck; + /// /// drpAuditor 控件。 /// @@ -337,7 +344,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpAuditor; - + /// /// txtAuditorDate 控件。 /// @@ -346,7 +353,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtAuditorDate; - + /// /// txtOutTime 控件。 /// @@ -355,7 +362,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtOutTime; - + /// /// txtOutResult 控件。 /// @@ -364,7 +371,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtOutResult; - + /// /// imgPhoto 控件。 /// @@ -373,7 +380,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Image imgPhoto; - + /// /// filePhoto 控件。 /// @@ -382,7 +389,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.FileUpload filePhoto; - + /// /// imgQR 控件。 /// @@ -391,7 +398,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Image imgQR; - + /// /// btnQR 控件。 /// @@ -400,7 +407,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnQR; - + /// /// imgIDCard 控件。 /// @@ -409,7 +416,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Image imgIDCard; - + /// /// fuIDCard 控件。 /// @@ -418,7 +425,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.FileUpload fuIDCard; - + /// /// btnReadIdentityCard 控件。 /// @@ -427,7 +434,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnReadIdentityCard; - + /// /// imgIDCardBack 控件。 /// @@ -436,7 +443,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Image imgIDCardBack; - + /// /// fuIDCardBack 控件。 /// @@ -445,7 +452,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.FileUpload fuIDCardBack; - + /// /// TabStrip1 控件。 /// @@ -454,7 +461,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TabStrip TabStrip1; - + /// /// Tab1 控件。 /// @@ -463,7 +470,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tab Tab1; - + /// /// SimpleForm2 控件。 /// @@ -472,7 +479,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm2; - + /// /// txtBirthday 控件。 /// @@ -481,7 +488,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtBirthday; - + /// /// txtAge 控件。 /// @@ -490,7 +497,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtAge; - + /// /// rblSex 控件。 /// @@ -499,7 +506,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RadioButtonList rblSex; - + /// /// txtRealNameTime 控件。 /// @@ -508,7 +515,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtRealNameTime; - + /// /// drpNation 控件。 /// @@ -517,7 +524,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpNation; - + /// /// drpPoliticsStatus 控件。 /// @@ -526,7 +533,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpPoliticsStatus; - + /// /// drpEduLevel 控件。 /// @@ -535,7 +542,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpEduLevel; - + /// /// drpMaritalStatus 控件。 /// @@ -544,7 +551,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpMaritalStatus; - + /// /// drpPosition 控件。 /// @@ -553,7 +560,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpPosition; - + /// /// drpPostTitle 控件。 /// @@ -562,7 +569,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpPostTitle; - + /// /// txtPostTitleDate 控件。 /// @@ -571,7 +578,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtPostTitleDate; - + /// /// txtGraduate 控件。 /// @@ -580,7 +587,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtGraduate; - + /// /// txtMajor 控件。 /// @@ -589,7 +596,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtMajor; - + /// /// txtForeignLanguage 控件。 /// @@ -598,7 +605,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtForeignLanguage; - + /// /// drpCountryCode 控件。 /// @@ -607,7 +614,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpCountryCode; - + /// /// drpProvinceCode 控件。 /// @@ -616,7 +623,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpProvinceCode; - + /// /// txtRelativeName 控件。 /// @@ -625,7 +632,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtRelativeName; - + /// /// txtRelativeTel 控件。 /// @@ -634,7 +641,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtRelativeTel; - + /// /// txtAddress 控件。 /// @@ -643,7 +650,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtAddress; - + /// /// TabCertificate 控件。 /// @@ -652,7 +659,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tab TabCertificate; - + /// /// GridCertificate 控件。 /// @@ -661,7 +668,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid GridCertificate; - + /// /// Toolbar3 控件。 /// @@ -670,7 +677,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar3; - + /// /// btnCertificateNew 控件。 /// @@ -679,7 +686,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnCertificateNew; - + /// /// lbImageUrl 控件。 /// @@ -688,7 +695,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label lbImageUrl; - + /// /// ToolbarSeparator1 控件。 /// @@ -697,7 +704,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -706,7 +713,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSizeGridCertificate 控件。 /// @@ -715,7 +722,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSizeGridCertificate; - + /// /// TabContract 控件。 /// @@ -724,7 +731,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tab TabContract; - + /// /// GridContract 控件。 /// @@ -733,7 +740,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid GridContract; - + /// /// Toolbar5 控件。 /// @@ -742,7 +749,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar5; - + /// /// btnContractNew 控件。 /// @@ -751,7 +758,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnContractNew; - + /// /// Label1 控件。 /// @@ -760,7 +767,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label Label1; - + /// /// Label2 控件。 /// @@ -769,7 +776,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label Label2; - + /// /// Label3 控件。 /// @@ -778,7 +785,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label Label3; - + /// /// ToolbarSeparator4 控件。 /// @@ -787,7 +794,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator4; - + /// /// ToolbarText4 控件。 /// @@ -796,7 +803,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText4; - + /// /// ddlPageSizeGridContract 控件。 /// @@ -805,7 +812,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSizeGridContract; - + /// /// Tab4 控件。 /// @@ -814,7 +821,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tab Tab4; - + /// /// Tab5 控件。 /// @@ -823,7 +830,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tab Tab5; - + /// /// Tab6 控件。 /// @@ -832,7 +839,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tab Tab6; - + /// /// GridTestRecord 控件。 /// @@ -841,7 +848,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid GridTestRecord; - + /// /// ToolbarSeparator2 控件。 /// @@ -850,7 +857,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator2; - + /// /// ToolbarText2 控件。 /// @@ -859,7 +866,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText2; - + /// /// ddlPageSizeGridTestRecord 控件。 /// @@ -868,7 +875,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSizeGridTestRecord; - + /// /// Tab7 控件。 /// @@ -877,7 +884,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tab Tab7; - + /// /// InOut 控件。 /// @@ -886,7 +893,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tab InOut; - + /// /// GridInOut 控件。 /// @@ -895,7 +902,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid GridInOut; - + /// /// Toolbar4 控件。 /// @@ -904,7 +911,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar4; - + /// /// btnInOutNew 控件。 /// @@ -913,7 +920,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnInOutNew; - + /// /// ToolbarSeparator3 控件。 /// @@ -922,7 +929,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator3; - + /// /// ToolbarText3 控件。 /// @@ -931,7 +938,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText3; - + /// /// ddlPageSizeGridInOut 控件。 /// @@ -940,7 +947,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSizeGridInOut; - + /// /// Window1 控件。 /// @@ -949,7 +956,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// WindowAtt 控件。 /// @@ -958,7 +965,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window WindowAtt; - + /// /// MenuCertificate 控件。 /// @@ -967,7 +974,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu MenuCertificate; - + /// /// btnCertificateEdit 控件。 /// @@ -976,7 +983,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnCertificateEdit; - + /// /// btnCertificateDelete 控件。 /// @@ -985,7 +992,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnCertificateDelete; - + /// /// MenuInOut 控件。 /// @@ -994,7 +1001,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu MenuInOut; - + /// /// btnInOutEdit 控件。 /// @@ -1003,7 +1010,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnInOutEdit; - + /// /// btnInOutDelete 控件。 /// @@ -1012,7 +1019,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnInOutDelete; - + /// /// MenuContract 控件。 /// @@ -1021,7 +1028,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu MenuContract; - + /// /// btnContractEdit 控件。 /// @@ -1030,7 +1037,7 @@ namespace FineUIPro.Web.Person /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnContractEdit; - + /// /// btnContractDelete 控件。 /// diff --git a/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx b/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx index 64e39b08..5546c224 100644 --- a/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx +++ b/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx @@ -57,7 +57,8 @@ - + <%----%> + diff --git a/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx.cs index c6a64abd..ffa837c8 100644 --- a/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx.cs @@ -30,12 +30,12 @@ namespace FineUIPro.Web.ProjectData BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpUnit, this.CurrUser.LoginProjectId, Const.ProjectUnitType_2, true);//施工 BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpSupervisorUnit, this.CurrUser.LoginProjectId, Const.ProjectUnitType_3, true);//监理 BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpNDEUnit, this.CurrUser.LoginProjectId, Const.ProjectUnitType_5, true);//检测 - //合同编号 - this.drpContract.DataTextField = "ContractNum"; - this.drpContract.DataValueField = "ContractId"; - this.drpContract.DataSource = BLL.PHTGL_ContractReviewService.GetContractReview_CompleteData(this.CurrUser.LoginProjectId); - this.drpContract.DataBind(); - Funs.FineUIPleaseSelect(this.drpContract); + ////合同编号 + //this.drpContract.DataTextField = "ContractNum"; + //this.drpContract.DataValueField = "ContractId"; + //this.drpContract.DataSource = BLL.PHTGL_ContractReviewService.GetContractReview_CompleteData(this.CurrUser.LoginProjectId); + //this.drpContract.DataBind(); + //Funs.FineUIPleaseSelect(this.drpContract); string UnitWorkId = Request.Params["UnitWorkId"]; if (!string.IsNullOrEmpty(UnitWorkId)) { @@ -68,7 +68,7 @@ namespace FineUIPro.Web.ProjectData } if (!string.IsNullOrEmpty(UnitWork.ContractId)) { - this.drpContract.SelectedValue = UnitWork.ContractId; + this.txtContractId.Text = UnitWork.ContractId; } this.txtMainItemCode.Text = UnitWork.MainItemCode; if (!string.IsNullOrEmpty(UnitWork.MainItemAndDesignProfessionalIds)) @@ -124,14 +124,15 @@ namespace FineUIPro.Web.ProjectData { UnitWork.Costs = Convert.ToDecimal(this.txtCosts.Text.Trim()); } - if (this.drpContract.SelectedValue != BLL.Const._Null) - { - UnitWork.ContractId = this.drpContract.SelectedValue; - } - else - { - UnitWork.ContractId = null; - } + //if (this.drpContract.SelectedValue != BLL.Const._Null) + //{ + // UnitWork.ContractId = this.drpContract.SelectedValue; + //} + //else + //{ + // UnitWork.ContractId = null; + //} + UnitWork.ContractId = this.txtContractId.Text.Trim(); UnitWork.MainItemCode = this.txtMainItemCode.Text.Trim(); if (!string.IsNullOrEmpty(hdMainItemAndDesignProfessionalIds.Text)) { diff --git a/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx.designer.cs index 258ef3d5..234620cc 100644 --- a/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx.designer.cs @@ -103,13 +103,13 @@ namespace FineUIPro.Web.ProjectData { protected global::FineUIPro.DropDownList drpNDEUnit; /// - /// drpContract 控件。 + /// txtContractId 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.DropDownList drpContract; + protected global::FineUIPro.TextBox txtContractId; /// /// txtMainItemCode 控件。 diff --git a/SGGL/FineUIPro.Web/ProjectData/UnitWorkView.aspx b/SGGL/FineUIPro.Web/ProjectData/UnitWorkView.aspx index b47eab1d..5681688e 100644 --- a/SGGL/FineUIPro.Web/ProjectData/UnitWorkView.aspx +++ b/SGGL/FineUIPro.Web/ProjectData/UnitWorkView.aspx @@ -65,7 +65,8 @@ - + <%----%> + diff --git a/SGGL/FineUIPro.Web/ProjectData/UnitWorkView.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/UnitWorkView.aspx.cs index 5944b1fb..7a15abc4 100644 --- a/SGGL/FineUIPro.Web/ProjectData/UnitWorkView.aspx.cs +++ b/SGGL/FineUIPro.Web/ProjectData/UnitWorkView.aspx.cs @@ -10,12 +10,12 @@ namespace FineUIPro.Web.ProjectData if (!IsPostBack) { this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); - //合同编号 - this.drpContract.DataTextField = "ContractNum"; - this.drpContract.DataValueField = "ContractId"; - this.drpContract.DataSource = BLL.PHTGL_ContractReviewService.GetContractReview_CompleteData(this.CurrUser.LoginProjectId); - this.drpContract.DataBind(); - Funs.FineUIPleaseSelect(this.drpContract); + ////合同编号 + //this.drpContract.DataTextField = "ContractNum"; + //this.drpContract.DataValueField = "ContractId"; + //this.drpContract.DataSource = BLL.PHTGL_ContractReviewService.GetContractReview_CompleteData(this.CurrUser.LoginProjectId); + //this.drpContract.DataBind(); + //Funs.FineUIPleaseSelect(this.drpContract); string UnitWorkId = Request.Params["UnitWorkId"]; if (!string.IsNullOrEmpty(UnitWorkId)) { @@ -48,9 +48,13 @@ namespace FineUIPro.Web.ProjectData { this.txtNDEUnit.Text = UnitService.GetUnitNameByUnitId(UnitWork.NDEUnit); } + //if (!string.IsNullOrEmpty(UnitWork.ContractId)) + //{ + // this.drpContract.SelectedValue = UnitWork.ContractId; + //} if (!string.IsNullOrEmpty(UnitWork.ContractId)) { - this.drpContract.SelectedValue = UnitWork.ContractId; + this.txtContractId.Text = UnitWork.ContractId; } this.txtMainItemCode.Text = UnitWork.MainItemCode; if (!string.IsNullOrEmpty(UnitWork.MainItemAndDesignProfessionalIds)) diff --git a/SGGL/FineUIPro.Web/ProjectData/UnitWorkView.aspx.designer.cs b/SGGL/FineUIPro.Web/ProjectData/UnitWorkView.aspx.designer.cs index b362e6c8..594571d0 100644 --- a/SGGL/FineUIPro.Web/ProjectData/UnitWorkView.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/ProjectData/UnitWorkView.aspx.designer.cs @@ -103,13 +103,13 @@ namespace FineUIPro.Web.ProjectData { protected global::FineUIPro.TextBox txtNDEUnit; /// - /// drpContract 控件。 + /// txtContractId 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.DropDownList drpContract; + protected global::FineUIPro.TextBox txtContractId; /// /// txtMainItemCode 控件。 diff --git a/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx.cs index 292dbbeb..7961c16d 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Environmental/ArchitectureReportSave.aspx.cs @@ -542,9 +542,9 @@ namespace FineUIPro.Web.ZHGL.Environmental private void GetData() { decimal E6 = 0, F6 = 0, E7 = 0, F7 = 0, E8, F8, E9 = 0, F9 = 0, E10 = 0, F10 = 0, E11 = 0, F11 = 0, E12 = 0, F12 = 0, E13 = 0, F13 = 0, E14 = 0, F14 = 0, E15 = 0, F15 = 0, E16 = 0, F16 = 0, E17 = 0, F17 = 0, E18 = 0, F18 = 0, E20 = 0, F20 = 0, E21 = 0, F21 = 0, E22 = 0, F22 = 0, - E24 = 0, F24 = 0, E25 = 0, F25 = 0, E26 = 0, F26 = 0, E27 = 0, F27 = 0, E28 = 0, F28 = 0, E29 = 0, F29 = 0, E30, F30, E31, F31, E32, F32, E33, F33, E34, F34, E35, F35, E36, F36, E37, F37, E38, F38, E39, F39, E40, F40, E41 = 0, F41 = 0, - E42 = 0, F42 = 0, E43, F43, E44, F44, E45, F45, E46, F46, E47, F47, E48, F48, E49, F49, E50, F50, E51, F51, E52, F52, E53, F53, E54, F54, E55, F55, - E56, F56, E57, F57, E58, F58, E59, F59, E60, F60, E61, F61, E62, F62, E64 = 0, F64 = 0, E65 = 0, F65 = 0; + E24 = 0, F24 = 0, E25 = 0, F25 = 0, E26 = 0, F26 = 0, E27 = 0, F27 = 0, E28, F28, E29 = 0, F29 = 0, E30, F30, E31, F31, E32, F32, E33, F33, E34, F34, E35, F35, E36, F36, E37, F37, E38, F38, E39, F39, E40, F40, E41 = 0, F41 = 0, + E42 = 0, F42 = 0, E43, F43, E44 = 0, F44 = 0, E45 = 0, F45 = 0, E46 = 0, F46 = 0, E47, F47, E48 = 0, F48 = 0, E49 = 0, F49 = 0, E50 = 0, F50 = 0, E51, F51, E52, F52, E53, F53, E54, F54, E55, F55, + E56, F56, E57, F57, E58, F58, E59, F59, E60, F60, E61, F61, E62, F62, E64 = 0, F64 = 0, E65 = 0, F65 = 0; JArray mergedData = Grid1.GetMergedData(); foreach (JObject mergedRow in mergedData) { @@ -1089,91 +1089,115 @@ namespace FineUIPro.Web.ZHGL.Environmental { this.Grid1.Rows[0].Values[5] = (F6 + (F9 * Convert.ToDecimal(0.9714) + F10 * Convert.ToDecimal(1.229) + F11 * Convert.ToDecimal(1.4286) + F12 * Convert.ToDecimal(1.4714) + F13 * Convert.ToDecimal(1.4714) + F14 * Convert.ToDecimal(1.4571) + F15 * Convert.ToDecimal(1.4286) + F16 * Convert.ToDecimal(13.3) + F17 * Convert.ToDecimal(0.0341) + F18) / 10000); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && !string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString())) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && this.Grid1.Rows[0].Values[4].ToString() != "0" && this.Grid1.Rows[0].Values[4].ToString() != "未涉及" && !string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString())) { this.Grid1.Rows[0].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()), 2).ToString() + "%"; } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E20 != 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E20 > 0) { this.Grid1.Rows[14].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E20, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F20 != 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F20 > 0) { this.Grid1.Rows[14].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F20, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[14].Values[4].ToString()) && this.Grid1.Rows[14].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[14].Values[5].ToString())) + if (!string.IsNullOrEmpty(this.Grid1.Rows[14].Values[4].ToString()) && this.Grid1.Rows[14].Values[4].ToString() != "0" && this.Grid1.Rows[14].Values[4].ToString() != "未涉及" && !string.IsNullOrEmpty(this.Grid1.Rows[14].Values[5].ToString())) { this.Grid1.Rows[14].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[14].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[14].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[14].Values[4].ToString()), 2).ToString() + "%"; } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E22 != 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E22 > 0) { this.Grid1.Rows[16].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E22, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F22 != 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F22 > 0) { this.Grid1.Rows[16].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F22, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[16].Values[4].ToString()) && this.Grid1.Rows[16].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[16].Values[5].ToString())) + if (!string.IsNullOrEmpty(this.Grid1.Rows[16].Values[4].ToString()) && this.Grid1.Rows[16].Values[4].ToString() != "0" && this.Grid1.Rows[16].Values[4].ToString() != "未涉及" && !string.IsNullOrEmpty(this.Grid1.Rows[16].Values[5].ToString())) { this.Grid1.Rows[16].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[16].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[16].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[16].Values[4].ToString()), 2).ToString() + "%"; } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E24 != 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E24 > 0) { this.Grid1.Rows[18].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E24, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F24 != 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F24 > 0) { this.Grid1.Rows[18].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F24, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[18].Values[4].ToString()) && this.Grid1.Rows[18].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[18].Values[5].ToString())) + if (!string.IsNullOrEmpty(this.Grid1.Rows[18].Values[4].ToString()) && this.Grid1.Rows[18].Values[4].ToString() != "0" && this.Grid1.Rows[18].Values[4].ToString() != "未涉及" && !string.IsNullOrEmpty(this.Grid1.Rows[18].Values[5].ToString())) { this.Grid1.Rows[18].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[18].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[18].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[18].Values[4].ToString()), 2).ToString() + "%"; } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E26 != 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E26 > 0) { this.Grid1.Rows[20].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E26, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F26 != 0) + if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F26 > 0) { this.Grid1.Rows[20].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F26, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[20].Values[4].ToString()) && this.Grid1.Rows[20].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[20].Values[5].ToString())) + if (!string.IsNullOrEmpty(this.Grid1.Rows[20].Values[4].ToString()) && this.Grid1.Rows[20].Values[4].ToString() != "0" && this.Grid1.Rows[20].Values[4].ToString() != "未涉及" && !string.IsNullOrEmpty(this.Grid1.Rows[20].Values[5].ToString())) { this.Grid1.Rows[20].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[20].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[20].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[20].Values[4].ToString()), 2).ToString() + "%"; } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E28 != 0) + if (E22 > 0) { - this.Grid1.Rows[22].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E28, 4); + this.Grid1.Rows[22].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[23].Values[4].ToString()) * 10000 / E22, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F28 != 0) + if (F22 > 0) { - this.Grid1.Rows[22].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F28, 4); + this.Grid1.Rows[22].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[23].Values[5].ToString()) * 10000 / F22, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[22].Values[4].ToString()) && this.Grid1.Rows[22].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[22].Values[5].ToString())) + if (!string.IsNullOrEmpty(this.Grid1.Rows[22].Values[4].ToString()) && this.Grid1.Rows[22].Values[4].ToString() != "0" && this.Grid1.Rows[22].Values[4].ToString() != "未涉及" && !string.IsNullOrEmpty(this.Grid1.Rows[22].Values[5].ToString())) { this.Grid1.Rows[22].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[22].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[22].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[22].Values[4].ToString()), 2).ToString() + "%"; } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[4].ToString()) && E42 != 0) + if (E22 > 0 && E42 > 0) { - this.Grid1.Rows[36].Values[4] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[4].ToString()) * 10000 / E42, 4); + this.Grid1.Rows[36].Values[4] = decimal.Round(E42 * 10000 / E22, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[0].Values[5].ToString()) && F42 != 0) + if (F22 > 0 && F42 > 0) { - this.Grid1.Rows[36].Values[5] = decimal.Round(Funs.GetNewDecimalOrZero(this.Grid1.Rows[0].Values[5].ToString()) * 10000 / F42, 4); + this.Grid1.Rows[36].Values[5] = decimal.Round(F42 * 10000 / F22, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[36].Values[4].ToString()) && this.Grid1.Rows[36].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[36].Values[5].ToString())) + if (!string.IsNullOrEmpty(this.Grid1.Rows[36].Values[4].ToString()) && this.Grid1.Rows[36].Values[4].ToString() != "0" && this.Grid1.Rows[36].Values[4].ToString() != "未涉及" && !string.IsNullOrEmpty(this.Grid1.Rows[36].Values[5].ToString())) { this.Grid1.Rows[36].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[36].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[36].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[36].Values[4].ToString()), 2).ToString() + "%"; } - if (E64 != 0 && E65 != 0 && E20 != 0) + if (E44 > 0 && E46 > 0) + { + this.Grid1.Rows[38].Values[4] = decimal.Round((E44 - E45) / E46 * 100, 4); + } + if (F44 > 0 && F46 > 0) + { + this.Grid1.Rows[38].Values[5] = decimal.Round((F44 - F45) / F46 * 100, 4); + } + if (!string.IsNullOrEmpty(this.Grid1.Rows[38].Values[4].ToString()) && this.Grid1.Rows[38].Values[4].ToString() != "0" && this.Grid1.Rows[38].Values[4].ToString() != "未涉及" && !string.IsNullOrEmpty(this.Grid1.Rows[38].Values[5].ToString())) + { + this.Grid1.Rows[38].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[38].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[38].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[38].Values[4].ToString()), 2).ToString() + "%"; + } + if (E48 > 0 && E50 > 0) + { + this.Grid1.Rows[42].Values[4] = decimal.Round((E48 - E49) / E50 * 100, 4); + } + if (F48 > 0 && F50 > 0) + { + this.Grid1.Rows[42].Values[5] = decimal.Round((F48 - F49) / F50 * 100, 4); + } + if (!string.IsNullOrEmpty(this.Grid1.Rows[42].Values[4].ToString()) && this.Grid1.Rows[42].Values[4].ToString() != "0" && this.Grid1.Rows[42].Values[4].ToString() != "未涉及" && !string.IsNullOrEmpty(this.Grid1.Rows[42].Values[5].ToString())) + { + this.Grid1.Rows[42].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[42].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[42].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[42].Values[4].ToString()), 2).ToString() + "%"; + } + if (E64 > 0 && E65 > 0 && E20 > 0) { this.Grid1.Rows[58].Values[4] = decimal.Round((E64 + E65) / E20, 4); } - if (F64 != 0 && F65 != 0 && F20 != 0) + if (F64 > 0 && F65 > 0 && F20 > 0) { this.Grid1.Rows[58].Values[5] = decimal.Round((F64 + F65) / F20, 4); } - if (!string.IsNullOrEmpty(this.Grid1.Rows[58].Values[4].ToString()) && this.Grid1.Rows[58].Values[4].ToString() != "0" && !string.IsNullOrEmpty(this.Grid1.Rows[58].Values[5].ToString())) + if (!string.IsNullOrEmpty(this.Grid1.Rows[58].Values[4].ToString()) && this.Grid1.Rows[58].Values[4].ToString() != "0" && this.Grid1.Rows[58].Values[4].ToString() != "未涉及" && !string.IsNullOrEmpty(this.Grid1.Rows[58].Values[5].ToString())) { this.Grid1.Rows[58].Values[6] = decimal.Round((Funs.GetNewDecimalOrZero(this.Grid1.Rows[58].Values[5].ToString()) - Funs.GetNewDecimalOrZero(this.Grid1.Rows[58].Values[4].ToString())) * 100 / Funs.GetNewDecimalOrZero(this.Grid1.Rows[58].Values[4].ToString()), 2).ToString() + "%"; } diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedger.aspx b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedger.aspx index 6e2464f6..a2d16bc6 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedger.aspx +++ b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedger.aspx @@ -80,14 +80,26 @@ - + - + + + + + + + + + + + + protected global::FineUIPro.Label lbHandleMan; + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// txtKeyWorkNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtKeyWorkNum; + + /// + /// txtKeyWorkOKNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtKeyWorkOKNum; + + /// + /// txtKeyWorkOKRate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtKeyWorkOKRate; + /// /// Grid1 控件。 /// diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx index 2e0c1ddb..40f63ba3 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx +++ b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx @@ -27,6 +27,15 @@ + + + + + + + + + 0) + { + rate = (decimal.Round(keyWorkOKNum / keyWorkNum, 4) * 100).ToString("0.##") + "%"; + } + this.txtKeyWorkOKRate.Text = rate; + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx.designer.cs index ffe225da..97c972e7 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/ZHGL/Information/ActionWorkLedgerAdd.aspx.designer.cs @@ -75,6 +75,33 @@ namespace FineUIPro.Web.ZHGL.Information { /// protected global::FineUIPro.DatePicker dpkCompileDate; + /// + /// txtKeyWorkNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtKeyWorkNum; + + /// + /// txtKeyWorkOKNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtKeyWorkOKNum; + + /// + /// txtKeyWorkOKRate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtKeyWorkOKRate; + /// /// Grid1 控件。 /// diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReport.aspx b/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReport.aspx index 76edd217..8b4822c9 100644 --- a/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReport.aspx +++ b/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReport.aspx @@ -110,6 +110,20 @@ + + + + + + + + + + + + + +