diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageAudit.aspx b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageAudit.aspx index 29c294ca..4761ba65 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageAudit.aspx +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageAudit.aspx @@ -101,7 +101,7 @@ - + diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageAudit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageAudit.aspx.cs index e8f6470f..737b7fd0 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageAudit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageAudit.aspx.cs @@ -348,20 +348,30 @@ namespace FineUIPro.Web.HJGL.TestPackage int totalJointNum = totalJoint.Count(); //总焊口 int totalWeldingJointNum = totalJoint.Count(x => x.WeldingDailyId != null); //已焊总焊口 int notCloseBatch = (from x in db.HJGL_Batch_PointBatch - where x.UnitWorkId == pipeline.UnitWorkId && x.DetectionRateId == pipeline.DetectionRateId + join y in db.PTP_PipelineList on x.PipelineId equals y.PipelineId + where y.PTP_ID==this.PTP_ID //x.UnitWorkId == pipeline.UnitWorkId + && x.DetectionRateId == pipeline.DetectionRateId && x.DetectionTypeId == pipeline.DetectionType && x.EndDate == null select x).Count(); //未关闭批 int allPointJointNum = (from x in db.HJGL_Batch_PointBatchItem join y in db.HJGL_Batch_PointBatch on x.PointBatchId equals y.PointBatchId - where y.UnitWorkId == pipeline.UnitWorkId && y.DetectionRateId == pipeline.DetectionRateId + join j in db.HJGL_WeldJoint on x.WeldJointId equals j.WeldJointId + join p in db.PTP_PipelineList on j.PipelineId equals p.PipelineId + where p.PTP_ID == this.PTP_ID //x.UnitWorkId == pipeline.UnitWorkId + && y.DetectionRateId == pipeline.DetectionRateId && y.DetectionTypeId == pipeline.DetectionType && x.PointState != null select x).Count(); //全部点口(含扩透) int allOKCheckNum = (from x in db.HJGL_Batch_NDEItem join y in db.HJGL_Batch_NDE on x.NDEID equals y.NDEID - join z in db.HJGL_Batch_BatchTrust on y.TrustBatchId equals z.TrustBatchId - where z.UnitWorkId == pipeline.UnitWorkId && z.DetectionRateId == pipeline.DetectionRateId - && z.DetectionTypeId == pipeline.DetectionType && x.CheckResult == "1" - select x).Count(); //全部检测合格口 + join t in db.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId + join z in db.HJGL_Batch_BatchTrust on t.TrustBatchId equals z.TrustBatchId + join j in db.HJGL_WeldJoint on t.WeldJointId equals j.WeldJointId + join p in db.PTP_PipelineList on j.PipelineId equals p.PipelineId + where p.PTP_ID == this.PTP_ID //x.UnitWorkId == pipeline.UnitWorkId + && z.DetectionRateId == pipeline.DetectionRateId + && x.DetectionTypeId == pipeline.DetectionType && x.CheckResult == "1" + select x).Count(); //全部检测合格口 + if (totalJointNum > totalWeldingJointNum) //未全部焊完 { Count1 = totalJointNum - totalWeldingJointNum;