Merge branch 'master' of http://47.104.102.122:3000/lpf/SGGL_SeDin_New
This commit is contained in:
@@ -0,0 +1,104 @@
|
|||||||
|
|
||||||
|
ALTER VIEW [dbo].[View_SitePerson_Person]
|
||||||
|
AS
|
||||||
|
/*现场人员视图*/
|
||||||
|
SELECT SitePerson.ProjectId,
|
||||||
|
Project.ProjectCode,
|
||||||
|
Project.ProjectName,
|
||||||
|
SitePerson.SitePersonId,
|
||||||
|
persons.PersonId,
|
||||||
|
SitePerson.CardNo,
|
||||||
|
Persons.PersonName,
|
||||||
|
Persons.Sex,
|
||||||
|
(Case Persons.Sex WHEN '1' THEN '男' WHEN '2' THEN '女' ELSE '' END) AS SexName,
|
||||||
|
Persons.IdentityCard,
|
||||||
|
Persons.Address,
|
||||||
|
SitePerson.UnitId,
|
||||||
|
Persons.DepartId,
|
||||||
|
Persons.Birthday,
|
||||||
|
SitePerson.TeamGroupId,
|
||||||
|
SitePerson.WorkAreaId,
|
||||||
|
SitePerson.WorkPostId,
|
||||||
|
SitePerson.InTime,
|
||||||
|
SitePerson.OutTime,
|
||||||
|
SitePerson.OutResult,
|
||||||
|
Persons.Telephone,
|
||||||
|
Persons.PositionId,
|
||||||
|
Persons.PostTitleId,
|
||||||
|
Persons.PhotoUrl,
|
||||||
|
Unit.UnitCode,
|
||||||
|
Unit.UnitName,
|
||||||
|
TeamGroup.TeamGroupName,
|
||||||
|
Post.WorkPostName,
|
||||||
|
Position.PositionName,
|
||||||
|
Title.PostTitleName,
|
||||||
|
Depart.DepartName,
|
||||||
|
Post.PostType,
|
||||||
|
Post.IsHsse,
|
||||||
|
(SELECT COUNT(*) FROM EduTrain_TrainRecordDetail T
|
||||||
|
LEFT JOIN EduTrain_TrainRecord AS E ON T.TrainingId=E.TrainingId
|
||||||
|
WHERE T.PersonId=SitePerson.PersonId AND E.ProjectId=SitePerson.ProjectId AND T.CheckResult=1) AS TrainCount,
|
||||||
|
(SELECT COUNT(*) FROM Training_TestRecord R
|
||||||
|
WHERE R.TestManId=SitePerson.PersonId AND R.ProjectId=SitePerson.ProjectId and R.TestScores > ISNULL((SELECT TOP 1 PassingScore FROM Sys_TestRule),60)) AS TrainCount1,
|
||||||
|
(SELECT COUNT(*) FROM Training_TestRecord R1
|
||||||
|
left join Training_TestPlan p1 on p1.TestPlanId=R1.TestPlanId
|
||||||
|
left join Training_Plan p2 on p2.PlanId=p1.PlanId
|
||||||
|
WHERE R1.TestManId=SitePerson.PersonId AND R1.ProjectId=SitePerson.ProjectId and R1.TestScores > ISNULL((SELECT TOP 1 PassingScore FROM Sys_TestRule),60) and p2.TrainTypeId='8920c9cc-fa92-49b2-9493-775a55da27bb' and R1.TestStartTime>=SitePerson.InTime) AS TrainCount2, --当次入场入场教育培训考试合格
|
||||||
|
SitePerson.AuditorId,
|
||||||
|
Persons.PersonName AS AuditorName,
|
||||||
|
SitePerson.AuditorDate,
|
||||||
|
Persons.IDCardUrl,
|
||||||
|
Persons.IsForeign,
|
||||||
|
case when Persons.IsForeign=1 then '是' else '否' end as IsForeignStr,
|
||||||
|
Persons.IdcardType,
|
||||||
|
BasicData1.dictName as IdcardTypeName,
|
||||||
|
Persons.IdcardStartDate,
|
||||||
|
Persons.IdcardEndDate,
|
||||||
|
Persons.IdcardForever,
|
||||||
|
case when Persons.IdcardForever='Y' then '是' else '否' end as IdcardForeverStr,
|
||||||
|
Persons.PoliticsStatus,
|
||||||
|
BasicData2.dictName as PoliticsStatusName,
|
||||||
|
Persons.IdcardAddress,
|
||||||
|
Persons.Nation,
|
||||||
|
BasicData3.dictName as NationName,
|
||||||
|
Persons.EduLevel,
|
||||||
|
BasicData4.dictName as EduLevelName,
|
||||||
|
Persons.MaritalStatus,
|
||||||
|
BasicData5.dictName as MaritalStatusName,
|
||||||
|
Persons.CountryCode,
|
||||||
|
Country.cname as CountryName,
|
||||||
|
Persons.ProvinceCode,
|
||||||
|
City.cname as ProvinceName,
|
||||||
|
Persons.PersonType,
|
||||||
|
(case when Persons.PersonType='2' then '外聘' when Persons.PersonType='3' then '第三方' else '员工' end) as IsOutsideStr,
|
||||||
|
--WorkArea.UnitWorkCode AS WorkAreaCode,
|
||||||
|
WorkAreaCode= STUFF((SELECT ',' + UnitWorkCode FROM dbo.WBS_UnitWork where PATINDEX('%,' + RTRIM(UnitWorkId) + ',%',',' +SitePerson.WorkAreaId + ',')>0 FOR XML PATH('')), 1, 1,''),
|
||||||
|
--WorkArea.UnitWorkName AS WorkAreaName
|
||||||
|
WorkAreaName= STUFF((SELECT ',' + UnitWorkName FROM dbo.WBS_UnitWork where PATINDEX('%,' + RTRIM(UnitWorkId) + ',%',',' +SitePerson.WorkAreaId + ',')>0 FOR XML PATH('')), 1, 1,''),
|
||||||
|
SitePerson.RealNameAddTime,
|
||||||
|
SitePerson.RealNameUpdateTime,
|
||||||
|
Persons.HeadImage,
|
||||||
|
SitePerson.States,
|
||||||
|
Persons.YunMouState
|
||||||
|
FROM SitePerson_Person AS SitePerson
|
||||||
|
LEFT JOIN Person_Persons AS Persons ON SitePerson.PersonId=Persons.PersonId
|
||||||
|
LEFT JOIN Base_Project AS Project ON Project.ProjectId=SitePerson.ProjectId
|
||||||
|
LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = SitePerson.UnitId
|
||||||
|
LEFT JOIN ProjectData_TeamGroup AS TeamGroup ON TeamGroup.TeamGroupId=SitePerson.TeamGroupId
|
||||||
|
LEFT JOIN Base_WorkPost AS Post ON Post.WorkPostId = SitePerson.WorkPostId
|
||||||
|
LEFT JOIN Base_Position AS Position ON Position.PositionId = Persons.PositionId
|
||||||
|
Left JOIN Base_PostTitle AS Title ON Title.PostTitleId = Persons.PostTitleId
|
||||||
|
Left JOIN Base_Depart AS Depart ON Depart.DepartId = Persons.DepartId
|
||||||
|
Left JOIN RealName_BasicData AS BasicData1 ON BasicData1.dictCode = Persons.IdcardType
|
||||||
|
Left JOIN RealName_BasicData AS BasicData2 ON BasicData2.dictCode = Persons.PoliticsStatus
|
||||||
|
Left JOIN RealName_BasicData AS BasicData3 ON BasicData3.dictCode = Persons.Nation
|
||||||
|
Left JOIN RealName_BasicData AS BasicData4 ON BasicData4.dictCode = Persons.EduLevel
|
||||||
|
Left JOIN RealName_BasicData AS BasicData5 ON BasicData5.dictCode = Persons.MaritalStatus
|
||||||
|
Left JOIN RealName_Country AS Country ON Country.CountryId = Persons.CountryCode
|
||||||
|
Left JOIN RealName_City AS City ON City.provinceCode = Persons.ProvinceCode and City.CountryId = Persons.CountryCode
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
USE [SGGLDB]
|
||||||
|
GO
|
||||||
|
|
||||||
|
/****** Object: View [dbo].[View_HJGL_InstallData] Script Date: 2026/4/16 0:12:44 ******/
|
||||||
|
SET ANSI_NULLS ON
|
||||||
|
GO
|
||||||
|
|
||||||
|
SET QUOTED_IDENTIFIER ON
|
||||||
|
GO
|
||||||
|
|
||||||
|
ALTER VIEW [dbo].[View_HJGL_InstallData]
|
||||||
|
AS
|
||||||
|
WITH TwOutPutData as (select distinct twRelation.PipelineId,
|
||||||
|
outdetail.Id as TwOutputDetailId,
|
||||||
|
twRelation.MaterialCode,
|
||||||
|
master.Id as OutputMasterId
|
||||||
|
from Tw_OutputMaster master
|
||||||
|
join Tw_OutputDetail outdetail on outdetail.OutputMasterId = master.Id
|
||||||
|
join Tw_InOutPlanMaster planmaster on planmaster.Id = master.InOutPlanMasterId
|
||||||
|
join Tw_InOutPlanDetail_Relation twRelation
|
||||||
|
on twRelation.InOutPlanMasterId = planmaster.Id and
|
||||||
|
outdetail.MaterialCode = twRelation.MaterialCode
|
||||||
|
where master.TypeInt=70),
|
||||||
|
PrefabricatedData AS (SELECT pipe.PipeLineMatId as Id,
|
||||||
|
line.PipelineCode,
|
||||||
|
pipe.PrefabricatedComponents as Code,
|
||||||
|
'预制组件' as TypeStr,
|
||||||
|
'' as Matdef,
|
||||||
|
CAST(NULL AS DECIMAL(18, 2)) as Number, -- 明确指定数据类型
|
||||||
|
pack.PackagingCode,
|
||||||
|
trainnumber.TrainNumber,
|
||||||
|
line.FlowingSection,
|
||||||
|
line.UnitWorkId,
|
||||||
|
line.ProjectId,
|
||||||
|
pack.StackingPosition
|
||||||
|
FROM dbo.HJGL_PipeLineMat pipe
|
||||||
|
INNER JOIN dbo.HJGL_Pipeline line -- 改为INNER JOIN,如果管道必须存在
|
||||||
|
ON pipe.PipelineId = line.PipelineId
|
||||||
|
LEFT JOIN dbo.HJGL_MaterialCodeLib lib
|
||||||
|
ON lib.MaterialCode = pipe.MaterialCode
|
||||||
|
LEFT JOIN HJGL_Pipeline_Component comonent
|
||||||
|
ON comonent.PipelineComponentCode = pipe.PrefabricatedComponents
|
||||||
|
LEFT JOIN HJGL_PackagingManageDetail packdetail
|
||||||
|
ON packdetail.PipelineComponentId = comonent.PipelineComponentId
|
||||||
|
LEFT JOIN HJGL_PackagingManage pack
|
||||||
|
ON packdetail.PackagingManageId = pack.PackagingManageId
|
||||||
|
AND pack.ProjectId = line.ProjectId -- 添加项目关联条件
|
||||||
|
LEFT JOIN HJGL_TrainNumberManage trainnumber
|
||||||
|
ON pack.TrainNumberId = trainnumber.Id
|
||||||
|
WHERE line.PipeArea = '1'
|
||||||
|
and (pipe.PrefabricatedComponents != ''
|
||||||
|
AND pipe.PrefabricatedComponents IS NOT NULL and pipe.PrefabricatedComponents not in('裕-量'))),
|
||||||
|
LooseComponentsData AS (SELECT distinct pipe.PipeLineMatId as Id,
|
||||||
|
line.PipelineCode,
|
||||||
|
pipe.MaterialCode as Code,
|
||||||
|
'预制散件' as TypeStr,
|
||||||
|
lib.MaterialDef as Matdef,
|
||||||
|
cast( packdetail.Number as DECIMAL(18, 2)) as Number,
|
||||||
|
pack.PackagingCode,
|
||||||
|
trainnumber.TrainNumber,
|
||||||
|
line.FlowingSection,
|
||||||
|
line.UnitWorkId,
|
||||||
|
line.ProjectId,
|
||||||
|
pack.StackingPosition
|
||||||
|
FROM dbo.HJGL_PipeLineMat pipe
|
||||||
|
INNER JOIN HJGL_Pipeline line -- 改为INNER JOIN
|
||||||
|
ON pipe.PipelineId = line.PipelineId
|
||||||
|
LEFT JOIN dbo.HJGL_MaterialCodeLib lib
|
||||||
|
ON lib.MaterialCode = pipe.MaterialCode
|
||||||
|
LEFT JOIN HJGL_PackagingManageDetail packdetail
|
||||||
|
ON packdetail.MaterialCode = pipe.MaterialCode
|
||||||
|
LEFT JOIN TwOutPutData twOutPutData
|
||||||
|
ON twOutPutData.PipelineId = pipe.PipelineId and
|
||||||
|
twOutPutData.MaterialCode = packdetail.MaterialCode
|
||||||
|
LEFT JOIN HJGL_PackagingManage pack
|
||||||
|
ON packdetail.PackagingManageId = pack.PackagingManageId
|
||||||
|
AND pack.ProjectId = line.ProjectId -- 添加项目关联条件
|
||||||
|
LEFT JOIN HJGL_TrainNumberManage trainnumber
|
||||||
|
ON pack.TrainNumberId = trainnumber.Id
|
||||||
|
where line.PipeArea = '1'
|
||||||
|
and (pipe.PrefabricatedComponents is null or pipe.PrefabricatedComponents = '') )
|
||||||
|
|
||||||
|
-- 合并结果
|
||||||
|
SELECT *
|
||||||
|
FROM PrefabricatedData
|
||||||
|
UNION ALL
|
||||||
|
SELECT *
|
||||||
|
FROM LooseComponentsData
|
||||||
|
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,220 @@
|
|||||||
|
-- dbo.View_HJGL_WeldJoint source
|
||||||
|
|
||||||
|
ALTER view dbo.View_HJGL_WeldJoint as
|
||||||
|
SELECT jot.[ProjectId] --项目Id
|
||||||
|
, pipe.[UnitWorkId] --单位工程Id
|
||||||
|
, uw.UnitWorkName --单位工程
|
||||||
|
, pipe.[UnitId] --单位Id
|
||||||
|
, unit.UnitName --单位
|
||||||
|
, jot.[PipelineCode] --管线号
|
||||||
|
, pipe.[SingleNumber] --单线图号
|
||||||
|
, pipe.[SingleName] --图纸名称
|
||||||
|
, pipe.[MediumId] --介质Id
|
||||||
|
, medium.MediumCode
|
||||||
|
, medium.MediumName --介质名称
|
||||||
|
, pipe.[PipingClassId] --管道等级Id
|
||||||
|
, pipingClass.PipingClassCode --管道等级
|
||||||
|
, pipe.[DetectionRateId] --探伤比例Id
|
||||||
|
, dr.DetectionRateCode --探伤比例(例如5,10,20)
|
||||||
|
, pipe.DetectionType --探伤类型Id(可能多个,中间用|分隔)
|
||||||
|
, STUFF((SELECT ',' + DetectionTypeCode
|
||||||
|
FROM Base_DetectionType
|
||||||
|
WHERE CHARINDEX('|' + LTRIM(DetectionTypeId) + '|', '|' + pipe.DetectionType + '|') > 0
|
||||||
|
FOR XML PATH('')), 1, 1, '') AS DetectionTypeStr --探伤类型(可能多个,中间用,分隔)
|
||||||
|
, pipe.DesignTemperature --设计温度℃
|
||||||
|
, pipe.DesignPress --设计压力Mpa(g)
|
||||||
|
, pipe.TestMedium --压力试验介质Id
|
||||||
|
, tm.MediumName AS TestMediumName --压力试验介质
|
||||||
|
, pipe.TestPressure --压力试验压力Mpa(g)
|
||||||
|
, pipe.PressurePipingClassId --压力管道级别Id
|
||||||
|
, ppc.PressurePipingClassCode --压力管道级别
|
||||||
|
, pipe.PipeLenth --管线长度(m)
|
||||||
|
, pipe.LeakMedium --泄露性试验介质Id
|
||||||
|
, tm2.MediumName AS LeakMediumName --泄露性试验介质
|
||||||
|
, pipe.LeakPressure --泄露性试验压力Mpa(g)
|
||||||
|
, pipe.PCMedium --吹洗要求Id
|
||||||
|
, pm.PurgeMethodCode --吹洗要求
|
||||||
|
, pipe.VacuumPressure --真空试验压力Kpa(a)
|
||||||
|
, pipe.MaterialId --材质Id
|
||||||
|
, mat.MaterialCode AS PipeMaterialCode --材质
|
||||||
|
, pipe.Remark AS PipeRemark --备注
|
||||||
|
, pipe.FlowingSection as FlowingSection --流水段
|
||||||
|
, jot.[WeldJointId] --焊口Id
|
||||||
|
, jot.[WeldJointCode] --焊口号
|
||||||
|
, jot.[Material1Id] --材质1Id
|
||||||
|
, mat1.MaterialCode AS Material1Code --材质1
|
||||||
|
, jot.[Material2Id] --材质2Id
|
||||||
|
, mat2.MaterialCode AS Material2Code --材质2
|
||||||
|
, jot.[Dia] --外径
|
||||||
|
, jot.DNDia --DN公称直径
|
||||||
|
, jot.[Size] --达因
|
||||||
|
, jot.[Thickness] --壁厚
|
||||||
|
, jot.[Specification] --规格
|
||||||
|
, jot.[WeldTypeId] --焊缝类型Id
|
||||||
|
, WeldType.WeldTypeCode --焊缝类型
|
||||||
|
, jot.[DetectionTypeId] --检测类型Id
|
||||||
|
, ndt.DetectionTypeCode --检测类型
|
||||||
|
, jot.[Components1Id] --组件1号Id
|
||||||
|
, com1.ComponentsCode AS ComponentsCode1 --组件1号
|
||||||
|
, jot.[Components2Id] --组件2号Id
|
||||||
|
, com2.ComponentsCode AS ComponentsCode2 --组件2号
|
||||||
|
, jot.DesignIsHotProess --是否热处理
|
||||||
|
, CASE jot.DesignIsHotProess WHEN 1 THEN '是' ELSE '否' END AS DesignIsHotProessStr --是否热处理
|
||||||
|
, jot.[WeldingMethodId] --焊接方法Id
|
||||||
|
, WeldingMethod.WeldingMethodCode --焊接方法
|
||||||
|
, jot.WPQId --WPS的Id
|
||||||
|
, wps.WPQCode --WPS编号
|
||||||
|
, jot.MatchableWPQ --可匹配WPQ
|
||||||
|
, jot.[GrooveTypeId] --坡口类型Id
|
||||||
|
, GrooveType.GrooveTypeCode --坡口类型
|
||||||
|
, jot.[WeldingRod] --焊条Id
|
||||||
|
, rod.ConsumablesCode AS WeldingRodCode --焊条
|
||||||
|
, jot.[WeldingWire] --焊丝Id
|
||||||
|
, wire.ConsumablesCode AS WeldingWireCode --焊丝
|
||||||
|
, jot.PreTemperature --预热温度
|
||||||
|
, jot.[JointAttribute] --焊口属性
|
||||||
|
, jot.TwoJointType --二次焊口新增类型
|
||||||
|
, pipe.PipeArea --工厂预制/现场安装
|
||||||
|
, daily.WeldingDate as WeldingDateD
|
||||||
|
, CONVERT(VARCHAR(100), daily.WeldingDate, 23) AS WeldingDate --焊接日期
|
||||||
|
, BackingWelder.WelderCode AS BackingWelderCode --打底焊工
|
||||||
|
, CoverWelder.WelderCode AS CoverWelderCode --盖面焊工
|
||||||
|
, CoverWelderTeamGroup.TeamGroupName as CoverWelderTeamGroupName ----盖面焊工班组
|
||||||
|
, BackingWelderTeamGroup.TeamGroupName as BackingWelderTeamGroupName --打底焊工班组
|
||||||
|
, (CASE (SELECT COUNT(*)
|
||||||
|
FROM [dbo].[HJGL_HotProess_TrustItem] hpti
|
||||||
|
WHERE hpti.WeldJointId = jot.WeldJointId)
|
||||||
|
WHEN 0 THEN ''
|
||||||
|
ELSE (SELECT TOP 1 ISNULL(ReportNo, '')
|
||||||
|
FROM [dbo].[HJGL_HotProess_Trust] hpt
|
||||||
|
LEFT JOIN [dbo].[HJGL_HotProess_TrustItem] hpti
|
||||||
|
ON hpti.HotProessTrustId = hpt.HotProessTrustId
|
||||||
|
WHERE hpti.WeldJointId = jot.WeldJointId) END) AS HotProessReportNo --热处理报告编号
|
||||||
|
, (CASE (SELECT TOP 1 IsCompleted
|
||||||
|
FROM [dbo].[HJGL_HotProess_TrustItem] hpti
|
||||||
|
WHERE hpti.WeldJointId = jot.WeldJointId)
|
||||||
|
WHEN 1 THEN '完成'
|
||||||
|
WHEN 0 THEN '未完成'
|
||||||
|
ELSE '未热处理' END) AS HotProessResult --热处理检测结果
|
||||||
|
, (CASE (SELECT COUNT(*)
|
||||||
|
FROM [dbo].HJGL_Hard_TrustItem hti
|
||||||
|
WHERE hti.WeldJointId = jot.WeldJointId)
|
||||||
|
WHEN 0 THEN ''
|
||||||
|
ELSE (SELECT TOP 1 ISNULL(InspectionNum, '')
|
||||||
|
FROM [dbo].HJGL_Hard_Trust ht
|
||||||
|
LEFT JOIN [dbo].HJGL_Hard_TrustItem hti ON hti.HardTrustID = ht.HardTrustID
|
||||||
|
WHERE hti.WeldJointId = jot.WeldJointId) END) AS HardReportNo --硬度报告编号
|
||||||
|
, (CASE (SELECT TOP 1 IsPass
|
||||||
|
FROM [dbo].HJGL_Hard_TrustItem hti
|
||||||
|
WHERE hti.WeldJointId = jot.WeldJointId)
|
||||||
|
WHEN 1 THEN '合格'
|
||||||
|
WHEN 0 THEN '不合格'
|
||||||
|
ELSE '待检测' END) AS HardResult --硬度检测结果
|
||||||
|
, (CASE (SELECT COUNT(*)
|
||||||
|
FROM [dbo].HJGL_Batch_BatchTrustItem bti
|
||||||
|
WHERE bti.WeldJointId = jot.WeldJointId)
|
||||||
|
WHEN 0 THEN ''
|
||||||
|
ELSE (SELECT TOP 1 TrustBatchCode
|
||||||
|
FROM [dbo].HJGL_Batch_BatchTrust bt
|
||||||
|
LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchId = bt.TrustBatchId
|
||||||
|
WHERE bti.WeldJointId = jot.WeldJointId) END) AS TrustBatchCode --委托单编号
|
||||||
|
, (CASE (SELECT COUNT(*)
|
||||||
|
FROM [dbo].HJGL_Batch_NDEItem ndei
|
||||||
|
LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchItemId = ndei.TrustBatchItemId
|
||||||
|
WHERE bti.WeldJointId = jot.WeldJointId)
|
||||||
|
WHEN 0 THEN ''
|
||||||
|
ELSE (SELECT TOP 1 ISNULL(NDECode, '')
|
||||||
|
FROM [dbo].HJGL_Batch_NDE nde
|
||||||
|
LEFT JOIN [dbo].HJGL_Batch_NDEItem ndei ON ndei.NDEID = nde.NDEID
|
||||||
|
LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti
|
||||||
|
ON bti.TrustBatchItemId = ndei.TrustBatchItemId
|
||||||
|
WHERE bti.WeldJointId = jot.WeldJointId) END) AS NDECode --检测单编号
|
||||||
|
, (CASE (SELECT TOP 1 CheckResult
|
||||||
|
FROM [dbo].HJGL_Batch_NDEItem ndei
|
||||||
|
LEFT JOIN [dbo].HJGL_Batch_BatchTrustItem bti ON bti.TrustBatchItemId = ndei.TrustBatchItemId
|
||||||
|
WHERE bti.WeldJointId = jot.WeldJointId)
|
||||||
|
WHEN '1' THEN '合格'
|
||||||
|
WHEN '2' THEN '不合格'
|
||||||
|
ELSE '' END) AS CheckResult --检测结果
|
||||||
|
, jot.PipelineId
|
||||||
|
, jot.[JointArea]
|
||||||
|
, jot.[WeldingLocationId]
|
||||||
|
, jot.[HeartNo1]
|
||||||
|
, jot.[HeartNo2]
|
||||||
|
, jot.[IsHotProess]
|
||||||
|
, jot.[WeldingDailyId]
|
||||||
|
, jot.[BackingWelderId]
|
||||||
|
, jot.[CoverWelderId]
|
||||||
|
, jot.WeldingMode
|
||||||
|
, jot.Remark
|
||||||
|
, jot.IsTwoJoint
|
||||||
|
, jot.SubmitMan
|
||||||
|
, jot.AuditMan
|
||||||
|
, jot.AuditMan2
|
||||||
|
, jot.AuditDate
|
||||||
|
, jot.AuditDate2
|
||||||
|
, jot.WeldJointPoint
|
||||||
|
, task.TaskCode
|
||||||
|
, WeldingLocation.WeldingLocationCode
|
||||||
|
, CASE WHEN jot.WeldingDailyId IS NULL THEN '否' ELSE '是' END AS IsWelding
|
||||||
|
, CASE WHEN jot.WeldingDailyId IS NULL THEN '未完成' ELSE '已完成' END AS IsWeldOK
|
||||||
|
, 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.HJGL_WeldTask task ON task.WeldJointId = jot.WeldJointId
|
||||||
|
LEFT JOIN dbo.WBS_UnitWork uw ON uw.UnitWorkId = pipe.UnitWorkId
|
||||||
|
LEFT JOIN dbo.HJGL_WeldingDaily AS daily ON daily.WeldingDailyId = jot.WeldingDailyId
|
||||||
|
LEFT JOIN dbo.Base_Unit unit ON unit.UnitId = daily.UnitId
|
||||||
|
LEFT JOIN Base_WeldType AS WeldType ON WeldType.WeldTypeId = jot.WeldTypeId
|
||||||
|
LEFT JOIN dbo.Base_DetectionRate dr ON dr.DetectionRateId = pipe.DetectionRateId
|
||||||
|
LEFT JOIN Base_TestMedium tm ON tm.TestMediumId = pipe.TestMedium
|
||||||
|
LEFT JOIN Base_TestMedium tm2 ON tm2.TestMediumId = pipe.LeakMedium
|
||||||
|
LEFT JOIN Base_PurgeMethod pm ON pm.PurgeMethodId = pipe.PCMedium
|
||||||
|
LEFT JOIN Base_PressurePipingClass ppc ON ppc.PressurePipingClassId = pipe.PressurePipingClassId
|
||||||
|
LEFT JOIN Base_Material AS mat ON mat.MaterialId = pipe.MaterialId
|
||||||
|
LEFT JOIN Base_Material AS mat1 ON mat1.MaterialId = jot.Material1Id
|
||||||
|
LEFT JOIN Base_Material AS mat2 ON mat2.MaterialId = jot.Material2Id
|
||||||
|
LEFT JOIN Base_WeldingMethod AS WeldingMethod ON WeldingMethod.WeldingMethodId = jot.WeldingMethodId
|
||||||
|
LEFT JOIN Base_WeldingLocation AS WeldingLocation
|
||||||
|
ON WeldingLocation.WeldingLocationId = jot.WeldingLocationId
|
||||||
|
LEFT JOIN Base_Consumables AS wire ON wire.ConsumablesId = jot.WeldingWire
|
||||||
|
LEFT JOIN Base_Consumables AS rod ON rod.ConsumablesId = jot.WeldingRod
|
||||||
|
LEFT JOIN Base_GrooveType AS GrooveType ON GrooveType.GrooveTypeId = jot.GrooveTypeId
|
||||||
|
LEFT JOIN Base_Components AS com1 ON com1.ComponentsId = jot.Components1Id
|
||||||
|
LEFT JOIN Base_Components AS com2 ON com2.ComponentsId = jot.Components2Id
|
||||||
|
LEFT JOIN SitePerson_Person AS BackingWelder
|
||||||
|
ON BackingWelder.PersonId = jot.BackingWelderId and BackingWelder.ProjectId = jot.ProjectId
|
||||||
|
LEFT JOIN SitePerson_Person AS CoverWelder
|
||||||
|
ON CoverWelder.PersonId = jot.CoverWelderId and CoverWelder.ProjectId = jot.ProjectId
|
||||||
|
LEFT JOIN 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
|
||||||
|
LEFT JOIN dbo.ProjectData_TeamGroup AS CoverWelderTeamGroup
|
||||||
|
on CoverWelderTeamGroup.TeamGroupId = jot.CoverWelderTeamGroupId and
|
||||||
|
CoverWelderTeamGroup.ProjectId = jot.ProjectId
|
||||||
|
LEFT JOIN dbo.ProjectData_TeamGroup AS BackingWelderTeamGroup
|
||||||
|
on BackingWelderTeamGroup.TeamGroupId = jot.BackingWelderTeamGroupId and
|
||||||
|
BackingWelderTeamGroup.ProjectId = jot.ProjectId;
|
||||||
@@ -566,7 +566,7 @@ namespace BLL
|
|||||||
{
|
{
|
||||||
|
|
||||||
var getPersons = from x in db.View_SitePerson_Person
|
var getPersons = from x in db.View_SitePerson_Person
|
||||||
where x.ProjectId == projectId && x.States == Const.ProjectPersonStates_1
|
where x.ProjectId == projectId
|
||||||
select new Model.PersonItem
|
select new Model.PersonItem
|
||||||
{
|
{
|
||||||
SitePersonId = x.SitePersonId,
|
SitePersonId = x.SitePersonId,
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ namespace BLL
|
|||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
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)
|
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.Password == Funs.EncryptionPassword(userInfo.Password) && (!x.IsPost.HasValue || x.IsPost == true));
|
||||||
&& (x.Account.Length > 1 || x.PersonId == Const.hfnbdId || x.PersonId == Const.sysglyId));
|
/*&& (x.Account.Length > 1 || x.PersonId == Const.hfnbdId || x.PersonId == Const.sysglyId))*/
|
||||||
if (getUser != null)
|
if (getUser != null)
|
||||||
{
|
{
|
||||||
Model.UserItem newItem = new Model.UserItem();
|
Model.UserItem newItem = new Model.UserItem();
|
||||||
|
|||||||
@@ -418,37 +418,35 @@ namespace BLL
|
|||||||
Model.HJGL_Batch_PointBatch batch = BLL.PointBatchService.GetPointBatchById(pointBatchId);
|
Model.HJGL_Batch_PointBatch batch = BLL.PointBatchService.GetPointBatchById(pointBatchId);
|
||||||
if (batch != null)
|
if (batch != null)
|
||||||
{
|
{
|
||||||
Model.HJGL_Batch_BatchTrust newBatchTrust = new Model.HJGL_Batch_BatchTrust();
|
|
||||||
var project = BLL.ProjectService.GetProjectByProjectId(batch.ProjectId);
|
|
||||||
var unit = BLL.UnitService.GetUnitByUnitId(batch.UnitId);
|
|
||||||
var area = BLL.UnitWorkService.getUnitWorkByUnitWorkId(batch.UnitWorkId);
|
|
||||||
var ndt = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(batch.DetectionTypeId);
|
|
||||||
var rate = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(batch.DetectionRateId);
|
|
||||||
|
|
||||||
string perfix = string.Empty;
|
|
||||||
|
|
||||||
newBatchTrust.TrustBatchCode = batch.PointBatchCode.Replace("-DK-", "-WT-");
|
|
||||||
string trustBatchId = SQLHelper.GetNewID(typeof(Model.HJGL_Batch_BatchTrust));
|
string trustBatchId = SQLHelper.GetNewID(typeof(Model.HJGL_Batch_BatchTrust));
|
||||||
newBatchTrust.TrustBatchId = trustBatchId;
|
|
||||||
|
|
||||||
newBatchTrust.TrustDate = DateTime.Now;
|
|
||||||
newBatchTrust.ProjectId = batch.ProjectId;
|
|
||||||
newBatchTrust.PointBatchId = batch.PointBatchId;
|
|
||||||
newBatchTrust.UnitId = batch.UnitId;
|
|
||||||
newBatchTrust.UnitWorkId = batch.UnitWorkId;
|
|
||||||
newBatchTrust.DetectionTypeId = batch.DetectionTypeId;
|
|
||||||
newBatchTrust.DetectionRateId = batch.DetectionRateId;
|
|
||||||
newBatchTrust.NDEUnit = nDEUnit;
|
|
||||||
newBatchTrust.PointBatchId = pointBatchId;
|
|
||||||
BLL.Batch_BatchTrustService.AddBatchTrust(newBatchTrust); // 新增委托单
|
|
||||||
|
|
||||||
// 生成委托条件对比
|
// 生成委托条件对比
|
||||||
var generateTrustItem = from x in db.View_GenerateTrustItem
|
var generateTrustItem = (from x in db.View_GenerateTrustItem
|
||||||
where x.PointBatchId == pointBatchId
|
where x.PointBatchId == pointBatchId
|
||||||
select x;
|
select x).ToList();
|
||||||
|
if (generateTrustItem.Count == 0)
|
||||||
|
{
|
||||||
|
return "当前检验批没有可生成的委托明细!";
|
||||||
|
}
|
||||||
|
|
||||||
List<string> toPointBatchList = generateTrustItem.Select(x => x.PointBatchId).Distinct().ToList();
|
List<string> toPointBatchList = generateTrustItem.Select(x => x.PointBatchId).Distinct().ToList();
|
||||||
|
|
||||||
|
Model.HJGL_Batch_BatchTrust newBatchTrust = new Model.HJGL_Batch_BatchTrust
|
||||||
|
{
|
||||||
|
TrustBatchId = trustBatchId,
|
||||||
|
TrustBatchCode = batch.PointBatchCode.Replace("-DK-", "-WT-"),
|
||||||
|
TrustDate = DateTime.Now,
|
||||||
|
ProjectId = batch.ProjectId,
|
||||||
|
PointBatchId = pointBatchId,
|
||||||
|
UnitId = batch.UnitId,
|
||||||
|
UnitWorkId = batch.UnitWorkId,
|
||||||
|
DetectionTypeId = batch.DetectionTypeId,
|
||||||
|
DetectionRateId = batch.DetectionRateId,
|
||||||
|
NDEUnit = nDEUnit,
|
||||||
|
IsAudit = true
|
||||||
|
};
|
||||||
|
db.HJGL_Batch_BatchTrust.InsertOnSubmit(newBatchTrust);
|
||||||
|
|
||||||
// 生成委托明细,并回写点口明细信息
|
// 生成委托明细,并回写点口明细信息
|
||||||
foreach (var item in generateTrustItem)
|
foreach (var item in generateTrustItem)
|
||||||
{
|
{
|
||||||
@@ -460,15 +458,15 @@ namespace BLL
|
|||||||
TrustBatchId = trustBatchId,
|
TrustBatchId = trustBatchId,
|
||||||
PointBatchItemId = item.PointBatchItemId,
|
PointBatchItemId = item.PointBatchItemId,
|
||||||
WeldJointId = item.WeldJointId,
|
WeldJointId = item.WeldJointId,
|
||||||
CreateDate = DateTime.Now
|
CreateDate = DateTime.Now,
|
||||||
|
TrustNum = 1
|
||||||
};
|
};
|
||||||
Batch_BatchTrustItemService.AddBatchTrustItem(trustItem);
|
db.HJGL_Batch_BatchTrustItem.InsertOnSubmit(trustItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
Model.HJGL_Batch_PointBatchItem pointBatchItem = db.HJGL_Batch_PointBatchItem.First(x => x.PointBatchItemId == item.PointBatchItemId);
|
Model.HJGL_Batch_PointBatchItem pointBatchItem = db.HJGL_Batch_PointBatchItem.First(x => x.PointBatchItemId == item.PointBatchItemId);
|
||||||
|
|
||||||
pointBatchItem.IsBuildTrust = true;
|
pointBatchItem.IsBuildTrust = true;
|
||||||
db.SubmitChanges();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -476,14 +474,9 @@ namespace BLL
|
|||||||
if (toPointBatchList.Count() > 0)
|
if (toPointBatchList.Count() > 0)
|
||||||
{
|
{
|
||||||
string toPointBatch = String.Join(",", toPointBatchList);
|
string toPointBatch = String.Join(",", toPointBatchList);
|
||||||
|
newBatchTrust.TopointBatch = toPointBatch;
|
||||||
var updateTrut = BLL.Batch_BatchTrustService.GetBatchTrustById(trustBatchId);
|
|
||||||
if (updateTrut != null)
|
|
||||||
{
|
|
||||||
updateTrut.TopointBatch = toPointBatch;
|
|
||||||
BLL.Batch_BatchTrustService.UpdateBatchTrust(updateTrut);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
db.SubmitChanges();
|
||||||
result = "委托成功!";
|
result = "委托成功!";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -542,29 +535,33 @@ namespace BLL
|
|||||||
|
|
||||||
string perfix = string.Empty;
|
string perfix = string.Empty;
|
||||||
perfix = unit.UnitCode + "-" + ndt.DetectionTypeCode + "-" + rate.DetectionRateValue.ToString() + "%-";
|
perfix = unit.UnitCode + "-" + ndt.DetectionTypeCode + "-" + rate.DetectionRateValue.ToString() + "%-";
|
||||||
newBatchTrust.TrustBatchCode = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.HJGL_Batch_BatchTrust", "TrustBatchCode", project.ProjectId, perfix);
|
|
||||||
|
|
||||||
string trustBatchId = SQLHelper.GetNewID(typeof(Model.HJGL_Batch_BatchTrust));
|
string trustBatchId = SQLHelper.GetNewID(typeof(Model.HJGL_Batch_BatchTrust));
|
||||||
newBatchTrust.TrustBatchId = trustBatchId;
|
|
||||||
|
|
||||||
|
// 生成委托条件对比
|
||||||
|
var generateTrustItem = (from x in db.View_GenerateTrustItem
|
||||||
|
where x.ProjectId == trust.ProjectId
|
||||||
|
&& x.UnitWorkId == trust.UnitWorkId && x.UnitId == trust.UnitId
|
||||||
|
&& x.DetectionTypeId == trust.DetectionTypeId
|
||||||
|
&& x.DetectionRateId == trust.DetectionRateId
|
||||||
|
select x).ToList();
|
||||||
|
if (generateTrustItem.Count == 0)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<string> toPointBatchList = generateTrustItem.Select(x => x.PointBatchId).Distinct().ToList();
|
||||||
|
|
||||||
|
newBatchTrust.TrustBatchCode = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.HJGL_Batch_BatchTrust", "TrustBatchCode", project.ProjectId, perfix);
|
||||||
|
newBatchTrust.TrustBatchId = trustBatchId;
|
||||||
newBatchTrust.TrustDate = DateTime.Now;
|
newBatchTrust.TrustDate = DateTime.Now;
|
||||||
newBatchTrust.ProjectId = trust.ProjectId;
|
newBatchTrust.ProjectId = trust.ProjectId;
|
||||||
newBatchTrust.UnitId = trust.UnitId;
|
newBatchTrust.UnitId = trust.UnitId;
|
||||||
newBatchTrust.UnitWorkId = trust.UnitWorkId;
|
newBatchTrust.UnitWorkId = trust.UnitWorkId;
|
||||||
newBatchTrust.DetectionTypeId = trust.DetectionTypeId;
|
newBatchTrust.DetectionTypeId = trust.DetectionTypeId;
|
||||||
newBatchTrust.NDEUnit = unitWork.NDEUnit;
|
newBatchTrust.NDEUnit = unitWork.NDEUnit;
|
||||||
|
newBatchTrust.DetectionRateId = trust.DetectionRateId;
|
||||||
BLL.Batch_BatchTrustService.AddBatchTrust(newBatchTrust); // 新增委托单
|
newBatchTrust.IsAudit = true;
|
||||||
|
db.HJGL_Batch_BatchTrust.InsertOnSubmit(newBatchTrust);
|
||||||
// 生成委托条件对比
|
|
||||||
var generateTrustItem = from x in db.View_GenerateTrustItem
|
|
||||||
where x.ProjectId == trust.ProjectId
|
|
||||||
&& x.UnitWorkId == trust.UnitWorkId && x.UnitId == trust.UnitId
|
|
||||||
&& x.DetectionTypeId == trust.DetectionTypeId
|
|
||||||
&& x.DetectionRateId == trust.DetectionRateId
|
|
||||||
select x;
|
|
||||||
|
|
||||||
List<string> toPointBatchList = generateTrustItem.Select(x => x.PointBatchId).Distinct().ToList();
|
|
||||||
|
|
||||||
// 生成委托明细,并回写点口明细信息
|
// 生成委托明细,并回写点口明细信息
|
||||||
foreach (var item in generateTrustItem)
|
foreach (var item in generateTrustItem)
|
||||||
@@ -577,15 +574,18 @@ namespace BLL
|
|||||||
TrustBatchId = trustBatchId,
|
TrustBatchId = trustBatchId,
|
||||||
PointBatchItemId = item.PointBatchItemId,
|
PointBatchItemId = item.PointBatchItemId,
|
||||||
WeldJointId = item.WeldJointId,
|
WeldJointId = item.WeldJointId,
|
||||||
CreateDate = DateTime.Now
|
CreateDate = DateTime.Now,
|
||||||
|
TrustNum = 1
|
||||||
};
|
};
|
||||||
Batch_BatchTrustItemService.AddBatchTrustItem(trustItem);
|
db.HJGL_Batch_BatchTrustItem.InsertOnSubmit(trustItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
Model.HJGL_Batch_PointBatchItem pointBatchItem = db.HJGL_Batch_PointBatchItem.FirstOrDefault(e => e.PointBatchItemId == item.PointBatchItemId);
|
Model.HJGL_Batch_PointBatchItem pointBatchItem = db.HJGL_Batch_PointBatchItem.FirstOrDefault(e => e.PointBatchItemId == item.PointBatchItemId);
|
||||||
|
|
||||||
|
if (pointBatchItem != null)
|
||||||
|
{
|
||||||
pointBatchItem.IsBuildTrust = true;
|
pointBatchItem.IsBuildTrust = true;
|
||||||
db.SubmitChanges();
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -593,14 +593,9 @@ namespace BLL
|
|||||||
if (toPointBatchList.Count() > 0)
|
if (toPointBatchList.Count() > 0)
|
||||||
{
|
{
|
||||||
string toPointBatch = String.Join(",", toPointBatchList);
|
string toPointBatch = String.Join(",", toPointBatchList);
|
||||||
|
newBatchTrust.TopointBatch = toPointBatch;
|
||||||
var updateTrut = BLL.Batch_BatchTrustService.GetBatchTrustById(trustBatchId);
|
|
||||||
if (updateTrut != null)
|
|
||||||
{
|
|
||||||
updateTrut.TopointBatch = toPointBatch;
|
|
||||||
BLL.Batch_BatchTrustService.UpdateBatchTrust(updateTrut);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
db.SubmitChanges();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -683,8 +678,8 @@ namespace BLL
|
|||||||
{
|
{
|
||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
{
|
{
|
||||||
var getDataLists = (from x in db.View_GenerateTrustItem
|
var getDataLists = (from x in db.View_Batch_BatchTrustItem
|
||||||
where x.PointBatchId == trustBatchId
|
where x.TrustBatchId == trustBatchId
|
||||||
orderby x.WeldJointCode
|
orderby x.WeldJointCode
|
||||||
select new Model.NDETrustItem
|
select new Model.NDETrustItem
|
||||||
{
|
{
|
||||||
@@ -1061,7 +1056,12 @@ namespace BLL
|
|||||||
newRepairTrust.UnitId = repairRecord.UnitId;
|
newRepairTrust.UnitId = repairRecord.UnitId;
|
||||||
newRepairTrust.UnitWorkId = repairRecord.UnitWorkId;
|
newRepairTrust.UnitWorkId = repairRecord.UnitWorkId;
|
||||||
newRepairTrust.DetectionTypeId = repairRecord.DetectionTypeId;
|
newRepairTrust.DetectionTypeId = repairRecord.DetectionTypeId;
|
||||||
var oldTrust = (from x in Funs.DB.HJGL_Batch_BatchTrust
|
var oldTrust = (from x in Funs.DB.HJGL_Batch_BatchTrust
|
||||||
|
join y in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchId equals y.TrustBatchId
|
||||||
|
join z in Funs.DB.HJGL_Batch_NDEItem on y.TrustBatchItemId equals z.TrustBatchItemId
|
||||||
|
where z.NDEItemID == repairRecord.NDEItemID
|
||||||
|
select x).FirstOrDefault();
|
||||||
|
newRepairTrust.DetectionRateId = oldTrust.DetectionRateId;
|
||||||
newRepairTrust.TrustType = "R";
|
newRepairTrust.TrustType = "R";
|
||||||
|
|
||||||
BLL.Batch_BatchTrustService.AddBatchTrust(newRepairTrust); // 新增返修委托单
|
BLL.Batch_BatchTrustService.AddBatchTrust(newRepairTrust); // 新增返修委托单
|
||||||
|
|||||||
@@ -462,8 +462,7 @@ namespace BLL
|
|||||||
weldingDaily.UnitId = weldTask?.UnitId;
|
weldingDaily.UnitId = weldTask?.UnitId;
|
||||||
weldingDaily.Tabler = Personid;
|
weldingDaily.Tabler = Personid;
|
||||||
weldingDaily.TableDate = Convert.ToDateTime(time).Date;
|
weldingDaily.TableDate = Convert.ToDateTime(time).Date;
|
||||||
db.HJGL_WeldingDaily.InsertOnSubmit(weldingDaily);
|
BLL.WeldingDailyService.AddWeldingDaily(weldingDaily);
|
||||||
db.SubmitChanges();
|
|
||||||
}
|
}
|
||||||
BLL.HJGL_PipelineComponentjointService.UpdateStateByWeldJointId(WeldJointId, (DateTime)weldingDaily.WeldingDate);//更改预制口实际时间和状态
|
BLL.HJGL_PipelineComponentjointService.UpdateStateByWeldJointId(WeldJointId, (DateTime)weldingDaily.WeldingDate);//更改预制口实际时间和状态
|
||||||
PipelineService.UpdataDateByWeldJointId(WeldJointId);//更改安装口时间和状态
|
PipelineService.UpdataDateByWeldJointId(WeldJointId);//更改安装口时间和状态
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace BLL
|
namespace BLL
|
||||||
@@ -53,6 +53,11 @@ namespace BLL
|
|||||||
{
|
{
|
||||||
throw new Exception("当前包装状态不可修改车次号");
|
throw new Exception("当前包装状态不可修改车次号");
|
||||||
}
|
}
|
||||||
|
// 检查包装是否已关联其他车次
|
||||||
|
if (!string.IsNullOrEmpty(packModel.TrainNumberId) && packModel.TrainNumberId != trainNumberId)
|
||||||
|
{
|
||||||
|
throw new Exception("该包装已在其他车次中存在,不能重复添加");
|
||||||
|
}
|
||||||
packModel.TrainNumberId = trainNumberId;
|
packModel.TrainNumberId = trainNumberId;
|
||||||
HJGLPackagingmanageService.UpdateHJGL_PackagingManage(packModel);
|
HJGLPackagingmanageService.UpdateHJGL_PackagingManage(packModel);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -837,6 +837,7 @@
|
|||||||
<Compile Include="ZHGL\RealName\OnPostService.cs" />
|
<Compile Include="ZHGL\RealName\OnPostService.cs" />
|
||||||
<Compile Include="ZHGL\RealName\RealNameMonitorService.cs" />
|
<Compile Include="ZHGL\RealName\RealNameMonitorService.cs" />
|
||||||
<Compile Include="ZHGL\RealName\RealName_ProjectService.cs" />
|
<Compile Include="ZHGL\RealName\RealName_ProjectService.cs" />
|
||||||
|
<Compile Include="ZHGL\RealName\SedinRealName.Service.cs" />
|
||||||
<Compile Include="ZHGL\RealName\SynchroSetService.cs" />
|
<Compile Include="ZHGL\RealName\SynchroSetService.cs" />
|
||||||
<Compile Include="ZHGL\Supervise\SubUnitCheckRectifyItemService.cs" />
|
<Compile Include="ZHGL\Supervise\SubUnitCheckRectifyItemService.cs" />
|
||||||
<Compile Include="ZHGL\Supervise\SubUnitCheckRectifyService.cs" />
|
<Compile Include="ZHGL\Supervise\SubUnitCheckRectifyService.cs" />
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace BLL
|
|||||||
NeedNum = g.Sum(x => x.Number) ?? 0,
|
NeedNum = g.Sum(x => x.Number) ?? 0,
|
||||||
};
|
};
|
||||||
///实际材料入库数量列表
|
///实际材料入库数量列表
|
||||||
var RealInMateriaList = from x in db.Tw_InputDetail
|
var RealInMateriaList = (from x in db.Tw_InputDetail
|
||||||
join master in db.Tw_InputMaster on x.InputMasterId equals master.Id
|
join master in db.Tw_InputMaster on x.InputMasterId equals master.Id
|
||||||
join y in db.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode
|
join y in db.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode
|
||||||
where master.ProjectId == projectid && master.WarehouseCode == WarehouseCode
|
where master.ProjectId == projectid && master.WarehouseCode == WarehouseCode
|
||||||
@@ -38,31 +38,43 @@ namespace BLL
|
|||||||
{
|
{
|
||||||
g.Key,
|
g.Key,
|
||||||
RealNum = g.Sum(x => x.ActNum) ?? 0,
|
RealNum = g.Sum(x => x.ActNum) ?? 0,
|
||||||
};
|
}).ToList();
|
||||||
//库存数量
|
//库存数量
|
||||||
var tw_MaterialStock = from x in db.Tw_MaterialStock
|
var tw_MaterialStock = (from x in db.Tw_MaterialStock
|
||||||
where x.WarehouseCode == WarehouseCode && x.ProjectId == projectid
|
where x.WarehouseCode == WarehouseCode && x.ProjectId == projectid
|
||||||
select x;
|
select x).ToList();
|
||||||
|
|
||||||
|
var needMateriaList = NeedOutMateriaList.ToList();
|
||||||
|
var materialCodeList = needMateriaList.Select(x => x.Key)
|
||||||
|
.Union(RealInMateriaList.Select(x => x.Key))
|
||||||
|
.Distinct()
|
||||||
|
.ToList();
|
||||||
|
|
||||||
var StatisticsList = (from x in NeedOutMateriaList
|
var materialInfoList = (from x in db.HJGL_MaterialCodeLib
|
||||||
join y in RealInMateriaList on x.Key equals y.Key into gg
|
where materialCodeList.Contains(x.MaterialCode)
|
||||||
from y in gg.DefaultIfEmpty()
|
select x).ToList();
|
||||||
join z in db.HJGL_MaterialCodeLib on x.Key equals z.MaterialCode into zz
|
|
||||||
from z in zz.DefaultIfEmpty()
|
var StatisticsList = (from code in materialCodeList
|
||||||
join m in tw_MaterialStock on x.Key equals m.PipeLineMatCode into mm
|
join x in needMateriaList on code equals x.Key into needGroup
|
||||||
from m in mm.DefaultIfEmpty()
|
from x in needGroup.DefaultIfEmpty()
|
||||||
|
join y in RealInMateriaList on code equals y.Key into realGroup
|
||||||
|
from y in realGroup.DefaultIfEmpty()
|
||||||
|
join z in materialInfoList on code equals z.MaterialCode into infoGroup
|
||||||
|
from z in infoGroup.DefaultIfEmpty()
|
||||||
|
join m in tw_MaterialStock on code equals m.PipeLineMatCode into stockGroup
|
||||||
|
from m in stockGroup.DefaultIfEmpty()
|
||||||
|
orderby code
|
||||||
select new Tw_ArrivalStatisticsOutPut
|
select new Tw_ArrivalStatisticsOutPut
|
||||||
{
|
{
|
||||||
MaterialCode = x.Key,
|
MaterialCode = code,
|
||||||
StockNum = m == null ? 0 : (decimal)m.StockNum,
|
StockNum = m == null ? 0 : (decimal)m.StockNum,
|
||||||
NeedNum = x.NeedNum,
|
NeedNum = x == null ? 0 : x.NeedNum,
|
||||||
RealNum = y == null ? 0 : y.RealNum,
|
RealNum = y == null ? 0 : y.RealNum,
|
||||||
MaterialName = z.MaterialName,
|
MaterialName = z == null ? null : z.MaterialName,
|
||||||
MaterialSpec = z.MaterialSpec,
|
MaterialSpec = z == null ? null : z.MaterialSpec,
|
||||||
MaterialUnit = z.MaterialUnit,
|
MaterialUnit = z == null ? null : z.MaterialUnit,
|
||||||
MaterialDef = z.MaterialDef,
|
MaterialDef = z == null ? null : z.MaterialDef,
|
||||||
MatchRate = (x.NeedNum == 0 ? 0 : Math.Round((y == null ? 0 : y.RealNum) / x.NeedNum, 4, MidpointRounding.ToEven)),
|
MatchRate = (x == null || x.NeedNum == 0 ? 0 : Math.Round((y == null ? 0 : y.RealNum) / x.NeedNum, 4, MidpointRounding.ToEven)),
|
||||||
}).ToList();
|
}).ToList();
|
||||||
foreach (var item in StatisticsList)
|
foreach (var item in StatisticsList)
|
||||||
{
|
{
|
||||||
@@ -86,7 +98,35 @@ namespace BLL
|
|||||||
WarehouseCode = warehouseCode,
|
WarehouseCode = warehouseCode,
|
||||||
ProjectId = projectId
|
ProjectId = projectId
|
||||||
};
|
};
|
||||||
var stockList = TwMaterialstockService.GetTw_MaterialStockByModle(twMaterialStockOutput).ToList();//获取库存列表
|
var stockList = TwMaterialstockService.GetTw_MaterialStockByModle(twMaterialStockOutput).ToList();//获取库存列表
|
||||||
|
|
||||||
|
// 预扣除出库申请单中状态为待审核/已审核的材料数量
|
||||||
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
var outboundMaterials = from detail in db.Tw_InOutPlanDetail
|
||||||
|
join master in db.Tw_InOutPlanMaster on detail.InOutPlanMasterId equals master.Id
|
||||||
|
where master.InOutType == (int)TwConst.InOutType.出库
|
||||||
|
&& (master.State == (int)TwConst.State.待审核 || master.State == (int)TwConst.State.已审核)
|
||||||
|
&& master.WarehouseCode == warehouseCode
|
||||||
|
&& master.ProjectId == projectId
|
||||||
|
group detail by detail.MaterialCode into g
|
||||||
|
select new
|
||||||
|
{
|
||||||
|
MaterialCode = g.Key,
|
||||||
|
TotalPlanNum = g.Sum(d => d.PlanNum) ?? 0
|
||||||
|
};
|
||||||
|
|
||||||
|
var outboundList = outboundMaterials.ToList();
|
||||||
|
foreach (var outbound in outboundList)
|
||||||
|
{
|
||||||
|
var stock = stockList.FirstOrDefault(x => x.PipeLineMatCode == outbound.MaterialCode);
|
||||||
|
if (stock != null)
|
||||||
|
{
|
||||||
|
stock.StockNum -= outbound.TotalPlanNum;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var material in requiredMaterials)
|
foreach (var material in requiredMaterials)
|
||||||
{
|
{
|
||||||
material.Id = Guid.NewGuid().ToString();
|
material.Id = Guid.NewGuid().ToString();
|
||||||
@@ -125,36 +165,13 @@ namespace BLL
|
|||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
{
|
{
|
||||||
var twPipeMatMatchOutputs = new List<Tw_PipeMatMatchOutput>();
|
var twPipeMatMatchOutputs = new List<Tw_PipeMatMatchOutput>();
|
||||||
|
List<string> pipelineIds = new List<string>();
|
||||||
|
pipelineIds.Add(pipelineId);
|
||||||
var pipelineModel = PipelineService.GetPipelineByPipelineId(pipelineId);
|
var pipelineModel = PipelineService.GetPipelineByPipelineId(pipelineId);
|
||||||
string warehouseCode = BLL.Base_WarehouseService.GetWarehouseByWarehouseId(PipelineService.GetPipelineByPipelineId(pipelineModel.PipelineId).WarehouseId).WarehouseName;
|
string warehouseCode = BLL.Base_WarehouseService.GetWarehouseByWarehouseId(PipelineService.GetPipelineByPipelineId(pipelineModel.PipelineId).WarehouseId).WarehouseName;
|
||||||
// 获取所需材料列表
|
var PipeMatMatch = GetPipeMatMatch(pipelineModel.ProjectId, pipelineIds, warehouseCode);
|
||||||
var requiredMaterials = (from x in db.HJGL_PipeLineMat
|
var pipeMatchRate = GetPipeMatch(PipeMatMatch).FirstOrDefault(x => x.PipelineId == pipelineId);
|
||||||
join y in db.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode
|
return pipeMatchRate?.MatchRate;
|
||||||
join z in db.HJGL_Pipeline on x.PipelineId equals z.PipelineId
|
|
||||||
join m in db.WBS_UnitWork on z.UnitWorkId equals m.UnitWorkId
|
|
||||||
where z.PipelineId == pipelineId && x.PrefabricatedComponents != "" //x.PrefabricatedComponents!="" 用于筛选非散件材料
|
|
||||||
select new Tw_PipeMatMatchOutput
|
|
||||||
{
|
|
||||||
Id = Guid.NewGuid().ToString(),
|
|
||||||
PipelineId = x.PipelineId,
|
|
||||||
PipelineCode = z.PipelineCode,
|
|
||||||
UnitWorkId = z.UnitWorkId,
|
|
||||||
UnitWorkName = m.UnitWorkName,
|
|
||||||
PrefabricatedComponents = x.PrefabricatedComponents,
|
|
||||||
MaterialCode = x.MaterialCode,
|
|
||||||
MaterialName = y.MaterialName,
|
|
||||||
MaterialSpec = y.MaterialSpec,
|
|
||||||
MaterialUnit = y.MaterialUnit,
|
|
||||||
MaterialDef = y.MaterialDef,
|
|
||||||
NeedNum = x.Number,
|
|
||||||
}
|
|
||||||
).ToList();
|
|
||||||
|
|
||||||
twPipeMatMatchOutputs = GetMatMatchOutput(requiredMaterials, warehouseCode, pipelineModel.ProjectId);
|
|
||||||
var result = twPipeMatMatchOutputs.Any()
|
|
||||||
? twPipeMatMatchOutputs.Average(x => x.MatchRate)
|
|
||||||
: 0;
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -130,7 +130,8 @@ namespace BLL
|
|||||||
AuditDate2 = x.AuditDate2,
|
AuditDate2 = x.AuditDate2,
|
||||||
WarehouseMan = x.WarehouseMan,
|
WarehouseMan = x.WarehouseMan,
|
||||||
WarehouseManName = x.WarehouseManName,
|
WarehouseManName = x.WarehouseManName,
|
||||||
WarehouseDate = x.WarehouseDate
|
WarehouseDate = x.WarehouseDate,
|
||||||
|
Remark=x.Remark
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5358,6 +5358,9 @@ namespace BLL
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public const string CQMS_MeetingMenuId = "30754DF1-CB18-4F53-BB66-2B2A398D7180";
|
public const string CQMS_MeetingMenuId = "30754DF1-CB18-4F53-BB66-2B2A398D7180";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 质量会议
|
||||||
|
/// </summary>
|
||||||
|
public const string EntryEducationTrainTypeId = "8920c9cc-fa92-49b2-9493-775a55da27bb";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -208,7 +208,7 @@ namespace BLL
|
|||||||
//小于500的焊口按比例及规则点口
|
//小于500的焊口按比例及规则点口
|
||||||
var batchItems500Down = from x in db.HJGL_Batch_PointBatchItem
|
var batchItems500Down = from x in db.HJGL_Batch_PointBatchItem
|
||||||
join y in db.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
|
join y in db.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
|
||||||
where y.Dia < 500 && x.PointBatchId == pointBatchId
|
where (y.Dia < 500 || y.Dia == null) && x.PointBatchId == pointBatchId
|
||||||
select x;
|
select x;
|
||||||
if (batch.DetectionRateId != null && batchItems500Down.Count() > 0)
|
if (batch.DetectionRateId != null && batchItems500Down.Count() > 0)
|
||||||
{
|
{
|
||||||
@@ -219,11 +219,11 @@ namespace BLL
|
|||||||
|
|
||||||
var weldG = from x in db.HJGL_Batch_PointBatchItem
|
var weldG = from x in db.HJGL_Batch_PointBatchItem
|
||||||
join y in db.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
|
join y in db.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
|
||||||
where y.JointAttribute == "安装口" && y.Dia < 500 && x.PointBatchId == pointBatchId
|
where y.JointAttribute == "安装口" && (y.Dia < 500 || y.Dia == null) && x.PointBatchId == pointBatchId
|
||||||
select x;
|
select x;
|
||||||
var weldA = from x in db.HJGL_Batch_PointBatchItem
|
var weldA = from x in db.HJGL_Batch_PointBatchItem
|
||||||
join y in db.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
|
join y in db.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
|
||||||
where y.JointAttribute == "预制口" && y.Dia < 500 && x.PointBatchId == pointBatchId
|
where y.JointAttribute == "预制口" && (y.Dia < 500 || y.Dia == null) && x.PointBatchId == pointBatchId
|
||||||
select x;
|
select x;
|
||||||
if (weldG.Count() > 0)
|
if (weldG.Count() > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using FastReport.DevComponents.DotNetBar;
|
using FastReport.DevComponents.DotNetBar;
|
||||||
using FineUIPro;
|
using FineUIPro;
|
||||||
using Model;
|
using Model;
|
||||||
using System;
|
using System;
|
||||||
@@ -15,7 +15,9 @@ namespace BLL
|
|||||||
public static class HJGLPackagingmanageService
|
public static class HJGLPackagingmanageService
|
||||||
{
|
{
|
||||||
#region Fields
|
#region Fields
|
||||||
|
/// <summary>
|
||||||
|
/// 包装分类映射字典
|
||||||
|
/// </summary>
|
||||||
public static Dictionary<string, int> CategoryIntMap = new Dictionary<string, int>
|
public static Dictionary<string, int> CategoryIntMap = new Dictionary<string, int>
|
||||||
{
|
{
|
||||||
{ "打捆" ,(int)CategoryInt.打捆},
|
{ "打捆" ,(int)CategoryInt.打捆},
|
||||||
@@ -141,6 +143,15 @@ namespace BLL
|
|||||||
/// <exception cref="Exception">当该预制组件已被包装时抛出异常</exception>
|
/// <exception cref="Exception">当该预制组件已被包装时抛出异常</exception>
|
||||||
public static void AddPipelineComponentToPackaging(string packagingManageId, string pipelineComponentId)
|
public static void AddPipelineComponentToPackaging(string packagingManageId, string pipelineComponentId)
|
||||||
{
|
{
|
||||||
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
bool existsInCurrentPackaging = db.HJGL_PackagingManageDetail.Any(x => x.PackagingManageId == packagingManageId && x.PipelineComponentId == pipelineComponentId);
|
||||||
|
if (existsInCurrentPackaging)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ValidatePipelineComponentsNotInOtherPackaging(pipelineComponentId);
|
||||||
|
|
||||||
var ComponentModel = BLL.HJGL_PipelineComponentService.GetPipelineComponentById(pipelineComponentId);
|
var ComponentModel = BLL.HJGL_PipelineComponentService.GetPipelineComponentById(pipelineComponentId);
|
||||||
if (ComponentModel != null)
|
if (ComponentModel != null)
|
||||||
{
|
{
|
||||||
@@ -153,7 +164,9 @@ namespace BLL
|
|||||||
CreateTime = DateTime.Now,
|
CreateTime = DateTime.Now,
|
||||||
CreateUser = null,
|
CreateUser = null,
|
||||||
};
|
};
|
||||||
HJGLPackagingmanagedetailService.Add(model);
|
db.HJGL_PackagingManageDetail.InsertOnSubmit(model);
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,6 +183,7 @@ namespace BLL
|
|||||||
db1.HJGL_PackagingManage.DeleteOnSubmit(table);
|
db1.HJGL_PackagingManage.DeleteOnSubmit(table);
|
||||||
db1.SubmitChanges();
|
db1.SubmitChanges();
|
||||||
}
|
}
|
||||||
|
HJGLPackagingmanagedetailService.DeleteByPackagingManageId(PackagingManageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -528,6 +542,20 @@ namespace BLL
|
|||||||
{
|
{
|
||||||
baseQuery = baseQuery.Where(z => z.train.Id != null && z.train.Id.Contains(filter.TrainNumberId));
|
baseQuery = baseQuery.Where(z => z.train.Id != null && z.train.Id.Contains(filter.TrainNumberId));
|
||||||
}
|
}
|
||||||
|
// 是否关联车次筛选
|
||||||
|
if (filter.HasTrainNumber.HasValue)
|
||||||
|
{
|
||||||
|
if (filter.HasTrainNumber.Value)
|
||||||
|
{
|
||||||
|
// 已关联车次:TrainNumberId 不为空
|
||||||
|
baseQuery = baseQuery.Where(z => z.x.TrainNumberId != null && z.x.TrainNumberId != "");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 未关联车次:TrainNumberId 为空
|
||||||
|
baseQuery = baseQuery.Where(z => z.x.TrainNumberId == null || z.x.TrainNumberId == "");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
baseQuery = baseQuery.OrderByDescending(z => (z.x.ReceiveDate ?? DateTime.MinValue)).ThenBy(z => z.x.PackagingCode);
|
baseQuery = baseQuery.OrderByDescending(z => (z.x.ReceiveDate ?? DateTime.MinValue)).ThenBy(z => z.x.PackagingCode);
|
||||||
@@ -545,6 +573,9 @@ namespace BLL
|
|||||||
ReceiveMan = z.train.ContactName,
|
ReceiveMan = z.train.ContactName,
|
||||||
ReceiveDate = string.Format("{0:g}", z.x.ReceiveDate),
|
ReceiveDate = string.Format("{0:g}", z.x.ReceiveDate),
|
||||||
TrainNumber = z.train.TrainNumber,
|
TrainNumber = z.train.TrainNumber,
|
||||||
|
ComponentCount = db.HJGL_PackagingManageDetail.Count(d => d.PackagingManageId == z.x.PackagingManageId),
|
||||||
|
CategoryInt = z.x.CategoryInt,
|
||||||
|
CategoryString = z.x.CategoryInt == 10 ? "打捆" : (z.x.CategoryInt == 20 ? "装箱" : (z.x.CategoryInt == 30 ? "散装" : ""))
|
||||||
}).Distinct();
|
}).Distinct();
|
||||||
|
|
||||||
totalCount = q.Count();
|
totalCount = q.Count();
|
||||||
@@ -613,6 +644,11 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 创建新的包装明细记录
|
// 创建新的包装明细记录
|
||||||
|
var addedComponentIds = allComponentIds.Except(existingComponentIds).ToList();
|
||||||
|
foreach (var item in addedComponentIds)
|
||||||
|
{
|
||||||
|
ValidatePipelineComponentsNotInOtherPackaging(item);
|
||||||
|
}
|
||||||
var newDetailList = new List<Model.HJGL_PackagingManageDetail>();
|
var newDetailList = new List<Model.HJGL_PackagingManageDetail>();
|
||||||
foreach (var item in allComponentIds)
|
foreach (var item in allComponentIds)
|
||||||
{
|
{
|
||||||
@@ -652,6 +688,28 @@ namespace BLL
|
|||||||
/// 获取包装状态下拉框选项
|
/// 获取包装状态下拉框选项
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>包装状态列表,包含状态文本和值的映射关系</returns>
|
/// <returns>包装状态列表,包含状态文本和值的映射关系</returns>
|
||||||
|
private static void ValidatePipelineComponentsNotInOtherPackaging(string pipelineComponentId)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(pipelineComponentId))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var existDetail = (from detail in Funs.DB.HJGL_PackagingManageDetail
|
||||||
|
join pack in Funs.DB.HJGL_PackagingManage on detail.PackagingManageId equals pack.PackagingManageId
|
||||||
|
where detail.PipelineComponentId == pipelineComponentId
|
||||||
|
select new
|
||||||
|
{
|
||||||
|
detail.PipelineComponentId,
|
||||||
|
PackagingCode = pack == null ? null : pack.PackagingCode
|
||||||
|
}).FirstOrDefault();
|
||||||
|
if (existDetail != null)
|
||||||
|
{
|
||||||
|
string packagingCodeText = string.IsNullOrEmpty(existDetail.PackagingCode) ? string.Empty : (",包装编号:" + existDetail.PackagingCode);
|
||||||
|
throw new Exception("组件已在其他包装中存在" + packagingCodeText + "。");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static ListItem[] GetState()
|
public static ListItem[] GetState()
|
||||||
{
|
{
|
||||||
ListItem[] list = new ListItem[3];
|
ListItem[] list = new ListItem[3];
|
||||||
|
|||||||
@@ -144,11 +144,19 @@ namespace BLL
|
|||||||
|
|
||||||
public static void DeleteById(string Id)
|
public static void DeleteById(string Id)
|
||||||
{
|
{
|
||||||
Model.HJGL_TrainNumberManage table = Funs.DB.HJGL_TrainNumberManage.FirstOrDefault(x => x.Id == Id);
|
var db = Funs.DB;
|
||||||
|
Model.HJGL_TrainNumberManage table = db.HJGL_TrainNumberManage.FirstOrDefault(x => x.Id == Id);
|
||||||
if (table != null)
|
if (table != null)
|
||||||
{
|
{
|
||||||
Funs.DB.HJGL_TrainNumberManage.DeleteOnSubmit(table);
|
var packagingList = db.HJGL_PackagingManage.Where(x => x.TrainNumberId == Id).ToList();
|
||||||
Funs.DB.SubmitChanges();
|
foreach (var item in packagingList)
|
||||||
|
{
|
||||||
|
item.TrainNumberId = null;
|
||||||
|
item.TrainNumber = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
db.HJGL_TrainNumberManage.DeleteOnSubmit(table);
|
||||||
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -197,5 +197,24 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
return icount;
|
return icount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据人员id、日期获取入场教育合格考试记录
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="testRecordId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static Model.Training_TestRecord GetOKTestRecordByPersonIdAndDate(string testManId, DateTime? date)
|
||||||
|
{
|
||||||
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
var testRecord = (from x in db.Training_TestRecord
|
||||||
|
join y in db.Training_TestPlan on x.TestPlanId equals y.TestPlanId
|
||||||
|
join z in db.Training_Plan on y.PlanId equals z.PlanId
|
||||||
|
where x.TestManId == testManId && x.TestStartTime >= date && x.TestScores >= 60
|
||||||
|
&& z.TrainTypeId == BLL.Const.EntryEducationTrainTypeId
|
||||||
|
select x).FirstOrDefault();
|
||||||
|
return testRecord;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ namespace BLL
|
|||||||
/// <param name="lawRegulationIdentify">法律法规辨识实体</param>
|
/// <param name="lawRegulationIdentify">法律法规辨识实体</param>
|
||||||
public static void UpdateLawRegulationIdentify(Model.Law_LawRegulationIdentify lawRegulationIdentify)
|
public static void UpdateLawRegulationIdentify(Model.Law_LawRegulationIdentify lawRegulationIdentify)
|
||||||
{
|
{
|
||||||
Model.SGGLDB db = Funs.DB;
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
Model.Law_LawRegulationIdentify newLawRegulationIdentify = db.Law_LawRegulationIdentify.FirstOrDefault(e => e.LawRegulationIdentifyId == lawRegulationIdentify.LawRegulationIdentifyId);
|
Model.Law_LawRegulationIdentify newLawRegulationIdentify = db.Law_LawRegulationIdentify.FirstOrDefault(e => e.LawRegulationIdentifyId == lawRegulationIdentify.LawRegulationIdentifyId);
|
||||||
if (newLawRegulationIdentify != null)
|
if (newLawRegulationIdentify != null)
|
||||||
{
|
{
|
||||||
@@ -66,6 +67,7 @@ namespace BLL
|
|||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据法律法规辨识编号删除一个法律法规辨识信息
|
/// 根据法律法规辨识编号删除一个法律法规辨识信息
|
||||||
|
|||||||
@@ -3058,7 +3058,7 @@ namespace BLL
|
|||||||
from projectType in projectTypeJoin.DefaultIfEmpty()
|
from projectType in projectTypeJoin.DefaultIfEmpty()
|
||||||
join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = "", GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin
|
join sysConst in Funs.DB.Sys_Const on new { ProjectState2 = "", GroupId = BLL.ConstValue.GroupId_ProjectState } equals new { ProjectState2 = sysConst.ConstValue, GroupId = sysConst.GroupId } into sysConstJoin
|
||||||
from sysConst in sysConstJoin.DefaultIfEmpty()
|
from sysConst in sysConstJoin.DefaultIfEmpty()
|
||||||
where project.ProjectState == "1" && project.MasterSysId != null
|
where project.ProjectState == "1" && project.MasterSysId != null && project.IsCNCECShow == true
|
||||||
select new ProjectOutput
|
select new ProjectOutput
|
||||||
{
|
{
|
||||||
ProjectId = project.ProjectId,
|
ProjectId = project.ProjectId,
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -474,17 +474,28 @@ namespace FineUIPro.Web.CLGL
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string planId = Grid1.SelectedRowID;
|
string planId = Grid1.SelectedRowID;
|
||||||
string message = TwOutputmasterService.RevokeGenOutMasterByPlanId(planId);
|
var planMaster = BLL.TwInOutplanmasterService.GetById(planId);
|
||||||
if (string.IsNullOrEmpty(message))
|
switch (planMaster.State)
|
||||||
{
|
{
|
||||||
ShowNotify("撤销出库成功!", MessageBoxIcon.Success);
|
case (int)TwConst.State.已审核:
|
||||||
|
planMaster.State = (int)TwConst.State.待审核;
|
||||||
|
planMaster.AuditMan = null;
|
||||||
|
planMaster.AuditDate = null;
|
||||||
|
TwInOutplanmasterService.Update(planMaster);
|
||||||
BindGrid();
|
BindGrid();
|
||||||
}
|
ShowNotify("撤销审核成功!", MessageBoxIcon.Success);
|
||||||
else
|
|
||||||
{
|
|
||||||
Alert.ShowInTop(message, MessageBoxIcon.Warning);
|
|
||||||
return;
|
|
||||||
|
|
||||||
|
break;
|
||||||
|
case (int)TwConst.State.已完成:
|
||||||
|
TwOutputmasterService.RevokeGenOutMasterByPlanId(planId);
|
||||||
|
BindGrid();
|
||||||
|
ShowNotify("撤销出库单成功!", MessageBoxIcon.Success);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
default:
|
||||||
|
Alert.ShowInTop("请选择有效的计划!", MessageBoxIcon.Warning);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,10 @@ namespace FineUIPro.Web.Controls
|
|||||||
{
|
{
|
||||||
ReportPath = Request.Params["ReportPath"];
|
ReportPath = Request.Params["ReportPath"];
|
||||||
WebReport1.StartReport += WebReport1_StartReport;
|
WebReport1.StartReport += WebReport1_StartReport;
|
||||||
|
if (string.IsNullOrEmpty(ReportPath) || !System.IO.File.Exists(ReportPath))
|
||||||
|
{
|
||||||
|
throw new System.IO.FileNotFoundException("打印模板不存在!", ReportPath);
|
||||||
|
}
|
||||||
if (dataTables != null && dataTables.Count > 0)
|
if (dataTables != null && dataTables.Count > 0)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < dataTables.Count; i++)
|
for (int i = 0; i < dataTables.Count; i++)
|
||||||
@@ -49,9 +53,13 @@ namespace FineUIPro.Web.Controls
|
|||||||
WebReport1.Report.Load(ReportPath);
|
WebReport1.Report.Load(ReportPath);
|
||||||
if (WebReport1.Report.Dictionary.Connections.Count > 0)
|
if (WebReport1.Report.Dictionary.Connections.Count > 0)
|
||||||
{
|
{
|
||||||
WebReport1.Report.Dictionary.Connections[0].ConnectionString = Funs.ConnString;
|
var reportConnection = WebReport1.Report.Dictionary.Connections[0];
|
||||||
|
if (reportConnection.ConnectionString != Funs.ConnString)
|
||||||
|
{
|
||||||
|
reportConnection.ConnectionString = Funs.ConnString;
|
||||||
WebReport1.Report.Save(ReportPath);
|
WebReport1.Report.Save(ReportPath);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
WebReport1.ReportFile = ReportPath;
|
WebReport1.ReportFile = ReportPath;
|
||||||
WebReport1.Prepare();
|
WebReport1.Prepare();
|
||||||
// WebReport1.ExportPdf();
|
// WebReport1.ExportPdf();
|
||||||
|
|||||||
@@ -0,0 +1,87 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Report ScriptLanguage="CSharp" ReportInfo.Created="04/19/2026 09:00:00" ReportInfo.Modified="04/19/2026 00:22:44" ReportInfo.CreatorVersion="2017.1.16.0">
|
||||||
|
<ScriptText>using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Data;
|
||||||
|
using FastReport;
|
||||||
|
using FastReport.Data;
|
||||||
|
using FastReport.Dialog;
|
||||||
|
using FastReport.Table;
|
||||||
|
using FastReport.Utils;
|
||||||
|
|
||||||
|
namespace FastReport
|
||||||
|
{
|
||||||
|
public class ReportScript
|
||||||
|
{
|
||||||
|
private void TableData_ManualBuild(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
DataSourceBase rowData = Report.GetDataSource("Table1");
|
||||||
|
rowData.Init();
|
||||||
|
while (rowData.HasMoreRows)
|
||||||
|
{
|
||||||
|
TableData.PrintRow(0);
|
||||||
|
TableData.PrintColumns();
|
||||||
|
rowData.Next();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</ScriptText>
|
||||||
|
<Dictionary>
|
||||||
|
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
|
||||||
|
<Column Name="PipelineCode" DataType="System.String"/>
|
||||||
|
<Column Name="SegmentCode" DataType="System.String"/>
|
||||||
|
<Column Name="WeldJointCode" DataType="System.String"/>
|
||||||
|
<Column Name="WeldJointMaterial" DataType="System.String"/>
|
||||||
|
<Column Name="DiaAndThickness" DataType="System.String"/>
|
||||||
|
</TableDataSource>
|
||||||
|
<Parameter Name="Code" DataType="System.String"/>
|
||||||
|
<Parameter Name="UnitWorkName" DataType="System.String"/>
|
||||||
|
</Dictionary>
|
||||||
|
<ReportPage Name="Page1" Landscape="true" PaperWidth="297" PaperHeight="210" RawPaperSize="9">
|
||||||
|
<PageHeaderBand Name="PageHeader1" Width="1047.06" Height="97.33">
|
||||||
|
<TableObject Name="TableHeader" Left="9.45" Top="9.45" Width="1028.16" Height="87.88" Border.Lines="All" Fill.Color="255, 255, 255">
|
||||||
|
<TableColumn Name="Column1" Width="204.86"/>
|
||||||
|
<TableColumn Name="Column2" Width="204.86"/>
|
||||||
|
<TableColumn Name="Column3" Width="274.66"/>
|
||||||
|
<TableColumn Name="Column4" Width="343.78"/>
|
||||||
|
<TableRow Name="Row1" Height="31.18">
|
||||||
|
<TableCell Name="Cell1" Text="任务单焊口号(安装)" HorzAlign="Center" VertAlign="Center" Font="宋体, 18pt, style=Bold" ColSpan="4"/>
|
||||||
|
<TableCell Name="Cell2"/>
|
||||||
|
<TableCell Name="Cell3"/>
|
||||||
|
<TableCell Name="Cell4"/>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow Name="Row2" Height="28.35">
|
||||||
|
<TableCell Name="Cell5" Text="装置名称:[UnitWorkName]" VertAlign="Center" Font="宋体, 12pt" ColSpan="2"/>
|
||||||
|
<TableCell Name="Cell6"/>
|
||||||
|
<TableCell Name="Cell7" Text="任务单编号:[Code]" VertAlign="Center" Font="宋体, 12pt" ColSpan="2"/>
|
||||||
|
<TableCell Name="Cell8"/>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow Name="Row3" Height="28.35">
|
||||||
|
<TableCell Name="Cell9" Border.Lines="All" Text="管线号" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
|
||||||
|
<TableCell Name="Cell10" Border.Lines="All" Text="焊口号" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
|
||||||
|
<TableCell Name="Cell11" Border.Lines="All" Text="材质" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
|
||||||
|
<TableCell Name="Cell12" Border.Lines="All" Text="规格" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
|
||||||
|
</TableRow>
|
||||||
|
</TableObject>
|
||||||
|
</PageHeaderBand>
|
||||||
|
<DataBand Name="Data1" Top="101.54" Width="1047.06" Height="28.35">
|
||||||
|
<TableObject Name="TableData" Left="9.45" Width="1028.16" Height="28.35" Border.Lines="All" ManualBuildEvent="TableData_ManualBuild">
|
||||||
|
<TableColumn Name="DataColumn1" Width="204.86"/>
|
||||||
|
<TableColumn Name="DataColumn2" Width="204.86"/>
|
||||||
|
<TableColumn Name="DataColumn3" Width="274.66"/>
|
||||||
|
<TableColumn Name="DataColumn4" Width="343.78"/>
|
||||||
|
<TableRow Name="DataRow1" Height="28.35">
|
||||||
|
<TableCell Name="DataCell1" Border.Lines="All" Text="[Table1.PipelineCode]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
|
||||||
|
<TableCell Name="DataCell2" Border.Lines="All" Text="[Table1.WeldJointCode]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
|
||||||
|
<TableCell Name="DataCell3" Border.Lines="All" Text="[Table1.WeldJointMaterial]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
|
||||||
|
<TableCell Name="DataCell4" Border.Lines="All" Text="[Table1.DiaAndThickness]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
|
||||||
|
</TableRow>
|
||||||
|
</TableObject>
|
||||||
|
</DataBand>
|
||||||
|
</ReportPage>
|
||||||
|
</Report>
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Report ScriptLanguage="CSharp" ReportInfo.Created="04/19/2026 09:00:00" ReportInfo.Modified="04/19/2026 00:22:04" ReportInfo.CreatorVersion="2017.1.16.0">
|
||||||
|
<ScriptText>using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Data;
|
||||||
|
using FastReport;
|
||||||
|
using FastReport.Data;
|
||||||
|
using FastReport.Dialog;
|
||||||
|
using FastReport.Table;
|
||||||
|
using FastReport.Utils;
|
||||||
|
|
||||||
|
namespace FastReport
|
||||||
|
{
|
||||||
|
public class ReportScript
|
||||||
|
{
|
||||||
|
private void TableData_ManualBuild(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
DataSourceBase rowData = Report.GetDataSource("Table1");
|
||||||
|
rowData.Init();
|
||||||
|
while (rowData.HasMoreRows)
|
||||||
|
{
|
||||||
|
TableData.PrintRow(0);
|
||||||
|
TableData.PrintColumns();
|
||||||
|
rowData.Next();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</ScriptText>
|
||||||
|
<Dictionary>
|
||||||
|
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
|
||||||
|
<Column Name="PipelineCode" DataType="System.String"/>
|
||||||
|
<Column Name="SegmentCode" DataType="System.String"/>
|
||||||
|
<Column Name="WeldJointCode" DataType="System.String"/>
|
||||||
|
<Column Name="WeldJointMaterial" DataType="System.String"/>
|
||||||
|
<Column Name="DiaAndThickness" DataType="System.String"/>
|
||||||
|
</TableDataSource>
|
||||||
|
<Parameter Name="Code" DataType="System.String"/>
|
||||||
|
<Parameter Name="UnitWorkName" DataType="System.String"/>
|
||||||
|
</Dictionary>
|
||||||
|
<ReportPage Name="Page1" Landscape="true" PaperWidth="297" PaperHeight="210" RawPaperSize="9">
|
||||||
|
<PageHeaderBand Name="PageHeader1" Width="1047.06" Height="97.33">
|
||||||
|
<TableObject Name="TableHeader" Left="9.45" Top="9.45" Width="1028.16" Height="87.88" Border.Lines="All" Fill.Color="255, 255, 255">
|
||||||
|
<TableColumn Name="Column1" Width="159.75"/>
|
||||||
|
<TableColumn Name="Column2" Width="159.75"/>
|
||||||
|
<TableColumn Name="Column3" Width="159.75"/>
|
||||||
|
<TableColumn Name="Column4" Width="239.62"/>
|
||||||
|
<TableColumn Name="Column5" Width="309.29"/>
|
||||||
|
<TableRow Name="Row1" Height="31.18">
|
||||||
|
<TableCell Name="Cell1" Text="任务单焊口号(预制)" HorzAlign="Center" VertAlign="Center" Font="宋体, 18pt, style=Bold" ColSpan="5"/>
|
||||||
|
<TableCell Name="Cell2"/>
|
||||||
|
<TableCell Name="Cell3"/>
|
||||||
|
<TableCell Name="Cell4"/>
|
||||||
|
<TableCell Name="Cell5"/>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow Name="Row2" Height="28.35">
|
||||||
|
<TableCell Name="Cell6" Text="装置名称:[UnitWorkName]" VertAlign="Center" Font="宋体, 12pt" ColSpan="2"/>
|
||||||
|
<TableCell Name="Cell7"/>
|
||||||
|
<TableCell Name="Cell8" Text="任务单编号:[Code]" VertAlign="Center" Font="宋体, 12pt" ColSpan="3"/>
|
||||||
|
<TableCell Name="Cell9"/>
|
||||||
|
<TableCell Name="Cell10"/>
|
||||||
|
</TableRow>
|
||||||
|
<TableRow Name="Row3" Height="28.35">
|
||||||
|
<TableCell Name="Cell11" Border.Lines="All" Text="管线号" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
|
||||||
|
<TableCell Name="Cell12" Border.Lines="All" Text="管段号" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
|
||||||
|
<TableCell Name="Cell13" Border.Lines="All" Text="焊口号" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
|
||||||
|
<TableCell Name="Cell14" Border.Lines="All" Text="材质" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
|
||||||
|
<TableCell Name="Cell15" Border.Lines="All" Text="规格" HorzAlign="Center" VertAlign="Center" Font="宋体, 13pt"/>
|
||||||
|
</TableRow>
|
||||||
|
</TableObject>
|
||||||
|
</PageHeaderBand>
|
||||||
|
<DataBand Name="Data1" Top="101.54" Width="1047.06" Height="28.35">
|
||||||
|
<TableObject Name="TableData" Left="9.45" Width="1028.16" Height="28.35" Border.Lines="All" ManualBuildEvent="TableData_ManualBuild">
|
||||||
|
<TableColumn Name="DataColumn1" Width="159.75"/>
|
||||||
|
<TableColumn Name="DataColumn2" Width="159.75"/>
|
||||||
|
<TableColumn Name="DataColumn3" Width="159.75"/>
|
||||||
|
<TableColumn Name="DataColumn4" Width="239.62"/>
|
||||||
|
<TableColumn Name="DataColumn5" Width="309.29"/>
|
||||||
|
<TableRow Name="DataRow1" Height="28.35">
|
||||||
|
<TableCell Name="DataCell1" Border.Lines="All" Text="[Table1.PipelineCode]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
|
||||||
|
<TableCell Name="DataCell2" Border.Lines="All" Text="[Table1.SegmentCode]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
|
||||||
|
<TableCell Name="DataCell3" Border.Lines="All" Text="[Table1.WeldJointCode]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
|
||||||
|
<TableCell Name="DataCell4" Border.Lines="All" Text="[Table1.WeldJointMaterial]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
|
||||||
|
<TableCell Name="DataCell5" Border.Lines="All" Text="[Table1.DiaAndThickness]" HorzAlign="Center" VertAlign="Center" Font="宋体, 11pt"/>
|
||||||
|
</TableRow>
|
||||||
|
</TableObject>
|
||||||
|
</DataBand>
|
||||||
|
</ReportPage>
|
||||||
|
</Report>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="03/11/2026 16:07:53" ReportInfo.CreatorVersion="2017.1.16.0">
|
<Report ScriptLanguage="CSharp" ReportInfo.Created="12/29/2021 10:56:08" ReportInfo.Modified="04/14/2026 16:15:36" ReportInfo.CreatorVersion="2017.1.16.0">
|
||||||
<ScriptText>using System;
|
<ScriptText>using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -99,7 +99,7 @@ namespace FastReport
|
|||||||
}
|
}
|
||||||
</ScriptText>
|
</ScriptText>
|
||||||
<Dictionary>
|
<Dictionary>
|
||||||
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRE/YXimGeniUNA/761p7jLt"/>
|
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqvJIqZbrmqGn7L0P56UFhaUHihKXxbhpqie4wmZgM2ymDKry7UxzO5md9ybQlkfKpN2rHYbp9GtH1LDQPa7z2vVu/kEnNnTKeHt9obmaC7TQDh0IvsUBSuzhGZdfAIK7YyBqykCgeZm5rvA6K5b7zHGdA+7pUpJ/9ZLpp1NuxWRFvoS/O78nkZZeky9BsAtP/"/>
|
||||||
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
|
<TableDataSource Name="Table1" ReferenceName="Table1" DataType="System.Int32" Enabled="true">
|
||||||
<Column Name="PipelineComponentId" DataType="System.String"/>
|
<Column Name="PipelineComponentId" DataType="System.String"/>
|
||||||
<Column Name="PipelineComponentCode" DataType="System.String"/>
|
<Column Name="PipelineComponentCode" DataType="System.String"/>
|
||||||
|
|||||||
@@ -17033,7 +17033,7 @@
|
|||||||
</COMReference>
|
</COMReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v15.0\WebApplications\Microsoft.WebApplication.targets" />
|
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v18.0\WebApplications\Microsoft.WebApplication.targets" />
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
<VisualStudio>
|
<VisualStudio>
|
||||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||||
|
|||||||
@@ -126,7 +126,9 @@
|
|||||||
Width="150px">
|
Width="150px">
|
||||||
</f:RenderField>--%>
|
</f:RenderField>--%>
|
||||||
|
|
||||||
|
<f:RenderField HeaderText="任务单编号" ColumnID="TaskCode" DataField="TaskCode"
|
||||||
|
SortField="TaskCode" FieldType="String" HeaderTextAlign="Center" Width="100px">
|
||||||
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="材质1" ColumnID="Material1Code" DataField="Material1Code" SortField="Material1Code" FieldType="String" HeaderTextAlign="Center"
|
<f:RenderField HeaderText="材质1" ColumnID="Material1Code" DataField="Material1Code" SortField="Material1Code" FieldType="String" HeaderTextAlign="Center"
|
||||||
TextAlign="Left" Width="90px">
|
TextAlign="Left" Width="90px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
|
|||||||
@@ -597,6 +597,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||||||
完成状态 = x.IsWeldOK,
|
完成状态 = x.IsWeldOK,
|
||||||
单位名称 = x.UnitName,
|
单位名称 = x.UnitName,
|
||||||
流水段 = x.FlowingSection,
|
流水段 = x.FlowingSection,
|
||||||
|
任务单编号 = x.TaskCode,
|
||||||
材质1 = x.Material1Code,
|
材质1 = x.Material1Code,
|
||||||
材质2 = x.Material2Code,
|
材质2 = x.Material2Code,
|
||||||
达因 = x.Size,
|
达因 = x.Size,
|
||||||
@@ -678,6 +679,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery
|
|||||||
完成状态 = x.IsWeldOK,
|
完成状态 = x.IsWeldOK,
|
||||||
单位名称 = x.UnitName,
|
单位名称 = x.UnitName,
|
||||||
流水段 = x.FlowingSection,
|
流水段 = x.FlowingSection,
|
||||||
|
任务单编号 = x.TaskCode,
|
||||||
材质1 = x.Material1Code,
|
材质1 = x.Material1Code,
|
||||||
材质2 = x.Material2Code,
|
材质2 = x.Material2Code,
|
||||||
达因 = x.Size,
|
达因 = x.Size,
|
||||||
|
|||||||
@@ -128,7 +128,7 @@
|
|||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField Width="150px" ColumnID="StackingPosition" DataField="StackingPosition"
|
<f:RenderField Width="150px" ColumnID="StackingPosition" DataField="StackingPosition"
|
||||||
FieldType="String" HeaderText="预制工作包" HeaderTextAlign="Center"
|
FieldType="String" HeaderText="预制工作包" HeaderTextAlign="Center"
|
||||||
TextAlign="Left">
|
TextAlign="Left" Hidden="true">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
</Columns>
|
</Columns>
|
||||||
<PageItems>
|
<PageItems>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using BLL;
|
using BLL;
|
||||||
using MiniExcelLibs;
|
using MiniExcelLibs;
|
||||||
using Model;
|
using Model;
|
||||||
using System;
|
using System;
|
||||||
@@ -13,7 +13,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
public partial class InstallList : PageBase
|
public partial class InstallList : PageBase
|
||||||
{
|
{
|
||||||
public int pageSize = 20;
|
public int pageSize = 20;
|
||||||
public static IQueryable<View_HJGL_InstallData> GridDataTable = null;
|
|
||||||
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -214,57 +213,24 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
private void BindGrid()
|
private void BindGrid()
|
||||||
{
|
{
|
||||||
if (tvControlItem.SelectedNode == null) return;
|
if (tvControlItem.SelectedNode == null) return;
|
||||||
var view_HJGL_InstallDatas = BindData(Grid1.PageIndex+1, Grid1.PageSize,out int totalCount);
|
var view_HJGL_InstallDatas = BindData(Grid1.PageIndex+1, Grid1.PageSize,out int totalCount, out int componentCount, out int partCount);
|
||||||
// 2.获取当前分页数据
|
// 2.获取当前分页数据
|
||||||
Grid1.RecordCount = totalCount;
|
Grid1.RecordCount = totalCount;
|
||||||
var table = view_HJGL_InstallDatas;
|
var table = view_HJGL_InstallDatas;
|
||||||
Grid1.DataSource = table;
|
Grid1.DataSource = table;
|
||||||
Grid1.DataBind();
|
Grid1.DataBind();
|
||||||
|
|
||||||
// 更新汇总信息
|
// 更新汇总信息(使用已统计的数据)
|
||||||
UpdateSummary();
|
UpdateSummary(componentCount, partCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 更新汇总信息
|
/// 更新汇总信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void UpdateSummary()
|
private void UpdateSummary(int componentCount, int partCount)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var baseQuery = from x in Funs.DB.View_HJGL_InstallData select x;
|
|
||||||
|
|
||||||
// 应用与数据绑定相同的筛选条件
|
|
||||||
if (tvControlItem.SelectedNode.CommandName.Split('|').Length == 2)
|
|
||||||
{
|
|
||||||
baseQuery = baseQuery.Where(x => x.UnitWorkId == tvControlItem.SelectedNode.NodeID);
|
|
||||||
}
|
|
||||||
else if (tvControlItem.SelectedNode.CommandName == "流水段")
|
|
||||||
{
|
|
||||||
baseQuery = baseQuery.Where(x => x.UnitWorkId == tvControlItem.SelectedNode.ParentNode.NodeID && x.FlowingSection == tvControlItem.SelectedNode.Text);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(txtPipelineCode2.Text))
|
|
||||||
{
|
|
||||||
baseQuery = baseQuery.Where(x => x.PipelineCode.Contains(txtPipelineCode2.Text.Trim()));
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(txtPipelineComponentCode.Text))
|
|
||||||
{
|
|
||||||
baseQuery = baseQuery.Where(x => x.Code.Contains(txtPipelineComponentCode.Text.Trim()));
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(drpTypeStr.SelectedValue))
|
|
||||||
{
|
|
||||||
baseQuery = baseQuery.Where(x => x.TypeStr.Contains(drpTypeStr.SelectedValue));
|
|
||||||
}
|
|
||||||
if (!string.IsNullOrEmpty(txtPipelineCode.Text))
|
|
||||||
{
|
|
||||||
baseQuery = baseQuery.Where(x => x.PipelineCode.Contains(txtPipelineCode.Text.Trim()));
|
|
||||||
}
|
|
||||||
|
|
||||||
// 计算汇总数据
|
|
||||||
var componentCount = baseQuery.Count(x => x.TypeStr == "预制组件");
|
|
||||||
var partCount = baseQuery.Count(x => x.TypeStr == "预制散件");
|
|
||||||
|
|
||||||
// 更新汇总标签
|
// 更新汇总标签
|
||||||
lblSummary1.Text = $"预制组件数量:{componentCount}";
|
lblSummary1.Text = $"预制组件数量:{componentCount}";
|
||||||
lblSummary2.Text = $"预制散件数量:{partCount}";
|
lblSummary2.Text = $"预制散件数量:{partCount}";
|
||||||
@@ -281,10 +247,42 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
/// 查询数据
|
/// 查询数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private List<View_HJGL_InstallData> BindData(int pageIndex, int pageSize, out int totalCount)
|
private List<View_HJGL_InstallData> BindData(int pageIndex, int pageSize, out int totalCount, out int componentCount, out int partCount)
|
||||||
{
|
{
|
||||||
|
var baseQuery = GetIQueryableInstallDatas();
|
||||||
|
|
||||||
var baseQuery=from x in Funs.DB.View_HJGL_InstallData
|
// 一次性统计所有需要的数据(使用 GroupBy 优化)
|
||||||
|
var stats = baseQuery
|
||||||
|
.GroupBy(x => x.TypeStr)
|
||||||
|
.Select(g => new { TypeStr = g.Key, Count = g.Count() })
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
// 从统计结果中提取数据
|
||||||
|
totalCount = stats.Sum(s => s.Count);
|
||||||
|
componentCount = stats.FirstOrDefault(s => s.TypeStr == "预制组件")?.Count ?? 0;
|
||||||
|
partCount = stats.FirstOrDefault(s => s.TypeStr == "预制散件")?.Count ?? 0;
|
||||||
|
|
||||||
|
// 分页保护
|
||||||
|
if (pageIndex <= 0) pageIndex = 1;
|
||||||
|
if (pageSize <= 0) pageSize = 10;
|
||||||
|
|
||||||
|
var query = baseQuery.Skip((pageIndex - 1) * pageSize).Take(pageSize).ToList();
|
||||||
|
|
||||||
|
// 预制组件数量显示为1,预制散件保持原始数量
|
||||||
|
foreach (var item in query)
|
||||||
|
{
|
||||||
|
if (item.TypeStr == "预制组件")
|
||||||
|
{
|
||||||
|
item.Number = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return query;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private IQueryable<View_HJGL_InstallData> GetIQueryableInstallDatas()
|
||||||
|
{
|
||||||
|
var baseQuery = from x in Funs.DB.View_HJGL_InstallData
|
||||||
select x;
|
select x;
|
||||||
if (tvControlItem.SelectedNode.CommandName.Split('|').Length == 2)
|
if (tvControlItem.SelectedNode.CommandName.Split('|').Length == 2)
|
||||||
{
|
{
|
||||||
@@ -319,15 +317,9 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
|
|
||||||
}
|
}
|
||||||
baseQuery = baseQuery.OrderBy(x => x.PipelineCode).ThenBy(x => x.Code);
|
baseQuery = baseQuery.OrderBy(x => x.PipelineCode).ThenBy(x => x.Code);
|
||||||
totalCount = baseQuery.Count();
|
|
||||||
GridDataTable = baseQuery;
|
|
||||||
// 分页保护
|
|
||||||
if (pageIndex <= 0) pageIndex = 1;
|
|
||||||
if (pageSize <= 0) pageSize = 10;
|
|
||||||
var query = baseQuery.Skip((pageIndex - 1) * pageSize).Take(pageSize).ToList();
|
|
||||||
return query;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
return baseQuery;
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 分页排序
|
#region 分页排序
|
||||||
@@ -418,16 +410,18 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void btnOut_Click(object sender, EventArgs e)
|
protected void btnOut_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (GridDataTable != null)
|
|
||||||
{
|
var baseQuery = GetIQueryableInstallDatas();
|
||||||
var q = (from x in GridDataTable
|
|
||||||
|
var q = (from x in baseQuery
|
||||||
|
where x.Code != "裕-量"
|
||||||
select new
|
select new
|
||||||
{
|
{
|
||||||
管线号 = x.PipelineCode,
|
管线号 = x.PipelineCode,
|
||||||
类型 = x.TypeStr,
|
类型 = x.TypeStr,
|
||||||
编号 = x.Code,
|
编号 = x.Code,
|
||||||
预制散件材料描述 = (x.Matdef=="" || x.Matdef==null)?"-":x.Matdef,
|
预制散件材料描述 = (x.Matdef=="" || x.Matdef==null)?"-":x.Matdef,
|
||||||
数量 = x.Number??1,
|
数量 = x.TypeStr == "预制组件" ? 1 : (x.Number ?? 1),
|
||||||
所在包装编号 = x.PackagingCode,
|
所在包装编号 = x.PackagingCode,
|
||||||
车次 = x.TrainNumber,
|
车次 = x.TrainNumber,
|
||||||
流水段 = x.FlowingSection
|
流水段 = x.FlowingSection
|
||||||
@@ -435,7 +429,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
string path = Funs.RootPath + @"File\Excel\Temp\PrePipelineInstallList.xlsx";
|
string path = Funs.RootPath + @"File\Excel\Temp\PrePipelineInstallList.xlsx";
|
||||||
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd}", DateTime.Now) + ".xlsx");
|
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd}", DateTime.Now) + ".xlsx");
|
||||||
|
|
||||||
MiniExcel.SaveAs(path, q);
|
MiniExcel.SaveAs(path, q, overwriteFile: true);
|
||||||
|
|
||||||
string fileName = $"安装清单-" + this.tvControlItem.SelectedNode.Text + "-" + string.Format("{0:yyyy-MM-dd}", DateTime.Now) + ".xlsx";
|
string fileName = $"安装清单-" + this.tvControlItem.SelectedNode.Text + "-" + string.Format("{0:yyyy-MM-dd}", DateTime.Now) + ".xlsx";
|
||||||
FileInfo info = new FileInfo(path);
|
FileInfo info = new FileInfo(path);
|
||||||
@@ -448,7 +442,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
System.Web.HttpContext.Current.Response.Flush();
|
System.Web.HttpContext.Current.Response.Flush();
|
||||||
System.Web.HttpContext.Current.Response.Close();
|
System.Web.HttpContext.Current.Response.Close();
|
||||||
File.Delete(path);
|
File.Delete(path);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -292,11 +292,14 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
|||||||
listStr.Add(new SqlParameter("@ProductionState", drpProductionState.SelectedValue.ToString()));
|
listStr.Add(new SqlParameter("@ProductionState", drpProductionState.SelectedValue.ToString()));
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.SelectedValue != Const._Null)
|
if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.SelectedValue != Const._Null)
|
||||||
{
|
{
|
||||||
strSql += " AND pipe.FlowingSection =@FlowingSection";
|
strSql += " AND pipe.FlowingSection =@FlowingSection";
|
||||||
listStr.Add(new SqlParameter("@FlowingSection", drpFlowingSection.SelectedValue.ToString()));
|
listStr.Add(new SqlParameter("@FlowingSection", drpFlowingSection.SelectedValue.ToString()));
|
||||||
}
|
}
|
||||||
|
// 过滤组件编号值为"裕-量"的行
|
||||||
|
strSql += " AND com.PipelineComponentCode != @ExcludeYuliang";
|
||||||
|
listStr.Add(new SqlParameter("@ExcludeYuliang", "裕-量"));
|
||||||
SqlParameter[] parameter = listStr.ToArray();
|
SqlParameter[] parameter = listStr.ToArray();
|
||||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||||
GridDataTable = tb;
|
GridDataTable = tb;
|
||||||
|
|||||||
@@ -123,14 +123,14 @@
|
|||||||
DataField="CompletedRate" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
|
DataField="CompletedRate" FieldType="String" HeaderTextAlign="Center" TextAlign="Left"
|
||||||
Width="120px">
|
Width="120px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="当前焊工数量" ColumnID="WelderCount"
|
<%-- <f:RenderField HeaderText="当前焊工数量" ColumnID="WelderCount"
|
||||||
DataField="WelderCount" FieldType="Int" HeaderTextAlign="Center" TextAlign="Left"
|
DataField="WelderCount" FieldType="Int" HeaderTextAlign="Center" TextAlign="Left"
|
||||||
Width="120px">
|
Width="120px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="焊工日功效" ColumnID="WarningWelderCount"
|
<f:RenderField HeaderText="焊工日功效" ColumnID="WarningWelderCount"
|
||||||
DataField="WarningWelderCount" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
|
DataField="WarningWelderCount" FieldType="Float" HeaderTextAlign="Center" TextAlign="Left"
|
||||||
Width="120px">
|
Width="120px">
|
||||||
</f:RenderField>
|
</f:RenderField>--%>
|
||||||
</Columns>
|
</Columns>
|
||||||
<PageItems>
|
<PageItems>
|
||||||
<f:ToolbarSeparator ID="ToolbarSeparator2" runat="server">
|
<f:ToolbarSeparator ID="ToolbarSeparator2" runat="server">
|
||||||
|
|||||||
@@ -574,14 +574,17 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
|
|
||||||
protected void btnDeletePipelineMatchMat_Click(object sender, EventArgs e)
|
protected void btnDeletePipelineMatchMat_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (Grid3.SelectedRowID != "")
|
if (Grid3.SelectedRowIDArray != null && Grid3.SelectedRowIDArray.Any())
|
||||||
{
|
{
|
||||||
dicSeclectPipeLine.Remove(Grid3.SelectedRowID);
|
foreach (string rowId in Grid3.SelectedRowIDArray)
|
||||||
var node = tvControlItem.FindNode(Grid3.SelectedRowID);
|
{
|
||||||
|
dicSeclectPipeLine.Remove(rowId);
|
||||||
|
var node = tvControlItem.FindNode(rowId);
|
||||||
if (node != null)
|
if (node != null)
|
||||||
{
|
{
|
||||||
node.Checked = false;
|
node.Checked = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tw_PipeMatMatchOutputs = TwArrivalStatisticsService.GetPipeMatMatch(this.CurrUser.LoginProjectId, dicSeclectPipeLine.Keys.ToList(), drpWarehouse.SelectedValue);
|
tw_PipeMatMatchOutputs = TwArrivalStatisticsService.GetPipeMatMatch(this.CurrUser.LoginProjectId, dicSeclectPipeLine.Keys.ToList(), drpWarehouse.SelectedValue);
|
||||||
|
|
||||||
|
|||||||
@@ -85,6 +85,7 @@
|
|||||||
<f:Button runat="server" ID="btnSearch" Icon="SystemSearch" ToolTip="查询" Text="查询" OnClick="btnSearch_Click">
|
<f:Button runat="server" ID="btnSearch" Icon="SystemSearch" ToolTip="查询" Text="查询" OnClick="btnSearch_Click">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||||
|
<f:Label ID="lblTotalSize" runat="server" Text="总达因数:0" CssClass="customlabel"></f:Label>
|
||||||
<f:Button ID="btnPassMaster" Text="专工审核" Icon="ArrowRefresh" runat="server" OnClick="btnPassMaster_OnClick">
|
<f:Button ID="btnPassMaster" Text="专工审核" Icon="ArrowRefresh" runat="server" OnClick="btnPassMaster_OnClick">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
<f:DatePicker ID="txtTaskDate" Label="计划焊接日期" runat="server"
|
<f:DatePicker ID="txtTaskDate" Label="计划焊接日期" runat="server"
|
||||||
@@ -115,6 +116,12 @@
|
|||||||
<f:Button ID="btnPrintJoint" Text="打印焊口贴纸" Icon="Printer" runat="server"
|
<f:Button ID="btnPrintJoint" Text="打印焊口贴纸" Icon="Printer" runat="server"
|
||||||
OnClick="btnPrintJoint_Click">
|
OnClick="btnPrintJoint_Click">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
|
<f:Button ID="btnPrintTaskJointPrefab" Text="焊口打印(预制)" Icon="Printer" runat="server"
|
||||||
|
OnClick="btnPrintTaskJointPrefab_Click">
|
||||||
|
</f:Button>
|
||||||
|
<f:Button ID="btnPrintTaskJointInstall" Text="焊口打印(安装)" Icon="Printer" runat="server"
|
||||||
|
OnClick="btnPrintTaskJointInstall_Click">
|
||||||
|
</f:Button>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
</Toolbars>
|
</Toolbars>
|
||||||
|
|||||||
@@ -279,6 +279,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
|
|
||||||
private void BindGrid(List<Model.View_HJGL_WeldingTask> weldingTask)
|
private void BindGrid(List<Model.View_HJGL_WeldingTask> weldingTask)
|
||||||
{
|
{
|
||||||
|
UpdateTotalSizeLabel(weldingTask);
|
||||||
if (!string.IsNullOrEmpty(this.txtPipelineCode.Text.Trim()))
|
if (!string.IsNullOrEmpty(this.txtPipelineCode.Text.Trim()))
|
||||||
{
|
{
|
||||||
weldingTask = weldingTask.Where(e => e.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())).OrderBy(x => x.PipeLineSortIndex).ToList();
|
weldingTask = weldingTask.Where(e => e.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())).OrderBy(x => x.PipeLineSortIndex).ToList();
|
||||||
@@ -320,6 +321,97 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
//this.btnSave.Hidden = false;
|
//this.btnSave.Hidden = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void UpdateTotalSizeLabel(List<Model.View_HJGL_WeldingTask> weldingTask)
|
||||||
|
{
|
||||||
|
decimal totalSize = 0;
|
||||||
|
if (weldingTask != null && weldingTask.Count > 0)
|
||||||
|
{
|
||||||
|
totalSize = weldingTask.Sum(x => x.Size ?? 0);
|
||||||
|
}
|
||||||
|
lblTotalSize.Text = "总达因数:" + totalSize.ToString("0.##");
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<Model.View_HJGL_WeldingTask> GetCurrentTaskList()
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(tvControlItem.SelectedNodeID) || !tvControlItem.SelectedNodeID.Contains("|"))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
DateTime? taskTime = Funs.GetNewDateTime(tvControlItem.SelectedNodeID.Split('|')[2]);
|
||||||
|
if (taskTime == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return BLL.WeldTaskService.GetWeldingTaskList(this.CurrUser.LoginProjectId,
|
||||||
|
tvControlItem.SelectedNodeID.Split('|')[0],
|
||||||
|
tvControlItem.SelectedNodeID.Split('|')[1],
|
||||||
|
Convert.ToDateTime(taskTime),
|
||||||
|
this.rbIsAudit.SelectedValue,
|
||||||
|
tvControlItem.SelectedNodeID.Split('|')[3]);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PrintTaskJoint(bool isInstall)
|
||||||
|
{
|
||||||
|
var taskList = GetCurrentTaskList();
|
||||||
|
if (taskList == null || !taskList.Any())
|
||||||
|
{
|
||||||
|
ShowNotify("请选择任务单", MessageBoxIcon.Question);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
BLL.FastReportService.ResetData();
|
||||||
|
var pipelineIds = taskList.Select(x => x.PipelineId).Distinct().ToList();
|
||||||
|
var pipelines = Funs.DB.HJGL_Pipeline.Where(x => pipelineIds.Contains(x.PipelineId)).ToList();
|
||||||
|
var result = taskList.OrderBy(x => x.PipeLineSortIndex).ThenBy(x => x.WeldJointCode).Select(x =>
|
||||||
|
{
|
||||||
|
var pipeline = pipelines.FirstOrDefault(y => y.PipelineId == x.PipelineId);
|
||||||
|
return new
|
||||||
|
{
|
||||||
|
PipelineCode = x.PipelineCode,
|
||||||
|
SegmentCode = isInstall ? string.Empty : (pipeline?.FlowingSection ?? x.PipelineCode),
|
||||||
|
WeldJointCode = !string.IsNullOrEmpty(x.PipelineCode) ? x.WeldJointCode.Replace(x.PipelineCode + "/", "") : x.WeldJointCode,
|
||||||
|
WeldJointMaterial = x.MaterialCode,
|
||||||
|
DiaAndThickness = x.Specification
|
||||||
|
};
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
|
var tb = LINQToDataTable(result);
|
||||||
|
if (tb == null || tb.Rows.Count == 0)
|
||||||
|
{
|
||||||
|
ShowNotify("当前任务单无焊口数据", MessageBoxIcon.Question);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
tb.TableName = "Table1";
|
||||||
|
BLL.FastReportService.AddFastreportTable(tb);
|
||||||
|
var firstTask = Funs.DB.HJGL_WeldTask.FirstOrDefault(x => x.WeldTaskId == taskList[0].WeldTaskId);
|
||||||
|
BLL.FastReportService.AddFastreportParameter(new Dictionary<string, string>
|
||||||
|
{
|
||||||
|
{ "Code", firstTask?.TaskCode ?? string.Empty },
|
||||||
|
{ "UnitWorkName", UnitWorkService.getUnitWorkByUnitWorkId(taskList[0].UnitWorkId)?.UnitWorkName ?? string.Empty }
|
||||||
|
});
|
||||||
|
string rootPath = Server.MapPath("~/");
|
||||||
|
string initTemplatePath = isInstall ? "File\\Fastreport\\任务单焊口号_安装.frx" : "File\\Fastreport\\任务单焊口号_预制.frx";
|
||||||
|
|
||||||
|
if (File.Exists(rootPath + initTemplatePath))
|
||||||
|
{
|
||||||
|
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetJointSpecText(decimal? dia, decimal? thickness)
|
||||||
|
{
|
||||||
|
string diaText = dia.HasValue ? dia.Value.ToString("0.##") : string.Empty;
|
||||||
|
string thicknessText = thickness.HasValue ? thickness.Value.ToString("0.##") : string.Empty;
|
||||||
|
if (string.IsNullOrEmpty(diaText) && string.IsNullOrEmpty(thicknessText))
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
return diaText + "*" + thicknessText;
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 分页排序
|
#region 分页排序
|
||||||
@@ -1375,6 +1467,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void btnPrintTaskJointPrefab_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
PrintTaskJoint(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void btnPrintTaskJointInstall_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
PrintTaskJoint(true);
|
||||||
|
}
|
||||||
|
|
||||||
protected void btnPrintTask_Click(object sender, EventArgs e)
|
protected void btnPrintTask_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
|
||||||
@@ -1397,13 +1499,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
where x.ProjectId == this.CurrUser.LoginProjectId &&
|
where x.ProjectId == this.CurrUser.LoginProjectId &&
|
||||||
x.UnitWorkId == tvControlItem.SelectedNodeID.Split('|')[0] &&
|
x.UnitWorkId == tvControlItem.SelectedNodeID.Split('|')[0] &&
|
||||||
x.UnitId == tvControlItem.SelectedNodeID.Split('|')[1]
|
x.UnitId == tvControlItem.SelectedNodeID.Split('|')[1]
|
||||||
&& x.TaskDate.Value.Date == time.Date && x.Tabler != null
|
&& x.TaskDate.Value.Date == time.Date && x.SerialNumber == tvControlItem.SelectedNodeID.Split('|')[3] && x.Tabler != null
|
||||||
select x).FirstOrDefault();
|
select x).FirstOrDefault();
|
||||||
var weldTask = (from x in Funs.DB.HJGL_WeldTask
|
var weldTask = (from x in Funs.DB.HJGL_WeldTask
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId &&
|
where x.ProjectId == this.CurrUser.LoginProjectId &&
|
||||||
x.UnitWorkId == tvControlItem.SelectedNodeID.Split('|')[0] &&
|
x.UnitWorkId == tvControlItem.SelectedNodeID.Split('|')[0] &&
|
||||||
x.UnitId == tvControlItem.SelectedNodeID.Split('|')[1]
|
x.UnitId == tvControlItem.SelectedNodeID.Split('|')[1]
|
||||||
&& x.TaskDate.Value.Date == time.Date && x.AuditMan != null &&
|
&& x.TaskDate.Value.Date == time.Date && x.SerialNumber == tvControlItem.SelectedNodeID.Split('|')[3] && x.AuditMan != null &&
|
||||||
x.Tabler != null
|
x.Tabler != null
|
||||||
select x).FirstOrDefault();
|
select x).FirstOrDefault();
|
||||||
Model.Tw_PrintMaster printMaster = new Model.Tw_PrintMaster
|
Model.Tw_PrintMaster printMaster = new Model.Tw_PrintMaster
|
||||||
@@ -1420,10 +1522,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
}
|
}
|
||||||
|
|
||||||
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
||||||
keyValuePairs.Add("Code", UnitWorkService.getUnitWorkByUnitWorkId(tvControlItem.SelectedNodeID.Split('|')[0]).UnitWorkCode + string.Format("{0:yyyyMMdd}", taskTime.Value));
|
keyValuePairs.Add("Code", weldTask?.TaskCode ?? weldTask_CreateName?.TaskCode ?? string.Empty);
|
||||||
keyValuePairs.Add("TaskDate", string.Format("{0:yyyy-MM-dd}", taskTime.Value));
|
keyValuePairs.Add("TaskDate", string.Format("{0:yyyy-MM-dd}", taskTime.Value));
|
||||||
keyValuePairs.Add("UnitName", UnitService.GetUnitNameByUnitId(tvControlItem.SelectedNodeID.Split('|')[1]));
|
keyValuePairs.Add("UnitName", UnitService.GetUnitNameByUnitId(tvControlItem.SelectedNodeID.Split('|')[1]));
|
||||||
keyValuePairs.Add("UnitWorkName]", UnitWorkService.getUnitWorkByUnitWorkId(tvControlItem.SelectedNodeID.Split('|')[0]).UnitWorkName);
|
keyValuePairs.Add("UnitWorkName", UnitWorkService.getUnitWorkByUnitWorkId(tvControlItem.SelectedNodeID.Split('|')[0]).UnitWorkName);
|
||||||
// 创建一个新的DataTable
|
// 创建一个新的DataTable
|
||||||
DataTable dataTable = new DataTable();
|
DataTable dataTable = new DataTable();
|
||||||
dataTable.TableName = "Data";
|
dataTable.TableName = "Data";
|
||||||
|
|||||||
@@ -212,6 +212,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnSearch;
|
protected global::FineUIPro.Button btnSearch;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// lblTotalSize 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Label lblTotalSize;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnPassMaster 控件。
|
/// btnPassMaster 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -302,6 +311,24 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnPrintJoint;
|
protected global::FineUIPro.Button btnPrintJoint;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnPrintTaskJointPrefab 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnPrintTaskJointPrefab;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnPrintTaskJointInstall 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnPrintTaskJointInstall;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// drpJointAttribute 控件。
|
/// drpJointAttribute 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -155,6 +155,8 @@
|
|||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField Hidden="true" Width="1px" HeaderText="培训次数" ColumnID="TrainCount1" DataField="TrainCount1">
|
<f:RenderField Hidden="true" Width="1px" HeaderText="培训次数" ColumnID="TrainCount1" DataField="TrainCount1">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
|
<f:RenderField Hidden="true" Width="1px" HeaderText="培训次数" ColumnID="TrainCount2" DataField="TrainCount2">
|
||||||
|
</f:RenderField>
|
||||||
</Columns>
|
</Columns>
|
||||||
<Listeners>
|
<Listeners>
|
||||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
|
|||||||
}
|
}
|
||||||
|
|
||||||
string strSql = @"SELECT ProjectId,SitePersonId,PersonId,PersonName,IdentityCard,CardNo,PersonName
|
string strSql = @"SELECT ProjectId,SitePersonId,PersonId,PersonName,IdentityCard,CardNo,PersonName
|
||||||
,WorkPostId,WorkPostName,UnitId,UnitName,TeamGroupId,TeamGroupName,InTime,RealNameAddTime,States, TrainCount,TrainCount1,YunMouState
|
,WorkPostId,WorkPostName,UnitId,UnitName,TeamGroupId,TeamGroupName,InTime,RealNameAddTime,States, TrainCount,TrainCount1,TrainCount2,YunMouState
|
||||||
FROM View_SitePerson_Person
|
FROM View_SitePerson_Person
|
||||||
Where ProjectId=@ProjectId ";
|
Where ProjectId=@ProjectId ";
|
||||||
List<SqlParameter> listStr = new List<SqlParameter>
|
List<SqlParameter> listStr = new List<SqlParameter>
|
||||||
@@ -244,7 +244,8 @@ Where ProjectId=@ProjectId ";
|
|||||||
}
|
}
|
||||||
if (this.ckTrain.Checked)
|
if (this.ckTrain.Checked)
|
||||||
{
|
{
|
||||||
strSql += " AND (TrainCount =0 AND TrainCount1 =0)";
|
//strSql += " AND (TrainCount =0 AND TrainCount1 =0 AND TrainCount2=0)";
|
||||||
|
strSql += " AND TrainCount2=0";
|
||||||
}
|
}
|
||||||
if (this.ckIsUsed.Checked)
|
if (this.ckIsUsed.Checked)
|
||||||
{
|
{
|
||||||
@@ -272,8 +273,9 @@ Where ProjectId=@ProjectId ";
|
|||||||
// string personId = Grid1.Rows[i].DataKeys[0].ToString();
|
// string personId = Grid1.Rows[i].DataKeys[0].ToString();
|
||||||
var tCount = Grid1.Rows[i].Values[8].ToString();
|
var tCount = Grid1.Rows[i].Values[8].ToString();
|
||||||
var tCount1 = Grid1.Rows[i].Values[9].ToString();
|
var tCount1 = Grid1.Rows[i].Values[9].ToString();
|
||||||
|
var tCount2 = Grid1.Rows[i].Values[10].ToString();
|
||||||
if (tCount == "0" && tCount1 == "0") ////未参加过培训的人员
|
//if (tCount == "0" && tCount1 == "0" && tCount2 == "0") ////未参加过培训的人员
|
||||||
|
if (tCount2 == "0") ////未参加过培训的人员
|
||||||
{
|
{
|
||||||
Grid1.Rows[i].RowCssClass = "Red";
|
Grid1.Rows[i].RowCssClass = "Red";
|
||||||
}
|
}
|
||||||
@@ -731,7 +733,7 @@ Where ProjectId=@ProjectId ";
|
|||||||
var getSitePerson = SitePerson_PersonService.GetSitePersonById(Grid1.SelectedRowID);
|
var getSitePerson = SitePerson_PersonService.GetSitePersonById(Grid1.SelectedRowID);
|
||||||
if (getSitePerson != null)
|
if (getSitePerson != null)
|
||||||
{
|
{
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../Person/ProjectPersonView.aspx?SitePersonId={0}", this.SitePersonId, "查看 - ")));
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../../Person/ProjectPersonView.aspx?SitePersonId={0}", getSitePerson.SitePersonId, "查看 - ")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -180,6 +180,8 @@ namespace FineUIPro.Web.common.ProjectSet
|
|||||||
{
|
{
|
||||||
pdms.IsAuto = false;
|
pdms.IsAuto = false;
|
||||||
}
|
}
|
||||||
|
UpsertBatchSetting("5", projectId);
|
||||||
|
ShowNotify("提交成功!", MessageBoxIcon.Success);
|
||||||
}
|
}
|
||||||
private void SaveColorModelSettings(string projectId)
|
private void SaveColorModelSettings(string projectId)
|
||||||
{
|
{
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
.wrap[data-v-27b9583d]{padding-bottom:1.875rem}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
.wrap[data-v-099af148]{padding-bottom:1.875rem}
|
||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
.wrap[data-v-f24308e9]{padding-bottom:1.875rem}
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
import{h as e,s as l,a,_ as t,r as o,o as r,b as u,c as i,d as n,w as s,e as d,f as m,i as v,g as f,j as c}from"./index-BCk3NlG9.js";const p={baseURL:"https://sggl.sedin.com.cn/sgglapi/api/",validateStatus:e=>e>=200&&e<300};e.setConfig((e=>p)),e.interceptors.request.use((e=>(e.data=e.data||{},l(),e.header.token="AF17168B-87BD-4GLY-1111-F0A0A1158F9B",e)),(e=>Promise.reject(e))),e.interceptors.response.use((e=>{a();return e.data||{}}),(e=>Promise.reject(e)));const g=t({__name:"index",setup(l){const a=o({form:{}});return r((l=>{var t;console.log(l),t=null==l?void 0:l.id,e.get(`PipeJoint/getWeldJointByWeldJointId?WeldJointId=${t}`).then((e=>{console.log(e),a.form=e.data,a.form.CoverWelderName&&(a.form.welderName=a.form.CoverWelderName),a.form.BackingWelderName&&(a.form.welderName+="/"+a.form.BackingWelderName)}))})),(e,l)=>{const t=u(i("up-cell"),d),o=u(i("up-cell-group"),m),r=v;return f(),n(r,{class:"wrap"},{default:s((()=>[c(o,null,{default:s((()=>[c(t,{title:"管线",value:a.form.PipelineCode},null,8,["value"]),c(t,{title:"焊口",value:a.form.WeldJointCode},null,8,["value"]),c(t,{title:"焊接日期",value:a.form.WeldingDate},null,8,["value"]),c(t,{title:"材质一",value:a.form.Material1Code},null,8,["value"]),c(t,{title:"材质二",value:a.form.Material2Code},null,8,["value"]),c(t,{title:"达因",value:a.form.Size},null,8,["value"]),c(t,{title:"外径",value:a.form.Dia},null,8,["value"]),c(t,{title:"DN公称直径",value:a.form.DNDia},null,8,["value"]),c(t,{title:"壁厚",value:a.form.Thickness},null,8,["value"]),c(t,{title:"规格",value:a.form.Specification},null,8,["value"]),c(t,{title:"焊缝类型",value:a.form.WeldTypeCode},null,8,["value"]),c(t,{title:"焊接位置",value:a.form.WeldingLocationCode},null,8,["value"]),c(t,{title:"打底焊工",value:a.form.BackingWelderName},null,8,["value"]),c(t,{title:"盖面焊工",value:a.form.CoverWelderName},null,8,["value"])])),_:1})])),_:1})}}},[["__scopeId","data-v-099af148"]]);export{g as default};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{h as e,s as l,a,_ as t,r as o,o as r,b as u,c as i,d as n,w as s,e as d,f as m,i as v,g as f,j as c}from"./index-Bvn6qVoR.js";const p={baseURL:"https://sggl.sedin.com.cn/sgglapi/api/",validateStatus:e=>e>=200&&e<300};e.setConfig((e=>p)),e.interceptors.request.use((e=>(e.data=e.data||{},l(),e.header.token="AF17168B-87BD-4GLY-1111-F0A0A1158F9B",e)),(e=>Promise.reject(e))),e.interceptors.response.use((e=>{a();return e.data||{}}),(e=>Promise.reject(e)));const g=t({__name:"index",setup(l){const a=o({form:{}});return r((l=>{var t;console.log(l),t=null==l?void 0:l.id,e.get(`PipeJoint/getWeldJointByWeldJointId?WeldJointId=${t}`).then((e=>{console.log(e),a.form=e.data,a.form.CoverWelderName&&(a.form.welderName=a.form.CoverWelderName),a.form.BackingWelderName&&(a.form.welderName+="/"+a.form.BackingWelderName)}))})),(e,l)=>{const t=u(i("up-cell"),d),o=u(i("up-cell-group"),m),r=v;return f(),n(r,{class:"wrap"},{default:s((()=>[c(o,null,{default:s((()=>[c(t,{title:"管线",value:a.form.PipelineCode},null,8,["value"]),c(t,{title:"焊口",value:a.form.WeldJointCode},null,8,["value"]),c(t,{title:"材质一",value:a.form.Material1Code},null,8,["value"]),c(t,{title:"材质二",value:a.form.Material2Code},null,8,["value"]),c(t,{title:"达因",value:a.form.Size},null,8,["value"]),c(t,{title:"外径",value:a.form.Dia},null,8,["value"]),c(t,{title:"DN公称直径",value:a.form.DNDia},null,8,["value"]),c(t,{title:"壁厚",value:a.form.Thickness},null,8,["value"]),c(t,{title:"规格",value:a.form.Specification},null,8,["value"]),c(t,{title:"焊缝类型",value:a.form.WeldTypeCode},null,8,["value"]),c(t,{title:"焊接位置",value:a.form.WeldingLocationCode},null,8,["value"]),c(t,{title:"打底焊工",value:a.form.BackingWelderName},null,8,["value"]),c(t,{title:"盖面焊工",value:a.form.CoverWelderName},null,8,["value"])])),_:1})])),_:1})}}},[["__scopeId","data-v-27b9583d"]]);export{g as default};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
import{h as e,s as l,a,_ as t,r as o,o as u,b as r,c as i,d as n,w as s,e as d,f as m,i as v,g as f,j as c}from"./index-RspKKAD8.js";const p={baseURL:"https://sggl.sedin.com.cn/sgglapi/api/",validateStatus:e=>e>=200&&e<300};e.setConfig((e=>p)),e.interceptors.request.use((e=>(e.data=e.data||{},l(),e.header.token="AF17168B-87BD-4GLY-1111-F0A0A1158F9B",e)),(e=>Promise.reject(e))),e.interceptors.response.use((e=>{a();return e.data||{}}),(e=>Promise.reject(e)));const g=t({__name:"index",setup(l){const a=o({form:{}});return u((l=>{var t;console.log(l),t=null==l?void 0:l.id,e.get(`PipeJoint/getWeldJointByWeldJointId?WeldJointId=${t}`).then((e=>{console.log(e),a.form=e.data,a.form.CoverWelderName&&(a.form.welderName=a.form.CoverWelderName),a.form.BackingWelderName&&(a.form.welderName+="/"+a.form.BackingWelderName)}))})),(e,l)=>{const t=r(i("up-cell"),d),o=r(i("up-cell-group"),m),u=v;return f(),n(u,{class:"wrap"},{default:s((()=>[c(o,null,{default:s((()=>[c(t,{title:"管线",value:a.form.PipelineCode},null,8,["value"]),c(t,{title:"焊口",value:a.form.WeldJointCode},null,8,["value"]),c(t,{title:"焊接日期",value:a.form.WeldingDate},null,8,["value"]),c(t,{title:"焊工",value:a.form.welderName},null,8,["value"]),c(t,{title:"材质一",value:a.form.Material1Code},null,8,["value"]),c(t,{title:"材质二",value:a.form.Material2Code},null,8,["value"]),c(t,{title:"达因",value:a.form.Size},null,8,["value"]),c(t,{title:"外径",value:a.form.Dia},null,8,["value"]),c(t,{title:"DN公称直径",value:a.form.DNDia},null,8,["value"]),c(t,{title:"壁厚",value:a.form.Thickness},null,8,["value"]),c(t,{title:"规格",value:a.form.Specification},null,8,["value"]),c(t,{title:"焊接方法",value:a.form.WeldingMethodCode},null,8,["value"]),c(t,{title:"焊缝类型",value:a.form.WeldTypeCode},null,8,["value"]),c(t,{title:"焊接位置",value:a.form.WeldingLocationCode},null,8,["value"]),c(t,{title:"打底焊工",value:a.form.BackingWelderName},null,8,["value"]),c(t,{title:"盖面焊工",value:a.form.CoverWelderName},null,8,["value"])])),_:1})])),_:1})}}},[["__scopeId","data-v-f24308e9"]]);export{g as default};
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<link rel="stylesheet" href="/StaticPage/HJGL/assets/uni.b8bf2949.css">
|
<link rel="stylesheet" href="/StaticPage/HJGL/assets/uni.115a2c5d.css">
|
||||||
|
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<script>
|
<script>
|
||||||
@@ -14,8 +14,8 @@
|
|||||||
<title>WebH5</title>
|
<title>WebH5</title>
|
||||||
<!--preload-links-->
|
<!--preload-links-->
|
||||||
<!--app-context-->
|
<!--app-context-->
|
||||||
<script type="module" crossorigin src="/StaticPage/HJGL/assets/index-D_s_mHWI.js"></script>
|
<script type="module" crossorigin src="/StaticPage/HJGL/assets/index-BCk3NlG9.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/StaticPage/HJGL/assets/index-Dz4tKtNa.css">
|
<link rel="stylesheet" crossorigin href="/StaticPage/HJGL/assets/index-th1baVH-.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"><!--app-html--></div>
|
<div id="app"><!--app-html--></div>
|
||||||
|
|||||||
@@ -124,26 +124,39 @@
|
|||||||
<f:FormRow>
|
<f:FormRow>
|
||||||
<Items>
|
<Items>
|
||||||
<f:Panel runat="server" ID="panel2" RegionPosition="Center" RegionSplit="true" EnableCollapse="true" ShowBorder="true"
|
<f:Panel runat="server" ID="panel2" RegionPosition="Center" RegionSplit="true" EnableCollapse="true" ShowBorder="true"
|
||||||
Layout="Fit" ShowHeader="true" RegionSplitWidth="20px" BodyPadding="1px" Height="215px" Title="施工单位进度统计"
|
Layout="Fit" ShowHeader="true" RegionSplitWidth="20px" BodyPadding="1px" Height="215px" Title="进度质量"
|
||||||
TitleToolTip="施工单位进度统计" AutoScroll="true">
|
TitleToolTip="进度质量" AutoScroll="true">
|
||||||
<Items>
|
<Items>
|
||||||
<f:Grid ID="Grid3" ShowBorder="true" ShowHeader="false" Title="施工单位进度统计"
|
<f:Grid ID="Grid3" ShowBorder="true" ShowHeader="false" Title="进度质量"
|
||||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="UnitName"
|
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="UnitName"
|
||||||
EnableColumnLines="true" DataIDField="UnitName" AllowSorting="true" SortField="UnitName" SortDirection="ASC"
|
EnableColumnLines="true" DataIDField="UnitName" AllowSorting="true" SortField="UnitName" SortDirection="ASC"
|
||||||
PageSize="15">
|
PageSize="15">
|
||||||
<Columns>
|
<Columns>
|
||||||
<f:RenderField HeaderText="施工单位" ColumnID="UnitName" ExpandUnusedSpace="true"
|
<f:RenderField HeaderText="施工单位" ColumnID="UnitName" ExpandUnusedSpace="true"
|
||||||
DataField="UnitName" SortField="UnitName" FieldType="String" HeaderTextAlign="Center"
|
DataField="UnitName" SortField="UnitName" FieldType="String" HeaderTextAlign="Center"
|
||||||
TextAlign="Center" Width="300px">
|
TextAlign="Center" Width="200px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="当日完成达因数" ColumnID="TodayFinishSize"
|
<f:RenderField HeaderText="当日完成达因数" ColumnID="TodayFinishSize"
|
||||||
DataField="TodayFinishSize" SortField="TodayFinishSize" FieldType="Double" HeaderTextAlign="Center"
|
DataField="TodayFinishSize" SortField="TodayFinishSize" FieldType="Double" HeaderTextAlign="Center"
|
||||||
TextAlign="Center" Width="250px">
|
TextAlign="Center" Width="150px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField HeaderText="累计已完成达因数" ColumnID="FinishSize"
|
<f:RenderField HeaderText="累计已完成达因数" ColumnID="FinishSize"
|
||||||
DataField="FinishSize" SortField="FinishSize" FieldType="Double" HeaderTextAlign="Center"
|
DataField="FinishSize" SortField="FinishSize" FieldType="Double" HeaderTextAlign="Center"
|
||||||
TextAlign="Center" Width="250px">
|
TextAlign="Center" Width="150px">
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
|
<f:RenderField HeaderText="当前焊工数量" ColumnID="CurrentWelders"
|
||||||
|
DataField="CurrentWelders" SortField="CurrentWelders" FieldType="Double" HeaderTextAlign="Center"
|
||||||
|
TextAlign="Center" Width="150px">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField HeaderText="焊工日功效" ColumnID="WelderEfficiency"
|
||||||
|
DataField="WelderEfficiency" SortField="WelderEfficiency" FieldType="Double" HeaderTextAlign="Center"
|
||||||
|
TextAlign="Center" Width="150px">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField HeaderText="焊接一次合格率" ColumnID="WeldingFirstPassRate"
|
||||||
|
DataField="WeldingFirstPassRate" SortField="WeldingFirstPassRate" FieldType="Double" HeaderTextAlign="Center"
|
||||||
|
TextAlign="Center" Width="150px">
|
||||||
|
</f:RenderField>
|
||||||
|
|
||||||
</Columns>
|
</Columns>
|
||||||
</f:Grid>
|
</f:Grid>
|
||||||
</Items>
|
</Items>
|
||||||
|
|||||||
@@ -403,7 +403,7 @@ WHERE UnitWorkId = @UnitWorkId";
|
|||||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||||
if (this.rbType.SelectedValue == "1")
|
if (this.rbType.SelectedValue == "1")
|
||||||
{
|
{
|
||||||
// 优化:使用 CTE 和聚合替代嵌套子查询
|
// 优化:使用 CTE 和聚合替代嵌套子查询,增加焊工数量、焊工日功效、焊接一次合格率
|
||||||
strSql = @"
|
strSql = @"
|
||||||
WITH UnitWeldingDaily AS (
|
WITH UnitWeldingDaily AS (
|
||||||
-- 获取项目的所有焊接日报记录
|
-- 获取项目的所有焊接日报记录
|
||||||
@@ -413,8 +413,10 @@ WITH UnitWeldingDaily AS (
|
|||||||
WHERE wd.ProjectId = @ProjectId
|
WHERE wd.ProjectId = @ProjectId
|
||||||
),
|
),
|
||||||
TodayStats AS (
|
TodayStats AS (
|
||||||
-- 当日完成统计
|
-- 当日完成统计(含焊工数量)
|
||||||
SELECT wd.UnitId, SUM(ISNULL(jot.Size, 0)) AS TodayFinishSize
|
SELECT wd.UnitId,
|
||||||
|
SUM(ISNULL(jot.Size, 0)) AS TodayFinishSize,
|
||||||
|
COUNT(DISTINCT CASE WHEN jot.CoverWelderId IS NOT NULL AND jot.CoverWelderId != '' THEN jot.CoverWelderId END) AS CurrentWelders
|
||||||
FROM dbo.HJGL_WeldingDaily wd
|
FROM dbo.HJGL_WeldingDaily wd
|
||||||
INNER JOIN dbo.HJGL_WeldJoint jot ON jot.WeldingDailyId = wd.WeldingDailyId
|
INNER JOIN dbo.HJGL_WeldJoint jot ON jot.WeldingDailyId = wd.WeldingDailyId
|
||||||
WHERE wd.ProjectId = @ProjectId AND wd.WeldingDate = @WeldingDate AND jot.WeldingDailyId IS NOT NULL
|
WHERE wd.ProjectId = @ProjectId AND wd.WeldingDate = @WeldingDate AND jot.WeldingDailyId IS NOT NULL
|
||||||
@@ -427,19 +429,41 @@ CumulativeStats AS (
|
|||||||
INNER JOIN dbo.HJGL_WeldJoint jot ON jot.WeldingDailyId = wd.WeldingDailyId
|
INNER JOIN dbo.HJGL_WeldJoint jot ON jot.WeldingDailyId = wd.WeldingDailyId
|
||||||
WHERE wd.ProjectId = @ProjectId AND wd.WeldingDate <= @WeldingDate AND jot.WeldingDailyId IS NOT NULL
|
WHERE wd.ProjectId = @ProjectId AND wd.WeldingDate <= @WeldingDate AND jot.WeldingDailyId IS NOT NULL
|
||||||
GROUP BY wd.UnitId
|
GROUP BY wd.UnitId
|
||||||
|
),
|
||||||
|
NDERates AS (
|
||||||
|
-- 焊接一次合格率统计(按施工单位)
|
||||||
|
SELECT wd.UnitId,
|
||||||
|
CAST(CASE WHEN COUNT(*) = 0 THEN 0
|
||||||
|
ELSE 100.0 * SUM(CASE WHEN nde.CheckResult != '2' THEN 1 ELSE 0 END) / COUNT(*)
|
||||||
|
END AS DECIMAL(8, 2)) AS WeldingFirstPassRate
|
||||||
|
FROM dbo.HJGL_Batch_NDEItem nde
|
||||||
|
INNER JOIN dbo.HJGL_Batch_BatchTrustItem bt ON nde.TrustBatchItemId = bt.TrustBatchItemId
|
||||||
|
INNER JOIN dbo.HJGL_Batch_PointBatchItem pb ON bt.PointBatchItemId = pb.PointBatchItemId
|
||||||
|
INNER JOIN dbo.HJGL_Batch_NDE n ON nde.NDEID = n.NDEID
|
||||||
|
INNER JOIN dbo.HJGL_WeldJoint wj ON bt.WeldJointId = wj.WeldJointId
|
||||||
|
INNER JOIN dbo.HJGL_WeldingDaily wd ON wj.WeldingDailyId = wd.WeldingDailyId
|
||||||
|
WHERE pb.PointDate IS NOT NULL AND pb.PointState = '1' AND bt.RepairRecordId IS NULL
|
||||||
|
AND n.ProjectId = @ProjectId
|
||||||
|
GROUP BY wd.UnitId
|
||||||
)
|
)
|
||||||
SELECT uwd.UnitName,
|
SELECT uwd.UnitName,
|
||||||
CAST(ISNULL(ts.TodayFinishSize, 0) AS DECIMAL(12, 3)) AS TodayFinishSize,
|
CAST(ISNULL(ts.TodayFinishSize, 0) AS DECIMAL(12, 3)) AS TodayFinishSize,
|
||||||
CAST(ISNULL(cs.FinishSize, 0) AS DECIMAL(12, 3)) AS FinishSize
|
CAST(ISNULL(cs.FinishSize, 0) AS DECIMAL(12, 3)) AS FinishSize,
|
||||||
|
ISNULL(ts.CurrentWelders, 0) AS CurrentWelders,
|
||||||
|
CASE WHEN ISNULL(ts.CurrentWelders, 0) = 0 THEN 0
|
||||||
|
ELSE CAST(ISNULL(ts.TodayFinishSize, 0) * 1.0 / ts.CurrentWelders AS DECIMAL(12, 3))
|
||||||
|
END AS WelderEfficiency,
|
||||||
|
ISNULL(nr.WeldingFirstPassRate, 0) AS WeldingFirstPassRate
|
||||||
FROM UnitWeldingDaily uwd
|
FROM UnitWeldingDaily uwd
|
||||||
LEFT JOIN TodayStats ts ON uwd.UnitId = ts.UnitId
|
LEFT JOIN TodayStats ts ON uwd.UnitId = ts.UnitId
|
||||||
LEFT JOIN CumulativeStats cs ON uwd.UnitId = cs.UnitId";
|
LEFT JOIN CumulativeStats cs ON uwd.UnitId = cs.UnitId
|
||||||
|
LEFT JOIN NDERates nr ON uwd.UnitId = nr.UnitId";
|
||||||
listStr.Add(new SqlParameter("@ProjectId", (CurrUser != null) ? CurrUser.LoginProjectId : ""));
|
listStr.Add(new SqlParameter("@ProjectId", (CurrUser != null) ? CurrUser.LoginProjectId : ""));
|
||||||
listStr.Add(new SqlParameter("@WeldingDate", this.txtWeldingDate.Text.Trim()));
|
listStr.Add(new SqlParameter("@WeldingDate", this.txtWeldingDate.Text.Trim()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// 优化:使用 CTE 和聚合(时间段模式)
|
// 优化:使用 CTE 和聚合(时间段模式),增加焊工数量、焊工日功效、焊接一次合格率
|
||||||
strSql = @"
|
strSql = @"
|
||||||
WITH UnitWeldingDaily AS (
|
WITH UnitWeldingDaily AS (
|
||||||
SELECT DISTINCT wd.UnitId, u.UnitName
|
SELECT DISTINCT wd.UnitId, u.UnitName
|
||||||
@@ -448,8 +472,10 @@ WITH UnitWeldingDaily AS (
|
|||||||
WHERE wd.ProjectId = @ProjectId
|
WHERE wd.ProjectId = @ProjectId
|
||||||
),
|
),
|
||||||
PeriodStats AS (
|
PeriodStats AS (
|
||||||
-- 时间段完成统计
|
-- 时间段完成统计(含焊工数量)
|
||||||
SELECT wd.UnitId, SUM(ISNULL(jot.Size, 0)) AS TodayFinishSize
|
SELECT wd.UnitId,
|
||||||
|
SUM(ISNULL(jot.Size, 0)) AS TodayFinishSize,
|
||||||
|
COUNT(DISTINCT CASE WHEN jot.CoverWelderId IS NOT NULL AND jot.CoverWelderId != '' THEN jot.CoverWelderId END) AS CurrentWelders
|
||||||
FROM dbo.HJGL_WeldingDaily wd
|
FROM dbo.HJGL_WeldingDaily wd
|
||||||
INNER JOIN dbo.HJGL_WeldJoint jot ON jot.WeldingDailyId = wd.WeldingDailyId
|
INNER JOIN dbo.HJGL_WeldJoint jot ON jot.WeldingDailyId = wd.WeldingDailyId
|
||||||
WHERE wd.ProjectId = @ProjectId AND wd.WeldingDate >= @WeldingStartDate AND wd.WeldingDate <= @WeldingEndDate AND jot.WeldingDailyId IS NOT NULL
|
WHERE wd.ProjectId = @ProjectId AND wd.WeldingDate >= @WeldingStartDate AND wd.WeldingDate <= @WeldingEndDate AND jot.WeldingDailyId IS NOT NULL
|
||||||
@@ -462,13 +488,35 @@ CumulativeStats AS (
|
|||||||
INNER JOIN dbo.HJGL_WeldJoint jot ON jot.WeldingDailyId = wd.WeldingDailyId
|
INNER JOIN dbo.HJGL_WeldJoint jot ON jot.WeldingDailyId = wd.WeldingDailyId
|
||||||
WHERE wd.ProjectId = @ProjectId AND wd.WeldingDate <= @WeldingEndDate AND jot.WeldingDailyId IS NOT NULL
|
WHERE wd.ProjectId = @ProjectId AND wd.WeldingDate <= @WeldingEndDate AND jot.WeldingDailyId IS NOT NULL
|
||||||
GROUP BY wd.UnitId
|
GROUP BY wd.UnitId
|
||||||
|
),
|
||||||
|
NDERates AS (
|
||||||
|
-- 焊接一次合格率统计(按施工单位)
|
||||||
|
SELECT wd.UnitId,
|
||||||
|
CAST(CASE WHEN COUNT(*) = 0 THEN 0
|
||||||
|
ELSE 100.0 * SUM(CASE WHEN nde.CheckResult != '2' THEN 1 ELSE 0 END) / COUNT(*)
|
||||||
|
END AS DECIMAL(8, 2)) AS WeldingFirstPassRate
|
||||||
|
FROM dbo.HJGL_Batch_NDEItem nde
|
||||||
|
INNER JOIN dbo.HJGL_Batch_BatchTrustItem bt ON nde.TrustBatchItemId = bt.TrustBatchItemId
|
||||||
|
INNER JOIN dbo.HJGL_Batch_PointBatchItem pb ON bt.PointBatchItemId = pb.PointBatchItemId
|
||||||
|
INNER JOIN dbo.HJGL_Batch_NDE n ON nde.NDEID = n.NDEID
|
||||||
|
INNER JOIN dbo.HJGL_WeldJoint wj ON bt.WeldJointId = wj.WeldJointId
|
||||||
|
INNER JOIN dbo.HJGL_WeldingDaily wd ON wj.WeldingDailyId = wd.WeldingDailyId
|
||||||
|
WHERE pb.PointDate IS NOT NULL AND pb.PointState = '1' AND bt.RepairRecordId IS NULL
|
||||||
|
AND n.ProjectId = @ProjectId
|
||||||
|
GROUP BY wd.UnitId
|
||||||
)
|
)
|
||||||
SELECT uwd.UnitName,
|
SELECT uwd.UnitName,
|
||||||
CAST(ISNULL(ps.TodayFinishSize, 0) AS DECIMAL(12, 3)) AS TodayFinishSize,
|
CAST(ISNULL(ps.TodayFinishSize, 0) AS DECIMAL(12, 3)) AS TodayFinishSize,
|
||||||
CAST(ISNULL(cs.FinishSize, 0) AS DECIMAL(12, 3)) AS FinishSize
|
CAST(ISNULL(cs.FinishSize, 0) AS DECIMAL(12, 3)) AS FinishSize,
|
||||||
|
ISNULL(ps.CurrentWelders, 0) AS CurrentWelders,
|
||||||
|
CASE WHEN ISNULL(ps.CurrentWelders, 0) = 0 THEN 0
|
||||||
|
ELSE CAST(ISNULL(ps.TodayFinishSize, 0) * 1.0 / ps.CurrentWelders AS DECIMAL(12, 3))
|
||||||
|
END AS WelderEfficiency,
|
||||||
|
ISNULL(nr.WeldingFirstPassRate, 0) AS WeldingFirstPassRate
|
||||||
FROM UnitWeldingDaily uwd
|
FROM UnitWeldingDaily uwd
|
||||||
LEFT JOIN PeriodStats ps ON uwd.UnitId = ps.UnitId
|
LEFT JOIN PeriodStats ps ON uwd.UnitId = ps.UnitId
|
||||||
LEFT JOIN CumulativeStats cs ON uwd.UnitId = cs.UnitId";
|
LEFT JOIN CumulativeStats cs ON uwd.UnitId = cs.UnitId
|
||||||
|
LEFT JOIN NDERates nr ON uwd.UnitId = nr.UnitId";
|
||||||
listStr.Add(new SqlParameter("@ProjectId", (CurrUser != null) ? CurrUser.LoginProjectId : ""));
|
listStr.Add(new SqlParameter("@ProjectId", (CurrUser != null) ? CurrUser.LoginProjectId : ""));
|
||||||
listStr.Add(new SqlParameter("@WeldingStartDate", this.txtWeldingStartDate.Text.Trim()));
|
listStr.Add(new SqlParameter("@WeldingStartDate", this.txtWeldingStartDate.Text.Trim()));
|
||||||
listStr.Add(new SqlParameter("@WeldingEndDate", this.txtWeldingEndDate.Text.Trim()));
|
listStr.Add(new SqlParameter("@WeldingEndDate", this.txtWeldingEndDate.Text.Trim()));
|
||||||
@@ -646,6 +694,7 @@ LEFT JOIN CumulativeStats cs ON uwd.UnitId = cs.UnitId";
|
|||||||
this.Grid1.Columns[1].HeaderText = "当日完成达因数";
|
this.Grid1.Columns[1].HeaderText = "当日完成达因数";
|
||||||
this.Grid2.Columns[2].HeaderText = "当日完成达因数";
|
this.Grid2.Columns[2].HeaderText = "当日完成达因数";
|
||||||
this.Grid3.Columns[1].HeaderText = "当日完成达因数";
|
this.Grid3.Columns[1].HeaderText = "当日完成达因数";
|
||||||
|
this.Grid3.Columns[3].HeaderText = "当日焊工数量";
|
||||||
this.BtnAnalyse.Hidden = true;
|
this.BtnAnalyse.Hidden = true;
|
||||||
BindGrid1();
|
BindGrid1();
|
||||||
BindGrid2(this.tvControlItem.SelectedNodeID);
|
BindGrid2(this.tvControlItem.SelectedNodeID);
|
||||||
@@ -659,6 +708,7 @@ LEFT JOIN CumulativeStats cs ON uwd.UnitId = cs.UnitId";
|
|||||||
this.Grid1.Columns[1].HeaderText = "当期完成达因数";
|
this.Grid1.Columns[1].HeaderText = "当期完成达因数";
|
||||||
this.Grid2.Columns[2].HeaderText = "当期完成达因数";
|
this.Grid2.Columns[2].HeaderText = "当期完成达因数";
|
||||||
this.Grid3.Columns[1].HeaderText = "当期完成达因数";
|
this.Grid3.Columns[1].HeaderText = "当期完成达因数";
|
||||||
|
this.Grid3.Columns[3].HeaderText = "当期焊工数量";
|
||||||
this.BtnAnalyse.Hidden = false;
|
this.BtnAnalyse.Hidden = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -20,6 +20,18 @@ namespace Model
|
|||||||
public string ReceiveMan { get; set; }
|
public string ReceiveMan { get; set; }
|
||||||
public string ReceiveDate { get; set; }
|
public string ReceiveDate { get; set; }
|
||||||
public string TrainNumber { get; set; }
|
public string TrainNumber { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 包装内数量(预制组件或散件数量)
|
||||||
|
/// </summary>
|
||||||
|
public int ComponentCount { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 包装分类代码
|
||||||
|
/// </summary>
|
||||||
|
public int? CategoryInt { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 包装分类名称
|
||||||
|
/// </summary>
|
||||||
|
public string CategoryString { get; set; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ namespace Model
|
|||||||
public string ReqUnitName { get; set; }
|
public string ReqUnitName { get; set; }
|
||||||
public string UnitWorkId { get; set; }
|
public string UnitWorkId { get; set; }
|
||||||
public string WeldTaskCode { get; set; }
|
public string WeldTaskCode { get; set; }
|
||||||
public string Remark { get; set; }
|
|
||||||
|
|
||||||
public int? PipeLineSortIndex { get; set; }
|
public int? PipeLineSortIndex { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -55,5 +55,9 @@ namespace Model
|
|||||||
/// 车次id
|
/// 车次id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string TrainNumberId { get; set; }
|
public string TrainNumberId { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 是否关联车次(true:已关联, false:未关联, null:不筛选)
|
||||||
|
/// </summary>
|
||||||
|
public bool? HasTrainNumber { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -31,6 +31,10 @@ namespace Model
|
|||||||
public string TypeString { get; set; }
|
public string TypeString { get; set; }
|
||||||
public int? CategoryInt { get; set; }
|
public int? CategoryInt { get; set; }
|
||||||
public string CategoryString { get; set; }
|
public string CategoryString { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 包装内数量(预制组件或散件数量)
|
||||||
|
/// </summary>
|
||||||
|
public int ComponentCount { get; set; }
|
||||||
|
|
||||||
|
|
||||||
#endregion Properties
|
#endregion Properties
|
||||||
|
|||||||
+752
-278
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
|||||||
using BLL;
|
using BLL;
|
||||||
using Model;
|
using Model;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -229,6 +229,26 @@ namespace WebAPI.Controllers
|
|||||||
return responeData;
|
return responeData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取包装分类列表
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>包装分类字典</returns>
|
||||||
|
[HttpGet]
|
||||||
|
public Model.ResponeData GetPackagingCategories()
|
||||||
|
{
|
||||||
|
var responeData = new Model.ResponeData();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
responeData.data = HJGLPackagingmanageService.CategoryIntMap;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
responeData.code = 0;
|
||||||
|
responeData.message = ex.Message;
|
||||||
|
}
|
||||||
|
return responeData;
|
||||||
|
}
|
||||||
|
|
||||||
#endregion Methods
|
#endregion Methods
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -436,7 +436,7 @@ namespace WebAPI.Controllers
|
|||||||
/// <param name="name"></param>
|
/// <param name="name"></param>
|
||||||
/// <param name="pageIndex"></param>
|
/// <param name="pageIndex"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public Model.ResponeData getTrainingPersonListByTrainTypeId(string projectId, string unitIds, string workPostIds, string trainTypeId, string name, int pageIndex, string startDate, string endDate,string isRepeat)
|
public Model.ResponeData getTrainingPersonListByTrainTypeId(string projectId, string unitIds, string workPostIds, string trainTypeId, string name, int pageIndex, string startDate, string endDate, string isRepeat)
|
||||||
{
|
{
|
||||||
var responeData = new Model.ResponeData();
|
var responeData = new Model.ResponeData();
|
||||||
try
|
try
|
||||||
@@ -545,9 +545,22 @@ namespace WebAPI.Controllers
|
|||||||
{
|
{
|
||||||
var responeData = new Model.ResponeData();
|
var responeData = new Model.ResponeData();
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
var getSitePerson = SitePerson_PersonService.GetSitePersonById(sitePersonId);
|
||||||
|
if (getSitePerson != null)
|
||||||
|
{
|
||||||
|
var testRecord = BLL.TestRecordService.GetOKTestRecordByPersonIdAndDate(getSitePerson.PersonId, getSitePerson.InTime);
|
||||||
|
if (testRecord != null)
|
||||||
{
|
{
|
||||||
SitePerson_PersonService.SetSitePerson_PersonStates(sitePersonId, states, DateTime.Now);
|
SitePerson_PersonService.SetSitePerson_PersonStates(sitePersonId, states, DateTime.Now);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
responeData.code = 0;
|
||||||
|
responeData.message = "入场教育考试未合格,无法审核入场!";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
responeData.code = 0;
|
responeData.code = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user