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;
|
||||
|
||||
@@ -100,31 +100,31 @@ namespace BLL
|
||||
{
|
||||
var newWeldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(weldJointId);
|
||||
|
||||
if (newWeldJoint != null )
|
||||
if (newWeldJoint != null)
|
||||
{
|
||||
var isTrust = from x in Funs.DB.HJGL_Batch_BatchTrustItem
|
||||
where x.WeldJointId == weldJointId
|
||||
select x; ;
|
||||
if (!isTrust.Any())
|
||||
{
|
||||
var pointBatchItems = from x in Funs.DB.HJGL_Batch_PointBatchItem where x.WeldJointId == weldJointId select x;
|
||||
string pointBatchId = pointBatchItems.FirstOrDefault()?.PointBatchId;
|
||||
var pointBatchItems = from x in Funs.DB.HJGL_Batch_PointBatchItem where x.WeldJointId == weldJointId select x;
|
||||
string pointBatchId = pointBatchItems.FirstOrDefault()?.PointBatchId;
|
||||
|
||||
// 删除焊口所在批明细信息
|
||||
BLL.PointBatchDetailService.DeleteBatchDetail(weldJointId);
|
||||
// 删除焊口所在批明细信息
|
||||
BLL.PointBatchDetailService.DeleteBatchDetail(weldJointId);
|
||||
|
||||
// 删除批信息
|
||||
var batch = from x in Funs.DB.HJGL_Batch_PointBatchItem where x.PointBatchId == pointBatchId select x;
|
||||
if (!string .IsNullOrEmpty(pointBatchId) && !batch.Any())
|
||||
{
|
||||
DeleteBatch(pointBatchId);
|
||||
}
|
||||
//BLL.Batch_NDEItemService.DeleteAllNDEInfoToWeldJoint(item.WeldJointId);
|
||||
// 删除批信息
|
||||
var batch = from x in Funs.DB.HJGL_Batch_PointBatchItem where x.PointBatchId == pointBatchId select x;
|
||||
if (!string.IsNullOrEmpty(pointBatchId) && !batch.Any())
|
||||
{
|
||||
DeleteBatch(pointBatchId);
|
||||
}
|
||||
//BLL.Batch_NDEItemService.DeleteAllNDEInfoToWeldJoint(item.WeldJointId);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// errlog += "焊口【" + newWeldJoint.WeldJointCode + "】已进委托单了,不能删除。";
|
||||
// errlog += "焊口【" + newWeldJoint.WeldJointCode + "】已进委托单了,不能删除。";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace BLL
|
||||
IQueryable<Model.HJGL_PackagingManage> q1 = (from x in db.HJGL_PackagingManage
|
||||
join y in db.HJGL_Pipeline_Component on x.PipelineComponentId equals y.PipelineComponentId
|
||||
join z in db.HJGL_Pipeline on y.PipelineId equals z.PipelineId
|
||||
select x
|
||||
select x
|
||||
);
|
||||
if (!string.IsNullOrEmpty(name))
|
||||
{
|
||||
@@ -121,7 +121,7 @@ namespace BLL
|
||||
}
|
||||
return PlanStartDate;
|
||||
}
|
||||
public static List<PackagingManageItem> GetPackagingManageList(string projectId,string PackagingCode)
|
||||
public static List<PackagingManageItem> GetPackagingManageList(string projectId, string PackagingCode)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
@@ -131,7 +131,7 @@ namespace BLL
|
||||
join m in db.Person_Persons on x.ReceiveMan equals m.PersonId into tt
|
||||
from t in tt.DefaultIfEmpty()
|
||||
where x.ProjectId == projectId
|
||||
&&(string.IsNullOrEmpty(PackagingCode)|| x.PackagingCode.Contains(PackagingCode) )
|
||||
&& (string.IsNullOrEmpty(PackagingCode) || x.PackagingCode.Contains(PackagingCode))
|
||||
select new PackagingManageItem
|
||||
{
|
||||
PackagingManageId = x.PackagingManageId,
|
||||
@@ -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();
|
||||
@@ -156,8 +156,8 @@ namespace BLL
|
||||
/// <param name="PackagingManageId"></param>
|
||||
public static void PutOutOrder(string PackagingManageId)
|
||||
{
|
||||
var model= GetHJGL_PackagingManageById(PackagingManageId);
|
||||
if (model.State==state_0)
|
||||
var model = GetHJGL_PackagingManageById(PackagingManageId);
|
||||
if (model.State == state_0)
|
||||
{
|
||||
model.State = state_1;
|
||||
UpdateHJGL_PackagingManage(model);
|
||||
@@ -173,7 +173,7 @@ namespace BLL
|
||||
{
|
||||
DataTable tb = new DataTable();
|
||||
var model = GetHJGL_PackagingManageById(PackagingManageId);
|
||||
if (!string .IsNullOrEmpty(model.PipelineComponentId))
|
||||
if (!string.IsNullOrEmpty(model.PipelineComponentId))
|
||||
{
|
||||
var PipelineComponentIds = model.PipelineComponentId.Split(',');
|
||||
string strSql = @"select com.PipelineComponentId, com.PipelineComponentCode,pipe.PlanStartDate,unitwork.UnitWorkName,'1' as num ,'个' as CU
|
||||
@@ -195,7 +195,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
/// <param name="projectid"></param>
|
||||
/// <returns></returns>
|
||||
public static List<string > GetPackagingCode(string projectid)
|
||||
public static List<string> GetPackagingCode(string projectid)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = (from x in db.HJGL_PackagingManage
|
||||
@@ -244,8 +244,8 @@ namespace BLL
|
||||
table.ContactName = newtable.ContactName;
|
||||
table.ContactPhone = newtable.ContactPhone;
|
||||
table.Remark = newtable.Remark;
|
||||
table.ReceiveMan=newtable.ReceiveMan;
|
||||
table.ReceiveDate=newtable.ReceiveDate;
|
||||
table.ReceiveMan = newtable.ReceiveMan;
|
||||
table.ReceiveDate = newtable.ReceiveDate;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -20,24 +20,24 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 工厂预制
|
||||
/// </summary>
|
||||
public const string PipeArea_SHOP="1";
|
||||
public const string PipeArea_SHOP = "1";
|
||||
/// <summary>
|
||||
/// 现场安装
|
||||
/// </summary>
|
||||
public const string PipeArea_FIELD = "2";
|
||||
public const string PipeArea_FIELD = "2";
|
||||
|
||||
public const int pageSize = 20;
|
||||
public static List<Model.HJGL_Pipeline> hJGL_Pipelines
|
||||
{
|
||||
|
||||
get;
|
||||
set;
|
||||
get;
|
||||
set;
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 实际日期类型
|
||||
/// </summary>
|
||||
public enum ActDateType
|
||||
public enum ActDateType
|
||||
{
|
||||
/// <summary>
|
||||
/// 实际开始日期(预制)
|
||||
@@ -46,16 +46,16 @@ namespace BLL
|
||||
/// <summary>
|
||||
/// 实际完成日期(预制)
|
||||
/// </summary>
|
||||
ActDateEnd_Shop ,
|
||||
ActDateEnd_Shop,
|
||||
/// <summary>
|
||||
/// 实际开始日期(安装)
|
||||
/// </summary>
|
||||
ActDateStart_FIELD ,
|
||||
ActDateStart_FIELD,
|
||||
/// <summary>
|
||||
/// 实际完成日期(安装)
|
||||
/// </summary>
|
||||
ActDateEnd_FIELD ,
|
||||
}
|
||||
ActDateEnd_FIELD,
|
||||
}
|
||||
/// <summary>
|
||||
/// 管线划分
|
||||
/// </summary>
|
||||
@@ -67,7 +67,7 @@ namespace BLL
|
||||
list[1] = new ListItem("现场安装", PipeArea_FIELD);
|
||||
return list;
|
||||
}
|
||||
public static void RestPipelineAndJoints(string projectid )
|
||||
public static void RestPipelineAndJoints(string projectid)
|
||||
{
|
||||
PipelineService.hJGL_Pipelines = PipelineService.GetPipelinesByProjectId(projectid);
|
||||
WeldJointService.hJGL_WeldJoints = WeldJointService.GetWeldJointByProjectid(projectid);
|
||||
@@ -92,7 +92,7 @@ namespace BLL
|
||||
var PlanEndDate = mdoel.PlanEndDate;
|
||||
var ActStartDate = new DateTime?();
|
||||
var ActEndDate = new DateTime?();
|
||||
if (!string .IsNullOrEmpty(GetDateByPipelineId(pipelineId, ActDateType.ActDateStart_FIELD)))
|
||||
if (!string.IsNullOrEmpty(GetDateByPipelineId(pipelineId, ActDateType.ActDateStart_FIELD)))
|
||||
{
|
||||
ActStartDate = Convert.ToDateTime(GetDateByPipelineId(pipelineId, ActDateType.ActDateStart_FIELD));
|
||||
}
|
||||
@@ -100,22 +100,22 @@ namespace BLL
|
||||
{
|
||||
ActEndDate = Convert.ToDateTime(GetDateByPipelineId(pipelineId, ActDateType.ActDateEnd_FIELD));
|
||||
}
|
||||
if (PlanStartDate==null|| PlanEndDate==null)
|
||||
if (PlanStartDate == null || PlanEndDate == null)
|
||||
{
|
||||
mdoel.State = 0;
|
||||
|
||||
UpdatePipeline(mdoel);
|
||||
return;
|
||||
}
|
||||
if (ActStartDate==null&&DateTime.Compare(DateTime.Now,PlanStartDate.Value)<0)
|
||||
if (ActStartDate == null && DateTime.Compare(DateTime.Now, PlanStartDate.Value) < 0)
|
||||
{
|
||||
mdoel.State = 0;
|
||||
}
|
||||
else if(ActStartDate == null && DateTime.Compare(DateTime.Now, PlanStartDate.Value) > 0)
|
||||
else if (ActStartDate == null && DateTime.Compare(DateTime.Now, PlanStartDate.Value) > 0)
|
||||
{
|
||||
mdoel.State = 1;
|
||||
}
|
||||
else if (ActStartDate!=null && DateTime.Compare(ActStartDate.Value, PlanStartDate.Value)<0 && ActEndDate==null)
|
||||
else if (ActStartDate != null && DateTime.Compare(ActStartDate.Value, PlanStartDate.Value) < 0 && ActEndDate == null)
|
||||
{
|
||||
mdoel.State = 2;
|
||||
}
|
||||
@@ -138,7 +138,7 @@ namespace BLL
|
||||
/// <returns></returns>
|
||||
public static string GetDateByPipelineId(object pipelineId, ActDateType actDateType)
|
||||
{
|
||||
string result ="";
|
||||
string result = "";
|
||||
string _pipelineId = pipelineId.ToString();
|
||||
string ActDateStart_Shop = "";
|
||||
string ActDateEnd_Shop = "";
|
||||
@@ -149,15 +149,16 @@ 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
|
||||
select x).ToList();
|
||||
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();
|
||||
if (TaskJoints_Shop.Count>0)
|
||||
var TaskJoints_Field = TaskJoints.Where(x => x.JointAttribute == "安装口").ToList();
|
||||
if (TaskJoints_Shop.Count > 0)
|
||||
{
|
||||
ActDateStart_Shop = TaskJoints_Shop.OrderBy(x => x.TaskDate).First().TaskDate.Value.ToShortDateString();
|
||||
}
|
||||
if (joint_Shop_count== TaskJoints_Shop.Count&& joint_Shop_count>0)
|
||||
if (joint_Shop_count == TaskJoints_Shop.Count && joint_Shop_count > 0)
|
||||
{
|
||||
ActDateEnd_Shop = TaskJoints_Shop.OrderByDescending(x => x.TaskDate).First().TaskDate.Value.Date.ToShortDateString();
|
||||
}
|
||||
@@ -195,13 +196,13 @@ namespace BLL
|
||||
public static void UpdataDateByWeldJointId(string WeldJointId)
|
||||
{
|
||||
|
||||
DateTime ? ActDateStart_FIELD = new DateTime();
|
||||
DateTime ? ActDateEnd_FIELD = new DateTime();
|
||||
DateTime? ActDateStart_FIELD = new DateTime();
|
||||
DateTime? ActDateEnd_FIELD = new DateTime();
|
||||
|
||||
string JointAttribute = "";
|
||||
|
||||
var model_joint=BLL.WeldJointService.GetWeldJointByWeldJointId(WeldJointId);
|
||||
if (model_joint!=null)
|
||||
var model_joint = BLL.WeldJointService.GetWeldJointByWeldJointId(WeldJointId);
|
||||
if (model_joint != null)
|
||||
{
|
||||
JointAttribute = model_joint.JointAttribute;
|
||||
var model_pipeline = GetPipelineByPipelineId(model_joint.PipelineId);
|
||||
@@ -251,7 +252,7 @@ namespace BLL
|
||||
public static List<HJGL_Pipeline> GetHJGL_PipelineList(HJGL_Pipeline model)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var pipelineList =( from x in Funs.DB.HJGL_Pipeline
|
||||
var pipelineList = (from x in Funs.DB.HJGL_Pipeline
|
||||
where
|
||||
(string.IsNullOrEmpty(model.ProjectId) || x.ProjectId.Contains(model.ProjectId))
|
||||
&& (string.IsNullOrEmpty(model.UnitWorkId) || x.UnitWorkId.Contains(model.UnitWorkId))
|
||||
@@ -260,15 +261,15 @@ namespace BLL
|
||||
&& (string.IsNullOrEmpty(model.DesignPress) || x.DesignPress.Contains(model.DesignPress))
|
||||
/* && (string.IsNullOrEmpty(model.MaterialCode) || x.MaterialCode.Contains(model.MaterialCode))*/
|
||||
select x).ToList();
|
||||
if (model.IsFinished!=null)
|
||||
if (model.IsFinished != null)
|
||||
{
|
||||
if (model.IsFinished==true)
|
||||
if (model.IsFinished == true)
|
||||
{
|
||||
pipelineList= pipelineList.Where(x => x.IsFinished == true).ToList();
|
||||
pipelineList = pipelineList.Where(x => x.IsFinished == true).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
pipelineList = pipelineList.Where(x => x.IsFinished == false||x.IsFinished==null).ToList();
|
||||
pipelineList = pipelineList.Where(x => x.IsFinished == false || x.IsFinished == null).ToList();
|
||||
|
||||
}
|
||||
|
||||
@@ -338,16 +339,17 @@ namespace BLL
|
||||
/// </summary>
|
||||
/// <param name="unitworkId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<string> GetNoComPipelinesByUnitWordId(string unitworkId)
|
||||
public static List<string> GetNoComPipelinesByUnitWordId(string unitworkId)
|
||||
{
|
||||
var q = (from x in Funs.DB.View_HJGL_WeldJoint
|
||||
where x.UnitWorkId == unitworkId
|
||||
select new {
|
||||
PipelineId=x.PipelineId,
|
||||
WeldingDate=x.WeldingDate,
|
||||
PipelineCode=x.PipelineCode
|
||||
where x.UnitWorkId == unitworkId
|
||||
select new
|
||||
{
|
||||
PipelineId = x.PipelineId,
|
||||
WeldingDate = x.WeldingDate,
|
||||
PipelineCode = x.PipelineCode
|
||||
}).Distinct();
|
||||
if (q.Count()==0)
|
||||
if (q.Count() == 0)
|
||||
{
|
||||
return new List<string>();
|
||||
}
|
||||
@@ -359,10 +361,10 @@ namespace BLL
|
||||
Count = (from x2 in g where x2.WeldingDate != null && x2.WeldingDate != "" select x2).Count(),
|
||||
};
|
||||
var NowComPipelineCode = (from x in q
|
||||
join y in noCompipeline on x.PipelineId equals y.PipelineId
|
||||
where y.Count == 0
|
||||
select x.PipelineCode
|
||||
).Distinct(). ToList();
|
||||
join y in noCompipeline on x.PipelineId equals y.PipelineId
|
||||
where y.Count == 0
|
||||
select x.PipelineCode
|
||||
).Distinct().ToList();
|
||||
return NowComPipelineCode;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -370,7 +372,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
/// <param name="projectid"></param>
|
||||
/// <param name="unitworkid"></param>
|
||||
public static void DownPipeArea_SHOPFile(string projectid,string unitworkid)
|
||||
public static void DownPipeArea_SHOPFile(string projectid, string unitworkid)
|
||||
{
|
||||
string templatePath = Funs.RootPath + @"File\Excel\DataOut\WeldingPlanDataOut_SHOP.xlsx";
|
||||
string path = Funs.RootPath + @"File\Excel\DataOut\WeldingPlanDataOut_SHOP.xlsx";
|
||||
@@ -442,7 +444,7 @@ namespace BLL
|
||||
["Data"] = tb,
|
||||
};
|
||||
MiniExcel.SaveAsByTemplate(path, templatePath, value);
|
||||
HJGL_DataImportService.DownFile(path.Replace(Funs.RootPath,"") , "焊接施工计划(预制).xlsx");
|
||||
HJGL_DataImportService.DownFile(path.Replace(Funs.RootPath, ""), "焊接施工计划(预制).xlsx");
|
||||
File.Delete(path);
|
||||
}
|
||||
/// <summary>
|
||||
@@ -555,10 +557,10 @@ namespace BLL
|
||||
q = Funs.DB.HJGL_Pipeline.FirstOrDefault(x => x.PipelineCode == pipelineCode && x.UnitWorkId == unitWorkId);
|
||||
return q;
|
||||
}
|
||||
/// <summary>
|
||||
/// 添加管线信息
|
||||
/// </summary>
|
||||
/// <param name="pipeline"></param>
|
||||
/// <summary>
|
||||
/// 添加管线信息
|
||||
/// </summary>
|
||||
/// <param name="pipeline"></param>
|
||||
public static void AddPipeline(Model.HJGL_Pipeline pipeline)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
@@ -589,7 +591,7 @@ namespace BLL
|
||||
newPipeline.PCtype = pipeline.PCtype;
|
||||
newPipeline.MaterialId = pipeline.MaterialId;
|
||||
newPipeline.State = pipeline.State;
|
||||
newPipeline.FlowingSection=pipeline.FlowingSection;
|
||||
newPipeline.FlowingSection = pipeline.FlowingSection;
|
||||
db.HJGL_Pipeline.InsertOnSubmit(newPipeline);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
@@ -755,7 +757,7 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
|
||||
public static void BindTreeNodes(FineUIPro.TreeNode node,string pipecode,string ProjectId,int pageSize)
|
||||
public static void BindTreeNodes(FineUIPro.TreeNode node, string pipecode, string ProjectId, int pageSize)
|
||||
{
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == ProjectId && x.UnitWorkId == node.NodeID
|
||||
@@ -798,7 +800,7 @@ namespace BLL
|
||||
/// <param name="MaterialCode"></param>
|
||||
/// <param name="ProjectId"></param>
|
||||
/// <param name="pageSize"></param>
|
||||
public static void BindTreeNodes(FineUIPro.TreeNode node, string pipecode,string MaterialCode, string ProjectId, int pageSize)
|
||||
public static void BindTreeNodes(FineUIPro.TreeNode node, string pipecode, string MaterialCode, string ProjectId, int pageSize)
|
||||
{
|
||||
//var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
// where x.ProjectId == ProjectId && x.UnitWorkId == node.NodeID
|
||||
@@ -806,8 +808,8 @@ namespace BLL
|
||||
// orderby x.PipelineCode
|
||||
// select x).ToList();
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
join y in Funs.DB.HJGL_PipeLineMat.Where(m => m.MaterialCode.Contains(MaterialCode)) on x.PipelineId equals y.PipelineId
|
||||
where x.ProjectId == ProjectId && x.UnitWorkId == node.NodeID && x.PipelineCode.Contains(pipecode)
|
||||
join y in Funs.DB.HJGL_PipeLineMat.Where(m => m.MaterialCode.Contains(MaterialCode)) on x.PipelineId equals y.PipelineId
|
||||
where x.ProjectId == ProjectId && x.UnitWorkId == node.NodeID && x.PipelineCode.Contains(pipecode)
|
||||
select x).Distinct().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]);
|
||||
@@ -837,19 +839,25 @@ 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))
|
||||
if (!string.IsNullOrEmpty(pipecode))
|
||||
{
|
||||
strSql += " and PipelineCode=@PipelineCode ";
|
||||
listStr.Add(new SqlParameter("@PipelineCode", ""+ pipecode + ""));
|
||||
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]);
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace BLL
|
||||
{
|
||||
public static class WeldJointService
|
||||
{
|
||||
public static List<Model.HJGL_WeldJoint> hJGL_WeldJoints
|
||||
public static List<Model.HJGL_WeldJoint> hJGL_WeldJoints
|
||||
{
|
||||
|
||||
get;
|
||||
@@ -66,13 +66,13 @@ namespace BLL
|
||||
}
|
||||
public static List<Model.HJGL_WeldJoint> GetWeldJointsByPipelineId(string PipelineId)
|
||||
{
|
||||
var q = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == PipelineId select x).ToList();
|
||||
var q = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == PipelineId select x).ToList();
|
||||
return q;
|
||||
}
|
||||
|
||||
public static Model.HJGL_WeldJoint GetWeldJointsByWeldJointCode(string PipelineId, string WeldJointCode)
|
||||
{
|
||||
var q=(from x in Funs.DB.HJGL_WeldJoint where x.PipelineId==PipelineId && x.WeldJointCode==WeldJointCode select x ).FirstOrDefault();
|
||||
var q = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == PipelineId && x.WeldJointCode == WeldJointCode select x).FirstOrDefault();
|
||||
|
||||
return q;
|
||||
}
|
||||
@@ -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,
|
||||
@@ -97,7 +96,7 @@ namespace BLL
|
||||
Material2Id = weldJoint.Material2Id,
|
||||
Thickness = weldJoint.Thickness,
|
||||
Dia = weldJoint.Dia,
|
||||
DNDia=weldJoint.DNDia,
|
||||
DNDia = weldJoint.DNDia,
|
||||
Size = weldJoint.Size,
|
||||
DetectionTypeId = weldJoint.DetectionTypeId,
|
||||
JointArea = weldJoint.JointArea,
|
||||
@@ -120,18 +119,27 @@ namespace BLL
|
||||
Remark = weldJoint.Remark,
|
||||
IsTwoJoint = weldJoint.IsTwoJoint,
|
||||
SubmitMan = weldJoint.SubmitMan,
|
||||
TwoJointType=weldJoint.TwoJointType
|
||||
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;
|
||||
db.HJGL_WeldJoint.InsertAllOnSubmit(weldJoints);
|
||||
db.SubmitChanges();
|
||||
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>
|
||||
@@ -267,7 +293,7 @@ namespace BLL
|
||||
public static void DeleteWeldJointByPipelineId(string pipelineId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var weldline = db.HJGL_WeldJoint.Where(e => e.PipelineId == pipelineId);
|
||||
var weldline = db.HJGL_WeldJoint.Where(e => e.PipelineId == pipelineId);
|
||||
if (weldline != null)
|
||||
{
|
||||
db.HJGL_WeldJoint.DeleteAllOnSubmit(weldline);
|
||||
@@ -279,7 +305,7 @@ namespace BLL
|
||||
/// 根据unitworkid删除焊口
|
||||
/// </summary>
|
||||
/// <param name="unitworkId"></param>
|
||||
public static void DeleteWeldJointByUnitWorkId(string unitworkId)
|
||||
public static void DeleteWeldJointByUnitWorkId(string unitworkId)
|
||||
{
|
||||
var oldPipeline = BLL.PipelineService.GetPipelinesByUnitWordId(unitworkId);
|
||||
if (oldPipeline != null)
|
||||
@@ -335,14 +361,14 @@ namespace BLL
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = (from x in db.HJGL_WeldJoint
|
||||
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId into tt
|
||||
from g in tt.DefaultIfEmpty()
|
||||
where g.UnitWorkId == UnitWorkId
|
||||
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId into tt
|
||||
from g in tt.DefaultIfEmpty()
|
||||
where g.UnitWorkId == UnitWorkId
|
||||
select x).ToList();
|
||||
|
||||
return q;
|
||||
}
|
||||
public static List<Model.HJGL_WeldJoint> GetWeldJointByProjectid(string ProjectId)
|
||||
public static List<Model.HJGL_WeldJoint> GetWeldJointByProjectid(string ProjectId)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
|
||||
@@ -350,7 +376,7 @@ namespace BLL
|
||||
where x.ProjectId == ProjectId
|
||||
select x).ToList();
|
||||
return q;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据焊口Id获取插入焊口数
|
||||
@@ -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,7 +986,18 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
{
|
||||
c.RealEndDate = DateTime.Now;
|
||||
BLL.ControlItemAndCycleService.UpdateControlItemAndCycle(c);
|
||||
BLL.WorkPackageService.UpdateWorkPackageRealEndDate(c.WorkPackageId);
|
||||
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 //检查多次
|
||||
{
|
||||
@@ -989,7 +1006,18 @@ namespace FineUIPro.Web.CQMS.Check
|
||||
{
|
||||
c.RealEndDate = DateTime.Now;
|
||||
BLL.ControlItemAndCycleService.UpdateControlItemAndCycle(c);
|
||||
BLL.WorkPackageService.UpdateWorkPackageRealEndDate(c.WorkPackageId);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
newWelder.CertificateCode = this.txtCertificateCode.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,7 +815,14 @@ namespace FineUIPro.Web.CQMS.WBS
|
||||
protected void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveData();
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WorkPackageSet2In.aspx?WorkPackageId={0}", WorkPackageId, "导入 - ")));
|
||||
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"
|
||||
|
||||
@@ -94,8 +94,8 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
this.InitTreeMenu();//加载树
|
||||
this.JointComplete = 0;
|
||||
this.JointNoComplete =0;
|
||||
this.JointPre =0;
|
||||
this.JointNoComplete = 0;
|
||||
this.JointPre = 0;
|
||||
this.JointNoPre = 0;
|
||||
|
||||
}
|
||||
@@ -146,8 +146,8 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
|
||||
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
|
||||
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
|
||||
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
|
||||
//}
|
||||
if (unitWork1.Count() > 0)
|
||||
{
|
||||
@@ -182,7 +182,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
foreach (var q in unitWork2)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId
|
||||
&& x.PipelineCode.Contains(this.tvPipeCode.Text.Trim())
|
||||
|
||||
select x).Count();
|
||||
@@ -285,9 +285,9 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
|
||||
private void BindGrid()
|
||||
{
|
||||
Model.View_HJGL_WeldJoint model =new Model.View_HJGL_WeldJoint();
|
||||
Model.View_HJGL_WeldJoint model = new Model.View_HJGL_WeldJoint();
|
||||
model.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2 )
|
||||
if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
||||
{
|
||||
model.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
||||
|
||||
@@ -298,11 +298,11 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
|
||||
}
|
||||
model.WeldJointCode = this.txtWeldJointCode.Text;
|
||||
var list= BLL.WeldJointService.GetViewWeldJointsBymodel(model);
|
||||
var list = BLL.WeldJointService.GetViewWeldJointsBymodel(model);
|
||||
View_HJGL_WeldJoint = list;
|
||||
Grid1.RecordCount = list.Count;
|
||||
// var table = this.GetPagedDataTable(Grid1, list);
|
||||
var table = list.Skip(Grid1.PageSize * (Grid1.PageIndex)).Take(Grid1.PageSize).ToList();
|
||||
// var table = this.GetPagedDataTable(Grid1, list);
|
||||
var table = list.Skip(Grid1.PageSize * (Grid1.PageIndex)).Take(Grid1.PageSize).ToList();
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
|
||||
@@ -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,27 +545,32 @@ 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 {
|
||||
PipelineId=x.PipelineId,
|
||||
WeldingDate=x.WeldingDate,
|
||||
WeldJointCode=x.WeldJointCode,
|
||||
PipelineCode=x.PipelineCode,
|
||||
Size=x.Size,
|
||||
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,
|
||||
PipelineCode = x.PipelineCode,
|
||||
Size = x.Size,
|
||||
});
|
||||
var noCompipeline = from x in q
|
||||
group x by x.PipelineId into g
|
||||
select new
|
||||
{
|
||||
PipelineId = g.Key,
|
||||
Count = (from x2 in g where x2.WeldingDate!=null && x2.WeldingDate!="" select x2).Count(),
|
||||
};
|
||||
var Noweldjoint =( from x in q
|
||||
join y in noCompipeline on x.PipelineId equals y.PipelineId
|
||||
where y.Count == 0
|
||||
select new { 焊口号=x.WeldJointCode ,
|
||||
管线号=x.PipelineCode,
|
||||
达因=x.Size}).ToList();
|
||||
group x by x.PipelineId into g
|
||||
select new
|
||||
{
|
||||
PipelineId = g.Key,
|
||||
Count = (from x2 in g where x2.WeldingDate != null && x2.WeldingDate != "" select x2).Count(),
|
||||
};
|
||||
var Noweldjoint = (from x in q
|
||||
join y in noCompipeline on x.PipelineId equals y.PipelineId
|
||||
where y.Count == 0
|
||||
select new
|
||||
{
|
||||
焊口号 = x.WeldJointCode,
|
||||
管线号 = x.PipelineCode,
|
||||
达因 = 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");
|
||||
@@ -668,7 +674,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
parameter3D.Transparency = colorModel.PipelineComplete;
|
||||
parameter3D.Finished_color = colorModel.JointCompleteColor;
|
||||
parameter3D.Incomplete_color = colorModel.JointNOCompleteColor;
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName;
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl_Item(this.CurrUser.LoginProjectId) + parameter3D.ModelName;
|
||||
ctlAuditFlow.data = parameter3D;
|
||||
ctlAuditFlow.BindData();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
@@ -148,8 +149,8 @@ namespace FineUIPro.Web.HJGL.NDT
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
|
||||
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
|
||||
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
|
||||
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
|
||||
//}
|
||||
|
||||
if (unitWork1.Count() > 0)
|
||||
@@ -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();
|
||||
@@ -202,7 +210,7 @@ namespace FineUIPro.Web.HJGL.PersonManage
|
||||
}
|
||||
else
|
||||
{
|
||||
tn.Text = sitem.PersonName+"【"+ sitem.WelderCode + "】";
|
||||
tn.Text = sitem.PersonName + "【" + sitem.WelderCode + "】";
|
||||
}
|
||||
tn.EnableClickEvent = true;
|
||||
rootNode.Nodes.Add(tn);
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -36,10 +36,11 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
// ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId);
|
||||
// ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId);
|
||||
|
||||
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();//加载树
|
||||
@@ -92,8 +93,8 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
|
||||
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
|
||||
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
|
||||
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
|
||||
//}
|
||||
|
||||
if (unitWork1.Count() > 0)
|
||||
@@ -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)
|
||||
@@ -257,7 +261,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
ToolTip = "批",
|
||||
EnableClickEvent = true,
|
||||
};
|
||||
var pipeline= PointBatchService.GetPointBatchById(item.PointBatchId);
|
||||
var pipeline = PointBatchService.GetPointBatchById(item.PointBatchId);
|
||||
string startdate = string.Format("{0:yyyy-MM-dd}", pipeline.StartDate);
|
||||
string PipeArea = "";
|
||||
if (!string.IsNullOrEmpty(pipeline.PipelineId))
|
||||
@@ -272,22 +276,22 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
break;
|
||||
}
|
||||
}
|
||||
string code = "DK-" + item.PointBatchCode.Substring(item.PointBatchCode.Length - 4)+ PipeArea;
|
||||
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);
|
||||
|
||||
@@ -454,7 +458,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
if (!string.IsNullOrEmpty(txtpipelinecode.Text.Trim()))
|
||||
{
|
||||
strSql += " and PipelineCode like @PipelineCode ";
|
||||
listStr.Add(new SqlParameter("@PipelineCode", "%"+ txtpipelinecode.Text.Trim() + "%"));
|
||||
listStr.Add(new SqlParameter("@PipelineCode", "%" + txtpipelinecode.Text.Trim() + "%"));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
@@ -641,10 +645,105 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
var batch = BLL.PointBatchService.GetPointBatchById(this.PointBatchId);
|
||||
if (!batch.EndDate.HasValue)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Grid1.SelectedRowID) )
|
||||
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, "请选择");
|
||||
@@ -69,8 +70,8 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
|
||||
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
|
||||
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
|
||||
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
|
||||
//}
|
||||
|
||||
if (unitWork1.Count() > 0)
|
||||
@@ -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);
|
||||
|
||||
@@ -619,8 +623,8 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
return;
|
||||
}
|
||||
string reportId = this.tvControlItem.SelectedNode.NodeID;
|
||||
// Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(this.tvControlItem.SelectedNodeID);
|
||||
// Model.HJGL_Batch_PointBatch batch = BLL.PointBatchService.GetPointBatchById(this.tvControlItem.SelectedNodeID);
|
||||
// Model.View_Batch_BatchTrust trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(this.tvControlItem.SelectedNodeID);
|
||||
// Model.HJGL_Batch_PointBatch batch = BLL.PointBatchService.GetPointBatchById(this.tvControlItem.SelectedNodeID);
|
||||
var trust = BLL.Batch_BatchTrustService.GetBatchTrustViewByPointBatchId(reportId);
|
||||
var CH_WeldMethod = (from batch in Funs.DB.View_Batch_BatchTrustItem
|
||||
join joint in Funs.DB.View_HJGL_WeldJoint on batch.WeldJointId equals joint.WeldJointId
|
||||
@@ -655,10 +659,10 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
dr["CH_TrustCode"] = trust.TrustBatchCode;
|
||||
|
||||
}
|
||||
/* if (!string.IsNullOrEmpty(trust.CH_NDTCriteria))
|
||||
{
|
||||
dr["CH_NDTCriteria"] = trust.CH_NDTCriteria;
|
||||
}*/
|
||||
/* if (!string.IsNullOrEmpty(trust.CH_NDTCriteria))
|
||||
{
|
||||
dr["CH_NDTCriteria"] = trust.CH_NDTCriteria;
|
||||
}*/
|
||||
if (!string.IsNullOrEmpty(trust.DetectionTypeCode))
|
||||
{
|
||||
dr["CH_NDTMethod"] = trust.DetectionTypeCode;
|
||||
@@ -696,17 +700,17 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
{
|
||||
keyValuePairs.Add("supUnit", BLL.UnitService.GetUnitNameByUnitId(unitcheck.UnitId).ToString());
|
||||
}
|
||||
/* if (!string.IsNullOrEmpty(trust.CH_CheckUnit))
|
||||
{
|
||||
keyValuePairs.Add("CheckUnit", BLL.UnitService.GetUnitNameByUnitId(trust.CH_CheckUnit).ToString());
|
||||
/* if (!string.IsNullOrEmpty(trust.CH_CheckUnit))
|
||||
{
|
||||
keyValuePairs.Add("CheckUnit", BLL.UnitService.GetUnitNameByUnitId(trust.CH_CheckUnit).ToString());
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(trust.CH_TrustUnit))
|
||||
{
|
||||
keyValuePairs.Add("ConUnit", BLL.UnitService.GetUnitNameByUnitId(trust.CH_TrustUnit).ToString());
|
||||
}
|
||||
if (!string.IsNullOrEmpty(trust.CH_TrustUnit))
|
||||
{
|
||||
keyValuePairs.Add("ConUnit", BLL.UnitService.GetUnitNameByUnitId(trust.CH_TrustUnit).ToString());
|
||||
|
||||
}
|
||||
*/
|
||||
}
|
||||
*/
|
||||
|
||||
BLL.FastReportService.ResetData();
|
||||
BLL.FastReportService.AddFastreportTable(dt);
|
||||
|
||||
+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;
|
||||
@@ -75,15 +77,26 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
|
||||
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
|
||||
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
|
||||
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
|
||||
//}
|
||||
|
||||
if (unitWork1.Count() > 0)
|
||||
{
|
||||
foreach (var q in unitWork1)
|
||||
{
|
||||
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;
|
||||
@@ -137,10 +161,27 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
List<Model.HJGL_Pipeline> pipeline = new List<Model.HJGL_Pipeline>();
|
||||
pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == node.NodeID
|
||||
&& 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> { };
|
||||
@@ -282,19 +316,32 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
strSql += " AND WeldJointCode LIKE @WeldJointCode";
|
||||
listStr.Add(new SqlParameter("@WeldJointCode", "%" + this.txtWeldJointCode.Text.Trim() + "%"));
|
||||
}
|
||||
if (DropTwoJointType.SelectedValue!=BLL.Const._Null)
|
||||
if (DropTwoJointType.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
strSql += " AND TwoJointType = @TwoJointType";
|
||||
listStr.Add(new SqlParameter("@TwoJointType", DropTwoJointType.SelectedValue));
|
||||
}
|
||||
if (ckIsAudit.Checked==true)
|
||||
if (rbIsAudit.SelectedValue != "2")
|
||||
{
|
||||
strSql += " and AuditDate is null";
|
||||
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();
|
||||
lbSize.Text=SizeSum.ToString();
|
||||
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;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
@@ -330,9 +377,21 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
strSql += " AND TwoJointType = @TwoJointType";
|
||||
listStr.Add(new SqlParameter("@TwoJointType", DropTwoJointType.SelectedValue));
|
||||
}
|
||||
if (ckIsAudit.Checked == true)
|
||||
if (rbIsAudit.SelectedValue != "2")
|
||||
{
|
||||
strSql += " and AuditDate is null";
|
||||
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);
|
||||
@@ -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>
|
||||
|
||||
@@ -166,8 +166,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
var ds = MiniExcel.Query(fileName).ToList();
|
||||
var columns = MiniExcel.GetColumns(fileName);
|
||||
var cnt = columns.Count;
|
||||
var reposedata = AddDatasetToSQL(ds, cnt);
|
||||
if (reposedata.code==1)
|
||||
var reposedata = AddDatasetToSQL(ds, cnt);
|
||||
if (reposedata.code == 1)
|
||||
{
|
||||
State = (int)ButtonState.Import;
|
||||
ShowNotify("审核完成请点击导入");
|
||||
@@ -204,7 +204,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
private Model.ResponeData AddDatasetToSQL(List<dynamic> pds, int count)
|
||||
{
|
||||
Model.ResponeData responeData = new Model.ResponeData();
|
||||
// string result = string.Empty;
|
||||
// string result = string.Empty;
|
||||
List<string> result = new List<string>();
|
||||
//pds = BLL.Funs.FilterBlankLines(pds);
|
||||
if (count < 28)
|
||||
@@ -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"];
|
||||
@@ -245,7 +245,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
string pipeLineId = string.Empty;
|
||||
if (string.IsNullOrEmpty(col0))
|
||||
{
|
||||
result.Add( "第" + (i + 1).ToString() + "行," + "管线号" + "," + "此项为必填项!" + "|");
|
||||
result.Add("第" + (i + 1).ToString() + "行," + "管线号" + "," + "此项为必填项!" + "|");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -265,8 +265,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
var Medium = getMedium.FirstOrDefault(x => x.MediumCode == col3);
|
||||
if (Medium == null)
|
||||
{
|
||||
// result += "第" + (i + 1).ToString() + "行," + "该介质不存在!" + "|";
|
||||
result .Add( col3 + "-该介质不存在!" + "|");
|
||||
// result += "第" + (i + 1).ToString() + "行," + "该介质不存在!" + "|";
|
||||
result.Add(col3 + "-该介质不存在!" + "|");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -284,7 +284,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
var PipeLineClass = getPipeLineClass.FirstOrDefault(x => x.PipingClassCode == col4);
|
||||
if (PipeLineClass == null)
|
||||
{
|
||||
// result += "第" + (i + 1).ToString() + "行," + "该管道等级不存在!" + "|";
|
||||
// result += "第" + (i + 1).ToString() + "行," + "该管道等级不存在!" + "|";
|
||||
result.Add(col4 + "-该管道等级不存在!" + "|");
|
||||
}
|
||||
else
|
||||
@@ -299,7 +299,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
var DetectionRate = getDetectionRate.FirstOrDefault(x => x.DetectionRateValue.ToString() == col5.Replace("%", "") || x.DetectionRateCode == col5);
|
||||
if (DetectionRate == null)
|
||||
{
|
||||
// result += "第" + (i + 1).ToString() + "行," + "该探伤比例不存在!" + "|";
|
||||
// result += "第" + (i + 1).ToString() + "行," + "该探伤比例不存在!" + "|";
|
||||
result.Add(col5 + "-该探伤比例不存在!" + "|");
|
||||
}
|
||||
else
|
||||
@@ -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)
|
||||
string typeStr = col6.ToString();
|
||||
var type = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == typeStr);
|
||||
if (type == null)
|
||||
{
|
||||
var type = getDetectionType.FirstOrDefault(x => x.DetectionTypeCode == t);
|
||||
if (type == null)
|
||||
{
|
||||
//result += "第" + (i + 1).ToString() + "行," + "探伤类型【" + t + "】不存在!" + "|";
|
||||
result.Add("探伤类型【" + t + "】不存在!" + "|");
|
||||
}
|
||||
else
|
||||
{
|
||||
pipeline.DetectionType += type.DetectionTypeId + "|";
|
||||
}
|
||||
//result += "第" + (i + 1).ToString() + "行," + "探伤类型【" + t + "】不存在!" + "|";
|
||||
result.Add("探伤类型【" + typeStr + "】不存在!" + "|");
|
||||
}
|
||||
if (!string.IsNullOrEmpty(pipeline.DetectionType))
|
||||
else
|
||||
{
|
||||
pipeline.DetectionType = pipeline.DetectionType.Substring(0, pipeline.DetectionType.Length - 1);
|
||||
pipeline.DetectionType = type.DetectionTypeId;
|
||||
pipeline.DetectionTypeStr = col6;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -378,7 +370,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
var PressurePipingClass = getPressurePipingClass.FirstOrDefault(x => x.PressurePipingClassCode == col11);
|
||||
if (PressurePipingClass == null)
|
||||
{
|
||||
// result += "第" + (i + 1).ToString() + "行," + "该压力管道级别不存在!" + "|";
|
||||
// result += "第" + (i + 1).ToString() + "行," + "该压力管道级别不存在!" + "|";
|
||||
result.Add(col11 + "-该压力管道级别不存在!" + "|");
|
||||
}
|
||||
else
|
||||
@@ -447,7 +439,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
var material = getMaterial.FirstOrDefault(x => x.MaterialCode == col17);
|
||||
if (material == null)
|
||||
{
|
||||
// result += "第" + (i + 1).ToString() + "行," + "该材质不存在!" + "|";
|
||||
// result += "第" + (i + 1).ToString() + "行," + "该材质不存在!" + "|";
|
||||
result.Add(col17 + "-该材质不存在!" + "|");
|
||||
}
|
||||
else
|
||||
@@ -456,7 +448,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
pipeline.PipeMaterialCode = col17;
|
||||
}
|
||||
}
|
||||
pipeline.FlowingSection= Convert.ToString(pds[i].S);
|
||||
pipeline.FlowingSection = Convert.ToString(pds[i].S);
|
||||
pipeline.Remark = Convert.ToString(pds[i].T);
|
||||
|
||||
// 以下是焊口信息
|
||||
@@ -480,7 +472,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
|
||||
string col20 = "";
|
||||
if (pds[i].V!=null)
|
||||
if (pds[i].V != null)
|
||||
{
|
||||
col20 = pds[i].V.ToString();
|
||||
}
|
||||
@@ -490,7 +482,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
var material = getMaterial.FirstOrDefault(x => x.MaterialCode == col20);
|
||||
if (material == null)
|
||||
{
|
||||
// result += "第" + (i + 1).ToString() + "行," + "该材质1不存在!" + "|";
|
||||
// result += "第" + (i + 1).ToString() + "行," + "该材质1不存在!" + "|";
|
||||
result.Add(col20 + "-该材质1不存在!" + "|");
|
||||
}
|
||||
else
|
||||
@@ -505,7 +497,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
|
||||
string col21 = "";
|
||||
if (pds[i].W!=null)
|
||||
if (pds[i].W != null)
|
||||
{
|
||||
col21 = pds[i].W.ToString();
|
||||
}
|
||||
@@ -531,9 +523,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
|
||||
string col22 = Convert.ToString(pds[i].X);
|
||||
string col27 = "";
|
||||
if (pds[i].AC!=null)
|
||||
if (pds[i].AC != null)
|
||||
{
|
||||
col27= pds[i].AC.ToString();
|
||||
col27 = pds[i].AC.ToString();
|
||||
}
|
||||
if (rbDiaType.SelectedValue == "1")
|
||||
{
|
||||
@@ -576,7 +568,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
|
||||
|
||||
var col23 = Convert.ToString(pds[i].Y);
|
||||
if (col23!=null)
|
||||
if (col23 != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -594,7 +586,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
|
||||
var col24 = Convert.ToString(pds[i].Z);
|
||||
if (col24!=null)
|
||||
if (col24 != null)
|
||||
{
|
||||
// var Thickness = Convert.ToDecimal(col24);
|
||||
decimal Thickness = 0;
|
||||
@@ -603,12 +595,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
if (rbDiaType.SelectedValue == "1")//外径
|
||||
{
|
||||
Thickness = (decimal)BLL.Base_DNCompareService.GetThicknessByDia(pipeline.Dia,thickness);
|
||||
Thickness = (decimal)BLL.Base_DNCompareService.GetThicknessByDia(pipeline.Dia, thickness);
|
||||
pipeline.Thickness = Thickness;
|
||||
}
|
||||
else //DN直径
|
||||
{
|
||||
Thickness = (decimal)BLL.Base_DNCompareService.GetThicknessByDNDia(int.Parse( pipeline.DNDia.Replace("DN","")), thickness);
|
||||
Thickness = (decimal)BLL.Base_DNCompareService.GetThicknessByDNDia(int.Parse(pipeline.DNDia.Replace("DN", "")), thickness);
|
||||
pipeline.Thickness = Thickness;
|
||||
}
|
||||
}
|
||||
@@ -658,7 +650,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
var weldType = getWeldType.FirstOrDefault(x => x.WeldTypeCode == col25);
|
||||
if (weldType == null)
|
||||
{
|
||||
// result += "第" + (i + 1).ToString() + "行," + "该焊缝类型不存在!" + "|";
|
||||
// result += "第" + (i + 1).ToString() + "行," + "该焊缝类型不存在!" + "|";
|
||||
result.Add(col25 + "-该焊缝类型不存在!" + "|");
|
||||
}
|
||||
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;
|
||||
@@ -840,9 +832,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
|
||||
string rootPath = Server.MapPath("~/");
|
||||
string oldefilePath = rootPath+initPath + this.hdFileName.Text;
|
||||
string oldefilePath = rootPath + initPath + this.hdFileName.Text;
|
||||
string unitworkId = Request.Params["UnitWorkId"];
|
||||
string filePath = rootPath+ Const.DesignBasisDataImportPath + this.hdFileName.Text;
|
||||
string filePath = rootPath + Const.DesignBasisDataImportPath + this.hdFileName.Text;
|
||||
if (oldefilePath != string.Empty && System.IO.File.Exists(oldefilePath))
|
||||
{
|
||||
if (!Directory.Exists(rootPath + Const.DesignBasisDataImportPath))
|
||||
@@ -863,8 +855,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
BLL.PipelineService.DeletePipelineByUnitworkId(unitworkId);//删除原有管线
|
||||
AddView_HJGL_WeldJoint(PipelineList);//导入数据
|
||||
|
||||
Model .HJGL_DesignBasisDataImport hJGL_DesignBasisDataImport = new Model .HJGL_DesignBasisDataImport();
|
||||
hJGL_DesignBasisDataImport.DesignBasisDataImportId= SQLHelper.GetNewID();
|
||||
Model.HJGL_DesignBasisDataImport hJGL_DesignBasisDataImport = new Model.HJGL_DesignBasisDataImport();
|
||||
hJGL_DesignBasisDataImport.DesignBasisDataImportId = SQLHelper.GetNewID();
|
||||
hJGL_DesignBasisDataImport.ProjectId = this.CurrUser.LoginProjectId;
|
||||
hJGL_DesignBasisDataImport.UnitWorkId = unitworkId;
|
||||
hJGL_DesignBasisDataImport.ImportType = "1";
|
||||
@@ -872,7 +864,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
hJGL_DesignBasisDataImport.FileName = FileName;
|
||||
hJGL_DesignBasisDataImport.FilePath = filePath.Replace(rootPath, "");
|
||||
hJGL_DesignBasisDataImport.FileType = BLL.HJGL_DesignBasisDataImportService.GetFileType(FileName);
|
||||
hJGL_DesignBasisDataImport.Version = BLL.HJGL_DesignBasisDataImportService.GetNewVersionByUnitWorkId(unitworkId,DataClassification);
|
||||
hJGL_DesignBasisDataImport.Version = BLL.HJGL_DesignBasisDataImportService.GetNewVersionByUnitWorkId(unitworkId, DataClassification);
|
||||
hJGL_DesignBasisDataImport.Remark = txtRemark.Text;
|
||||
hJGL_DesignBasisDataImport.CreateMan = this.CurrUser.PersonId;
|
||||
hJGL_DesignBasisDataImport.CreateDate = DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss");
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
HJGL_MaterialService.materialStockItems_FIELD = new List<Model.MaterialStockItem>();
|
||||
HJGL_MaterialService.materialStockItems_SHOP = new List<Model.MaterialStockItem>();
|
||||
|
||||
Tree_hJGL_Pipelines =new List<HJGL_Pipeline> ();
|
||||
Tree_hJGL_Pipelines = new List<HJGL_Pipeline>();
|
||||
this.txtTaskDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now.AddDays(1));
|
||||
this.txtTaskCode.Text = BLL.WeldTaskService.GetTaskCodeByDate(this.CurrUser.LoginProjectId, this.txtTaskDate.Text);
|
||||
BLL.Base_WeldingLocationServie.InitWeldingLocationDropDownList(drpWeldingLocation, true);
|
||||
@@ -169,8 +169,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
private void InitTreeMenu()
|
||||
{
|
||||
this.tvControlItem.Nodes.Clear();
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == this.UnitWorkId && x.PipeArea == PipelineService.PipeArea_SHOP && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) select x).Count();
|
||||
int b = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == this.UnitWorkId && x.PipeArea == PipelineService.PipeArea_FIELD && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) select x).Count();
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == this.UnitWorkId && x.PipeArea == PipelineService.PipeArea_SHOP && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) select x).Count();
|
||||
int b = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == this.UnitWorkId && x.PipeArea == PipelineService.PipeArea_FIELD && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) select x).Count();
|
||||
|
||||
TreeNode rootNode1 = new TreeNode();
|
||||
rootNode1.NodeID = BLL.PipelineService.PipeArea_SHOP;
|
||||
@@ -195,22 +195,23 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
this.tvControlItem.Nodes.Add(rootNode2);
|
||||
if (b > 0)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = "加载管线...";
|
||||
newNode.NodeID = "加载管线...";
|
||||
rootNode2.Nodes.Add(newNode);
|
||||
}
|
||||
|
||||
}
|
||||
void AddTreeNode(string PipeArea , TreeNode node )
|
||||
void AddTreeNode(string PipeArea, TreeNode node)
|
||||
{
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == this.UnitWorkId
|
||||
&& x.PipeArea == PipeArea
|
||||
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
||||
orderby x.PipelineCode select x).ToList();
|
||||
if (!string .IsNullOrEmpty( drpFlowingSection.SelectedValue)&& drpFlowingSection.SelectedValue!=Const._Null)
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == this.UnitWorkId
|
||||
&& x.PipeArea == PipeArea
|
||||
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.SelectedValue != Const._Null)
|
||||
{
|
||||
pipeline = pipeline.Where(x => x.FlowingSection == drpFlowingSection.SelectedValue).ToList();
|
||||
}
|
||||
@@ -316,7 +317,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
string pipelineId = this.tvControlItem.SelectedNodeID;
|
||||
|
||||
var toDoMatterList = (from x in Funs.DB.View_HJGL_NoWeldJointFind
|
||||
where x.PipelineId == pipelineId && x.WeldingDailyId == null &&x.JointAttribute==drpJointAttribute.SelectedValue
|
||||
where x.PipelineId == pipelineId && x.WeldingDailyId == null && x.JointAttribute == drpJointAttribute.SelectedValue
|
||||
&& (string.IsNullOrEmpty(drpWeldTypeCode.SelectedValue) || x.WeldTypeCode.Contains(drpWeldTypeCode.SelectedValue))
|
||||
select x).ToList();
|
||||
|
||||
@@ -363,9 +364,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
private void InitDropList()
|
||||
{
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == this.UnitWorkId
|
||||
select x.FlowingSection).Distinct().ToList();
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == this.UnitWorkId
|
||||
select x.FlowingSection).Distinct().ToList();
|
||||
this.drpFlowingSection.DataTextField = "Value";
|
||||
this.drpFlowingSection.DataValueField = "Value";
|
||||
this.drpFlowingSection.DataSource = pipeline;
|
||||
@@ -571,7 +572,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
NewTask.Tabler = this.CurrUser.PersonId;
|
||||
NewTask.TableDate = DateTime.Now;
|
||||
|
||||
weldJoint.WeldingMode= drpWeldingMode.SelectedValue;
|
||||
weldJoint.WeldingMode = drpWeldingMode.SelectedValue;
|
||||
BLL.WeldJointService.UpdateWeldJoint(weldJoint);
|
||||
BLL.WeldTaskService.AddWeldTask(NewTask);
|
||||
}
|
||||
|
||||
@@ -236,9 +236,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
string perfix = txtPipelineCode.Text + "/";
|
||||
this.txtWeldJointCode.Text = perfix;
|
||||
|
||||
// txtWeldJointCode.Text = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_WeldJoint", "WeldJointCode", this.CurrUser.LoginProjectId, perfix);
|
||||
// txtWeldJointCode.Text = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_WeldJoint", "WeldJointCode", this.CurrUser.LoginProjectId, perfix);
|
||||
|
||||
// txtWeldJointCode.Text = txtWeldJointCode.Text.Replace(perfix, "");
|
||||
// txtWeldJointCode.Text = txtWeldJointCode.Text.Replace(perfix, "");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -277,52 +277,42 @@ 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;
|
||||
|
||||
int joint = Funs.GetNewIntOrZero(this.txtWeldJointCode.Text.Trim());
|
||||
|
||||
if (joint != 0)
|
||||
{
|
||||
string weldJointCode = string.Empty;
|
||||
|
||||
int joint = Funs.GetNewIntOrZero(this.txtWeldJointCode.Text.Trim());
|
||||
|
||||
if (joint != 0)
|
||||
if (joint < 10)
|
||||
{
|
||||
if (joint < 10)
|
||||
{
|
||||
weldJointCode = "0" + Convert.ToString(joint);
|
||||
}
|
||||
else
|
||||
{
|
||||
weldJointCode = Convert.ToString(joint);
|
||||
}
|
||||
weldJointCode = "0" + Convert.ToString(joint);
|
||||
}
|
||||
else
|
||||
{
|
||||
weldJointCode = this.txtWeldJointCode.Text;
|
||||
weldJointCode = Convert.ToString(joint);
|
||||
}
|
||||
|
||||
if (BLL.WeldJointService.IsExistWeldJointCode(weldJointCode, this.PipelineId, WeldJointId))
|
||||
{
|
||||
Alert.ShowInTop("该管线焊口已存在!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
SaveData();
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
weldJointCode = this.txtWeldJointCode.Text;
|
||||
}
|
||||
|
||||
if (BLL.WeldJointService.IsExistWeldJointCode(weldJointCode, this.PipelineId, WeldJointId))
|
||||
{
|
||||
Alert.ShowInTop("该管线焊口已存在!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
SaveData(true);
|
||||
}
|
||||
}
|
||||
/// <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 || 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)
|
||||
{
|
||||
Alert.ShowInTop("页面必填项不能为空", MessageBoxIcon.Warning);
|
||||
@@ -337,22 +327,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
|
||||
//if (!this.txtWeldJointCode.Text.Contains("G"))
|
||||
//{
|
||||
int jointCode = Funs.GetNewIntOrZero(this.txtWeldJointCode.Text.Trim());
|
||||
if (jointCode != 0)
|
||||
int jointCode = Funs.GetNewIntOrZero(this.txtWeldJointCode.Text.Trim());
|
||||
if (jointCode != 0)
|
||||
{
|
||||
if (jointCode < 10)
|
||||
{
|
||||
if (jointCode < 10)
|
||||
{
|
||||
joint.WeldJointCode = "0" + Convert.ToString(jointCode);
|
||||
}
|
||||
else
|
||||
{
|
||||
joint.WeldJointCode = Convert.ToString(jointCode);
|
||||
}
|
||||
joint.WeldJointCode = "0" + Convert.ToString(jointCode);
|
||||
}
|
||||
else
|
||||
{
|
||||
joint.WeldJointCode = this.txtWeldJointCode.Text;
|
||||
joint.WeldJointCode = Convert.ToString(jointCode);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
joint.WeldJointCode = this.txtWeldJointCode.Text;
|
||||
}
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
@@ -370,7 +360,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
joint.Size = Funs.GetNewDecimal(this.txtSize.Text.Trim());
|
||||
joint.Dia = Funs.GetNewDecimal(this.txtDia.Text.Trim());
|
||||
joint.DNDia=txtDNDia.Text.Trim();
|
||||
joint.DNDia = txtDNDia.Text.Trim();
|
||||
joint.Thickness = Funs.GetNewDecimal(this.txtThickness.Text.Trim());
|
||||
//if (this.drpComponent1.SelectedValue != BLL.Const._Null)
|
||||
//{
|
||||
@@ -467,8 +457,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
|
||||
BLL.WeldJointService.AddWeldJoint(joint);
|
||||
}
|
||||
ShowNotify("提交成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
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,7 +11,8 @@
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
.customlabelNum span {
|
||||
|
||||
.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>
|
||||
@@ -99,10 +103,10 @@
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:Label ID="lbSinglePreRate" CssClass="customlabel" runat="server" Label="主项预制率(达因)" LabelWidth="140"></f:Label>
|
||||
<f:Label ID="lbSinglePreRate" CssClass="customlabel" runat="server" Label="主项预制率(达因)" LabelWidth="140"></f:Label>
|
||||
<f:Label ID="lbShopSize" CssClass="customlabel" runat="server" Label="预制口达因" LabelWidth="100"></f:Label>
|
||||
<f:Label ID="lbFiledSize" CssClass="customlabel" runat="server" Label="安装口达因" LabelWidth="100"></f:Label>
|
||||
<f:Label ID="Label2" runat="server" LabelWidth="100"></f:Label>
|
||||
<f:Label ID="Label2" runat="server" LabelWidth="100"></f:Label>
|
||||
<f:Label ID="lbSinglePreRateByWeldJoint" CssClass="customlabelNum" runat="server" Label="主项预制率(焊口)" LabelWidth="140"></f:Label>
|
||||
<f:Label ID="lbShopSum" CssClass="customlabelNum" runat="server" Label="预制口数量" LabelWidth="140"></f:Label>
|
||||
<f:Label ID="lbFiledSum" CssClass="customlabelNum" runat="server" Label="安装口数量" LabelWidth="140"></f:Label>
|
||||
@@ -197,7 +201,7 @@
|
||||
FieldType="String" HeaderText="材质" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="FlowingSection" DataField="FlowingSection" SortField="FlowingSection"
|
||||
<f:RenderField Width="100px" ColumnID="FlowingSection" DataField="FlowingSection" SortField="FlowingSection"
|
||||
FieldType="String" HeaderText="流水段" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
@@ -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>
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
public partial class WeldJointList : PageBase
|
||||
{
|
||||
public int pageSize = PipelineService.pageSize;
|
||||
public static List<Model.HJGL_WeldJoint> WeldJointlist = new List<Model.HJGL_WeldJoint>();
|
||||
public static List<Model.HJGL_WeldJoint> WeldJointlist = new List<Model.HJGL_WeldJoint>();
|
||||
/// <summary>
|
||||
/// 预制口总达因
|
||||
/// </summary>
|
||||
@@ -40,7 +40,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
// WeldJointlist = WeldJointService.GetWeldJointByProjectid(this.CurrUser.LoginProjectId);
|
||||
// WeldJointlist = WeldJointService.GetWeldJointByProjectid(this.CurrUser.LoginProjectId);
|
||||
this.InitTreeMenu();//加载树
|
||||
//显示列
|
||||
//Model.Sys_UserShowColumns c = BLL.UserShowColumnsService.GetColumnsByUserId(this.CurrUser.PersonId, "Joint");
|
||||
@@ -111,8 +111,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
|
||||
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
|
||||
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
|
||||
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
|
||||
//}
|
||||
|
||||
if (unitWork1.Count() > 0)
|
||||
@@ -143,8 +143,9 @@ 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
|
||||
&& x.PipelineCode.Contains(this.tvPipeCode.Text.Trim())
|
||||
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);
|
||||
TreeNode tn2 = new TreeNode();
|
||||
@@ -157,7 +158,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
tn2.ToolTip = "施工单位:" + unitNamesUnitIds;
|
||||
tn2.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize);
|
||||
tn2.EnableExpandEvent = true;
|
||||
tn2.EnableClickEvent= true;
|
||||
tn2.EnableClickEvent = true;
|
||||
rootNode2.Nodes.Add(tn2);
|
||||
if (a > 0)
|
||||
{
|
||||
@@ -175,7 +176,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
#region
|
||||
private void BindNodes(TreeNode node)
|
||||
{
|
||||
BLL.PipelineService.BindTreeNodes(node, this.tvPipeCode.Text.Trim(), this.CurrUser.LoginProjectId,pageSize);
|
||||
BLL.PipelineService.BindTreeNodes(node, this.tvPipeCode.Text.Trim(), this.CurrUser.LoginProjectId, pageSize);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -411,29 +412,29 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
#endregion
|
||||
|
||||
#region 预制率计算
|
||||
private string GetRateByUnitWork(string unitworkid)
|
||||
private string GetRateByUnitWork(string unitworkid)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var q=from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid select x ;
|
||||
var q = from x in db.View_HJGL_WeldJoint where x.UnitWorkId == unitworkid select x;
|
||||
string rate = "";
|
||||
ShopSumSize = "0";
|
||||
FieldSumSize = "0";
|
||||
if (q!=null&&q.Count()>0)
|
||||
if (q != null && q.Count() > 0)
|
||||
{
|
||||
var proSum = (from x in q
|
||||
where x.JointAttribute == "预制口"
|
||||
where x.JointAttribute == "预制口"
|
||||
group x by x.UnitWorkId into g
|
||||
select new
|
||||
{
|
||||
SizeSum = g.Sum(x => x.Size)
|
||||
}).FirstOrDefault()?.SizeSum;
|
||||
var FieldSum = (from x in q
|
||||
where x.JointAttribute == "安装口"
|
||||
group x by x.UnitWorkId into g
|
||||
select new
|
||||
{
|
||||
SizeSum = g.Sum(x => x.Size)
|
||||
}).FirstOrDefault()?.SizeSum;
|
||||
where x.JointAttribute == "安装口"
|
||||
group x by x.UnitWorkId into g
|
||||
select new
|
||||
{
|
||||
SizeSum = g.Sum(x => x.Size)
|
||||
}).FirstOrDefault()?.SizeSum;
|
||||
var AllSum = (from x in q
|
||||
group x by x.UnitWorkId into g
|
||||
select new
|
||||
@@ -442,12 +443,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}).FirstOrDefault()?.SizeSum;
|
||||
proSum = (proSum != null) ? proSum : 0;
|
||||
FieldSum = (FieldSum != null) ? FieldSum : 0;
|
||||
ShopSumSize = proSum.ToString() ;
|
||||
FieldSumSize = FieldSum.ToString() ;
|
||||
if (AllSum>0)
|
||||
ShopSumSize = proSum.ToString();
|
||||
FieldSumSize = FieldSum.ToString();
|
||||
if (AllSum > 0)
|
||||
{
|
||||
var a = (decimal)100 * proSum / AllSum;
|
||||
rate = Math.Round((decimal)a, 1).ToString()+"%";
|
||||
rate = Math.Round((decimal)a, 1).ToString() + "%";
|
||||
}
|
||||
|
||||
return rate;
|
||||
@@ -496,28 +497,28 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
var q = from x in db.View_HJGL_WeldJoint where x.PipelineId == pipelineid select x;
|
||||
if (q != null && q.Count() > 0)
|
||||
{
|
||||
var proSumModel= (from x in q
|
||||
where x.JointAttribute == "预制口"
|
||||
group x by x.PipelineId into g
|
||||
select new
|
||||
{
|
||||
SizeSum = g.Sum(x => x.Size)
|
||||
}).FirstOrDefault();
|
||||
var proSum= (proSumModel !=null) ? proSumModel.SizeSum : 0;
|
||||
var proSumModel = (from x in q
|
||||
where x.JointAttribute == "预制口"
|
||||
group x by x.PipelineId into g
|
||||
select new
|
||||
{
|
||||
SizeSum = g.Sum(x => x.Size)
|
||||
}).FirstOrDefault();
|
||||
var proSum = (proSumModel != null) ? proSumModel.SizeSum : 0;
|
||||
var FieldSumModel = (from x in q
|
||||
where x.JointAttribute == "安装口"
|
||||
group x by x.PipelineId into g
|
||||
select new
|
||||
{
|
||||
SizeSum = g.Sum(x => x.Size)
|
||||
}).FirstOrDefault();
|
||||
var FieldSum= (FieldSumModel != null) ? FieldSumModel.SizeSum : 0;
|
||||
where x.JointAttribute == "安装口"
|
||||
group x by x.PipelineId into g
|
||||
select new
|
||||
{
|
||||
SizeSum = g.Sum(x => x.Size)
|
||||
}).FirstOrDefault();
|
||||
var FieldSum = (FieldSumModel != null) ? FieldSumModel.SizeSum : 0;
|
||||
var AllSumModel = (from x in q
|
||||
group x by x.PipelineId into g
|
||||
select new
|
||||
{
|
||||
SizeSum = g.Sum(x => x.Size)
|
||||
}).FirstOrDefault();
|
||||
group x by x.PipelineId into g
|
||||
select new
|
||||
{
|
||||
SizeSum = g.Sum(x => x.Size)
|
||||
}).FirstOrDefault();
|
||||
var AllSum = (AllSumModel != null) ? AllSumModel.SizeSum : 0;
|
||||
|
||||
proSum = (proSum != null) ? proSum : 0;
|
||||
@@ -549,13 +550,14 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
var q = from x in db.View_HJGL_WeldJoint where x.PipelineId == pipelineid select x;
|
||||
if (q != null && q.Count() > 0)
|
||||
{
|
||||
shopNum = (from x in q
|
||||
where x.JointAttribute == "预制口" select x
|
||||
).Count();
|
||||
fieldNum = (from x in q
|
||||
where x.JointAttribute == "安装口"
|
||||
select x
|
||||
).Count();
|
||||
shopNum = (from x in q
|
||||
where x.JointAttribute == "预制口"
|
||||
select x
|
||||
).Count();
|
||||
fieldNum = (from x in q
|
||||
where x.JointAttribute == "安装口"
|
||||
select x
|
||||
).Count();
|
||||
ShopSum = shopNum.ToString();
|
||||
FieldSum = fieldNum.ToString();
|
||||
AllNum = shopNum + fieldNum;
|
||||
@@ -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