Merge branch 'master' of https://gitee.com/frane-yang/SGGL_SeDin_New
This commit is contained in:
@@ -17,7 +17,6 @@ SGGL/.svn
|
||||
/SGGL/FineUIPro.Mobile/bin
|
||||
/SGGL/FineUIPro.Mobile/obj
|
||||
*.config
|
||||
*.dll
|
||||
*.pdb
|
||||
*.bat
|
||||
/.svn
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"ExpandedNodes": [
|
||||
""
|
||||
],
|
||||
"SelectedNode": "\\SGGL.sln",
|
||||
"PreviewInSolutionExplorer": false
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
alter table HJGL_WeldJoint add DNDia varchar(50)
|
||||
|
||||
|
||||
/****** 对象: View [dbo].[View_HJGL_WeldJoint] 脚本日期: 2022/11/18 14:39:08 ******/
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
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 --备注
|
||||
|
||||
,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 --二次焊口新增类型
|
||||
,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.AuditDate
|
||||
,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
|
||||
LEFT JOIN SitePerson_Person AS CoverWelder ON CoverWelder.PersonId=jot.CoverWelderId
|
||||
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
|
||||
@@ -0,0 +1,22 @@
|
||||
--Åàѵ¼Ç¼Ã÷ϸÁбí
|
||||
ALTER VIEW [dbo].[View_EduTrain_TrainRecordDetail] AS
|
||||
/*Åàѵ¼Ç¼Ã÷ϸÁбíÊÓͼ*/
|
||||
SELECT trainRecordDetail.TrainDetailId,
|
||||
trainRecordDetail.TrainingId,
|
||||
trainRecordDetail.PersonId,
|
||||
trainRecordDetail.CheckScore,
|
||||
trainRecordDetail.CheckResult,
|
||||
person.UnitId,
|
||||
unit.UnitName,
|
||||
person.PersonName,
|
||||
person.WorkPostId,
|
||||
workPost.WorkPostCode,
|
||||
workPost.WorkPostName
|
||||
FROM dbo.EduTrain_TrainRecordDetail AS trainRecordDetail
|
||||
LEFT JOIN dbo.EduTrain_TrainRecord AS Record ON trainRecordDetail.TrainingId = Record.TrainingId
|
||||
LEFT JOIN dbo.SitePerson_Person AS person ON trainRecordDetail.PersonId = person.PersonId and Record.ProjectId=person.ProjectId
|
||||
LEFT JOIN dbo.Base_Unit AS unit ON unit.UnitId=person.UnitId
|
||||
LEFT JOIN dbo.Base_WorkPost AS workPost ON person.WorkPostId=workPost.WorkPostId
|
||||
GO
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
|
||||
alter table HJGL_PackagingManage add ReceiveMan varchar(50)
|
||||
alter table HJGL_PackagingManage add ReceiveDate Datetime
|
||||
alter table HJGL_Pipeline_Component add ReceiveMan varchar(50)
|
||||
alter table HJGL_Pipeline_Component add ReceiveDate Datetime
|
||||
@@ -0,0 +1 @@
|
||||
alter table HJGL_YardPlanning add UnitWorkId varchar(50)
|
||||
@@ -0,0 +1,63 @@
|
||||
|
||||
ALTER VIEW [dbo].[View_HJGL_Pipeline]
|
||||
AS
|
||||
/*************¹ÜÏßÊÓͼ*****************/
|
||||
SELECT pipeline.PipelineId,
|
||||
pipeline.ProjectId,
|
||||
pipeline.UnitId,
|
||||
pipeline.UnitWorkId,
|
||||
pipeline.PipelineCode,
|
||||
pipeline.SingleName,
|
||||
pipeline.SingleNumber,
|
||||
pipeline.PipingClassId,
|
||||
pipeline.MediumId,
|
||||
pipingClass.PipingClassCode,
|
||||
pipeline.DetectionRateId,
|
||||
rate.DetectionRateCode,
|
||||
pipeline.DetectionType,
|
||||
pipeline.TestPressure,
|
||||
pipeline.TestMedium,
|
||||
pipeline.PressurePipingClassId,
|
||||
pc.PressurePipingClassCode,
|
||||
pipeline.PipeLenth,
|
||||
pipeline.DesignPress,
|
||||
pipeline.DesignTemperature,
|
||||
pipeline.Remark,
|
||||
pipeline.LeakPressure,
|
||||
pipeline.LeakMedium,
|
||||
pipeline.VacuumPressure,
|
||||
pipeline.PCMedium ,
|
||||
pipeline.PCtype,
|
||||
pipeline.MaterialId,
|
||||
pipeline.PipeArea,
|
||||
mat.MaterialCode,
|
||||
lea.MediumName AS LeakMediumName,
|
||||
pur.PurgeMethodName AS PCMediumName,
|
||||
CAST((SELECT SUM(ISNULL(Size,0)) FROM dbo.HJGL_WeldJoint WHERE PipelineId=pipeline.PipelineId) AS DECIMAL(8,3)) AS TotalDin,
|
||||
CAST((SELECT ISNULL(SUM(ISNULL(jot.Size,0)),0) FROM dbo.HJGL_WeldJoint jot WHERE jot.PipelineId=pipeline.PipelineId AND jot.WeldingDailyId IS NOT NULL) AS DECIMAL(8,3)) AS FinishSize,
|
||||
(SELECT COUNT(WeldJointId) FROM dbo.HJGL_WeldJoint WHERE PipelineId=pipeline.PipelineId and IsTwoJoint is null) AS JointCount,
|
||||
unit.UnitName,
|
||||
workArea.UnitWorkCode,
|
||||
medium.MediumCode,
|
||||
medium.MediumName AS MediumName,
|
||||
testMedium.MediumCode AS TestMediumCode,
|
||||
pipeline.ActEndDate AS FinishedDate,
|
||||
pipeline.IsFinished
|
||||
FROM dbo.HJGL_Pipeline AS pipeline
|
||||
LEFT JOIN Base_PipingClass AS pipingClass ON pipingClass.PipingClassId=pipeline.PipingClassId
|
||||
LEFT JOIN dbo.Base_Unit AS unit ON unit.UnitId=pipeline.UnitId
|
||||
LEFT JOIN WBS_UnitWork AS workArea ON workArea.UnitWorkId=pipeline.UnitWorkId
|
||||
LEFT JOIN Base_Medium AS medium ON medium.MediumId=pipeline.MediumId
|
||||
LEFT JOIN dbo.Base_TestMedium AS testMedium ON testMedium.TestMediumId=pipeline.TestMedium
|
||||
LEFT JOIN dbo.Base_DetectionRate rate ON rate.DetectionRateId = pipeline.DetectionRateId
|
||||
LEFT JOIN dbo.Base_PressurePipingClass pc ON pc.PressurePipingClassId = pipeline.PressurePipingClassId
|
||||
LEFT JOIN dbo.Base_TestMedium AS lea ON lea.TestMediumId=pipeline.LeakMedium
|
||||
LEFT JOIN dbo.Base_PurgeMethod AS pur ON pur.PurgeMethodId=pipeline.PCMedium
|
||||
LEFT JOIN dbo.Base_Material AS mat ON mat.MaterialId=pipeline.MaterialId
|
||||
|
||||
|
||||
|
||||
|
||||
GO
|
||||
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
alter table HJGL_Pipeline add FlowingSection nvarchar(200)
|
||||
alter table HJGL_WeldJoint add TwoJointType nvarchar(100)
|
||||
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 --备注
|
||||
|
||||
,jot.[WeldJointId] --焊口Id
|
||||
,jot.[WeldJointCode] --焊口号
|
||||
,jot.[Material1Id] --材质1Id
|
||||
,mat1.MaterialCode AS Material1Code --材质1
|
||||
,jot.[Material2Id] --材质2Id
|
||||
,mat2.MaterialCode AS Material2Code --材质2
|
||||
,jot.[Dia] --外径
|
||||
,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 --二次焊口新增类型
|
||||
,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.AuditDate
|
||||
,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
|
||||
LEFT JOIN SitePerson_Person AS CoverWelder ON CoverWelder.PersonId=jot.CoverWelderId
|
||||
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
|
||||
|
||||
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'流水段' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HJGL_Pipeline', @level2type=N'COLUMN',@level2name=N'FlowingSection'
|
||||
GO
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'二次焊口新增类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HJGL_WeldJoint', @level2type=N'COLUMN',@level2name=N'TwoJointType'
|
||||
GO
|
||||
@@ -17,7 +17,8 @@ namespace BLL
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var getUser = db.Person_Persons.FirstOrDefault(x =>( x.Account == userInfo.Account || x.Telephone == userInfo.Telephone || x.PersonName == userInfo.Account)
|
||||
&& x.Password == Funs.EncryptionPassword(userInfo.Password) && (!x.IsPost.HasValue || x.IsPost == true) && x.RoleIds != null);
|
||||
&& x.Password == Funs.EncryptionPassword(userInfo.Password) && (!x.IsPost.HasValue || x.IsPost == true)
|
||||
&& (x.Account != null || x.PersonId == Const.hfnbdId || x.PersonId == Const.sysglyId));
|
||||
if (getUser != null)
|
||||
{
|
||||
Model.UserItem newItem = new Model.UserItem();
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Model;
|
||||
namespace BLL
|
||||
{
|
||||
public class APIHJGLIndexService
|
||||
{
|
||||
public static Model.HJGLIndexItem GetJGLIndexItem(string projectid)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
Model.HJGLIndexItem hJGLIndexItem = new Model.HJGLIndexItem();
|
||||
var PipeRate1 = BLL.HJGL_WeldingReportService.GetPipeRate_finished(projectid);
|
||||
var PipeRate2 = BLL.HJGL_WeldingReportService.GetPipeRate_unfinished(projectid);
|
||||
|
||||
var getCH_CheckItemList = (from x in Funs.DB.HJGL_Batch_NDEItem
|
||||
join y in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals y.TrustBatchItemId
|
||||
join z in Funs.DB.View_HJGL_WeldJoint on y.WeldJointId equals z.WeldJointId
|
||||
join line in Funs.DB.HJGL_Pipeline on z.PipelineId equals line.PipelineId
|
||||
where z.ProjectId == projectid
|
||||
select new Model.sp_index_HJGLItem
|
||||
{
|
||||
ProjectId = line.ProjectId,
|
||||
ID = x.NDEItemID,
|
||||
UnitId = line.UnitId, ///重定义单位
|
||||
UnitName = z.UnitName,
|
||||
WorkAreaId = line.UnitId, /// 重定义区域
|
||||
MaterialId = line.UnitWorkId, ///重定义材质
|
||||
CHT_TotalFilm = x.TotalFilm,
|
||||
CHT_PassFilm = x.PassFilm,
|
||||
Specification = z.Specification,
|
||||
WeldTypeCode = z.WeldTypeCode,
|
||||
JointAttribute = z.JointAttribute,
|
||||
UnitWorkName = z.UnitWorkName,
|
||||
MaterialCode = z.MaterialCode
|
||||
}).ToList();
|
||||
var tb_type06 = getCH_CheckItemList.GroupBy(x => x.JointAttribute).Select(x => new {
|
||||
JointAttribute = x.Key,
|
||||
Current_pass_film = x.Sum(m => m.CHT_PassFilm) ?? 0,
|
||||
Cht_totalfilm = x.Sum(m => m.CHT_TotalFilm) ?? 0
|
||||
});
|
||||
var GC_model = tb_type06.Where(x => x.JointAttribute == "预制口").FirstOrDefault();
|
||||
var XC_model = tb_type06.Where(x => x.JointAttribute == "安装口").FirstOrDefault();
|
||||
double PassRate1 = 0;
|
||||
double PassRate2 = 0;
|
||||
if (GC_model!=null &&GC_model.Cht_totalfilm>0)
|
||||
{
|
||||
PassRate1 = Math.Round((100 * GC_model.Current_pass_film * 1.0) / GC_model.Cht_totalfilm, 1);
|
||||
}
|
||||
if (XC_model!=null&& XC_model.Cht_totalfilm > 0)
|
||||
{
|
||||
PassRate2 = Math.Round((100 * XC_model.Current_pass_film * 1.0) / XC_model.Cht_totalfilm, 1);
|
||||
}
|
||||
hJGLIndexItem.GCFirstPassRate = PassRate1.ToString()+" %";
|
||||
hJGLIndexItem.XCFirstPassRate = PassRate2.ToString()+" %";
|
||||
|
||||
hJGLIndexItem.GCProgress = BLL.HJGL_WeldingReportService.GetGCRate_finished(projectid).ToString() + "/" + HJGL_WeldingReportService.GetSumSize(projectid, 1).ToString() + " DIN";
|
||||
hJGLIndexItem.XCProgress = BLL.HJGL_WeldingReportService.GetXCRate_finished(projectid).ToString() + "/" + HJGL_WeldingReportService.GetSumSize(projectid, 2).ToString() + " DIN";
|
||||
|
||||
if (PipeRate1 + PipeRate2 == 0)
|
||||
{
|
||||
hJGLIndexItem.PipePrefabricationRate = "0 %";
|
||||
}
|
||||
else
|
||||
{
|
||||
hJGLIndexItem.PipePrefabricationRate = Math.Floor(Math.Round(decimal.Parse((PipeRate1 / (PipeRate1 + PipeRate2)).ToString("0.000")), 2) * 100).ToString()+" %";
|
||||
|
||||
|
||||
}
|
||||
hJGLIndexItem.GCWelderEfficacy = HJGL_WeldingReportService.GetWelderEfficacy_GC(projectid).ToString()+" DIN/天";
|
||||
hJGLIndexItem.XCWelderEfficacy = HJGL_WeldingReportService.GetWelderEfficacy_XC(projectid).ToString()+" DIN/天";
|
||||
|
||||
return hJGLIndexItem;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class APIPackagingManageService
|
||||
{
|
||||
public static List<Model.PackagingManageDetailItem> GetPackagingManageList(string projectId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var q = (from x in db.HJGL_PackagingManage
|
||||
join n in db.Base_Project on x.ProjectId equals n.ProjectId
|
||||
join m in db.Person_Persons on x.ReceiveMan equals m.PersonId into tt
|
||||
from t in tt.DefaultIfEmpty()
|
||||
where x.ProjectId == projectId
|
||||
select new PackagingManageDetailItem
|
||||
{
|
||||
PackagingManageId = x.PackagingManageId,
|
||||
PackagingCode = x.PackagingCode,
|
||||
ProjectName = n.ProjectName,
|
||||
ContactName = x.ContactName,
|
||||
ContactPhone = x.ContactPhone,
|
||||
StackingPosition = x.StackingPosition,
|
||||
State= x.State,
|
||||
ReceiveMan=t.PersonName,
|
||||
ReceiveDate = string.Format("{0:g}", x.ReceiveDate)
|
||||
}).Distinct();
|
||||
return q.ToList();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static Model.PackagingManageItem GetPackagingInformationById(string projectId,string personId, string packagingManageId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
PackagingManageItem packagingManageItem = new PackagingManageItem();
|
||||
var q = (from x in db.HJGL_PackagingManage
|
||||
join n in db.Base_Project on x.ProjectId equals n.ProjectId
|
||||
join m in db.Person_Persons on x.ReceiveMan equals m.PersonId into tt
|
||||
from t in tt.DefaultIfEmpty()
|
||||
where x.PackagingManageId == packagingManageId
|
||||
select new PackagingManageDetailItem
|
||||
{
|
||||
PackagingManageId = x.PackagingManageId,
|
||||
PackagingCode = x.PackagingCode,
|
||||
ProjectName = n.ProjectName,
|
||||
ProjectId = x.ProjectId,
|
||||
ContactName = x.ContactName,
|
||||
ContactPhone = x.ContactPhone,
|
||||
StackingPosition = x.StackingPosition,
|
||||
State =x.State,
|
||||
ReceiveMan = t.PersonName,
|
||||
ReceiveDate = string.Format("{0:g}", x.ReceiveDate)
|
||||
}).FirstOrDefault();
|
||||
var tb_packing = (from x in db.HJGL_PackagingManage where x.PackagingManageId==packagingManageId select x ).FirstOrDefault() ;
|
||||
var PipelineComponentIdList = tb_packing.PipelineComponentId.Split(',');
|
||||
var packagingPrepipeItem = (from x in db.HJGL_Pipeline_Component
|
||||
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
|
||||
join z in db.WBS_UnitWork on y.UnitWorkId equals z.UnitWorkId
|
||||
where PipelineComponentIdList.Contains(x.PipelineComponentId)
|
||||
select new PackagingPrepipeItem
|
||||
{
|
||||
PipelineComponentCode = x.PipelineComponentCode,
|
||||
PreUnit = "1/个",
|
||||
UnitWorkName = z.UnitWorkName,
|
||||
PlanStartDate = string.Format("{0:g}", y.PlanStartDate),
|
||||
|
||||
}).ToList();
|
||||
bool isPower = Person_PersonsService.IsGeneralUnitByPersonId(personId, projectId);
|
||||
packagingManageItem.packagingManageDetailItem = q;
|
||||
packagingManageItem.packagingPrepipeItems = packagingPrepipeItem;
|
||||
packagingManageItem.isPower = isPower;
|
||||
return packagingManageItem;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public static void GetPackingInfoConfirmArrival(string packagingManageId,string PersonId)
|
||||
{
|
||||
var q= BLL.HJGL_PackagingmanageService.GetHJGL_PackagingManageById(packagingManageId);
|
||||
if (q!=null)
|
||||
{
|
||||
q.State = HJGL_PackagingmanageService.state_2;
|
||||
q.ReceiveMan = PersonId;
|
||||
q.ReceiveDate = DateTime.Now;
|
||||
HJGL_PackagingmanageService.UpdateHJGL_PackagingManage(q);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
using NPOI.OpenXmlFormats.Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Model;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class APIPipelineComponentService
|
||||
{
|
||||
public static List<PipelineComponentItem> GetPackagingManageList(string projectid)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
|
||||
var q = (from x in db.HJGL_Pipeline_Component
|
||||
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
|
||||
join z in db.Base_Unit on x.PreUnit equals z.UnitId into tt
|
||||
join m in db.Person_Persons on x.ReceiveMan equals m.PersonId into pp
|
||||
from t in tt.DefaultIfEmpty()
|
||||
from p in pp.DefaultIfEmpty()
|
||||
where y.ProjectId == projectid
|
||||
select new PipelineComponentItem
|
||||
{
|
||||
PipelineComponentId = x.PipelineComponentId,
|
||||
PipelineComponentCode = x.PipelineComponentCode,
|
||||
PreUnit = t.UnitName,
|
||||
DrawingName = x.DrawingName,
|
||||
BoxNumber = x.BoxNumber,
|
||||
State = x.State,
|
||||
PlanStartDate = string.Format("{0:g}", y.PlanStartDate) ,
|
||||
QRCode = x.QRCode,
|
||||
ReceiveMan=p.PersonName,
|
||||
ReceiveDate= string.Format("{0:g}", x.ReceiveDate)
|
||||
}).Distinct();
|
||||
return q.ToList();
|
||||
|
||||
}
|
||||
}
|
||||
public static PipelineComponentDetail GetPipelineComponentById(string projectId, string personId, string PipelineComponentId)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
PipelineComponentDetail pipelineComponentDetail = new PipelineComponentDetail();
|
||||
|
||||
var q = (from x in db.HJGL_Pipeline_Component
|
||||
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
|
||||
join z in db.Base_Unit on x.PreUnit equals z.UnitId into tt
|
||||
join m in db.Person_Persons on x.ReceiveMan equals m.PersonId into pp
|
||||
from t in tt.DefaultIfEmpty()
|
||||
from p in pp.DefaultIfEmpty()
|
||||
where x.PipelineComponentId== PipelineComponentId
|
||||
select new PipelineComponentItem
|
||||
{
|
||||
PipelineComponentId = x.PipelineComponentId,
|
||||
PipelineComponentCode = x.PipelineComponentCode,
|
||||
PreUnit = t.UnitName,
|
||||
DrawingName = x.DrawingName,
|
||||
BoxNumber = x.BoxNumber,
|
||||
State = x.State,
|
||||
PlanStartDate = string.Format("{0:g}", y.PlanStartDate),
|
||||
QRCode = x.QRCode,
|
||||
ReceiveMan = p.PersonName,
|
||||
ReceiveDate = string.Format("{0:g}", x.ReceiveDate)
|
||||
}).FirstOrDefault();
|
||||
bool isPower = Person_PersonsService.IsGeneralUnitByPersonId(personId, projectId);
|
||||
pipelineComponentDetail.pipelineComponentItem = q;
|
||||
pipelineComponentDetail.isPower=isPower;
|
||||
return pipelineComponentDetail;
|
||||
|
||||
}
|
||||
}
|
||||
public static void GetComponentConfirmArrival(string PipelineComponentId,string PersonId)
|
||||
{
|
||||
var q = BLL.HJGL_PipelineComponentService.GetPipelineComponentById(PipelineComponentId);
|
||||
if (q != null)
|
||||
{
|
||||
q.State = HJGL_PipelineComponentService.state_1;
|
||||
q.ReceiveMan = PersonId;
|
||||
q.ReceiveDate = DateTime.Now;
|
||||
HJGL_PipelineComponentService.UpdatePipelineComponent(q);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -163,7 +163,7 @@ namespace BLL
|
||||
{
|
||||
if (getTestPlan.TestEndTime > DateTime.Now)
|
||||
{
|
||||
var getTestPlanTraining = db.Test_TestPlanTraining.Where(x => x.TestPlanId == getTestPlan.TestPlanId && x.UserType == testRecord.UserType);
|
||||
var getTestPlanTraining = db.Test_TestPlanTraining.Where(x => x.TestPlanId == getTestPlan.TestPlanId && (x.UserType == testRecord.UserType || x.UserType == null));
|
||||
if (getTestPlanTraining.Count() > 0)
|
||||
{
|
||||
int cout1 = getTestPlanTraining.Sum(x => x.TestType1Count ?? 0);
|
||||
@@ -294,7 +294,7 @@ namespace BLL
|
||||
var item = db.Test_TestRecordItem.FirstOrDefault(x => x.TestRecordId == testRecordId);
|
||||
if (item == null)
|
||||
{
|
||||
var getTestPlanTraining = db.Test_TestPlanTraining.Where(x => x.TestPlanId == testPlanId && x.UserType == getTestRecord.ManType);
|
||||
var getTestPlanTraining = db.Test_TestPlanTraining.Where(x => x.TestPlanId == testPlanId && (x.UserType == getTestRecord.ManType || x.UserType == null));
|
||||
if (getTestPlanTraining.Count() > 0)
|
||||
{
|
||||
List<Model.Training_TestTrainingItem> getTestTrainingItemList = new List<Model.Training_TestTrainingItem>();
|
||||
|
||||
@@ -99,6 +99,11 @@
|
||||
<Reference Include="office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</Reference>
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="QRCoder, Version=1.4.3.0, Culture=neutral, PublicKeyToken=c4ed5b9ae8358a28, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\QRCoder.1.4.3\lib\net40\QRCoder.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="RestSharp, Version=106.15.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\RestSharp.106.15.0\lib\net452\RestSharp.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -148,6 +153,7 @@
|
||||
<Reference Include="ThoughtWorks.QRCode">
|
||||
<HintPath>..\FineUIPro\Reference BLL\ThoughtWorks.QRCode.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="API\APIBaseInfoService.cs" />
|
||||
@@ -159,9 +165,12 @@
|
||||
<Compile Include="API\APIUnitService.cs" />
|
||||
<Compile Include="API\APIUpLoadFileService.cs" />
|
||||
<Compile Include="API\APIUserService.cs" />
|
||||
<Compile Include="API\HJGL\APIHJGLIndexService.cs" />
|
||||
<Compile Include="API\HJGL\APIHotProcessHardService.cs" />
|
||||
<Compile Include="API\HJGL\APINDETrustService.cs" />
|
||||
<Compile Include="API\HJGL\APIPackagingManageService.cs" />
|
||||
<Compile Include="API\HJGL\APIPipeJointService.cs" />
|
||||
<Compile Include="API\HJGL\APIPipelineComponentService.cs" />
|
||||
<Compile Include="API\HJGL\APIPreWeldingDailyService.cs" />
|
||||
<Compile Include="API\HJGL\APIReportQueryService.cs" />
|
||||
<Compile Include="API\HJGL\APITestPackageService.cs" />
|
||||
@@ -356,6 +365,7 @@
|
||||
<Compile Include="HJGL\TestPackage\TestPackageApproveService.cs" />
|
||||
<Compile Include="HJGL\TestPackage\TestPackageAuditService.cs" />
|
||||
<Compile Include="HJGL\TestPackage\TestPackageEditService.cs" />
|
||||
<Compile Include="HJGL\WeldingManage\HJGL_WeldingReportService.cs" />
|
||||
<Compile Include="HJGL\WeldingManage\PipelineComponentService.cs" />
|
||||
<Compile Include="HJGL\WeldingManage\PipelineMatService.cs" />
|
||||
<Compile Include="HJGL\WeldingManage\PipelineService.cs" />
|
||||
|
||||
@@ -3024,7 +3024,7 @@
|
||||
/// <summary>
|
||||
/// PDMS输出(设计)数据导入模板
|
||||
/// </summary>
|
||||
public const string PDMSPipelineTemplateUrl = "File\\Excel\\DataIn\\PDMS输出(设计)数据模板.xls";
|
||||
public const string PDMSPipelineTemplateUrl = "File\\Excel\\DataIn\\PDMS输出(设计)数据模板.xlsx";
|
||||
/// <summary>
|
||||
/// 施工计划模板
|
||||
/// </summary>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
using System;
|
||||
using NPOI.OpenXmlFormats.Shared;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using ThoughtWorks.QRCode.Codec;
|
||||
using QRCoder;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
@@ -49,6 +51,16 @@ namespace BLL
|
||||
return null;
|
||||
}
|
||||
}
|
||||
/*
|
||||
public Bitmap GetGraphic(int pixelsPerModule, Color darkColor, Color lightColor, [Bitmap icon=null], [int iconSizePercent=15], [int iconBorderWidth=6], [bool drawQuietZones=true])
|
||||
int pixelsPerModule:生成二维码图片的像素大小;
|
||||
Color darkColor:二维码图像暗色,一般设置为Color.Black。
|
||||
Color lightColor:二维码图像亮色, 一般设置为Color.White。
|
||||
Bitmap icon:二维码中间水印图标。
|
||||
int iconSizePercent:水印图标的大小比例。
|
||||
int iconBorderWidth:水印图标的边框。不能设为0,否则会显示“参数错误”,程序运行出错。
|
||||
bool drawQuietZones:静止区,即是否绘画二维码的空白边框区域,默认为true。
|
||||
*/
|
||||
public static string CreateCode_Simple(string nr,string filename)
|
||||
{
|
||||
try
|
||||
@@ -56,14 +68,21 @@ namespace BLL
|
||||
string imageUrl = string.Empty;
|
||||
if (!string.IsNullOrEmpty(nr))
|
||||
{
|
||||
QRCodeEncoder qrCodeEncoder = new QRCodeEncoder
|
||||
{
|
||||
QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.BYTE,
|
||||
QRCodeScale = nr.Length,
|
||||
QRCodeVersion = 0,
|
||||
QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.M
|
||||
};
|
||||
System.Drawing.Image image = qrCodeEncoder.Encode(nr, Encoding.UTF8);
|
||||
//QRCodeEncoder qrCodeEncoder = new QRCodeEncoder
|
||||
//{
|
||||
// QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.BYTE,
|
||||
// QRCodeScale = nr.Length,
|
||||
// QRCodeVersion =0,
|
||||
// QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.M
|
||||
//};
|
||||
//System.Drawing.Image image = qrCodeEncoder.Encode(nr, Encoding.UTF8);
|
||||
|
||||
QRCoder.QRCode qRCode = new QRCoder.QRCode();
|
||||
QRCodeGenerator qrGenerator = new QRCodeGenerator();
|
||||
QRCodeData qrCodeData = qrGenerator.CreateQrCode(nr, QRCodeGenerator.ECCLevel.Q);
|
||||
QRCode qrcode = new QRCode(qrCodeData);
|
||||
|
||||
System.Drawing.Image image = qrcode.GetGraphic(100);
|
||||
string filepath = Funs.RootPath + UploadFileService.QRCodeImageFilePath;
|
||||
//如果文件夹不存在,则创建
|
||||
if (!Directory.Exists(filepath))
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
namespace BLL
|
||||
{
|
||||
using MiniExcelLibs;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
|
||||
@@ -184,6 +187,16 @@ namespace BLL
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 为目标下拉框加上选择内容
|
||||
/// </summary>
|
||||
/// <param name="DLL">目标下拉框</param>
|
||||
public static void FineUIPleaseSelectNull(FineUIPro.DropDownList DDL, string text)
|
||||
{
|
||||
DDL.Items.Insert(0, new FineUIPro.ListItem(text, null));
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 为目标下拉框加上 "重新编制" 项
|
||||
/// </summary>
|
||||
@@ -1151,6 +1164,37 @@ namespace BLL
|
||||
dv.RowFilter = $"({filterRule})";
|
||||
return dv.ToTable();
|
||||
}
|
||||
|
||||
public static IEnumerable<dynamic> QueryWithoutEmptyRow(Stream stream, bool useHeaderRow, string sheetName, ExcelType excelType, string startCell, IConfiguration configuration)
|
||||
{
|
||||
var rows = stream.Query(useHeaderRow, sheetName, excelType, startCell, configuration);
|
||||
foreach (IDictionary<string, object> row in rows)
|
||||
{
|
||||
if (row.Keys.Any(key => row[key] != null))
|
||||
yield return row;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
/// 用于Linq的去重,扩展方法需要放到静态类中
|
||||
/// </summary>
|
||||
/// <typeparam name="TSource"></typeparam>
|
||||
/// <typeparam name="TKey"></typeparam>
|
||||
/// <param name="source"></param>
|
||||
/// <param name="keySelector"></param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector)
|
||||
{
|
||||
HashSet<TKey> seenKeys = new HashSet<TKey>();
|
||||
foreach (TSource element in source)
|
||||
{
|
||||
if (seenKeys.Add(keySelector(element)))
|
||||
{
|
||||
yield return element;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -138,8 +138,8 @@
|
||||
public static ListItem[] IsPostDropList()
|
||||
{
|
||||
ListItem[] lis = new ListItem[2];
|
||||
lis[0] = new ListItem("在岗", BLL.Const._True);
|
||||
lis[1] = new ListItem("离岗", BLL.Const._False);
|
||||
lis[0] = new ListItem("在职", BLL.Const._True);
|
||||
lis[1] = new ListItem("离职", BLL.Const._False);
|
||||
return lis;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -43,10 +43,10 @@ namespace BLL
|
||||
/// <param name="FileName"></param>
|
||||
/// <param name="project"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.HJGL_DataImport GetLatestFileByFileName(string FileName, string project)
|
||||
public static Model.HJGL_DataImport GetLatestFileByFileName(string FileName,string ImportType, string project)
|
||||
{
|
||||
var q = (from x in Funs.DB.HJGL_DataImport
|
||||
where x.FileName.Contains(FileName) && x.ProjectId == project
|
||||
where x.FileName.Contains(FileName) && x.ProjectId == project&&x.ImportType==ImportType
|
||||
select x
|
||||
).OrderByDescending(x => x.Version).FirstOrDefault();
|
||||
return q;
|
||||
@@ -70,6 +70,9 @@ namespace BLL
|
||||
case "3":
|
||||
TypeName = "管道预制加工图";
|
||||
break;
|
||||
case "4":
|
||||
TypeName = "ISO施工轴测图";
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -166,6 +169,28 @@ namespace BLL
|
||||
var newVersion = MaxVersion + 0.1m;
|
||||
return newVersion;
|
||||
}
|
||||
public static string Getlatest3DModelNameByUnitWorkId(string UnitWorkId )
|
||||
{
|
||||
string result = "";
|
||||
var q = (from x in Funs.DB.HJGL_DataImport
|
||||
join y in Funs.DB.Base_DesignProfessional on x.DesignProfessionalId equals y.DesignProfessionalId into mm
|
||||
from m in mm.DefaultIfEmpty()
|
||||
where x.UnitWorkId == UnitWorkId && x.ImportType == "1" && m.ProfessionalName.Contains("管道")
|
||||
group x by x.UnitWorkId into tt
|
||||
from t in tt.DefaultIfEmpty()
|
||||
select new
|
||||
{
|
||||
FileName = (from x2 in tt where x2.Version == tt.Max(x => x.Version ) select x2.FileName).FirstOrDefault()
|
||||
}
|
||||
).FirstOrDefault();
|
||||
//where t.Key == UnitWorkId & x.FileType == "1" select x.Version).Distinct().ToList();
|
||||
if (q!=null&&!string.IsNullOrEmpty(q.FileName))
|
||||
{
|
||||
result=q.FileName.Substring (0,q.FileName.LastIndexOf('.'));
|
||||
|
||||
}
|
||||
return result;
|
||||
}
|
||||
public static void InitVersionDownList(FineUIPro.DropDownList dropName, string UnitWorkId)
|
||||
{
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ namespace BLL
|
||||
FROM dbo.HJGL_PipeLineMat pipe
|
||||
LEFT JOIN dbo.HJGL_MaterialCodeLib lib ON lib.MaterialCode = pipe.MaterialCode
|
||||
LEFT JOIN HJGL_Pipeline line ON pipe.PipelineId=line.PipelineId
|
||||
WHERE line.PipeArea=@PipeArea and line.State=1
|
||||
WHERE line.PipeArea=@PipeArea
|
||||
group by lib.MaterialCode,lib.MaterialName,lib.MaterialUnit, lib.MaterialSpec,lib.MaterialMade) as aa on mat.MaterialCode=aa.MaterialCode
|
||||
where mat.projectid=@Projectid and Ins.State=@State
|
||||
group by mat.MaterialCode,lib.MaterialName,lib.MaterialSpec,lib.MaterialMade,lib.MaterialUnit,aa.num
|
||||
@@ -227,50 +227,63 @@ namespace BLL
|
||||
public static bool isInStockByPipeline(string pipelineid,string projectid)
|
||||
{
|
||||
bool state = true ;
|
||||
var q = from x in Funs.DB.HJGL_PipeLineMat where x.PipelineId==pipelineid
|
||||
group x by x.MaterialCode into s
|
||||
select new
|
||||
{
|
||||
MaterialCode = s.Key,
|
||||
Number = s.Sum(p => p.Number)
|
||||
};//获取管线所用材料
|
||||
if (q!=null&&q.Count() >0) //判断管线是否有关联材料
|
||||
try
|
||||
{
|
||||
var pipemodel = BLL.PipelineService.GetPipelineByPipelineId(pipelineid);
|
||||
List<Model.MaterialStockItem> list = GetMaterialStockItems(projectid, pipemodel.PipeArea);
|
||||
if (list!=null &&list.Count > 0) //判断是否有库存信息
|
||||
{
|
||||
foreach (var item in q)
|
||||
{
|
||||
var StockMater = list.Where(x => x.MaterialCode == item.MaterialCode).FirstOrDefault();
|
||||
if (StockMater!=null) //判断该材料是否存在库存
|
||||
var q = from x in Funs.DB.HJGL_PipeLineMat
|
||||
where x.PipelineId == pipelineid
|
||||
group x by x.MaterialCode into s
|
||||
select new
|
||||
{
|
||||
var StockNum = StockMater.MaterialNum;
|
||||
if ((decimal)item.Number > StockNum) //实际大于库存
|
||||
MaterialCode = s.Key,
|
||||
Number = s.Sum(p => p.Number)
|
||||
};//获取管线所用材料
|
||||
if (q != null && q.Count() > 0) //判断管线是否有关联材料
|
||||
{
|
||||
var pipemodel = BLL.PipelineService.GetPipelineByPipelineId(pipelineid);
|
||||
List<Model.MaterialStockItem> list = GetMaterialStockItems(projectid, pipemodel.PipeArea);
|
||||
if (list != null && list.Count > 0) //判断是否有库存信息
|
||||
{
|
||||
foreach (var item in q)
|
||||
{
|
||||
var StockMater = list.Where(x => x.MaterialCode == item.MaterialCode).FirstOrDefault();
|
||||
if (StockMater != null) //判断该材料是否存在库存
|
||||
{
|
||||
var StockNum = StockMater.MaterialNum;
|
||||
if ((decimal)item.Number > StockNum) //实际大于库存
|
||||
{
|
||||
state = false; //库存不足
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
state = false; //库存不足
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
state = false; //库存不足
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
state = false; //库存不足
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
state = false; //库存不足
|
||||
state = false; //库存不足
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
state = false; //库存不足
|
||||
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
|
||||
state = false;
|
||||
ErrLogInfo.WriteLog(ex.ToString ());
|
||||
}
|
||||
|
||||
|
||||
return state;
|
||||
|
||||
}
|
||||
|
||||
@@ -12,8 +12,28 @@ using System.Text;
|
||||
namespace BLL
|
||||
{
|
||||
|
||||
|
||||
public static class HJGL_PackagingmanageService
|
||||
{
|
||||
public class PackagingManageItem
|
||||
{
|
||||
public string PackagingManageId { get; set; }
|
||||
public string PackagingCode { get; set; }
|
||||
public string ProjectId { get; set; }
|
||||
public string ProjectName { get; set; }
|
||||
public string ContactName { get; set; }
|
||||
public string ContactPhone { get; set; }
|
||||
public string StackingPosition { get; set; }
|
||||
public int? State { get; set; }
|
||||
|
||||
public string ReceiveMan { get; set; }
|
||||
public string ReceiveDate { get; set; }
|
||||
public string PlanStartDate { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
public static Model.SGGLDB db = Funs.DB;
|
||||
/// <summary>
|
||||
/// 未到场
|
||||
@@ -87,6 +107,46 @@ namespace BLL
|
||||
{
|
||||
return db.HJGL_PackagingManage.FirstOrDefault(x => x.PackagingManageId == PackagingManageId);
|
||||
}
|
||||
public static string GetMinPlanStartDate(string PackagingManageId)
|
||||
{
|
||||
string PlanStartDate = "";
|
||||
DataTable tb = BLL.HJGL_PackagingmanageService.GetPackagingDetailById(PackagingManageId);
|
||||
var dtTable = tb.AsEnumerable().OrderBy(o => o["PlanStartDate"]).CopyToDataTable();
|
||||
if (dtTable.Rows != null && dtTable.Rows.Count > 0)
|
||||
{
|
||||
PlanStartDate = dtTable.Rows[0]["PlanStartDate"].ToString();
|
||||
}
|
||||
return PlanStartDate;
|
||||
}
|
||||
public static List<PackagingManageItem> GetPackagingManageList(string projectId,string PackagingCode)
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
|
||||
var q = (from x in db.HJGL_PackagingManage
|
||||
join n in db.Base_Project on x.ProjectId equals n.ProjectId
|
||||
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) )
|
||||
select new PackagingManageItem
|
||||
{
|
||||
PackagingManageId = x.PackagingManageId,
|
||||
PackagingCode = x.PackagingCode,
|
||||
ProjectName = n.ProjectName,
|
||||
ContactName = x.ContactName,
|
||||
ContactPhone = x.ContactPhone,
|
||||
StackingPosition = x.StackingPosition,
|
||||
State = x.State,
|
||||
ReceiveMan = t.PersonName,
|
||||
ReceiveDate = string.Format("{0:g}", x.ReceiveDate),
|
||||
PlanStartDate = GetMinPlanStartDate(x.PackagingManageId),
|
||||
|
||||
}).Distinct();
|
||||
return q.ToList();
|
||||
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 形成出库单
|
||||
/// </summary>
|
||||
@@ -113,7 +173,7 @@ namespace BLL
|
||||
if (!string .IsNullOrEmpty(model.PipelineComponentId))
|
||||
{
|
||||
var PipelineComponentIds = model.PipelineComponentId.Split(',');
|
||||
string strSql = @"select com.PipelineComponentId, com.PipelineComponentCode,com.PlanStartDate,unitwork.UnitWorkName,'1' as num ,'个' as CU
|
||||
string strSql = @"select com.PipelineComponentId, com.PipelineComponentCode,pipe.PlanStartDate,unitwork.UnitWorkName,'1' as num ,'个' as CU
|
||||
from HJGL_Pipeline_Component com
|
||||
left join HJGL_Pipeline pipe on com.PipelineId=pipe.PipelineId
|
||||
left join WBS_UnitWork unitwork on pipe.UnitWorkId=unitwork.UnitWorkId
|
||||
@@ -158,6 +218,8 @@ namespace BLL
|
||||
ContactName = newtable.ContactName,
|
||||
ContactPhone = newtable.ContactPhone,
|
||||
Remark = newtable.Remark,
|
||||
ReceiveDate = newtable.ReceiveDate,
|
||||
ReceiveMan = newtable.ReceiveMan,
|
||||
};
|
||||
db.HJGL_PackagingManage.InsertOnSubmit(table);
|
||||
db.SubmitChanges();
|
||||
@@ -179,6 +241,8 @@ namespace BLL
|
||||
table.ContactName = newtable.ContactName;
|
||||
table.ContactPhone = newtable.ContactPhone;
|
||||
table.Remark = newtable.Remark;
|
||||
table.ReceiveMan=newtable.ReceiveMan;
|
||||
table.ReceiveDate=newtable.ReceiveDate;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@ namespace BLL
|
||||
{
|
||||
return Funs.DB.HJGL_YardPlanning.FirstOrDefault(e => e.YardPlanningId == YardPlanningId);
|
||||
}
|
||||
public static Model.HJGL_YardPlanning GetHJGL_YardPlanningByProjectId(string projectId)
|
||||
public static Model.HJGL_YardPlanning GetHJGL_YardPlanningByProjectId(string projectId,string unitworkid)
|
||||
|
||||
{
|
||||
return Funs.DB.HJGL_YardPlanning.FirstOrDefault(e => e.ProjectId == projectId);
|
||||
return Funs.DB.HJGL_YardPlanning.FirstOrDefault(e => e.ProjectId == projectId && e.UnitWorkId == unitworkid);
|
||||
}
|
||||
/// <summary>
|
||||
/// 保存应急流程图
|
||||
@@ -25,9 +25,9 @@ namespace BLL
|
||||
/// <param name="projectid"></param>
|
||||
/// <param name="unitid"></param>
|
||||
/// <param name="imgurl"></param>
|
||||
public static void SavePic(string projectid, string imgurl)
|
||||
public static void SavePic(string projectid,string unitworkid, string imgurl)
|
||||
{
|
||||
var model = Funs.DB.HJGL_YardPlanning.FirstOrDefault(e => e.ProjectId == projectid);
|
||||
var model = Funs.DB.HJGL_YardPlanning.FirstOrDefault(e => e.ProjectId == projectid && e.UnitWorkId==unitworkid);
|
||||
if (model != null)
|
||||
{
|
||||
model.FlowChartPic = imgurl;
|
||||
@@ -38,6 +38,7 @@ namespace BLL
|
||||
Model.HJGL_YardPlanning table = new Model.HJGL_YardPlanning();
|
||||
table.YardPlanningId = SQLHelper.GetNewID(typeof(Model.HJGL_YardPlanning));
|
||||
table.ProjectId = projectid;
|
||||
table.UnitWorkId = unitworkid;
|
||||
table.FlowChartPic = imgurl;
|
||||
Funs.DB.HJGL_YardPlanning.InsertOnSubmit(table);
|
||||
Funs.DB.SubmitChanges();
|
||||
@@ -51,6 +52,7 @@ namespace BLL
|
||||
table.ProjectId = newtable.ProjectId;
|
||||
table.Remark = newtable.Remark;
|
||||
table.FlowChartPic = newtable.FlowChartPic;
|
||||
table.UnitWorkId = newtable.UnitWorkId;
|
||||
Funs.DB.HJGL_YardPlanning.InsertOnSubmit(table);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
@@ -66,6 +68,7 @@ namespace BLL
|
||||
table.ProjectId = newtable.ProjectId;
|
||||
table.Remark = newtable.Remark;
|
||||
table.FlowChartPic = newtable.FlowChartPic;
|
||||
table.UnitWorkId = newtable.UnitWorkId;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,213 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class HJGL_WeldingReportService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据类型获取总达因数(0总达因,1预制口总达因,2安装口总达因)
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="type">0总达因,1预制口总达因,2安装口总达因</param>
|
||||
/// <returns></returns>
|
||||
public static decimal GetSumSize(string projectId,int type)
|
||||
{
|
||||
decimal result = 0;
|
||||
|
||||
var getWelds = Funs.DB.HJGL_WeldJoint.Where(x => x.ProjectId == projectId);
|
||||
if (getWelds.Count() > 0)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case 0:
|
||||
result = getWelds.Sum(x => x.Size ?? 0); //项目总达因数
|
||||
break;
|
||||
case 1:
|
||||
if (getWelds.Where(x => x.JointAttribute == "预制口").Count() > 0)
|
||||
{
|
||||
result = getWelds.Where(x => x.JointAttribute == "预制口").Sum(x => x.Size ?? 0);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (getWelds.Where(x => x.JointAttribute == "安装口").Count() > 0)
|
||||
{
|
||||
result = getWelds.Where(x => x.JointAttribute == "安装口").Sum(x => x.Size ?? 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 工厂预制完成数
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static decimal GetGCRate_finished(string projectId)
|
||||
{
|
||||
decimal result = 0;
|
||||
var getWelds = Funs.DB.HJGL_WeldJoint.Where(x => x.ProjectId == projectId);
|
||||
if (getWelds.Count() > 0)
|
||||
{
|
||||
|
||||
var getWeldsOk = getWelds.Where(x => x.WeldingDailyId != null);
|
||||
if (getWeldsOk.Count() > 0)
|
||||
{
|
||||
var GCModel = getWeldsOk.Where(x => x.JointAttribute == "预制口");
|
||||
if (GCModel.Count() > 0)
|
||||
{
|
||||
result = GCModel.Sum(x => x.Size ?? 0);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 工厂预制未完成数
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static decimal GetGCRate_unfinished(string projectId)
|
||||
{
|
||||
decimal result = 0;
|
||||
result = GetSumSize(projectId, 1) - GetGCRate_finished(projectId);
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 现场安装完成数
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static decimal GetXCRate_finished(string projectId)
|
||||
{
|
||||
decimal result = 0;
|
||||
var getWelds = Funs.DB.HJGL_WeldJoint.Where(x => x.ProjectId == projectId);
|
||||
if (getWelds.Count() > 0)
|
||||
{
|
||||
|
||||
var getWeldsOk = getWelds.Where(x => x.WeldingDailyId != null);
|
||||
if (getWeldsOk.Count() > 0)
|
||||
{
|
||||
var GCModel = getWeldsOk.Where(x => x.JointAttribute == "安装口");
|
||||
if (GCModel.Count() > 0)
|
||||
{
|
||||
result = GCModel.Sum(x => x.Size ?? 0);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 现场安装未完成数
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static decimal GetXCRate_unfinished(string projectId)
|
||||
{
|
||||
decimal result = 0;
|
||||
result = GetSumSize(projectId, 2) - GetXCRate_finished(projectId);
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 管道完成预制数
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static decimal GetPipeRate_finished(string projectId)
|
||||
{
|
||||
decimal result = 0;
|
||||
result = GetGCRate_finished(projectId);
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 管道未完成预制数
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static decimal GetPipeRate_unfinished(string projectId)
|
||||
{
|
||||
decimal result = 0;
|
||||
result = GetSumSize(projectId, 0) - GetPipeRate_finished(projectId);
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// 焊工功效
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static decimal GetWelderEfficacy(string projectId)
|
||||
{
|
||||
decimal result = 0;
|
||||
var db = Funs.DB;
|
||||
var q = (from x in db.HJGL_WeldJoint
|
||||
join y in db.HJGL_WeldingDaily on x.WeldingDailyId equals y.WeldingDailyId
|
||||
where x.ProjectId ==projectId
|
||||
group x by x.ProjectId into g
|
||||
select new
|
||||
{
|
||||
TotalDin = g.Sum(x => x.Size),
|
||||
worktime = g.Select(x=>x.WeldingDailyId).Distinct().Count(),
|
||||
}) ;
|
||||
foreach (var item in q)
|
||||
{
|
||||
result = decimal.Divide((decimal)item.TotalDin, item.worktime) ;
|
||||
|
||||
}
|
||||
|
||||
return decimal.Truncate(result);
|
||||
}
|
||||
public static decimal GetWelderEfficacy_GC(string projectId)
|
||||
{
|
||||
decimal result = 0;
|
||||
var db = Funs.DB;
|
||||
var q = (from x in db.HJGL_WeldJoint
|
||||
join y in db.HJGL_WeldingDaily on x.WeldingDailyId equals y.WeldingDailyId
|
||||
where x.ProjectId == projectId && x.JointAttribute=="预制口"
|
||||
group x by x.ProjectId into g
|
||||
select new
|
||||
{
|
||||
TotalDin = g.Sum(x => x.Size),
|
||||
worktime = g.Select(x => x.WeldingDailyId).Distinct().Count(),
|
||||
});
|
||||
foreach (var item in q)
|
||||
{
|
||||
result = decimal.Divide((decimal)item.TotalDin, item.worktime);
|
||||
|
||||
}
|
||||
|
||||
return decimal.Truncate(result);
|
||||
}
|
||||
public static decimal GetWelderEfficacy_XC(string projectId)
|
||||
{
|
||||
decimal result = 0;
|
||||
var db = Funs.DB;
|
||||
var q = (from x in db.HJGL_WeldJoint
|
||||
join y in db.HJGL_WeldingDaily on x.WeldingDailyId equals y.WeldingDailyId
|
||||
where x.ProjectId == projectId && x.JointAttribute == "安装口"
|
||||
group x by x.ProjectId into g
|
||||
select new
|
||||
{
|
||||
TotalDin = g.Sum(x => x.Size),
|
||||
worktime = g.Select(x => x.WeldingDailyId).Distinct().Count(),
|
||||
});
|
||||
foreach (var item in q)
|
||||
{
|
||||
result = decimal.Divide((decimal)item.TotalDin, item.worktime);
|
||||
|
||||
}
|
||||
|
||||
return decimal.Truncate(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -93,6 +93,7 @@ namespace BLL
|
||||
{
|
||||
model.PipelineId = PipelineId;
|
||||
model.PipelineComponentCode = model_mat.PrefabricatedComponents;
|
||||
model.DrawingName = model_mat.PrefabricatedComponents.Substring(0, model_mat.PrefabricatedComponents.LastIndexOf('-'));
|
||||
model.State = state_0;
|
||||
UpdatePipelineComponent(model);
|
||||
}
|
||||
@@ -102,6 +103,7 @@ namespace BLL
|
||||
model.PipelineComponentId = SQLHelper.GetNewID();
|
||||
model.PipelineId = PipelineId;
|
||||
model.PipelineComponentCode = model_mat.PrefabricatedComponents;
|
||||
model.DrawingName = model_mat.PrefabricatedComponents.Substring(0, model_mat.PrefabricatedComponents.LastIndexOf('-'));
|
||||
model.State = state_0;
|
||||
AddPipelineComponent(model);
|
||||
}
|
||||
@@ -131,6 +133,8 @@ namespace BLL
|
||||
newPipeline.ActStartDate = pipeline.ActStartDate;
|
||||
newPipeline.ActEndDate = pipeline.ActEndDate;
|
||||
newPipeline.DrawingName = pipeline.DrawingName;
|
||||
newPipeline.ReceiveMan= pipeline.ReceiveMan;
|
||||
newPipeline.ReceiveDate= pipeline.ReceiveDate;
|
||||
db.HJGL_Pipeline_Component.InsertOnSubmit(newPipeline);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
@@ -158,15 +162,19 @@ namespace BLL
|
||||
newPipeline.ActStartDate = pipeline.ActStartDate;
|
||||
newPipeline.ActEndDate = pipeline.ActEndDate;
|
||||
newPipeline.DrawingName = pipeline.DrawingName;
|
||||
newPipeline.ReceiveMan = pipeline.ReceiveMan;
|
||||
newPipeline.ReceiveDate = pipeline.ReceiveDate;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
public static void UpdateOutState(string pipelineComponentId)
|
||||
public static void UpdateOutState(string pipelineComponentId,string BoxNumber)
|
||||
{
|
||||
var q=GetPipelineComponentById(pipelineComponentId);
|
||||
if (q.State==state_1)
|
||||
{
|
||||
q.State = state_2;
|
||||
q.BoxNumber=BoxNumber;
|
||||
UpdatePipelineComponent(q);
|
||||
|
||||
}
|
||||
@@ -229,6 +237,16 @@ namespace BLL
|
||||
select x).ToList();
|
||||
return q;
|
||||
|
||||
}
|
||||
public static List<Model.HJGL_Pipeline_Component> GetComponentByPipelineId(string PipelineId)
|
||||
{
|
||||
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var q = (from x in db.HJGL_Pipeline_Component
|
||||
where x.PipelineId == PipelineId
|
||||
select x).OrderBy(x=>x.PlanStartDate).ToList();
|
||||
return q;
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 管线下拉框
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
using MiniExcelLibs;
|
||||
using Microsoft.Office.Interop.Word;
|
||||
using Microsoft.SqlServer.Dts.Runtime;
|
||||
using MiniExcelLibs;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Web.UI.DataVisualization.Charting;
|
||||
using System.Web.UI.WebControls;
|
||||
using static BLL.PipelineService;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
@@ -19,6 +24,29 @@ namespace BLL
|
||||
/// 现场安装
|
||||
/// </summary>
|
||||
public const string PipeArea_FIELD = "2";
|
||||
|
||||
/// <summary>
|
||||
/// 实际日期类型
|
||||
/// </summary>
|
||||
public enum ActDateType
|
||||
{
|
||||
/// <summary>
|
||||
/// 实际开始日期(预制)
|
||||
/// </summary>
|
||||
ActDateStart_Shop,
|
||||
/// <summary>
|
||||
/// 实际完成日期(预制)
|
||||
/// </summary>
|
||||
ActDateEnd_Shop ,
|
||||
/// <summary>
|
||||
/// 实际开始日期(安装)
|
||||
/// </summary>
|
||||
ActDateStart_FIELD ,
|
||||
/// <summary>
|
||||
/// 实际完成日期(安装)
|
||||
/// </summary>
|
||||
ActDateEnd_FIELD ,
|
||||
}
|
||||
public static ListItem[] GetPipeArea()
|
||||
{
|
||||
ListItem[] list = new ListItem[2];
|
||||
@@ -36,10 +64,130 @@ namespace BLL
|
||||
{
|
||||
return Funs.DB.HJGL_Pipeline.FirstOrDefault(e => e.PipelineId == pipelineId);
|
||||
}
|
||||
public static void GetStateByPipelineId(string pipelineId)
|
||||
{//< f:ListItem Value = "0" Text = "未开始" />
|
||||
// < f:ListItem Value = "1" Text = "未开始且延误" />
|
||||
// < f:ListItem Value = "2" Text = "开始" />
|
||||
// < f:ListItem Value = "3" Text = "已开始且延误" />
|
||||
// < f:ListItem Value = "4" Text = "完成" />
|
||||
var mdoel = GetPipelineByPipelineId(pipelineId);
|
||||
var PlanStartDate = mdoel.PlanStartDate;
|
||||
var PlanEndDate = mdoel.PlanEndDate;
|
||||
var ActStartDate = new DateTime?();
|
||||
var ActEndDate = new DateTime?();
|
||||
if (!string .IsNullOrEmpty(GetDateByPipelineId(pipelineId, ActDateType.ActDateStart_FIELD)))
|
||||
{
|
||||
ActStartDate = Convert.ToDateTime(GetDateByPipelineId(pipelineId, ActDateType.ActDateStart_FIELD));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(GetDateByPipelineId(pipelineId, ActDateType.ActDateEnd_FIELD)))
|
||||
{
|
||||
ActEndDate = Convert.ToDateTime(GetDateByPipelineId(pipelineId, ActDateType.ActDateEnd_FIELD));
|
||||
}
|
||||
if (ActStartDate==null&&DateTime.Compare(DateTime.Now,PlanStartDate.Value)<0)
|
||||
{
|
||||
mdoel.State = 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)
|
||||
{
|
||||
mdoel.State = 2;
|
||||
}
|
||||
else if (ActStartDate != null && DateTime.Compare(ActStartDate.Value, PlanStartDate.Value) > 0 && ActEndDate == null)
|
||||
{
|
||||
mdoel.State = 3;
|
||||
}
|
||||
else if (ActEndDate != null)
|
||||
{
|
||||
mdoel.State = 4;
|
||||
}
|
||||
UpdatePipeline(mdoel);
|
||||
}
|
||||
|
||||
public static string GetDateByPipelineId(object pipelineId, ActDateType actDateType)
|
||||
{
|
||||
string result ="";
|
||||
string _pipelineId = pipelineId.ToString();
|
||||
string ActDateStart_Shop = "";
|
||||
string ActDateEnd_Shop = "";
|
||||
string ActDateStart_FIELD = "";
|
||||
string ActDateEnd_FIELD = "";
|
||||
|
||||
var pipemodel = GetPipelineByPipelineId(_pipelineId);
|
||||
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
|
||||
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)
|
||||
{
|
||||
ActDateStart_Shop = TaskJoints_Shop.OrderBy(x => x.TaskDate).First().TaskDate.Value.ToShortDateString();
|
||||
}
|
||||
if (joint_Shop_count== TaskJoints_Shop.Count&& joint_Shop_count>0)
|
||||
{
|
||||
ActDateEnd_Shop = TaskJoints_Shop.OrderByDescending(x => x.TaskDate).First().TaskDate.Value.Date.ToShortDateString();
|
||||
}
|
||||
if (TaskJoints_Field.Count > 0)
|
||||
{
|
||||
ActDateStart_FIELD = TaskJoints_Field.OrderBy(x => x.TaskDate).First().TaskDate.Value.Date.ToShortDateString();
|
||||
}
|
||||
if (joint_Field_count == TaskJoints_Field.Count && joint_Field_count > 0)
|
||||
{
|
||||
ActDateEnd_FIELD = TaskJoints_Field.OrderByDescending(x => x.TaskDate).First().TaskDate.Value.Date.ToShortDateString();
|
||||
}
|
||||
switch (actDateType)
|
||||
{
|
||||
case ActDateType.ActDateStart_Shop:
|
||||
result = ActDateStart_Shop;
|
||||
break;
|
||||
case ActDateType.ActDateEnd_Shop:
|
||||
result = ActDateEnd_Shop;
|
||||
break;
|
||||
case ActDateType.ActDateStart_FIELD:
|
||||
result = ActDateStart_FIELD;
|
||||
break;
|
||||
case ActDateType.ActDateEnd_FIELD:
|
||||
result = ActDateEnd_FIELD;
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
public static Model.HJGL_Pipeline GetPipelineByPipelineCode(string pipelineCode)
|
||||
{
|
||||
return Funs.DB.HJGL_Pipeline.FirstOrDefault(e => e.PipelineCode == pipelineCode);
|
||||
}
|
||||
public static List<View_HJGL_Pipeline> GetView_HJGL_Pipelines(View_HJGL_Pipeline model)
|
||||
{
|
||||
var db = Funs.DB;
|
||||
var pipelineList =( from x in db.View_HJGL_Pipeline
|
||||
where
|
||||
(string.IsNullOrEmpty(model.ProjectId) || x.ProjectId.Contains(model.ProjectId))
|
||||
&& (string.IsNullOrEmpty(model.UnitWorkId) || x.UnitWorkId.Contains(model.UnitWorkId))
|
||||
&& (string.IsNullOrEmpty(model.PipelineCode) || x.PipelineCode.Contains(model.PipelineCode))
|
||||
&& (string.IsNullOrEmpty(model.SingleName) || x.SingleName.Contains(model.SingleName))
|
||||
&& (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==true)
|
||||
{
|
||||
pipelineList= pipelineList.Where(x => x.IsFinished == true).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
pipelineList = pipelineList.Where(x => x.IsFinished == false||x.IsFinished==null).ToList();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
return pipelineList;
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据unitworkId获取所有管线
|
||||
/// </summary>
|
||||
@@ -103,6 +251,7 @@ namespace BLL
|
||||
,line.ActStartDate
|
||||
,line.ActEndDate
|
||||
,line.IsFinished
|
||||
,line.FlowingSection
|
||||
,com.PipelineComponentId
|
||||
,com.PreUnit
|
||||
,com.PipelineComponentCode
|
||||
@@ -129,7 +278,7 @@ namespace BLL
|
||||
}
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
System.Data.DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
tb.TableName = "Data";
|
||||
var value = new Dictionary<string, object>()
|
||||
{
|
||||
@@ -182,6 +331,7 @@ namespace BLL
|
||||
,line.ActStartDate
|
||||
,line.ActEndDate
|
||||
,line.IsFinished
|
||||
,line.FlowingSection
|
||||
,unit.UnitWorkName
|
||||
from HJGL_Pipeline line
|
||||
left join WBS_UnitWork unit on line.UnitWorkId=unit.UnitWorkId
|
||||
@@ -195,7 +345,7 @@ namespace BLL
|
||||
}
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
System.Data.DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
tb.TableName = "Data";
|
||||
var value = new Dictionary<string, object>()
|
||||
{
|
||||
@@ -269,6 +419,7 @@ namespace BLL
|
||||
newPipeline.PCtype = pipeline.PCtype;
|
||||
newPipeline.MaterialId = pipeline.MaterialId;
|
||||
newPipeline.State = pipeline.State;
|
||||
newPipeline.FlowingSection=pipeline.FlowingSection;
|
||||
db.HJGL_Pipeline.InsertOnSubmit(newPipeline);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
@@ -313,6 +464,8 @@ namespace BLL
|
||||
newPipeline.ActEndDate = pipeline.ActEndDate;
|
||||
newPipeline.WBSId = pipeline.WBSId;
|
||||
newPipeline.State = pipeline.State;
|
||||
newPipeline.FlowingSection = pipeline.FlowingSection;
|
||||
|
||||
try
|
||||
{
|
||||
db.SubmitChanges(System.Data.Linq.ConflictMode.ContinueOnConflict);
|
||||
|
||||
@@ -54,7 +54,11 @@ namespace BLL
|
||||
var q = (from x in Funs.DB.HJGL_WeldJoint where x.WeldingDailyId == weldingDailyId orderby x.PipelineId, x.WeldJointCode select x).ToList();
|
||||
return q;
|
||||
}
|
||||
|
||||
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();
|
||||
return q;
|
||||
}
|
||||
/// <summary>
|
||||
/// 添加
|
||||
/// </summary>
|
||||
@@ -74,6 +78,7 @@ namespace BLL
|
||||
Material2Id = weldJoint.Material2Id,
|
||||
Thickness = weldJoint.Thickness,
|
||||
Dia = weldJoint.Dia,
|
||||
DNDia=weldJoint.DNDia,
|
||||
Size = weldJoint.Size,
|
||||
DetectionTypeId = weldJoint.DetectionTypeId,
|
||||
JointArea = weldJoint.JointArea,
|
||||
@@ -95,13 +100,21 @@ namespace BLL
|
||||
PreTemperature = weldJoint.PreTemperature,
|
||||
Remark = weldJoint.Remark,
|
||||
IsTwoJoint = weldJoint.IsTwoJoint,
|
||||
SubmitMan = weldJoint.SubmitMan
|
||||
SubmitMan = weldJoint.SubmitMan,
|
||||
TwoJointType=weldJoint.TwoJointType
|
||||
};
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
@@ -121,6 +134,7 @@ namespace BLL
|
||||
newWeldJoint.Material2Id = weldJoint.Material2Id;
|
||||
newWeldJoint.Thickness = weldJoint.Thickness;
|
||||
newWeldJoint.Dia = weldJoint.Dia;
|
||||
newWeldJoint.DNDia = weldJoint.DNDia;
|
||||
newWeldJoint.Size = weldJoint.Size;
|
||||
newWeldJoint.DetectionTypeId = weldJoint.DetectionTypeId;
|
||||
newWeldJoint.JointArea = weldJoint.JointArea;
|
||||
@@ -146,6 +160,8 @@ namespace BLL
|
||||
newWeldJoint.Remark = weldJoint.Remark;
|
||||
newWeldJoint.AttachUrl = weldJoint.AttachUrl;
|
||||
newWeldJoint.SubmitMan = weldJoint.SubmitMan;
|
||||
newWeldJoint.TwoJointType = weldJoint.TwoJointType;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
@@ -369,7 +385,18 @@ namespace BLL
|
||||
var q = (from x in Funs.DB.View_HJGL_WeldJoint where x.PipelineId == pipelineId orderby x.WeldJointCode select x).ToList();
|
||||
return q;
|
||||
}
|
||||
|
||||
public static List<Model.View_HJGL_WeldJoint> GetViewWeldJointsBymodel(Model.View_HJGL_WeldJoint model)
|
||||
{
|
||||
var q = (from x in Funs.DB.View_HJGL_WeldJoint
|
||||
where
|
||||
(string.IsNullOrEmpty(model.ProjectId) || x.ProjectId.Contains(model.ProjectId))
|
||||
&& (string.IsNullOrEmpty(model.UnitWorkId) || x.UnitWorkId.Contains(model.UnitWorkId))
|
||||
&& (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).ToList();
|
||||
return q;
|
||||
}
|
||||
/// <summary>
|
||||
/// 根据壁厚计算焊口达因
|
||||
/// </summary>
|
||||
|
||||
@@ -60,6 +60,7 @@ namespace BLL
|
||||
x.Major,
|
||||
x.LimitDate,
|
||||
x.Url,
|
||||
db.AttachFile.First(u => u.ToKeyId == x.PersonQualityId).AttachUrl,
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -128,7 +128,7 @@ namespace BLL
|
||||
db.SubmitChanges();
|
||||
|
||||
////在岗
|
||||
if (sitePerson.States == Const.ProjectPersonStates_1)
|
||||
if (sitePerson.States == Const.ProjectPersonStates_1 )
|
||||
{
|
||||
Model.SitePerson_PersonItem newPersonItem = new Model.SitePerson_PersonItem
|
||||
{
|
||||
@@ -143,8 +143,8 @@ namespace BLL
|
||||
RoleId = sitePerson.RoleIds,
|
||||
InTime = sitePerson.InTime,
|
||||
};
|
||||
AddPersonItem(newPersonItem);
|
||||
|
||||
AddPersonItem(newPersonItem);
|
||||
var getOtherPersons = db.SitePerson_Person.Where(x => x.IdentityCard == sitePerson.IdentityCard && x.ProjectId != sitePerson.ProjectId && x.States == Const.ProjectPersonStates_1);
|
||||
if (getOtherPersons.Count() > 0)
|
||||
{
|
||||
@@ -157,6 +157,7 @@ namespace BLL
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
getPersons.CurrentProjectId = sitePerson.ProjectId;
|
||||
getPersons.CurrentProjectRoleId = sitePerson.RoleIds;
|
||||
getPersons.CurrentProjectWorkPostId = sitePerson.WorkPostId;
|
||||
@@ -191,70 +192,79 @@ namespace BLL
|
||||
newitem.PersonName = getPerson.PersonName;
|
||||
newitem.IdentityCard = getPerson.IdentityCard;
|
||||
}
|
||||
var getPersonItem = db.SitePerson_PersonItem.FirstOrDefault(x => x.PersonId == getPerson.PersonId
|
||||
&& x.InTime <= newitem.InTime && (x.OutTime > newitem.InTime || !x.OutTime.HasValue));
|
||||
if (getPersonItem != null)
|
||||
{
|
||||
getPersonItem.OutTime = null;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.SitePerson_PersonItem newPersonItem = new Model.SitePerson_PersonItem
|
||||
{
|
||||
PersonItemId = newitem.PersonItemId,
|
||||
PersonId = newitem.PersonId,
|
||||
PersonName = newitem.PersonName,
|
||||
IdentityCard = newitem.IdentityCard,
|
||||
InTime = newitem.InTime,
|
||||
// OutTime = newitem.OutTime,
|
||||
// OutResult = newitem.OutResult,
|
||||
};
|
||||
if (!string.IsNullOrEmpty(newitem.ProjectId))
|
||||
{
|
||||
newPersonItem.ProjectId = newitem.ProjectId;
|
||||
newPersonItem.ProjectName = ProjectService.GetProjectNameByProjectId(newitem.ProjectId);
|
||||
}
|
||||
else
|
||||
{
|
||||
newPersonItem.ProjectId = null;
|
||||
newPersonItem.ProjectName = newitem.ProjectName;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(newitem.UnitId))
|
||||
{
|
||||
newPersonItem.UnitId = newitem.UnitId;
|
||||
newPersonItem.UnitName = UnitService.GetUnitNameByUnitId(newitem.UnitId);
|
||||
}
|
||||
else
|
||||
{
|
||||
newPersonItem.UnitId = null;
|
||||
newPersonItem.UnitName = newitem.UnitName;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(newitem.WorkPostId))
|
||||
{
|
||||
newPersonItem.WorkPostId = newitem.WorkPostId;
|
||||
newPersonItem.WorkPostName = WorkPostService.getWorkPostNameById(newitem.WorkPostId);
|
||||
}
|
||||
else
|
||||
{
|
||||
newPersonItem.WorkPostId = null;
|
||||
newPersonItem.WorkPostName = newitem.WorkPostName;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(newitem.TeamGroupId))
|
||||
{
|
||||
newPersonItem.TeamGroupId = newitem.TeamGroupId;
|
||||
newPersonItem.TeamGroupName = TeamGroupService.GetTeamGroupNameByTeamGroupId(newitem.TeamGroupId);
|
||||
}
|
||||
else
|
||||
{
|
||||
newPersonItem.TeamGroupId = null;
|
||||
newPersonItem.TeamGroupName = newitem.TeamGroupName;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(newitem.RoleId))
|
||||
{
|
||||
newPersonItem.RoleId = newitem.RoleId;
|
||||
newPersonItem.RoleName = RoleService.getRoleNamesRoleIds(newitem.RoleId);
|
||||
}
|
||||
else
|
||||
{
|
||||
newPersonItem.RoleId = null;
|
||||
newPersonItem.RoleName = newitem.RoleName;
|
||||
}
|
||||
|
||||
Model.SitePerson_PersonItem newPersonItem = new Model.SitePerson_PersonItem
|
||||
{
|
||||
PersonItemId = newitem.PersonItemId,
|
||||
PersonId = newitem.PersonId,
|
||||
PersonName = newitem.PersonName,
|
||||
IdentityCard = newitem.IdentityCard,
|
||||
InTime = newitem.InTime,
|
||||
OutTime = newitem.OutTime,
|
||||
OutResult = newitem.OutResult,
|
||||
};
|
||||
if (!string.IsNullOrEmpty(newitem.ProjectId))
|
||||
{
|
||||
newPersonItem.ProjectId = newitem.ProjectId;
|
||||
newPersonItem.ProjectName = ProjectService.GetProjectNameByProjectId(newitem.ProjectId);
|
||||
db.SitePerson_PersonItem.InsertOnSubmit(newPersonItem);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
newPersonItem.ProjectId =null;
|
||||
newPersonItem.ProjectName = newitem.ProjectName;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(newitem.UnitId))
|
||||
{
|
||||
newPersonItem.UnitId = newitem.UnitId;
|
||||
newPersonItem.UnitName = UnitService.GetUnitNameByUnitId(newitem.UnitId);
|
||||
}
|
||||
else
|
||||
{
|
||||
newPersonItem.UnitId = null;
|
||||
newPersonItem.UnitName = newitem.UnitName;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(newitem.WorkPostId))
|
||||
{
|
||||
newPersonItem.WorkPostId = newitem.WorkPostId;
|
||||
newPersonItem.WorkPostName = WorkPostService.getWorkPostNameById(newitem.WorkPostId);
|
||||
}
|
||||
else
|
||||
{
|
||||
newPersonItem.WorkPostId = null;
|
||||
newPersonItem.WorkPostName = newitem.WorkPostName;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(newitem.TeamGroupId))
|
||||
{
|
||||
newPersonItem.TeamGroupId = newitem.TeamGroupId;
|
||||
newPersonItem.TeamGroupName = TeamGroupService.GetTeamGroupNameByTeamGroupId(newitem.TeamGroupId);
|
||||
}
|
||||
else
|
||||
{
|
||||
newPersonItem.TeamGroupId = null;
|
||||
newPersonItem.TeamGroupName = newitem.TeamGroupName;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(newitem.RoleId))
|
||||
{
|
||||
newPersonItem.RoleId = newitem.RoleId;
|
||||
newPersonItem.RoleName = RoleService.getRoleNamesRoleIds(newitem.RoleId);
|
||||
}
|
||||
else
|
||||
{
|
||||
newPersonItem.RoleId = null;
|
||||
newPersonItem.RoleName = newitem.RoleName;
|
||||
}
|
||||
|
||||
db.SitePerson_PersonItem.InsertOnSubmit(newPersonItem);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using FineUIPro;
|
||||
using Microsoft.Office.Interop.Excel;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections;
|
||||
@@ -57,8 +58,12 @@ namespace BLL
|
||||
}
|
||||
if (!string.IsNullOrEmpty(projetcId) && projetcId != Const._Null)
|
||||
{
|
||||
getDataList = getDataList.Where(e => e.CurrentProjectId == projetcId);
|
||||
getDataList = from x in getDataList
|
||||
join y in db.SitePerson_PersonItem on x.PersonId equals y.PersonId
|
||||
where y.ProjectId == projetcId && !y.OutTime.HasValue
|
||||
select x;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(personType) && personType != Const._Null)
|
||||
{
|
||||
getDataList = getDataList.Where(e => e.PersonType == personType);
|
||||
@@ -71,6 +76,7 @@ namespace BLL
|
||||
{
|
||||
getDataList = getDataList.Where(e => e.IdentityCard.Contains(idCard));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(isPost) && isPost != "-1" && isPost != Const._Null)
|
||||
{
|
||||
if (isPost == Const._True)
|
||||
@@ -112,9 +118,9 @@ namespace BLL
|
||||
x.RoleIds,
|
||||
RoleName = RoleService.getRoleNamesRoleIds(x.RoleIds),
|
||||
x.CurrentProjectId,
|
||||
CurrentProjectName = db.Base_Project.First(u => u.ProjectId == x.CurrentProjectId).ShortName,
|
||||
CurrentProjectName = getCurrentProjectName(x.PersonId),
|
||||
x.CurrentProjectWorkPostId,
|
||||
CurrentProjectWorkPostName = WorkPostService.getWorkPostNamesWorkPostIds(x.CurrentProjectWorkPostId),
|
||||
CurrentProjectWorkPostName = getCurrentProjectWorkPostName(x.PersonId),
|
||||
IsPost = x.IsPost ?? true,
|
||||
x.SignatureUrl,
|
||||
x.Address,
|
||||
@@ -139,7 +145,47 @@ namespace BLL
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 获取当前项目及岗位
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="ProjectId"></param>
|
||||
/// <param name="PersonId"></param>
|
||||
/// <returns></returns>
|
||||
public static string getCurrentProjectName(string PersonId)
|
||||
{
|
||||
var getItem = Funs.DB.SitePerson_PersonItem.FirstOrDefault(u => u.PersonId == PersonId && !u.OutTime.HasValue);
|
||||
if (getItem != null)
|
||||
{
|
||||
return ProjectService.GetShortNameByProjectId(getItem.ProjectId);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="WorkPostId"></param>
|
||||
/// <param name="PersonId"></param>
|
||||
/// <returns></returns>
|
||||
public static string getCurrentProjectWorkPostName( string PersonId)
|
||||
{
|
||||
var getItem = Funs.DB.SitePerson_PersonItem.FirstOrDefault(u => u.PersonId == PersonId && !u.OutTime.HasValue);
|
||||
if (getItem != null)
|
||||
{
|
||||
return WorkPostService.getWorkPostNamesWorkPostIds(getItem.WorkPostId);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 根据主键获取人员信息
|
||||
/// <summary>
|
||||
/// 根据主键获取人员信息
|
||||
@@ -152,6 +198,32 @@ namespace BLL
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键,项目id判断当前人单位是否是总包单位
|
||||
/// </summary>
|
||||
/// <param name="PersonId"></param>
|
||||
/// <param name="ProjectId"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsGeneralUnitByPersonId(string PersonId,string ProjectId)
|
||||
{
|
||||
bool result = false;
|
||||
var PersonEntity = GetPerson_PersonsById(PersonId);
|
||||
if (PersonEntity!=null)
|
||||
{
|
||||
var pUnit = Funs.DB.Project_ProjectUnit.FirstOrDefault(e => e.ProjectId == ProjectId && e.UnitId == PersonEntity.UnitId);
|
||||
if (pUnit != null)
|
||||
{
|
||||
if (pUnit.UnitType == Const.ProjectUnitType_1 )
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
|
||||
}
|
||||
|
||||
#region 根据身份证号码获取人员信息
|
||||
/// <summary>
|
||||
/// 根据身份证号码获取人员信息
|
||||
@@ -478,7 +550,7 @@ namespace BLL
|
||||
{
|
||||
var getPersons = from x in db.Person_Persons
|
||||
where x.PersonId != Const.hfnbdId && x.PersonId != Const.sedinId
|
||||
&& (x.IsPost == true || !x.IsPost.HasValue) && x.RoleIds != null
|
||||
&& (x.IsPost == true || !x.IsPost.HasValue) && x.Account != null
|
||||
select x;
|
||||
if (listUnitIds.Count() > 0)
|
||||
{
|
||||
@@ -614,7 +686,7 @@ namespace BLL
|
||||
WorkDate = person.WorkDate,
|
||||
RetirementDate = person.RetirementDate,
|
||||
RelativeName = person.RelativeName,
|
||||
RelativeTel = person.RelativeTel,
|
||||
RelativeTel = person.RelativeTel,
|
||||
};
|
||||
|
||||
if (string.IsNullOrEmpty(person.QRCodeAttachUrl))
|
||||
@@ -863,7 +935,6 @@ namespace BLL
|
||||
newPerson.RetirementDate = person.RetirementDate;
|
||||
newPerson.RelativeName = person.RelativeName;
|
||||
newPerson.RelativeTel = person.RelativeTel;
|
||||
|
||||
// newPerson.IsCardNoOK = IDCardValid.CheckIDCard(person.IdentityCard);
|
||||
if (string.IsNullOrEmpty(person.QRCodeAttachUrl))
|
||||
{
|
||||
|
||||
@@ -24,7 +24,8 @@ namespace BLL
|
||||
/// </summary>
|
||||
private static IQueryable<Model.Person_Persons> getDataLists = from x in db.Person_Persons
|
||||
where x.PersonId != Const.sysglyId && x.PersonId != Const.hfnbdId && x.UnitId == Const.UnitId_SEDIN
|
||||
&& x.DepartId == Const.Depart_constructionId && (!x.IsPost.HasValue || x.IsPost == true)
|
||||
&& x.DepartId == Const.Depart_constructionId
|
||||
&& x.CurrentProjectId == null && (!x.IsOffice.HasValue || x.IsOffice == false)
|
||||
select x;
|
||||
|
||||
/// <summary>
|
||||
@@ -79,22 +80,69 @@ namespace BLL
|
||||
x.DepartId,
|
||||
x.WorkPostId,
|
||||
WorkPostName = WorkPostService.getWorkPostNamesWorkPostIds(x.WorkPostId),
|
||||
x.Major,
|
||||
x.PostTitleId,
|
||||
PostTitleName = PostTitleService.getPostTitleNameById(x.PostTitleId),
|
||||
x.IsOffice,
|
||||
x.RoleIds,
|
||||
RoleName = RoleService.getRoleNamesRoleIds(x.RoleIds),
|
||||
x.CurrentProjectId,
|
||||
CurrentProjectName = db.Base_Project.First(u => u.ProjectId == x.CurrentProjectId).ShortName,
|
||||
LastProjectName = getCurrentProjectName(x.PersonId),
|
||||
x.CurrentProjectWorkPostId,
|
||||
CurrentProjectWorkPostName = WorkPostService.getWorkPostNamesWorkPostIds(x.CurrentProjectWorkPostId),
|
||||
LastWorkPostName = getCurrentProjectWorkPostName(x.PersonId),
|
||||
IsPost = x.IsPost ?? true,
|
||||
IsPostName = x.IsPost == false ? "否" : "是",
|
||||
x.SignatureUrl,
|
||||
x.CertificateId,
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取当前项目及岗位
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="ProjectId"></param>
|
||||
/// <param name="PersonId"></param>
|
||||
/// <returns></returns>
|
||||
public static string getCurrentProjectName(string PersonId)
|
||||
{
|
||||
var getItem = (from x in Funs.DB.SitePerson_PersonItem where x.PersonId == PersonId
|
||||
orderby x.InTime descending
|
||||
select x).FirstOrDefault();
|
||||
if (getItem != null)
|
||||
{
|
||||
return ProjectService.GetShortNameByProjectId(getItem.ProjectId);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="WorkPostId"></param>
|
||||
/// <param name="PersonId"></param>
|
||||
/// <returns></returns>
|
||||
public static string getCurrentProjectWorkPostName(string PersonId)
|
||||
{
|
||||
var getItem = (from x in Funs.DB.SitePerson_PersonItem
|
||||
where x.PersonId == PersonId
|
||||
orderby x.InTime descending
|
||||
select x).FirstOrDefault();
|
||||
if (getItem != null)
|
||||
{
|
||||
return WorkPostService.getWorkPostNamesWorkPostIds(getItem.WorkPostId);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 添加分流管理
|
||||
/// </summary>
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace BLL
|
||||
Model.Project_Sys_Set Model_JointCompleteColor = BLL.Project_SysSetService.GetSysSetBySetName("焊口已完成", projectId);
|
||||
if (Model_JointCompleteColor != null)
|
||||
{
|
||||
colorModel.JointNOCompleteColor = Model_JointCompleteColor.SetValue;
|
||||
colorModel.JointCompleteColor = Model_JointCompleteColor.SetValue;
|
||||
}
|
||||
|
||||
return colorModel;
|
||||
|
||||
@@ -236,20 +236,17 @@ namespace BLL
|
||||
{
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var units = (from x in db.Base_Unit
|
||||
orderby x.UnitCode
|
||||
select x).ToList();
|
||||
if (!string.IsNullOrEmpty(projectId))
|
||||
var units = from x in db.Base_Unit
|
||||
select x;
|
||||
if (!string.IsNullOrEmpty(projectId) && projectId != Const._Null)
|
||||
{
|
||||
units = (from x in units
|
||||
join y in db.Project_ProjectUnit on x.UnitId equals y.UnitId
|
||||
where y.ProjectId == projectId
|
||||
select x).ToList();
|
||||
units = from x in units
|
||||
join y in db.Project_ProjectUnit on x.UnitId equals y.UnitId
|
||||
where y.ProjectId == projectId
|
||||
select x;
|
||||
}
|
||||
|
||||
units = units.OrderBy(x => x.UnitCode).ToList();
|
||||
|
||||
return units;
|
||||
return units.OrderBy(x => x.UnitCode).ToList(); ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -195,7 +195,7 @@ namespace BLL
|
||||
string clientId = SynchroSet.ClientId;
|
||||
string userName = SynchroSet.UserName;
|
||||
string password = Funs.EncryptionPassword(SynchroSet.Password);
|
||||
string timestamp = string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now.AddMinutes(-2));
|
||||
string timestamp = string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now.AddMinutes(-3));
|
||||
string sign = Funs.EncryptionPassword(clientId + userName + password + timestamp);
|
||||
var getToken = new
|
||||
{
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" runat="server" />
|
||||
<f:TabStrip ID="TabStrip1" IsFluid="true" Height="500px" ShowBorder="true" ActiveTabIndex="0"
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="TabStrip1" runat="server" />
|
||||
<f:TabStrip ID="TabStrip1" IsFluid="true" ShowBorder="true" ActiveTabIndex="0"
|
||||
runat="server">
|
||||
<Tabs>
|
||||
<f:Tab ID="Tab1" EnableIFrame="true"
|
||||
|
||||
@@ -10,9 +10,10 @@
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
|
||||
<div>
|
||||
</div>
|
||||
<cc2:WebReport ID="WebReport1" runat="server" Width="1000" Height="600" ReportResourceString="77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxSZXBvcnQgU2NyaXB0TGFuZ3VhZ2U9IkNTaGFycCIgUmVwb3J0SW5mby5DcmVhdGVkPSIxMS8wOS8yMDE1IDEyOjU1OjEyIiBSZXBvcnRJbmZvLk1vZGlmaWVkPSIxMS8wOS8yMDE1IDE1OjAzOjI1IiBSZXBvcnRJbmZvLkNyZWF0b3JWZXJzaW9uPSIyMDE1LjQuNC4wIj4NCiAgPERpY3Rpb25hcnkvPg0KICA8UmVwb3J0UGFnZSBOYW1lPSJQYWdlMSI+DQogICAgPFJlcG9ydFRpdGxlQmFuZCBOYW1lPSJSZXBvcnRUaXRsZTEiIFdpZHRoPSI3MTguMiIgSGVpZ2h0PSIzNy44Ij4NCiAgICAgIDxUZXh0T2JqZWN0IE5hbWU9IlRleHQxIiBMZWZ0PSIxNzkuNTUiIFRvcD0iOS40NSIgV2lkdGg9IjE4OSIgSGVpZ2h0PSIxOC45IiBUZXh0PSJbRGF0ZV0iLz4NCiAgICA8L1JlcG9ydFRpdGxlQmFuZD4NCiAgICA8UGFnZUhlYWRlckJhbmQgTmFtZT0iUGFnZUhlYWRlcjEiIFRvcD0iNDEuOCIgV2lkdGg9IjcxOC4yIiBIZWlnaHQ9IjI4LjM1Ii8+DQogICAgPERhdGFCYW5kIE5hbWU9IkRhdGExIiBUb3A9Ijc0LjE1IiBXaWR0aD0iNzE4LjIiIEhlaWdodD0iNzUuNiIvPg0KICAgIDxQYWdlRm9vdGVyQmFuZCBOYW1lPSJQYWdlRm9vdGVyMSIgVG9wPSIxNTMuNzUiIFdpZHRoPSI3MTguMiIgSGVpZ2h0PSIxOC45Ii8+DQogIDwvUmVwb3J0UGFnZT4NCjwvUmVwb3J0Pg0K" />
|
||||
<cc2:WebReport ID="WebReport1" runat="server" Width="100%" Height="100%" AutoWidth="true" AutoHeight="true" ReportResourceString="77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxSZXBvcnQgU2NyaXB0TGFuZ3VhZ2U9IkNTaGFycCIgUmVwb3J0SW5mby5DcmVhdGVkPSIxMS8wOS8yMDE1IDEyOjU1OjEyIiBSZXBvcnRJbmZvLk1vZGlmaWVkPSIxMS8wOS8yMDE1IDE1OjAzOjI1IiBSZXBvcnRJbmZvLkNyZWF0b3JWZXJzaW9uPSIyMDE1LjQuNC4wIj4NCiAgPERpY3Rpb25hcnkvPg0KICA8UmVwb3J0UGFnZSBOYW1lPSJQYWdlMSI+DQogICAgPFJlcG9ydFRpdGxlQmFuZCBOYW1lPSJSZXBvcnRUaXRsZTEiIFdpZHRoPSI3MTguMiIgSGVpZ2h0PSIzNy44Ij4NCiAgICAgIDxUZXh0T2JqZWN0IE5hbWU9IlRleHQxIiBMZWZ0PSIxNzkuNTUiIFRvcD0iOS40NSIgV2lkdGg9IjE4OSIgSGVpZ2h0PSIxOC45IiBUZXh0PSJbRGF0ZV0iLz4NCiAgICA8L1JlcG9ydFRpdGxlQmFuZD4NCiAgICA8UGFnZUhlYWRlckJhbmQgTmFtZT0iUGFnZUhlYWRlcjEiIFRvcD0iNDEuOCIgV2lkdGg9IjcxOC4yIiBIZWlnaHQ9IjI4LjM1Ii8+DQogICAgPERhdGFCYW5kIE5hbWU9IkRhdGExIiBUb3A9Ijc0LjE1IiBXaWR0aD0iNzE4LjIiIEhlaWdodD0iNzUuNiIvPg0KICAgIDxQYWdlRm9vdGVyQmFuZCBOYW1lPSJQYWdlRm9vdGVyMSIgVG9wPSIxNTMuNzUiIFdpZHRoPSI3MTguMiIgSGVpZ2h0PSIxOC45Ii8+DQogIDwvUmVwb3J0UGFnZT4NCjwvUmVwb3J0Pg0K" />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
function BindData(dataList, Url_item,Url) {
|
||||
receiver.src = Url_item;
|
||||
// var newdatalist = dataList.split(",");
|
||||
console.log(dataList);
|
||||
receiver.contentWindow.postMessage(dataList, Url);
|
||||
}
|
||||
function iFrameHeight() {
|
||||
@@ -30,8 +31,8 @@
|
||||
if (ifm != null && subWeb != null) {
|
||||
// ifm.height = subWeb.body.scrollHeight;
|
||||
ifm.height = document.documentElement.clientHeight;
|
||||
console.log(ifm.height);
|
||||
console.log(document.documentElement.clientHeight);
|
||||
//console.log(ifm.height);
|
||||
//console.log(document.documentElement.clientHeight);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -37,7 +37,7 @@
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<WarningLevel>3</WarningLevel>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
@@ -73,16 +73,20 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\FineUIPro\Reference BLL\AxInterop.SYNCARDOCXLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FastReport">
|
||||
<Reference Include="FastReport, Version=2021.3.0.0, Culture=neutral, PublicKeyToken=db7e5ce63278458c, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\FineUIPro\Reference BLL\FastReport.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FastReport.Bars">
|
||||
<Reference Include="FastReport.Bars, Version=2021.3.0.0, Culture=neutral, PublicKeyToken=db7e5ce63278458c, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\FineUIPro\Reference BLL\FastReport.Bars.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FastReport.Editor">
|
||||
<Reference Include="FastReport.Editor, Version=2021.3.0.0, Culture=neutral, PublicKeyToken=db7e5ce63278458c, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\FineUIPro\Reference BLL\FastReport.Editor.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FastReport.Web">
|
||||
<Reference Include="FastReport.Web, Version=2021.3.0.0, Culture=neutral, PublicKeyToken=db7e5ce63278458c, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\FineUIPro\Reference BLL\FastReport.Web.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FineUIPro, Version=6.3.0.0, Culture=neutral, PublicKeyToken=9cbe753c029f291a, processorArchitecture=MSIL">
|
||||
@@ -12224,9 +12228,8 @@
|
||||
<UseIIS>True</UseIIS>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>0</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>
|
||||
</DevelopmentServerVPath>
|
||||
<IISUrl>http://localhost:8008/</IISUrl>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>http://localhost:4641/</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>False</UseCustomServer>
|
||||
<CustomServerUrl>
|
||||
|
||||
@@ -49,16 +49,16 @@
|
||||
TextAlign="Left" SortField="MaterialCode">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="200px" ColumnID="MaterialName" DataField="MaterialName"
|
||||
FieldType="String" HeaderText="元件类型" HeaderTextAlign="Center"
|
||||
FieldType="String" HeaderText="类型" HeaderTextAlign="Center"
|
||||
TextAlign="Left" SortField="MaterialName">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="" DataField="MaterialSpec"
|
||||
FieldType="String" HeaderText="规格" HeaderTextAlign="Center"
|
||||
TextAlign="Left" SortField="MaterialSpec">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="180px" ColumnID="MaterialMade" DataField="MaterialMade" FieldType="String" HeaderText="材质"
|
||||
<%--<f:RenderField Width="180px" ColumnID="MaterialMade" DataField="MaterialMade" FieldType="String" HeaderText="材质"
|
||||
HeaderTextAlign="Center" TextAlign="Left" SortField="MaterialMade" >
|
||||
</f:RenderField>
|
||||
</f:RenderField>--%>
|
||||
<f:RenderField Width="90px" ColumnID="MaterialUnit" DataField="MaterialUnit" FieldType="String" HeaderText="单位"
|
||||
HeaderTextAlign="Center" TextAlign="Left" SortField="MaterialUnit" >
|
||||
</f:RenderField>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtMaterialName" runat="server" Label="材料类型"
|
||||
<f:TextBox ID="txtMaterialName" runat="server" Label="类型"
|
||||
Required="true" MaxLength="50" ShowRedStar="true" LabelWidth="100px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
@@ -36,7 +36,7 @@
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtMaterialMade" runat="server" Label="材质"
|
||||
<f:TextBox ID="txtMaterialMade" runat="server" Label="材质" Hidden="true"
|
||||
LabelWidth="100px">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
|
||||
@@ -128,7 +128,7 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
return;
|
||||
}
|
||||
|
||||
DataRow[] dv = ds.Tables[0].Select("采购码 <>'' and 元件类型 <>''");
|
||||
DataRow[] dv = ds.Tables[0].Select("元件编码 <>'' and 类型 <>''");
|
||||
//导入数据库
|
||||
if (dv.Length > 0)
|
||||
{
|
||||
@@ -137,20 +137,20 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
HJGL_MaterialCodeLib item = new HJGL_MaterialCodeLib();
|
||||
|
||||
#region 数据验证和赋值
|
||||
if (dv[i]["采购码"] != null && !string.IsNullOrEmpty(dv[i]["采购码"].ToString()))
|
||||
if (dv[i]["元件编码"] != null && !string.IsNullOrEmpty(dv[i]["元件编码"].ToString()))
|
||||
{
|
||||
item.MaterialCode = dv[i]["采购码"].ToString();
|
||||
item.MaterialCode = dv[i]["元件编码"].ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
errorInfos += (i + 2) + "Line, [采购码] 不能为空</br>";
|
||||
errorInfos += (i + 2) + "Line, [元件编码] 不能为空</br>";
|
||||
}
|
||||
item.MaterialDef = dv[i]["材料描述"].ToString();
|
||||
item.MaterialSpec = dv[i]["规格"].ToString();
|
||||
item.MaterialMade = dv[i]["材质"].ToString();
|
||||
// item.MaterialMade = dv[i]["材质"].ToString();
|
||||
item.MaterialUnit = dv[i]["单位"].ToString();
|
||||
item.MaterialName = dv[i]["元件类型"].ToString();
|
||||
item.PipeGrade = dv[i]["管道等级"].ToString();
|
||||
item.MaterialName = dv[i]["类型"].ToString();
|
||||
//item.PipeGrade = dv[i]["管道等级"].ToString();
|
||||
//item.ProjectId = CurrUser.LoginProjectId;
|
||||
//= SQLHelper.GetNewID(typeof(Model.Editor_CostReport));
|
||||
if (!codeLib.Select(x => x.MaterialCode).Contains(item.MaterialCode))
|
||||
|
||||
@@ -419,8 +419,8 @@ namespace FineUIPro.Web.HJGL.BaseInfo
|
||||
int a = PipingClassList.Count();
|
||||
for (int i = 0; i < a; i++)
|
||||
{
|
||||
var isExistPipingClassCode = Funs.DB.Base_PipingClass.FirstOrDefault(x => (x.PipingClassId != PipingClassList[i].PipingClassId || (PipingClassList[i].PipingClassId == null && x.PipingClassId != null)) && x.PipingClassCode == PipingClassList[i].PipingClassCode);
|
||||
var isExistPipingClassName = Funs.DB.Base_PipingClass.FirstOrDefault(x => (x.PipingClassId != PipingClassList[i].PipingClassId || (PipingClassList[i].PipingClassId == null && x.PipingClassId != null)) && x.PipingClassName == PipingClassList[i].PipingClassName);
|
||||
var isExistPipingClassCode = Funs.DB.Base_PipingClass.FirstOrDefault(x => (x.PipingClassId == PipingClassList[i].PipingClassId || (PipingClassList[i].PipingClassId == null && x.PipingClassId != null)) && x.PipingClassCode == PipingClassList[i].PipingClassCode);
|
||||
var isExistPipingClassName = Funs.DB.Base_PipingClass.FirstOrDefault(x => (x.PipingClassId == PipingClassList[i].PipingClassId || (PipingClassList[i].PipingClassId == null && x.PipingClassId != null)) && x.PipingClassName == PipingClassList[i].PipingClassName);
|
||||
if (isExistPipingClassCode != null)
|
||||
{
|
||||
ShowNotify("存在相同批次的管道等级代号,请修正后重新提交!", MessageBoxIcon.Warning);
|
||||
|
||||
@@ -43,9 +43,9 @@
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="数据" ForceFit="true" MinColumnWidth="50px"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="DataImportId"
|
||||
AllowColumnLocking="true" EnableColumnLines="true" DataIDField="DataImportId"
|
||||
AllowColumnLocking="true" EnableColumnLines="true" DataIDField="DataImportId"
|
||||
AllowSorting="true" SortField="DataImportId" SortDirection="ASC" OnSort="Grid1_Sort"
|
||||
EnableCheckBoxSelect="true" EnableMultiSelect="false" EnableRowClickEvent="true" OnRowClick="Grid1_RowClick"
|
||||
EnableCheckBoxSelect="true" EnableMultiSelect="true" EnableRowClickEvent="true" OnRowClick="Grid1_RowClick"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="right">
|
||||
@@ -55,7 +55,8 @@
|
||||
</f:TextBox>
|
||||
<f:DropDownList runat="server" ID="DropImportType" Label="文件类别" ShowRedStar="true" Required="true" LabelAlign="Right" LabelWidth="140px" AutoPostBack="true">
|
||||
<f:ListItem Text="ISO轴测图" Value="0" />
|
||||
<f:ListItem Text="管道预制加工图" Value="3" />
|
||||
<f:ListItem Text="ISO施工轴测图" Value="4" />
|
||||
<f:ListItem Text="管道预制加工图" Value="3" />
|
||||
</f:DropDownList>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnSearch" ToolTip="查询" Icon="SystemSearch" runat="server" OnClick="btnQuery_Click" Text="查询" Hidden="true">
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
from ( select * from HJGL_DataImport a where not exists (select 1 from HJGL_DataImport b where a.FileName=b.FileName and a.UnitWorkId=b.UnitWorkId and a.Version<b.Version )) as Import
|
||||
left join Base_DesignProfessional as Design on Design.DesignProfessionalId=Import.DesignProfessionalId
|
||||
left join Person_Persons as Users on Users.PersonId=Import.CreateMan
|
||||
where Import.UnitWorkId=@UnitWorkId and Import.ProjectId=@ProjectId and Import.ImportType in ('0','3') ";
|
||||
where Import.UnitWorkId=@UnitWorkId and Import.ProjectId=@ProjectId and Import.ImportType in ('0','3','4') ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID));
|
||||
@@ -184,7 +184,7 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
from ( select * from HJGL_DataImport a where exists (select 1 from HJGL_DataImport b where a.FileName=b.FileName and a.UnitWorkId=b.UnitWorkId and a.Version<b.Version )) as Import
|
||||
left join Base_DesignProfessional as Design on Design.DesignProfessionalId=Import.DesignProfessionalId
|
||||
left join Person_Persons as Users on Users.PersonId=Import.CreateMan
|
||||
where Import.UnitWorkId=@UnitWorkId and Import.ProjectId=@ProjectId and Import.FileName=@FileName and Import.ImportType in ('0','3')";
|
||||
where Import.UnitWorkId=@UnitWorkId and Import.ProjectId=@ProjectId and Import.FileName=@FileName and Import.ImportType in ('0','3','4')";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID));
|
||||
|
||||
@@ -17,8 +17,9 @@
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList runat="server" ID="DropImportType" Label="文件类别" ShowRedStar="true" Required="true" LabelAlign="Right" LabelWidth="140px" AutoPostBack="true">
|
||||
<f:ListItem Text="ISO轴测图" Value="0" />
|
||||
<f:ListItem Text="管道预制加工图" Value="3" />
|
||||
<f:ListItem Text="ISO轴测图" Value="0" />
|
||||
<f:ListItem Text="ISO施工轴测图" Value="4" />
|
||||
<f:ListItem Text="管道预制加工图" Value="3" />
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="DropDesignProfessional" runat="server" Label="专业" ShowRedStar="true" AutoSelectFirstItem="true" LabelAlign="Right" AutoPostBack="true" LabelWidth="140px"></f:DropDownList>
|
||||
</Items>
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
<Tabs>
|
||||
<f:Tab ID="TabJoint" Title="工厂预制" BodyPadding="1px" Layout="VBox" runat="server" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="工厂预制"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="工厂预制"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="PipeLineMatId"
|
||||
EnableColumnLines="true" DataIDField="PipeLineMatId" AllowSorting="true"
|
||||
SortField="PipeLineMatId" SortDirection="ASC" OnSort="Grid1_Sort"
|
||||
@@ -103,37 +103,37 @@
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号"
|
||||
Width="60px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField Width="100px" ColumnID="PrefabricatedComponents" DataField="PrefabricatedComponents" SortField="PrefabricatedComponents"
|
||||
<f:RenderField Width="300px" ColumnID="PrefabricatedComponents" DataField="PrefabricatedComponents" SortField="PrefabricatedComponents"
|
||||
FieldType="String" HeaderText="预制组件" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="材料编码" ColumnID="MaterialCode"
|
||||
DataField="MaterialCode" SortField="MaterialCode" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="150px">
|
||||
TextAlign="Left" Width="100px">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField Width="100px" ColumnID="MaterialSpec" DataField="MaterialSpec" SortField="MaterialSpec"
|
||||
FieldType="String" HeaderText="规格" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="MaterialMade" DataField="MaterialMade" SortField="MaterialMade"
|
||||
<%--<f:RenderField Width="150px" ColumnID="MaterialMade" DataField="MaterialMade" SortField="MaterialMade"
|
||||
FieldType="String" HeaderText="材质" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="MaterialName" DataField="MaterialName" SortField="MaterialName"
|
||||
FieldType="String" HeaderText="材料类型" HeaderTextAlign="Center"
|
||||
</f:RenderField>--%>
|
||||
<f:RenderField Width="80px" ColumnID="MaterialName" DataField="MaterialName" SortField="MaterialName"
|
||||
FieldType="String" HeaderText="类型" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="Number" DataField="Number" SortField="Number"
|
||||
FieldType="String" HeaderText="数量" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="MaterialUnit" DataField="MaterialUnit" SortField="MaterialUnit"
|
||||
<f:RenderField Width="80px" ColumnID="MaterialUnit" DataField="MaterialUnit" SortField="MaterialUnit"
|
||||
FieldType="String" HeaderText="单位" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="200px" ColumnID="MaterialDef" DataField="MaterialDef" SortField="MaterialDef"
|
||||
FieldType="String" HeaderText="材料描述" HeaderTextAlign="Center"
|
||||
<f:RenderField Width="600px" ColumnID="MaterialDef" DataField="MaterialDef" SortField="MaterialDef"
|
||||
FieldType="String" HeaderText="材料描述" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
@@ -146,7 +146,7 @@
|
||||
</f:Tab>
|
||||
<f:Tab ID="TabPipeMat" Title="现场施工" BodyPadding="1px" Layout="VBox" runat="server" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" Title="现场施工"
|
||||
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" Title="现场施工"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="PipeLineMatId"
|
||||
EnableColumnLines="true" DataIDField="PipeLineMatId" AllowSorting="true"
|
||||
SortField="PipeLineMatId" SortDirection="ASC" OnSort="Grid2_Sort"
|
||||
@@ -162,23 +162,23 @@
|
||||
FieldType="String" HeaderText="规格" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="MaterialMade" DataField="MaterialMade" SortField="MaterialMade"
|
||||
<%-- <f:RenderField Width="150px" ColumnID="MaterialMade" DataField="MaterialMade" SortField="MaterialMade"
|
||||
FieldType="String" HeaderText="材质" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="MaterialName" DataField="MaterialName" SortField="MaterialName"
|
||||
FieldType="String" HeaderText="材料类型" HeaderTextAlign="Center"
|
||||
</f:RenderField>--%>
|
||||
<f:RenderField Width="80px" ColumnID="MaterialName" DataField="MaterialName" SortField="MaterialName"
|
||||
FieldType="String" HeaderText="类型" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="Number" DataField="Number" SortField="Number"
|
||||
FieldType="String" HeaderText="数量" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="MaterialUnit" DataField="MaterialUnit" SortField="MaterialUnit"
|
||||
<f:RenderField Width="80px" ColumnID="MaterialUnit" DataField="MaterialUnit" SortField="MaterialUnit"
|
||||
FieldType="String" HeaderText="单位" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="200px" ColumnID="MaterialDef" DataField="MaterialDef" SortField="MaterialDef"
|
||||
<f:RenderField Width="600px" ColumnID="MaterialDef" DataField="MaterialDef" SortField="MaterialDef"
|
||||
FieldType="String" HeaderText="材料描述" HeaderTextAlign="Center"
|
||||
TextAlign="Left" >
|
||||
</f:RenderField>
|
||||
|
||||
@@ -225,8 +225,19 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
if (pipeline != null)
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID;
|
||||
|
||||
this.BindGrid1(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text);
|
||||
this.BindGrid2(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text);
|
||||
if (pipeline.PipeArea == PipelineService.PipeArea_SHOP)
|
||||
{
|
||||
TabStrip1.ActiveTabIndex = 0;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
TabStrip1.ActiveTabIndex = 1;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,8 +35,9 @@ namespace FineUIPro.Web.HJGL.DataImport
|
||||
rootNode1.NodeID = "1";
|
||||
rootNode1.Text = "建筑工程";
|
||||
rootNode1.CommandName = "建筑工程";
|
||||
rootNode1.EnableClickEvent = true;
|
||||
rootNode1.EnableCollapseEvent = true;
|
||||
//rootNode1.EnableClickEvent = true;
|
||||
//rootNode1.EnableCollapseEvent = true;
|
||||
rootNode1.Selectable = false;
|
||||
this.tvControlItem.Nodes.Add(rootNode1);
|
||||
|
||||
TreeNode rootNode2 = new TreeNode();
|
||||
|
||||
@@ -62,8 +62,8 @@
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="焊口台账总览"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" EnableColumnLines="true" DataKeyNames="WeldJointId"
|
||||
ClicksToEdit="2" DataIDField="WeldJointId" AllowSorting="true"
|
||||
SortField="UnitWorkCode,PipelineCode,WeldJointCode" OnSort="Grid1_Sort"
|
||||
ClicksToEdit="2" DataIDField="WeldJointId" AllowSorting="true" EnableCheckBoxSelect="true"
|
||||
SortField="UnitWorkCode,PipelineCode,WeldJointCode" OnSort="Grid1_Sort" OnRowClick="Grid1_RowClick" EnableRowClickEvent="true"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
@@ -94,23 +94,25 @@
|
||||
<asp:Label ID="labNumber" runat="server" Text=' <%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField HeaderText="焊口号" ColumnID="WeldJointCode"
|
||||
DataField="WeldJointCode" SortField="WeldJointCode" FieldType="String" HeaderTextAlign="Center"
|
||||
Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="完成状态" ColumnID="UnitWorkCode1" DataField="UnitWorkCode1"
|
||||
SortField="UnitWorkCode" FieldType="String" HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="单位名称" ColumnID="UnitName" DataField="UnitName"
|
||||
SortField="UnitName" FieldType="String" HeaderTextAlign="Center" Width="180px">
|
||||
</f:RenderField>
|
||||
<%--<f:RenderField HeaderText="单位工程" ColumnID="UnitWorkCode" DataField="UnitWorkCode"
|
||||
SortField="UnitWorkCode" FieldType="String" HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>--%>
|
||||
<f:RenderField HeaderText="完成状态" ColumnID="UnitWorkCode1" DataField="UnitWorkCode1"
|
||||
SortField="UnitWorkCode" FieldType="String" HeaderTextAlign="Center" Width="100px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="管线号" ColumnID="PipelineCode"
|
||||
|
||||
<%--<f:RenderField HeaderText="管线号" ColumnID="PipelineCode"
|
||||
DataField="PipelineCode" SortField="PipelineCode" FieldType="String" HeaderTextAlign="Center"
|
||||
Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊口号" ColumnID="WeldJointCode"
|
||||
DataField="WeldJointCode" SortField="WeldJointCode" FieldType="String" HeaderTextAlign="Center"
|
||||
Width="100px">
|
||||
</f:RenderField>
|
||||
</f:RenderField>--%>
|
||||
|
||||
|
||||
<f:RenderField HeaderText="材质1" ColumnID="Material1Code" DataField="Material1Code" SortField="Material1Code" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="90px">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -11,6 +12,72 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
{
|
||||
public partial class JointQuery : PageBase
|
||||
{
|
||||
public decimal JointComplete
|
||||
{
|
||||
get
|
||||
{
|
||||
return (decimal)ViewState["JointComplete"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["JointComplete"] = value;
|
||||
}
|
||||
}
|
||||
public decimal JointNoComplete
|
||||
{
|
||||
get
|
||||
{
|
||||
return (decimal)ViewState["JointNoComplete"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["JointNoComplete"] = value;
|
||||
}
|
||||
}
|
||||
public int JointPre
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)ViewState["JointPre"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["JointPre"] = value;
|
||||
}
|
||||
}
|
||||
public int JointNoPre
|
||||
{
|
||||
get
|
||||
{
|
||||
return (int)ViewState["JointNoPre"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["JointNoPre"] = value;
|
||||
}
|
||||
}
|
||||
public string Completed_weldedjunction
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Completed_weldedjunction"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Completed_weldedjunction"] = value;
|
||||
}
|
||||
}
|
||||
public string Incomplete_weldjunction
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Incomplete_weldjunction"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Incomplete_weldjunction"] = value;
|
||||
}
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId);
|
||||
@@ -18,6 +85,10 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
{
|
||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
this.InitTreeMenu();//加载树
|
||||
this.JointComplete = 0;
|
||||
this.JointNoComplete =0;
|
||||
this.JointPre =0;
|
||||
this.JointNoPre = 0;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -113,6 +184,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
tn2.ToolTip = "施工单位:" + u.UnitName;
|
||||
tn2.CommandName = "单位工程";
|
||||
tn2.EnableExpandEvent = true;
|
||||
tn2.EnableClickEvent = true;
|
||||
rootNode2.Nodes.Add(tn2);
|
||||
if (a > 0)
|
||||
{
|
||||
@@ -169,10 +241,36 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
Model.ColorModel colorModel = new Model.ColorModel();
|
||||
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
|
||||
parameter3D.ColorModel = colorModel;
|
||||
parameter3D.TagNum = "/E-9001,/E-9002";
|
||||
parameter3D.ButtonType = "0,2";
|
||||
parameter3D.TagNum = "";
|
||||
parameter3D.ButtonType = "2.1";
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
|
||||
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7CArea-15A";
|
||||
if (this.tvControlItem.SelectedNode.CommandName == "单位工程")
|
||||
{
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
parameter3D.Crater_data = "0";
|
||||
parameter3D.Completed_weldedjunction = Completed_weldedjunction;
|
||||
parameter3D.Incomplete_weldjunction = Incomplete_weldjunction;
|
||||
|
||||
}
|
||||
else if (this.tvControlItem.SelectedNode.CommandName == "管线")
|
||||
{
|
||||
var model = PipelineService.GetPipelineByPipelineId(tvControlItem.SelectedNodeID);
|
||||
if (model != null&&!string.IsNullOrEmpty(model.UnitWorkId))
|
||||
{
|
||||
parameter3D.Crater_data = "1";
|
||||
parameter3D.TagNum = "/" + model.PipelineCode;
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(model.UnitWorkId);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
parameter3D.Transparency = colorModel.PipelineComplete;
|
||||
parameter3D.Finished_color = colorModel.JointCompleteColor;
|
||||
parameter3D.Incomplete_color = colorModel.JointNOCompleteColor;
|
||||
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7C" + parameter3D.ModelName;
|
||||
ctlAuditFlow.data = parameter3D;
|
||||
ctlAuditFlow.BindData();
|
||||
|
||||
@@ -189,7 +287,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
select x).ToList();
|
||||
foreach (var item in pipeline)
|
||||
{
|
||||
var jotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == null select x).Count();
|
||||
var jotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId /*&& x.IsTwoJoint == null*/ select x).Count();
|
||||
//var weldJotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == null && x.WeldingDailyId != null select x).Count();
|
||||
TreeNode newNode = new TreeNode();
|
||||
//if (jotCount > weldJotCount)
|
||||
@@ -213,35 +311,90 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT * FROM dbo.View_HJGL_JointInfoQuery
|
||||
WHERE ProjectId= @ProjectId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId));
|
||||
//string strSql = @"SELECT * FROM dbo.View_HJGL_JointInfoQuery
|
||||
// WHERE ProjectId= @ProjectId";
|
||||
//List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
//listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId));
|
||||
//if (this.tvControlItem.SelectedNode.CommandName == "单位工程")
|
||||
//{
|
||||
// strSql += " AND UnitWorkId =@UnitWorkId";
|
||||
// listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID));
|
||||
|
||||
//}
|
||||
//else if (this.tvControlItem.SelectedNode.CommandName == "管线")
|
||||
//{
|
||||
// strSql += " AND PipelineId = @PipelineId";
|
||||
// listStr.Add(new SqlParameter("@PipelineId", this.tvControlItem.SelectedNodeID));
|
||||
//}
|
||||
//if (!string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()))
|
||||
//{
|
||||
// strSql += " AND WeldJointCode LIKE @WeldJointCode";
|
||||
// listStr.Add(new SqlParameter("@WeldJointCode", this.txtWeldJointCode.Text.Trim()));
|
||||
//}
|
||||
//SqlParameter[] parameter = listStr.ToArray();
|
||||
//DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
//var q = tb.AsEnumerable().Where(x => x["WeldingDate"].ToString() != "");
|
||||
//var q2 = tb.AsEnumerable().Where(x => x["JointAttribute"].ToString() == "预制口");
|
||||
//var sumcount = tb.Rows.Count;
|
||||
//this.Grid1.RecordCount = tb.Rows.Count;
|
||||
Model.View_HJGL_WeldJoint model =new Model.View_HJGL_WeldJoint();
|
||||
model.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (this.tvControlItem.SelectedNode.CommandName == "单位工程")
|
||||
{
|
||||
strSql += " AND UnitWorkId =@UnitWorkId";
|
||||
listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID));
|
||||
model.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
||||
|
||||
}
|
||||
else if (this.tvControlItem.SelectedNode.CommandName == "管线")
|
||||
{
|
||||
strSql += " AND PipelineId = @PipelineId";
|
||||
listStr.Add(new SqlParameter("@PipelineId", this.tvControlItem.SelectedNodeID));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()))
|
||||
{
|
||||
strSql += " AND WeldJointCode LIKE @WeldJointCode";
|
||||
listStr.Add(new SqlParameter("@WeldJointCode", this.txtWeldJointCode.Text.Trim()));
|
||||
model.PipelineId= this.tvControlItem.SelectedNodeID;
|
||||
}
|
||||
model.WeldJointCode = this.txtWeldJointCode.Text;
|
||||
var list= BLL.WeldJointService.GetViewWeldJointsBymodel(model);
|
||||
get3DParmeter_weldjoint(list);//获取三维所需焊口参数
|
||||
var q = list.Where(x => !string.IsNullOrEmpty(x.WeldingDate));
|
||||
var q2 = list.Where(x =>x.JointAttribute == "预制口");
|
||||
var sumcount= list.Count;
|
||||
this.Grid1.RecordCount = list.Count;
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
this.Grid1.RecordCount = tb.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
this.JointComplete = q.Count();
|
||||
this.JointNoComplete = sumcount - JointComplete;
|
||||
this.JointPre = q2.Count();
|
||||
this.JointNoPre = sumcount - JointPre;
|
||||
//var table = this.GetPagedDataTable(Grid1, list);
|
||||
Grid1.DataSource = list;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
private void get3DParmeter_weldjoint(List<View_HJGL_WeldJoint> model)
|
||||
{
|
||||
if (model.Any())
|
||||
{
|
||||
var q = model.Where(x => !string.IsNullOrEmpty(x.WeldingDate));//获取已完成焊口
|
||||
if (q.Any())
|
||||
{
|
||||
List<string> Completed_weldedjunctionList = new List<string>();
|
||||
|
||||
foreach (var item in q)
|
||||
{
|
||||
Completed_weldedjunctionList.Add("/" + item.WeldJointCode);
|
||||
}
|
||||
Completed_weldedjunction = string.Join(",", Completed_weldedjunctionList);
|
||||
}
|
||||
|
||||
var q1 = model.Where(x => string.IsNullOrEmpty(x.WeldingDate));//获取未完成管线
|
||||
if (q1.Any())
|
||||
{
|
||||
List<string> Incomplete_weldjunctionList = new List<string>();
|
||||
foreach (var item in q1)
|
||||
{
|
||||
Incomplete_weldjunctionList.Add("/" + item.WeldJointCode);
|
||||
}
|
||||
Incomplete_weldjunction = string.Join(",", Incomplete_weldjunctionList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#region
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
@@ -303,7 +456,8 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
}
|
||||
protected void btnGetChart_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("JointQueryChart.aspx?UnitWorkId={0}", tvControlItem.SelectedNodeID, "编辑 - ")));
|
||||
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("JointQueryChart.aspx?JointComplete={0}&&JointNoComplete={1}&&JointPre={2}&&JointNoPre={3}", JointComplete, JointNoComplete, JointPre, JointNoPre, "编辑 - ")));
|
||||
|
||||
}
|
||||
#endregion
|
||||
@@ -365,5 +519,47 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void Grid1_RowClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
var Id = Grid1.SelectedRowIDArray;
|
||||
List<string> weldjointcodes = new List<string>();
|
||||
foreach (var item in Id)
|
||||
{
|
||||
var WeldJointCode = WeldJointService.GetViewWeldJointById(item).WeldJointCode;
|
||||
weldjointcodes.Add("/" + WeldJointCode);
|
||||
}
|
||||
|
||||
//var q = WeldJointService.GetViewWeldJointById(Grid1.SelectedRowID).PipelineCode;
|
||||
//var pipecode = "/" + q;
|
||||
Model.Parameter3D parameter3D = new Model.Parameter3D();
|
||||
Model.ColorModel colorModel = new Model.ColorModel();
|
||||
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
|
||||
parameter3D.ColorModel = colorModel;
|
||||
parameter3D.TagNum = string.Join(",", weldjointcodes);
|
||||
parameter3D.ButtonType = "2.1";
|
||||
parameter3D.Crater_data = "1";
|
||||
if (this.tvControlItem.SelectedNode.CommandName == "单位工程")
|
||||
{
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
|
||||
|
||||
}
|
||||
else if (this.tvControlItem.SelectedNode.CommandName == "管线")
|
||||
{
|
||||
var model = PipelineService.GetPipelineByPipelineId(tvControlItem.SelectedNodeID);
|
||||
if (model != null && !string.IsNullOrEmpty(model.UnitWorkId))
|
||||
{
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(model.UnitWorkId);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
parameter3D.Transparency = colorModel.PipelineComplete;
|
||||
parameter3D.Finished_color = colorModel.JointCompleteColor;
|
||||
parameter3D.Incomplete_color = colorModel.JointNOCompleteColor;
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7C" + parameter3D.ModelName;
|
||||
ctlAuditFlow.data = parameter3D;
|
||||
ctlAuditFlow.BindData();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,6 +76,9 @@
|
||||
<f:Button ID="btnSinglePreview" ToolTip="ISO轴测图" Icon="PageRed" Text="ISO轴测图"
|
||||
EnablePostBack="true" OnClick="btnSinglePreview_Click" runat="server">
|
||||
</f:Button>
|
||||
<f:Button ID="btnSinglePreview_2" ToolTip="ISO施工轴测图" Icon="PageRed" Text="ISO施工轴测图"
|
||||
EnablePostBack="true" OnClick="btnSinglePreview_2_Click" runat="server">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Text="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
@@ -83,7 +86,7 @@
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="管线信息"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="管线信息" OnRowClick="Grid1_RowClick" EnableRowClickEvent="true"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="PipelineId"
|
||||
AllowColumnLocking="true" EnableColumnLines="true" DataIDField="PipelineId"
|
||||
AllowSorting="true" SortField="PipelineCode" SortDirection="ASC" OnSort="Grid1_Sort"
|
||||
@@ -95,10 +98,16 @@
|
||||
DataField="PipelineCode" SortField="PipelineCode" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="220px" Locked="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="是否完成" ColumnID="IsFinished"
|
||||
<%--<f:RenderField HeaderText="是否完成" ColumnID="IsFinished"
|
||||
DataField="IsFinished" SortField="IsFinished" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="90px" Locked="true">
|
||||
</f:RenderField>
|
||||
</f:RenderField>--%>
|
||||
<f:TemplateField Width="90px" HeaderText="是否完成" HeaderTextAlign="Center"
|
||||
TextAlign="Center" SortField="IsFinished">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="txtIsFinished" runat="server" Text='<%# ConvertIsFinished(Eval("IsFinished")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField HeaderText="完成日期" ColumnID="FinishedDate"
|
||||
DataField="FinishedDate" SortField="FinishedDate" FieldType="Date" Renderer="Date" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="100px" Locked="true">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -9,6 +10,28 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
{
|
||||
public partial class PipelineQuery : PageBase
|
||||
{
|
||||
public string Line_No
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Completed_pipeline"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Completed_pipeline"] = value;
|
||||
}
|
||||
}
|
||||
//public string Incomplete_pipeline
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// return (string)ViewState["Incomplete_pipeline"];
|
||||
// }
|
||||
// set
|
||||
// {
|
||||
// ViewState["Incomplete_pipeline"] = value;
|
||||
// }
|
||||
//}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId);
|
||||
@@ -115,10 +138,15 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
Model.ColorModel colorModel = new Model.ColorModel();
|
||||
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
|
||||
parameter3D.ColorModel = colorModel;
|
||||
parameter3D.TagNum = "/E-9001,/E-9002";
|
||||
parameter3D.ButtonType = "0,2";
|
||||
parameter3D.TagNum = Line_No;
|
||||
parameter3D.ButtonType = "2";
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
// parameter3D.Line_No = Line_No;
|
||||
parameter3D.Transparency = colorModel.PipelineComplete;
|
||||
parameter3D.Finished_color = colorModel.JointCompleteColor;
|
||||
parameter3D.Incomplete_color = colorModel.JointNOCompleteColor;
|
||||
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7CArea-15A";
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7C"+ parameter3D.ModelName;
|
||||
ctlAuditFlow.data = parameter3D;
|
||||
ctlAuditFlow.BindData();
|
||||
|
||||
@@ -131,46 +159,89 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT ProjectId,UnitWorkId,PipelineId,PipelineCode,UnitName,MediumCode,MediumName,PipingClassCode,UnitWorkCode,SingleName,
|
||||
TestPressure,SingleNumber,DetectionRateCode,DetectionType,Remark,TestMediumCode,TotalDin,FinishSize,
|
||||
JointCount,PressurePipingClassCode,PipeLenth,DesignPress,DesignTemperature,LeakPressure,VacuumPressure,
|
||||
LeakMediumName,PCMediumName,MaterialCode,FinishedDate,
|
||||
(CASE WHEN IsFinished=1 THEN '已完成' ELSE '未完成' END) AS IsFinished
|
||||
FROM dbo.View_HJGL_Pipeline
|
||||
WHERE ProjectId= @ProjectId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
// string strSql = @"SELECT ProjectId,UnitWorkId,PipelineId,PipelineCode,UnitName,MediumCode,MediumName,PipingClassCode,UnitWorkCode,SingleName,
|
||||
// TestPressure,SingleNumber,DetectionRateCode,DetectionType,Remark,TestMediumCode,TotalDin,FinishSize,
|
||||
// JointCount,PressurePipingClassCode,PipeLenth,DesignPress,DesignTemperature,LeakPressure,VacuumPressure,
|
||||
// LeakMediumName,PCMediumName,MaterialCode,FinishedDate,
|
||||
//(CASE WHEN IsFinished=1 THEN '已完成' ELSE '未完成' END) AS IsFinished
|
||||
// FROM dbo.View_HJGL_Pipeline
|
||||
// WHERE ProjectId= @ProjectId";
|
||||
// List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
// listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
|
||||
strSql += " AND UnitWorkId =@UnitWorkId";
|
||||
listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID));
|
||||
if (!string.IsNullOrEmpty(this.txtPipelineCode.Text.Trim()))
|
||||
{
|
||||
strSql += " AND PipelineCode LIKE @PipelineCode";
|
||||
listStr.Add(new SqlParameter("@PipelineCode", "%" + this.txtPipelineCode.Text.Trim() + "%"));
|
||||
}
|
||||
// strSql += " AND UnitWorkId =@UnitWorkId";
|
||||
// listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID));
|
||||
// if (!string.IsNullOrEmpty(this.txtPipelineCode.Text.Trim()))
|
||||
// {
|
||||
// strSql += " AND PipelineCode LIKE @PipelineCode";
|
||||
// listStr.Add(new SqlParameter("@PipelineCode", "%" + this.txtPipelineCode.Text.Trim() + "%"));
|
||||
// }
|
||||
// if (drpIsFinish.SelectedValue == "1")
|
||||
// {
|
||||
// strSql += " AND pipe.IsFinished = 1";
|
||||
// }
|
||||
// if (drpIsFinish.SelectedValue == "0")
|
||||
// {
|
||||
// strSql += " AND (pipe.IsFinished IS NULL OR pipe.IsFinished = 0)";
|
||||
// }
|
||||
|
||||
// SqlParameter[] parameter = listStr.ToArray();
|
||||
// DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Model.View_HJGL_Pipeline view_HJGL_Pipeline = new Model.View_HJGL_Pipeline();
|
||||
view_HJGL_Pipeline.ProjectId = this.CurrUser.LoginProjectId;
|
||||
view_HJGL_Pipeline.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
||||
view_HJGL_Pipeline.PipelineCode = this.txtPipelineCode.Text.Trim();
|
||||
view_HJGL_Pipeline.IsFinished = null;
|
||||
if (drpIsFinish.SelectedValue == "1")
|
||||
{
|
||||
strSql += " AND pipe.IsFinished = 1";
|
||||
}
|
||||
view_HJGL_Pipeline.IsFinished = true;
|
||||
}
|
||||
if (drpIsFinish.SelectedValue == "0")
|
||||
{
|
||||
strSql += " AND (pipe.IsFinished IS NULL OR pipe.IsFinished = 0)";
|
||||
view_HJGL_Pipeline.IsFinished = false;
|
||||
}
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
var list = BLL.PipelineService.GetView_HJGL_Pipelines(view_HJGL_Pipeline);
|
||||
get3DParmeter_pipeline(list);
|
||||
// 2.获取当前分页数据
|
||||
//var table = this.GetPagedDataTable(Grid1, tb1);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.RecordCount = list.Count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, list);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
|
||||
}
|
||||
#endregion
|
||||
private void get3DParmeter_pipeline(List<View_HJGL_Pipeline> view_HJGL_Pipelines )
|
||||
{
|
||||
if (view_HJGL_Pipelines.Any())
|
||||
{
|
||||
var q = view_HJGL_Pipelines.Where(x => x.IsFinished == true);//获取已完成管线
|
||||
if (q.Any())
|
||||
{
|
||||
List<string> Completed_pipelineList = new List<string>();
|
||||
|
||||
foreach (var item in q)
|
||||
{
|
||||
Completed_pipelineList.Add("/" + item.PipelineCode);
|
||||
}
|
||||
Line_No = string.Join(",", Completed_pipelineList);
|
||||
}
|
||||
|
||||
//var q1 = view_HJGL_Pipelines.Where(x => x.IsFinished != true);//获取未完成管线
|
||||
//if (q1.Any())
|
||||
//{
|
||||
// List<string> Incomplete_pipelineList = new List<string>();
|
||||
// foreach (var item in q1)
|
||||
// {
|
||||
// Incomplete_pipelineList.Add("/" + item.PipelineCode);
|
||||
// }
|
||||
// Incomplete_pipeline = string.Join(",", Incomplete_pipelineList);
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
#region 分页排序
|
||||
#region 页索引改变事件
|
||||
/// <summary>
|
||||
@@ -324,7 +395,19 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
protected string ConvertIsFinished(object IsFinished)
|
||||
{
|
||||
string IsFinishedValue = "未完成";
|
||||
if (IsFinished != null)
|
||||
{
|
||||
if (IsFinished.ToString()=="True")
|
||||
{
|
||||
IsFinishedValue = "已完成";
|
||||
}
|
||||
|
||||
}
|
||||
return IsFinishedValue;
|
||||
}
|
||||
protected void btnGetChart_Click(object sender, EventArgs e)
|
||||
{
|
||||
decimal PipelineComplete = 0;
|
||||
@@ -340,11 +423,11 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
var id = Grid1.SelectedRowID;
|
||||
if (string.IsNullOrEmpty(id))
|
||||
{
|
||||
ShowNotify("请选择相对应的图纸", MessageBoxIcon.Warning);
|
||||
ShowNotify("请选择相对应的ISO轴测图", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
var SingleName = (from x in Funs.DB.View_HJGL_Pipeline where x.PipelineId == id select (x.SingleName)).FirstOrDefault();
|
||||
var filemodel= BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName, this.CurrUser.LoginProjectId);
|
||||
var filemodel= BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName,"0", this.CurrUser.LoginProjectId);
|
||||
if (filemodel!=null)
|
||||
{
|
||||
string httpUrl = filemodel.FilePath;
|
||||
@@ -353,11 +436,56 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请上传相关图纸", MessageBoxIcon.Warning);
|
||||
ShowNotify("请上传相关ISO轴测图", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void Grid1_RowClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
var q = PipelineService.GetPipelineByPipelineId(Grid1.SelectedRowID);
|
||||
var pipecode ="/"+ q.PipelineCode;
|
||||
Model.Parameter3D parameter3D = new Model.Parameter3D();
|
||||
Model.ColorModel colorModel = new Model.ColorModel();
|
||||
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
|
||||
parameter3D.ColorModel = colorModel;
|
||||
parameter3D.TagNum = pipecode;
|
||||
parameter3D.ButtonType = "2";
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
//parameter3D.Line_No = Line_No;
|
||||
parameter3D.Transparency = colorModel.PipelineComplete;
|
||||
parameter3D.Finished_color = colorModel.JointCompleteColor;
|
||||
parameter3D.Incomplete_color = colorModel.JointNOCompleteColor;
|
||||
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7C" + parameter3D.ModelName;
|
||||
ctlAuditFlow.data = parameter3D;
|
||||
ctlAuditFlow.BindData();
|
||||
}
|
||||
|
||||
protected void btnSinglePreview_2_Click(object sender, EventArgs e)
|
||||
{
|
||||
var id = Grid1.SelectedRowID;
|
||||
if (string.IsNullOrEmpty(id))
|
||||
{
|
||||
ShowNotify("请选择相对应的ISO施工轴测图", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
var SingleName = (from x in Funs.DB.View_HJGL_Pipeline where x.PipelineId == id select (x.SingleName)).FirstOrDefault();
|
||||
var filemodel = BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName, "4", this.CurrUser.LoginProjectId);
|
||||
if (filemodel != null)
|
||||
{
|
||||
string httpUrl = filemodel.FilePath;
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/AttachFile/Look.aspx?fileUrl={0}", httpUrl, "查看 -")));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请上传相关ISO施工轴测图", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -185,6 +185,15 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSinglePreview;
|
||||
|
||||
/// <summary>
|
||||
/// btnSinglePreview_2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSinglePreview_2;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
@@ -203,6 +212,15 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// txtIsFinished 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label txtIsFinished;
|
||||
|
||||
/// <summary>
|
||||
/// Label1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -370,12 +370,12 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
}
|
||||
}
|
||||
}
|
||||
Model.Parameter3D parameter3D = new Model.Parameter3D();
|
||||
Model.ColorModel colorModel = new Model.ColorModel();
|
||||
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
|
||||
parameter3D.ColorModel = colorModel;
|
||||
parameter3D.TagNum = "/E-9001,/E-9002";
|
||||
parameter3D.ButtonType = "0,4";
|
||||
//Model.Parameter3D parameter3D = new Model.Parameter3D();
|
||||
//Model.ColorModel colorModel = new Model.ColorModel();
|
||||
//colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
|
||||
//parameter3D.ColorModel = colorModel;
|
||||
//parameter3D.TagNum = "/E-9001,/E-9002";
|
||||
//parameter3D.ButtonType = "0,4";
|
||||
|
||||
//ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7CArea-15A";
|
||||
//ctlAuditFlow.data = parameter3D;
|
||||
|
||||
@@ -61,6 +61,12 @@
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="ContactPhone" DataField="ContactPhone" FieldType="String"
|
||||
HeaderText="联系人电话" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="PersonName" DataField="PersonName" FieldType="String"
|
||||
HeaderText="接收人" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="ReceiveDate" DataField="ReceiveDate" FieldType="String"
|
||||
HeaderText="接收时间" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:LinkButtonField Width="120px" TextAlign="Center" CommandName="cmd_detail" Text="装箱明细" />
|
||||
<f:LinkButtonField Width="120px" TextAlign="Center" CommandName="cmd_print" Text="预览打印" />
|
||||
|
||||
@@ -33,35 +33,42 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"select pack.PackagingManageId,
|
||||
pack.PackagingCode,
|
||||
com.PipelineComponentCode,
|
||||
unit.UnitWorkName,
|
||||
pipe.PlanStartDate,
|
||||
pack.ProjectId,
|
||||
pack.StackingPosition,
|
||||
pack.State,
|
||||
pack.ContactName,
|
||||
pack.ContactPhone
|
||||
from HJGL_PackagingManage as pack
|
||||
left join HJGL_Pipeline_Component com on com.PipelineComponentId=pack.PipelineComponentId
|
||||
left join HJGL_Pipeline pipe on pipe.PipelineId =com.PipelineId
|
||||
left join WBS_UnitWork unit on pipe.UnitWorkId=unit.UnitWorkId
|
||||
WHERE pack.ProjectId = @ProjectId ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
if (!string.IsNullOrEmpty(this.txtPackagingCode.Text.Trim()))
|
||||
{
|
||||
strSql += " AND pack.PackagingCode LIKE @PackagingCode";
|
||||
listStr.Add(new SqlParameter("@PackagingCode", "%" + this.txtPackagingCode.Text.Trim() + "%"));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
// string strSql = @"select pack.PackagingManageId,
|
||||
// pack.PackagingCode,
|
||||
// com.PipelineComponentCode,
|
||||
// unit.UnitWorkName,
|
||||
// pipe.PlanStartDate,
|
||||
// pack.ProjectId,
|
||||
// pack.StackingPosition,
|
||||
// pack.State,
|
||||
// pack.ContactName,
|
||||
// pack.ContactPhone,
|
||||
//pack.ReceiveDate,
|
||||
//person.PersonName
|
||||
// from HJGL_PackagingManage as pack
|
||||
// left join HJGL_Pipeline_Component com on com.PipelineComponentId=pack.PipelineComponentId
|
||||
// left join HJGL_Pipeline pipe on pipe.PipelineId =com.PipelineId
|
||||
// left join WBS_UnitWork unit on pipe.UnitWorkId=unit.UnitWorkId
|
||||
// left join Person_Persons person on pack.ReceiveMan=person.PersonId
|
||||
// WHERE pack.ProjectId = @ProjectId ";
|
||||
// List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
// listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
// if (!string.IsNullOrEmpty(this.txtPackagingCode.Text.Trim()))
|
||||
// {
|
||||
// strSql += " AND pack.PackagingCode LIKE @PackagingCode";
|
||||
// listStr.Add(new SqlParameter("@PackagingCode", "%" + this.txtPackagingCode.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.RecordCount = tb.Rows.Count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
//var table = this.GetPagedDataTable(Grid1, tb);
|
||||
//Grid1.DataSource = table;
|
||||
//Grid1.DataBind();
|
||||
var list= BLL.HJGL_PackagingmanageService.GetPackagingManageList(this.CurrUser.LoginProjectId, this.txtPackagingCode.Text.Trim());
|
||||
Grid1.RecordCount = list.Count;
|
||||
Grid1.DataSource = list;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
@@ -306,7 +313,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
var PipelineComponent = model.PipelineComponentId.Split(',');
|
||||
foreach (var item in PipelineComponent)
|
||||
{
|
||||
HJGL_PipelineComponentService.UpdateOutState(item);
|
||||
HJGL_PipelineComponentService.UpdateOutState(item, model.PackagingCode);
|
||||
}
|
||||
HJGL_PackagingmanageService.PutOutOrder(Id);
|
||||
Pring(Id);
|
||||
|
||||
@@ -93,11 +93,12 @@
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="管线信息"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="管线信息" ForceFit="true"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="PipelineId" AllowCellEditing="true"
|
||||
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="PipelineId"
|
||||
AllowSorting="true" SortField="PipelineCode" SortDirection="ASC" OnSort="Grid1_Sort" EnableCheckBoxSelect="true"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
OnRowClick="Grid1_RowClick" EnableRowClickEvent="true"
|
||||
EnableTextSelection="True" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick">
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号"
|
||||
@@ -108,10 +109,16 @@
|
||||
Title="管线号" DataToolTipField="PipelineCode" SortField="PipelineCode"
|
||||
Locked="true">
|
||||
</f:WindowField>
|
||||
<f:RenderField HeaderText="管线划分" ColumnID="PipeArea"
|
||||
<%-- <f:RenderField HeaderText="管线划分" ColumnID="PipeArea"
|
||||
DataField="PipeArea" SortField="PipeArea" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="300px">
|
||||
</f:RenderField>
|
||||
TextAlign="Center" Width="300px">
|
||||
</f:RenderField>--%>
|
||||
<f:TemplateField Width="300px" HeaderText="管线划分" HeaderTextAlign="Center"
|
||||
TextAlign="Center" SortField="PipeArea">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="txt" runat="server" Text='<%# ConvertPipeArea(Eval("PipeArea")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
</Columns>
|
||||
|
||||
<PageItems>
|
||||
|
||||
@@ -4,11 +4,46 @@ using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Web.UI.DataVisualization.Charting;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.PreDesign
|
||||
{
|
||||
|
||||
public partial class PipelingDivide : PageBase
|
||||
{
|
||||
public decimal PipelineComplete
|
||||
{
|
||||
get
|
||||
{
|
||||
return (decimal)ViewState["PipelineComplete"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["PipelineComplete"] = value;
|
||||
}
|
||||
}
|
||||
public decimal PipelineNOComplete
|
||||
{
|
||||
get
|
||||
{
|
||||
return (decimal)ViewState["PipelineNOComplete"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["PipelineNOComplete"] = value;
|
||||
}
|
||||
}
|
||||
public string Line_No
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Line_No"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Line_No"] = value;
|
||||
}
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId);
|
||||
@@ -17,6 +52,8 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
{
|
||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
this.InitTreeMenu();//加载树
|
||||
PipelineComplete = 0;
|
||||
PipelineNOComplete = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,10 +156,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
Model.ColorModel colorModel = new Model.ColorModel();
|
||||
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
|
||||
parameter3D.ColorModel = colorModel;
|
||||
parameter3D.TagNum = "/E-9001,/E-9002";
|
||||
parameter3D.ButtonType = "0,4";
|
||||
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7CArea-15A";
|
||||
parameter3D.TagNum = Line_No;
|
||||
parameter3D.ButtonType = "1";
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
// parameter3D.Line_No = Line_No;
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7C" + parameter3D.ModelName;
|
||||
ctlAuditFlow.data = parameter3D;
|
||||
ctlAuditFlow.BindData();
|
||||
|
||||
@@ -135,44 +173,33 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT ProjectId,UnitWorkId,PipelineId,PipelineCode,
|
||||
(CASE WHEN PipeArea='1' THEN '工厂预制' WHEN PipeArea='2' THEN '现场施工'
|
||||
ELSE '' END) AS PipeArea
|
||||
FROM dbo.View_HJGL_Pipeline
|
||||
WHERE ProjectId= @ProjectId";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||
|
||||
strSql += " AND UnitWorkId =@UnitWorkId";
|
||||
listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID));
|
||||
if (!string.IsNullOrEmpty(this.txtPipelineCode.Text.Trim()))
|
||||
|
||||
Model.View_HJGL_Pipeline view_HJGL_Pipeline = new Model.View_HJGL_Pipeline();
|
||||
view_HJGL_Pipeline.ProjectId = this.CurrUser.LoginProjectId;
|
||||
view_HJGL_Pipeline.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
||||
view_HJGL_Pipeline.PipelineCode = this.txtPipelineCode.Text.Trim();
|
||||
view_HJGL_Pipeline.SingleName = this.txtSingleName.Text.Trim();
|
||||
view_HJGL_Pipeline.DesignPress=this.txtDesignPress.Text.Trim();
|
||||
view_HJGL_Pipeline.MaterialCode=this.txtMaterialCode.Text.Trim();
|
||||
var list = BLL.PipelineService.GetView_HJGL_Pipelines(view_HJGL_Pipeline);
|
||||
var q = list.Where(x => x.PipeArea == PipelineService.PipeArea_SHOP );
|
||||
var q2 = list.Where(x => x.PipeArea == PipelineService.PipeArea_FIELD );
|
||||
if (q.Any())
|
||||
{
|
||||
strSql += " AND PipelineCode LIKE @PipelineCode";
|
||||
listStr.Add(new SqlParameter("@PipelineCode", "%" + this.txtPipelineCode.Text.Trim() + "%"));
|
||||
List<string> listpipecode = new List<string>();
|
||||
foreach (var item in q)
|
||||
{
|
||||
listpipecode.Add("/" + item.PipelineCode);
|
||||
}
|
||||
Line_No = string.Join(",", listpipecode);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtSingleName.Text.Trim()))
|
||||
{
|
||||
strSql += " AND SingleName LIKE @SingleName";
|
||||
listStr.Add(new SqlParameter("@SingleName", "%" + this.txtSingleName.Text.Trim() + "%"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtDesignPress.Text.Trim()))
|
||||
{
|
||||
strSql += " AND DesignPress LIKE @DesignPress";
|
||||
listStr.Add(new SqlParameter("@DesignPress", "%" + this.txtDesignPress.Text.Trim() + "%"));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtMaterialCode.Text.Trim()))
|
||||
{
|
||||
strSql += " AND MaterialCode LIKE @MaterialCode";
|
||||
listStr.Add(new SqlParameter("@MaterialCode", "%" + this.txtMaterialCode.Text.Trim() + "%"));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
|
||||
PipelineComplete = q.Count();
|
||||
PipelineNOComplete = q2.Count();
|
||||
// 2.获取当前分页数据
|
||||
//var table = this.GetPagedDataTable(Grid1, tb1);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.RecordCount = list.Count();
|
||||
//list = GetFilteredTable(Grid1.FilteredData, list);
|
||||
var table = this.GetPagedDataTable(Grid1, list);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
@@ -237,7 +264,29 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
protected void Grid1_RowClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
var Id =Grid1.SelectedRowIDArray;
|
||||
List<string > listpipecode=new List<string> () ;
|
||||
foreach (var item in Id)
|
||||
{
|
||||
var q = PipelineService.GetPipelineByPipelineId(item);
|
||||
listpipecode.Add("/" + q.PipelineCode);
|
||||
}
|
||||
var pipecode = string.Join(",", listpipecode);
|
||||
Model.Parameter3D parameter3D = new Model.Parameter3D();
|
||||
Model.ColorModel colorModel = new Model.ColorModel();
|
||||
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
|
||||
parameter3D.ColorModel = colorModel;
|
||||
parameter3D.TagNum = pipecode;
|
||||
parameter3D.ButtonType = "1";
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
// parameter3D.Line_No = Line_No;
|
||||
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7C" + parameter3D.ModelName;
|
||||
ctlAuditFlow.data = parameter3D;
|
||||
ctlAuditFlow.BindData();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 关闭弹出窗口及刷新页面
|
||||
@@ -273,36 +322,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected string ConvertDetectionType(object detectionType)
|
||||
{
|
||||
string detectionName = string.Empty;
|
||||
if (detectionType != null)
|
||||
{
|
||||
string[] types = detectionType.ToString().Split('|');
|
||||
foreach (string t in types)
|
||||
{
|
||||
var type = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(t);
|
||||
if (type != null)
|
||||
{
|
||||
detectionName += type.DetectionTypeCode + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (detectionName != string.Empty)
|
||||
{
|
||||
return detectionName.Substring(0, detectionName.Length - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
#region 按钮事件
|
||||
protected void btnGetChart_Click(object sender, EventArgs e)
|
||||
{
|
||||
decimal PipelineComplete = 0;
|
||||
decimal PipelineNoComplete = 0;
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("PipelingDivideChart.aspx?PipelineComplete={0}&&PipelineNOComplete={1}", PipelineComplete, PipelineNoComplete, "编辑 - ")));
|
||||
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("PipelingDivideChart.aspx?PipelineComplete={0}&&PipelineNOComplete={1}", PipelineComplete, PipelineNOComplete, "编辑 - ")));
|
||||
|
||||
}
|
||||
|
||||
@@ -336,5 +360,28 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
txtMaterialCode.Text = String.Empty;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
#endregion
|
||||
protected string ConvertPipeArea(object PipeArea)
|
||||
{
|
||||
string PipeAreaValue = string.Empty;
|
||||
if (PipeArea != null)
|
||||
{
|
||||
var q = PipelineService.GetPipeArea().Where(x => x.Value == PipeArea.ToString());
|
||||
if (q!=null&&q.Count()>0)
|
||||
{
|
||||
PipeAreaValue = q.First().Text;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
return PipeAreaValue;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,6 +230,15 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// txt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label txt;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="sub-section-inner">
|
||||
<div id="echarts02" class="echarts-box" style="width: 80%; height: 80%;"></div>
|
||||
<div id="echarts02" class="echarts-box" style="width: 100%; height: 100%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
var data = [
|
||||
{
|
||||
name: '未完成', value: options.n, label: {
|
||||
name: '现场施工', value: options.n, label: {
|
||||
rich: {
|
||||
name: {
|
||||
fontSize: 10,
|
||||
@@ -69,7 +69,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '已完成', value: options.y, label: {
|
||||
name: '工厂预制', value: options.y, label: {
|
||||
rich: {
|
||||
name: {
|
||||
fontSize: 10,
|
||||
|
||||
@@ -79,11 +79,11 @@
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="组件信息"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="组件信息" ForceFit="true"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="PipelineComponentId" AllowCellEditing="true"
|
||||
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="PipelineComponentId"
|
||||
AllowSorting="true" SortField="PipelineComponentCode" SortDirection="ASC" OnSort="Grid1_Sort"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
AllowSorting="true" SortField="PipelineComponentCode" SortDirection="ASC" OnSort="Grid1_Sort" OnRowCommand="Grid1_RowCommand"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
EnableTextSelection="True" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick">
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号"
|
||||
@@ -94,10 +94,10 @@
|
||||
Title="组件编号" DataToolTipField="PipelineComponentCode" SortField="PipelineComponentCode"
|
||||
Locked="true">
|
||||
</f:WindowField>
|
||||
<f:RenderField HeaderText="预制单位" ColumnID="PreUnit"
|
||||
<%--<f:RenderField HeaderText="预制单位" ColumnID="PreUnit"
|
||||
DataField="PreUnit" SortField="PreUnit" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="240px">
|
||||
</f:RenderField>
|
||||
</f:RenderField>--%>
|
||||
<f:RenderField Width="200px" ColumnID="BoxNumber" DataField="BoxNumber" SortField="BoxNumber"
|
||||
FieldType="String" HeaderText="物流箱号" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
@@ -113,16 +113,25 @@
|
||||
HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:TemplateField ColumnID="tfImageUrl1" Width="180px" HeaderText="组件二维码" HeaderTextAlign="Center"
|
||||
<%-- <f:TemplateField ColumnID="tfImageUrl1" Width="180px" HeaderText="组件二维码" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbImageUrl" runat="server" Text='<%# ConvertImageUrlByImage(Eval("QRCode"),Eval("PipelineComponentId")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
</f:TemplateField>--%>
|
||||
<f:LinkButtonField Width="100px" TextAlign="Center" CommandName="PreviewQRCode" Text="二维码" EnableAjax="false" />
|
||||
<f:RenderField Width="200px" ColumnID="DrawingName" DataField="DrawingName" SortField="DrawingName"
|
||||
FieldType="String" HeaderText="预制图纸名称" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="PersonName" DataField="PersonName" FieldType="String"
|
||||
HeaderText="验收人" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="ReceiveDate" DataField="ReceiveDate" FieldType="String"
|
||||
HeaderText="验收时间" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:LinkButtonField Width="120px" TextAlign="Center" CommandName="cmd_print" Text="预览打印" />
|
||||
|
||||
</Columns>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
|
||||
@@ -161,11 +161,13 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
{
|
||||
string strSql = @" SELECT com.PipelineComponentId,com.PipelineComponentCode,com.BoxNumber,
|
||||
com.PipelineId, punit.UnitName AS PreUnit,aunit.UnitName AS AssembleUnit,
|
||||
com.QRCode,com.State,pipe.PlanStartDate,com.DrawingName
|
||||
com.QRCode,com.State,pipe.PlanStartDate,com.DrawingName,com.ReceiveDate,
|
||||
person.PersonName
|
||||
FROM HJGL_Pipeline_Component com
|
||||
LEFT JOIN HJGL_Pipeline pipe ON pipe.PipelineId =com.PipelineId
|
||||
LEFT JOIN dbo.Base_Unit punit ON punit.UnitId=com.PreUnit
|
||||
LEFT JOIN dbo.Base_Unit aunit ON aunit.UnitId=com.AssembleUnit
|
||||
LEFT JOIN Person_Persons person on com.ReceiveMan=person.PersonId
|
||||
WHERE com.PipelineId =@PipelineId ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter> { };
|
||||
|
||||
@@ -255,23 +257,34 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
}
|
||||
|
||||
protected void btnPrint_Click(object sender, EventArgs e)
|
||||
{
|
||||
Print(tvControlItem.SelectedNodeID,"");
|
||||
}
|
||||
private void Print(string PipelineId ,string PipelineComponentId)
|
||||
{
|
||||
BLL.FastReportService.ResetData();
|
||||
|
||||
string strSql = @" SELECT com.PipelineComponentId,com.PipelineComponentCode,com.BoxNumber,
|
||||
string strSql = @" SELECT com.PipelineComponentId,com.PipelineComponentCode,com.BoxNumber,unitwork.UnitWorkName,
|
||||
com.PipelineId, punit.UnitName AS PreUnit,aunit.UnitName AS AssembleUnit,mat.PrefabricatedComponents,
|
||||
com.QRCode,com.State,pipe.PlanStartDate,pipe.PipelineCode
|
||||
com.QRCode,com.State,CONVERT(varchar(100), pipe.PlanStartDate, 23) as PlanStartDate,pipe.PipelineCode,
|
||||
('PrePipeline$'+com.PipelineComponentId )as QRCode2,mater.*
|
||||
FROM HJGL_Pipeline_Component com
|
||||
LEFT JOIN HJGL_PipeLineMat mat ON mat.PipeLineMatId=com.PipeLineMatId
|
||||
LEFT JOIN HJGL_Pipeline pipe ON pipe.PipelineId =com.PipelineId
|
||||
LEFT JOIN dbo.Base_Unit punit ON punit.UnitId=com.PreUnit
|
||||
LEFT JOIN dbo.Base_Unit aunit ON aunit.UnitId=com.AssembleUnit
|
||||
WHERE com.QRCode!='' ";
|
||||
LEFT JOIN dbo.WBS_UnitWork unitwork on pipe.UnitWorkId=unitwork.UnitWorkId
|
||||
LEFT JOIN dbo.Base_Material AS mater ON mater.MaterialId=pipe.MaterialId
|
||||
WHERE com.QRCode!=''";
|
||||
List<SqlParameter> listStr = new List<SqlParameter> { };
|
||||
|
||||
strSql += " AND com.PipelineId =@PipelineId";
|
||||
listStr.Add(new SqlParameter("@PipelineId", this.tvControlItem.SelectedNodeID));
|
||||
|
||||
listStr.Add(new SqlParameter("@PipelineId", PipelineId));
|
||||
if (PipelineComponentId!="")
|
||||
{
|
||||
strSql += " AND com.PipelineComponentId =@PipelineComponentId";
|
||||
listStr.Add(new SqlParameter("@PipelineComponentId", PipelineComponentId));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
if (tb != null)
|
||||
@@ -442,7 +455,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
}
|
||||
return StateName;
|
||||
}
|
||||
|
||||
protected void btnImportQRCode_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("PrePipelineQRCodeIn.aspx?", "导入 - ")));
|
||||
@@ -455,11 +467,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
var id = Grid1.SelectedRowID;
|
||||
if (string.IsNullOrEmpty(id))
|
||||
{
|
||||
ShowNotify("请选择相对应的图纸", MessageBoxIcon.Warning);
|
||||
ShowNotify("请选择相对应的管道预制加工图", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
var SingleName = (from x in Funs.DB.HJGL_Pipeline_Component where x.PipelineComponentId == id select (x.DrawingName)).FirstOrDefault();
|
||||
var filemodel = BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName, this.CurrUser.LoginProjectId);
|
||||
var filemodel = BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName,"3", this.CurrUser.LoginProjectId);
|
||||
if (filemodel != null)
|
||||
{
|
||||
string httpUrl = filemodel.FilePath;
|
||||
@@ -468,12 +480,38 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请上传相关图纸", MessageBoxIcon.Warning);
|
||||
ShowNotify("请上传相关管道预制加工图", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
|
||||
{
|
||||
if (e.CommandName == "PreviewQRCode")
|
||||
{
|
||||
var ID = e.RowID;
|
||||
var q = HJGL_PipelineComponentService.GetPipelineComponentById(ID);
|
||||
string path = "";
|
||||
if (!string.IsNullOrEmpty(q.QRCode))
|
||||
{
|
||||
path = BLL.CreateQRCodeService.CreateCode_Simple(q.QRCode, ID);
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
{
|
||||
string filepath = Funs.SGGLUrl + path.Replace("\\", "//");
|
||||
|
||||
ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script type='text/javascript'>window.open('" + filepath + "');</script>");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (e.CommandName == "cmd_print")
|
||||
{
|
||||
string Id = this.Grid1.SelectedRowID;
|
||||
Print(tvControlItem.SelectedNodeID, Id);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -230,15 +230,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbstate;
|
||||
|
||||
/// <summary>
|
||||
/// lbImageUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbImageUrl;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -72,10 +72,10 @@
|
||||
FieldType="String" HeaderText="二维码信息" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="200px" ColumnID="DrawingName" DataField="DrawingName" SortField="DrawingName"
|
||||
<%-- <f:RenderField Width="200px" ColumnID="DrawingName" DataField="DrawingName" SortField="DrawingName"
|
||||
FieldType="String" HeaderText="预制图纸名称" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
</f:RenderField>--%>
|
||||
|
||||
</Columns>
|
||||
<PageItems>
|
||||
|
||||
@@ -169,17 +169,17 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
Model.HJGL_Pipeline pipeline = new Model.HJGL_Pipeline();
|
||||
Model.HJGL_Pipeline_Component hJGL_Pipeline_Component = new Model.HJGL_Pipeline_Component();
|
||||
|
||||
string pioelinecode = pds.Rows[i]["管线号"].ToString();
|
||||
string pipelinecode = pds.Rows[i]["管线号"].ToString();
|
||||
string PipelineComponentCode = pds.Rows[i]["预制组件"].ToString();
|
||||
string QRCode = pds.Rows[i]["二维码信息"].ToString();
|
||||
|
||||
if (string.IsNullOrEmpty(pioelinecode))
|
||||
if (string.IsNullOrEmpty(pipelinecode))
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "管线号" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
else
|
||||
{
|
||||
pipeline = getPipeline.FirstOrDefault(x => x.PipelineCode == pioelinecode);
|
||||
pipeline = getPipeline.FirstOrDefault(x => x.PipelineCode == pipelinecode);
|
||||
if (pipeline == null)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "不存在此管线号" + "|";
|
||||
@@ -194,9 +194,9 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
else
|
||||
{
|
||||
hJGL_Pipeline_Component = HJGL_PipelineComponentService.GetPipelineComponentByCodeandpipelineId(PipelineComponentCode, pipeline.PipelineId);
|
||||
if (pipeline == null)
|
||||
if (hJGL_Pipeline_Component == null)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "不存在此预制组件" + "|";
|
||||
result += "第" + (i + 2).ToString() + "行," + "不存在此预制组件 " + PipelineComponentCode + " |";
|
||||
|
||||
continue;
|
||||
}
|
||||
@@ -222,32 +222,36 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
.GroupBy(x => new {
|
||||
pipelinecode = x.Field<string>("管线号"),
|
||||
PipelineComponentCode = x.Field<string>("预制组件"),
|
||||
DrawingName = x.Field<string>("预制图纸名称"),
|
||||
// DrawingName = x.Field<string>("预制图纸名称"),
|
||||
})
|
||||
.Select(x => new
|
||||
{
|
||||
pipelinecode = x.Key.pipelinecode,
|
||||
PipelineComponentCode = x.Key.PipelineComponentCode,
|
||||
DrawingName = x.Key.DrawingName,
|
||||
QRCode = String.Join("&", x.Select(z => z.Field<string>("二维码信息")))
|
||||
// DrawingName = x.Key.DrawingName,
|
||||
QRCode = String.Join(";", x.Select(z => z.Field<string>("二维码信息")))
|
||||
});
|
||||
foreach (var item in dt)
|
||||
{
|
||||
var pipeline = PipelineService.GetPipelineByPipelineCode(item.pipelinecode.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", ""));
|
||||
var hJGL_Pipeline_Component = HJGL_PipelineComponentService.GetPipelineComponentByCodeandpipelineId(item.PipelineComponentCode.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", ""), pipeline.PipelineId);
|
||||
|
||||
model.Pipeline_ComponentQRCodeRootName rootName = new model.Pipeline_ComponentQRCodeRootName();
|
||||
rootName.QRCode = new List<model.Pipeline_ComponentQRCodeQRCodeItem>();
|
||||
var elementlist = item.QRCode.Split('&');
|
||||
foreach (var element in elementlist)
|
||||
if (hJGL_Pipeline_Component!=null)
|
||||
{
|
||||
model.Pipeline_ComponentQRCodeQRCodeItem qRCodeQRCodeItem = new model.Pipeline_ComponentQRCodeQRCodeItem();
|
||||
qRCodeQRCodeItem.element = element;
|
||||
rootName.QRCode.Add(qRCodeQRCodeItem);
|
||||
//model.Pipeline_ComponentQRCodeRootName rootName = new model.Pipeline_ComponentQRCodeRootName();
|
||||
//rootName.QRCode = new List<model.Pipeline_ComponentQRCodeQRCodeItem>();
|
||||
//var elementlist = item.QRCode.Split(';');
|
||||
//foreach (var element in elementlist)
|
||||
//{
|
||||
// model.Pipeline_ComponentQRCodeQRCodeItem qRCodeQRCodeItem = new model.Pipeline_ComponentQRCodeQRCodeItem();
|
||||
// qRCodeQRCodeItem.element = element;
|
||||
// rootName.QRCode.Add(qRCodeQRCodeItem);
|
||||
//}
|
||||
//hJGL_Pipeline_Component.QRCode = JsonConvert.SerializeObject(rootName);
|
||||
|
||||
hJGL_Pipeline_Component.QRCode = item.QRCode;
|
||||
Pipeline_ComponentList.Add(hJGL_Pipeline_Component);
|
||||
}
|
||||
hJGL_Pipeline_Component.QRCode = JsonConvert.SerializeObject(rootName);
|
||||
hJGL_Pipeline_Component.DrawingName = item.DrawingName;
|
||||
Pipeline_ComponentList.Add(hJGL_Pipeline_Component);
|
||||
|
||||
}
|
||||
errorInfos = string.Empty;
|
||||
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true" Hidden="true"
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||
Layout="HBox" EnableCollapse="true" Width="300" Title="示意图" TitleToolTip="示意图"
|
||||
ShowBorder="true" ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
|
||||
<Items>
|
||||
<f:Tree ID="trSafetyOrganization" EnableCollapse="true" ShowHeader="false" ShowBorder="false"
|
||||
EnableIcons="true" Title="示意图" OnNodeCommand="trSafetyOrganization_NodeCommand"
|
||||
AutoLeafIdentification="true" AutoScroll="true" runat="server" EnableTextSelection="True"
|
||||
EnableSingleClickExpand="true">
|
||||
<f:Tree ID="tvControlItem" ShowHeader="false" Height="560px" Title="装置区域"
|
||||
OnNodeCommand="tvControlItem_NodeCommand" runat="server" ShowBorder="false" EnableCollapse="true"
|
||||
EnableSingleClickExpand="true" AutoLeafIdentification="true" EnableSingleExpand="true"
|
||||
EnableTextSelection="true">
|
||||
</f:Tree>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
|
||||
@@ -1,175 +1,221 @@
|
||||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Web.UI.DataVisualization.Charting;
|
||||
|
||||
namespace FineUIPro.Web.HJGL.PreDesign
|
||||
{
|
||||
public partial class YardPlanning : PageBase
|
||||
public partial class YardPlanning : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||
get
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
this.InitTreeMenu();
|
||||
Bind();
|
||||
}
|
||||
}
|
||||
private void Bind()
|
||||
{
|
||||
|
||||
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
||||
{
|
||||
var unit = HJGL_YardPlanningService.GetHJGL_YardPlanningByProjectId(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID);
|
||||
this.imgPhoto.ImageUrl = null;
|
||||
if (unit != null)
|
||||
{
|
||||
this.imgPhoto.ImageUrl = "~/" + unit.FlowChartPic;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#region 加载树装置-单位-工作区
|
||||
/// <summary>
|
||||
/// 加载树
|
||||
/// </summary>
|
||||
private void InitTreeMenu()
|
||||
{
|
||||
this.tvControlItem.Nodes.Clear();
|
||||
|
||||
TreeNode rootNode1 = new TreeNode();
|
||||
rootNode1.NodeID = "1";
|
||||
rootNode1.Text = "建筑工程";
|
||||
rootNode1.CommandName = "建筑工程";
|
||||
rootNode1.Selectable = false;
|
||||
this.tvControlItem.Nodes.Add(rootNode1);
|
||||
|
||||
TreeNode rootNode2 = new TreeNode();
|
||||
rootNode2.NodeID = "2";
|
||||
rootNode2.Text = "安装工程";
|
||||
rootNode2.CommandName = "安装工程";
|
||||
rootNode2.Expanded = true;
|
||||
this.tvControlItem.Nodes.Add(rootNode2);
|
||||
|
||||
var pUnits = (from x in Funs.DB.Project_ProjectUnit where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
|
||||
// 获取当前用户所在单位
|
||||
var currUnit = pUnits.FirstOrDefault(x => x.UnitId == this.CurrUser.UnitId);
|
||||
|
||||
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
|
||||
select x).ToList();
|
||||
|
||||
List<Model.WBS_UnitWork> unitWork1 = null;
|
||||
List<Model.WBS_UnitWork> unitWork2 = null;
|
||||
|
||||
// 当前为施工单位,只能操作本单位的数据
|
||||
if (currUnit != null && currUnit.UnitType == Const.ProjectUnitType_2)
|
||||
{
|
||||
unitWork1 = (from x in unitWorkList
|
||||
where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "1"
|
||||
select x).ToList();
|
||||
unitWork2 = (from x in unitWorkList
|
||||
where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "2"
|
||||
select x).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
|
||||
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
|
||||
}
|
||||
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
this.InitTreeMenu();
|
||||
Bind();
|
||||
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();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn1 = new TreeNode();
|
||||
tn1.NodeID = q.UnitWorkId;
|
||||
tn1.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
|
||||
tn1.ToolTip = "施工单位:" + u.UnitName;
|
||||
tn1.EnableClickEvent = true;
|
||||
rootNode1.Nodes.Add(tn1);
|
||||
}
|
||||
}
|
||||
if (unitWork2.Count() > 0)
|
||||
{
|
||||
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();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn2 = new TreeNode();
|
||||
tn2.NodeID = q.UnitWorkId;
|
||||
// tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
|
||||
tn2.Text = q.UnitWorkName ;
|
||||
tn2.ToolTip = "施工单位:" + u.UnitName;
|
||||
tn2.EnableClickEvent = true;
|
||||
rootNode2.Nodes.Add(tn2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
void Bind()
|
||||
#endregion
|
||||
|
||||
#region 点击TreeView
|
||||
/// <summary>
|
||||
/// 点击TreeView
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
var unit = HJGL_YardPlanningService.GetHJGL_YardPlanningByProjectId(this.CurrUser.LoginProjectId);
|
||||
this.Bind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.PersonId, BLL.Const.HJGL_YardPlanningMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
this.btnNewItem.Hidden = false;
|
||||
}
|
||||
|
||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||
{
|
||||
this.btnDeleteItem.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
||||
{
|
||||
var model = HJGL_YardPlanningService.GetHJGL_YardPlanningByProjectId(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID);
|
||||
if (model != null)
|
||||
{
|
||||
HJGL_YardPlanningService.DeleteHJGL_YardPlanningById(model.YardPlanningId);
|
||||
}
|
||||
this.imgPhoto.ImageUrl = null;
|
||||
if (unit != null)
|
||||
}
|
||||
else
|
||||
{
|
||||
this.imgPhoto.ImageUrl = "~/" + unit.FlowChartPic;
|
||||
Alert.ShowInTop("请选择一个主项!", MessageBoxIcon.Warning);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
#region 加载树
|
||||
/// <summary>
|
||||
/// 加载树
|
||||
/// </summary>
|
||||
private void InitTreeMenu()
|
||||
{
|
||||
this.trSafetyOrganization.Nodes.Clear();
|
||||
TreeNode rootNode = new TreeNode
|
||||
protected void filePhoto_FileSelected(object sender, EventArgs e)
|
||||
{
|
||||
Text = "安全组织机构",
|
||||
NodeID = "0",
|
||||
Expanded = true
|
||||
};
|
||||
this.trSafetyOrganization.Nodes.Add(rootNode);
|
||||
BoundTree(rootNode.Nodes);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载树
|
||||
/// </summary>
|
||||
/// <param name="nodes"></param>
|
||||
/// <param name="menuId"></param>
|
||||
private void BoundTree(TreeNodeCollection nodes)
|
||||
{
|
||||
var unitLists = BLL.ProjectUnitService.GetProjectUnitListByProjectId(this.ProjectId);
|
||||
if (unitLists.Count() > 0)
|
||||
{
|
||||
if (BLL.ProjectUnitService.GetProjectUnitTypeByProjectIdUnitId(this.ProjectId, this.CurrUser.UnitId))
|
||||
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
||||
{
|
||||
unitLists = unitLists.Where(x => x.UnitId == this.CurrUser.UnitId).ToList();
|
||||
}
|
||||
|
||||
TreeNode tn = null;
|
||||
foreach (var dr in unitLists)
|
||||
{
|
||||
tn = new TreeNode();
|
||||
var unitName = BLL.UnitService.GetUnitNameByUnitId(dr.UnitId);
|
||||
if (unitName != null)
|
||||
{
|
||||
tn.Text = unitName;
|
||||
}
|
||||
tn.NodeID = dr.UnitId;
|
||||
tn.EnableClickEvent = true;
|
||||
|
||||
var gunitType = BLL.ConstValue.GetConstByConstValueAndGroupId(dr.UnitType, BLL.ConstValue.Group_ProjectUnitType);
|
||||
if (gunitType != null)
|
||||
{
|
||||
tn.ToolTip = gunitType.ConstText + ":" + unitName;
|
||||
}
|
||||
//tn.ToolTip = "编号:" + dr.SafetyOrganizationCode + ";<br/>机构名称:" + dr.SafetyOrganizationName + ";<br/>职责:" + dr.Duties + ";<br/>组成文件:" + dr.BundleFile + ";<br/>机构人员:" + dr.AgencyPersonnel;
|
||||
nodes.Add(tn);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.PersonId, BLL.Const.HJGL_YardPlanningMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
this.btnNewItem.Hidden = false;
|
||||
}
|
||||
|
||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||
{
|
||||
this.btnDeleteItem.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
//if (!string.IsNullOrEmpty(trSafetyOrganization.SelectedNodeID))
|
||||
//{
|
||||
var model = HJGL_YardPlanningService.GetHJGL_YardPlanningByProjectId(this.CurrUser.LoginProjectId);
|
||||
if (model != null)
|
||||
{
|
||||
HJGL_YardPlanningService.DeleteHJGL_YardPlanningById(model.YardPlanningId);
|
||||
}
|
||||
this.imgPhoto.ImageUrl = null;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// Alert.ShowInTop("请选择一个单位!", MessageBoxIcon.Warning);
|
||||
|
||||
//}
|
||||
|
||||
}
|
||||
protected void filePhoto_FileSelected(object sender, EventArgs e)
|
||||
{
|
||||
//if (!string.IsNullOrEmpty(trSafetyOrganization.SelectedNodeID))
|
||||
//{
|
||||
if (filePhoto.HasFile)
|
||||
if (filePhoto.HasFile)
|
||||
{
|
||||
string rootUrl = ConfigurationManager.AppSettings["localRoot"];
|
||||
if (string.IsNullOrEmpty(rootUrl))
|
||||
@@ -192,57 +238,65 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
fileName = fileName.Replace(":", "_").Replace(" ", "_").Replace("\\", "_").Replace("/", "_");
|
||||
fileName = DateTime.Now.Ticks.ToString() + "_" + fileName;
|
||||
|
||||
|
||||
|
||||
filePhoto.SaveAs(rootUrl + "/FileUpload/HJGL_YardPlanning/" + fileName);
|
||||
|
||||
imgPhoto.ImageUrl = "~/FileUpload/HJGL_YardPlanning/" + fileName;
|
||||
|
||||
|
||||
HJGL_YardPlanningService.SavePic(this.CurrUser.LoginProjectId, "FileUpload/HJGL_YardPlanning/" + fileName);
|
||||
HJGL_YardPlanningService.SavePic(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID, "FileUpload/HJGL_YardPlanning/" + fileName);
|
||||
// 清空文件上传组件(上传后要记着清空,否则点击提交表单时会再次上传!!)
|
||||
filePhoto.Reset();
|
||||
}
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// Alert.ShowInTop("请选择一个单位!", MessageBoxIcon.Warning);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择一个主项!", MessageBoxIcon.Warning);
|
||||
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Tree点击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void trSafetyOrganization_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(trSafetyOrganization.SelectedNodeID))
|
||||
/// <summary>
|
||||
/// Tree点击事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void trSafetyOrganization_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
var unit = HJGL_YardPlanningService.GetHJGL_YardPlanningByProjectId(this.CurrUser.LoginProjectId);
|
||||
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
||||
{
|
||||
var unit = HJGL_YardPlanningService.GetHJGL_YardPlanningByProjectId(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID);
|
||||
this.imgPhoto.ImageUrl = null;
|
||||
if (unit != null)
|
||||
{
|
||||
this.imgPhoto.ImageUrl = "~/" + unit.FlowChartPic;
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.imgPhoto.ImageUrl = null;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.imgPhoto.ImageUrl = null;
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnAttachUrl_Click(object sender, EventArgs e)
|
||||
{
|
||||
var model = HJGL_YardPlanningService.GetHJGL_YardPlanningByProjectId(this.CurrUser.LoginProjectId);
|
||||
if (model==null)
|
||||
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
||||
{
|
||||
HJGL_YardPlanningService.SavePic(this.CurrUser.LoginProjectId,"");
|
||||
model = HJGL_YardPlanningService.GetHJGL_YardPlanningByProjectId(this.CurrUser.LoginProjectId);
|
||||
var model = HJGL_YardPlanningService.GetHJGL_YardPlanningByProjectId(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID);
|
||||
if (model == null)
|
||||
{
|
||||
HJGL_YardPlanningService.SavePic(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID, "");
|
||||
model = HJGL_YardPlanningService.GetHJGL_YardPlanningByProjectId(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID);
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/HJGL_YardPlanning&menuId={1}", model.YardPlanningId, BLL.Const.HJGL_YardPlanningMenuId)));
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择一个主项!", MessageBoxIcon.Warning);
|
||||
|
||||
}
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/HJGL_YardPlanning&menuId={1}", model.YardPlanningId, BLL.Const.HJGL_YardPlanningMenuId)));
|
||||
|
||||
}
|
||||
}
|
||||
@@ -359,7 +413,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
// PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("EmergencyProcessEdit.aspx?EmergencyProcessId={0}", Grid1.SelectedRowID, "详细 - ")));
|
||||
// }
|
||||
// #endregion
|
||||
|
||||
|
||||
// #region 获取按钮权限
|
||||
// /// <summary>
|
||||
// /// 获取按钮权限
|
||||
|
||||
@@ -60,13 +60,13 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
/// <summary>
|
||||
/// trSafetyOrganization 控件。
|
||||
/// tvControlItem 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Tree trSafetyOrganization;
|
||||
protected global::FineUIPro.Tree tvControlItem;
|
||||
|
||||
/// <summary>
|
||||
/// panelCenterRegion 控件。
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
TitleToolTip="试压包" AutoScroll="true" RegionPercent="30%">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="true" Title="试压包明细" EnableCollapse="true" Collapsed="false"
|
||||
runat="server" BoxFlex="1" DataKeyNames="PT_PipeId" AllowCellEditing="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="PT_PipeId" AllowCellEditing="true" OnRowClick="Grid1_RowClick" EnableRowClickEvent="true"
|
||||
EnableColumnLines="true" ClicksToEdit="2" DataIDField="PT_PipeId" AllowSorting="true"
|
||||
SortField="PipelineCode" SortDirection="ASC" OnSort="Grid1_Sort" EnableTextSelection="True"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" ForceFit="true">
|
||||
|
||||
@@ -25,6 +25,17 @@ namespace FineUIPro.Web.HJGL.TestPackage
|
||||
ViewState["PTP_ID"] = value;
|
||||
}
|
||||
}
|
||||
public string Line_No
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Line_No"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Line_No"] = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载页面
|
||||
@@ -224,10 +235,27 @@ namespace FineUIPro.Web.HJGL.TestPackage
|
||||
Model.ColorModel colorModel = new Model.ColorModel();
|
||||
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
|
||||
parameter3D.ColorModel = colorModel;
|
||||
parameter3D.TagNum = "/E-9001,/E-9002";
|
||||
parameter3D.ButtonType = "0,4";
|
||||
parameter3D.TagNum = Line_No;
|
||||
parameter3D.ButtonType = "4";
|
||||
//parameter3D.Line_No = Line_No;
|
||||
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7CArea-15A";
|
||||
if (this.tvControlItem.SelectedNode.CommandName == "单位工程")
|
||||
{
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
|
||||
|
||||
}
|
||||
else if (this.tvControlItem.SelectedNode.CommandName == "TestPackage")
|
||||
{
|
||||
var testPackageManage = BLL.TestPackageEditService.GetTestPackageByID(this.PTP_ID);
|
||||
|
||||
if (testPackageManage != null && !string.IsNullOrEmpty(testPackageManage.UnitWorkId))
|
||||
{
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(testPackageManage.UnitWorkId);
|
||||
}
|
||||
|
||||
}
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7C" + parameter3D.ModelName;
|
||||
ctlAuditFlow.data = parameter3D;
|
||||
ctlAuditFlow.BindData();
|
||||
}
|
||||
@@ -259,6 +287,16 @@ namespace FineUIPro.Web.HJGL.TestPackage
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
var testpipedetail = BLL.TestPackageEditService.GetPipeLineListByPTP_ID(this.PTP_ID);
|
||||
if (testpipedetail != null && testpipedetail.Count > 0)
|
||||
{
|
||||
List<string> listpipecode = new List<string>();
|
||||
foreach (var item in testpipedetail)
|
||||
{
|
||||
listpipecode.Add("/" + item.PipelineCode);
|
||||
}
|
||||
Line_No = string.Join(",", listpipecode);
|
||||
}
|
||||
}
|
||||
|
||||
#region 加载页面输入保存信息
|
||||
@@ -527,5 +565,39 @@ namespace FineUIPro.Web.HJGL.TestPackage
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Grid1_RowClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
var pTP_Pipeline = (from x in Funs.DB.PTP_PipelineList
|
||||
where x.PT_PipeId == Grid1.SelectedRowID
|
||||
select x).FirstOrDefault();
|
||||
var pipe = PipelineService.GetPipelineByPipelineId(pTP_Pipeline.PipelineId);
|
||||
var pipecode = "/" + pipe.PipelineCode;
|
||||
Model.Parameter3D parameter3D = new Model.Parameter3D();
|
||||
Model.ColorModel colorModel = new Model.ColorModel();
|
||||
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
|
||||
parameter3D.ColorModel = colorModel;
|
||||
parameter3D.TagNum = pipecode;
|
||||
parameter3D.ButtonType = "4";
|
||||
// parameter3D.Line_No = Line_No;
|
||||
if (this.tvControlItem.SelectedNode.CommandName == "单位工程")
|
||||
{
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
|
||||
|
||||
}
|
||||
else if (this.tvControlItem.SelectedNode.CommandName == "TestPackage")
|
||||
{
|
||||
var testPackageManage = BLL.TestPackageEditService.GetTestPackageByID(this.PTP_ID);
|
||||
if (testPackageManage != null && !string.IsNullOrEmpty(testPackageManage.UnitWorkId))
|
||||
{
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(testPackageManage.UnitWorkId);
|
||||
}
|
||||
|
||||
}
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7C" + parameter3D.ModelName;
|
||||
ctlAuditFlow.data = parameter3D;
|
||||
ctlAuditFlow.BindData();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,6 +46,10 @@
|
||||
EmptyText="输入查询条件" AutoPostBack="true" OnTextChanged="TextBox_TextChanged"
|
||||
Width="240px" LabelWidth="80px" LabelAlign="Right">
|
||||
</f:TextBox>
|
||||
<f:DropDownList runat="server" ID="DropTwoJointType" Label="二次新增类型" LabelAlign="Right" LabelWidth="140px" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged">
|
||||
<f:ListItem Text="新增口" Value="新增口" />
|
||||
<f:ListItem Text="修改口" Value="修改口" />
|
||||
</f:DropDownList>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSelectColumn" Text="选择显示列" Icon="ShapesManySelect"
|
||||
@@ -105,6 +109,9 @@
|
||||
<f:RenderField HeaderText="焊口号" ColumnID="WeldJointCode" DataField="WeldJointCode" SortField="WeldJointCode" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="100px" Locked="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="二次新增类型" ColumnID="TwoJointType" DataField="TwoJointType" SortField="TwoJointType" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="100px" Locked="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="材质1" ColumnID="Material1Code" DataField="Material1Code" SortField="Material1Code" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="90px">
|
||||
</f:RenderField>
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
Funs.FineUIPleaseSelect(DropTwoJointType, "请选择");
|
||||
this.InitTreeMenu();//加载树
|
||||
|
||||
}
|
||||
@@ -127,17 +128,45 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
select x).ToList();
|
||||
foreach (var item in pipeline)
|
||||
{
|
||||
//var jotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == true select x).Count();
|
||||
//var weldJotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == true && x.WeldingDailyId != null select x).Count();
|
||||
//TreeNode newNode = new TreeNode();
|
||||
//if (jotCount > weldJotCount)
|
||||
//{
|
||||
// newNode.Text = "<font color='#EE0000'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
//}
|
||||
|
||||
var jotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == true select x).Count();
|
||||
var weldJotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == true && x.WeldingDailyId != null select x).Count();
|
||||
var AuditCount= (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == true && x.AuditDate !=null select x).Count();
|
||||
TreeNode newNode = new TreeNode();
|
||||
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>";
|
||||
|
||||
}
|
||||
//if (jotCount > weldJotCount)
|
||||
//{
|
||||
// newNode.Text = "<font color='#EE0000'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
//}
|
||||
newNode.ToolTip = "管线号【焊口数】";
|
||||
newNode.NodeID = item.PipelineId;
|
||||
newNode.EnableClickEvent = true;
|
||||
@@ -169,7 +198,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @"SELECT WeldJointId,WeldJointCode,PipelineId,PipelineCode,JointAttribute,
|
||||
string strSql = @"SELECT WeldJointId,WeldJointCode,PipelineId,PipelineCode,JointAttribute,TwoJointType,
|
||||
ComponentsCode1,ComponentsCode2,IsWelding,IsHotProessStr,Material1Code,Material2Code,
|
||||
WeldTypeCode,Specification,HeartNo1,HeartNo2,Size,Dia,Thickness,GrooveTypeCode,
|
||||
WeldingMethodCode,WeldingWireCode,WeldingRodCode,WeldingDate,WeldingDailyCode,
|
||||
@@ -190,6 +219,11 @@ 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)
|
||||
{
|
||||
strSql += " AND TwoJointType = @TwoJointType";
|
||||
listStr.Add(new SqlParameter("@TwoJointType", DropTwoJointType.SelectedValue));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
@@ -798,5 +832,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -113,6 +113,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtWeldJointCode;
|
||||
|
||||
/// <summary>
|
||||
/// DropTwoJointType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList DropTwoJointType;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -46,12 +46,12 @@
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DatePicker ID="txtPlanStartDate" Label="计划开始时间" runat="server" LabelWidth="120px"></f:DatePicker>
|
||||
<f:DatePicker ID="txtPlanStartDate" Label="计划开始日期(安装)" runat="server" LabelWidth="120px"></f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DatePicker ID="txtPlanEndDate" Label="计划完成时间" runat="server" LabelWidth="120px"></f:DatePicker>
|
||||
<f:DatePicker ID="txtPlanEndDate" Label="计划完成日期(安装)" runat="server" LabelWidth="120px"></f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
<f:ListItem Text="补充导入" Value="0"/>
|
||||
<f:ListItem Text="更新导入" Value="1"/>
|
||||
</f:DropDownList>
|
||||
<f:RadioButtonList ID="rbDiaType" Label="DN公称直径/外径" runat="server">
|
||||
<f:RadioItem Text="DN公称直径" Value="0" Selected="true"/>
|
||||
<f:RadioItem Text="外径" Value="1" />
|
||||
</f:RadioButtonList>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:HiddenField ID="hdFileName" runat="server">
|
||||
</f:HiddenField>
|
||||
@@ -56,10 +60,10 @@
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="管线信息" Height="350px"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="PipelineId" AllowCellEditing="true"
|
||||
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="PipelineId"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="PipelineCode" AllowCellEditing="true"
|
||||
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="PipelineCode" EnableBigData="true"
|
||||
AllowSorting="true" SortField="PipelineCode" SortDirection="ASC"
|
||||
AllowPaging="true" IsDatabasePaging="true" PageSize="15"
|
||||
AllowPaging="true" IsDatabasePaging="false" PageSize="300" EnableBigDataRowTip="false"
|
||||
EnableTextSelection="True" >
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -68,6 +68,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList DrpType;
|
||||
|
||||
/// <summary>
|
||||
/// rbDiaType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RadioButtonList rbDiaType;
|
||||
|
||||
/// <summary>
|
||||
/// hdFileName 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" Title="历史记录" IsFluid="true"
|
||||
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="false" Title="历史记录" IsFluid="true" ForceFit="true"
|
||||
EnableCollapse="false" runat="server" BoxFlex="1" DataKeyNames="DesignBasisDataImportId"
|
||||
AllowColumnLocking="true" EnableColumnLines="true" DataIDField="DesignBasisDataImportId"
|
||||
AllowSorting="true" SortField="CreateDate" SortDirection="ASC" EnableMultiSelect="false"
|
||||
|
||||
@@ -195,7 +195,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
else
|
||||
{
|
||||
errorInfos += (i + 2) + "Line, [管线号] 不存在</br>";
|
||||
errorInfos += (i + 2) + "Line,"+ dv[i]["管线号"].ToString() + " [管线号] 不存在</br>";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -240,7 +240,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
else
|
||||
{
|
||||
errorInfos += (i + 2) + "Line, [材料编码] 不存在</br>";
|
||||
errorInfos += (i + 2) + "Line," + dv[i]["材料编码"].ToString() + " [材料编码] 不存在</br>";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -367,6 +367,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
string fileName = rootPath + initPath + this.hdFileName.Text;
|
||||
//读取Excel
|
||||
DataSet ds = NPOIHelper.ExcelToDataSet(fileName, out errorInfos, true);
|
||||
|
||||
//验证Excel读取是否有误
|
||||
if (!string.IsNullOrEmpty(errorInfos))
|
||||
{
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>查询焊口</title>
|
||||
<style type="text/css">
|
||||
.tn-color-green .f-tree-folder {
|
||||
color: green;
|
||||
}
|
||||
</style>
|
||||
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
@@ -51,7 +56,7 @@
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="焊口信息"
|
||||
EnableCollapse="true" KeepCurrentSelection="true" runat="server" BoxFlex="1"
|
||||
EnableCollapse="true" KeepCurrentSelection="true" runat="server" BoxFlex="1" OnRowDataBound="Grid1_RowDataBound" DisableUnselectableRows="true"
|
||||
DataKeyNames="WeldJointId" AllowColumnLocking="true" EnableColumnLines="true"
|
||||
DataIDField="WeldJointId" EnableTextSelection="True" AllowSorting="true" SortField="WeldJointCode"
|
||||
SortDirection="ASC" OnSort="Grid1_Sort" AllowPaging="false" IsDatabasePaging="true"
|
||||
|
||||
@@ -196,6 +196,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
TreeNode newNode = new TreeNode();
|
||||
int totalJointNum = joints.Count(x => x.PipelineId == item.PipelineId);
|
||||
int weldJointNum = joints.Count(x => x.PipelineId == item.PipelineId && x.WeldingDailyId != null);
|
||||
bool istrue = BLL.HJGL_MaterialService.isInStockByPipeline(item.PipelineId, this.CurrUser.LoginProjectId);
|
||||
if (istrue)
|
||||
{
|
||||
newNode.CssClass = "tn-color-green";
|
||||
}
|
||||
newNode.Text = item.PipelineCode + "(" + (totalJointNum - weldJointNum).ToString() + ")";
|
||||
newNode.NodeID = item.PipelineId;
|
||||
newNode.ToolTip = item.PipelineCode;
|
||||
@@ -425,10 +430,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
NewTask.TableDate = DateTime.Now;
|
||||
BLL.WeldTaskService.AddWeldTask(NewTask);
|
||||
}
|
||||
string pipelineId = this.tvControlItem.SelectedNodeID;
|
||||
var model = BLL.PipelineService.GetPipelineByPipelineId(pipelineId);
|
||||
model.State = 1;
|
||||
PipelineService.UpdatePipeline(model);
|
||||
//string pipelineId = this.tvControlItem.SelectedNodeID;
|
||||
//var model = BLL.PipelineService.GetPipelineByPipelineId(pipelineId);
|
||||
//model.State = 1;
|
||||
//PipelineService.UpdatePipeline(model);
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(txtTaskDate.Text) + ActiveWindow.GetHidePostBackReference());
|
||||
//PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
@@ -474,5 +479,20 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 行绑定事件(没有焊接方法无法选择)
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDataBound(object sender, GridRowEventArgs e)
|
||||
{
|
||||
DataRowView row = e.DataItem as DataRowView;
|
||||
if (string.IsNullOrEmpty(row["WeldingMethodCode"].ToString()))
|
||||
{
|
||||
e.RowSelectable = false;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -61,9 +61,13 @@
|
||||
CompareMessage="止数应大于等于起数" CompareOperator="GreaterThanEqual"
|
||||
ShowRedStar="true" Required="true" LabelWidth="100px">
|
||||
</f:NumberBox>
|
||||
<f:TextBox ID="txtZhanwei"
|
||||
<f:DropDownList runat="server" ID="DropTwoJointType" Label="二次新增类型" LabelAlign="Right" LabelWidth="100px" AutoPostBack="true">
|
||||
<f:ListItem Text="新增口" Value="新增口" />
|
||||
<f:ListItem Text="修改口" Value="修改口" />
|
||||
</f:DropDownList>
|
||||
<%-- <f:TextBox ID="txtZhanwei"
|
||||
runat="server" LabelWidth="100px" Hidden="true">
|
||||
</f:TextBox>
|
||||
</f:TextBox>--%>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
@@ -103,7 +107,8 @@
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpJointAttribute" Label="焊口属性" runat="server"
|
||||
|
||||
<f:DropDownList ID="drpJointAttribute" Label="焊口属性" runat="server" Hidden="true"
|
||||
LabelWidth="100px" LabelAlign="Right">
|
||||
</f:DropDownList>
|
||||
<%-- <f:DropDownList ID="drpComponent1" Label="组件1号" runat="server"
|
||||
@@ -112,7 +117,7 @@
|
||||
<f:DropDownList ID="drpComponent2" Label="组件2号" runat="server"
|
||||
LabelWidth="100px" LabelAlign="Right">
|
||||
</f:DropDownList>--%>
|
||||
<f:DropDownList ID="drpDesignIsHotProess" runat="server" Label="是否热处理" LabelAlign="Right"
|
||||
<f:DropDownList ID="drpDesignIsHotProess" runat="server" Label="是否热处理" LabelAlign="Right" Hidden="true"
|
||||
LabelWidth="100px" AutoPostBack="true" OnSelectedIndexChanged="drpDesignIsHotProess_SelectedIndexChanged">
|
||||
<f:ListItem Value="False" Text="否" Selected="true" />
|
||||
<f:ListItem Value="True" Text="是" />
|
||||
|
||||
@@ -37,6 +37,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
BLL.Base_WeldingMethodService.InitWeldingMethodDropDownList(this.drpWeldingMethodId, true, "请选择");//焊接方法
|
||||
BLL.Base_ConsumablesService.InitConsumablesDropDownList(this.drpWeldingRod, true, "2", "请选择");//焊丝类型
|
||||
BLL.Base_ConsumablesService.InitConsumablesDropDownList(this.drpWeldingWire, true, "1", "请选择");//焊条类型
|
||||
Funs.FineUIPleaseSelect(DropTwoJointType, "请选择");
|
||||
|
||||
// 焊口属性
|
||||
this.drpJointAttribute.DataTextField = "Text";
|
||||
@@ -50,6 +51,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
//Funs.FineUIPleaseSelect(this.drpDetectionTypeId);
|
||||
string weldJointId = Request.Params["WeldJointId"];
|
||||
string isTwoJoint = Request.Params["IsTwoJoint"];
|
||||
GroupPanel2.Hidden = true;
|
||||
|
||||
if (!string.IsNullOrEmpty(weldJointId))
|
||||
{
|
||||
@@ -97,6 +99,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
drpWeldTypeCode.SelectedValue = joint.WeldTypeId;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(joint.TwoJointType))
|
||||
{
|
||||
DropTwoJointType.SelectedValue = joint.TwoJointType;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(joint.DetectionTypeId))
|
||||
{
|
||||
List<Model.Base_DetectionType> dList = new List<Model.Base_DetectionType>();
|
||||
@@ -233,7 +239,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </summary>
|
||||
private void SaveData()
|
||||
{
|
||||
if (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 (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);
|
||||
Alert.ShowInTop("请完善必填项!", MessageBoxIcon.Warning);
|
||||
@@ -266,11 +274,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.txtWeldJointCode.Text.Contains("G"))
|
||||
{
|
||||
Alert.ShowInTop("焊口编号不能包含G!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
//if (this.txtWeldJointCode.Text.Contains("G"))
|
||||
//{
|
||||
// Alert.ShowInTop("焊口编号不能包含G!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
joint.WeldJointCode = this.txtWeldJointCode.Text;
|
||||
}
|
||||
|
||||
@@ -316,6 +324,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
joint.WeldTypeId = drpWeldTypeCode.SelectedValue;
|
||||
}
|
||||
if (this.DropTwoJointType.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
joint.TwoJointType = DropTwoJointType.SelectedValue;
|
||||
}
|
||||
joint.PreTemperature = this.txtPreTemperature.Text;
|
||||
joint.Specification = this.txtSpecification.Text;
|
||||
//var DetectionType = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode(this.txtDetectionTypeId.Text.Trim());
|
||||
@@ -323,26 +335,28 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
joint.DetectionTypeId = this.drpDetectionTypeId.SelectedValue;
|
||||
}
|
||||
bool flag = false;
|
||||
if (Convert.ToBoolean(drpDesignIsHotProess.SelectedValue))
|
||||
{
|
||||
flag = true;
|
||||
}
|
||||
if (flag)
|
||||
{
|
||||
joint.IsHotProess = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
joint.IsHotProess = false;
|
||||
}
|
||||
//bool flag = false;
|
||||
//if (Convert.ToBoolean(drpDesignIsHotProess.SelectedValue))
|
||||
//{
|
||||
// flag = true;
|
||||
//}
|
||||
//if (flag)
|
||||
//{
|
||||
// joint.IsHotProess = true;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// joint.IsHotProess = false;
|
||||
//}
|
||||
//joint.IsHotProess = Convert.ToBoolean(drpIsHotProess.SelectedValue);
|
||||
//joint.DesignIsHotProess = Convert.ToBoolean(drpDesignIsHotProess.SelectedValue);
|
||||
joint.Remark = txtRemark.Text.Trim();
|
||||
joint.SubmitMan = CurrUser.PersonId;
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtWpqId.Text))
|
||||
{
|
||||
joint.WPQId = this.txtWpqId.Text;
|
||||
}
|
||||
joint.IsHotProess = Convert.ToBoolean(drpIsHotProess.SelectedValue);
|
||||
joint.DesignIsHotProess = Convert.ToBoolean(drpDesignIsHotProess.SelectedValue);
|
||||
joint.Remark = txtRemark.Text.Trim();
|
||||
|
||||
if (Request.Params["IsTwoJoint"] == "1")
|
||||
{
|
||||
|
||||
+49
-47
@@ -7,11 +7,13 @@
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
|
||||
|
||||
public partial class WeldJointBatchEdit {
|
||||
|
||||
namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
|
||||
|
||||
public partial class WeldJointBatchEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// GroupPanel3 控件。
|
||||
/// </summary>
|
||||
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.GroupPanel GroupPanel3;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Form2 控件。
|
||||
/// </summary>
|
||||
@@ -65,7 +67,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form Form2;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtPipelineCode 控件。
|
||||
/// </summary>
|
||||
@@ -74,7 +76,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPipelineCode;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpPipingClass 控件。
|
||||
/// </summary>
|
||||
@@ -83,7 +85,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpPipingClass;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpDetectionRate 控件。
|
||||
/// </summary>
|
||||
@@ -92,7 +94,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpDetectionRate;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtDetectionType 控件。
|
||||
/// </summary>
|
||||
@@ -101,7 +103,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtDetectionType;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// GroupPanel1 控件。
|
||||
/// </summary>
|
||||
@@ -110,7 +112,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.GroupPanel GroupPanel1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtWeldJointCode 控件。
|
||||
/// </summary>
|
||||
@@ -119,7 +121,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtWeldJointCode;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtWeldJointCode1 控件。
|
||||
/// </summary>
|
||||
@@ -128,7 +130,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtWeldJointCode1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtWeldJointCode2 控件。
|
||||
/// </summary>
|
||||
@@ -137,16 +139,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtWeldJointCode2;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtZhanwei 控件。
|
||||
/// DropTwoJointType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtZhanwei;
|
||||
|
||||
protected global::FineUIPro.DropDownList DropTwoJointType;
|
||||
|
||||
/// <summary>
|
||||
/// drpMaterial1 控件。
|
||||
/// </summary>
|
||||
@@ -155,7 +157,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpMaterial1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpMaterial2 控件。
|
||||
/// </summary>
|
||||
@@ -164,7 +166,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpMaterial2;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtDia 控件。
|
||||
/// </summary>
|
||||
@@ -173,7 +175,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtDia;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtSize 控件。
|
||||
/// </summary>
|
||||
@@ -182,7 +184,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtSize;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtThickness 控件。
|
||||
/// </summary>
|
||||
@@ -191,7 +193,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtThickness;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtSpecification 控件。
|
||||
/// </summary>
|
||||
@@ -200,7 +202,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSpecification;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpWeldTypeCode 控件。
|
||||
/// </summary>
|
||||
@@ -209,7 +211,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpWeldTypeCode;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpDetectionTypeId 控件。
|
||||
/// </summary>
|
||||
@@ -218,7 +220,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpDetectionTypeId;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpJointAttribute 控件。
|
||||
/// </summary>
|
||||
@@ -227,7 +229,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpJointAttribute;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpDesignIsHotProess 控件。
|
||||
/// </summary>
|
||||
@@ -236,7 +238,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpDesignIsHotProess;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// GroupPanel2 控件。
|
||||
/// </summary>
|
||||
@@ -245,7 +247,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.GroupPanel GroupPanel2;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpWeldingMethodId 控件。
|
||||
/// </summary>
|
||||
@@ -254,7 +256,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpWeldingMethodId;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Panel3 控件。
|
||||
/// </summary>
|
||||
@@ -263,7 +265,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel3;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtWPQCode 控件。
|
||||
/// </summary>
|
||||
@@ -272,7 +274,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtWPQCode;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// search 控件。
|
||||
/// </summary>
|
||||
@@ -281,7 +283,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button search;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpGrooveType 控件。
|
||||
/// </summary>
|
||||
@@ -290,7 +292,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpGrooveType;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpWeldingRod 控件。
|
||||
/// </summary>
|
||||
@@ -299,7 +301,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpWeldingRod;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpWeldingWire 控件。
|
||||
/// </summary>
|
||||
@@ -308,7 +310,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpWeldingWire;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtPreTemperature 控件。
|
||||
/// </summary>
|
||||
@@ -317,7 +319,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtPreTemperature;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// drpIsHotProess 控件。
|
||||
/// </summary>
|
||||
@@ -326,7 +328,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpIsHotProess;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtRemark 控件。
|
||||
/// </summary>
|
||||
@@ -335,7 +337,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtRemark;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtWpqId 控件。
|
||||
/// </summary>
|
||||
@@ -344,7 +346,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtWpqId;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// txtIsHotProess 控件。
|
||||
/// </summary>
|
||||
@@ -353,7 +355,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtIsHotProess;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// hdWeldingMethodId 控件。
|
||||
/// </summary>
|
||||
@@ -362,7 +364,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox hdWeldingMethodId;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// hdGrooveType 控件。
|
||||
/// </summary>
|
||||
@@ -371,7 +373,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage {
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox hdGrooveType;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -90,7 +90,10 @@
|
||||
<f:TextBox ID="txtRemark" runat="server" Label="备注" MaxLength="200" LabelAlign="Right"
|
||||
LabelWidth="100px">
|
||||
</f:TextBox>
|
||||
<f:Label runat="server"></f:Label>
|
||||
<f:DropDownList runat="server" ID="DropTwoJointType" Label="二次新增类型" LabelAlign="Right" LabelWidth="140px" AutoPostBack="true">
|
||||
<f:ListItem Text="新增口" Value="新增口" />
|
||||
<f:ListItem Text="修改口" Value="修改口" />
|
||||
</f:DropDownList>
|
||||
<f:Label runat="server"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
|
||||
@@ -38,6 +38,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
BLL.Base_WeldingMethodService.InitWeldingMethodDropDownList(this.drpWeldingMethodId, true, "请选择");//焊接方法
|
||||
BLL.Base_ConsumablesService.InitConsumablesDropDownList(this.drpWeldingRod, true, "2", "请选择");//焊丝类型
|
||||
BLL.Base_ConsumablesService.InitConsumablesDropDownList(this.drpWeldingWire, true, "1", "请选择");//焊条类型
|
||||
Funs.FineUIPleaseSelect(DropTwoJointType, "请选择");
|
||||
|
||||
// 焊口属性
|
||||
//this.drpJointAttribute.DataTextField = "Text";
|
||||
@@ -121,6 +122,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
drpWeldTypeCode.SelectedValue = joint.WeldTypeId;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(joint.TwoJointType))
|
||||
{
|
||||
DropTwoJointType.SelectedValue = joint.TwoJointType;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(joint.DetectionTypeId))
|
||||
{
|
||||
List<Model.Base_DetectionType> dList = new List<Model.Base_DetectionType>();
|
||||
@@ -313,8 +318,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
joint.PipelineCode = txtPipelineCode.Text.Trim();
|
||||
joint.ProjectId = this.CurrUser.LoginProjectId;
|
||||
|
||||
if (!this.txtWeldJointCode.Text.Contains("G"))
|
||||
{
|
||||
//if (!this.txtWeldJointCode.Text.Contains("G"))
|
||||
//{
|
||||
int jointCode = Funs.GetNewIntOrZero(this.txtWeldJointCode.Text.Trim());
|
||||
if (jointCode != 0)
|
||||
{
|
||||
@@ -331,12 +336,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
joint.WeldJointCode = this.txtWeldJointCode.Text;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("焊口编号不能包含G!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// Alert.ShowInTop("焊口编号不能包含G!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
|
||||
if (this.drpMaterial1.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
@@ -379,6 +384,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
joint.WeldTypeId = drpWeldTypeCode.SelectedValue;
|
||||
}
|
||||
if (this.DropTwoJointType.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
joint.TwoJointType = DropTwoJointType.SelectedValue;
|
||||
}
|
||||
joint.PreTemperature = this.txtPreTemperature.Text;
|
||||
joint.Specification = this.txtSpecification.Text;
|
||||
//var DetectionType = BLL.Base_DetectionTypeService.GetDetectionTypeIdByDetectionTypeCode(this.txtDetectionTypeId.Text.Trim());
|
||||
|
||||
@@ -221,6 +221,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtRemark;
|
||||
|
||||
/// <summary>
|
||||
/// DropTwoJointType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList DropTwoJointType;
|
||||
|
||||
/// <summary>
|
||||
/// GroupPanel2 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="管线信息"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="管线信息"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="PipelineId"
|
||||
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="PipelineId"
|
||||
AllowSorting="true" SortField="PipelineCode" SortDirection="ASC" OnSort="Grid1_Sort"
|
||||
@@ -189,14 +189,14 @@
|
||||
</f:Panel>
|
||||
|
||||
<f:Panel runat="server" ID="panelBottomRegion" RegionPosition="Bottom" RegionSplit="true" RegionSplitWidth="20px" EnableCollapse="true"
|
||||
Title="底部面板" ShowBorder="false" RegionPercent="70%" ShowHeader="false" BodyPadding="1px" Layout="Fit">
|
||||
Title="底部面板" ShowBorder="false" RegionPercent="70%" ShowHeader="false" BodyPadding="1px" Layout="Fit" >
|
||||
<Items>
|
||||
<f:TabStrip ID="TabStrip1" ShowBorder="false" TabPosition="Top"
|
||||
EnableTabCloseMenu="false" ActiveTabIndex="0" runat="server" AutoPostBack="true" OnTabIndexChanged="TabStrip1_TabIndexChanged">
|
||||
<Tabs>
|
||||
<f:Tab ID="TabJoint" Title="焊口信息" BodyPadding="1px" Layout="VBox" runat="server" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Grid ID="Grid3" ShowBorder="true" ShowHeader="false"
|
||||
<f:Grid ID="Grid3" ShowBorder="true" ShowHeader="false" ForceFit="true"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="WeldJointId"
|
||||
AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="WeldJointId"
|
||||
AllowSorting="true" SortField="WeldJointCode" SortDirection="ASC" OnSort="Grid2_Sort"
|
||||
@@ -208,7 +208,7 @@
|
||||
TextAlign="Left" Width="180px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊口属性" ColumnID="JointAttribute" DataField="JointAttribute" SortField="JointAttribute" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="180px">
|
||||
TextAlign="Left" Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="材质1" ColumnID="Material1Code" DataField="Material1Code" SortField="Material1Code" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="90px">
|
||||
@@ -225,6 +225,10 @@
|
||||
DataField="Dia" SortField="Dia" FieldType="Double" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="DN公称直径" ColumnID="DNDia"
|
||||
DataField="DNDia" SortField="DNDia" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="90px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="壁厚" ColumnID="Thickness"
|
||||
DataField="Thickness" SortField="Thickness" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="90px">
|
||||
|
||||
@@ -177,6 +177,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
|
||||
{
|
||||
e.Node.Nodes.Clear();
|
||||
|
||||
if (e.Node.CommandName == "单位工程")
|
||||
{
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
@@ -296,7 +297,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
string strSql = @"SELECT WeldJointId,JointAttribute,WeldJointCode,PipelineId,PipelineCode,JointAttribute,
|
||||
IsWelding,IsHotProessStr,Material1Code,Material2Code,WeldTypeCode,
|
||||
Specification,HeartNo1,HeartNo2,Size,Dia,Thickness,GrooveTypeCode,
|
||||
Specification,HeartNo1,HeartNo2,Size,Dia,DNDia,Thickness,GrooveTypeCode,
|
||||
WeldingMethodCode,WeldingWireCode,WeldingRodCode,WeldingDate,WeldingDailyCode,
|
||||
BackingWelderCode,CoverWelderCode,MediumCode ,PreTemperature,JointArea,WPQCode,Remark
|
||||
FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL ";
|
||||
|
||||
@@ -77,8 +77,8 @@
|
||||
|
||||
</Toolbars>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="材料匹配明细"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="MaterialCode,Number"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="材料匹配明细" OnRowClick="Grid1_RowClick" EnableRowClickEvent="true"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="MaterialCode,Number" ForceFit="true"
|
||||
EnableColumnLines="true" DataIDField="MaterialCode" AllowSorting="true" OnRowDataBound="Grid1_RowDataBound"
|
||||
SortField="MaterialCode" SortDirection="ASC" OnSort="Grid1_Sort">
|
||||
<Columns>
|
||||
@@ -107,12 +107,12 @@
|
||||
FieldType="String" HeaderText="单位" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="MaterialMade" DataField="MaterialMade" SortField="MaterialMade"
|
||||
FieldType="String" HeaderText="材质" HeaderTextAlign="Center"
|
||||
<f:RenderField Width="150px" ColumnID="MaterialDef" DataField="MaterialDef" SortField="MaterialDef"
|
||||
FieldType="String" HeaderText="材料描述" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="MaterialName" DataField="MaterialName" SortField="MaterialName"
|
||||
FieldType="String" HeaderText="材料类型" HeaderTextAlign="Center"
|
||||
FieldType="String" HeaderText="类型" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
|
||||
|
||||
@@ -20,10 +20,20 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
ViewState["PipeArea"] = value;
|
||||
}
|
||||
}
|
||||
public string Line_No
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Line_No"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Line_No"] = value;
|
||||
}
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
ctlAuditFlow.Url = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId);
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7CArea-15A";
|
||||
if (!IsPostBack)
|
||||
{
|
||||
PipeArea = Request.Params["PipeArea"];
|
||||
@@ -121,6 +131,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
tn2.ToolTip = "施工单位:" + u.UnitName;
|
||||
tn2.CommandName = "单位工程";
|
||||
tn2.EnableExpandEvent = true;
|
||||
tn2.EnableClickEvent= true;
|
||||
rootNode2.Nodes.Add(tn2);
|
||||
if (a > 0)
|
||||
{
|
||||
@@ -139,11 +150,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
e.Node.Nodes.Clear();
|
||||
if (e.Node.CommandName == "单位工程")
|
||||
{
|
||||
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == e.Node.NodeID && x.PipeArea == PipeArea
|
||||
&& x.PipelineCode.Contains(txtPipelineCode.Text.Trim())
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
if (!string .IsNullOrEmpty (txtPipelineCode.Text.Trim()))
|
||||
{
|
||||
pipeline= pipeline.Where(x => x.PipelineCode.Contains(txtPipelineCode.Text.Trim())).ToList();
|
||||
}
|
||||
foreach (var item in pipeline)
|
||||
{
|
||||
//var jotCount = (from x in Funs.DB.HJGL_WeldJoint where x.PipelineId == item.PipelineId && x.IsTwoJoint == null select x).Count();
|
||||
@@ -167,7 +182,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
newNode.CssClass = "tn-color-green";
|
||||
}
|
||||
newNode.Text = item.PipelineCode+suf; //+ "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
|
||||
newNode.CommandName = "管线";
|
||||
newNode.NodeID = item.PipelineId;
|
||||
newNode.EnableClickEvent = true;
|
||||
e.Node.Nodes.Add(newNode);
|
||||
@@ -192,48 +207,72 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
{
|
||||
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();
|
||||
}
|
||||
lbPlanStartDate.Text = pipeline.PlanStartDate.HasValue ? pipeline.PlanStartDate.Value.ToShortDateString() : "";
|
||||
//if (pipeline.PlanStartDate.HasValue && pipeline.ActStartDate.HasValue)
|
||||
//{
|
||||
// if (pipeline.ActStartDate < pipeline.PlanStartDate)
|
||||
// {
|
||||
// lbIsFinished.Text = "超前";
|
||||
// }
|
||||
// else if (pipeline.ActStartDate > pipeline.PlanStartDate)
|
||||
// {
|
||||
// lbIsFinished.Text = "延误";
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// lbIsFinished.Text = "正常";
|
||||
// }
|
||||
//}
|
||||
//if (pipeline.PlanStartDate.HasValue && !pipeline.ActStartDate.HasValue)
|
||||
//{
|
||||
// if (pipeline.PlanStartDate >= DateTime.Now)
|
||||
// {
|
||||
// lbIsFinished.Text = "正常";
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// lbIsFinished.Text = "延误";
|
||||
// }
|
||||
//}
|
||||
Model.Parameter3D parameter3D = new Model.Parameter3D();
|
||||
Model.ColorModel colorModel = new Model.ColorModel();
|
||||
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
|
||||
parameter3D.ColorModel = colorModel;
|
||||
parameter3D.TagNum = "/E-9001,/E-9002";
|
||||
parameter3D.ButtonType = "0,3";
|
||||
parameter3D.TagNum = "";
|
||||
parameter3D.ButtonType = "3";
|
||||
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7CArea-15A";
|
||||
if (this.tvControlItem.SelectedNode.CommandName == "单位工程")
|
||||
{
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == e.Node.NodeID && x.PipeArea == PipeArea
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
List<string> pipelineList = new List<string>();
|
||||
foreach (var item in pipeline)
|
||||
{
|
||||
bool istrue = BLL.HJGL_MaterialService.isInStockByPipeline(item.PipelineId, this.CurrUser.LoginProjectId);
|
||||
if (istrue)
|
||||
{
|
||||
pipelineList.Add("/" + item.PipelineCode);
|
||||
}
|
||||
|
||||
}
|
||||
parameter3D.TagNum= string.Join(",", pipelineList);
|
||||
//parameter3D.Line_No = string.Join(",", pipelineList);
|
||||
}
|
||||
else if (this.tvControlItem.SelectedNode.CommandName == "管线")
|
||||
{
|
||||
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();
|
||||
}
|
||||
if (PipeArea == PipelineService.PipeArea_SHOP)
|
||||
{
|
||||
var list = BLL.HJGL_PipelineComponentService.GetComponentByPipelineId(pipeline.PipelineId);
|
||||
if (list != null && list.Count() > 0)
|
||||
{
|
||||
|
||||
lbPlanStartDate.Text = list.First().PlanStartDate.ToString();
|
||||
}
|
||||
}
|
||||
else if (PipeArea == PipelineService.PipeArea_FIELD)
|
||||
{
|
||||
lbPlanStartDate.Text = pipeline.PlanStartDate.HasValue ? pipeline.PlanStartDate.Value.ToShortDateString() : "";
|
||||
|
||||
}
|
||||
if (pipeline != null && !string.IsNullOrEmpty(pipeline.UnitWorkId))
|
||||
{
|
||||
bool istrue = BLL.HJGL_MaterialService.isInStockByPipeline(tvControlItem.SelectedNodeID, this.CurrUser.LoginProjectId);
|
||||
if (istrue)
|
||||
{
|
||||
Line_No = "/" + pipeline.PipelineCode;
|
||||
}
|
||||
//parameter3D.Line_No = Line_No;
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(pipeline.UnitWorkId);
|
||||
var pipecode = "/" + pipeline.PipelineCode;
|
||||
parameter3D.TagNum = pipecode;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7C" + parameter3D.ModelName;
|
||||
ctlAuditFlow.data = parameter3D;
|
||||
ctlAuditFlow.BindData();
|
||||
}
|
||||
@@ -306,7 +345,40 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
|
||||
}
|
||||
protected void Grid1_RowClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
Model.Parameter3D parameter3D = new Model.Parameter3D();
|
||||
Model.ColorModel colorModel = new Model.ColorModel();
|
||||
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
|
||||
parameter3D.ColorModel = colorModel;
|
||||
parameter3D.ButtonType = "3";
|
||||
if (this.tvControlItem.SelectedNode.CommandName == "单位工程")
|
||||
{
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||
|
||||
|
||||
}
|
||||
else if (this.tvControlItem.SelectedNode.CommandName == "管线")
|
||||
{
|
||||
var modelpipe = PipelineService.GetPipelineByPipelineId(tvControlItem.SelectedNodeID);
|
||||
if (modelpipe != null && !string.IsNullOrEmpty(modelpipe.UnitWorkId))
|
||||
{
|
||||
bool istrue = BLL.HJGL_MaterialService.isInStockByPipeline(tvControlItem.SelectedNodeID, this.CurrUser.LoginProjectId);
|
||||
if (istrue)
|
||||
{
|
||||
Line_No ="/"+ modelpipe.PipelineCode;
|
||||
}
|
||||
// parameter3D.Line_No = Line_No;
|
||||
parameter3D.ModelName = HJGL_DataImportService.Getlatest3DModelNameByUnitWorkId(modelpipe.UnitWorkId);
|
||||
var pipecode = "/" + modelpipe.PipelineCode;
|
||||
parameter3D.TagNum = pipecode;
|
||||
}
|
||||
|
||||
}
|
||||
ctlAuditFlow.Url_item = BLL.Project_SysSetService.GetAvevaNetUrl(this.CurrUser.LoginProjectId) + "item/IPE%7CVPD%7C" + parameter3D.ModelName;
|
||||
ctlAuditFlow.data = parameter3D;
|
||||
ctlAuditFlow.BindData();
|
||||
}
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user