2023-11-30
This commit is contained in:
@@ -0,0 +1,172 @@
|
||||
|
||||
ALTER VIEW [dbo].[View_HJGL_WeldJoint]
|
||||
AS
|
||||
SELECT jot.[ProjectId] --项目Id
|
||||
,pipe.[UnitWorkId] --单位工程Id
|
||||
,uw.UnitWorkName --单位工程
|
||||
,pipe.[UnitId] --单位Id
|
||||
,unit.UnitName --单位
|
||||
,jot.[PipelineCode] --管线号
|
||||
,pipe.[SingleNumber] --单线图号
|
||||
,pipe.[SingleName] --图纸名称
|
||||
,pipe.[MediumId] --介质Id
|
||||
,medium.MediumCode
|
||||
,medium.MediumName --介质名称
|
||||
,pipe.[PipingClassId] --管道等级Id
|
||||
,pipingClass.PipingClassCode --管道等级
|
||||
,pipe.[DetectionRateId] --探伤比例Id
|
||||
,dr.DetectionRateCode --探伤比例(例如5,10,20)
|
||||
,pipe.DetectionType --探伤类型Id(可能多个,中间用|分隔)
|
||||
,STUFF((SELECT ',' + DetectionTypeCode FROM Base_DetectionType
|
||||
WHERE CHARINDEX('|'+LTRIM(DetectionTypeId)+'|','|'+ pipe.DetectionType + '|') > 0 FOR XML PATH('') ), 1, 1, '') AS DetectionTypeStr --探伤类型(可能多个,中间用,分隔)
|
||||
,pipe.DesignTemperature --设计温度℃
|
||||
,pipe.DesignPress --设计压力Mpa(g)
|
||||
,pipe.TestMedium --压力试验介质Id
|
||||
,tm.MediumName AS TestMediumName --压力试验介质
|
||||
,pipe.TestPressure --压力试验压力Mpa(g)
|
||||
,pipe.PressurePipingClassId --压力管道级别Id
|
||||
,ppc.PressurePipingClassCode --压力管道级别
|
||||
,pipe.PipeLenth --管线长度(m)
|
||||
,pipe.LeakMedium --泄露性试验介质Id
|
||||
,tm2.MediumName AS LeakMediumName --泄露性试验介质
|
||||
,pipe.LeakPressure --泄露性试验压力Mpa(g)
|
||||
,pipe.PCMedium --吹洗要求Id
|
||||
,pm.PurgeMethodCode --吹洗要求
|
||||
,pipe.VacuumPressure --真空试验压力Kpa(a)
|
||||
,pipe.MaterialId --材质Id
|
||||
,mat.MaterialCode AS PipeMaterialCode --材质
|
||||
,pipe.Remark AS PipeRemark --备注
|
||||
,pipe.FlowingSection as FlowingSection --流水段
|
||||
,jot.[WeldJointId] --焊口Id
|
||||
,jot.[WeldJointCode] --焊口号
|
||||
,jot.[Material1Id] --材质1Id
|
||||
,mat1.MaterialCode AS Material1Code --材质1
|
||||
,jot.[Material2Id] --材质2Id
|
||||
,mat2.MaterialCode AS Material2Code --材质2
|
||||
,jot.[Dia] --外径
|
||||
,jot.DNDia --DN公称直径
|
||||
,jot.[Size] --达因
|
||||
,jot.[Thickness] --壁厚
|
||||
,jot.[Specification] --规格
|
||||
,jot.[WeldTypeId] --焊缝类型Id
|
||||
,WeldType.WeldTypeCode --焊缝类型
|
||||
,jot.[DetectionTypeId] --检测类型Id
|
||||
,ndt.DetectionTypeCode --检测类型
|
||||
,jot.[Components1Id] --组件1号Id
|
||||
,com1.ComponentsCode AS ComponentsCode1 --组件1号
|
||||
,jot.[Components2Id] --组件2号Id
|
||||
,com2.ComponentsCode AS ComponentsCode2 --组件2号
|
||||
,jot.DesignIsHotProess --是否热处理
|
||||
,CASE jot.DesignIsHotProess WHEN 1 THEN '是' ELSE '否' END AS DesignIsHotProessStr --是否热处理
|
||||
,jot.[WeldingMethodId] --焊接方法Id
|
||||
,WeldingMethod.WeldingMethodCode --焊接方法
|
||||
,jot.WPQId --WPS的Id
|
||||
,wps.WPQCode --WPS编号
|
||||
,jot.[GrooveTypeId] --坡口类型Id
|
||||
,GrooveType.GrooveTypeCode --坡口类型
|
||||
,jot.[WeldingRod] --焊条Id
|
||||
,rod.ConsumablesCode AS WeldingRodCode --焊条
|
||||
,jot.[WeldingWire] --焊丝Id
|
||||
,wire.ConsumablesCode AS WeldingWireCode --焊丝
|
||||
,jot.PreTemperature --预热温度
|
||||
,jot.[JointAttribute] --焊口属性
|
||||
,jot.TwoJointType --二次焊口新增类型
|
||||
,pipe.PipeArea --工厂预制/现场安装
|
||||
,daily.WeldingDate as WeldingDateD
|
||||
,CONVERT(VARCHAR(100), daily.WeldingDate, 23) AS WeldingDate --焊接日期
|
||||
,BackingWelder.WelderCode AS BackingWelderCode --打底焊工
|
||||
,CoverWelder.WelderCode AS CoverWelderCode --盖面焊工
|
||||
,(CASE (SELECT COUNT(*) FROM [dbo].[HJGL_HotProess_TrustItem] hpti
|
||||
WHERE hpti.WeldJointId=jot.WeldJointId) WHEN 0 THEN '' ELSE (SELECT TOP 1 ISNULL(ReportNo,'') FROM [dbo].[HJGL_HotProess_Trust] hpt
|
||||
LEFT JOIN [dbo].[HJGL_HotProess_TrustItem] hpti ON hpti.HotProessTrustId=hpt.HotProessTrustId
|
||||
WHERE hpti.WeldJointId=jot.WeldJointId) END) AS HotProessReportNo --热处理报告编号
|
||||
,(CASE (SELECT TOP 1 IsCompleted FROM [dbo].[HJGL_HotProess_TrustItem] hpti
|
||||
WHERE hpti.WeldJointId=jot.WeldJointId) WHEN 1 THEN '完成' WHEN 0 THEN '未完成' ELSE '未热处理' END) AS HotProessResult --热处理检测结果
|
||||
,(CASE (SELECT COUNT(*) FROM [dbo].HJGL_Hard_TrustItem hti
|
||||
WHERE hti.WeldJointId=jot.WeldJointId) WHEN 0 THEN '' ELSE (SELECT TOP 1 ISNULL(InspectionNum,'') FROM [dbo].HJGL_Hard_Trust ht
|
||||
LEFT JOIN [dbo].HJGL_Hard_TrustItem hti ON hti.HardTrustID=ht.HardTrustID
|
||||
WHERE hti.WeldJointId=jot.WeldJointId) END) AS HardReportNo --硬度报告编号
|
||||
,(CASE (SELECT TOP 1 IsPass FROM [dbo].HJGL_Hard_TrustItem hti
|
||||
WHERE hti.WeldJointId=jot.WeldJointId) WHEN 1 THEN '合格' WHEN 0 THEN '不合格' ELSE '待检测' END) AS HardResult --硬度检测结果
|
||||
,(CASE (SELECT COUNT(*) FROM [dbo].HJGL_Batch_BatchTrustItem bti
|
||||
WHERE bti.WeldJointId=jot.WeldJointId) WHEN 0 THEN '' ELSE (SELECT TOP 1 TrustBatchCode FROM [dbo].HJGL_Batch_BatchTrust bt
|
||||
LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchId=bt.TrustBatchId
|
||||
WHERE bti.WeldJointId=jot.WeldJointId) END) AS TrustBatchCode --委托单编号
|
||||
,(CASE (SELECT COUNT(*) FROM [dbo].HJGL_Batch_NDEItem ndei
|
||||
LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchItemId=ndei.TrustBatchItemId
|
||||
WHERE bti.WeldJointId=jot.WeldJointId) WHEN 0 THEN '' ELSE (SELECT TOP 1 ISNULL(NDECode,'') FROM [dbo].HJGL_Batch_NDE nde
|
||||
LEFT JOIN [dbo].HJGL_Batch_NDEItem ndei ON ndei.NDEID=nde.NDEID
|
||||
LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchItemId=ndei.TrustBatchItemId
|
||||
WHERE bti.WeldJointId=jot.WeldJointId) END) AS NDECode --检测单编号
|
||||
,(CASE (SELECT TOP 1 CheckResult FROM [dbo].HJGL_Batch_NDEItem ndei
|
||||
LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchItemId=ndei.TrustBatchItemId
|
||||
WHERE bti.WeldJointId=jot.WeldJointId) WHEN '1' THEN '合格' WHEN '2' THEN '不合格' ELSE '' END) AS CheckResult --检测结果
|
||||
,jot.PipelineId
|
||||
,jot.[JointArea]
|
||||
,jot.[WeldingLocationId]
|
||||
,jot.[HeartNo1]
|
||||
,jot.[HeartNo2]
|
||||
,jot.[IsHotProess]
|
||||
,jot.[WeldingDailyId]
|
||||
,jot.[BackingWelderId]
|
||||
,jot.[CoverWelderId]
|
||||
,jot.WeldingMode
|
||||
,jot.Remark
|
||||
,jot.IsTwoJoint
|
||||
,jot.SubmitMan
|
||||
,jot.AuditMan
|
||||
,jot.AuditMan2
|
||||
,jot.AuditDate
|
||||
,jot.AuditDate2
|
||||
,WeldingLocation.WeldingLocationCode
|
||||
,CASE WHEN jot.WeldingDailyId IS NULL THEN '否' ELSE '是' END AS IsWelding
|
||||
,CASE WHEN jot.IsHotProess=1 THEN '是' ELSE '否' END AS IsHotProessStr,
|
||||
BackingWelder.PersonName AS BackingWelderName,
|
||||
CoverWelder.PersonName AS CoverWelderName,
|
||||
(CASE WHEN CoverWelder.WelderCode IS NOT NULL AND BackingWelder.WelderCode IS NOT NULL
|
||||
THEN CoverWelder.WelderCode + '/' + BackingWelder.WelderCode
|
||||
ELSE (ISNULL(CoverWelder.WelderCode,'') + ISNULL(BackingWelder.WelderCode,'')) END) AS WelderCode, --焊工
|
||||
(CASE WHEN mat1.MaterialCode IS NOT NULL AND mat2.MaterialCode IS NOT NULL
|
||||
THEN mat1.MaterialCode + '/' + mat2.MaterialCode
|
||||
ELSE (ISNULL(mat1.MaterialCode,'') + ISNULL(mat2.MaterialCode,'')) END) AS MaterialCode, --材质
|
||||
|
||||
daily.WeldingDailyCode,
|
||||
pointItem.PointBatchId,
|
||||
point.PointBatchCode,
|
||||
(CASE WHEN pointItem.PointState='1' THEN '已点口' WHEN pointItem.PointState='2' THEN '已扩透' ELSE '' END) AS IsPoint
|
||||
FROM [dbo].[HJGL_WeldJoint] jot
|
||||
LEFT JOIN dbo.HJGL_Pipeline pipe ON pipe.PipelineId=jot.PipelineId
|
||||
LEFT JOIN dbo.WBS_UnitWork uw ON uw.UnitWorkId=pipe.UnitWorkId
|
||||
LEFT JOIN dbo.Base_Unit unit ON unit.UnitId=pipe.UnitId
|
||||
LEFT JOIN Base_WeldType AS WeldType ON WeldType.WeldTypeId=jot.WeldTypeId
|
||||
LEFT JOIN dbo.Base_DetectionRate dr ON dr.DetectionRateId = pipe.DetectionRateId
|
||||
LEFT JOIN Base_TestMedium tm ON tm.TestMediumId=pipe.TestMedium
|
||||
LEFT JOIN Base_TestMedium tm2 ON tm2.TestMediumId=pipe.LeakMedium
|
||||
LEFT JOIN Base_PurgeMethod pm ON pm.PurgeMethodId=pipe.PCMedium
|
||||
LEFT JOIN Base_PressurePipingClass ppc ON ppc.PressurePipingClassId=pipe.PressurePipingClassId
|
||||
LEFT JOIN Base_Material AS mat ON mat.MaterialId = pipe.MaterialId
|
||||
LEFT JOIN Base_Material AS mat1 ON mat1.MaterialId = jot.Material1Id
|
||||
LEFT JOIN Base_Material AS mat2 ON mat2.MaterialId = jot.Material2Id
|
||||
LEFT JOIN Base_WeldingMethod AS WeldingMethod ON WeldingMethod.WeldingMethodId=jot.WeldingMethodId
|
||||
LEFT JOIN Base_WeldingLocation AS WeldingLocation ON WeldingLocation.WeldingLocationId=jot.WeldingLocationId
|
||||
LEFT JOIN Base_Consumables AS wire ON wire.ConsumablesId=jot.WeldingWire
|
||||
LEFT JOIN Base_Consumables AS rod ON rod.ConsumablesId=jot.WeldingRod
|
||||
LEFT JOIN Base_GrooveType AS GrooveType ON GrooveType.GrooveTypeId=jot.GrooveTypeId
|
||||
LEFT JOIN Base_Components AS com1 ON com1.ComponentsId = jot.Components1Id
|
||||
LEFT JOIN Base_Components AS com2 ON com2.ComponentsId = jot.Components2Id
|
||||
LEFT JOIN SitePerson_Person AS BackingWelder ON BackingWelder.PersonId=jot.BackingWelderId and BackingWelder.ProjectId=jot.ProjectId
|
||||
LEFT JOIN SitePerson_Person AS CoverWelder ON CoverWelder.PersonId=jot.CoverWelderId and CoverWelder.ProjectId=jot.ProjectId
|
||||
LEFT JOIN dbo.HJGL_WeldingDaily AS daily ON daily.WeldingDailyId=jot.WeldingDailyId
|
||||
LEFT JOIN Base_PipingClass AS pipingClass ON pipingClass.PipingClassId=pipe.PipingClassId
|
||||
LEFT JOIN dbo.Base_Medium medium ON medium.MediumId = pipe.MediumId
|
||||
LEFT JOIN dbo.Base_DetectionType ndt ON ndt.DetectionTypeId = jot.DetectionTypeId
|
||||
LEFT JOIN dbo.WPQ_WPQList wps ON wps.WPQId = jot.WPQId
|
||||
LEFT JOIN dbo.HJGL_Batch_PointBatchItem pointItem ON pointItem.WeldJointId = jot.WeldJointId
|
||||
LEFT JOIN dbo.HJGL_Batch_PointBatch point ON point.PointBatchId = pointItem.PointBatchId
|
||||
|
||||
|
||||
|
||||
|
||||
GO
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('2C66A01D-B53F-46A1-89F0-30ED137C7498','检测结果汇总','HJGL/WeldingReport/CheckResult.aspx',100,'F3B157B7-9BEE-4150-80CB-087828F1C51D','Menu_HJGL',0,1,1)
|
||||
GO
|
||||
INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('C5671119-2DDD-4A64-B7C6-492B96C5AEC7','2C66A01D-B53F-46A1-89F0-30ED137C7498','查看',1)
|
||||
GO
|
||||
@@ -0,0 +1,93 @@
|
||||
|
||||
CREATE PROC [dbo].[sp_rpt_CheckResult]
|
||||
@unitId NVARCHAR(50) = NULL, --单位Id
|
||||
@detectionTypeId NVARCHAR(50) = NULL, --探伤
|
||||
@flowingSection NVARCHAR(50) = NULL, --探伤
|
||||
@date1 DATETIME = NULL,
|
||||
@date2 DATETIME = NULL,
|
||||
@projectId NVARCHAR(50) = NULL
|
||||
|
||||
AS
|
||||
/*检测结果汇总*/
|
||||
|
||||
select ndeItem.NDEItemID,unit.UnitName,jot.WeldJointCode,detectionType.DetectionTypeCode,ndeItem.TotalFilm,ndeItem.PassFilm,
|
||||
case ndeItem.CheckResult when '1' then '合格' else '不合格' end as CheckResult,pipeline.FlowingSection
|
||||
from HJGL_Batch_NDEItem ndeItem
|
||||
LEFT JOIN dbo.Base_DetectionType detectionType ON detectionType.DetectionTypeId = ndeItem.DetectionTypeId
|
||||
LEFT JOIN dbo.HJGL_Batch_BatchTrustItem trustItem ON trustItem.TrustBatchItemId = ndeItem.TrustBatchItemId
|
||||
LEFT JOIN dbo.HJGL_WeldJoint jot ON jot.WeldJointId = trustItem.WeldJointId
|
||||
LEFT JOIN dbo.HJGL_Pipeline pipeline ON jot.PipelineId = pipeline.PipelineId
|
||||
LEFT JOIN dbo.HJGL_WeldingDaily daily ON daily.WeldingDailyId = jot.WeldingDailyId
|
||||
LEFT JOIN dbo.Base_Unit unit ON unit.UnitId = daily.UnitId
|
||||
WHERE (ndeItem.DetectionTypeId=@detectionTypeId OR @detectionTypeId IS NULL)
|
||||
AND (jot.ProjectId=@projectId OR @projectId IS NULL)
|
||||
AND (daily.UnitId = @unitId OR @unitId IS NULL)
|
||||
AND (daily.WeldingDate >= @date1 OR @date1 IS NULL)
|
||||
AND (daily.WeldingDate <= @date2 OR @date2 IS NULL)
|
||||
AND (pipeline.FlowingSection like '%'+@flowingSection+'%' OR @flowingSection IS NULL)
|
||||
ORDER BY daily.UnitId,detectionType.DetectionTypeCode,jot.WeldJointCode
|
||||
|
||||
|
||||
GO
|
||||
|
||||
|
||||
|
||||
ALTER VIEW [dbo].[View_HJGL_Batch_PointBatchItem]
|
||||
AS
|
||||
/*************点口明细表*************/
|
||||
SELECT PointBatchItem.PointBatchItemId,
|
||||
PointBatchItem.PointBatchId,
|
||||
PointBatch.ProjectId,
|
||||
PointBatch.UnitId,
|
||||
PointBatch.DetectionTypeId,
|
||||
PointBatch.DetectionRateId,
|
||||
PointBatch.PointBatchCode,
|
||||
Pipeline.UnitWorkId,
|
||||
PointBatchItem.WeldJointId,
|
||||
(CASE PointBatchItem.PointState WHEN '1' THEN '点口' WHEN '2' THEN '扩透' END) AS PointState,
|
||||
(CASE PointBatchItem.IsBuildTrust WHEN 1 THEN '是' ELSE '' END) AS IsBuildTrust,
|
||||
(CASE WHEN PointBatchItem.IsAudit=1 THEN '是'
|
||||
WHEN (PointBatchItem.IsAudit IS NULL OR PointBatchItem.IsAudit=0) AND PointBatchItem.PointState IS NOT NULL THEN '否'
|
||||
WHEN (PointBatchItem.IsAudit IS NULL OR PointBatchItem.IsAudit=0) AND PointBatchItem.PointState IS NULL THEN '' END) AS PointIsAudit,
|
||||
PointBatchItem.PointDate,--点口日期
|
||||
(CASE PointBatchItem.IsWelderFirst WHEN 1 THEN '是' ELSE '' END) AS IsWelderFirst,
|
||||
PointBatchItem.RepairDate,--返修日期
|
||||
PointBatchItem.RepairRecordId,
|
||||
PointBatchItem.CutDate,--切除日期
|
||||
PointBatchItem.PBackingWelderId,--返修打底焊工
|
||||
PointBatchItem.PCoverWelderId,--返修盖面焊工
|
||||
UnitWork.UnitWorkCode,--工区号
|
||||
WeldJoint.WeldJointCode,--焊口号
|
||||
WeldJoint.BackingWelderId AS WelderId, --焊工ID
|
||||
BackingWelder.WelderCode AS BackingWelderCode,
|
||||
CoverWelder.WelderCode AS CoverWelderCode,
|
||||
WeldType.WeldTypeCode,
|
||||
WeldJoint.JointAttribute,
|
||||
WeldJoint.JointArea,--焊接区域
|
||||
WeldJoint.Size,--实际寸径
|
||||
WeldingDaily.WeldingDate,--焊接日期
|
||||
WeldJoint.PipelineId, --管线ID
|
||||
WeldJoint.Material1Id AS Mat, --材质
|
||||
WeldJoint.Specification, --规格
|
||||
Pipeline.PipelineCode, --管线号
|
||||
PipingClass.PipingClassName , --管道等级
|
||||
WeldJoint.BackingWelderId,
|
||||
WeldJoint.CoverWelderId
|
||||
FROM dbo.HJGL_Batch_PointBatchItem AS PointBatchItem
|
||||
LEFT JOIN dbo.HJGL_Batch_PointBatch AS PointBatch ON PointBatch.PointBatchId=PointBatchItem.PointBatchId
|
||||
LEFT JOIN dbo.HJGL_WeldJoint AS WeldJoint ON WeldJoint.WeldJointId=PointBatchItem.WeldJointId
|
||||
LEFT JOIN dbo.HJGL_Pipeline AS Pipeline ON Pipeline.PipelineId=WeldJoint.PipelineId
|
||||
LEFT JOIN dbo.WBS_UnitWork AS UnitWork ON UnitWork.UnitWorkId=Pipeline.UnitWorkId
|
||||
LEFT JOIN dbo.HJGL_WeldingDaily AS WeldingDaily ON WeldingDaily.WeldingDailyId=WeldJoint.WeldingDailyId
|
||||
LEFT JOIN dbo.Base_PipingClass AS PipingClass ON PipingClass.PipingClassId=Pipeline.PipingClassId
|
||||
LEFT JOIN SitePerson_Person AS BackingWelder ON BackingWelder.PersonId=WeldJoint.BackingWelderId
|
||||
LEFT JOIN SitePerson_Person AS CoverWelder ON CoverWelder.PersonId=WeldJoint.CoverWelderId
|
||||
LEFT JOIN Base_WeldType AS WeldType ON WeldType.WeldTypeId=WeldJoint.WeldTypeId
|
||||
LEFT JOIN HJGL_Hard_TrustItem HardTrustItem ON HardTrustItem.WeldJointId=PointBatchItem.WeldJointId
|
||||
where (WeldJoint.IsHotProess!=1 or (WeldJoint.IsHotProess=1 and HardTrustItem.IsPass=1))
|
||||
and BackingWelder.ProjectId=Pipeline.ProjectId and CoverWelder.ProjectId=Pipeline.ProjectId
|
||||
|
||||
|
||||
GO
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
alter table [dbo].[WBS_ControlItemInit] add IsJDItem bit null
|
||||
GO
|
||||
@@ -0,0 +1,61 @@
|
||||
|
||||
ALTER VIEW [dbo].[View_HJGL_Batch_PointBatchItem]
|
||||
AS
|
||||
/*************点口明细表*************/
|
||||
SELECT PointBatchItem.PointBatchItemId,
|
||||
PointBatchItem.PointBatchId,
|
||||
PointBatch.ProjectId,
|
||||
PointBatch.UnitId,
|
||||
PointBatch.DetectionTypeId,
|
||||
PointBatch.DetectionRateId,
|
||||
PointBatch.PointBatchCode,
|
||||
Pipeline.UnitWorkId,
|
||||
PointBatchItem.WeldJointId,
|
||||
(CASE PointBatchItem.PointState WHEN '1' THEN '点口' WHEN '2' THEN '扩透' END) AS PointState,
|
||||
(CASE PointBatchItem.IsBuildTrust WHEN 1 THEN '是' ELSE '' END) AS IsBuildTrust,
|
||||
(CASE WHEN PointBatchItem.IsAudit=1 THEN '是'
|
||||
WHEN (PointBatchItem.IsAudit IS NULL OR PointBatchItem.IsAudit=0) AND PointBatchItem.PointState IS NOT NULL THEN '否'
|
||||
WHEN (PointBatchItem.IsAudit IS NULL OR PointBatchItem.IsAudit=0) AND PointBatchItem.PointState IS NULL THEN '' END) AS PointIsAudit,
|
||||
PointBatchItem.PointDate,--点口日期
|
||||
(CASE PointBatchItem.IsWelderFirst WHEN 1 THEN '是' ELSE '' END) AS IsWelderFirst,
|
||||
PointBatchItem.RepairDate,--返修日期
|
||||
PointBatchItem.RepairRecordId,
|
||||
PointBatchItem.CutDate,--切除日期
|
||||
PointBatchItem.PBackingWelderId,--返修打底焊工
|
||||
PointBatchItem.PCoverWelderId,--返修盖面焊工
|
||||
UnitWork.UnitWorkCode,--工区号
|
||||
WeldJoint.WeldJointCode,--焊口号
|
||||
WeldJoint.BackingWelderId AS WelderId, --焊工ID
|
||||
BackingWelder.WelderCode AS BackingWelderCode,
|
||||
CoverWelder.WelderCode AS CoverWelderCode,
|
||||
WeldType.WeldTypeCode,
|
||||
WeldJoint.JointAttribute,
|
||||
WeldJoint.JointArea,--焊接区域
|
||||
WeldJoint.Size,--实际寸径
|
||||
WeldingDaily.WeldingDate,--焊接日期
|
||||
WeldJoint.PipelineId, --管线ID
|
||||
WeldJoint.Material1Id AS Mat, --材质
|
||||
WeldJoint.Specification, --规格
|
||||
Pipeline.PipelineCode, --管线号
|
||||
PipingClass.PipingClassName , --管道等级
|
||||
WeldJoint.BackingWelderId,
|
||||
WeldJoint.CoverWelderId
|
||||
FROM dbo.HJGL_Batch_PointBatchItem AS PointBatchItem
|
||||
LEFT JOIN dbo.HJGL_Batch_PointBatch AS PointBatch ON PointBatch.PointBatchId=PointBatchItem.PointBatchId
|
||||
LEFT JOIN dbo.HJGL_WeldJoint AS WeldJoint ON WeldJoint.WeldJointId=PointBatchItem.WeldJointId
|
||||
LEFT JOIN dbo.HJGL_Pipeline AS Pipeline ON Pipeline.PipelineId=WeldJoint.PipelineId
|
||||
LEFT JOIN dbo.WBS_UnitWork AS UnitWork ON UnitWork.UnitWorkId=Pipeline.UnitWorkId
|
||||
LEFT JOIN dbo.HJGL_WeldingDaily AS WeldingDaily ON WeldingDaily.WeldingDailyId=WeldJoint.WeldingDailyId
|
||||
LEFT JOIN dbo.Base_PipingClass AS PipingClass ON PipingClass.PipingClassId=Pipeline.PipingClassId
|
||||
LEFT JOIN SitePerson_Person AS BackingWelder ON BackingWelder.PersonId=WeldJoint.BackingWelderId
|
||||
LEFT JOIN SitePerson_Person AS CoverWelder ON CoverWelder.PersonId=WeldJoint.CoverWelderId
|
||||
LEFT JOIN Base_WeldType AS WeldType ON WeldType.WeldTypeId=WeldJoint.WeldTypeId
|
||||
LEFT JOIN HJGL_Hard_TrustItem HardTrustItem ON HardTrustItem.WeldJointId=PointBatchItem.WeldJointId
|
||||
where (WeldJoint.IsHotProess!=1 or WeldJoint.IsHotProess is null or (WeldJoint.IsHotProess=1 and HardTrustItem.IsPass=1))
|
||||
and BackingWelder.ProjectId=Pipeline.ProjectId and CoverWelder.ProjectId=Pipeline.ProjectId
|
||||
|
||||
|
||||
|
||||
GO
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
alter table WBS_WorkPackage add DrawProjectQuantity decimal(18,2) null
|
||||
GO
|
||||
|
||||
ALTER VIEW [dbo].[View_WBS]
|
||||
AS
|
||||
select '1' as Id,'0' as SupId ,'JZ' as Code, '½¨Öþ¹¤³Ì' as Name,'ProjectType' as WBSType,null as PlanStartDate,null as PlanEndDate,null as RealEndDate,null as WBSCode,null as JDWeights,null as Unit,null as PlanProjectQuantity,null as RealProjectQuantity,null as RealStartDate,null as IsMileStone,null as PlanCost,null as PreWorkCode,'' as ShowId,null as DrawProjectQuantity,
|
||||
ProjectId from dbo.Base_Project
|
||||
Union
|
||||
select '2' as Id,'0' as SupId ,'AZ' as Code, '°²×°¹¤³Ì' as Name,'ProjectType' as WBSType,null as PlanStartDate,null as PlanEndDate,null as RealEndDate,null as WBSCode,null as JDWeights,null as Unit,null as PlanProjectQuantity,null as RealProjectQuantity,null as RealStartDate,null as IsMileStone,null as PlanCost,null as PreWorkCode,'' as ShowId,null as DrawProjectQuantity,
|
||||
ProjectId from dbo.Base_Project
|
||||
Union
|
||||
select UnitWorkId as Id,ProjectType as SupId ,UnitWorkCode as Code, UnitWorkName as Name,'UnitWork' as WBSType,PlanStartDate, PlanEndDate,RealEndDate,WBSCode,JDWeights,null as Unit,null as PlanProjectQuantity,null as RealProjectQuantity,RealStartDate,null as IsMileStone,PlanCost,null as PreWorkCode,'' as ShowId,null as DrawProjectQuantity,
|
||||
ProjectId from dbo.WBS_UnitWork
|
||||
Union all
|
||||
select WorkPackageId as id,UnitWorkId as SupId,WorkPackageCode as Code,PackageContent as Name,'WorkPackage' as WBSType,PlanStartDate, PlanEndDate,RealEndDate,WBSCode,JDWeights,Unit,PlanProjectQuantity,RealProjectQuantity,RealStartDate,IsMileStone,PlanCost,PreWorkCode,case when (select COUNT(*) from WBS_WorkPackage a where a.SuperWorkPackageId=w.WorkPackageId and a.IsApprove=1)=0 then WorkPackageId else '' end as ShowId,DrawProjectQuantity,
|
||||
ProjectId from dbo.WBS_WorkPackage w where IsApprove=1 and SuperWorkPackageId is null
|
||||
Union all
|
||||
select WorkPackageId as id,SuperWorkPackageId as SupId,WorkPackageCode as Code, PackageContent as Name,'WorkPackage' as WBSType,PlanStartDate, PlanEndDate,RealEndDate,WBSCode,JDWeights,Unit,PlanProjectQuantity,RealProjectQuantity,RealStartDate,IsMileStone,PlanCost,PreWorkCode,case when (select COUNT(*) from WBS_WorkPackage a where a.SuperWorkPackageId=w.WorkPackageId and a.IsApprove=1)=0 then WorkPackageId else '' end as ShowId,DrawProjectQuantity,
|
||||
ProjectId from dbo.WBS_WorkPackage w where IsApprove=1 and SuperWorkPackageId is not null
|
||||
|
||||
|
||||
GO
|
||||
@@ -0,0 +1,53 @@
|
||||
|
||||
CREATE TABLE [dbo].[ZHGL_ConstructionLogHJGL](
|
||||
[ConstructionLogHJGLId] [nvarchar](50) NOT NULL,
|
||||
[ConstructionLogId] [nvarchar](50) NULL,
|
||||
[UnitWorkId] [nvarchar](50) NULL,
|
||||
[TodayCompleteSize] [decimal](18, 3) NULL,
|
||||
[TotalCompleteSize] [decimal](18, 3) NULL,
|
||||
[TotalSize] [decimal](18, 3) NULL,
|
||||
[TotalRate] [nvarchar](20) NULL,
|
||||
[TomorrowPlanSize] [decimal](18, 3) NULL,
|
||||
CONSTRAINT [PK_ZHGL_ConstructionLogHJGL] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[ConstructionLogHJGLId] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[ZHGL_ConstructionLogHJGL] WITH CHECK ADD CONSTRAINT [FK_ZHGL_ConstructionLogHJGL_ZHGL_ConstructionLog] FOREIGN KEY([ConstructionLogId])
|
||||
REFERENCES [dbo].[ZHGL_ConstructionLog] ([ConstructionLogId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[ZHGL_ConstructionLogHJGL] CHECK CONSTRAINT [FK_ZHGL_ConstructionLogHJGL_ZHGL_ConstructionLog]
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogHJGL', @level2type=N'COLUMN',@level2name=N'ConstructionLogHJGLId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'外键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogHJGL', @level2type=N'COLUMN',@level2name=N'ConstructionLogId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'单位工程id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogHJGL', @level2type=N'COLUMN',@level2name=N'UnitWorkId'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'今日完成达因量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogHJGL', @level2type=N'COLUMN',@level2name=N'TodayCompleteSize'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'累计完成达因量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogHJGL', @level2type=N'COLUMN',@level2name=N'TotalCompleteSize'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'总达因量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogHJGL', @level2type=N'COLUMN',@level2name=N'TotalSize'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'累计完成百分比' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogHJGL', @level2type=N'COLUMN',@level2name=N'TotalRate'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'明日计划达因量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogHJGL', @level2type=N'COLUMN',@level2name=N'TomorrowPlanSize'
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'施工日志焊接数据表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionLogHJGL'
|
||||
GO
|
||||
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
alter table HJGL_WeldJoint add AuditMan2 nvarchar(50) null
|
||||
GO
|
||||
alter table HJGL_WeldJoint add AuditDate2 datetime null
|
||||
GO
|
||||
|
||||
|
||||
ALTER VIEW [dbo].[View_HJGL_WeldJoint]
|
||||
AS
|
||||
SELECT jot.[ProjectId] --项目Id
|
||||
,pipe.[UnitWorkId] --单位工程Id
|
||||
,uw.UnitWorkName --单位工程
|
||||
,pipe.[UnitId] --单位Id
|
||||
,unit.UnitName --单位
|
||||
,jot.[PipelineCode] --管线号
|
||||
,pipe.[SingleNumber] --单线图号
|
||||
,pipe.[SingleName] --图纸名称
|
||||
,pipe.[MediumId] --介质Id
|
||||
,medium.MediumCode
|
||||
,medium.MediumName --介质名称
|
||||
,pipe.[PipingClassId] --管道等级Id
|
||||
,pipingClass.PipingClassCode --管道等级
|
||||
,pipe.[DetectionRateId] --探伤比例Id
|
||||
,dr.DetectionRateCode --探伤比例(例如5,10,20)
|
||||
,pipe.DetectionType --探伤类型Id(可能多个,中间用|分隔)
|
||||
,STUFF((SELECT ',' + DetectionTypeCode FROM Base_DetectionType
|
||||
WHERE CHARINDEX('|'+LTRIM(DetectionTypeId)+'|','|'+ pipe.DetectionType + '|') > 0 FOR XML PATH('') ), 1, 1, '') AS DetectionTypeStr --探伤类型(可能多个,中间用,分隔)
|
||||
,pipe.DesignTemperature --设计温度℃
|
||||
,pipe.DesignPress --设计压力Mpa(g)
|
||||
,pipe.TestMedium --压力试验介质Id
|
||||
,tm.MediumName AS TestMediumName --压力试验介质
|
||||
,pipe.TestPressure --压力试验压力Mpa(g)
|
||||
,pipe.PressurePipingClassId --压力管道级别Id
|
||||
,ppc.PressurePipingClassCode --压力管道级别
|
||||
,pipe.PipeLenth --管线长度(m)
|
||||
,pipe.LeakMedium --泄露性试验介质Id
|
||||
,tm2.MediumName AS LeakMediumName --泄露性试验介质
|
||||
,pipe.LeakPressure --泄露性试验压力Mpa(g)
|
||||
,pipe.PCMedium --吹洗要求Id
|
||||
,pm.PurgeMethodCode --吹洗要求
|
||||
,pipe.VacuumPressure --真空试验压力Kpa(a)
|
||||
,pipe.MaterialId --材质Id
|
||||
,mat.MaterialCode AS PipeMaterialCode --材质
|
||||
,pipe.Remark AS PipeRemark --备注
|
||||
,pipe.FlowingSection as FlowingSection --流水段
|
||||
,jot.[WeldJointId] --焊口Id
|
||||
,jot.[WeldJointCode] --焊口号
|
||||
,jot.[Material1Id] --材质1Id
|
||||
,mat1.MaterialCode AS Material1Code --材质1
|
||||
,jot.[Material2Id] --材质2Id
|
||||
,mat2.MaterialCode AS Material2Code --材质2
|
||||
,jot.[Dia] --外径
|
||||
,jot.DNDia --DN公称直径
|
||||
,jot.[Size] --达因
|
||||
,jot.[Thickness] --壁厚
|
||||
,jot.[Specification] --规格
|
||||
,jot.[WeldTypeId] --焊缝类型Id
|
||||
,WeldType.WeldTypeCode --焊缝类型
|
||||
,jot.[DetectionTypeId] --检测类型Id
|
||||
,ndt.DetectionTypeCode --检测类型
|
||||
,jot.[Components1Id] --组件1号Id
|
||||
,com1.ComponentsCode AS ComponentsCode1 --组件1号
|
||||
,jot.[Components2Id] --组件2号Id
|
||||
,com2.ComponentsCode AS ComponentsCode2 --组件2号
|
||||
,jot.DesignIsHotProess --是否热处理
|
||||
,CASE jot.DesignIsHotProess WHEN 1 THEN '是' ELSE '否' END AS DesignIsHotProessStr --是否热处理
|
||||
,jot.[WeldingMethodId] --焊接方法Id
|
||||
,WeldingMethod.WeldingMethodCode --焊接方法
|
||||
,jot.WPQId --WPS的Id
|
||||
,wps.WPQCode --WPS编号
|
||||
,jot.[GrooveTypeId] --坡口类型Id
|
||||
,GrooveType.GrooveTypeCode --坡口类型
|
||||
,jot.[WeldingRod] --焊条Id
|
||||
,rod.ConsumablesCode AS WeldingRodCode --焊条
|
||||
,jot.[WeldingWire] --焊丝Id
|
||||
,wire.ConsumablesCode AS WeldingWireCode --焊丝
|
||||
,jot.PreTemperature --预热温度
|
||||
,jot.[JointAttribute] --焊口属性
|
||||
,jot.TwoJointType --二次焊口新增类型
|
||||
,daily.WeldingDate as WeldingDateD
|
||||
,CONVERT(VARCHAR(100), daily.WeldingDate, 23) AS WeldingDate --焊接日期
|
||||
,BackingWelder.WelderCode AS BackingWelderCode --打底焊工
|
||||
,CoverWelder.WelderCode AS CoverWelderCode --盖面焊工
|
||||
,(CASE (SELECT COUNT(*) FROM [dbo].[HJGL_HotProess_TrustItem] hpti
|
||||
WHERE hpti.WeldJointId=jot.WeldJointId) WHEN 0 THEN '' ELSE (SELECT TOP 1 ISNULL(ReportNo,'') FROM [dbo].[HJGL_HotProess_Trust] hpt
|
||||
LEFT JOIN [dbo].[HJGL_HotProess_TrustItem] hpti ON hpti.HotProessTrustId=hpt.HotProessTrustId
|
||||
WHERE hpti.WeldJointId=jot.WeldJointId) END) AS HotProessReportNo --热处理报告编号
|
||||
,(CASE (SELECT TOP 1 IsCompleted FROM [dbo].[HJGL_HotProess_TrustItem] hpti
|
||||
WHERE hpti.WeldJointId=jot.WeldJointId) WHEN 1 THEN '完成' WHEN 0 THEN '未完成' ELSE '未热处理' END) AS HotProessResult --热处理检测结果
|
||||
,(CASE (SELECT COUNT(*) FROM [dbo].HJGL_Hard_TrustItem hti
|
||||
WHERE hti.WeldJointId=jot.WeldJointId) WHEN 0 THEN '' ELSE (SELECT TOP 1 ISNULL(InspectionNum,'') FROM [dbo].HJGL_Hard_Trust ht
|
||||
LEFT JOIN [dbo].HJGL_Hard_TrustItem hti ON hti.HardTrustID=ht.HardTrustID
|
||||
WHERE hti.WeldJointId=jot.WeldJointId) END) AS HardReportNo --硬度报告编号
|
||||
,(CASE (SELECT TOP 1 IsPass FROM [dbo].HJGL_Hard_TrustItem hti
|
||||
WHERE hti.WeldJointId=jot.WeldJointId) WHEN 1 THEN '合格' WHEN 0 THEN '不合格' ELSE '待检测' END) AS HardResult --硬度检测结果
|
||||
,(CASE (SELECT COUNT(*) FROM [dbo].HJGL_Batch_BatchTrustItem bti
|
||||
WHERE bti.WeldJointId=jot.WeldJointId) WHEN 0 THEN '' ELSE (SELECT TOP 1 TrustBatchCode FROM [dbo].HJGL_Batch_BatchTrust bt
|
||||
LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchId=bt.TrustBatchId
|
||||
WHERE bti.WeldJointId=jot.WeldJointId) END) AS TrustBatchCode --委托单编号
|
||||
,(CASE (SELECT COUNT(*) FROM [dbo].HJGL_Batch_NDEItem ndei
|
||||
LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchItemId=ndei.TrustBatchItemId
|
||||
WHERE bti.WeldJointId=jot.WeldJointId) WHEN 0 THEN '' ELSE (SELECT TOP 1 ISNULL(NDECode,'') FROM [dbo].HJGL_Batch_NDE nde
|
||||
LEFT JOIN [dbo].HJGL_Batch_NDEItem ndei ON ndei.NDEID=nde.NDEID
|
||||
LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchItemId=ndei.TrustBatchItemId
|
||||
WHERE bti.WeldJointId=jot.WeldJointId) END) AS NDECode --检测单编号
|
||||
,(CASE (SELECT TOP 1 CheckResult FROM [dbo].HJGL_Batch_NDEItem ndei
|
||||
LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchItemId=ndei.TrustBatchItemId
|
||||
WHERE bti.WeldJointId=jot.WeldJointId) WHEN '1' THEN '合格' WHEN '2' THEN '不合格' ELSE '' END) AS CheckResult --检测结果
|
||||
,jot.PipelineId
|
||||
,jot.[JointArea]
|
||||
,jot.[WeldingLocationId]
|
||||
,jot.[HeartNo1]
|
||||
,jot.[HeartNo2]
|
||||
,jot.[IsHotProess]
|
||||
,jot.[WeldingDailyId]
|
||||
,jot.[BackingWelderId]
|
||||
,jot.[CoverWelderId]
|
||||
,jot.WeldingMode
|
||||
,jot.Remark
|
||||
,jot.IsTwoJoint
|
||||
,jot.SubmitMan
|
||||
,jot.AuditMan
|
||||
,jot.AuditMan2
|
||||
,jot.AuditDate
|
||||
,jot.AuditDate2
|
||||
,WeldingLocation.WeldingLocationCode
|
||||
,CASE WHEN jot.WeldingDailyId IS NULL THEN '否' ELSE '是' END AS IsWelding
|
||||
,CASE WHEN jot.IsHotProess=1 THEN '是' ELSE '否' END AS IsHotProessStr,
|
||||
BackingWelder.PersonName AS BackingWelderName,
|
||||
CoverWelder.PersonName AS CoverWelderName,
|
||||
(CASE WHEN CoverWelder.WelderCode IS NOT NULL AND BackingWelder.WelderCode IS NOT NULL
|
||||
THEN CoverWelder.WelderCode + '/' + BackingWelder.WelderCode
|
||||
ELSE (ISNULL(CoverWelder.WelderCode,'') + ISNULL(BackingWelder.WelderCode,'')) END) AS WelderCode, --焊工
|
||||
(CASE WHEN mat1.MaterialCode IS NOT NULL AND mat2.MaterialCode IS NOT NULL
|
||||
THEN mat1.MaterialCode + '/' + mat2.MaterialCode
|
||||
ELSE (ISNULL(mat1.MaterialCode,'') + ISNULL(mat2.MaterialCode,'')) END) AS MaterialCode, --材质
|
||||
|
||||
daily.WeldingDailyCode,
|
||||
pointItem.PointBatchId,
|
||||
point.PointBatchCode,
|
||||
(CASE WHEN pointItem.PointState='1' THEN '已点口' WHEN pointItem.PointState='2' THEN '已扩透' ELSE '' END) AS IsPoint
|
||||
FROM [dbo].[HJGL_WeldJoint] jot
|
||||
LEFT JOIN dbo.HJGL_Pipeline pipe ON pipe.PipelineId=jot.PipelineId
|
||||
LEFT JOIN dbo.WBS_UnitWork uw ON uw.UnitWorkId=pipe.UnitWorkId
|
||||
LEFT JOIN dbo.Base_Unit unit ON unit.UnitId=pipe.UnitId
|
||||
LEFT JOIN Base_WeldType AS WeldType ON WeldType.WeldTypeId=jot.WeldTypeId
|
||||
LEFT JOIN dbo.Base_DetectionRate dr ON dr.DetectionRateId = pipe.DetectionRateId
|
||||
LEFT JOIN Base_TestMedium tm ON tm.TestMediumId=pipe.TestMedium
|
||||
LEFT JOIN Base_TestMedium tm2 ON tm2.TestMediumId=pipe.LeakMedium
|
||||
LEFT JOIN Base_PurgeMethod pm ON pm.PurgeMethodId=pipe.PCMedium
|
||||
LEFT JOIN Base_PressurePipingClass ppc ON ppc.PressurePipingClassId=pipe.PressurePipingClassId
|
||||
LEFT JOIN Base_Material AS mat ON mat.MaterialId = pipe.MaterialId
|
||||
LEFT JOIN Base_Material AS mat1 ON mat1.MaterialId = jot.Material1Id
|
||||
LEFT JOIN Base_Material AS mat2 ON mat2.MaterialId = jot.Material2Id
|
||||
LEFT JOIN Base_WeldingMethod AS WeldingMethod ON WeldingMethod.WeldingMethodId=jot.WeldingMethodId
|
||||
LEFT JOIN Base_WeldingLocation AS WeldingLocation ON WeldingLocation.WeldingLocationId=jot.WeldingLocationId
|
||||
LEFT JOIN Base_Consumables AS wire ON wire.ConsumablesId=jot.WeldingWire
|
||||
LEFT JOIN Base_Consumables AS rod ON rod.ConsumablesId=jot.WeldingRod
|
||||
LEFT JOIN Base_GrooveType AS GrooveType ON GrooveType.GrooveTypeId=jot.GrooveTypeId
|
||||
LEFT JOIN Base_Components AS com1 ON com1.ComponentsId = jot.Components1Id
|
||||
LEFT JOIN Base_Components AS com2 ON com2.ComponentsId = jot.Components2Id
|
||||
LEFT JOIN SitePerson_Person AS BackingWelder ON BackingWelder.PersonId=jot.BackingWelderId and BackingWelder.ProjectId=jot.ProjectId
|
||||
LEFT JOIN SitePerson_Person AS CoverWelder ON CoverWelder.PersonId=jot.CoverWelderId and CoverWelder.ProjectId=jot.ProjectId
|
||||
LEFT JOIN dbo.HJGL_WeldingDaily AS daily ON daily.WeldingDailyId=jot.WeldingDailyId
|
||||
LEFT JOIN Base_PipingClass AS pipingClass ON pipingClass.PipingClassId=pipe.PipingClassId
|
||||
LEFT JOIN dbo.Base_Medium medium ON medium.MediumId = pipe.MediumId
|
||||
LEFT JOIN dbo.Base_DetectionType ndt ON ndt.DetectionTypeId = jot.DetectionTypeId
|
||||
LEFT JOIN dbo.WPQ_WPQList wps ON wps.WPQId = jot.WPQId
|
||||
LEFT JOIN dbo.HJGL_Batch_PointBatchItem pointItem ON pointItem.WeldJointId = jot.WeldJointId
|
||||
LEFT JOIN dbo.HJGL_Batch_PointBatch point ON point.PointBatchId = pointItem.PointBatchId
|
||||
|
||||
|
||||
|
||||
GO
|
||||
|
||||
|
||||
@@ -543,6 +543,12 @@ GO
|
||||
INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('47A49DB1-4689-421A-A93E-DCBD7C34D917','854C79DF-A1C0-4E3C-BCB4-7D5CD044F72B','查看',1)
|
||||
GO
|
||||
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('2C66A01D-B53F-46A1-89F0-30ED137C7498','检测结果汇总','HJGL/WeldingReport/CheckResult.aspx',100,'F3B157B7-9BEE-4150-80CB-087828F1C51D','Menu_HJGL',0,1,1)
|
||||
GO
|
||||
INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('C5671119-2DDD-4A64-B7C6-492B96C5AEC7','2C66A01D-B53F-46A1-89F0-30ED137C7498','查看',1)
|
||||
GO
|
||||
|
||||
|
||||
--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
--VALUES('CF3CB43C-4031-4CFD-905F-154DC1CB881E','管线综合信息','HJGL/WeldingReport/IsoCompreInfo.aspx',80,'F3B157B7-9BEE-4150-80CB-087828F1C51D','Menu_HJGL',0,1,1)
|
||||
|
||||
@@ -644,6 +644,7 @@
|
||||
<Compile Include="ProjectData\Project_SysSetService.cs" />
|
||||
<Compile Include="ProjectData\TeamGroupService.cs" />
|
||||
<Compile Include="ProjectData\UnitWorkService.cs" />
|
||||
<Compile Include="PZHGL\InformationProject\ConstructionLogHJGLService.cs" />
|
||||
<Compile Include="PZHGL\InformationProject\ConstructionLogMachineService.cs" />
|
||||
<Compile Include="PZHGL\InformationProject\ConstructionLogManagementService.cs" />
|
||||
<Compile Include="PZHGL\InformationProject\ConstructionLogPersonService.cs" />
|
||||
|
||||
@@ -51,6 +51,7 @@ namespace BLL
|
||||
newControlItem.Standard = controlItem.Standard;
|
||||
newControlItem.ClauseNo = controlItem.ClauseNo;
|
||||
newControlItem.CheckAcceptType = controlItem.CheckAcceptType;
|
||||
newControlItem.IsJDItem = controlItem.IsJDItem;
|
||||
|
||||
db.WBS_ControlItemInit.InsertOnSubmit(newControlItem);
|
||||
db.SubmitChanges();
|
||||
@@ -75,6 +76,7 @@ namespace BLL
|
||||
newControlItem.Standard = controlItem.Standard;
|
||||
newControlItem.ClauseNo = controlItem.ClauseNo;
|
||||
newControlItem.CheckAcceptType = controlItem.CheckAcceptType;
|
||||
newControlItem.IsJDItem = controlItem.IsJDItem;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace BLL
|
||||
public static void UpdateWorkPackageProject(Model.WBS_WorkPackageProject workPack)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.WBS_WorkPackageProject newPack = db.WBS_WorkPackageProject.First(e => e.WorkPackageCode == workPack.WorkPackageCode);
|
||||
Model.WBS_WorkPackageProject newPack = db.WBS_WorkPackageProject.First(e => e.WorkPackageCode == workPack.WorkPackageCode && e.ProjectId == workPack.ProjectId);
|
||||
newPack.WorkPackageCode = workPack.WorkPackageCode;
|
||||
newPack.IsChild = workPack.IsChild;
|
||||
newPack.PackageContent = workPack.PackageContent;
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace BLL
|
||||
newWorkPackage.RealStartDate = WorkPackage.RealStartDate;
|
||||
newWorkPackage.RealEndDate = WorkPackage.RealEndDate;
|
||||
newWorkPackage.Unit = WorkPackage.Unit;
|
||||
newWorkPackage.DrawProjectQuantity = WorkPackage.DrawProjectQuantity;
|
||||
|
||||
db.WBS_WorkPackage.InsertOnSubmit(newWorkPackage);
|
||||
db.SubmitChanges();
|
||||
@@ -76,6 +77,7 @@ namespace BLL
|
||||
newWorkPackage.PlanCost = WorkPackage.PlanCost;
|
||||
newWorkPackage.JDWeights = WorkPackage.JDWeights;
|
||||
newWorkPackage.PreWorkCode = WorkPackage.PreWorkCode;
|
||||
newWorkPackage.DrawProjectQuantity = WorkPackage.DrawProjectQuantity;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
@@ -505,6 +507,7 @@ namespace BLL
|
||||
table.Columns.Add(new DataColumn("JDWeights", typeof(String)));
|
||||
table.Columns.Add(new DataColumn("Unit", typeof(String)));
|
||||
table.Columns.Add(new DataColumn("PlanProjectQuantity", typeof(String)));
|
||||
table.Columns.Add(new DataColumn("DrawProjectQuantity", typeof(String)));
|
||||
table.Columns.Add(new DataColumn("RealProjectQuantity", typeof(String)));
|
||||
table.Columns.Add(new DataColumn("PlanStartDate", typeof(DateTime)));
|
||||
table.Columns.Add(new DataColumn("PlanEndDate", typeof(DateTime)));
|
||||
@@ -551,30 +554,31 @@ namespace BLL
|
||||
row[6] = item.JDWeights;
|
||||
row[7] = item.Unit;
|
||||
row[8] = item.PlanProjectQuantity;
|
||||
row[9] = item.RealProjectQuantity;
|
||||
row[9] = item.DrawProjectQuantity;
|
||||
row[10] = item.RealProjectQuantity;
|
||||
if (item.PlanStartDate != null)
|
||||
{
|
||||
row[10] = item.PlanStartDate;
|
||||
row[11] = item.PlanStartDate;
|
||||
}
|
||||
if (item.PlanEndDate != null)
|
||||
{
|
||||
row[11] = item.PlanEndDate;
|
||||
row[12] = item.PlanEndDate;
|
||||
}
|
||||
if (item.RealStartDate != null)
|
||||
{
|
||||
row[12] = item.RealStartDate;
|
||||
row[13] = item.RealStartDate;
|
||||
}
|
||||
if (item.RealEndDate != null)
|
||||
{
|
||||
row[13] = item.RealEndDate;
|
||||
row[14] = item.RealEndDate;
|
||||
}
|
||||
if (item.IsMileStone != null)
|
||||
{
|
||||
row[14] = item.IsMileStone;
|
||||
row[15] = item.IsMileStone;
|
||||
}
|
||||
row[15] = item.PlanCost;
|
||||
row[16] = item.PreWorkCode;
|
||||
row[17] = item.Code;
|
||||
row[16] = item.PlanCost;
|
||||
row[17] = item.PreWorkCode;
|
||||
row[18] = item.Code;
|
||||
if (!string.IsNullOrEmpty(item.ShowId))
|
||||
{
|
||||
var details = getDetails.Where(x => x.WorkPackageId == item.Id).ToList();
|
||||
@@ -583,11 +587,11 @@ namespace BLL
|
||||
var index = months.FindIndex(x => x.Equals(item1.Months));
|
||||
if (item1.PlanNum != 0)
|
||||
{
|
||||
row[18 + index * 2] = decimal.Round(Convert.ToDecimal(item1.PlanNum), 2);
|
||||
row[19 + index * 2] = decimal.Round(Convert.ToDecimal(item1.PlanNum), 2);
|
||||
}
|
||||
if (item1.ThisNum != 0)
|
||||
{
|
||||
row[19 + index * 2] = decimal.Round(Convert.ToDecimal(item1.ThisNum), 2);
|
||||
row[20 + index * 2] = decimal.Round(Convert.ToDecimal(item1.ThisNum), 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -827,6 +831,45 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新分部分项工程实际完成时间
|
||||
/// </summary>
|
||||
/// <param name="WorkPackage"></param>
|
||||
public static void UpdateWorkPackageRealEndDate2(string workPackageId)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var workPackage = db.WBS_WorkPackage.FirstOrDefault(x => x.WorkPackageId == workPackageId);
|
||||
if (workPackage != null)
|
||||
{
|
||||
workPackage.RealEndDate = DateTime.Now;
|
||||
UpdateWorkPackages(db, workPackage, null, null, null, workPackage.RealEndDate);
|
||||
db.SubmitChanges();
|
||||
var unitWork = db.WBS_UnitWork.FirstOrDefault(x => x.UnitWorkId == workPackage.UnitWorkId);
|
||||
//获取是否存在其他未完成的分部分项
|
||||
var notEndOthenWorkPackage = db.WBS_WorkPackage.FirstOrDefault(x => x.UnitWorkId == unitWork.UnitWorkId && x.IsApprove == true && x.RealEndDate == null);
|
||||
if (notEndOthenWorkPackage == null)
|
||||
{
|
||||
if (workPackage.RealEndDate != null)
|
||||
{
|
||||
if (unitWork.RealEndDate == null)
|
||||
{
|
||||
unitWork.RealEndDate = workPackage.RealEndDate;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (unitWork.RealEndDate < workPackage.RealEndDate)
|
||||
{
|
||||
unitWork.RealEndDate = workPackage.RealEndDate;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
#region 根据工作包ID获取wbs节点及父节点字符串
|
||||
/// <summary>
|
||||
/// 根据工作包ID获取wbs节点及父节点字符串
|
||||
|
||||
@@ -3338,6 +3338,10 @@ namespace BLL
|
||||
/// </summary>
|
||||
public const string WBSWorkPackageTemplateUrl = "File\\Excel\\DataIn\\WBS定制导入模板.xls";
|
||||
/// <summary>
|
||||
/// WBS定制导入模板
|
||||
/// </summary>
|
||||
public const string WBSWorkPackageTemplate2Url = "File\\Excel\\DataIn\\WBS定制导入模板(电仪).xls";
|
||||
/// <summary>
|
||||
/// WBS编码规则
|
||||
/// </summary>
|
||||
public const string WBSCodeTemplateUrl = "File\\Excel\\DataIn\\WBS编码规则.xlsx";
|
||||
@@ -3447,6 +3451,10 @@ namespace BLL
|
||||
/// 公司平均工效统计模板文件原始虚拟路径
|
||||
/// </summary>
|
||||
public const string CompanyConstructionLogWorkEfficiencyTemplateUrl = "File\\Excel\\ConstructionLog\\公司平均工效统计.xlsx";
|
||||
/// <summary>
|
||||
/// 焊口二次设计信息模板文件原始虚拟路径
|
||||
/// </summary>
|
||||
public const string JotTwoDesignTemplateUrl = "File\\Excel\\DataOut\\焊口二次设计信息.xlsx";
|
||||
#endregion
|
||||
|
||||
#region 初始化上传路径
|
||||
|
||||
@@ -65,10 +65,10 @@ namespace BLL
|
||||
/// <param name="welderId"></param>
|
||||
/// <param name="welderCode"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsExisWelderCode(string welderId, string welderCode)
|
||||
public static bool IsExisWelderCode(string welderId, string welderCode, string projectId)
|
||||
{
|
||||
bool isExitCode = false;
|
||||
var q = from x in Funs.DB.SitePerson_Person where x.WelderCode == welderCode && x.PersonId != welderId select x;
|
||||
var q = from x in Funs.DB.SitePerson_Person where x.WelderCode == welderCode && x.PersonId != welderId && x.ProjectId == projectId select x;
|
||||
if (q.Count() > 0)
|
||||
{
|
||||
isExitCode = true;
|
||||
|
||||
@@ -236,8 +236,33 @@ namespace BLL
|
||||
batch.PointBatchId = SQLHelper.GetNewID(typeof(Model.HJGL_Batch_PointBatch));
|
||||
batchId = batch.PointBatchId;
|
||||
string perfix = project.ProjectCode + "-" + unitWork.UnitWorkCode + "-GD-DK-" + ndt.DetectionTypeCode + "-" + ndtr.DetectionRateValue.ToString() + "%-";
|
||||
batch.PointBatchCode = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_Batch_PointBatch", "PointBatchCode", project.ProjectId, perfix);
|
||||
|
||||
//batch.PointBatchCode = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_Batch_PointBatch", "PointBatchCode", project.ProjectId, perfix);
|
||||
var maxBatch = (from x in Funs.DB.HJGL_Batch_PointBatch where x.ProjectId == project.ProjectId && x.PointBatchCode.Contains(perfix) select x).FirstOrDefault();
|
||||
if (maxBatch == null)
|
||||
{
|
||||
batch.PointBatchCode = perfix + "0001";
|
||||
}
|
||||
else
|
||||
{
|
||||
int code = Funs.GetNewIntOrZero(maxBatch.PointBatchCode.Substring(maxBatch.PointBatchCode.Length - 4));
|
||||
code = code + 1;
|
||||
if (code < 10)
|
||||
{
|
||||
batch.PointBatchCode = perfix + "000" + code.ToString();
|
||||
}
|
||||
else if (code >= 10 && code < 100)
|
||||
{
|
||||
batch.PointBatchCode = perfix + "00" + code.ToString();
|
||||
}
|
||||
else if (code >= 100 && code < 1000)
|
||||
{
|
||||
batch.PointBatchCode = perfix + "0" + code.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
batch.PointBatchCode = perfix + code.ToString();
|
||||
}
|
||||
}
|
||||
batch.ProjectId = project.ProjectId;
|
||||
batch.UnitWorkId = pipeline.UnitWorkId;
|
||||
batch.BatchCondition = batchCondition;
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace BLL
|
||||
StackingPosition = x.StackingPosition,
|
||||
State = x.State,
|
||||
ReceiveMan = t.PersonName,
|
||||
ReceiveDate = string.Format("{0:g}", x.ReceiveDate),
|
||||
ReceiveDate = x.ReceiveDate.HasValue ? string.Format("{0:g}", x.ReceiveDate) : "",
|
||||
PlanStartDate = GetMinPlanStartDate(x.PackagingManageId),
|
||||
|
||||
}).Distinct();
|
||||
|
||||
@@ -202,7 +202,10 @@ namespace BLL
|
||||
|
||||
var mat1 = BLL.Base_MaterialService.GetMaterialByMaterialId(material1);
|
||||
var mat2 = BLL.Base_MaterialService.GetMaterialByMaterialId(material2);
|
||||
|
||||
if (mat1.MaterialCode == "No matl" || mat2.MaterialCode == "No matl") //材质1或材质2有一种为无材质,则匹配不了wpq
|
||||
{
|
||||
return null;
|
||||
}
|
||||
int m1 = SNClass(mat1.MaterialClass);
|
||||
int m2 = SNClass(mat2.MaterialClass);
|
||||
|
||||
|
||||
@@ -149,7 +149,8 @@ namespace BLL
|
||||
var joints = BLL.WeldJointService.GetWeldJointsByPipelineId(_pipelineId);
|
||||
int joint_Shop_count = joints.Where(x => x.JointAttribute == "预制口").Count();
|
||||
int joint_Field_count = joints.Where(x => x.JointAttribute == "安装口").Count();
|
||||
var TaskJoints = (from x in Funs.DB.View_HJGL_WeldingTask where x.ProjectId == pipemodel.ProjectId && x.PipelineCode == pipemodel.PipelineCode && x.WeldingDailyId!=null
|
||||
var TaskJoints = (from x in Funs.DB.View_HJGL_WeldingTask
|
||||
where x.ProjectId == pipemodel.ProjectId && x.PipelineCode == pipemodel.PipelineCode && x.WeldingDailyId != null
|
||||
select x).ToList();
|
||||
var TaskJoints_Shop = TaskJoints.Where(x => x.JointAttribute == "预制口").ToList();
|
||||
var TaskJoints_Field = TaskJoints.Where(x => x.JointAttribute == "安装口").ToList();
|
||||
@@ -342,7 +343,8 @@ namespace BLL
|
||||
{
|
||||
var q = (from x in Funs.DB.View_HJGL_WeldJoint
|
||||
where x.UnitWorkId == unitworkId
|
||||
select new {
|
||||
select new
|
||||
{
|
||||
PipelineId = x.PipelineId,
|
||||
WeldingDate = x.WeldingDate,
|
||||
PipelineCode = x.PipelineCode
|
||||
@@ -837,11 +839,16 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void BindTreeNodes(FineUIPro.TreeNode node,bool isExitWPQId, string pipecode, string ProjectId, int pageSize)
|
||||
public static void BindTreeNodes(FineUIPro.TreeNode node, bool isExitWPQId, string pipecode, string ProjectId, int pageSize, string pipeArea)
|
||||
{
|
||||
string pipeAreasql = string.Empty;
|
||||
if (pipeArea != BLL.Const._Null)
|
||||
{
|
||||
pipeAreasql += " AND PipeArea='" + pipeArea + "'";
|
||||
}
|
||||
if (isExitWPQId)
|
||||
{
|
||||
string strSql = "SELECT distinct PipelineId, PipelineCode FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL AND UnitWorkId =@UnitWorkId AND WPQId IS NULL";
|
||||
string strSql = "SELECT distinct PipelineId, PipelineCode FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL AND UnitWorkId =@UnitWorkId AND WPQId IS NULL" + pipeAreasql;
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@UnitWorkId", node.NodeID));
|
||||
if (!string.IsNullOrEmpty(pipecode))
|
||||
@@ -850,6 +857,7 @@ namespace BLL
|
||||
listStr.Add(new SqlParameter("@PipelineCode", "" + pipecode + ""));
|
||||
|
||||
}
|
||||
strSql += " order by PipelineCode";
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
System.Data.DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
var pipeline = Funs.TableToEntity<Model.PipeLineIdCodeItem>(dt);
|
||||
@@ -890,6 +898,10 @@ namespace BLL
|
||||
&& x.PipelineCode.Contains(pipecode)
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
if (pipeArea != BLL.Const._Null)
|
||||
{
|
||||
pipeline = pipeline.Where(x => x.PipeArea == pipeArea).ToList();
|
||||
}
|
||||
var hJGL_WeldJoints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == ProjectId select x).ToList();
|
||||
int pageindex = int.Parse(node.CommandName.Split('|')[0]);
|
||||
int pageCount = int.Parse(node.CommandName.Split('|')[1]);
|
||||
|
||||
@@ -87,7 +87,6 @@ namespace BLL
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_WeldJoint newWeldJoint = new Model.HJGL_WeldJoint
|
||||
{
|
||||
WeldJointId = SQLHelper.GetNewID(typeof(Model.HJGL_WeldJoint)),
|
||||
ProjectId = weldJoint.ProjectId,
|
||||
PipelineId = weldJoint.PipelineId,
|
||||
PipelineCode = weldJoint.PipelineCode,
|
||||
@@ -122,17 +121,26 @@ namespace BLL
|
||||
SubmitMan = weldJoint.SubmitMan,
|
||||
TwoJointType = weldJoint.TwoJointType
|
||||
};
|
||||
|
||||
if (!string.IsNullOrEmpty(weldJoint.WeldJointId))
|
||||
{
|
||||
newWeldJoint.WeldJointId = weldJoint.WeldJointId;
|
||||
}
|
||||
else
|
||||
{
|
||||
newWeldJoint.WeldJointId = SQLHelper.GetNewID(typeof(Model.HJGL_WeldJoint));
|
||||
}
|
||||
db.HJGL_WeldJoint.InsertOnSubmit(newWeldJoint);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
public static void AddBulkWeldJoint(List<Model.HJGL_WeldJoint> weldJoints)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
db.HJGL_WeldJoint.InsertAllOnSubmit(weldJoints);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
@@ -246,6 +254,24 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 二次焊口施工经理审核
|
||||
/// </summary>
|
||||
/// <param name="jointId"></param>
|
||||
/// <param name="auditMan"></param>
|
||||
/// <param name="auditDate"></param>
|
||||
public static void UpdateJointAudit2(string jointId, string auditMan, DateTime? auditDate)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.HJGL_WeldJoint newWeldJoint = db.HJGL_WeldJoint.FirstOrDefault(e => e.WeldJointId == jointId);
|
||||
if (newWeldJoint != null)
|
||||
{
|
||||
newWeldJoint.AuditMan2 = auditMan;
|
||||
newWeldJoint.AuditDate2 = auditDate;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除焊口信息
|
||||
/// </summary>
|
||||
@@ -433,7 +459,8 @@ namespace BLL
|
||||
&& (string.IsNullOrEmpty(model.PipelineId) || x.PipelineId.Contains(model.PipelineId))
|
||||
&& (string.IsNullOrEmpty(model.PipelineCode) || x.PipelineCode.Contains(model.PipelineCode))
|
||||
&& (string.IsNullOrEmpty(model.WeldJointCode) || x.WeldJointCode.Contains(model.WeldJointCode))
|
||||
orderby x.WeldJointCode select x).AsParallel().ToList();
|
||||
orderby x.WeldJointCode
|
||||
select x).AsParallel().ToList();
|
||||
return q;
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
@@ -322,6 +322,14 @@ namespace BLL
|
||||
updateWeldJoint.BackingWelderId = null;
|
||||
BLL.WeldJointService.UpdateWeldJoint(updateWeldJoint);
|
||||
|
||||
var weldTask = BLL.WeldTaskService.GetWeldTaskByWeldJointId(weldJointId);
|
||||
if (weldTask != null)
|
||||
{
|
||||
weldTask.CoverWelderId = null;
|
||||
weldTask.BackingWelderId = null;
|
||||
BLL.WeldTaskService.UpdateWeldTask(weldTask);
|
||||
}
|
||||
|
||||
var pointBatchItems = from x in Funs.DB.HJGL_Batch_PointBatchItem where x.WeldJointId == weldJointId select x;
|
||||
string pointBatchId = pointBatchItems.FirstOrDefault().PointBatchId;
|
||||
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class ConstructionLogHJGLService
|
||||
{
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
|
||||
/// <summary>
|
||||
/// 获取施工日志焊接数据明细列表
|
||||
/// </summary>
|
||||
/// <param name="satartRowIndex"></param>
|
||||
/// <param name="maximumRows"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.ZHGL_ConstructionLogHJGL> getListData(string ConstructionLogId)
|
||||
{
|
||||
return (from x in db.ZHGL_ConstructionLogHJGL
|
||||
where x.ConstructionLogId == ConstructionLogId
|
||||
select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加施工日志焊接数据明细
|
||||
/// </summary>
|
||||
/// <param name="managerRuleApprove">施工日志焊接数据明细实体</param>
|
||||
public static void AddConstructionLogHJGL(Model.ZHGL_ConstructionLogHJGL constructionLogHJGL)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.ZHGL_ConstructionLogHJGL newConstructionLogHJGL = new Model.ZHGL_ConstructionLogHJGL();
|
||||
newConstructionLogHJGL.ConstructionLogHJGLId = constructionLogHJGL.ConstructionLogHJGLId;
|
||||
newConstructionLogHJGL.ConstructionLogId = constructionLogHJGL.ConstructionLogId;
|
||||
newConstructionLogHJGL.UnitWorkId = constructionLogHJGL.UnitWorkId;
|
||||
newConstructionLogHJGL.TodayCompleteSize = constructionLogHJGL.TodayCompleteSize;
|
||||
newConstructionLogHJGL.TotalCompleteSize = constructionLogHJGL.TotalCompleteSize;
|
||||
newConstructionLogHJGL.TotalSize = constructionLogHJGL.TotalSize;
|
||||
newConstructionLogHJGL.TotalRate = constructionLogHJGL.TotalRate;
|
||||
newConstructionLogHJGL.TomorrowPlanSize = constructionLogHJGL.TomorrowPlanSize;
|
||||
|
||||
db.ZHGL_ConstructionLogHJGL.InsertOnSubmit(newConstructionLogHJGL);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报id删除对应的所有施工日志焊接数据明细
|
||||
/// </summary>
|
||||
/// <param name="ConstructionLogId">施工日志焊接数据明细编号</param>
|
||||
public static void DeleteConstructionLogHJGLsByConstructionLogId(string ConstructionLogId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = (from x in db.ZHGL_ConstructionLogHJGL where x.ConstructionLogId == ConstructionLogId select x).ToList();
|
||||
if (q.Count() > 0)
|
||||
{
|
||||
db.ZHGL_ConstructionLogHJGL.DeleteAllOnSubmit(q);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据月报id获取对应的所有施工日志焊接数据明细
|
||||
/// </summary>
|
||||
/// <param name="ConstructionLogId">施工日志焊接数据明细编号</param>
|
||||
public static List<Model.ZHGL_ConstructionLogHJGL> GetConstructionLogHJGLsByConstructionLogId(string ConstructionLogId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
return (from x in db.ZHGL_ConstructionLogHJGL where x.ConstructionLogId == ConstructionLogId orderby x.UnitWorkId select x).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -967,6 +967,12 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
foreach (var item in list)
|
||||
{
|
||||
Model.WBS_ControlItemAndCycle c = BLL.ControlItemAndCycleService.GetControlItemAndCycleById(item.ControlItemAndCycleId);
|
||||
Model.WBS_ControlItemInit cInit = BLL.ControlItemInitService.GetControlItemInitByCode(c.InitControlItemCode);
|
||||
bool isJDItem = false;
|
||||
if (cInit != null && cInit.IsJDItem.HasValue)
|
||||
{
|
||||
isJDItem = cInit.IsJDItem.Value;
|
||||
}
|
||||
if (c != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(c.HGForms) || !string.IsNullOrEmpty(c.SHForms))
|
||||
@@ -980,8 +986,19 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
{
|
||||
c.RealEndDate = DateTime.Now;
|
||||
BLL.ControlItemAndCycleService.UpdateControlItemAndCycle(c);
|
||||
if (isJDItem) //进度完成项
|
||||
{
|
||||
BLL.WorkPackageService.UpdateWorkPackageRealEndDate2(c.WorkPackageId);
|
||||
}
|
||||
else //非进度完成项
|
||||
{
|
||||
Model.WBS_WorkPackage workPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(c.WorkPackageId);
|
||||
if (workPackage.RealEndDate == null) //分部分项还未生成实际完成时间
|
||||
{
|
||||
BLL.WorkPackageService.UpdateWorkPackageRealEndDate(c.WorkPackageId);
|
||||
}
|
||||
}
|
||||
}
|
||||
else //检查多次
|
||||
{
|
||||
List<Model.Check_SpotCheckDetail> details = BLL.SpotCheckDetailService.GetSpotCheckDetailsByControlItemAndCycleId(c.ControlItemAndCycleId);
|
||||
@@ -989,12 +1006,23 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
{
|
||||
c.RealEndDate = DateTime.Now;
|
||||
BLL.ControlItemAndCycleService.UpdateControlItemAndCycle(c);
|
||||
if (isJDItem) //进度完成项
|
||||
{
|
||||
BLL.WorkPackageService.UpdateWorkPackageRealEndDate2(c.WorkPackageId);
|
||||
}
|
||||
else //非进度完成项
|
||||
{
|
||||
Model.WBS_WorkPackage workPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(c.WorkPackageId);
|
||||
if (workPackage.RealEndDate == null) //分部分项还未生成实际完成时间
|
||||
{
|
||||
BLL.WorkPackageService.UpdateWorkPackageRealEndDate(c.WorkPackageId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isExitForms) //不存在有表格需上传的明细记录
|
||||
{
|
||||
isShow = false;
|
||||
|
||||
@@ -39,6 +39,15 @@
|
||||
EmptyText="输入查询条件" Width="190px" LabelWidth="80px"
|
||||
LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar4" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox ID="txtName" runat="server" Label="焊工姓名"
|
||||
EmptyText="输入查询条件" Width="190px" LabelWidth="80px"
|
||||
LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch"
|
||||
EnablePostBack="true" OnClick="btnQuery_Click1" runat="server">
|
||||
</f:Button>
|
||||
|
||||
@@ -191,11 +191,15 @@ namespace FineUIPro.Web.CQMS.PersonManage
|
||||
rootNode.Text = item.UnitName;
|
||||
rootNode.EnableClickEvent = true;
|
||||
this.tvControlItem.Nodes.Add(rootNode);
|
||||
var getWelders = (from x in Funs.DB.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkPostId == Const.WorkPost_Welder && x.States == Const.ProjectPersonStates_1 && x.UnitId == item.UnitId select x).ToList();
|
||||
var getWelders = (from x in Funs.DB.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkPostId == Const.WorkPost_Welder && x.UnitId == item.UnitId select x).ToList();
|
||||
if (!string.IsNullOrEmpty(txtQueryWelderCode.Text.Trim()))
|
||||
{
|
||||
getWelders = getWelders.Where(x => x.WelderCode.Contains(txtQueryWelderCode.Text.Trim())).ToList();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtName.Text.Trim()))
|
||||
{
|
||||
getWelders = getWelders.Where(x => x.PersonName.Contains(txtName.Text.Trim())).ToList();
|
||||
}
|
||||
foreach (var sitem in getWelders)
|
||||
{
|
||||
TreeNode tn = new TreeNode();
|
||||
|
||||
@@ -7,12 +7,10 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.PersonManage
|
||||
{
|
||||
namespace FineUIPro.Web.CQMS.PersonManage {
|
||||
|
||||
|
||||
public partial class WelderManage
|
||||
{
|
||||
public partial class WelderManage {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -68,6 +66,24 @@ namespace FineUIPro.Web.CQMS.PersonManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtQueryWelderCode;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar4;
|
||||
|
||||
/// <summary>
|
||||
/// txtName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtName;
|
||||
|
||||
/// <summary>
|
||||
/// btnQuery 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -139,7 +139,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
|
||||
{
|
||||
string PersonId = Request.Params["PersonId"];
|
||||
var q = Funs.DB.SitePerson_Person.FirstOrDefault(x => x.WelderCode == this.txtWelderCode.Text.Trim()
|
||||
&& (x.PersonId != PersonId || (PersonId == null && PersonId != null)));
|
||||
&& (x.PersonId != PersonId || (PersonId == null && PersonId != null)) && x.ProjectId == this.CurrUser.LoginProjectId);
|
||||
if (q != null)
|
||||
{
|
||||
Alert.ShowInTop("焊工号已经存在!", MessageBoxIcon.Warning);
|
||||
@@ -170,7 +170,18 @@ namespace FineUIPro.Web.CQMS.PersonManage
|
||||
//newWelder.Sex = this.rblSex.SelectedValue;
|
||||
//newWelder.Birthday = Funs.GetNewDateTime(this.txtBirthday.Text.Trim());
|
||||
newWelder.IdentityCard = this.txtIdentityCard.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(this.txtCertificateCode.Text.Trim()))
|
||||
{
|
||||
newWelder.CertificateCode = this.txtCertificateCode.Text.Trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
var welder = BLL.SitePerson_PersonService.GetSitePersonByProjectIdPersonId(this.CurrUser.LoginProjectId, PersonId);
|
||||
if (welder != null)
|
||||
{
|
||||
newWelder.CertificateCode = welder.IdentityCard;
|
||||
}
|
||||
}
|
||||
//newWelder.CertificateLimitTime = Funs.GetNewDateTime(this.txtCertificateLimitTime.Text.Trim());
|
||||
newWelder.WelderLevel = this.txtWelderLevel.Text.Trim();
|
||||
//if (this.cbIsOnDuty.Checked)
|
||||
@@ -187,7 +198,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
|
||||
// newWelder.IsUsed = true;
|
||||
if (!string.IsNullOrEmpty(PersonId))
|
||||
{
|
||||
if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text))
|
||||
if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text, this.CurrUser.LoginProjectId))
|
||||
{
|
||||
newWelder.PersonId = PersonId;
|
||||
BLL.WelderService.UpdateWelder(newWelder);
|
||||
@@ -201,7 +212,7 @@ namespace FineUIPro.Web.CQMS.PersonManage
|
||||
else
|
||||
{
|
||||
PersonId = SQLHelper.GetNewID(typeof(Model.SitePerson_Person));
|
||||
if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text))
|
||||
if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text, this.CurrUser.LoginProjectId))
|
||||
{
|
||||
newWelder.PersonId = PersonId;
|
||||
// BLL.WelderService.AddWelder(newWelder);
|
||||
|
||||
@@ -77,6 +77,11 @@
|
||||
<f:TextBox ID="txtClauseNo" runat="server" Label="条款号" LabelWidth="160px"></f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:CheckBox runat="server" ID="cbIsJDItem" Label="进度完成项" LabelWidth="160px"></f:CheckBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
|
||||
@@ -102,6 +102,10 @@ namespace FineUIPro.Web.CQMS.WBS
|
||||
this.txtSHForms.Text = controlItem.SHForms;
|
||||
this.txtStandard.Text = controlItem.Standard;
|
||||
this.txtClauseNo.Text = controlItem.ClauseNo;
|
||||
if (controlItem.IsJDItem == true)
|
||||
{
|
||||
this.cbIsJDItem.Checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -130,6 +134,7 @@ namespace FineUIPro.Web.CQMS.WBS
|
||||
newControlItem.SHForms = this.txtSHForms.Text.Trim();
|
||||
newControlItem.Standard = this.txtStandard.Text.Trim();
|
||||
newControlItem.ClauseNo = this.txtClauseNo.Text.Trim();
|
||||
newControlItem.IsJDItem = this.cbIsJDItem.Checked;
|
||||
if (Request.Params["type"] == "add")
|
||||
{
|
||||
BLL.ControlItemInitService.AddControlItemInit(newControlItem);
|
||||
|
||||
@@ -147,6 +147,15 @@ namespace FineUIPro.Web.CQMS.WBS {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtClauseNo;
|
||||
|
||||
/// <summary>
|
||||
/// cbIsJDItem 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox cbIsJDItem;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -88,6 +88,7 @@
|
||||
<f:RenderField Width="100px" ColumnID="ClauseNo" DataField="ClauseNo" FieldType="String"
|
||||
HeaderText="条款号" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:CheckBoxField Width="100px" RenderAsStaticField="true" TextAlign="Center" DataField="IsJDItem" HeaderText="进度完成项" />
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
|
||||
@@ -455,7 +455,7 @@ namespace FineUIPro.Web.CQMS.WBS
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT ControlItemCode,WorkPackageCode,ControlItemContent,ControlPoint,ControlItemDef,Weights,HGForms,SHForms,Standard,ClauseNo"
|
||||
string strSql = @"SELECT ControlItemCode,WorkPackageCode,ControlItemContent,ControlPoint,ControlItemDef,Weights,HGForms,SHForms,Standard,ClauseNo,IsJDItem"
|
||||
+ @" FROM WBS_ControlItemInit ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
strSql += " where WorkPackageCode = @WorkPackageCode";
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<f:Button runat="server" ID="btnReCheck" OnClick="btnReCheck_Click" Hidden="true"></f:Button>
|
||||
<f:HiddenField runat="server" ID="hdId"></f:HiddenField>
|
||||
<f:HiddenField runat="server" ID="hdTotalValue"></f:HiddenField>
|
||||
<f:HiddenField runat="server" ID="hdType"></f:HiddenField>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
@@ -115,7 +116,7 @@
|
||||
</f:RegionPanel>
|
||||
<f:Window ID="Window1" Title="导入" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true"
|
||||
Width="800px" Height="460px" OnClose="Window1_Close">
|
||||
Width="1000px" Height="460px" OnClose="Window1_Close">
|
||||
</f:Window>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -139,10 +139,15 @@ namespace FineUIPro.Web.CQMS.WBS
|
||||
}
|
||||
}
|
||||
}
|
||||
var equipment = workPackages.FirstOrDefault(x => x.PackageContent == "机泵" || x.PackageContent == "静止设备");
|
||||
this.hdType.Text = string.Empty;
|
||||
var equipment = workPackages.FirstOrDefault(x => x.PackageContent == "机泵" || x.PackageContent == "静止设备" || x.PackageContent == "桥架" || x.PackageContent == "仪表回路");
|
||||
if (equipment != null)
|
||||
{
|
||||
this.btnImport.Hidden = false;
|
||||
if (equipment.PackageContent == "桥架" || equipment.PackageContent == "仪表回路")
|
||||
{
|
||||
this.hdType.Text = "DY"; //电仪
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -539,7 +544,7 @@ namespace FineUIPro.Web.CQMS.WBS
|
||||
name = string.Empty;
|
||||
if (!string.IsNullOrEmpty(txtName.Trim()))
|
||||
{
|
||||
name = "-" + txtName.Trim();
|
||||
name = "-" + txtName.Trim().Replace("&#215;", "×");
|
||||
}
|
||||
if (!string.IsNullOrEmpty(name))
|
||||
{
|
||||
@@ -639,7 +644,7 @@ namespace FineUIPro.Web.CQMS.WBS
|
||||
name = string.Empty;
|
||||
if (!string.IsNullOrEmpty(txtName.Trim()))
|
||||
{
|
||||
name = "-" + txtName.Trim();
|
||||
name = "-" + txtName.Trim().Replace("&#215;", "×");
|
||||
}
|
||||
Model.WBS_WorkPackageProject workPackageProject = BLL.WorkPackageProjectService.GetWorkPackageProjectByWorkPackageCode(workPackageCode2, this.CurrUser.LoginProjectId);
|
||||
if (ckbWorkPackageCode.Checked)
|
||||
@@ -810,8 +815,15 @@ namespace FineUIPro.Web.CQMS.WBS
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveData();
|
||||
if (string.IsNullOrEmpty(this.hdType.Text.Trim()))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WorkPackageSet2In.aspx?WorkPackageId={0}", WorkPackageId, "导入 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WorkPackageSet2In2.aspx?WorkPackageId={0}", WorkPackageId, "导入 - ")));
|
||||
}
|
||||
}
|
||||
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
|
||||
@@ -138,6 +138,15 @@ namespace FineUIPro.Web.CQMS.WBS {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdTotalValue;
|
||||
|
||||
/// <summary>
|
||||
/// hdType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdType;
|
||||
|
||||
/// <summary>
|
||||
/// cbSelect 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WorkPackageSet2In2.aspx.cs" Inherits="FineUIPro.Web.CQMS.WBS.WorkPackageSet2In2" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>导入</title>
|
||||
<link href="~/res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" OnCustomEvent="PageManager1_CustomEvent" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnAudit" Icon="ApplicationEdit" runat="server" ToolTip="数据导入" ValidateForms="SimpleForm1"
|
||||
OnClick="btnAudit_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnSave" ToolTip="保存" Icon="SystemSaveNew" runat="server" Text=""
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" ToolTip="下载模板" OnClick="btnDownLoad_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:FileUpload runat="server" ID="fuAttachUrl" EmptyText="选择要导入的文件" Label="选择要导入的文件"
|
||||
LabelWidth="150px">
|
||||
</f:FileUpload>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" Width="870px" ShowBorder="true" ShowHeader="false" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="WorkPackageId,WorkPackageCode" AllowSorting="true" EnableColumnLines="true"
|
||||
SortField="WorkPackageId" SortDirection="ASC" AllowCellEditing="true" ClicksToEdit="1" ForceFit="true"
|
||||
ShowSelectedCell="true" DataIDField="WorkPackageId" AllowPaging="false" IsDatabasePaging="false"
|
||||
PageSize="200" Hidden="true">
|
||||
|
||||
<Columns>
|
||||
<f:RenderField Width="100px" ColumnID="PackageContent" DataField="PackageContent" FieldType="String"
|
||||
HeaderText="第2级" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="定制" ColumnID="SuperWorkPack" DataField="SuperWorkPack" SortField="SuperWorkPack"
|
||||
HeaderTextAlign="Center" TextAlign="Center" Width="200px" FieldType="String">
|
||||
<Editor>
|
||||
<f:TextBox runat="server" ID="txtName">
|
||||
</f:TextBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="80px" ColumnID="Unit" DataField="Unit" FieldType="String"
|
||||
HeaderText="单位" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="PlanProjectQuantity" DataField="PlanProjectQuantity" FieldType="Double"
|
||||
HeaderText="概算工程量" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="DrawProjectQuantity" DataField="DrawProjectQuantity" FieldType="Double"
|
||||
HeaderText="图纸工程量" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="RealProjectQuantity" DataField="RealProjectQuantity" FieldType="Double"
|
||||
HeaderText="实际工程量" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="PlanStartDate" DataField="PlanStartDate" FieldType="Date"
|
||||
Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="计划开始时间" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="PlanEndDate" DataField="PlanEndDate" FieldType="Date"
|
||||
Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="计划完成时间" HeaderTextAlign="Center">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:HiddenField ID="hdFileName" runat="server">
|
||||
</f:HiddenField>
|
||||
<f:HiddenField ID="hdCheckResult" runat="server">
|
||||
</f:HiddenField>
|
||||
<f:HiddenField runat="server" ID="hdTotalValue"></f:HiddenField>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label ID="lblBottom" runat="server" Text="说明:1 导入模板为.xls后缀的EXCEL文件,黑体字为必填项。2 数据导入完成,成功后自动返回,如果有不成功数据页面弹出提示框">
|
||||
</f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,679 @@
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.OleDb;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.WBS
|
||||
{
|
||||
public partial class WorkPackageSet2In2 : PageBase
|
||||
{
|
||||
#region 定义变量
|
||||
/// <summary>
|
||||
/// 上传预设的虚拟路径
|
||||
/// </summary>
|
||||
private string initPath = Const.ExcelUrl;
|
||||
|
||||
/// <summary>
|
||||
/// 导入集合
|
||||
/// </summary>
|
||||
private List<Model.WBS_WorkPackage> ViewWorkPackages = new List<Model.WBS_WorkPackage>();
|
||||
|
||||
/// <summary>
|
||||
/// 错误集合
|
||||
/// </summary>
|
||||
public static string errorInfos = string.Empty;
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string WorkPackageId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["WorkPackageId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["WorkPackageId"] = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 单位工程
|
||||
/// </summary>
|
||||
public string UnitWorkId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["UnitWorkId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["UnitWorkId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载页面
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.hdFileName.Text = string.Empty;
|
||||
this.hdCheckResult.Text = string.Empty;
|
||||
if (ViewWorkPackages != null)
|
||||
{
|
||||
ViewWorkPackages.Clear();
|
||||
}
|
||||
errorInfos = string.Empty;
|
||||
WorkPackageId = Request.Params["WorkPackageId"];
|
||||
var workPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(WorkPackageId);
|
||||
if (workPackage != null)
|
||||
{
|
||||
UnitWorkId = workPackage.UnitWorkId;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 数据导入
|
||||
/// <summary>
|
||||
/// 数据导入
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAudit_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this.fuAttachUrl.HasFile == false)
|
||||
{
|
||||
Alert.ShowInTop("请您选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower();
|
||||
if (IsXls != ".xls")
|
||||
{
|
||||
Alert.ShowInTop("只可以选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (ViewWorkPackages != null)
|
||||
{
|
||||
ViewWorkPackages.Clear();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(errorInfos))
|
||||
{
|
||||
errorInfos = string.Empty;
|
||||
}
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string initFullPath = rootPath + initPath;
|
||||
if (!Directory.Exists(initFullPath))
|
||||
{
|
||||
Directory.CreateDirectory(initFullPath);
|
||||
}
|
||||
|
||||
this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls;
|
||||
string filePath = initFullPath + this.hdFileName.Text;
|
||||
this.fuAttachUrl.PostedFile.SaveAs(filePath);
|
||||
ImportXlsToData(rootPath + initPath + this.hdFileName.Text);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
#region 读Excel提取数据
|
||||
/// <summary>
|
||||
/// 从Excel提取数据--》Dataset
|
||||
/// </summary>
|
||||
/// <param name="filename">Excel文件路径名</param>
|
||||
private void ImportXlsToData(string fileName)
|
||||
{
|
||||
try
|
||||
{
|
||||
ViewWorkPackages.Clear();
|
||||
string oleDBConnString = String.Empty;
|
||||
oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
|
||||
oleDBConnString += "Data Source=";
|
||||
oleDBConnString += fileName;
|
||||
oleDBConnString += ";Extended Properties=Excel 8.0;";
|
||||
OleDbConnection oleDBConn = null;
|
||||
OleDbDataAdapter oleAdMaster = null;
|
||||
DataTable m_tableName = new DataTable();
|
||||
DataSet ds = new DataSet();
|
||||
|
||||
oleDBConn = new OleDbConnection(oleDBConnString);
|
||||
oleDBConn.Open();
|
||||
m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
|
||||
|
||||
if (m_tableName != null && m_tableName.Rows.Count > 0)
|
||||
{
|
||||
m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
|
||||
}
|
||||
string sqlMaster;
|
||||
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
|
||||
oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
|
||||
oleAdMaster.Fill(ds, "m_tableName");
|
||||
oleAdMaster.Dispose();
|
||||
oleDBConn.Close();
|
||||
oleDBConn.Dispose();
|
||||
|
||||
AddDatasetToSQL(ds.Tables[0]);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 将Dataset的数据导入数据库
|
||||
/// <summary>
|
||||
/// 将Dataset的数据导入数据库
|
||||
/// </summary>
|
||||
/// <param name="pds">数据集</param>
|
||||
/// <param name="Cols">数据集行数</param>
|
||||
/// <returns></returns>
|
||||
private bool AddDatasetToSQL(DataTable pds)
|
||||
{
|
||||
|
||||
string results = string.Empty;
|
||||
int ir = pds.Rows.Count;
|
||||
if (pds != null && ir > 0)
|
||||
{
|
||||
Model.WBS_WorkPackage workPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(WorkPackageId);
|
||||
var workPackageProjects = BLL.WorkPackageProjectService.GetWorkPackageProjects2ByWorkPackageCode(workPackage.InitWorkPackageCode, this.CurrUser.LoginProjectId);
|
||||
if (workPackage != null)
|
||||
{
|
||||
for (int i = 0; i < ir; i++)
|
||||
{
|
||||
string result = string.Empty;
|
||||
string col0 = pds.Rows[i][0].ToString().Trim();
|
||||
string col1 = pds.Rows[i][1].ToString().Trim();
|
||||
string col3 = pds.Rows[i][3].ToString().Trim();
|
||||
string col4 = pds.Rows[i][4].ToString().Trim();
|
||||
string col5 = pds.Rows[i][5].ToString().Trim();
|
||||
string col6 = pds.Rows[i][6].ToString().Trim();
|
||||
string col7 = pds.Rows[i][7].ToString().Trim();
|
||||
if (!string.IsNullOrEmpty(col0))
|
||||
{
|
||||
if (string.IsNullOrEmpty(col0))
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "导入项" + "," + "第二级为必填项!" + "|";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (BLL.WorkPackageService.GetWorkPackageByPackageContent(col0 + "-" + col1, UnitWorkId) == null) //数据库中不存在同样位号记录
|
||||
{
|
||||
Model.WBS_WorkPackage newWorkPackage = new Model.WBS_WorkPackage
|
||||
{
|
||||
WorkPackageId = SQLHelper.GetNewID(typeof(Model.WBS_WorkPackage)),
|
||||
|
||||
|
||||
};
|
||||
if (!string.IsNullOrEmpty(col1))
|
||||
{
|
||||
newWorkPackage.SuperWorkPack = col1;
|
||||
}
|
||||
foreach (var item in workPackageProjects)
|
||||
{
|
||||
if (col0 == item.PackageContent)
|
||||
{
|
||||
newWorkPackage.PackageContent = col0;
|
||||
newWorkPackage.WorkPackageCode = item.WorkPackageCode;
|
||||
}
|
||||
|
||||
}
|
||||
if (string.IsNullOrEmpty(newWorkPackage.PackageContent))
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "定制输入值有误!" + "|";
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(col3))
|
||||
{
|
||||
try
|
||||
{
|
||||
newWorkPackage.PlanProjectQuantity = Convert.ToDecimal(col3);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "概算工程量输入值有误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(col4))
|
||||
{
|
||||
try
|
||||
{
|
||||
newWorkPackage.DrawProjectQuantity = Convert.ToDecimal(col4);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "图纸工程量输入值有误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(col5))
|
||||
{
|
||||
try
|
||||
{
|
||||
newWorkPackage.RealProjectQuantity = Convert.ToDecimal(col5);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "实际工程量输入值有误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(col6))
|
||||
{
|
||||
try
|
||||
{
|
||||
newWorkPackage.PlanStartDate = Convert.ToDateTime(col6);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "计划开始时间输入值有误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(col7))
|
||||
{
|
||||
try
|
||||
{
|
||||
newWorkPackage.PlanEndDate = Convert.ToDateTime(col7);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "计划完成时间输入值有误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
ViewWorkPackages.Add(newWorkPackage);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
{
|
||||
results += result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(results))
|
||||
{
|
||||
results = "数据导入失败,未成功数据:" + results.Substring(0, results.LastIndexOf("|"));
|
||||
errorInfos = results;
|
||||
Alert.ShowInParent(results, MessageBoxIcon.Warning);
|
||||
}
|
||||
else
|
||||
{
|
||||
ViewWorkPackages = ViewWorkPackages.Distinct().ToList();
|
||||
this.Grid1.Hidden = false;
|
||||
this.Grid1.DataSource = ViewWorkPackages;
|
||||
this.Grid1.DataBind();
|
||||
errorInfos = string.Empty;
|
||||
ShowNotify("导入成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("导入数据为空!", MessageBoxIcon.Warning);
|
||||
}
|
||||
|
||||
BLL.UploadFileService.DeleteFile(Funs.RootPath, initPath + this.hdFileName.Text);
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 下载模板
|
||||
/// <summary>
|
||||
/// 下载模板按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDownLoad_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下载导入模板
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void PageManager1_CustomEvent(object sender, CustomEventArgs e)
|
||||
{
|
||||
if (e.EventArgument == "Confirm_OK")
|
||||
{
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string filePath = Const.WBSWorkPackageTemplate2Url;
|
||||
string uploadfilepath = rootPath + filePath;
|
||||
string fileName = Path.GetFileName(filePath);
|
||||
FileInfo info = new FileInfo(uploadfilepath);
|
||||
long fileSize = info.Length;
|
||||
Response.ClearContent();
|
||||
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
Response.ContentType = "excel/plain";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
Response.AddHeader("Content-Length", fileSize.ToString().Trim());
|
||||
Response.TransmitFile(uploadfilepath, 0, fileSize);
|
||||
Response.End();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// 保存数据
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this.fuAttachUrl.HasFile == false)
|
||||
{
|
||||
Alert.ShowInTop("请您选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower();
|
||||
if (IsXls != ".xls")
|
||||
{
|
||||
Alert.ShowInTop("只可以选择Excel文件!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (ViewWorkPackages != null)
|
||||
{
|
||||
ViewWorkPackages.Clear();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(errorInfos))
|
||||
{
|
||||
errorInfos = string.Empty;
|
||||
}
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string initFullPath = rootPath + initPath;
|
||||
if (!Directory.Exists(initFullPath))
|
||||
{
|
||||
Directory.CreateDirectory(initFullPath);
|
||||
}
|
||||
|
||||
this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls;
|
||||
string filePath = initFullPath + this.hdFileName.Text;
|
||||
this.fuAttachUrl.PostedFile.SaveAs(filePath);
|
||||
|
||||
ViewWorkPackages.Clear();
|
||||
string oleDBConnString = String.Empty;
|
||||
oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
|
||||
oleDBConnString += "Data Source=";
|
||||
oleDBConnString += rootPath + initPath + this.hdFileName.Text;
|
||||
oleDBConnString += ";Extended Properties=Excel 8.0;";
|
||||
OleDbConnection oleDBConn = null;
|
||||
OleDbDataAdapter oleAdMaster = null;
|
||||
DataTable m_tableName = new DataTable();
|
||||
DataSet ds = new DataSet();
|
||||
|
||||
oleDBConn = new OleDbConnection(oleDBConnString);
|
||||
oleDBConn.Open();
|
||||
m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
|
||||
|
||||
if (m_tableName != null && m_tableName.Rows.Count > 0)
|
||||
{
|
||||
m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
|
||||
}
|
||||
string sqlMaster;
|
||||
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
|
||||
oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
|
||||
oleAdMaster.Fill(ds, "m_tableName");
|
||||
oleAdMaster.Dispose();
|
||||
oleDBConn.Close();
|
||||
oleDBConn.Dispose();
|
||||
|
||||
DataTable pds = ds.Tables[0];
|
||||
string results = string.Empty;
|
||||
int ir = pds.Rows.Count;
|
||||
if (pds != null && ir > 0)
|
||||
{
|
||||
Model.WBS_WorkPackage workPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(WorkPackageId);
|
||||
var workPackageProjects = BLL.WorkPackageProjectService.GetWorkPackageProjects2ByWorkPackageCode(workPackage.InitWorkPackageCode, this.CurrUser.LoginProjectId);
|
||||
if (workPackage != null)
|
||||
{
|
||||
for (int i = 0; i < ir; i++)
|
||||
{
|
||||
string result = string.Empty;
|
||||
string col0 = pds.Rows[i][0].ToString().Trim();
|
||||
string col1 = pds.Rows[i][1].ToString().Trim();
|
||||
string col2 = pds.Rows[i][2].ToString().Trim();
|
||||
string col3 = pds.Rows[i][3].ToString().Trim();
|
||||
string col4 = pds.Rows[i][4].ToString().Trim();
|
||||
string col5 = pds.Rows[i][5].ToString().Trim();
|
||||
string col6 = pds.Rows[i][6].ToString().Trim();
|
||||
string col7 = pds.Rows[i][7].ToString().Trim();
|
||||
if (!string.IsNullOrEmpty(col0))
|
||||
{
|
||||
if (string.IsNullOrEmpty(col0))
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "导入项" + "," + "第二级为必填项!" + "|";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (BLL.WorkPackageService.GetWorkPackageByPackageContent(col0 + "-" + col1, UnitWorkId) == null) //数据库中不存在同样位号记录
|
||||
{
|
||||
Model.WBS_WorkPackage newWorkPackage = new Model.WBS_WorkPackage
|
||||
{
|
||||
WorkPackageId = SQLHelper.GetNewID(typeof(Model.WBS_WorkPackage)),
|
||||
|
||||
|
||||
};
|
||||
if (!string.IsNullOrEmpty(col1))
|
||||
{
|
||||
newWorkPackage.SuperWorkPack = col1;
|
||||
}
|
||||
foreach (var item in workPackageProjects)
|
||||
{
|
||||
if (col0 == item.PackageContent)
|
||||
{
|
||||
newWorkPackage.PackageContent = col0;
|
||||
newWorkPackage.WorkPackageCode = item.WorkPackageCode;
|
||||
}
|
||||
|
||||
}
|
||||
if (string.IsNullOrEmpty(newWorkPackage.PackageContent))
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "定制输入值有误!" + "|";
|
||||
}
|
||||
|
||||
newWorkPackage.Unit = col2;
|
||||
|
||||
if (!string.IsNullOrEmpty(col3))
|
||||
{
|
||||
try
|
||||
{
|
||||
newWorkPackage.PlanProjectQuantity = Convert.ToDecimal(col3);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "概算工程量输入值有误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(col4))
|
||||
{
|
||||
try
|
||||
{
|
||||
newWorkPackage.DrawProjectQuantity = Convert.ToDecimal(col4);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "图纸工程量输入值有误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(col5))
|
||||
{
|
||||
try
|
||||
{
|
||||
newWorkPackage.RealProjectQuantity = Convert.ToDecimal(col5);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "实际工程量输入值有误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(col6))
|
||||
{
|
||||
try
|
||||
{
|
||||
newWorkPackage.PlanStartDate = Convert.ToDateTime(col6);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "计划开始时间输入值有误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(col7))
|
||||
{
|
||||
try
|
||||
{
|
||||
newWorkPackage.PlanEndDate = Convert.ToDateTime(col7);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "计划完成时间输入值有误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
ViewWorkPackages.Add(newWorkPackage);
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
{
|
||||
results += result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(results))
|
||||
{
|
||||
results = "数据导入失败,未成功数据:" + results.Substring(0, results.LastIndexOf("|"));
|
||||
errorInfos = results;
|
||||
Alert.ShowInParent(results, MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
ViewWorkPackages = ViewWorkPackages.Distinct().ToList();
|
||||
this.Grid1.Hidden = false;
|
||||
this.Grid1.DataSource = ViewWorkPackages;
|
||||
this.Grid1.DataBind();
|
||||
errorInfos = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("导入数据为空!", MessageBoxIcon.Warning);
|
||||
}
|
||||
BLL.UploadFileService.DeleteFile(Funs.RootPath, initPath + this.hdFileName.Text);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string workPackageCode = string.Empty;
|
||||
int num = 1;
|
||||
string code = string.Empty;
|
||||
Model.WBS_WorkPackage parentWorkPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(WorkPackageId);
|
||||
foreach (JObject mergedRow in Grid1.GetMergedData())
|
||||
{
|
||||
JObject values = mergedRow.Value<JObject>("values");
|
||||
int i = mergedRow.Value<int>("index");
|
||||
string workPackageId = this.Grid1.Rows[i].DataKeys[0].ToString();
|
||||
Model.WBS_WorkPackage oldWorkPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(workPackageId);
|
||||
string workPackageCode2 = this.Grid1.Rows[i].DataKeys[1].ToString();
|
||||
string txtName = values.Value<string>("SuperWorkPack");
|
||||
string Unit = values.Value<string>("Unit");
|
||||
string PlanProjectQuantity = values.Value<string>("PlanProjectQuantity");
|
||||
string DrawProjectQuantity = values.Value<string>("DrawProjectQuantity");
|
||||
string RealProjectQuantity = values.Value<string>("RealProjectQuantity");
|
||||
string PlanStartDate = values.Value<string>("PlanStartDate");
|
||||
string PlanEndDate = values.Value<string>("PlanEndDate");
|
||||
Model.WBS_WorkPackageProject workPackageProject = BLL.WorkPackageProjectService.GetWorkPackageProjectByWorkPackageCode(workPackageCode2, this.CurrUser.LoginProjectId);
|
||||
if (oldWorkPackage == null) //新增内容
|
||||
{
|
||||
if (BLL.WorkPackageService.GetWorkPackageByPackageContent(workPackageProject.PackageContent + "-" + txtName, UnitWorkId) == null) //数据库中不存在同样位号记录
|
||||
{
|
||||
Model.WBS_WorkPackage newWorkPackage = new Model.WBS_WorkPackage();
|
||||
if (workPackageCode != workPackageProject.WorkPackageCode) //循环至新的分部
|
||||
{
|
||||
workPackageCode = workPackageProject.WorkPackageCode;
|
||||
var oldWorkPackages = BLL.WorkPackageService.GetWorkPackagesByInitWorkPackageCodeAndUnitWorkId(workPackageCode, UnitWorkId);
|
||||
if (oldWorkPackages.Count > 0) //该工作包已存在内容
|
||||
{
|
||||
var old = oldWorkPackages.First();
|
||||
string oldStr = old.WorkPackageCode.Substring(old.WorkPackageCode.Length - 2);
|
||||
num = Convert.ToInt32(oldStr) + 1;
|
||||
if (num < 10)
|
||||
{
|
||||
code = "0" + num.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
code = num.ToString();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
num = 1;
|
||||
code = "01";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (num < 10)
|
||||
{
|
||||
code = "0" + num.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
code = num.ToString();
|
||||
}
|
||||
}
|
||||
newWorkPackage.WorkPackageId = SQLHelper.GetNewID(typeof(Model.WBS_WorkPackage));
|
||||
newWorkPackage.WorkPackageCode = parentWorkPackage.WorkPackageCode + workPackageCode.Substring(workPackageCode.IndexOf(parentWorkPackage.InitWorkPackageCode) + parentWorkPackage.InitWorkPackageCode.Length).Replace("00", "0000") + code;
|
||||
newWorkPackage.ProjectId = this.CurrUser.LoginProjectId;
|
||||
newWorkPackage.UnitWorkId = UnitWorkId;
|
||||
newWorkPackage.PackageContent = workPackageProject.PackageContent + "-" + txtName;
|
||||
newWorkPackage.SuperWorkPack = workPackageProject.SuperWorkPack;
|
||||
newWorkPackage.SuperWorkPackageId = WorkPackageId;
|
||||
newWorkPackage.PackageCode = workPackageProject.PackageCode;
|
||||
newWorkPackage.ProjectType = workPackageProject.ProjectType;
|
||||
newWorkPackage.InitWorkPackageCode = workPackageProject.WorkPackageCode;
|
||||
newWorkPackage.IsApprove = true;
|
||||
newWorkPackage.Unit = Unit;
|
||||
newWorkPackage.PlanProjectQuantity = Funs.GetNewDecimal(PlanProjectQuantity);
|
||||
newWorkPackage.DrawProjectQuantity = Funs.GetNewDecimal(DrawProjectQuantity);
|
||||
newWorkPackage.RealProjectQuantity = Funs.GetNewDecimal(RealProjectQuantity);
|
||||
newWorkPackage.PlanStartDate = Funs.GetNewDateTime(PlanStartDate);
|
||||
newWorkPackage.PlanEndDate = Funs.GetNewDateTime(PlanEndDate);
|
||||
BLL.WorkPackageService.AddWorkPackage(newWorkPackage);
|
||||
num++;
|
||||
}
|
||||
}
|
||||
}
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.WBS {
|
||||
|
||||
|
||||
public partial class WorkPackageSet2In2 {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// btnAudit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAudit;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnDownLoad 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDownLoad;
|
||||
|
||||
/// <summary>
|
||||
/// fuAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FileUpload fuAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// txtName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtName;
|
||||
|
||||
/// <summary>
|
||||
/// hdFileName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdFileName;
|
||||
|
||||
/// <summary>
|
||||
/// hdCheckResult 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdCheckResult;
|
||||
|
||||
/// <summary>
|
||||
/// hdTotalValue 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdTotalValue;
|
||||
|
||||
/// <summary>
|
||||
/// lblBottom 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lblBottom;
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -307,6 +307,7 @@
|
||||
<Content Include="common\mainMenu_DigitalSite.aspx" />
|
||||
<Content Include="common\mainMenu_HJGL.aspx" />
|
||||
<Content Include="common\mainMenu_HJGL2.aspx" />
|
||||
<Content Include="common\mainMenu_HJGL3.aspx" />
|
||||
<Content Include="common\mainMenu_HJGL_AVEVA.aspx" />
|
||||
<Content Include="common\mainMenu_HSSE2.aspx" />
|
||||
<Content Include="common\mainMenu_PDigData.aspx" />
|
||||
@@ -491,6 +492,7 @@
|
||||
<Content Include="CQMS\WBS\WorkPackageSet1.aspx" />
|
||||
<Content Include="CQMS\WBS\WorkPackageSet2.aspx" />
|
||||
<Content Include="CQMS\WBS\WorkPackageSet2In.aspx" />
|
||||
<Content Include="CQMS\WBS\WorkPackageSet2In2.aspx" />
|
||||
<Content Include="DataShow\Accident.aspx" />
|
||||
<Content Include="DataShow\Check.aspx" />
|
||||
<Content Include="DataShow\CompanyPerson.aspx" />
|
||||
@@ -657,6 +659,7 @@
|
||||
<Content Include="HJGL\PointTrust\PointAudit.aspx" />
|
||||
<Content Include="HJGL\PointTrust\PointBatch.aspx" />
|
||||
<Content Include="HJGL\PointTrust\PointTrust.aspx" />
|
||||
<Content Include="HJGL\PointTrust\PointWeldJointView.aspx" />
|
||||
<Content Include="HJGL\PointTrust\TrustBatch.aspx" />
|
||||
<Content Include="HJGL\PreDesign\MaterialManage.aspx" />
|
||||
<Content Include="HJGL\PreDesign\MaterialManageEdit.aspx" />
|
||||
@@ -720,6 +723,7 @@
|
||||
<Content Include="HJGL\WeldingManage\WeldReport.aspx" />
|
||||
<Content Include="HJGL\WeldingManage\WeldReportEdit.aspx" />
|
||||
<Content Include="HJGL\WeldingManage\WeldTask.aspx" />
|
||||
<Content Include="HJGL\WeldingReport\CheckResult.aspx" />
|
||||
<Content Include="HJGL\WeldingReport\DefectStatistics.aspx" />
|
||||
<Content Include="HJGL\WeldingReport\FirstPassRate.aspx" />
|
||||
<Content Include="HJGL\WeldingReport\IsoCmprehensive.aspx" />
|
||||
@@ -6278,6 +6282,13 @@
|
||||
<Compile Include="common\mainMenu_HJGL2.aspx.designer.cs">
|
||||
<DependentUpon>mainMenu_HJGL2.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="common\mainMenu_HJGL3.aspx.cs">
|
||||
<DependentUpon>mainMenu_HJGL3.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="common\mainMenu_HJGL3.aspx.designer.cs">
|
||||
<DependentUpon>mainMenu_HJGL3.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="common\mainMenu_HJGL_AVEVA.aspx.cs">
|
||||
<DependentUpon>mainMenu_HJGL_AVEVA.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -7391,6 +7402,13 @@
|
||||
<Compile Include="CQMS\WBS\WorkPackageSet2In.aspx.designer.cs">
|
||||
<DependentUpon>WorkPackageSet2In.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\WBS\WorkPackageSet2In2.aspx.cs">
|
||||
<DependentUpon>WorkPackageSet2In2.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\WBS\WorkPackageSet2In2.aspx.designer.cs">
|
||||
<DependentUpon>WorkPackageSet2In2.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DataShow\Accident.aspx.cs">
|
||||
<DependentUpon>Accident.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -8525,6 +8543,13 @@
|
||||
<Compile Include="HJGL\PointTrust\PointTrust.aspx.designer.cs">
|
||||
<DependentUpon>PointTrust.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\PointTrust\PointWeldJointView.aspx.cs">
|
||||
<DependentUpon>PointWeldJointView.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\PointTrust\PointWeldJointView.aspx.designer.cs">
|
||||
<DependentUpon>PointWeldJointView.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\PointTrust\TrustBatch.aspx.cs">
|
||||
<DependentUpon>TrustBatch.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -8969,6 +8994,13 @@
|
||||
<Compile Include="HJGL\WeldingManage\WeldTask.aspx.designer.cs">
|
||||
<DependentUpon>WeldTask.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\WeldingReport\CheckResult.aspx.cs">
|
||||
<DependentUpon>CheckResult.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\WeldingReport\CheckResult.aspx.designer.cs">
|
||||
<DependentUpon>CheckResult.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="HJGL\WeldingReport\DefectStatistics.aspx.cs">
|
||||
<DependentUpon>DefectStatistics.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
@@ -114,6 +114,9 @@
|
||||
<f:RenderField HeaderText="单位名称" ColumnID="UnitName" DataField="UnitName"
|
||||
SortField="UnitName" FieldType="String" HeaderTextAlign="Center" Width="180px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="流水段" ColumnID="FlowingSection" DataField="FlowingSection"
|
||||
SortField="FlowingSection" FieldType="String" HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<%--<f:RenderField HeaderText="单位工程" ColumnID="UnitWorkCode" DataField="UnitWorkCode"
|
||||
SortField="UnitWorkCode" FieldType="String" HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>--%>
|
||||
@@ -161,11 +164,11 @@
|
||||
<f:RenderField HeaderText="坡口类型" ColumnID="GrooveTypeCode" DataField="GrooveTypeCode"
|
||||
SortField="GrooveTypeCode" FieldType="String" HeaderTextAlign="Center" Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊条" ColumnID="WeldingRod" DataField="WeldingRod"
|
||||
SortField="WeldingRod" FieldType="String" HeaderTextAlign="Center" Width="90px">
|
||||
<f:RenderField HeaderText="焊条" ColumnID="WeldingRodCode" DataField="WeldingRodCode"
|
||||
SortField="WeldingRodCode" FieldType="String" HeaderTextAlign="Center" Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊丝" ColumnID="WeldingWire" DataField="WeldingWire"
|
||||
SortField="WeldingWire" FieldType="String" HeaderTextAlign="Center" Width="90px">
|
||||
<f:RenderField HeaderText="焊丝" ColumnID="WeldingWireCode" DataField="WeldingWireCode"
|
||||
SortField="WeldingWireCode" FieldType="String" HeaderTextAlign="Center" Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="预热温度" ColumnID="PreTemperature"
|
||||
DataField="PreTemperature" SortField="PreTemperature" FieldType="String"
|
||||
|
||||
@@ -493,6 +493,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
{
|
||||
焊口号 = x.WeldJointCode,
|
||||
单位名称 = x.UnitName,
|
||||
流水段 = x.FlowingSection,
|
||||
材质1 = x.Material1Code,
|
||||
材质2 = x.Material2Code,
|
||||
达因 = x.Size,
|
||||
@@ -503,8 +504,8 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
焊接方法 = x.WeldingMethodCode,
|
||||
WPS编号 = x.WPQCode,
|
||||
坡口类型 = x.GrooveTypeCode,
|
||||
焊条 = x.WeldingRod,
|
||||
焊丝 = x.WeldingWire,
|
||||
焊条 = x.WeldingRodCode,
|
||||
焊丝 = x.WeldingWireCode,
|
||||
预热温度 = x.PreTemperature,
|
||||
焊口属性 = x.JointAttribute,
|
||||
焊接日期 = x.WeldingDate,
|
||||
@@ -544,8 +545,10 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
{
|
||||
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
||||
{
|
||||
var q = (from x in Funs.DB.View_HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == this.tvControlItem.SelectedNodeID
|
||||
select new {
|
||||
var q = (from x in Funs.DB.View_HJGL_WeldJoint
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == this.tvControlItem.SelectedNodeID
|
||||
select new
|
||||
{
|
||||
PipelineId = x.PipelineId,
|
||||
WeldingDate = x.WeldingDate,
|
||||
WeldJointCode = x.WeldJointCode,
|
||||
@@ -562,9 +565,12 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
var Noweldjoint = (from x in q
|
||||
join y in noCompipeline on x.PipelineId equals y.PipelineId
|
||||
where y.Count == 0
|
||||
select new { 焊口号=x.WeldJointCode ,
|
||||
select new
|
||||
{
|
||||
焊口号 = x.WeldJointCode,
|
||||
管线号 = x.PipelineCode,
|
||||
达因=x.Size}).ToList();
|
||||
达因 = x.Size
|
||||
}).ToList();
|
||||
|
||||
string path = Funs.RootPath + @"File\Excel\Temp\NoCompleteWeldjoint.xlsx";
|
||||
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx");
|
||||
|
||||
@@ -25,14 +25,21 @@
|
||||
<Items>
|
||||
<f:DatePicker ID="txtNDEDateMonth" runat="server" Label="月份"
|
||||
EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="Tree_TextChanged"
|
||||
Width="265px" LabelWidth="100px" DisplayType="Month" DateFormatString="yyyy-MM" LabelAlign="Right">
|
||||
Width="265px" LabelWidth="90px" DisplayType="Month" DateFormatString="yyyy-MM" LabelAlign="Right">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnit" runat="server" Label="单位名称"
|
||||
LabelAlign="Right" Width="300px" LabelWidth="90px" AutoPostBack="true" OnSelectedIndexChanged="Tree_TextChanged">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar5" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox ID="txtSearchCode" runat="server" EmptyText="输入查询条件"
|
||||
AutoPostBack="true" Label="委托单号" LabelWidth="100px"
|
||||
AutoPostBack="true" Label="委托单号" LabelWidth="90px"
|
||||
OnTextChanged="Tree_TextChanged" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
|
||||
@@ -53,6 +53,7 @@ namespace FineUIPro.Web.HJGL.NDT
|
||||
{
|
||||
GetButtonPower();
|
||||
this.Type = Request.Params["Type"];
|
||||
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);
|
||||
this.txtNDEDateMonth.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
|
||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
this.TrustBatchId = string.Empty;
|
||||
@@ -264,6 +265,10 @@ namespace FineUIPro.Web.HJGL.NDT
|
||||
&& x.DetectionTypeId == ndtTypeId && x.DetectionRateId == item.DetectionRateId
|
||||
orderby x.TrustBatchCode descending
|
||||
select x;
|
||||
if (this.drpUnit.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
trusts = trusts.Where(x => x.UnitId == this.drpUnit.SelectedValue).OrderBy(x => x.TrustBatchCode);
|
||||
}
|
||||
if (item.DetectionRateValue > 0) //探伤比例为0的批不显示
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
@@ -300,6 +305,10 @@ namespace FineUIPro.Web.HJGL.NDT
|
||||
&& x.DetectionTypeId == ndtTypeId && x.DetectionRateId == ndtRateId
|
||||
orderby x.TrustBatchCode descending
|
||||
select x;
|
||||
if (this.drpUnit.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
trusts = trusts.Where(x => x.UnitId == this.drpUnit.SelectedValue).OrderBy(x => x.TrustBatchCode);
|
||||
}
|
||||
foreach (var trust in trusts)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
@@ -318,11 +327,11 @@ namespace FineUIPro.Web.HJGL.NDT
|
||||
Model.HJGL_Batch_PointBatch batch = BLL.PointBatchService.GetPointBatchById(trust.PointBatchId);
|
||||
if (batch != null && batch.IsClosed == true)
|
||||
{
|
||||
newNode.Text = code;
|
||||
newNode.Text = code + "【" + BLL.UnitService.GetUnitNameByUnitId(trust.UnitId) + "】";
|
||||
}
|
||||
else
|
||||
{
|
||||
newNode.Text = "<font color='#EE0000'>" + code + "</font>";
|
||||
newNode.Text = "<font color='#EE0000'>" + code + "【" + BLL.UnitService.GetUnitNameByUnitId(trust.UnitId) + "】" + "</font>";
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -66,6 +66,24 @@ namespace FineUIPro.Web.HJGL.NDT {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtNDEDateMonth;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar3;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnit;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar5 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -39,6 +39,15 @@
|
||||
EmptyText="输入查询条件" Width="190px" LabelWidth="80px"
|
||||
LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar4" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox ID="txtName" runat="server" Label="焊工姓名"
|
||||
EmptyText="输入查询条件" Width="190px" LabelWidth="80px"
|
||||
LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
<f:Button ID="btnQuery" ToolTip="查询" Icon="SystemSearch"
|
||||
EnablePostBack="true" OnClick="btnQuery_Click1" runat="server">
|
||||
</f:Button>
|
||||
|
||||
@@ -37,9 +37,9 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
Model.SitePerson_Person welder = BLL.SitePerson_PersonService.GetSitePersonByProjectIdPersonId(this.CurrUser.LoginProjectId, this.tvControlItem.SelectedNodeID);
|
||||
if (welder != null)
|
||||
{
|
||||
this.btnEdit.Hidden = false;
|
||||
this.btnNew.Hidden = false;
|
||||
this.btnDelete.Hidden = false;
|
||||
//this.btnEdit.Hidden = false;
|
||||
//this.btnNew.Hidden = false;
|
||||
//this.btnDelete.Hidden = false;
|
||||
this.txtWelderCode.Text = welder.WelderCode;
|
||||
this.txtWelderName.Text = welder.PersonName;
|
||||
|
||||
@@ -191,7 +191,15 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
rootNode.Text = item.UnitName;
|
||||
rootNode.EnableClickEvent = true;
|
||||
this.tvControlItem.Nodes.Add(rootNode);
|
||||
var getWelders = (from x in Funs.DB.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkPostId == Const.WorkPost_Welder && x.UnitId == item.UnitId && x.WelderCode.Contains(txtQueryWelderCode.Text.Trim()) select x).ToList();
|
||||
var getWelders = (from x in Funs.DB.SitePerson_Person where x.ProjectId == this.CurrUser.LoginProjectId && x.WorkPostId == Const.WorkPost_Welder && x.UnitId == item.UnitId select x).ToList();
|
||||
if (!string.IsNullOrEmpty(txtQueryWelderCode.Text.Trim()))
|
||||
{
|
||||
getWelders = getWelders.Where(x => x.WelderCode.Contains(txtQueryWelderCode.Text.Trim())).ToList();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtName.Text.Trim()))
|
||||
{
|
||||
getWelders = getWelders.Where(x => x.PersonName.Contains(txtName.Text.Trim())).ToList();
|
||||
}
|
||||
foreach (var sitem in getWelders)
|
||||
{
|
||||
TreeNode tn = new TreeNode();
|
||||
|
||||
@@ -7,12 +7,10 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.PersonManage
|
||||
{
|
||||
namespace FineUIPro.Web.HJGL.PersonManage {
|
||||
|
||||
|
||||
public partial class WelderManage
|
||||
{
|
||||
public partial class WelderManage {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -68,6 +66,24 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtQueryWelderCode;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar4;
|
||||
|
||||
/// <summary>
|
||||
/// txtName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtName;
|
||||
|
||||
/// <summary>
|
||||
/// btnQuery 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -130,7 +130,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
{
|
||||
string PersonId = Request.Params["PersonId"];
|
||||
var q = Funs.DB.SitePerson_Person.FirstOrDefault(x => x.WelderCode == this.txtWelderCode.Text.Trim()
|
||||
&& (x.PersonId != PersonId || (PersonId == null && PersonId != null)));
|
||||
&& (x.PersonId != PersonId || (PersonId == null && PersonId != null)) && x.ProjectId == this.CurrUser.LoginProjectId);
|
||||
if (q != null)
|
||||
{
|
||||
Alert.ShowInTop("焊工号已经存在!", MessageBoxIcon.Warning);
|
||||
@@ -178,7 +178,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
// newWelder.IsUsed = true;
|
||||
if (!string.IsNullOrEmpty(PersonId))
|
||||
{
|
||||
if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text))
|
||||
if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text, this.CurrUser.LoginProjectId))
|
||||
{
|
||||
newWelder.PersonId = PersonId;
|
||||
BLL.WelderService.UpdateWelder(newWelder);
|
||||
@@ -192,7 +192,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
else
|
||||
{
|
||||
PersonId = SQLHelper.GetNewID(typeof(Model.SitePerson_Person));
|
||||
if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text))
|
||||
if (!BLL.WelderService.IsExisWelderCode(PersonId, this.txtWelderCode.Text, this.CurrUser.LoginProjectId))
|
||||
{
|
||||
newWelder.PersonId = PersonId;
|
||||
// BLL.WelderService.AddWelder(newWelder);
|
||||
|
||||
@@ -29,6 +29,13 @@
|
||||
EnableCollapse="true" Width="300px" Title="点口管理" ShowBorder="true" Layout="VBox"
|
||||
ShowHeader="false" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnit" runat="server" Label="单位名称"
|
||||
LabelAlign="Right" Width="300px" LabelWidth="90px" AutoPostBack="true" OnSelectedIndexChanged="Tree_TextChanged">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar4" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox ID="txtWelderCode" runat="server" EmptyText="输入查询条件"
|
||||
@@ -126,6 +133,8 @@
|
||||
</f:Label>
|
||||
<f:Label ID="lbPointJointNum2" Label="已检测焊口数" runat="server" LabelAlign="Right" LabelWidth="120px">
|
||||
</f:Label>
|
||||
<f:Button ID="btnShow" Text="已检测口明细" Icon="ApplicationViewIcons" runat="server" OnClick="btnShow_Click">
|
||||
</f:Button>
|
||||
<f:Label ID="lbLastJointNum2" Label="尚需检测焊口数" runat="server" LabelAlign="Right" LabelWidth="130px">
|
||||
</f:Label>
|
||||
</Items>
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);
|
||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
this.txtStartTime.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
|
||||
this.InitTreeMenu();//加载树
|
||||
@@ -245,7 +246,10 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
{
|
||||
pointManages = pointManages.Where(x => x.WelderCode.Contains(this.txtWelderCode.Text.Trim()));
|
||||
}
|
||||
|
||||
if (this.drpUnit.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
pointManages = pointManages.Where(x => x.UnitId == this.drpUnit.SelectedValue);
|
||||
}
|
||||
|
||||
|
||||
foreach (var item in pointManages)
|
||||
@@ -275,19 +279,19 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
string code = "DK-" + item.PointBatchCode.Substring(item.PointBatchCode.Length - 4) + PipeArea;
|
||||
if (!item.EndDate.HasValue) ////批 没有关闭 粉色
|
||||
{
|
||||
newNode.Text = "<font color='#FA58D0'>" + code +"【"+startdate + "】"+"</font>";
|
||||
newNode.Text = "<font color='#FA58D0'>" + code + "【" + startdate + "】" + "【" + item.UnitName + "】" + "</font>";
|
||||
newNode.ToolTip = "批尚未关闭";
|
||||
}
|
||||
// 当天批
|
||||
else if (string.Format("{0:yyyy-MM-dd}", item.StartDate) == string.Format("{0:yyyy-MM-dd}", System.DateTime.Now)
|
||||
|| string.Format("{0:yyyy-MM-dd}", item.EndDate) == string.Format("{0:yyyy-MM-dd}", System.DateTime.Now))
|
||||
{
|
||||
newNode.Text = "<font color='#EE0000'>" + code + "【" + startdate + "】" + "</font>";
|
||||
newNode.Text = "<font color='#EE0000'>" + code + "【" + startdate + "】" + "【" + item.UnitName + "】" + "</font>";
|
||||
newNode.ToolTip = "当天批";
|
||||
}
|
||||
else
|
||||
{
|
||||
newNode.Text = code+ "【" + startdate + "】";
|
||||
newNode.Text = code + "【" + startdate + "】" + "【" + item.UnitName + "】";
|
||||
}
|
||||
e.Node.Nodes.Add(newNode);
|
||||
|
||||
@@ -643,8 +647,103 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Grid1.SelectedRowID))
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var weldJoint = (from x in db.HJGL_WeldJoint
|
||||
join y in db.HJGL_Batch_PointBatchItem on x.WeldJointId equals y.WeldJointId
|
||||
where y.PointBatchItemId == Grid1.SelectedRowID
|
||||
select x).FirstOrDefault();
|
||||
Model.Project_Sys_Set batchSet = BLL.Project_SysSetService.GetSysSetBySetId("5", this.CurrUser.LoginProjectId);
|
||||
if (batchSet != null && weldJoint != null)
|
||||
{
|
||||
int needJointNum = 0;
|
||||
int pointNumG = 0;
|
||||
int pointNumA = 0;
|
||||
if (batchSet.SetValue.Contains("6")) //按管线组批
|
||||
{
|
||||
var pipeline = (from x in db.HJGL_Pipeline
|
||||
join y in db.HJGL_WeldJoint on x.PipelineId equals y.PipelineId
|
||||
join z in db.HJGL_Batch_PointBatchItem on y.WeldJointId equals z.WeldJointId
|
||||
where z.PointBatchId == this.PointBatchId
|
||||
select x).FirstOrDefault();
|
||||
if (pipeline != null)
|
||||
{
|
||||
this.lbPipelineCode.Text = pipeline.PipelineCode;
|
||||
Model.Base_DetectionRate rate = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(pipeline.DetectionRateId);
|
||||
if (rate != null)
|
||||
{
|
||||
int totalJointCount = db.HJGL_WeldJoint.Count(x => x.PipelineId == pipeline.PipelineId);
|
||||
needJointNum = Convert.ToInt32(Math.Ceiling((totalJointCount * rate.DetectionRateValue.Value) * 0.01));
|
||||
// 安装口检测数量
|
||||
pointNumG = Convert.ToInt32(Math.Ceiling(needJointNum * 0.4));
|
||||
// 预制口要检测的数量
|
||||
pointNumA = needJointNum - pointNumG;
|
||||
var pointGNum = (from x in db.HJGL_Batch_PointBatchItem
|
||||
join y in db.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
|
||||
where y.PipelineId == pipeline.PipelineId && x.PointState == "1" && y.JointAttribute == "安装口"
|
||||
select x).Count();
|
||||
var pointNotGNum = (from x in db.HJGL_Batch_PointBatchItem
|
||||
join y in db.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
|
||||
where y.PipelineId == pipeline.PipelineId && x.PointState == "1" && y.JointAttribute == "预制口"
|
||||
select x).Count();
|
||||
if (weldJoint.JointAttribute == "安装口" && pointGNum >= pointNumG)
|
||||
{
|
||||
Alert.ShowInTop("安装口已达检测标准,无需再点此安装口!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (weldJoint.JointAttribute == "预制口" && pointNotGNum >= pointNumA)
|
||||
{
|
||||
Alert.ShowInTop("预制口已达检测标准,无需再点此预制口!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else //不按管线组批
|
||||
{
|
||||
string unitWorkId = this.tvControlItem.SelectedNode.ParentNode.ParentNode.ParentNode.NodeID;
|
||||
string rateId = this.tvControlItem.SelectedNode.ParentNode.NodeID.Split('|')[0];
|
||||
string detectionType = this.tvControlItem.SelectedNode.ParentNode.ParentNode.NodeID.Split('|')[0];
|
||||
int totalJointNum = (from x in db.HJGL_WeldJoint
|
||||
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
|
||||
where y.DetectionRateId == rateId && y.UnitWorkId == unitWorkId && y.DetectionType == detectionType
|
||||
select x).Count();
|
||||
Model.Base_DetectionRate rate = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(rateId);
|
||||
if (rate != null)
|
||||
{
|
||||
needJointNum = Convert.ToInt32(Math.Ceiling((totalJointNum * rate.DetectionRateValue.Value) * 0.01));
|
||||
// 安装口检测数量
|
||||
pointNumG = Convert.ToInt32(Math.Ceiling(needJointNum * 0.4));
|
||||
// 预制口要检测的数量
|
||||
pointNumA = needJointNum - pointNumG;
|
||||
var pointGNum = (from x in db.HJGL_Batch_PointBatchItem
|
||||
join y in db.HJGL_Batch_PointBatch on x.PointBatchId equals y.PointBatchId
|
||||
join z in db.HJGL_WeldJoint on x.WeldJointId equals z.WeldJointId
|
||||
where y.DetectionRateId == rateId && y.UnitWorkId == unitWorkId && y.DetectionTypeId == detectionType
|
||||
&& x.PointState == "1" && z.JointAttribute == "安装口"
|
||||
select x).Count();
|
||||
var pointNotGNum = (from x in db.HJGL_Batch_PointBatchItem
|
||||
join y in db.HJGL_Batch_PointBatch on x.PointBatchId equals y.PointBatchId
|
||||
join z in db.HJGL_WeldJoint on x.WeldJointId equals z.WeldJointId
|
||||
where y.DetectionRateId == rateId && y.UnitWorkId == unitWorkId && y.DetectionTypeId == detectionType
|
||||
&& x.PointState == "1" && z.JointAttribute == "预制口"
|
||||
select x).Count();
|
||||
if (weldJoint.JointAttribute == "安装口" && pointGNum >= pointNumG)
|
||||
{
|
||||
Alert.ShowInTop("安装口已达检测标准,无需再点此安装口!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (weldJoint.JointAttribute == "预制口" && pointNotGNum >= pointNumA)
|
||||
{
|
||||
Alert.ShowInTop("预制口已达检测标准,无需再点此预制口!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
PointBatchDetailService.UpdatePointBatchDetail(Grid1.SelectedRowID, "1", System.DateTime.Now);
|
||||
this.BindGrid();
|
||||
tvControlItem_NodeCommand(null, null);
|
||||
Alert.ShowInTop("已成功点口!", MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
@@ -889,5 +988,18 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
|
||||
return newTrustCode;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 已检测口明细
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnShow_Click(object sender, EventArgs e)
|
||||
{
|
||||
string unitWorkId = this.tvControlItem.SelectedNode.ParentNode.ParentNode.ParentNode.NodeID;
|
||||
string rateId = this.tvControlItem.SelectedNode.ParentNode.NodeID.Split('|')[0];
|
||||
string detectionType = this.tvControlItem.SelectedNode.ParentNode.ParentNode.NodeID.Split('|')[0];
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PointWeldJointView.aspx?unitWorkId={0}&rateId={1}&detectionType={2}", unitWorkId, rateId, detectionType, "新增 - ")));
|
||||
}
|
||||
}
|
||||
}
|
||||
+29
-4
@@ -7,12 +7,10 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.PointTrust
|
||||
{
|
||||
namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
|
||||
|
||||
public partial class PointBatch
|
||||
{
|
||||
public partial class PointBatch {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -50,6 +48,24 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnit;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar4 控件。
|
||||
/// </summary>
|
||||
@@ -302,6 +318,15 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbPointJointNum2;
|
||||
|
||||
/// <summary>
|
||||
/// btnShow 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnShow;
|
||||
|
||||
/// <summary>
|
||||
/// lbLastJointNum2 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PointWeldJointView.aspx.cs" Inherits="FineUIPro.Web.HJGL.PointTrust.PointWeldJointView" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="点口管理" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="PointBatchItemId" AllowCellEditing="true"
|
||||
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="PointBatchItemId"
|
||||
AllowSorting="true" SortField="PipelineCode,WeldJointCode" SortDirection="ASC"
|
||||
OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="20"
|
||||
OnPageIndexChange="Grid1_PageIndexChange" EnableTextSelection="True" Height="500px">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="txtpipelinecode" Label ="管线号" LabelWidth="100px" LabelAlign="Right"> </f:TextBox>
|
||||
<f:Button ID="btnQuery" Text="查询" ToolTip="查询" Icon="SystemSearch" runat="server"
|
||||
OnClick="btnQuery_Click">
|
||||
</f:Button>
|
||||
<f:Label runat="server" Label="已检测口明细" ID="lbDef" LabelWidth="120px" LabelAlign="Right"></f:Label>
|
||||
<f:Label runat="server" Label="尚需检测口数量" ID="lbNeedDef" LabelWidth="120px" LabelAlign="Right"></f:Label>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号"
|
||||
Width="45px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField HeaderText="管线号" ColumnID="PipelineCode" DataField="PipelineCode"
|
||||
SortField="PipelineCode" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="220px" Locked="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊口代号" ColumnID="WeldJointCode" DataField="WeldJointCode"
|
||||
SortField="WeldJointCode" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="80px" Locked="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊接日期" ColumnID="WeldingDate" DataField="WeldingDate" SortField="WeldingDate"
|
||||
FieldType="Date" Renderer="Date" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊口属性" ColumnID="JointAttribute" DataField="JointAttribute" SortField="JointAttribute"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="80px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊接区域" ColumnID="JointArea" DataField="JointArea" SortField="JointArea"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="80px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="点口类型" ColumnID="PointState" DataField="PointState" SortField="PointState"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center" Width="80px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="点口日期" ColumnID="PointDate" DataField="PointDate" SortField="PointDate"
|
||||
FieldType="Date" Renderer="Date" HeaderTextAlign="Center" TextAlign="Left" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="打底焊工" ColumnID="BackingWelderCode" DataField="BackingWelderCode"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center"
|
||||
Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="盖面焊工" ColumnID="CoverWelderCode" DataField="CoverWelderCode"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Center"
|
||||
Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="备注" ColumnID="Remark" DataField="Remark" SortField="Remark"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="60px">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
|
||||
</f:ToolbarText>
|
||||
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
|
||||
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
|
||||
<f:ListItem Text="10" Value="10" />
|
||||
<f:ListItem Text="15" Value="15" />
|
||||
<f:ListItem Text="20" Value="20" />
|
||||
<f:ListItem Text="25" Value="25" />
|
||||
<f:ListItem Text="所有行" Value="10000" />
|
||||
</f:DropDownList>
|
||||
</PageItems>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,100 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.PointTrust
|
||||
{
|
||||
public partial class PointWeldJointView : PageBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
string unitWorkId = Request.Params["unitWorkId"];
|
||||
string detectionType = Request.Params["detectionType"];
|
||||
string rateId = Request.Params["rateId"];
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var pointJoints = (from x in db.HJGL_Batch_PointBatchItem
|
||||
join y in db.HJGL_Batch_PointBatch on x.PointBatchId equals y.PointBatchId
|
||||
join z in db.HJGL_WeldJoint on x.WeldJointId equals z.WeldJointId
|
||||
where y.DetectionRateId == rateId && y.UnitWorkId == unitWorkId && y.DetectionTypeId == detectionType
|
||||
&& x.PointState == "1"
|
||||
select new { x.WeldJointId, z.WeldJointCode, z.JointAttribute });
|
||||
int totalJointNum = (from x in db.HJGL_WeldJoint
|
||||
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
|
||||
where y.DetectionRateId == rateId && y.UnitWorkId == unitWorkId && y.DetectionType == detectionType
|
||||
select x).Count();
|
||||
int needJointNum = 0, needYZJointNum = 0, needAZJointNum = 0;
|
||||
Model.Base_DetectionRate rate = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(rateId);
|
||||
if (rate != null)
|
||||
{
|
||||
needJointNum = Convert.ToInt32(Math.Ceiling((totalJointNum * rate.DetectionRateValue.Value) * 0.01));
|
||||
needAZJointNum = Convert.ToInt32(Math.Ceiling(needJointNum * 0.4));
|
||||
needYZJointNum = needJointNum - needAZJointNum;
|
||||
}
|
||||
this.lbDef.Text = "预制口:" + pointJoints.Count(x => x.JointAttribute == "预制口").ToString() + "个,安装口:" + pointJoints.Count(x => x.JointAttribute == "安装口").ToString() + "个。";
|
||||
this.lbNeedDef.Text = "预制口:" + (needYZJointNum - pointJoints.Count(x => x.JointAttribute == "预制口")).ToString() + "个,安装口:" + (needAZJointNum- pointJoints.Count(x => x.JointAttribute == "安装口")).ToString() + "个。";
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
#region 绑定数据
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
public void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT PointBatchItemId,PointBatchId,WeldJointId,PointState,PointDate,RepairDate,CutDate,WeldJointCode,IsBuildTrust,WeldTypeCode,
|
||||
JointAttribute ,JointArea,IsWelderFirst,Size,WeldingDate,PipelineCode,PipingClassName,PointIsAudit,BackingWelderCode,CoverWelderCode
|
||||
FROM dbo.View_HJGL_Batch_PointBatchItem
|
||||
WHERE UnitWorkId=@UnitWorkId and DetectionTypeId=@DetectionTypeId and DetectionRateId=@DetectionRateId and PointState='点口'";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@UnitWorkId", Request.Params["unitWorkId"]));
|
||||
listStr.Add(new SqlParameter("@DetectionTypeId", Request.Params["detectionType"]));
|
||||
listStr.Add(new SqlParameter("@DetectionRateId", Request.Params["rateId"]));
|
||||
if (!string.IsNullOrEmpty(txtpipelinecode.Text.Trim()))
|
||||
{
|
||||
strSql += " and PipelineCode like @PipelineCode ";
|
||||
listStr.Add(new SqlParameter("@PipelineCode", "%" + txtpipelinecode.Text.Trim() + "%"));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
// tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
#endregion
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
protected void btnQuery_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
#region 排序
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
|
||||
|
||||
public partial class PointWeldJointView {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// txtpipelinecode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtpipelinecode;
|
||||
|
||||
/// <summary>
|
||||
/// btnQuery 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnQuery;
|
||||
|
||||
/// <summary>
|
||||
/// lbDef 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbDef;
|
||||
|
||||
/// <summary>
|
||||
/// lbNeedDef 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbNeedDef;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarText1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarText ToolbarText1;
|
||||
|
||||
/// <summary>
|
||||
/// ddlPageSize 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,13 @@
|
||||
ShowBorder="true" Layout="VBox" ShowHeader="false" AutoScroll="true" BodyPadding="5px"
|
||||
IconFont="ArrowCircleLeft">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnit" runat="server" Label="单位名称"
|
||||
LabelAlign="Right" Width="300px" LabelWidth="90px" AutoPostBack="true" OnSelectedIndexChanged="Tree_TextChanged">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar4" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox ID="txtWelderCode" runat="server" EmptyText="输入查询条件"
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);
|
||||
this.txtTrustDateMonth.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
|
||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
//BLL.Base_UnitService.InitProjectUnitDropDownList(this.drpNDEUnit, false, this.CurrUser.LoginProjectId, BLL.Const.UnitType_4, "请选择");
|
||||
@@ -220,7 +221,10 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
{
|
||||
pointManages = pointManages.Where(x => x.WelderCode.Contains(this.txtWelderCode.Text.Trim()));
|
||||
}
|
||||
|
||||
if (this.drpUnit.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
pointManages = pointManages.Where(x => x.UnitId == this.drpUnit.SelectedValue);
|
||||
}
|
||||
|
||||
|
||||
foreach (var item in pointManages)
|
||||
@@ -236,12 +240,12 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
// 未委托批次红色显示
|
||||
if (BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(item.PointBatchId) == null)
|
||||
{
|
||||
newNode.Text = "<font color='#EE0000'>" + code + "</font>";
|
||||
newNode.Text = "<font color='#EE0000'>" + code + "【" + item.UnitName + "】" + "</font>";
|
||||
newNode.ToolTip = "未委托";
|
||||
}
|
||||
else
|
||||
{
|
||||
newNode.Text = code;
|
||||
newNode.Text = code + "【" + item.UnitName + "】";
|
||||
}
|
||||
e.Node.Nodes.Add(newNode);
|
||||
|
||||
|
||||
+20
-4
@@ -7,12 +7,10 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.PointTrust
|
||||
{
|
||||
namespace FineUIPro.Web.HJGL.PointTrust {
|
||||
|
||||
|
||||
public partial class TrustBatch
|
||||
{
|
||||
public partial class TrustBatch {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -50,6 +48,24 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnit;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar4 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -39,6 +39,13 @@
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar4" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnit" runat="server" Label="单位名称"
|
||||
LabelAlign="Right" Width="265px" LabelWidth="100px" AutoPostBack="true" OnSelectedIndexChanged="Tree_TextChanged">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar5" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox ID="txtSearchCode" runat="server" EmptyText="输入查询条件"
|
||||
|
||||
@@ -14,6 +14,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);
|
||||
this.txtRepairMonth.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
|
||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
this.InitTreeMenu();//加载树
|
||||
@@ -243,6 +244,10 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand
|
||||
&& x.UnitWorkId == ChildNodes.NodeID
|
||||
orderby x.RepairRecordCode descending
|
||||
select x;
|
||||
if (this.drpUnit.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
repairs = repairs.Where(x => x.UnitId == this.drpUnit.SelectedValue).OrderBy(x => x.RepairRecordCode);
|
||||
}
|
||||
foreach (var r in repairs)
|
||||
{
|
||||
var jot = BLL.WeldJointService.GetWeldJointByWeldJointId(r.WeldJointId);
|
||||
@@ -287,16 +292,16 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand
|
||||
}
|
||||
if (b)
|
||||
{
|
||||
newNode.Text = iso.PipelineCode + "-" + jot.WeldJointCode + r.RepairMark;
|
||||
newNode.Text = iso.PipelineCode + "-" + jot.WeldJointCode + r.RepairMark + "【" + BLL.UnitService.GetUnitNameByUnitId(r.UnitId) + "】";
|
||||
}
|
||||
else
|
||||
{
|
||||
newNode.Text = "<font color='#EE0000'>" + iso.PipelineCode + "-" + jot.WeldJointCode + r.RepairMark + "</font>";
|
||||
newNode.Text = "<font color='#EE0000'>" + iso.PipelineCode + "-" + jot.WeldJointCode + r.RepairMark + "【" + BLL.UnitService.GetUnitNameByUnitId(r.UnitId) + "】" + "</font>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
newNode.Text = iso.PipelineCode + "-" + jot.WeldJointCode + r.RepairMark;
|
||||
newNode.Text = iso.PipelineCode + "-" + jot.WeldJointCode + r.RepairMark + "【" + BLL.UnitService.GetUnitNameByUnitId(r.UnitId) + "】";
|
||||
}
|
||||
newNode.NodeID = r.RepairRecordId;
|
||||
newNode.ToolTip = "返修单";
|
||||
|
||||
@@ -66,6 +66,24 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtRepairMonth;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar4;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnit;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar5 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -25,6 +25,13 @@
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar4" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnit" runat="server" Label="单位名称"
|
||||
LabelAlign="Right" Width="265px" LabelWidth="100px" AutoPostBack="true" OnSelectedIndexChanged="Tree_TextChanged">
|
||||
</f:DropDownList>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar5" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox ID="txtSearchCode" runat="server" EmptyText="输入查询条件"
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);
|
||||
this.txtTrustDateMonth.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
|
||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
//BLL.Base_UnitService.InitProjectUnitDropDownList(this.drpNDEUnit, false, this.CurrUser.LoginProjectId, BLL.Const.UnitType_4, "请选择");
|
||||
@@ -174,18 +175,22 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand
|
||||
&& x.DetectionTypeId == e.NodeID.Split('|')[0]
|
||||
orderby x.TrustBatchCode descending
|
||||
select x;
|
||||
if (this.drpUnit.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
trusts = trusts.Where(x => x.UnitId == this.drpUnit.SelectedValue).OrderBy(x => x.TrustBatchCode);
|
||||
}
|
||||
foreach (var trust in trusts)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
string code = "FXWT-" + trust.TrustBatchCode.Substring(trust.TrustBatchCode.Length - 4);
|
||||
if (string.Format("{0:yyyy-MM-dd}", trust.TrustDate) == string.Format("{0:yyyy-MM-dd}", System.DateTime.Now))
|
||||
{
|
||||
newNode.Text = "<font color='#EE0000'>" + code + "</font>";
|
||||
newNode.Text = "<font color='#EE0000'>" + code + "【" + BLL.UnitService.GetUnitNameByUnitId(trust.UnitId) + "】" + "</font>";
|
||||
newNode.ToolTip = "当天委托单";
|
||||
}
|
||||
else
|
||||
{
|
||||
newNode.Text = code;
|
||||
newNode.Text = code + "【" + BLL.UnitService.GetUnitNameByUnitId(trust.UnitId) + "】";
|
||||
newNode.ToolTip = "非当天委托单";
|
||||
}
|
||||
newNode.NodeID = trust.TrustBatchId;
|
||||
|
||||
@@ -7,12 +7,10 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.RepairAndExpand
|
||||
{
|
||||
namespace FineUIPro.Web.HJGL.RepairAndExpand {
|
||||
|
||||
|
||||
public partial class RepairTrust
|
||||
{
|
||||
public partial class RepairTrust {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -68,6 +66,24 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtTrustDateMonth;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar4;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnit;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar5 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -10,6 +10,11 @@
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.f-grid-colheader-text {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -25,12 +30,19 @@
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:TextBox ID="txtPipelineCode" runat="server" Label="管线"
|
||||
EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="Tree_TextChanged"
|
||||
Width="280px" LabelWidth="60px">
|
||||
EmptyText="输入查询条件"
|
||||
Width="230px" LabelWidth="60px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:CheckBox runat="server" ID="cbAllPipeline" Text="显示全部管线"></f:CheckBox>
|
||||
<f:HiddenField runat="server" ID="hdUnitWorkId"></f:HiddenField>
|
||||
<%--<f:Button ID="btnOut" runat="server" Text="导出" ToolTip="导出焊口情况信息" Icon="FolderUp" OnClick="btnOut_Click">
|
||||
</f:Button>--%>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnTreeFind" ToolTip="查询" Icon="SystemSearch"
|
||||
EnablePostBack="true" OnClick="btnTreeFind_Click" runat="server">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
@@ -52,10 +64,17 @@
|
||||
EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="TextBox_TextChanged"
|
||||
Width="240px" LabelWidth="80px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
<f:CheckBox ID="ckIsAudit" runat ="server" Label="未审核" AutoPostBack="true" OnCheckedChanged="ckIsAudit_CheckedChanged"></f:CheckBox>
|
||||
<f:RadioButtonList runat="server" ID="rbIsAudit" LabelAlign="Right" Label="审核状态" LabelWidth="80px" Width="300px" AutoPostBack="true" OnSelectedIndexChanged="rbIsAudit_SelectedIndexChanged">
|
||||
<f:RadioItem Text="全部" Value="2" />
|
||||
<f:RadioItem Selected="true" Text="未审核" Value="0" />
|
||||
<f:RadioItem Text="已审核" Value="1" />
|
||||
</f:RadioButtonList>
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="审核日期" ID="txtAuditDate"
|
||||
AutoPostBack="true" OnTextChanged="txtAuditDate_TextChanged" LabelWidth="90px" LabelAlign="Right" Width="200px">
|
||||
</f:DatePicker>
|
||||
<f:Label ID="lbSize" CssClass="customlabel" runat="server" Label="达因"></f:Label>
|
||||
|
||||
<f:DropDownList runat="server" ID="DropTwoJointType" Label="二次新增类型" LabelAlign="Right" LabelWidth="140px" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
||||
<f:DropDownList runat="server" ID="DropTwoJointType" Label="二次新增类型" Width="220px" LabelAlign="Right" LabelWidth="140px" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
||||
<f:ListItem Text="新增口" Value="新增口" />
|
||||
<f:ListItem Text="修改口" Value="修改口" />
|
||||
</f:DropDownList>
|
||||
@@ -78,6 +97,9 @@
|
||||
<f:Button ID="btnOut2" runat="server" Text="导出" ToolTip="导出焊口初始数据信息" Hidden="true"
|
||||
Icon="FolderUp" EnableAjax="false" DisableControlBeforePostBack="false" OnClick="btnOut2_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" ToolTip="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
<f:Button ID="btnPrint" Text="打印" Icon="Printer" runat="server"
|
||||
OnClick="btnPrint_Click">
|
||||
</f:Button>
|
||||
@@ -103,10 +125,16 @@
|
||||
<f:RenderField HeaderText="是否审核" ColumnID="IsAudit" DataField="IsAudit" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="90px" Locked="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="审核人" ColumnID="AuditMan" DataField="AuditMan" FieldType="String" HeaderTextAlign="Center"
|
||||
<f:RenderField HeaderText="专工审核人" ColumnID="AuditMan" DataField="AuditMan" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="90px" Locked="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="审核日期" ColumnID="AuditDate" DataField="AuditDate" FieldType="Date" Renderer="Date" HeaderTextAlign="Center"
|
||||
<f:RenderField HeaderText="专工审核日期" ColumnID="AuditDate" DataField="AuditDate" FieldType="Date" Renderer="Date" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="100px" Locked="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="施工经理审核人" ColumnID="AuditMan2" DataField="AuditMan2" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="90px" Locked="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="施工经理审核日期" ColumnID="AuditDate2" DataField="AuditDate2" FieldType="Date" Renderer="Date" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="100px" Locked="true">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
@@ -242,10 +270,16 @@
|
||||
runat="server" Text="插入焊口" Icon="TableRowInsert" Hidden="true">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnAudit" OnClick="btnAudit_Click" EnablePostBack="true"
|
||||
runat="server" ConfirmText="确定通过选中行(二次焊口设计)的审核?" ConfirmTarget="Top" Text="审核" Icon="TableRowInsert">
|
||||
runat="server" ConfirmText="确定通过选中行(二次焊口设计)的审核?" ConfirmTarget="Top" Text="专工审核" Icon="TableRowInsert">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnCancelAudit" OnClick="btnCancelAudit_Click" EnablePostBack="true"
|
||||
runat="server" ConfirmText="确定取消选中行(二次焊口设计)的审核?" ConfirmTarget="Top" Text="取消审核" Icon="TableRowInsert">
|
||||
runat="server" ConfirmText="确定取消选中行(二次焊口设计)的审核?" ConfirmTarget="Top" Text="专工取消审核" Icon="TableRowInsert">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnAudit2" OnClick="btnAudit2_Click" EnablePostBack="true"
|
||||
runat="server" ConfirmText="确定通过选中行(二次焊口设计)的审核?" ConfirmTarget="Top" Text="施工经理审核" Icon="TableRowInsert">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnCancelAudit2" OnClick="btnCancelAudit2_Click" EnablePostBack="true"
|
||||
runat="server" ConfirmText="确定取消选中行(二次焊口设计)的审核?" ConfirmTarget="Top" Text="施工经理取消审核" Icon="TableRowInsert">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnView" OnClick="btnView_Click" EnablePostBack="true" Icon="ApplicationViewIcons"
|
||||
runat="server" Text="查看">
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using BLL;
|
||||
using NPOI.SS.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
@@ -83,7 +85,18 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
foreach (var q in unitWork1)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
int a = 0;
|
||||
if (cbAllPipeline.Checked)
|
||||
{
|
||||
a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) select x).Count();
|
||||
}
|
||||
else
|
||||
{
|
||||
a = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
||||
&& (from y in Funs.DB.HJGL_WeldJoint where y.PipelineId == x.PipelineId && y.IsTwoJoint == true select y).Count() > 0
|
||||
select x).Count();
|
||||
}
|
||||
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
|
||||
TreeNode tn1 = new TreeNode();
|
||||
tn1.NodeID = q.UnitWorkId;
|
||||
@@ -107,7 +120,18 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
foreach (var q in unitWork2)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
int a = 0;
|
||||
if (cbAllPipeline.Checked)
|
||||
{
|
||||
a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) select x).Count();
|
||||
}
|
||||
else
|
||||
{
|
||||
a = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
||||
&& (from y in Funs.DB.HJGL_WeldJoint where y.PipelineId == x.PipelineId && y.IsTwoJoint == true select y).Count() > 0
|
||||
select x).Count();
|
||||
}
|
||||
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
|
||||
TreeNode tn2 = new TreeNode();
|
||||
tn2.NodeID = q.UnitWorkId;
|
||||
@@ -141,6 +165,23 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
if (cbAllPipeline.Checked)
|
||||
{
|
||||
pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID
|
||||
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID
|
||||
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
||||
&& (from y in Funs.DB.HJGL_WeldJoint where y.PipelineId == x.PipelineId && y.IsTwoJoint == true select y).Count() > 0
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
}
|
||||
var hJGL_WeldJoints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
|
||||
|
||||
int pageindex = int.Parse(node.CommandName.Split('|')[0]);
|
||||
@@ -167,29 +208,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
var AuditCount = (from x in hJGL_WeldJoints where x.PipelineId == item.PipelineId && x.IsTwoJoint == true && x.AuditDate != null select x).Count();
|
||||
TreeNode newNode = new TreeNode();
|
||||
|
||||
if (jotCount == AuditCount) //全部审核
|
||||
{
|
||||
newNode.Text = "<font color='#00FF00'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||
|
||||
}
|
||||
else if (AuditCount == 0) //全部未审核
|
||||
{
|
||||
newNode.Text = "<font color='#FF0000'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||
|
||||
}
|
||||
else //部分审核
|
||||
{
|
||||
newNode.Text = "<font color='#B9B925'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||
|
||||
}
|
||||
//if (jotCount > weldJotCount)
|
||||
//if (jotCount == AuditCount) //全部审核
|
||||
//{
|
||||
// newNode.Text = "<font color='#EE0000'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||
// newNode.Text = "<font color='#00FF00'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||
|
||||
//}
|
||||
//else
|
||||
//else if (AuditCount == 0) //全部未审核
|
||||
//{
|
||||
// newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
// newNode.Text = "<font color='#FF0000'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||
|
||||
//}
|
||||
//else //部分审核
|
||||
//{
|
||||
// newNode.Text = "<font color='#B9B925'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||
|
||||
//}
|
||||
newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
newNode.ToolTip = "管线号【焊口数】";
|
||||
newNode.NodeID = item.PipelineId;
|
||||
newNode.EnableClickEvent = true;
|
||||
@@ -237,7 +271,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
else
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNodeID;
|
||||
ckIsAudit.Checked = true;
|
||||
NoAuditBindGrid();
|
||||
}
|
||||
|
||||
@@ -267,9 +300,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
WeldingMethodCode,WeldingWireCode,WeldingRodCode,WeldingDate,WeldingDailyCode,
|
||||
BackingWelderCode,CoverWelderCode,MediumCode ,PreTemperature,JointArea,WPQCode,Remark,
|
||||
(CASE WHEN AuditDate IS NOT NULL THEN '已审核' ELSE '未审核' END) AS IsAudit,
|
||||
subMan.PersonName AS SubmitMan,auditMan.PersonName AS AuditMan,AuditDate
|
||||
subMan.PersonName AS SubmitMan,auditMan.PersonName AS AuditMan,AuditDate,auditMan2.PersonName AS AuditMan2,AuditDate2
|
||||
FROM View_HJGL_WeldJoint
|
||||
LEFT JOIN dbo.Person_Persons auditMan ON auditMan.PersonId=View_HJGL_WeldJoint.AuditMan
|
||||
LEFT JOIN dbo.Person_Persons auditMan2 ON auditMan2.PersonId=View_HJGL_WeldJoint.AuditMan2
|
||||
LEFT JOIN dbo.Person_Persons subMan ON subMan.PersonId=View_HJGL_WeldJoint.SubmitMan
|
||||
WHERE IsTwoJoint = 1";
|
||||
List<SqlParameter> listStr = new List<SqlParameter> { };
|
||||
@@ -287,13 +321,26 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
strSql += " AND TwoJointType = @TwoJointType";
|
||||
listStr.Add(new SqlParameter("@TwoJointType", DropTwoJointType.SelectedValue));
|
||||
}
|
||||
if (ckIsAudit.Checked==true)
|
||||
if (rbIsAudit.SelectedValue != "2")
|
||||
{
|
||||
if (rbIsAudit.SelectedValue == "0")
|
||||
{
|
||||
strSql += " and AuditDate is null";
|
||||
}
|
||||
else
|
||||
{
|
||||
strSql += " and AuditDate is not null";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtAuditDate.Text.Trim()))
|
||||
{
|
||||
strSql += " AND CONVERT(VARCHAR(20),AuditDate,23) =@AuditDate";
|
||||
listStr.Add(new SqlParameter("@AuditDate", this.txtAuditDate.Text.Trim()));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
var SizeSum = tb.AsEnumerable().Select(x => x.Field<decimal>("Size")).Sum();
|
||||
decimal? d = 0;
|
||||
var SizeSum = tb.AsEnumerable().Select(x => x.Field<decimal?>("Size") ?? d).Sum();
|
||||
lbSize.Text = SizeSum.ToString();
|
||||
// 2.获取当前分页数据
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
@@ -330,10 +377,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
strSql += " AND TwoJointType = @TwoJointType";
|
||||
listStr.Add(new SqlParameter("@TwoJointType", DropTwoJointType.SelectedValue));
|
||||
}
|
||||
if (ckIsAudit.Checked == true)
|
||||
if (rbIsAudit.SelectedValue != "2")
|
||||
{
|
||||
if (rbIsAudit.SelectedValue == "0")
|
||||
{
|
||||
strSql += " and AuditDate is null";
|
||||
}
|
||||
else
|
||||
{
|
||||
strSql += " and AuditDate is not null";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtAuditDate.Text.Trim()))
|
||||
{
|
||||
strSql += " AND CONVERT(VARCHAR(20),AuditDate,23) =@AuditDate";
|
||||
listStr.Add(new SqlParameter("@AuditDate", this.txtAuditDate.Text.Trim()));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
var SizeSum = tb.AsEnumerable().Select(x => x.Field<decimal>("Size")).Sum();
|
||||
@@ -465,9 +524,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// <param name="e"></param>
|
||||
protected void btnAutoInput_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.drpUnit.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
ShowNotify("请选择工艺规程编制单位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
||||
{
|
||||
var jotList = from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == tvControlItem.SelectedNodeID && x.WPQId == null select x;
|
||||
var jotList = from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == tvControlItem.SelectedNodeID && x.WPQId == null && x.IsTwoJoint == true select x;
|
||||
if (jotList.Count() > 0)
|
||||
{
|
||||
foreach (var jot in jotList)
|
||||
@@ -476,7 +540,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
if (wpqList != null)
|
||||
{
|
||||
Model.HJGL_WeldJoint newJot = WeldJointService.GetWeldJointByWeldJointId(jot.WeldJointId);
|
||||
Model.WPQ_WPQList wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId);
|
||||
Model.WPQ_WPQList wps = new Model.WPQ_WPQList();
|
||||
var a = wpqList.FirstOrDefault(x => x.WeldingMethodId == "feb1234c-a538-476f-99ac-7b3ab15997c1"); //优先匹配GTAW+SMAW的焊评
|
||||
if (a == null)
|
||||
{
|
||||
wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId);
|
||||
}
|
||||
else
|
||||
{
|
||||
wps = BLL.WPQListServiceService.GetWPQById(a.WPQId);
|
||||
}
|
||||
|
||||
newJot.WPQId = wps.WPQId;
|
||||
newJot.WeldJointId = jot.WeldJointId;
|
||||
@@ -487,7 +560,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
newJot.PreTemperature = wps.PreTemperature;
|
||||
newJot.IsHotProess = wps.IsHotProess;
|
||||
newJot.MatchableWPQ = string.Join(",", wpqList.Select(x => x.WPQCode));
|
||||
newJot.IsTwoJoint = true;
|
||||
BLL.WeldJointService.UpdateConWeldJoint(newJot);
|
||||
}
|
||||
}
|
||||
@@ -548,6 +620,31 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnAudit2_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.HJGL_JotTwoDesignMenuId, BLL.Const.BtnAuditing))
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string[] weldJointIdList = Grid1.SelectedRowIDArray;
|
||||
foreach (string jot in weldJointIdList)
|
||||
{
|
||||
BLL.WeldJointService.UpdateJointAudit2(jot, CurrUser.PersonId, DateTime.Now);
|
||||
}
|
||||
ShowNotify("所选口审核成功!", MessageBoxIcon.Success);
|
||||
BindGrid();
|
||||
//string weldJointIdList = string.Join("|", Grid1.SelectedRowIDArray);
|
||||
//PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TwoJointAudit.aspx?WeldJointIdList={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnCancelAudit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.HJGL_JotTwoDesignMenuId, BLL.Const.BtnAuditing))
|
||||
@@ -573,6 +670,31 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnCancelAudit2_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.HJGL_JotTwoDesignMenuId, BLL.Const.BtnAuditing))
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string[] weldJointIdList = Grid1.SelectedRowIDArray;
|
||||
foreach (string jot in weldJointIdList)
|
||||
{
|
||||
BLL.WeldJointService.UpdateJointAudit2(jot, null, null);
|
||||
}
|
||||
ShowNotify("已取消所选口的审核!", MessageBoxIcon.Success);
|
||||
BindGrid();
|
||||
//string weldJointIdList = string.Join("|", Grid1.SelectedRowIDArray);
|
||||
//PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("TwoJointAudit.aspx?WeldJointIdList={0}", Grid1.SelectedRowID, "维护 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 焊口信息插入
|
||||
/// </summary>
|
||||
@@ -739,12 +861,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Tree_TextChanged(object sender, EventArgs e)
|
||||
protected void btnTreeFind_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.InitTreeMenu();
|
||||
this.BindGrid();
|
||||
@@ -788,27 +905,171 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
#endregion
|
||||
|
||||
#region 导出焊口信息
|
||||
/// <summary>
|
||||
/// 导出焊口信息
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
//var iso = BLL.Pipeline_PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
||||
//var workArea = BLL.Project_WorkAreaService.GetProject_WorkAreaByWorkAreaId(this.tvControlItem.SelectedNodeID);
|
||||
//if (iso != null)
|
||||
//{
|
||||
// PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("JointInfoOut.aspx?PipelineId={0}", this.tvControlItem.SelectedNodeID, "导出 - ")));
|
||||
//}
|
||||
//else if (workArea != null)
|
||||
//{
|
||||
// PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("JointInfoOut.aspx?WorkAreaId={0}", this.tvControlItem.SelectedNodeID, "导出 - ")));
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// Alert.ShowInTop("请选择"PipelineOrArea, MessageBoxIcon.Warning);
|
||||
//}
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string initTemplatePath = string.Empty;
|
||||
string uploadfilepath = string.Empty;
|
||||
string newUrl = string.Empty;
|
||||
string filePath = string.Empty;
|
||||
initTemplatePath = Const.JotTwoDesignTemplateUrl;
|
||||
uploadfilepath = rootPath + initTemplatePath;
|
||||
string constructionLogId = this.tvControlItem.SelectedNodeID;
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var workEfficiencys = from x in db.ZHGL_ConstructionLogWorkEfficiency
|
||||
where x.ConstructionLogId == constructionLogId
|
||||
select x;
|
||||
var persons = from x in db.ZHGL_ConstructionLogPerson
|
||||
where x.ConstructionLogId == constructionLogId
|
||||
select x;
|
||||
var machines = from x in db.ZHGL_ConstructionLogMachine
|
||||
where x.ConstructionLogId == constructionLogId
|
||||
select x;
|
||||
if (this.Grid1.Rows.Count > 0)
|
||||
{
|
||||
newUrl = uploadfilepath.Replace(".xlsx", "(" + string.Format("{0:yyyy-MM-dd}", DateTime.Now) + ")" + ".xlsx");
|
||||
File.Copy(uploadfilepath, newUrl);
|
||||
// 第一步:读取文件流
|
||||
NPOI.SS.UserModel.IWorkbook workbook;
|
||||
using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
|
||||
}
|
||||
// 创建单元格样式
|
||||
NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle();
|
||||
cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
|
||||
cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
|
||||
cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
|
||||
cellStyle0.WrapText = true;
|
||||
var font = workbook.CreateFont();
|
||||
font.FontHeightInPoints = 11;
|
||||
font.IsBold = false;
|
||||
cellStyle0.SetFont(font);
|
||||
// 第二步:创建新数据行
|
||||
NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
|
||||
int rowCount = 2;
|
||||
for (int i = 0; i < this.Grid1.Rows.Count; i++)
|
||||
{
|
||||
NPOI.SS.UserModel.IRow row1 = sheet.CreateRow(rowCount);
|
||||
NPOI.SS.UserModel.ICell cell;
|
||||
cell = row1.CreateCell(0);
|
||||
cell.CellStyle = cellStyle0;
|
||||
cell.SetCellValue((i + 1).ToString());
|
||||
cell = row1.CreateCell(1);
|
||||
cell.CellStyle = cellStyle0;
|
||||
cell.SetCellValue(this.Grid1.Rows[i].Values[2].ToString());
|
||||
cell = row1.CreateCell(2);
|
||||
cell.CellStyle = cellStyle0;
|
||||
cell.SetCellValue(this.Grid1.Rows[i].Values[3].ToString());
|
||||
cell = row1.CreateCell(3);
|
||||
cell.CellStyle = cellStyle0;
|
||||
cell.SetCellValue(this.Grid1.Rows[i].Values[4].ToString());
|
||||
cell = row1.CreateCell(4);
|
||||
cell.CellStyle = cellStyle0;
|
||||
string date1 = this.Grid1.Rows[i].Values[5].ToString();
|
||||
if (!string.IsNullOrEmpty(date1))
|
||||
{
|
||||
date1 = string.Format("{0:yyyy-MM-dd}", Funs.GetNewDateTime(date1));
|
||||
}
|
||||
cell.SetCellValue(date1);
|
||||
cell = row1.CreateCell(5);
|
||||
cell.CellStyle = cellStyle0;
|
||||
cell.SetCellValue(this.Grid1.Rows[i].Values[6].ToString());
|
||||
cell = row1.CreateCell(6);
|
||||
cell.CellStyle = cellStyle0;
|
||||
string date2 = this.Grid1.Rows[i].Values[7].ToString();
|
||||
if (!string.IsNullOrEmpty(date2))
|
||||
{
|
||||
date2 = string.Format("{0:yyyy-MM-dd}", Funs.GetNewDateTime(date2));
|
||||
}
|
||||
cell.SetCellValue(date2);
|
||||
cell = row1.CreateCell(7);
|
||||
cell.CellStyle = cellStyle0;
|
||||
string weldJointCode = string.Empty;
|
||||
var weldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(this.Grid1.Rows[i].RowID);
|
||||
if (weldJoint != null)
|
||||
{
|
||||
weldJointCode = weldJoint.WeldJointCode;
|
||||
}
|
||||
cell.SetCellValue(weldJointCode);
|
||||
cell = row1.CreateCell(8);
|
||||
cell.CellStyle = cellStyle0;
|
||||
cell.SetCellValue(this.Grid1.Rows[i].Values[10].ToString());
|
||||
cell = row1.CreateCell(9);
|
||||
cell.CellStyle = cellStyle0;
|
||||
cell.SetCellValue(this.Grid1.Rows[i].Values[11].ToString());
|
||||
cell = row1.CreateCell(10);
|
||||
cell.CellStyle = cellStyle0;
|
||||
cell.SetCellValue(this.Grid1.Rows[i].Values[12].ToString());
|
||||
cell = row1.CreateCell(11);
|
||||
cell.CellStyle = cellStyle0;
|
||||
cell.SetCellValue(this.Grid1.Rows[i].Values[13].ToString());
|
||||
cell = row1.CreateCell(12);
|
||||
cell.CellStyle = cellStyle0;
|
||||
cell.SetCellValue(this.Grid1.Rows[i].Values[14].ToString());
|
||||
cell = row1.CreateCell(13);
|
||||
cell.CellStyle = cellStyle0;
|
||||
cell.SetCellValue(this.Grid1.Rows[i].Values[15].ToString());
|
||||
cell = row1.CreateCell(14);
|
||||
cell.CellStyle = cellStyle0;
|
||||
cell.SetCellValue(this.Grid1.Rows[i].Values[16].ToString());
|
||||
cell = row1.CreateCell(15);
|
||||
cell.CellStyle = cellStyle0;
|
||||
cell.SetCellValue(this.Grid1.Rows[i].Values[17].ToString());
|
||||
cell = row1.CreateCell(16);
|
||||
cell.CellStyle = cellStyle0;
|
||||
cell.SetCellValue(this.Grid1.Rows[i].Values[18].ToString());
|
||||
cell = row1.CreateCell(17);
|
||||
cell.CellStyle = cellStyle0;
|
||||
cell.SetCellValue(this.Grid1.Rows[i].Values[20].ToString());
|
||||
cell = row1.CreateCell(18);
|
||||
cell.CellStyle = cellStyle0;
|
||||
cell.SetCellValue(this.Grid1.Rows[i].Values[21].ToString());
|
||||
cell = row1.CreateCell(19);
|
||||
cell.CellStyle = cellStyle0;
|
||||
cell.SetCellValue(this.Grid1.Rows[i].Values[22].ToString());
|
||||
cell = row1.CreateCell(20);
|
||||
cell.CellStyle = cellStyle0;
|
||||
cell.SetCellValue(this.Grid1.Rows[i].Values[27].ToString());
|
||||
rowCount++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 第三步:写入文件流
|
||||
using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write))
|
||||
{
|
||||
workbook.Write(stream);
|
||||
workbook.Close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
string fileName = Path.GetFileName(newUrl);
|
||||
FileInfo info = new FileInfo(newUrl);
|
||||
long fileSize = info.Length;
|
||||
Response.Clear();
|
||||
Response.ContentType = "application/x-zip-compressed";
|
||||
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
Response.AddHeader("Content-Length", fileSize.ToString());
|
||||
Response.TransmitFile(newUrl, 0, fileSize);
|
||||
Response.Flush();
|
||||
Response.Close();
|
||||
File.Delete(newUrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("无数据可导出!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -836,47 +1097,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
// Alert.ShowInTop("请选择"PipelinetFirst, MessageBoxIcon.Warning);
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 导出方法
|
||||
/// </summary>
|
||||
/// <param name="grid"></param>
|
||||
/// <returns></returns>
|
||||
private string GetGridTableHtml(Grid grid)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("<meta http-equiv=\"content-type\" content=\"application/excel; charset=UTF-8\"/>");
|
||||
sb.Append("<table cellspacing=\"0\" rules=\"all\" border=\"1\" style=\"border-collapse:collapse;\">");
|
||||
sb.Append("<tr>");
|
||||
foreach (GridColumn column in grid.Columns)
|
||||
{
|
||||
if (column.HeaderText != "序号")
|
||||
{
|
||||
sb.AppendFormat("<td>{0}</td>", column.HeaderText);
|
||||
}
|
||||
}
|
||||
sb.Append("</tr>");
|
||||
foreach (GridRow row in grid.Rows)
|
||||
{
|
||||
sb.Append("<tr>");
|
||||
foreach (GridColumn column in grid.Columns)
|
||||
{
|
||||
string html = row.Values[column.ColumnIndex].ToString();
|
||||
if (column.ColumnID != "tfNumber")
|
||||
{
|
||||
//html = (row.FindControl("lblNumber") as AspNet.Label).Text;
|
||||
sb.AppendFormat("<td>{0}</td>", html);
|
||||
}
|
||||
//sb.AppendFormat("<td>{0}</td>", html);
|
||||
}
|
||||
|
||||
sb.Append("</tr>");
|
||||
}
|
||||
|
||||
sb.Append("</table>");
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 选择要显示列
|
||||
@@ -958,7 +1178,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void ckIsAudit_CheckedChanged(object sender, CheckedEventArgs e)
|
||||
protected void rbIsAudit_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
||||
this.hdUnitWorkId.Text = string.Empty;
|
||||
@@ -972,7 +1192,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNodeID;
|
||||
NoAuditBindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
protected void txtAuditDate_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
||||
this.hdUnitWorkId.Text = string.Empty;
|
||||
if (pipeline != null)
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID;
|
||||
this.BindGrid();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNodeID;
|
||||
NoAuditBindGrid();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,12 +7,10 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
|
||||
|
||||
public partial class JotTwoDesign
|
||||
{
|
||||
public partial class JotTwoDesign {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -68,6 +66,24 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPipelineCode;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// cbAllPipeline 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox cbAllPipeline;
|
||||
|
||||
/// <summary>
|
||||
/// hdUnitWorkId 控件。
|
||||
/// </summary>
|
||||
@@ -77,6 +93,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdUnitWorkId;
|
||||
|
||||
/// <summary>
|
||||
/// btnTreeFind 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnTreeFind;
|
||||
|
||||
/// <summary>
|
||||
/// tvControlItem 控件。
|
||||
/// </summary>
|
||||
@@ -114,13 +139,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
protected global::FineUIPro.TextBox txtWeldJointCode;
|
||||
|
||||
/// <summary>
|
||||
/// ckIsAudit 控件。
|
||||
/// rbIsAudit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.CheckBox ckIsAudit;
|
||||
protected global::FineUIPro.RadioButtonList rbIsAudit;
|
||||
|
||||
/// <summary>
|
||||
/// txtAuditDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtAuditDate;
|
||||
|
||||
/// <summary>
|
||||
/// lbSize 控件。
|
||||
@@ -203,6 +237,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut2;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// btnPrint 控件。
|
||||
/// </summary>
|
||||
@@ -329,6 +372,24 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnCancelAudit;
|
||||
|
||||
/// <summary>
|
||||
/// btnAudit2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnAudit2;
|
||||
|
||||
/// <summary>
|
||||
/// btnCancelAudit2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnCancelAudit2;
|
||||
|
||||
/// <summary>
|
||||
/// btnView 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -215,26 +215,26 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
if (pds.Count > 0 && pds != null)
|
||||
{
|
||||
|
||||
var getPipeline = from x in Funs.DB.View_HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x;
|
||||
var getMedium = from x in Funs.DB.Base_Medium where x.ProjectId == this.CurrUser.LoginProjectId select x;//介质
|
||||
var getPipeLineClass = from x in Funs.DB.Base_PipingClass where x.ProjectId == this.CurrUser.LoginProjectId select x;//管道等级
|
||||
var getDetectionRate = from x in Funs.DB.Base_DetectionRate select x;//探伤比例
|
||||
var getDetectionType = from x in Funs.DB.Base_DetectionType select x;//探伤类型
|
||||
var getPressurePipingClass = from x in Funs.DB.Base_PressurePipingClass select x;//压力管道级别
|
||||
var getTestMedium = from x in Funs.DB.Base_TestMedium where x.TestType == "1" select x;//压力试验介质
|
||||
var getLeakMedium = from x in Funs.DB.Base_TestMedium where x.TestType == "2" select x;//泄露性试验介质
|
||||
var getPurgeMethod = from x in Funs.DB.Base_PurgeMethod select x;
|
||||
var getMaterial = from x in Funs.DB.Base_Material select x;
|
||||
var getWeldType = from x in Funs.DB.Base_WeldType select x;
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var getPipeline = from x in db.View_HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x;
|
||||
var getMedium = from x in db.Base_Medium where x.ProjectId == this.CurrUser.LoginProjectId select x;//介质
|
||||
var getPipeLineClass = from x in db.Base_PipingClass where x.ProjectId == this.CurrUser.LoginProjectId select x;//管道等级
|
||||
var getDetectionRate = from x in db.Base_DetectionRate select x;//探伤比例
|
||||
var getDetectionType = from x in db.Base_DetectionType select x;//探伤类型
|
||||
var getPressurePipingClass = from x in db.Base_PressurePipingClass select x;//压力管道级别
|
||||
var getTestMedium = from x in db.Base_TestMedium where x.TestType == "1" select x;//压力试验介质
|
||||
var getLeakMedium = from x in db.Base_TestMedium where x.TestType == "2" select x;//泄露性试验介质
|
||||
var getPurgeMethod = from x in db.Base_PurgeMethod select x;
|
||||
var getMaterial = from x in db.Base_Material select x;
|
||||
var getWeldType = from x in db.Base_WeldType select x;
|
||||
//var getComponents = from x in Funs.DB.Base_Components where x.ProjeceId == this.CurrUser.LoginProjectId select x;
|
||||
|
||||
|
||||
Model.WBS_UnitWork unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(Request.Params["UnitWorkId"]);
|
||||
for (int i = 1; i < pds.Count; i++)
|
||||
{
|
||||
Model.View_HJGL_WeldJoint pipeline = new Model.View_HJGL_WeldJoint();
|
||||
//pipeline.PipelineId = SQLHelper.GetNewID();
|
||||
Model.WBS_UnitWork unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(Request.Params["UnitWorkId"]);
|
||||
|
||||
if (unitWork != null)
|
||||
{
|
||||
pipeline.UnitWorkId = Request.Params["UnitWorkId"];
|
||||
@@ -316,26 +316,18 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
string col6 = pds[i].G;
|
||||
if (!string.IsNullOrEmpty(col6))
|
||||
{
|
||||
string[] types = col6.ToString().Split(',');
|
||||
foreach (string t in types)
|
||||
{
|
||||
var type = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == t);
|
||||
string typeStr = col6.ToString();
|
||||
var type = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == typeStr);
|
||||
if (type == null)
|
||||
{
|
||||
//result += "第" + (i + 1).ToString() + "行," + "探伤类型【" + t + "】不存在!" + "|";
|
||||
result.Add("探伤类型【" + t + "】不存在!" + "|");
|
||||
result.Add("探伤类型【" + typeStr + "】不存在!" + "|");
|
||||
}
|
||||
else
|
||||
{
|
||||
pipeline.DetectionType += type.DetectionTypeId + "|";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(pipeline.DetectionType))
|
||||
{
|
||||
pipeline.DetectionType = pipeline.DetectionType.Substring(0, pipeline.DetectionType.Length - 1);
|
||||
pipeline.DetectionType = type.DetectionTypeId;
|
||||
pipeline.DetectionTypeStr = col6;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -670,7 +662,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
if (col6.Contains("RT"))
|
||||
{
|
||||
Model.Base_DetectionType rt = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("RT");
|
||||
Model.Base_DetectionType rt = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == "RT");
|
||||
if (rt != null)
|
||||
{
|
||||
pipeline.DetectionTypeId = rt.DetectionTypeId;
|
||||
@@ -678,7 +670,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Base_DetectionType ut = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("UT");
|
||||
Model.Base_DetectionType ut = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == "UT");
|
||||
if (ut != null)
|
||||
{
|
||||
pipeline.DetectionTypeId = ut.DetectionTypeId;
|
||||
@@ -689,7 +681,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
if (col6.Contains("MT"))
|
||||
{
|
||||
Model.Base_DetectionType mt = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("MT");
|
||||
Model.Base_DetectionType mt = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == "MT");
|
||||
if (mt != null)
|
||||
{
|
||||
pipeline.DetectionTypeId = mt.DetectionTypeId;
|
||||
@@ -697,7 +689,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Base_DetectionType pt = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode("PT");
|
||||
Model.Base_DetectionType pt = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == "PT");
|
||||
if (pt != null)
|
||||
{
|
||||
pipeline.DetectionTypeId = pt.DetectionTypeId;
|
||||
@@ -1025,7 +1017,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
void addHJGL_WeldJoints(List<Model.View_HJGL_WeldJoint> PipelineList, string UnitWorkId)
|
||||
{
|
||||
var getpipelines = from y in Funs.DB.HJGL_Pipeline where y.UnitWorkId == UnitWorkId select y;
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var getpipelines = from y in db.HJGL_Pipeline where y.UnitWorkId == UnitWorkId select y;
|
||||
var allWeldJoints = from x in db.HJGL_WeldJoint
|
||||
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
|
||||
where y.UnitWorkId == UnitWorkId
|
||||
select x;
|
||||
List<Model.HJGL_WeldJoint> weldJoints_add = new List<Model.HJGL_WeldJoint>();
|
||||
|
||||
var weldJoints = (from x in PipelineList
|
||||
@@ -1063,6 +1060,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
temp.IsHotProess
|
||||
}).ToList();
|
||||
|
||||
var pipelineCodes = weldJoints.Select(x => x.PipelineCode).Distinct().ToList();
|
||||
for (int i = 0; i < weldJoints.Count(); i++)
|
||||
{
|
||||
Model.HJGL_WeldJoint weldJoint = new Model.HJGL_WeldJoint();
|
||||
@@ -1082,7 +1080,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
weldJoint.ProjectId = weldJoints[i].ProjectId;
|
||||
weldJoint.IsHotProess = weldJoints[i].IsHotProess;
|
||||
|
||||
var isExistJot = WeldJointService.GetWeldJointsByWeldJointCode(weldJoint.PipelineId, weldJoint.WeldJointCode);
|
||||
var isExistJot = allWeldJoints.FirstOrDefault(x => x.PipelineId == weldJoint.PipelineId && x.WeldJointCode == weldJoint.WeldJointCode);
|
||||
if (isExistJot != null) // 更新焊口
|
||||
{
|
||||
weldJoint.WeldJointId = isExistJot.WeldJointId;
|
||||
@@ -1092,14 +1090,41 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
weldJoint.WeldJointId = SQLHelper.GetNewID();
|
||||
weldJoints_add.Add(weldJoint);
|
||||
//BLL.WeldJointService.AddWeldJoint(weldJoint);
|
||||
}
|
||||
|
||||
}
|
||||
//db.SubmitChanges();
|
||||
if (weldJoints_add.Count > 0)
|
||||
{
|
||||
BLL.WeldJointService.AddBulkWeldJoint(weldJoints_add);
|
||||
|
||||
}
|
||||
Model.SGGLDB db2 = Funs.DB;
|
||||
List<Model.HJGL_WeldJoint> delJoints = new List<Model.HJGL_WeldJoint>();
|
||||
var allWeldJoints2 = from x in db2.HJGL_WeldJoint
|
||||
join y in db2.HJGL_Pipeline on x.PipelineId equals y.PipelineId
|
||||
where y.UnitWorkId == Request.Params["UnitWorkId"]
|
||||
select x;
|
||||
foreach (var pipelineCode in pipelineCodes)
|
||||
{
|
||||
var pipelineWeldJointCodes = weldJoints.Where(x => x.PipelineCode == pipelineCode).Select(x => x.WeldJointCode).ToList();
|
||||
var q = allWeldJoints2.Where(x => x.PipelineCode == pipelineCode && !pipelineWeldJointCodes.Contains(x.WeldJointCode)).ToList();
|
||||
delJoints.AddRange(q);
|
||||
}
|
||||
if (delJoints.Count() > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
db2.HJGL_WeldJoint.DeleteAllOnSubmit(delJoints);
|
||||
db2.SubmitChanges();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
string weldJointCodes = string.Empty;
|
||||
foreach (var item in delJoints)
|
||||
{
|
||||
weldJointCodes += item.WeldJointCode + ",";
|
||||
}
|
||||
Alert.ShowInParent(weldJointCodes, MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -209,7 +209,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
&& x.UnitWorkId == this.UnitWorkId
|
||||
&& x.PipeArea == PipeArea
|
||||
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
||||
orderby x.PipelineCode select x).ToList();
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.SelectedValue != Const._Null)
|
||||
{
|
||||
pipeline = pipeline.Where(x => x.FlowingSection == drpFlowingSection.SelectedValue).ToList();
|
||||
|
||||
@@ -276,8 +276,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_WeldJointMenuId, Const.BtnSave))
|
||||
{
|
||||
string weldJointCode = string.Empty;
|
||||
|
||||
@@ -306,21 +304,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
else
|
||||
{
|
||||
SaveData();
|
||||
SaveData(true);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 提交数据
|
||||
/// </summary>
|
||||
private void SaveData()
|
||||
private void SaveData(bool isClosed)
|
||||
{
|
||||
// if (string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()) || this.drpPipingClass.SelectedValue == BLL.Const._Null || this.drpMaterial1.SelectedValue == BLL.Const._Null || this.drpMaterial2.SelectedValue == BLL.Const._Null || this.drpWeldTypeCode.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.hdWeldingMethodId.Text) || string.IsNullOrEmpty(this.txtWpqId.Text.Trim()))
|
||||
if (string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()) || this.drpPipingClass.SelectedValue == BLL.Const._Null || this.drpMaterial1.SelectedValue == BLL.Const._Null || this.drpMaterial2.SelectedValue == BLL.Const._Null || this.drpWeldTypeCode.SelectedValue == BLL.Const._Null)
|
||||
@@ -467,9 +457,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
|
||||
BLL.WeldJointService.AddWeldJoint(joint);
|
||||
}
|
||||
if (isClosed)
|
||||
{
|
||||
ShowNotify("提交成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据焊缝类型获取探伤类型
|
||||
@@ -644,7 +637,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
var wpsRod = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(wps.WeldingRod);
|
||||
var matRod = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(drpWeldingRod.SelectedValue);
|
||||
if (IsCoverClass(wpsRod.SteelType, matRod.SteelType))
|
||||
if (wpsRod != null && matRod != null && IsCoverClass(wpsRod.SteelType, matRod.SteelType))
|
||||
{
|
||||
|
||||
}
|
||||
@@ -683,7 +676,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
var wpsWire = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(wps.WeldingWire);
|
||||
var matWire = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(drpWeldingWire.SelectedValue);
|
||||
if (IsCoverClass(wpsWire.SteelType, matWire.SteelType))
|
||||
if (wpsWire != null && matWire != null && IsCoverClass(wpsWire.SteelType, matWire.SteelType))
|
||||
{
|
||||
|
||||
}
|
||||
@@ -740,7 +733,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
string dn = string.Empty;
|
||||
string s = string.Empty;
|
||||
this.txtSize.Text = string.Empty;
|
||||
//this.txtSize.Text = string.Empty;
|
||||
this.txtSpecification.Text = string.Empty;
|
||||
if (!string.IsNullOrEmpty(this.txtDia.Text.Trim()))
|
||||
{
|
||||
@@ -768,6 +761,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
this.txtSpecification.Text = "Φ" + dn + "*" + this.txtThickness.Text.Trim();
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtDNDia.Text.Trim()))
|
||||
{
|
||||
dn = this.txtDNDia.Text.Trim();
|
||||
if (!string.IsNullOrEmpty(this.txtThickness.Text.Trim()))
|
||||
{
|
||||
this.txtSpecification.Text = dn + "*" + this.txtThickness.Text.Trim();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -873,9 +874,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.WeldJointId))
|
||||
{
|
||||
SaveData();
|
||||
SaveData(false);
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/WeldJoint&menuId={1}", WeldJointId, BLL.Const.HJGL_WeldJointMenuId)));
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/WeldJoint&menuId={1}", WeldJointId, BLL.Const.HJGL_JotTwoDesignMenuId)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.customlabelNum span {
|
||||
color: blue;
|
||||
font-weight: bold;
|
||||
@@ -45,6 +46,9 @@
|
||||
OnNodeCommand="tvControlItem_NodeCommand" runat="server" ShowBorder="false" EnableCollapse="true"
|
||||
AutoLeafIdentification="true"
|
||||
EnableTextSelection="true" OnNodeExpand="tvControlItem_TreeNodeExpanded">
|
||||
<Listeners>
|
||||
<f:Listener Event="beforenodecontextmenu" Handler="onTreeNodeContextMenu" />
|
||||
</Listeners>
|
||||
</f:Tree>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
@@ -91,7 +95,7 @@
|
||||
</f:Button>
|
||||
<f:Button ID="btnUpdateImport" Text="更新导入" ToolTip="更新导入" Icon="PackageIn" runat="server" Hidden="true" OnClick="btnUpdateImport_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnPDMSImport" Text="PDMS导入" ToolTip="PDMS导入" Icon="PackageIn" runat="server" OnClick="btnPDMSImport_Click">
|
||||
<f:Button ID="btnPDMSImport" Text="导入" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnPDMSImport_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnMatImport" Text="材料导入" ToolTip="材料导入" Icon="PackageIn" runat="server" OnClick="btnMatImport_Click" Hidden="true">
|
||||
</f:Button>
|
||||
@@ -527,6 +531,12 @@
|
||||
Text="删除" Icon="Delete">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
<f:Menu ID="Menu4" runat="server">
|
||||
<f:MenuButton ID="btnMenuPipeLineAllDelete" OnClick="btnMenuPipeLineAllDelete_Click" EnablePostBack="true"
|
||||
ConfirmText="删除选中管线?" ConfirmTarget="Top" runat="server"
|
||||
Text="删除" Icon="Delete">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
<f:Menu ID="Menu2" runat="server">
|
||||
<f:MenuButton ID="btnDelMat" OnClick="btnDelMat_Click" EnablePostBack="true"
|
||||
ConfirmText="删除选中行?" ConfirmTarget="Top" runat="server"
|
||||
@@ -553,6 +563,7 @@
|
||||
var menuID1 = '<%= Menu1.ClientID %>';
|
||||
var menuID2 = '<%= Menu2.ClientID %>';
|
||||
var menuID3 = '<%= Menu3.ClientID %>';
|
||||
var menuID4 = '<%= Menu4.ClientID %>';
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu1(event, rowId) {
|
||||
F(menuID1).show(); //showAt(event.pageX, event.pageY);
|
||||
@@ -570,6 +581,12 @@
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onTreeNodeContextMenu(event, rowId) {
|
||||
F(menuID4).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -143,7 +143,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
foreach (var q in unitWork2)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId
|
||||
&& x.PipelineCode.Contains(this.tvPipeCode.Text.Trim())
|
||||
select x).Count();
|
||||
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
|
||||
@@ -550,7 +551,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
if (q != null && q.Count() > 0)
|
||||
{
|
||||
shopNum = (from x in q
|
||||
where x.JointAttribute == "预制口" select x
|
||||
where x.JointAttribute == "预制口"
|
||||
select x
|
||||
).Count();
|
||||
fieldNum = (from x in q
|
||||
where x.JointAttribute == "安装口"
|
||||
@@ -765,6 +767,38 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnMenuPipeLineAllDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_WeldJointMenuId, Const.BtnDelete))
|
||||
{
|
||||
if (this.tvControlItem.SelectedNode.CommandName != "管线")
|
||||
{
|
||||
Alert.ShowInTop("请选择一条管线!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string pipelineId = this.tvControlItem.SelectedNodeID;
|
||||
var weldJoints = from x in Funs.DB.HJGL_WeldJoint
|
||||
where x.PipelineId == pipelineId && x.WeldingDailyId != null
|
||||
select x;
|
||||
if (weldJoints.Count() > 0)
|
||||
{
|
||||
Alert.ShowInTop("存在已焊接的焊口,无法删除管线!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
BLL.WeldJointService.DeleteWeldJointByPipelineId(pipelineId);
|
||||
BLL.PipelineService.DeletePipeline(pipelineId);
|
||||
//BLL.Sys_LogService.AddLog(BLL.Const.System_6, this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_PipelineMenuId, Const.BtnDelete, rowID);
|
||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
|
||||
|
||||
this.InitTreeMenu();
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnDelMat_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_WeldJointMenuId, Const.BtnDelete))
|
||||
|
||||
@@ -7,12 +7,10 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
|
||||
|
||||
public partial class WeldJointList
|
||||
{
|
||||
public partial class WeldJointList {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
@@ -419,6 +417,24 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuPipeLineDelete;
|
||||
|
||||
/// <summary>
|
||||
/// Menu4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu4;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuPipeLineAllDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuPipeLineAllDelete;
|
||||
|
||||
/// <summary>
|
||||
/// Menu2 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -11,6 +11,16 @@
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Form runat="server" ShowBorder="true" ShowHeader="false">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:Button ID="btnAttachUrl" Text="详情" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
|
||||
OnClick="btnAttachUrl_Click" ValidateForms="SimpleForm1">
|
||||
</f:Button>
|
||||
<f:ToolbarFill runat="server"/>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:GroupPanel ID="GroupPanel3" Layout="Anchor" Title="管线数据" runat="server">
|
||||
<Items>
|
||||
@@ -139,6 +149,10 @@
|
||||
|
||||
</Items>
|
||||
</f:Form>
|
||||
<f:Window ID="WindowAtt" Title="附件" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
|
||||
Height="500px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -160,5 +160,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnAttachUrl_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/WeldJoint&menuId={1}&type=-1", Request.Params["WeldJointId"], BLL.Const.HJGL_WeldJointMenuId)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,6 +30,24 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// GroupPanel3 控件。
|
||||
/// </summary>
|
||||
@@ -281,5 +299,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox hdGrooveType;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user