试压管理修改。增加试压看板,和试压包打印绑值
This commit is contained in:
Binary file not shown.
@@ -69,11 +69,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Bookmark",
|
"$type": "Bookmark",
|
||||||
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
|
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$type": "Bookmark",
|
"$type": "Bookmark",
|
||||||
"Name": "ST:0:0:{cce594b6-0c39-4442-ba28-10c64ac7e89f}"
|
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,10 +67,6 @@
|
|||||||
"$type": "Bookmark",
|
"$type": "Bookmark",
|
||||||
"Name": "ST:2:0:{b9f91511-5ca5-40ec-9726-f3e3a7e534e2}"
|
"Name": "ST:2:0:{b9f91511-5ca5-40ec-9726-f3e3a7e534e2}"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"$type": "Bookmark",
|
|
||||||
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"$type": "Bookmark",
|
"$type": "Bookmark",
|
||||||
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
|
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
|
||||||
|
|||||||
@@ -0,0 +1,96 @@
|
|||||||
|
CREATE VIEW dbo.View_HJGL_WeldJointDetectionType AS
|
||||||
|
WITH BaseData AS (
|
||||||
|
SELECT
|
||||||
|
jot.[ProjectId] --项目Id
|
||||||
|
, jot.[PipelineCode] --管线号
|
||||||
|
, pipe.DetectionType --探伤类型Id(可能多个,中间用|分隔)
|
||||||
|
, pipe.PipelineId --管线Id
|
||||||
|
, STUFF((SELECT ',' + DetectionTypeCode
|
||||||
|
FROM Base_DetectionType
|
||||||
|
WHERE CHARINDEX('|' + LTRIM(DetectionTypeId) + '|', '|' + pipe.DetectionType + '|') > 0
|
||||||
|
FOR XML PATH('')), 1, 1, '') AS DetectionTypeStr --探伤类型(可能多个,中间用,分隔)
|
||||||
|
, (case when charindex('/', jot.WeldJointCode) > 0
|
||||||
|
then RIGHT(jot.WeldJointCode, CHARINDEX('/', REVERSE(jot.WeldJointCode)) - 1)
|
||||||
|
else jot.WeldJointCode end) as WeldJointNumStr
|
||||||
|
, jot.[WeldJointId] --焊口Id
|
||||||
|
, jot.[WeldJointCode] --焊口号
|
||||||
|
FROM [dbo].[HJGL_WeldJoint] jot
|
||||||
|
LEFT JOIN dbo.HJGL_Pipeline pipe ON pipe.PipelineId = jot.PipelineId
|
||||||
|
)
|
||||||
|
SELECT
|
||||||
|
ProjectId,
|
||||||
|
PipelineCode,
|
||||||
|
DetectionType,
|
||||||
|
DetectionTypeStr,
|
||||||
|
-- 修改后的JointDetectionTypeStr计算
|
||||||
|
(CASE
|
||||||
|
-- 当DetectionTypeStr仅为'/'时,返回'/'
|
||||||
|
WHEN DetectionTypeStr = '/' THEN '/'
|
||||||
|
-- 当WeldJointNumStr第一个字符是字母时
|
||||||
|
WHEN WeldJointNumStr LIKE '[A-Za-z]%' THEN
|
||||||
|
CASE
|
||||||
|
-- 如果DetectionTypeStr包含'/',则返回'/'后面的字符串
|
||||||
|
WHEN CHARINDEX('/', DetectionTypeStr) > 0 THEN
|
||||||
|
SUBSTRING(DetectionTypeStr, CHARINDEX('/', DetectionTypeStr) + 1, LEN(DetectionTypeStr))
|
||||||
|
-- 如果不包含'/',则返回整个DetectionTypeStr
|
||||||
|
ELSE DetectionTypeStr
|
||||||
|
END
|
||||||
|
-- 当WeldJointNumStr第一个字符不是字母时,返回'/'前面的字符串
|
||||||
|
ELSE
|
||||||
|
CASE
|
||||||
|
-- 如果DetectionTypeStr包含'/',则返回'/'前面的字符串
|
||||||
|
WHEN CHARINDEX('/', DetectionTypeStr) > 0 THEN
|
||||||
|
LEFT(DetectionTypeStr, CHARINDEX('/', DetectionTypeStr) - 1)
|
||||||
|
-- 如果不包含'/',则返回整个DetectionTypeStr
|
||||||
|
ELSE DetectionTypeStr
|
||||||
|
END
|
||||||
|
END) AS JointDetectionTypeStr,
|
||||||
|
-- 继续选择其他所有字段
|
||||||
|
WeldJointId,
|
||||||
|
WeldJointCode,
|
||||||
|
WeldJointNumStr
|
||||||
|
FROM BaseData
|
||||||
|
|
||||||
|
GO
|
||||||
|
|
||||||
|
CREATE TABLE [dbo].[Base_MaterialColor] (
|
||||||
|
[MaterialColorId] nvarchar(50) NOT NULL DEFAULT(NEWID()) PRIMARY KEY,
|
||||||
|
[UnitId] nvarchar(50),
|
||||||
|
[ProjectId] nvarchar(50),
|
||||||
|
[MaterialId] nvarchar(50) ,
|
||||||
|
[ColorName] NVARCHAR(50) ,
|
||||||
|
[ColorCardNo] NVARCHAR(50),
|
||||||
|
[RGB] NVARCHAR(20),
|
||||||
|
[Remark] NVARCHAR(200)
|
||||||
|
);
|
||||||
|
|
||||||
|
go
|
||||||
|
exec sp_addextendedproperty 'MS_Description', N'单位id', 'SCHEMA', 'dbo', 'TABLE', 'Base_MaterialColor', 'COLUMN',
|
||||||
|
'UnitId'
|
||||||
|
go
|
||||||
|
|
||||||
|
exec sp_addextendedproperty 'MS_Description', N'材质id', 'SCHEMA', 'dbo', 'TABLE', 'Base_MaterialColor', 'COLUMN',
|
||||||
|
'MaterialId'
|
||||||
|
go
|
||||||
|
|
||||||
|
|
||||||
|
exec sp_addextendedproperty 'MS_Description', N'颜色名称', 'SCHEMA', 'dbo', 'TABLE', 'Base_MaterialColor', 'COLUMN',
|
||||||
|
'ColorName'
|
||||||
|
go
|
||||||
|
|
||||||
|
exec sp_addextendedproperty 'MS_Description', N'色卡号', 'SCHEMA', 'dbo', 'TABLE', 'Base_MaterialColor', 'COLUMN',
|
||||||
|
'ColorCardNo'
|
||||||
|
go
|
||||||
|
|
||||||
|
exec sp_addextendedproperty 'MS_Description', N'备注', 'SCHEMA', 'dbo', 'TABLE', 'Base_MaterialColor', 'COLUMN',
|
||||||
|
'Remark'
|
||||||
|
go
|
||||||
|
|
||||||
|
alter table dbo.HJGL_PackagingManageDetail
|
||||||
|
add TwOutputDetailId nvarchar(50)
|
||||||
|
go
|
||||||
|
|
||||||
|
exec sp_addextendedproperty 'MS_Description', N'出库明细表主键', 'SCHEMA', 'dbo', 'TABLE', 'HJGL_PackagingManageDetail',
|
||||||
|
'COLUMN', 'TwOutputDetailId'
|
||||||
|
go
|
||||||
|
|
||||||
@@ -42,6 +42,8 @@ namespace BLL
|
|||||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||||
{
|
{
|
||||||
PackagingManageItem packagingManageItem = new PackagingManageItem();
|
PackagingManageItem packagingManageItem = new PackagingManageItem();
|
||||||
|
List<PackagingPrepipeItem> packagingPrepipeItem = new List<PackagingPrepipeItem>();
|
||||||
|
|
||||||
var q = (from x in db.HJGL_PackagingManage
|
var q = (from x in db.HJGL_PackagingManage
|
||||||
join n in db.Base_Project on x.ProjectId equals n.ProjectId
|
join n in db.Base_Project on x.ProjectId equals n.ProjectId
|
||||||
join m in db.Person_Persons on x.ReceiveMan equals m.PersonId into tt
|
join m in db.Person_Persons on x.ReceiveMan equals m.PersonId into tt
|
||||||
@@ -62,8 +64,10 @@ namespace BLL
|
|||||||
TrainNumber = x.TrainNumber,
|
TrainNumber = x.TrainNumber,
|
||||||
}).FirstOrDefault();
|
}).FirstOrDefault();
|
||||||
var tb_packing = (from x in db.HJGL_PackagingManage where x.PackagingManageId==packagingManageId select x ).FirstOrDefault() ;
|
var tb_packing = (from x in db.HJGL_PackagingManage where x.PackagingManageId==packagingManageId select x ).FirstOrDefault() ;
|
||||||
var PipelineComponentIdList = tb_packing.PipelineComponentId.Split(',');
|
var PipelineComponentIdList = tb_packing?.PipelineComponentId?.Split(',');
|
||||||
var packagingPrepipeItem = (from x in db.HJGL_Pipeline_Component
|
if (PipelineComponentIdList != null && PipelineComponentIdList.Count() > 0)
|
||||||
|
{
|
||||||
|
packagingPrepipeItem = (from x in db.HJGL_Pipeline_Component
|
||||||
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
|
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
|
||||||
join z in db.WBS_UnitWork on y.UnitWorkId equals z.UnitWorkId
|
join z in db.WBS_UnitWork on y.UnitWorkId equals z.UnitWorkId
|
||||||
where PipelineComponentIdList.Contains(x.PipelineComponentId)
|
where PipelineComponentIdList.Contains(x.PipelineComponentId)
|
||||||
@@ -76,6 +80,8 @@ namespace BLL
|
|||||||
PlanStartDate = string.Format("{0:g}", y.PlanStartDate),
|
PlanStartDate = string.Format("{0:g}", y.PlanStartDate),
|
||||||
|
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
bool isPower = Person_PersonsService.IsGeneralUnitByPersonId(personId, projectId);
|
bool isPower = Person_PersonsService.IsGeneralUnitByPersonId(personId, projectId);
|
||||||
if (!isPower)
|
if (!isPower)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,8 +8,17 @@ using System.Web.UI.WebControls;
|
|||||||
|
|
||||||
namespace BLL
|
namespace BLL
|
||||||
{
|
{
|
||||||
public class TestPackageEditService
|
public partial class TestPackageEditService
|
||||||
{
|
{
|
||||||
|
public enum State : int
|
||||||
|
{
|
||||||
|
未确认 = 0,
|
||||||
|
已确认 = 1,
|
||||||
|
待整改 = 2,
|
||||||
|
已整改 = 3,
|
||||||
|
已完成 = 4,
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据试压Id获取用于试压信息
|
/// 根据试压Id获取用于试压信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -428,7 +437,11 @@ namespace BLL
|
|||||||
var q = Funs.DB.PTP_TestPackage.Where(e => e.UnitWorkId == unitworkId).ToList();
|
var q = Funs.DB.PTP_TestPackage.Where(e => e.UnitWorkId == unitworkId).ToList();
|
||||||
return q;
|
return q;
|
||||||
}
|
}
|
||||||
|
public static List<Model.PTP_TestPackage> GetTestPackageByProjectId(string projectid)
|
||||||
|
{
|
||||||
|
var q = Funs.DB.PTP_TestPackage.Where(e => e.ProjectId == projectid).ToList();
|
||||||
|
return q;
|
||||||
|
}
|
||||||
|
|
||||||
public static void DeletePipelineListByUnitWorkId(string unitworkId)
|
public static void DeletePipelineListByUnitWorkId(string unitworkId)
|
||||||
{
|
{
|
||||||
@@ -480,5 +493,196 @@ namespace BLL
|
|||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 计算试压包页面 ShowGridItem 需要的统计信息。
|
||||||
|
/// - 根据项目系统设置(SetId = "5")判断是否按管线组批(包含 "6")
|
||||||
|
/// - 若按管线组批:按 PTP_PipelineList 对应的每条管线计算统计(等价于页面分行判断),返回 Count1..Count4
|
||||||
|
/// - 若不按管线组批:按页面原逻辑汇总整包的统计并返回(含 lab12.Label)
|
||||||
|
/// 注意:方法只返回统计结果与标志,具体 UI 行样式仍由页面根据数据及返回结果决定。
|
||||||
|
/// </summary>
|
||||||
|
public static TestPackageAnalyzeOutput getTestPackageAnalyze(string PTP_ID, string projectId)
|
||||||
|
{
|
||||||
|
// 返回结果对象,包含统计信息
|
||||||
|
var result = new TestPackageAnalyzeOutput();
|
||||||
|
Model.SGGLDB db = Funs.DB;
|
||||||
|
var testPackage = db.PTP_TestPackage.FirstOrDefault(p => p.PTP_ID == PTP_ID);
|
||||||
|
if (testPackage == null) return null; // 无效试压包,直接返回空结果
|
||||||
|
result.PTP_ID= PTP_ID;
|
||||||
|
result.TestPackageNo = testPackage.TestPackageNo;
|
||||||
|
result.UnitWorkName = BLL.UnitWorkService.GetUnitWorkALLName(testPackage.UnitWorkId);
|
||||||
|
//判断当前试压包的状态
|
||||||
|
result.StateStr = State.未确认.ToString();
|
||||||
|
|
||||||
|
if (testPackage.AduditDate.HasValue)
|
||||||
|
{
|
||||||
|
result.StateStr=State.已确认.ToString();
|
||||||
|
}
|
||||||
|
var PtpItemEndCheckList=(from x in db.PTP_ItemEndCheckList where x.PTP_ID==PTP_ID select x).FirstOrDefault();
|
||||||
|
if (PtpItemEndCheckList != null )
|
||||||
|
{
|
||||||
|
if (PtpItemEndCheckList.State == Const.TestPackage_Complete)
|
||||||
|
{
|
||||||
|
result.StateStr = State.已整改.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result.StateStr = State.待整改.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (testPackage.FinishDate.HasValue)
|
||||||
|
{
|
||||||
|
result.StateStr = State.已完成.ToString();
|
||||||
|
|
||||||
|
}
|
||||||
|
// 当前试压包下所有管线ID集合
|
||||||
|
var pipelineIds = (from p in db.PTP_PipelineList where p.PTP_ID == PTP_ID select p.PipelineId).ToList();
|
||||||
|
result.TotalPipelines = pipelineIds.Count;
|
||||||
|
if (result.TotalPipelines == 0)
|
||||||
|
return result;
|
||||||
|
|
||||||
|
// 当前试压包下的焊口总数
|
||||||
|
result.TotalWeldJoints = db.HJGL_WeldJoint.Count(w => pipelineIds.Contains(w.PipelineId));
|
||||||
|
// 当前试压包下已焊接的焊口数
|
||||||
|
result.CompletedWeldJoints = db.HJGL_WeldJoint.Count(w => pipelineIds.Contains(w.PipelineId) && w.WeldingDailyId != null);
|
||||||
|
// 当前试压包下已检测的焊口数(去重)
|
||||||
|
result.DetectedWeldJoints = (from x in db.HJGL_Batch_NDEItem
|
||||||
|
join t in db.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
||||||
|
join j in db.HJGL_WeldJoint on t.WeldJointId equals j.WeldJointId
|
||||||
|
where pipelineIds.Contains(j.PipelineId)
|
||||||
|
select t.WeldJointId).Distinct().Count();
|
||||||
|
if (result.TotalWeldJoints > 0)
|
||||||
|
{
|
||||||
|
// 焊口完成百分比
|
||||||
|
result.WeldCompletionPercent = Math.Round((decimal)result.CompletedWeldJoints / result.TotalWeldJoints * 100, 2);
|
||||||
|
// 检测完成百分比
|
||||||
|
result.DetectionCompletionPercent = Math.Round((decimal)result.DetectedWeldJoints / result.TotalWeldJoints * 100, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 全通过管线计数
|
||||||
|
int passCount = 0;
|
||||||
|
// 系统设置,判断是否按管线组批
|
||||||
|
var batch = BLL.Project_SysSetService.GetSysSetBySetId("5", projectId);
|
||||||
|
if (batch != null && batch.SetValue != null && batch.SetValue.Contains("6"))
|
||||||
|
{
|
||||||
|
// 按管线组批,逐管线判断是否全通过
|
||||||
|
var pipelineList = (from p in db.PTP_PipelineList
|
||||||
|
join iso in db.HJGL_Pipeline on p.PipelineId equals iso.PipelineId
|
||||||
|
where p.PTP_ID == PTP_ID
|
||||||
|
select new { p.PipelineId, Iso = iso }).ToList();
|
||||||
|
foreach (var item in pipelineList)
|
||||||
|
{
|
||||||
|
// 当前管线总焊口数
|
||||||
|
int total = db.HJGL_WeldJoint.Count(w => w.PipelineId == item.PipelineId);
|
||||||
|
// 当前管线已焊接焊口数
|
||||||
|
int finished = db.HJGL_WeldJoint.Count(w => w.PipelineId == item.PipelineId && w.WeldingDailyId != null);
|
||||||
|
// 当前管线应检测比例
|
||||||
|
int? rateValue = null;
|
||||||
|
if (!string.IsNullOrEmpty(item.Iso.DetectionRateId))
|
||||||
|
{
|
||||||
|
var rate = db.Base_DetectionRate.FirstOrDefault(r => r.DetectionRateId == item.Iso.DetectionRateId);
|
||||||
|
if (rate != null) rateValue = rate.DetectionRateValue;
|
||||||
|
}
|
||||||
|
// 当前管线已检测焊口数
|
||||||
|
int detected = (from x in db.HJGL_Batch_NDEItem
|
||||||
|
join t in db.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
||||||
|
join j in db.HJGL_WeldJoint on t.WeldJointId equals j.WeldJointId
|
||||||
|
where j.PipelineId == item.PipelineId
|
||||||
|
select t.WeldJointId).Distinct().Count();
|
||||||
|
// 检测比例
|
||||||
|
decimal ratio = (total > 0) ? (decimal)detected / total * 100 : 0M;
|
||||||
|
// 检查返修焊口的最新检测是否全部合格
|
||||||
|
bool allNDEItemOK = true;
|
||||||
|
var lastRepair = (from x in db.HJGL_RepairRecord
|
||||||
|
join y in db.HJGL_WeldJoint on x.WeldJointId equals y.WeldJointId
|
||||||
|
where x.ProjectId == projectId && y.PipelineId == item.PipelineId
|
||||||
|
orderby x.NoticeDate descending
|
||||||
|
select x).FirstOrDefault();
|
||||||
|
if (lastRepair != null)
|
||||||
|
{
|
||||||
|
// 返修批次
|
||||||
|
var batchTrustItem = db.HJGL_Batch_BatchTrustItem.FirstOrDefault(b => b.RepairRecordId == lastRepair.RepairRecordId);
|
||||||
|
if (batchTrustItem != null)
|
||||||
|
{
|
||||||
|
// 返修检测单
|
||||||
|
var lastNDE = db.HJGL_Batch_NDE.FirstOrDefault(n => n.TrustBatchId == batchTrustItem.TrustBatchId);
|
||||||
|
if (lastNDE != null)
|
||||||
|
{
|
||||||
|
// 检测单下所有检测项
|
||||||
|
var lastNDEItems = db.HJGL_Batch_NDEItem.Where(ni => ni.NDEID == lastNDE.NDEID);
|
||||||
|
if (lastNDEItems.Any())
|
||||||
|
{
|
||||||
|
foreach (var ni in lastNDEItems)
|
||||||
|
{
|
||||||
|
// 检查是否有未全部合格的项
|
||||||
|
if (ni.TotalFilm != null && ni.PassFilm != null && ni.TotalFilm != ni.PassFilm)
|
||||||
|
{
|
||||||
|
allNDEItemOK = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else allNDEItemOK = false;
|
||||||
|
}
|
||||||
|
else allNDEItemOK = false;
|
||||||
|
}
|
||||||
|
else allNDEItemOK = false;
|
||||||
|
}
|
||||||
|
// 满足所有条件才算全通过
|
||||||
|
if (!(total > finished) && !(rateValue.HasValue && rateValue.Value > ratio) && allNDEItemOK)
|
||||||
|
passCount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 整包判断
|
||||||
|
var pipelineItem = db.PTP_PipelineList.FirstOrDefault(x => x.PTP_ID == PTP_ID);
|
||||||
|
if (pipelineItem == null) return result;
|
||||||
|
var pipeline = db.HJGL_Pipeline.FirstOrDefault(x => x.PipelineId == pipelineItem.PipelineId);
|
||||||
|
if (pipeline == null) return result;
|
||||||
|
// 整包所有焊口
|
||||||
|
var totalJoint = from x in db.HJGL_WeldJoint
|
||||||
|
join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId
|
||||||
|
join z in db.PTP_PipelineList on y.PipelineId equals z.PipelineId
|
||||||
|
where z.PTP_ID == PTP_ID
|
||||||
|
&& y.DetectionRateId == pipeline.DetectionRateId
|
||||||
|
&& y.DetectionType.Contains(pipeline.DetectionType)
|
||||||
|
select x;
|
||||||
|
int totalJointNum = totalJoint.Count(); // 整包总焊口数
|
||||||
|
int totalWeldingJointNum = totalJoint.Count(x => x.WeldingDailyId != null); // 整包已焊口数
|
||||||
|
int notCloseBatch = (from x in db.HJGL_Batch_PointBatch
|
||||||
|
join y in db.PTP_PipelineList on x.PipelineId equals y.PipelineId
|
||||||
|
where y.PTP_ID == PTP_ID
|
||||||
|
&& 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
|
||||||
|
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 == PTP_ID
|
||||||
|
&& 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 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 == PTP_ID
|
||||||
|
&& z.DetectionRateId == pipeline.DetectionRateId
|
||||||
|
&& x.DetectionTypeId == pipeline.DetectionType && x.CheckResult == "1"
|
||||||
|
select x).Count(); // 所有合格检测点数
|
||||||
|
// 满足所有条件才算全通过
|
||||||
|
if (!(totalJointNum > totalWeldingJointNum) && !(notCloseBatch > 0) && !(allPointJointNum > allOKCheckNum))
|
||||||
|
passCount = result.TotalPipelines;
|
||||||
|
}
|
||||||
|
// 计算是否具备试压条件:全通过数量 == 管线数量且管线数>0
|
||||||
|
result.CanPressureTest = (result.TotalPipelines > 0 && passCount == result.TotalPipelines);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ namespace BLL
|
|||||||
{
|
{
|
||||||
public static class TestPackagePrintService
|
public static class TestPackagePrintService
|
||||||
{
|
{
|
||||||
|
#region Fields
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 类别Map
|
/// 类别Map
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -37,38 +39,23 @@ namespace BLL
|
|||||||
{ 9, "无损检测结果汇总表" }
|
{ 9, "无损检测结果汇总表" }
|
||||||
};
|
};
|
||||||
|
|
||||||
public static List<Model.PTP_TestPackagePrint> GetListByPTP_ID(string PTP_ID)
|
#endregion Fields
|
||||||
{
|
|
||||||
return Funs.DB.PTP_TestPackagePrint.Where(x => x.PTP_ID == PTP_ID).OrderBy(x => x.TypeInt).ToList();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
#region Methods
|
||||||
/// 根据试压包ID和类别,打印次数+1
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="PTP_ID"></param>
|
|
||||||
/// <param name="typeInt"></param>
|
|
||||||
public static void AddPrintCountByTypeInt(string PTP_ID, int typeInt)
|
|
||||||
{
|
|
||||||
Model.PTP_TestPackagePrint table = Funs.DB.PTP_TestPackagePrint.FirstOrDefault(x => x.PTP_ID == PTP_ID && x.TypeInt == typeInt);
|
|
||||||
|
|
||||||
if (table != null)
|
public static void Add(Model.PTP_TestPackagePrint newtable)
|
||||||
{
|
{
|
||||||
table.PrintCount = table.PrintCount + 1;
|
Model.PTP_TestPackagePrint table = new Model.PTP_TestPackagePrint
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
table = new Model.PTP_TestPackagePrint
|
Id = newtable.Id,
|
||||||
{
|
PTP_ID = newtable.PTP_ID,
|
||||||
Id = Guid.NewGuid().ToString(),
|
TypeInt = newtable.TypeInt,
|
||||||
PTP_ID = PTP_ID,
|
PrintCount = newtable.PrintCount,
|
||||||
TypeInt = typeInt,
|
|
||||||
PrintCount = 1
|
|
||||||
};
|
};
|
||||||
Funs.DB.PTP_TestPackagePrint.InsertOnSubmit(table);
|
Funs.DB.PTP_TestPackagePrint.InsertOnSubmit(table);
|
||||||
}
|
|
||||||
|
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据试压包ID,打印所有类别,打印次数+1
|
/// 根据试压包ID,打印所有类别,打印次数+1
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -102,46 +89,70 @@ namespace BLL
|
|||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
public static void Add(Model.PTP_TestPackagePrint newtable)
|
/// 根据试压包ID和类别,打印次数+1
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="PTP_ID"></param>
|
||||||
|
/// <param name="typeInt"></param>
|
||||||
|
public static void AddPrintCountByTypeInt(string PTP_ID, int typeInt)
|
||||||
{
|
{
|
||||||
|
Model.PTP_TestPackagePrint table = Funs.DB.PTP_TestPackagePrint.FirstOrDefault(x => x.PTP_ID == PTP_ID && x.TypeInt == typeInt);
|
||||||
|
|
||||||
Model.PTP_TestPackagePrint table = new Model.PTP_TestPackagePrint
|
|
||||||
{
|
|
||||||
Id = newtable.Id,
|
|
||||||
PTP_ID = newtable.PTP_ID,
|
|
||||||
TypeInt = newtable.TypeInt,
|
|
||||||
PrintCount = newtable.PrintCount,
|
|
||||||
};
|
|
||||||
Funs.DB.PTP_TestPackagePrint.InsertOnSubmit(table);
|
|
||||||
Funs.DB.SubmitChanges();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Update(Model.PTP_TestPackagePrint newtable)
|
|
||||||
{
|
|
||||||
|
|
||||||
Model.PTP_TestPackagePrint table = Funs.DB.PTP_TestPackagePrint.FirstOrDefault(x => x.Id == newtable.Id);
|
|
||||||
if (table != null)
|
if (table != null)
|
||||||
{
|
{
|
||||||
table.Id = newtable.Id;
|
table.PrintCount = table.PrintCount + 1;
|
||||||
table.PTP_ID = newtable.PTP_ID;
|
}
|
||||||
table.TypeInt = newtable.TypeInt;
|
else
|
||||||
table.PrintCount = newtable.PrintCount;
|
{
|
||||||
|
table = new Model.PTP_TestPackagePrint
|
||||||
|
{
|
||||||
|
Id = Guid.NewGuid().ToString(),
|
||||||
|
PTP_ID = PTP_ID,
|
||||||
|
TypeInt = typeInt,
|
||||||
|
PrintCount = 1
|
||||||
|
};
|
||||||
|
Funs.DB.PTP_TestPackagePrint.InsertOnSubmit(table);
|
||||||
|
}
|
||||||
|
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
public static void DeleteById(string Id)
|
public static void DeleteById(string Id)
|
||||||
{
|
{
|
||||||
|
|
||||||
Model.PTP_TestPackagePrint table = Funs.DB.PTP_TestPackagePrint.FirstOrDefault(x => x.Id == Id);
|
Model.PTP_TestPackagePrint table = Funs.DB.PTP_TestPackagePrint.FirstOrDefault(x => x.Id == Id);
|
||||||
if (table != null)
|
if (table != null)
|
||||||
{
|
{
|
||||||
Funs.DB.PTP_TestPackagePrint.DeleteOnSubmit(table);
|
Funs.DB.PTP_TestPackagePrint.DeleteOnSubmit(table);
|
||||||
Funs.DB.SubmitChanges();
|
Funs.DB.SubmitChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取无损检测结果统计
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pipelineId"></param>
|
||||||
|
/// <param name="detectionType"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static (int djJoint, int djFilm, int jhJoint, int jhFilm, int zgJoint, int zgFilm) GetDetectionStats(string pipelineId, string detectionType)
|
||||||
|
{
|
||||||
|
var baseQuery = from x in Funs.DB.HJGL_Batch_NDEItem
|
||||||
|
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
||||||
|
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
||||||
|
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
||||||
|
join d in Funs.DB.View_HJGL_WeldJointDetectionType on t.WeldJointId equals d.WeldJointId
|
||||||
|
where d.JointDetectionTypeStr == detectionType && z.PipelineId == pipelineId
|
||||||
|
select new { x, w.WeldTypeCode };
|
||||||
|
|
||||||
|
return (
|
||||||
|
djJoint: baseQuery.Where(q => q.WeldTypeCode == "BW").Count(),
|
||||||
|
djFilm: baseQuery.Where(q => q.WeldTypeCode == "BW").Sum(q => q.x.TotalFilm) ?? 0,
|
||||||
|
jhJoint: baseQuery.Where(q => q.WeldTypeCode == "C" || q.WeldTypeCode == "E" || q.WeldTypeCode == "SW").Count(),
|
||||||
|
jhFilm: baseQuery.Where(q => q.WeldTypeCode == "C" || q.WeldTypeCode == "E" || q.WeldTypeCode == "SW").Sum(q => q.x.TotalFilm) ?? 0,
|
||||||
|
zgJoint: baseQuery.Where(q => q.WeldTypeCode == "D" || q.WeldTypeCode == "OLET" || q.WeldTypeCode == "FW").Count(),
|
||||||
|
zgFilm: baseQuery.Where(q => q.WeldTypeCode == "D" || q.WeldTypeCode == "OLET" || q.WeldTypeCode == "FW").Sum(q => q.x.TotalFilm) ?? 0
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取打印明细
|
/// 获取打印明细
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -171,6 +182,7 @@ namespace BLL
|
|||||||
fastReportItem.ParameterValues = keyValuePairs;
|
fastReportItem.ParameterValues = keyValuePairs;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "1"://管道压力试验技术要求
|
case "1"://管道压力试验技术要求
|
||||||
{
|
{
|
||||||
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
||||||
@@ -181,6 +193,7 @@ namespace BLL
|
|||||||
fastReportItem.ParameterValues = keyValuePairs;
|
fastReportItem.ParameterValues = keyValuePairs;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "2"://管道压力包文件资料目录
|
case "2"://管道压力包文件资料目录
|
||||||
{
|
{
|
||||||
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
||||||
@@ -191,6 +204,7 @@ namespace BLL
|
|||||||
fastReportItem.ParameterValues = keyValuePairs;
|
fastReportItem.ParameterValues = keyValuePairs;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "3"://管道系统压力试验条件确认记录
|
case "3"://管道系统压力试验条件确认记录
|
||||||
{
|
{
|
||||||
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
Dictionary<string, string> keyValuePairs = new Dictionary<string, string>();
|
||||||
@@ -207,6 +221,7 @@ namespace BLL
|
|||||||
fastReportItem.ParameterValues = keyValuePairs;
|
fastReportItem.ParameterValues = keyValuePairs;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "4"://管道试压包尾项清单
|
case "4"://管道试压包尾项清单
|
||||||
{
|
{
|
||||||
string sql = @"select ItemCheckId,PTP_ID,PTP_ItemEndCheck.PipelineId,Content,ItemType,Result,HJGL_Pipeline.PipelineCode from PTP_ItemEndCheck
|
string sql = @"select ItemCheckId,PTP_ID,PTP_ItemEndCheck.PipelineId,Content,ItemType,Result,HJGL_Pipeline.PipelineCode from PTP_ItemEndCheck
|
||||||
@@ -252,6 +267,7 @@ namespace BLL
|
|||||||
fastReportItem.DataTables = dataTables;
|
fastReportItem.DataTables = dataTables;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "5"://管道系统压力试验记录
|
case "5"://管道系统压力试验记录
|
||||||
{
|
{
|
||||||
string sql = @"SELECT ptpPipe.PT_PipeId,
|
string sql = @"SELECT ptpPipe.PT_PipeId,
|
||||||
@@ -320,6 +336,7 @@ namespace BLL
|
|||||||
fastReportItem.DataTables = dataTables;
|
fastReportItem.DataTables = dataTables;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "6"://管道材料材质标识检查记录
|
case "6"://管道材料材质标识检查记录
|
||||||
{
|
{
|
||||||
string sql = @"select PT_PipeId, PTP_ID,pipelineList.PipelineId,pipeline.PipelineCode
|
string sql = @"select PT_PipeId, PTP_ID,pipelineList.PipelineId,pipeline.PipelineCode
|
||||||
@@ -366,6 +383,7 @@ namespace BLL
|
|||||||
fastReportItem.DataTables = dataTables;
|
fastReportItem.DataTables = dataTables;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "7"://管道焊接工作记录
|
case "7"://管道焊接工作记录
|
||||||
{
|
{
|
||||||
var iosList = BLL.TestPackageEditService.GetPipeLineListByPTP_ID(ptp_id);
|
var iosList = BLL.TestPackageEditService.GetPipeLineListByPTP_ID(ptp_id);
|
||||||
@@ -464,6 +482,7 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "8"://管道无损检测数量统计表
|
case "8"://管道无损检测数量统计表
|
||||||
{
|
{
|
||||||
var iosList = BLL.TestPackageEditService.GetPipeLineListByPTP_ID(ptp_id);
|
var iosList = BLL.TestPackageEditService.GetPipeLineListByPTP_ID(ptp_id);
|
||||||
@@ -508,157 +527,50 @@ namespace BLL
|
|||||||
if (dt != null)
|
if (dt != null)
|
||||||
{
|
{
|
||||||
dt.TableName = "Data";
|
dt.TableName = "Data";
|
||||||
|
// 一次性获取所有管道的数据
|
||||||
|
var pipelineIds = dt.AsEnumerable().Select(row => row["PipelineId"].ToString()).ToList();
|
||||||
|
|
||||||
for (int i = 0; i < dt.Rows.Count; i++)
|
// 获取所有合格数据
|
||||||
|
var allQualifiedData = (from x in Funs.DB.HJGL_Batch_NDEItem
|
||||||
|
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
||||||
|
join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId
|
||||||
|
join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId
|
||||||
|
join w in Funs.DB.View_HJGL_WeldJointDetectionType on t.WeldJointId equals w.WeldJointId
|
||||||
|
where pipelineIds.Contains(y.PipelineId) && x.CheckResult == "1"
|
||||||
|
select new
|
||||||
{
|
{
|
||||||
#region 对接焊接头
|
PipelineId = y.PipelineId,
|
||||||
int totalJotCountBW = (from x in Funs.DB.HJGL_Batch_NDEItem
|
WeldTypeCode = z.WeldTypeCode,
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
DetectionType = w.JointDetectionTypeStr
|
||||||
join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId
|
}).ToList();
|
||||||
join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId
|
|
||||||
where y.PipelineId == dt.Rows[i]["PipelineId"].ToString()
|
|
||||||
&& x.CheckResult == "1"
|
|
||||||
&& z.WeldTypeCode == "BW"
|
|
||||||
select x).Count();//对接检测合格数量
|
|
||||||
int RTtotalJotCountBW = (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId
|
|
||||||
join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId
|
|
||||||
join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId
|
|
||||||
where y.PipelineId == dt.Rows[i]["PipelineId"].ToString()
|
|
||||||
&& x.CheckResult == "1"
|
|
||||||
&& z.WeldTypeCode == "BW"
|
|
||||||
&& w.DetectionTypeCode == "RT"
|
|
||||||
select x).Count();//RT对接检测合格数量
|
|
||||||
int UTtotalJotCountBW = (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId
|
|
||||||
join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId
|
|
||||||
join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId
|
|
||||||
where y.PipelineId == dt.Rows[i]["PipelineId"].ToString()
|
|
||||||
&& x.CheckResult == "1"
|
|
||||||
&& z.WeldTypeCode == "BW"
|
|
||||||
&& w.DetectionTypeCode == "UT"
|
|
||||||
select x).Count();//UT对接检测合格数量
|
|
||||||
int MTtotalJotCountBW = (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId
|
|
||||||
join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId
|
|
||||||
join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId
|
|
||||||
where y.PipelineId == dt.Rows[i]["PipelineId"].ToString()
|
|
||||||
&& x.CheckResult == "1"
|
|
||||||
&& z.WeldTypeCode == "BW"
|
|
||||||
&& w.DetectionTypeCode == "MT"
|
|
||||||
select x).Count();// MT对接检测合格数量
|
|
||||||
int PTtotalJotCountBW = (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId
|
|
||||||
join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId
|
|
||||||
join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId
|
|
||||||
where y.PipelineId == dt.Rows[i]["PipelineId"].ToString()
|
|
||||||
&& x.CheckResult == "1"
|
|
||||||
&& z.WeldTypeCode == "BW"
|
|
||||||
&& w.DetectionTypeCode == "PT"
|
|
||||||
select x).Count();//PT对接检测合格数量
|
|
||||||
|
|
||||||
dt.Rows[i]["totalJotCountBW"] = totalJotCountBW.ToString();
|
// 处理数据
|
||||||
dt.Rows[i]["RTtotalJotCountBW"] = RTtotalJotCountBW.ToString();
|
foreach (DataRow row in dt.Rows)
|
||||||
dt.Rows[i]["UTtotalJotCountBW"] = UTtotalJotCountBW.ToString();
|
{
|
||||||
dt.Rows[i]["MTtotalJotCountBW"] = MTtotalJotCountBW.ToString();
|
string pipelineId = row["PipelineId"].ToString();
|
||||||
dt.Rows[i]["PTtotalJotCountBW"] = PTtotalJotCountBW.ToString();
|
var pipelineData = allQualifiedData.Where(d => d.PipelineId == pipelineId);
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 角焊接头
|
// 对接焊接头
|
||||||
int totalJotCountFW = (from x in Funs.DB.HJGL_Batch_NDEItem
|
var bwData = pipelineData.Where(d => d.WeldTypeCode == "BW");
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
row["totalJotCountBW"] = bwData.Count().ToString();
|
||||||
join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId
|
row["RTtotalJotCountBW"] = bwData.Count(d => d.DetectionType == "RT").ToString();
|
||||||
join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId
|
row["UTtotalJotCountBW"] = bwData.Count(d => d.DetectionType == "UT").ToString();
|
||||||
where y.PipelineId == dt.Rows[i]["PipelineId"].ToString()
|
row["MTtotalJotCountBW"] = bwData.Count(d => d.DetectionType == "MT").ToString();
|
||||||
&& x.CheckResult == "1"
|
row["PTtotalJotCountBW"] = bwData.Count(d => d.DetectionType == "PT").ToString();
|
||||||
&& (z.WeldTypeCode == "C" || z.WeldTypeCode == "E")
|
|
||||||
select x).Count();//对接检测合格数量
|
|
||||||
int MTtotalJotCountFW = (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId
|
|
||||||
join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId
|
|
||||||
join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId
|
|
||||||
where y.PipelineId == dt.Rows[i]["PipelineId"].ToString()
|
|
||||||
&& x.CheckResult == "1"
|
|
||||||
&& (z.WeldTypeCode == "C" || z.WeldTypeCode == "E")
|
|
||||||
&& w.DetectionTypeCode == "MT"
|
|
||||||
select x).Count();//MT对接检测合格数量
|
|
||||||
int PTtotalJotCountFW = (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId
|
|
||||||
join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId
|
|
||||||
join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId
|
|
||||||
where y.PipelineId == dt.Rows[i]["PipelineId"].ToString()
|
|
||||||
&& x.CheckResult == "1"
|
|
||||||
&& (z.WeldTypeCode == "C" || z.WeldTypeCode == "E")
|
|
||||||
&& w.DetectionTypeCode == "PT"
|
|
||||||
select x).Count();//PT对接检测合格数量
|
|
||||||
|
|
||||||
dt.Rows[i]["totalJotCountFW"] = totalJotCountFW.ToString();
|
// 角焊接头
|
||||||
dt.Rows[i]["MTtotalJotCountFW"] = MTtotalJotCountFW.ToString();
|
var fwData = pipelineData.Where(d => d.WeldTypeCode == "C" || d.WeldTypeCode == "E" || d.WeldTypeCode == "SW");
|
||||||
dt.Rows[i]["PTtotalJotCountFW"] = PTtotalJotCountFW.ToString();
|
row["totalJotCountFW"] = fwData.Count().ToString();
|
||||||
#endregion
|
row["MTtotalJotCountFW"] = fwData.Count(d => d.DetectionType == "MT").ToString();
|
||||||
|
row["PTtotalJotCountFW"] = fwData.Count(d => d.DetectionType == "PT").ToString();
|
||||||
|
|
||||||
#region 支管连接接头
|
// 支管连接接头
|
||||||
int totalJotCountDW = (from x in Funs.DB.HJGL_Batch_NDEItem
|
var dwData = pipelineData.Where(d => d.WeldTypeCode == "D" || d.WeldTypeCode == "OLET" || d.WeldTypeCode == "FW");
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
row["totalJotCountDW"] = dwData.Count().ToString();
|
||||||
join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId
|
row["RTtotalJotCountDW"] = dwData.Count(d => d.DetectionType == "RT").ToString();
|
||||||
join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId
|
row["UTtotalJotCountDW"] = dwData.Count(d => d.DetectionType == "UT").ToString();
|
||||||
where y.PipelineId == dt.Rows[i]["PipelineId"].ToString()
|
row["MTtotalJotCountDW"] = dwData.Count(d => d.DetectionType == "MT").ToString();
|
||||||
&& x.CheckResult == "1"
|
row["PTtotalJotCountDW"] = dwData.Count(d => d.DetectionType == "PT").ToString();
|
||||||
&& z.WeldTypeCode == "D"
|
|
||||||
select x).Count();//支管检测合格数量
|
|
||||||
int RTtotalJotCountDW = (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId
|
|
||||||
join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId
|
|
||||||
join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId
|
|
||||||
where y.PipelineId == dt.Rows[i]["PipelineId"].ToString()
|
|
||||||
&& x.CheckResult == "1"
|
|
||||||
&& z.WeldTypeCode == "D"
|
|
||||||
&& w.DetectionTypeCode == "RT"
|
|
||||||
select x).Count();//支管检测合格数量
|
|
||||||
int UTtotalJotCountDW = (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId
|
|
||||||
join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId
|
|
||||||
join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId
|
|
||||||
where y.PipelineId == dt.Rows[i]["PipelineId"].ToString()
|
|
||||||
&& x.CheckResult == "1"
|
|
||||||
&& z.WeldTypeCode == "D"
|
|
||||||
&& w.DetectionTypeCode == "UT"
|
|
||||||
select x).Count();//支管检测合格数量
|
|
||||||
int MTtotalJotCountDW = (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId
|
|
||||||
join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId
|
|
||||||
join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId
|
|
||||||
where y.PipelineId == dt.Rows[i]["PipelineId"].ToString()
|
|
||||||
&& x.CheckResult == "1"
|
|
||||||
&& z.WeldTypeCode == "D"
|
|
||||||
&& w.DetectionTypeCode == "MT"
|
|
||||||
select x).Count();//支管检测合格数量
|
|
||||||
int PTtotalJotCountDW = (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId
|
|
||||||
join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId
|
|
||||||
join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId
|
|
||||||
where y.PipelineId == dt.Rows[i]["PipelineId"].ToString()
|
|
||||||
&& x.CheckResult == "1"
|
|
||||||
&& z.WeldTypeCode == "D"
|
|
||||||
&& w.DetectionTypeCode == "PT"
|
|
||||||
select x).Count();//支管检测合格数量
|
|
||||||
|
|
||||||
dt.Rows[i]["totalJotCountDW"] = totalJotCountDW.ToString();
|
|
||||||
dt.Rows[i]["RTtotalJotCountDW"] = RTtotalJotCountDW.ToString();
|
|
||||||
dt.Rows[i]["UTtotalJotCountDW"] = UTtotalJotCountDW.ToString();
|
|
||||||
dt.Rows[i]["MTtotalJotCountDW"] = MTtotalJotCountDW.ToString();
|
|
||||||
dt.Rows[i]["PTtotalJotCountDW"] = PTtotalJotCountDW.ToString();
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BLL.FastReportService.AddFastreportTable(dt);
|
BLL.FastReportService.AddFastreportTable(dt);
|
||||||
@@ -671,6 +583,7 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "9"://无损检测结果汇总表
|
case "9"://无损检测结果汇总表
|
||||||
{
|
{
|
||||||
var iosList = BLL.TestPackageEditService.GetPipeLineListByPTP_ID(ptp_id);
|
var iosList = BLL.TestPackageEditService.GetPipeLineListByPTP_ID(ptp_id);
|
||||||
@@ -704,9 +617,10 @@ namespace BLL
|
|||||||
{
|
{
|
||||||
var unitNames1 = string.Join(",", Unit1.Select(x => x.UnitName).ToArray());
|
var unitNames1 = string.Join(",", Unit1.Select(x => x.UnitName).ToArray());
|
||||||
keyValuePairs.Add("UnitName1", unitNames1);
|
keyValuePairs.Add("UnitName1", unitNames1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 定义变量
|
#region 定义变量
|
||||||
|
|
||||||
int rtdjJoint = 0;//RT对接焊口数
|
int rtdjJoint = 0;//RT对接焊口数
|
||||||
int? rtdjFilm = 0;//RT对接片数
|
int? rtdjFilm = 0;//RT对接片数
|
||||||
int rtjhJoint = 0;//RT角焊焊口数
|
int rtjhJoint = 0;//RT角焊焊口数
|
||||||
@@ -762,404 +676,58 @@ namespace BLL
|
|||||||
decimal? ptjhNoPassFilm = 0;
|
decimal? ptjhNoPassFilm = 0;
|
||||||
int ptzgNoPassJoint = 0;
|
int ptzgNoPassJoint = 0;
|
||||||
decimal? ptzgNoPassFilm = 0;
|
decimal? ptzgNoPassFilm = 0;
|
||||||
#endregion
|
|
||||||
|
#endregion 定义变量
|
||||||
|
|
||||||
foreach (var iso in iosList)
|
foreach (var iso in iosList)
|
||||||
{
|
{
|
||||||
#region 检测数量统计
|
#region 检测数量统计
|
||||||
#region RT对焊接头
|
|
||||||
rtdjJoint += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "RT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId
|
|
||||||
select x).Count();//RT对接焊口数
|
|
||||||
|
|
||||||
rtdjFilm += (from x in Funs.DB.HJGL_Batch_NDEItem
|
// RT统计
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
var rtStats = GetDetectionStats(iso.PipelineId, "RT");
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
rtdjJoint += rtStats.djJoint; rtdjFilm += rtStats.djFilm;
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
rtjhJoint += rtStats.jhJoint; rtjhFilm += rtStats.jhFilm;
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
rtzgJoint += rtStats.zgJoint; rtzgFilm += rtStats.zgFilm;
|
||||||
where y.DetectionTypeCode == "RT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId
|
|
||||||
select x.TotalFilm).Sum();//RT对接片数
|
|
||||||
#endregion
|
|
||||||
#region RT角焊接头
|
|
||||||
rtjhJoint += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "RT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId
|
|
||||||
select x).Count();//RT角焊焊口数
|
|
||||||
|
|
||||||
rtjhFilm += (from x in Funs.DB.HJGL_Batch_NDEItem
|
// UT统计
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
var utStats = GetDetectionStats(iso.PipelineId, "UT");
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
utdjJoint += utStats.djJoint; utjhJoint += utStats.jhJoint; utzgJoint += utStats.zgJoint;
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "RT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId
|
|
||||||
select x.TotalFilm).Sum();//RT角焊片数
|
|
||||||
#endregion
|
|
||||||
#region RT支管连接焊口数
|
|
||||||
rtzgJoint += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "RT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId
|
|
||||||
select x).Count();//RT支管连接焊口数
|
|
||||||
|
|
||||||
rtzgFilm += (from x in Funs.DB.HJGL_Batch_NDEItem
|
// MT统计
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
var mtStats = GetDetectionStats(iso.PipelineId, "MT");
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
mtdjJoint += mtStats.djJoint; mtjhJoint += mtStats.jhJoint; mtzgJoint += mtStats.zgJoint;
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "RT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId
|
|
||||||
select x.TotalFilm).Sum();//RT支管连接片数
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region UT对焊接头
|
// PT统计
|
||||||
utdjJoint += (from x in Funs.DB.HJGL_Batch_NDEItem
|
var ptStats = GetDetectionStats(iso.PipelineId, "PT");
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
ptdjJoint += ptStats.djJoint; ptjhJoint += ptStats.jhJoint; ptzgJoint += ptStats.zgJoint;
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId
|
|
||||||
select x).Count();//UT对接焊口数
|
|
||||||
|
|
||||||
//utdjFilm += (from x in Funs.DB.CH_CheckItem
|
#endregion 检测数量统计
|
||||||
// join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId
|
|
||||||
// join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID
|
|
||||||
// join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId
|
|
||||||
// where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "BW" && z.ISO_ID == iso.ISO_ID
|
|
||||||
// select x.CHT_TotalFilm).Sum();//UT对接片数
|
|
||||||
#endregion
|
|
||||||
#region UT角焊接头
|
|
||||||
utjhJoint += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "UT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId
|
|
||||||
select x).Count();//UT角焊焊口数
|
|
||||||
//utjhFilm += (from x in Funs.DB.CH_CheckItem
|
|
||||||
// join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId
|
|
||||||
// join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID
|
|
||||||
// join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId
|
|
||||||
// where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "FW" && z.ISO_ID == iso.ISO_ID
|
|
||||||
// select x.CHT_TotalFilm).Sum();//UT角焊片数
|
|
||||||
#endregion
|
|
||||||
#region UT支管连接焊口数
|
|
||||||
utzgJoint += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId
|
|
||||||
select x).Count();//UT支管连接焊口数
|
|
||||||
|
|
||||||
//utzgFilm += (from x in Funs.DB.CH_CheckItem
|
|
||||||
// join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId
|
|
||||||
// join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID
|
|
||||||
// join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId
|
|
||||||
// where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "DW" && z.ISO_ID == iso.ISO_ID
|
|
||||||
// select x.CHT_TotalFilm).Sum();//UT支管连接片数
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region MT对焊接头
|
|
||||||
mtdjJoint += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId
|
|
||||||
select x).Count();//MT对接焊口数
|
|
||||||
|
|
||||||
//mtdjFilm += (from x in Funs.DB.CH_CheckItem
|
|
||||||
// join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId
|
|
||||||
// join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID
|
|
||||||
// join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId
|
|
||||||
// where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "BW" && z.ISO_ID == iso.ISO_ID
|
|
||||||
// select x.CHT_TotalFilm).Sum();//MT对接片数
|
|
||||||
#endregion
|
|
||||||
#region MT角焊接头
|
|
||||||
mtjhJoint += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "MT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId
|
|
||||||
select x).Count();//MT角焊焊口数
|
|
||||||
|
|
||||||
//mtjhFilm += (from x in Funs.DB.CH_CheckItem
|
|
||||||
// join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId
|
|
||||||
// join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID
|
|
||||||
// join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId
|
|
||||||
// where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "FW" && z.ISO_ID == iso.ISO_ID
|
|
||||||
// select x.CHT_TotalFilm).Sum();//MT角焊片数
|
|
||||||
#endregion
|
|
||||||
#region MT支管连接焊口数
|
|
||||||
mtzgJoint += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId
|
|
||||||
select x).Count();//MT支管连接焊口数
|
|
||||||
//mtzgFilm += (from x in Funs.DB.CH_CheckItem
|
|
||||||
// join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId
|
|
||||||
// join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID
|
|
||||||
// join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId
|
|
||||||
// where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "DW" && z.ISO_ID == iso.ISO_ID
|
|
||||||
// select x.CHT_TotalFilm).Sum();//MT支管连接片数
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region PT对焊接头
|
|
||||||
ptdjJoint += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId
|
|
||||||
select x).Count();//PT对接焊口数
|
|
||||||
//ptdjFilm += (from x in Funs.DB.CH_CheckItem
|
|
||||||
// join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId
|
|
||||||
// join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID
|
|
||||||
// join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId
|
|
||||||
// where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "BW" && z.ISO_ID == iso.ISO_ID
|
|
||||||
// select x.CHT_TotalFilm).Sum();//PT对接片数
|
|
||||||
#endregion
|
|
||||||
#region PT角焊接头
|
|
||||||
ptjhJoint += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "PT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId
|
|
||||||
select x).Count();//PT角焊焊口数
|
|
||||||
//ptjhFilm += (from x in Funs.DB.CH_CheckItem
|
|
||||||
// join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId
|
|
||||||
// join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID
|
|
||||||
// join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId
|
|
||||||
// where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "FW" && z.ISO_ID == iso.ISO_ID
|
|
||||||
// select x.CHT_TotalFilm).Sum();//PT角焊片数
|
|
||||||
#endregion
|
|
||||||
#region PT支管连接焊口数
|
|
||||||
ptzgJoint += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId
|
|
||||||
select x).Count();//PT支管连接焊口数
|
|
||||||
//ptzgFilm += (from x in Funs.DB.CH_CheckItem
|
|
||||||
// join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId
|
|
||||||
// join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID
|
|
||||||
// join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId
|
|
||||||
// where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "DW" && z.ISO_ID == iso.ISO_ID
|
|
||||||
// select x.CHT_TotalFilm).Sum();//PT支管连接片数
|
|
||||||
#endregion
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 不合格情况统计
|
#region 不合格情况统计
|
||||||
#region RT对焊接头
|
|
||||||
rtdjNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "RT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId && x.CheckResult == "2"
|
|
||||||
select x).Count();//RT对接焊口数
|
|
||||||
rtdjNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "RT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId && x.CheckResult == "2"
|
|
||||||
select (x.TotalFilm - x.PassFilm)).Sum();//RT对接片数
|
|
||||||
#endregion
|
|
||||||
#region RT角焊接头
|
|
||||||
rtjhNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "RT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId && x.CheckResult == "2"
|
|
||||||
select x).Count();//RT角焊焊口数
|
|
||||||
|
|
||||||
rtjhNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem
|
// RT不合格统计
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
var rtNoPassStats = GetNoPassDetectionStats(iso.PipelineId, "RT");
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
rtdjNoPassJoint += rtNoPassStats.djJoint; rtdjNoPassFilm += rtNoPassStats.djFilm;
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
rtjhNoPassJoint += rtNoPassStats.jhJoint; rtjhNoPassFilm += rtNoPassStats.jhFilm;
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
rtzgNoPassJoint += rtNoPassStats.zgJoint; rtzgNoPassFilm += rtNoPassStats.zgFilm;
|
||||||
where y.DetectionTypeCode == "RT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId && x.CheckResult == "2"
|
|
||||||
select (x.TotalFilm - x.PassFilm)).Sum();//RT角焊片数
|
|
||||||
#endregion
|
|
||||||
#region RT支管连接焊口数
|
|
||||||
rtzgNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "RT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId && x.CheckResult == "2"
|
|
||||||
select x).Count();//RT支管连接焊口数
|
|
||||||
rtzgNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "RT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId && x.CheckResult == "2"
|
|
||||||
select (x.TotalFilm - x.PassFilm)).Sum();//RT支管连接片数
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region UT对焊接头
|
// 其他不合格统计类似...
|
||||||
utdjNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem
|
var utNoPassStats = GetNoPassDetectionStats(iso.PipelineId, "UT");
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
utdjNoPassJoint += utNoPassStats.djJoint; utdjNoPassFilm += utNoPassStats.djFilm;
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
utjhNoPassJoint += utNoPassStats.jhJoint; utjhNoPassFilm += utNoPassStats.jhFilm;
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
utzgNoPassJoint += utNoPassStats.zgJoint; utzgNoPassFilm += utNoPassStats.zgFilm;
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId && x.CheckResult == "2"
|
|
||||||
select x).Count();//UT对接焊口数
|
|
||||||
|
|
||||||
utdjNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem
|
var mtNoPassStats = GetNoPassDetectionStats(iso.PipelineId, "MT");
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
mtdjNoPassJoint += mtNoPassStats.djJoint; mtdjNoPassFilm += mtNoPassStats.djFilm;
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
mtjhNoPassJoint += mtNoPassStats.jhJoint; mtjhNoPassFilm += mtNoPassStats.jhFilm;
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
mtzgNoPassJoint += mtNoPassStats.zgJoint; mtzgNoPassFilm += mtNoPassStats.zgFilm;
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId && x.CheckResult == "2"
|
|
||||||
select x.TotalFilm - x.PassFilm).Sum();//UT对接片数
|
|
||||||
#endregion
|
|
||||||
#region UT角焊接头
|
|
||||||
utjhNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "UT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId && x.CheckResult == "2"
|
|
||||||
select x).Count();//UT角焊焊口数
|
|
||||||
utjhNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "UT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId && x.CheckResult == "2"
|
|
||||||
select x.TotalFilm - x.PassFilm).Sum();//UT角焊片数
|
|
||||||
#endregion
|
|
||||||
#region UT支管连接焊口数
|
|
||||||
utzgNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId && x.CheckResult == "2"
|
|
||||||
select x).Count();//UT支管连接焊口数
|
|
||||||
utzgNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId && x.CheckResult == "2"
|
|
||||||
select x.TotalFilm - x.PassFilm).Sum();//UT支管连接片数
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region MT对焊接头
|
var ptNoPassStats = GetNoPassDetectionStats(iso.PipelineId, "PT");
|
||||||
mtdjNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem
|
ptdjNoPassJoint += ptNoPassStats.djJoint; ptdjNoPassFilm += ptNoPassStats.djFilm;
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
ptjhNoPassJoint += ptNoPassStats.jhJoint; ptjhNoPassFilm += ptNoPassStats.jhFilm;
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
ptzgNoPassJoint += ptNoPassStats.zgJoint; ptzgNoPassFilm += ptNoPassStats.zgFilm;
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId && x.CheckResult == "2"
|
|
||||||
select x).Count();//MT对接焊口数
|
|
||||||
mtdjNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId && x.CheckResult == "2"
|
|
||||||
select x.TotalFilm - x.PassFilm).Sum();//MT对接片数
|
|
||||||
#endregion
|
|
||||||
#region MT角焊接头
|
|
||||||
mtjhNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "MT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId && x.CheckResult == "2"
|
|
||||||
select x).Count();//MT角焊焊口数
|
|
||||||
mtjhNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "MT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId && x.CheckResult == "2"
|
|
||||||
select x.TotalFilm - x.PassFilm).Sum();//MT角焊片数
|
|
||||||
#endregion
|
|
||||||
#region MT支管连接焊口数
|
|
||||||
mtzgNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId && x.CheckResult == "2"
|
|
||||||
select x).Count();//MT支管连接焊口数
|
|
||||||
mtzgNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId && x.CheckResult == "2"
|
|
||||||
select x.TotalFilm - x.PassFilm).Sum();//MT支管连接片数
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region PT对焊接头
|
#endregion 不合格情况统计
|
||||||
ptdjNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId && x.CheckResult == "2"
|
|
||||||
select x).Count();//PT对接焊口数
|
|
||||||
ptdjNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId && x.CheckResult == "2"
|
|
||||||
select x.TotalFilm - x.PassFilm).Sum();//PT对接片数
|
|
||||||
#endregion
|
|
||||||
#region PT角焊接头
|
|
||||||
ptjhNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "PT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId && x.CheckResult == "2"
|
|
||||||
select x).Count();//PT角焊焊口数
|
|
||||||
ptjhNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "PT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId && x.CheckResult == "2"
|
|
||||||
select x.TotalFilm - x.PassFilm).Sum();//PT角焊片数
|
|
||||||
#endregion
|
|
||||||
#region PT支管连接焊口数
|
|
||||||
ptzgNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId && x.CheckResult == "2"
|
|
||||||
select x).Count();//PT支管连接焊口数
|
|
||||||
ptzgNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem
|
|
||||||
join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId
|
|
||||||
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
|
||||||
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
|
||||||
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
|
||||||
where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId && x.CheckResult == "2"
|
|
||||||
select x.TotalFilm - x.PassFilm).Sum();//PT支管连接片数
|
|
||||||
#endregion
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
keyValuePairs.Add("RTBW", (rtdjJoint > 0 ? rtdjJoint.ToString() + "道" : "") + "/" + (rtdjFilm > 0 ? rtdjFilm.ToString() + "张" : ""));
|
keyValuePairs.Add("RTBW", (rtdjJoint > 0 ? rtdjJoint.ToString() + "道" : "") + "/" + (rtdjFilm > 0 ? rtdjFilm.ToString() + "张" : ""));
|
||||||
keyValuePairs.Add("RTFW", (rtjhJoint > 0 ? rtjhJoint.ToString() + "道" : "") + "/" + (rtjhFilm > 0 ? rtjhFilm.ToString() + "张" : ""));
|
keyValuePairs.Add("RTFW", (rtjhJoint > 0 ? rtjhJoint.ToString() + "道" : "") + "/" + (rtjhFilm > 0 ? rtjhFilm.ToString() + "张" : ""));
|
||||||
@@ -1195,23 +763,23 @@ namespace BLL
|
|||||||
j.WeldJointCode,
|
j.WeldJointCode,
|
||||||
(case when j.CoverWelderId is not null then (
|
(case when j.CoverWelderId is not null then (
|
||||||
case when j.BackingWelderId is not null and j.CoverWelderId<>j.BackingWelderId
|
case when j.BackingWelderId is not null and j.CoverWelderId<>j.BackingWelderId
|
||||||
then cWelder.JobNum+'/'+fWelder.JobNum
|
then cWelder.WelderCode+'/'+fWelder.WelderCode
|
||||||
else cWelder.JobNum end) else fWelder.JobNum end) as WelderCode,
|
else cWelder.WelderCode end) else fWelder.WelderCode end) as WelderCode,
|
||||||
(case when d.DetectionTypeCode='RT' or d.DetectionTypeCode='UT' then
|
(case when d.JointDetectionTypeStr='RT' or d.JointDetectionTypeStr='UT' then
|
||||||
(case nDEItem.CheckResult when '1' then '合格' when '2' then '不合格' else '/' end) else '/' end) as RTUTResult,
|
(case nDEItem.CheckResult when '1' then '合格' when '2' then '不合格' else '/' end) else '/' end) as RTUTResult,
|
||||||
(case when d.DetectionTypeCode='RT' or d.DetectionTypeCode='UT' then nDEItem.NDEReportNo else '/' end) as RTUTCheckNo,
|
(case when d.JointDetectionTypeStr='RT' or d.JointDetectionTypeStr='UT' then nDEItem.NDEReportNo else '/' end) as RTUTCheckNo,
|
||||||
(case when d.DetectionTypeCode='MT' or d.DetectionTypeCode='PT' then
|
(case when d.JointDetectionTypeStr='MT' or d.JointDetectionTypeStr='PT' then
|
||||||
(case nDEItem.CheckResult when '1' then '合格' when '2' then '不合格' else '/' end) else '/' end) as MTPTResult,
|
(case nDEItem.CheckResult when '1' then '合格' when '2' then '不合格' else '/' end) else '/' end) as MTPTResult,
|
||||||
(case when d.DetectionTypeCode='MT' or d.DetectionTypeCode='PT' then nDEItem.NDEReportNo else '/' end) as MTPTCheckNo,
|
(case when d.JointDetectionTypeStr='MT' or d.JointDetectionTypeStr='PT' then nDEItem.NDEReportNo else '/' end) as MTPTCheckNo,
|
||||||
nDEItem.Remark as CHT_Remark,pointBatch.PointBatchCode
|
nDEItem.Remark as CHT_Remark,pointBatch.PointBatchCode
|
||||||
from HJGL_Batch_NDEItem as nDEItem
|
from HJGL_Batch_NDEItem as nDEItem
|
||||||
left join HJGL_Batch_NDE as c on c.NDEID = nDEItem.NDEID
|
left join HJGL_Batch_NDE as c on c.NDEID = nDEItem.NDEID
|
||||||
left join HJGL_Batch_BatchTrustItem as t on t.TrustBatchItemId = nDEItem.TrustBatchItemId
|
left join HJGL_Batch_BatchTrustItem as t on t.TrustBatchItemId = nDEItem.TrustBatchItemId
|
||||||
left join HJGL_WeldJoint as j on j.WeldJointId = t.WeldJointId
|
left join HJGL_WeldJoint as j on j.WeldJointId = t.WeldJointId
|
||||||
left join HJGL_Pipeline as i on i.PipelineId =j.PipelineId
|
left join HJGL_Pipeline as i on i.PipelineId =j.PipelineId
|
||||||
left join Person_Persons as cWelder on cWelder.PersonId = j.CoverWelderId
|
left join SitePerson_Person as cWelder on cWelder.PersonId = j.CoverWelderId
|
||||||
left join Person_Persons as fWelder on fWelder.PersonId = j.BackingWelderId
|
left join SitePerson_Person as fWelder on fWelder.PersonId = j.BackingWelderId
|
||||||
left join Base_DetectionType as d on d.DetectionTypeId = nDEItem.DetectionTypeId
|
left join View_HJGL_WeldJointDetectionType as d on d.WeldJointId = t.WeldJointId
|
||||||
left join HJGL_Batch_PointBatchItem as pointBatchItem on pointBatchItem.PointBatchItemId = t.PointBatchItemId
|
left join HJGL_Batch_PointBatchItem as pointBatchItem on pointBatchItem.PointBatchItemId = t.PointBatchItemId
|
||||||
left join HJGL_Batch_PointBatch as pointBatch on pointBatch.PointBatchId = pointBatchItem.PointBatchId
|
left join HJGL_Batch_PointBatch as pointBatch on pointBatch.PointBatchId = pointBatchItem.PointBatchId
|
||||||
where j.PipelineId in ('" + isoIds + "')";
|
where j.PipelineId in ('" + isoIds + "')";
|
||||||
@@ -1265,8 +833,53 @@ namespace BLL
|
|||||||
return fastReportItem;
|
return fastReportItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<Model.PTP_TestPackagePrint> GetListByPTP_ID(string PTP_ID)
|
||||||
|
{
|
||||||
|
return Funs.DB.PTP_TestPackagePrint.Where(x => x.PTP_ID == PTP_ID).OrderBy(x => x.TypeInt).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 不合格检测统计方法
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pipelineId"></param>
|
||||||
|
/// <param name="detectionType"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static (int djJoint, int djFilm, int jhJoint, int jhFilm, int zgJoint, int zgFilm) GetNoPassDetectionStats(string pipelineId, string detectionType)
|
||||||
|
{
|
||||||
|
var baseQuery = from x in Funs.DB.HJGL_Batch_NDEItem
|
||||||
|
join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId
|
||||||
|
join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId
|
||||||
|
join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId
|
||||||
|
join d in Funs.DB.View_HJGL_WeldJointDetectionType on t.WeldJointId equals d.WeldJointId
|
||||||
|
where d.JointDetectionTypeStr == detectionType && z.PipelineId == pipelineId && x.CheckResult == "2"
|
||||||
|
select new { x, w.WeldTypeCode };
|
||||||
|
|
||||||
|
return (
|
||||||
|
djJoint: baseQuery.Where(q => q.WeldTypeCode == "BW").Count(),
|
||||||
|
djFilm: baseQuery.Where(q => q.WeldTypeCode == "BW").Sum(q => (q.x.TotalFilm - q.x.PassFilm)) ?? 0,
|
||||||
|
jhJoint: baseQuery.Where(q => q.WeldTypeCode == "C" || q.WeldTypeCode == "E").Count(),
|
||||||
|
jhFilm: baseQuery.Where(q => q.WeldTypeCode == "C" || q.WeldTypeCode == "E").Sum(q => (q.x.TotalFilm - q.x.PassFilm)) ?? 0,
|
||||||
|
zgJoint: baseQuery.Where(q => q.WeldTypeCode == "D").Count(),
|
||||||
|
zgFilm: baseQuery.Where(q => q.WeldTypeCode == "D").Sum(q => (q.x.TotalFilm - q.x.PassFilm)) ?? 0
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void Update(Model.PTP_TestPackagePrint newtable)
|
||||||
|
{
|
||||||
|
Model.PTP_TestPackagePrint table = Funs.DB.PTP_TestPackagePrint.FirstOrDefault(x => x.Id == newtable.Id);
|
||||||
|
if (table != null)
|
||||||
|
{
|
||||||
|
table.Id = newtable.Id;
|
||||||
|
table.PTP_ID = newtable.PTP_ID;
|
||||||
|
table.TypeInt = newtable.TypeInt;
|
||||||
|
table.PrintCount = newtable.PrintCount;
|
||||||
|
Funs.DB.SubmitChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion Methods
|
||||||
|
|
||||||
#region 格式化字符串
|
#region 格式化字符串
|
||||||
|
|
||||||
public static string getMaterialCodeByPipelineId(string pipelineId)
|
public static string getMaterialCodeByPipelineId(string pipelineId)
|
||||||
{
|
{
|
||||||
string materialCode = string.Empty;
|
string materialCode = string.Empty;
|
||||||
@@ -1294,7 +907,6 @@ namespace BLL
|
|||||||
materialCode = weldjoint.MaterialCode2;
|
materialCode = weldjoint.MaterialCode2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return materialCode;
|
return materialCode;
|
||||||
@@ -1313,7 +925,7 @@ namespace BLL
|
|||||||
}
|
}
|
||||||
return spcificaation;
|
return spcificaation;
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
#endregion 格式化字符串
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Report ScriptLanguage="CSharp" ReportInfo.Created="07/11/2025 15:24:21" ReportInfo.Modified="09/18/2025 10:19:16" ReportInfo.CreatorVersion="2017.1.16.0">
|
<Report ScriptLanguage="CSharp" ReportInfo.Created="07/11/2025 15:24:21" ReportInfo.Modified="09/26/2025 14:20:07" 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;
|
||||||
@@ -42,7 +42,7 @@ namespace FastReport
|
|||||||
}
|
}
|
||||||
</ScriptText>
|
</ScriptText>
|
||||||
<Dictionary>
|
<Dictionary>
|
||||||
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqM3/HbiZANEYP3Y6oNtE7mqsCE0NW5tkXiWL0RJsdm/BnXhHrIFd8DaTyqYvkCZwzxANNAMKR/4NYq8Hpgr74n03/lNGCep+NFhLBpywxcCJykGjY1hpi9XXIOAbXetC7CXLOSRSH8epZCbNSEsmvTn+6oa5Ga7wbTAiWTKBm7+K/ZyLsHdEDQE4HlsTkPVD69sa3ZgHVHZvZAvFH8k7oQw==">
|
<MsSqlDataConnection Name="Connection" ConnectionString="rijcmlqM3/HbiZANEYP3Y6oNtE7mqsCE0NW5tkXiWL0RJsdm/BnXhHrIFd8DaTyqYvkCZwzxANNAMKR/4NYq8Hpgr74n03/lNGCep+NFhLBpywxcCJykGjY1hpi9XXIOAbXetC7CXLOSRSH8epZCbNSEsmvTn+6oa5Ga7wbTAiWTKBm7+K/ZyLsHdEDQE4HlsTkPVD6hPmcrVtmOzJc5q8gCtPcbg==">
|
||||||
<TableDataSource Name="Data" DataType="System.Int32" PropName="Accident_AccidentHandle" Enabled="true" TableName="Data">
|
<TableDataSource Name="Data" DataType="System.Int32" PropName="Accident_AccidentHandle" Enabled="true" TableName="Data">
|
||||||
<Column Name="PipelineCode" DataType="System.String" PropName="AccidentHandleId"/>
|
<Column Name="PipelineCode" DataType="System.String" PropName="AccidentHandleId"/>
|
||||||
<Column Name="DetectionRateValue" DataType="System.String" PropName="ProjectId"/>
|
<Column Name="DetectionRateValue" DataType="System.String" PropName="ProjectId"/>
|
||||||
@@ -208,7 +208,7 @@ namespace FastReport
|
|||||||
</TableRow>
|
</TableRow>
|
||||||
</TableObject>
|
</TableObject>
|
||||||
</PageHeaderBand>
|
</PageHeaderBand>
|
||||||
<DataBand Name="Data1" Top="234.26" Width="971.46" Height="40.13" Guides="0,40.13">
|
<DataBand Name="Data1" Top="235.14" Width="971.46" Height="40.13" Guides="0,40.13">
|
||||||
<TableObject Name="Table3" Width="963.9" Height="40.13" Border.Lines="Left, Right, Bottom" ManualBuildEvent="Table3_ManualBuild">
|
<TableObject Name="Table3" Width="963.9" Height="40.13" Border.Lines="Left, Right, Bottom" ManualBuildEvent="Table3_ManualBuild">
|
||||||
<TableColumn Name="Column27" Width="48.6"/>
|
<TableColumn Name="Column27" Width="48.6"/>
|
||||||
<TableColumn Name="Column28" Width="95.85"/>
|
<TableColumn Name="Column28" Width="95.85"/>
|
||||||
@@ -232,9 +232,9 @@ namespace FastReport
|
|||||||
<TableColumn Name="Column46" Width="29.7"/>
|
<TableColumn Name="Column46" Width="29.7"/>
|
||||||
<TableColumn Name="Column47" Width="39.15"/>
|
<TableColumn Name="Column47" Width="39.15"/>
|
||||||
<TableRow Name="Row10" Height="40.13">
|
<TableRow Name="Row10" Height="40.13">
|
||||||
<TableCell Name="Cell165" Border.Lines="All" Text="[Data.PipelineCode]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt" ColSpan="2"/>
|
<TableCell Name="Cell165" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt" ColSpan="2"/>
|
||||||
<TableCell Name="Cell166" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
<TableCell Name="Cell166" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||||
<TableCell Name="Cell167" Border.Lines="All" Text="[Data.SingleNumber]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
<TableCell Name="Cell167" Border.Lines="All" Text="[Data.PipelineCode]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||||
<TableCell Name="Cell168" Border.Lines="All" Text="[Data.DetectionRateValue]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
<TableCell Name="Cell168" Border.Lines="All" Text="[Data.DetectionRateValue]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||||
<TableCell Name="Cell169" Border.Lines="All" Text="[Data.totalJotCountBW]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
<TableCell Name="Cell169" Border.Lines="All" Text="[Data.totalJotCountBW]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||||
<TableCell Name="Cell170" Border.Lines="All" Text="[Data.RTtotalJotCountBW]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
<TableCell Name="Cell170" Border.Lines="All" Text="[Data.RTtotalJotCountBW]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||||
@@ -256,8 +256,8 @@ namespace FastReport
|
|||||||
</TableRow>
|
</TableRow>
|
||||||
</TableObject>
|
</TableObject>
|
||||||
</DataBand>
|
</DataBand>
|
||||||
<ColumnFooterBand Name="ColumnFooter1" Top="320.77" Width="971.46">
|
<ColumnFooterBand Name="ColumnFooter1" Top="323.4" Width="971.46">
|
||||||
<ChildBand Name="Child1" Top="277.52" Width="971.46" Height="40.13" Guides="0,40.13" FillUnusedSpace="true">
|
<ChildBand Name="Child1" Top="279.27" Width="971.46" Height="40.13" Guides="0,40.13" FillUnusedSpace="true">
|
||||||
<TableObject Name="Table4" Width="963.9" Height="40.13" Border.Lines="Left, Right, Bottom">
|
<TableObject Name="Table4" Width="963.9" Height="40.13" Border.Lines="Left, Right, Bottom">
|
||||||
<TableColumn Name="Column48" Width="48.6"/>
|
<TableColumn Name="Column48" Width="48.6"/>
|
||||||
<TableColumn Name="Column49" Width="95.85"/>
|
<TableColumn Name="Column49" Width="95.85"/>
|
||||||
@@ -306,7 +306,7 @@ namespace FastReport
|
|||||||
</TableObject>
|
</TableObject>
|
||||||
</ChildBand>
|
</ChildBand>
|
||||||
</ColumnFooterBand>
|
</ColumnFooterBand>
|
||||||
<PageFooterBand Name="PageFooter1" Top="323.9" Width="971.46" Height="151.2" Guides="0,151.2,37.8,66.15,94.5,122.85">
|
<PageFooterBand Name="PageFooter1" Top="327.4" Width="971.46" Height="151.2" Guides="0,151.2,37.8,66.15,94.5,122.85">
|
||||||
<TableObject Name="Table5" Width="963.9" Height="151.2" Border.Lines="All">
|
<TableObject Name="Table5" Width="963.9" Height="151.2" Border.Lines="All">
|
||||||
<TableColumn Name="Column69" Width="321.3"/>
|
<TableColumn Name="Column69" Width="321.3"/>
|
||||||
<TableColumn Name="Column70" Width="321.3"/>
|
<TableColumn Name="Column70" Width="321.3"/>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Report ScriptLanguage="CSharp" ReportInfo.Created="01/09/2025 16:09:34" ReportInfo.Modified="09/18/2025 10:00:46" ReportInfo.CreatorVersion="2017.1.16.0">
|
<Report ScriptLanguage="CSharp" ReportInfo.Created="01/09/2025 16:09:34" ReportInfo.Modified="09/26/2025 11:05:59" 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;
|
||||||
@@ -67,7 +67,7 @@ namespace FastReport
|
|||||||
}
|
}
|
||||||
}</ScriptText>
|
}</ScriptText>
|
||||||
<Dictionary>
|
<Dictionary>
|
||||||
<MsSqlDataConnection Name="Connection1" ConnectionString="rijcmlqM7gJFg/iaLrqMhRfGy5lGjf8B9r68LcNRm542Oxj6bdsq8y94L+xTbZN1O2cfzth4gfOfsC8gRgfEghK5PiBVET2IYs7yXD0EmGmhMXfc1UdHyzSbMUjCa5gip5//BygeTK+HBsONEXMA6MXq2mCxf6mu3+F98NT3g2wocviv499nK5NcTkUaFnLEMIhPXSRTNrg5k9uAF8fQyvBFH66+Q==">
|
<MsSqlDataConnection Name="Connection1" ConnectionString="rijcmlqM7gJFg/iaLrqMhRfGy5lGjf8B9r68LcNRm542Oxj6bdsq8y94L+xTbZN1O2cfzth4gfOfsC8gRgfEghK5PiBVET2IYs7yXD0EmGmhMXfc1UdHyzSbMUjCa5gip5//BygeTK+HBsONEXMA6MXq2mCxf6mu3+F98NT3g2wocviv499nK5NcTkUaFnLEMIhPXSRNP3+H3aNKzxBrseZmY1cRQ==">
|
||||||
<TableDataSource Name="Table" Alias="Data" DataType="System.Int32" Enabled="true" SelectCommand="select checkItem.CHT_CheckItemID, i.ISO_IsoNumber, i.ISO_IsoNo, j.JOT_JointNo, (case when j.JOT_CellWelder is not null then ( case when j.JOT_FloorWelder is not null and j.JOT_CellWelder<>j.JOT_FloorWelder then cWelder.WED_Code+'/'+fWelder.WED_Code else cWelder.WED_Code end) else fWelder.WED_Code end) as WelderCode, (case when d.DetectionTypeCode='RT' or d.DetectionTypeCode='UT' then checkItem.CHT_CheckResult end) as RTUTResult, (case when d.DetectionTypeCode='RT' or d.DetectionTypeCode='UT' then checkItem.CHT_CheckNo end) as RTUTCheckNo, (case when d.DetectionTypeCode='MT' or d.DetectionTypeCode='PT' then checkItem.CHT_CheckResult end) as MTPTResult, (case when d.DetectionTypeCode='MT' or d.DetectionTypeCode='PT' then checkItem.CHT_CheckNo end) as MTPTCheckNo, checkItem.CHT_Remark from CH_CheckItem as checkItem left join CH_Check as c on c.CHT_CheckID=checkItem.CHT_CheckID left join PW_JointInfo as j on j.JOT_ID = checkItem.JOT_ID left join PW_IsoInfo as i on i.ISO_ID =j.ISO_ID left join BS_Welder as cWelder on cWelder.WED_ID =j.JOT_CellWelder left join BS_Welder as fWelder on fWelder.WED_ID=j.JOT_FloorWelder left join Base_DetectionType as d on d.DetectionTypeId =checkItem.CHT_CheckMethod where j.ISO_ID in ('" + @isoIds + "')">
|
<TableDataSource Name="Table" Alias="Data" DataType="System.Int32" Enabled="true" SelectCommand="select checkItem.CHT_CheckItemID, i.ISO_IsoNumber, i.ISO_IsoNo, j.JOT_JointNo, (case when j.JOT_CellWelder is not null then ( case when j.JOT_FloorWelder is not null and j.JOT_CellWelder<>j.JOT_FloorWelder then cWelder.WED_Code+'/'+fWelder.WED_Code else cWelder.WED_Code end) else fWelder.WED_Code end) as WelderCode, (case when d.DetectionTypeCode='RT' or d.DetectionTypeCode='UT' then checkItem.CHT_CheckResult end) as RTUTResult, (case when d.DetectionTypeCode='RT' or d.DetectionTypeCode='UT' then checkItem.CHT_CheckNo end) as RTUTCheckNo, (case when d.DetectionTypeCode='MT' or d.DetectionTypeCode='PT' then checkItem.CHT_CheckResult end) as MTPTResult, (case when d.DetectionTypeCode='MT' or d.DetectionTypeCode='PT' then checkItem.CHT_CheckNo end) as MTPTCheckNo, checkItem.CHT_Remark from CH_CheckItem as checkItem left join CH_Check as c on c.CHT_CheckID=checkItem.CHT_CheckID left join PW_JointInfo as j on j.JOT_ID = checkItem.JOT_ID left join PW_IsoInfo as i on i.ISO_ID =j.ISO_ID left join BS_Welder as cWelder on cWelder.WED_ID =j.JOT_CellWelder left join BS_Welder as fWelder on fWelder.WED_ID=j.JOT_FloorWelder left join Base_DetectionType as d on d.DetectionTypeId =checkItem.CHT_CheckMethod where j.ISO_ID in ('" + @isoIds + "')">
|
||||||
<Column Name="CHT_CheckItemID" Enabled="false" DataType="System.String"/>
|
<Column Name="CHT_CheckItemID" Enabled="false" DataType="System.String"/>
|
||||||
<Column Name="SingleName" DataType="System.String" PropName="ISO_IsoNumber"/>
|
<Column Name="SingleName" DataType="System.String" PropName="ISO_IsoNumber"/>
|
||||||
@@ -138,7 +138,7 @@ namespace FastReport
|
|||||||
<TableCell Name="Cell8" Border.Lines="Right, Bottom" Text="[UnitWorkName]" VertAlign="Center" Font="楷体, 10.5pt"/>
|
<TableCell Name="Cell8" Border.Lines="Right, Bottom" Text="[UnitWorkName]" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableObject>
|
</TableObject>
|
||||||
<ChildBand Name="Child3" Top="106.5" Width="971.46" Height="28.35" PrintOn="FirstPage" Guides="0,28.35">
|
<ChildBand Name="Child3" Top="107.38" Width="971.46" Height="28.35" PrintOn="FirstPage" Guides="0,28.35">
|
||||||
<TableObject Name="Table2" Width="963.52" Height="28.35" Border.Lines="Left, Right, Bottom">
|
<TableObject Name="Table2" Width="963.52" Height="28.35" Border.Lines="Left, Right, Bottom">
|
||||||
<TableColumn Name="Column4" Width="82.64"/>
|
<TableColumn Name="Column4" Width="82.64"/>
|
||||||
<TableColumn Name="Column5" Width="139.34"/>
|
<TableColumn Name="Column5" Width="139.34"/>
|
||||||
@@ -159,7 +159,7 @@ namespace FastReport
|
|||||||
<TableCell Name="Cell36" Border.Lines="All" Text="[ISOLevel]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
<TableCell Name="Cell36" Border.Lines="All" Text="[ISOLevel]" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableObject>
|
</TableObject>
|
||||||
<ChildBand Name="Child4" Top="137.98" Width="971.46" Height="47.25" Guides="0,47.25">
|
<ChildBand Name="Child4" Top="139.73" Width="971.46" Height="47.25" Guides="0,47.25">
|
||||||
<TableObject Name="Table3" Width="963.52" Height="47.25" Border.Lines="Left, Right, Bottom">
|
<TableObject Name="Table3" Width="963.52" Height="47.25" Border.Lines="Left, Right, Bottom">
|
||||||
<TableColumn Name="Column12" Width="82.64"/>
|
<TableColumn Name="Column12" Width="82.64"/>
|
||||||
<TableColumn Name="Column13" Width="139.34"/>
|
<TableColumn Name="Column13" Width="139.34"/>
|
||||||
@@ -180,7 +180,7 @@ namespace FastReport
|
|||||||
<TableCell Name="Cell44" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
<TableCell Name="Cell44" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableObject>
|
</TableObject>
|
||||||
<ChildBand Name="Child5" Top="188.35" Width="971.46" Height="170.11" PrintOn="FirstPage" Guides="0,170.11,56.71,33.08,23.63,85.06,113.41,141.76">
|
<ChildBand Name="Child5" Top="190.98" Width="971.46" Height="170.11" PrintOn="FirstPage" Guides="0,170.11,56.71,33.08,23.63,85.06,113.41,141.76">
|
||||||
<TableObject Name="Table4" Width="963.9" Height="170.11" Border.Lines="All">
|
<TableObject Name="Table4" Width="963.9" Height="170.11" Border.Lines="All">
|
||||||
<TableColumn Name="Column56" Width="81.9"/>
|
<TableColumn Name="Column56" Width="81.9"/>
|
||||||
<TableColumn Name="Column57" Width="110.25"/>
|
<TableColumn Name="Column57" Width="110.25"/>
|
||||||
@@ -193,11 +193,11 @@ namespace FastReport
|
|||||||
<TableColumn Name="Column64" Width="110.25"/>
|
<TableColumn Name="Column64" Width="110.25"/>
|
||||||
<TableRow Name="Row16" Height="33.08">
|
<TableRow Name="Row16" Height="33.08">
|
||||||
<TableCell Name="Cell172" Border.Lines="All" Text="检测方法" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt" RowSpan="2"/>
|
<TableCell Name="Cell172" Border.Lines="All" Text="检测方法" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt" RowSpan="2"/>
|
||||||
<TableCell Name="Cell173" Border.Lines="All" Text="检测数量统计(RT单位:道/张;UT/MT/PT单位:道/道)" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt" ColSpan="4"/>
|
<TableCell Name="Cell173" Border.Lines="All" Text="检测数量统计(RT单位:道/张;UT/MT/PT单位:道/米)" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt" ColSpan="4"/>
|
||||||
<TableCell Name="Cell174" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
<TableCell Name="Cell174" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||||
<TableCell Name="Cell175" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
<TableCell Name="Cell175" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||||
<TableCell Name="Cell176" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
<TableCell Name="Cell176" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||||
<TableCell Name="Cell197" Border.Lines="All" Text="不合格情况统计(RT单位:道/张;UT/MT/PT单位:道/米)" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt" ColSpan="4"/>
|
<TableCell Name="Cell197" Border.Lines="All" Text="不合格情况统计(RT单位:道/张;UT/MT/PT单位:道/处)" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt" ColSpan="4"/>
|
||||||
<TableCell Name="Cell198" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
<TableCell Name="Cell198" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||||
<TableCell Name="Cell199" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
<TableCell Name="Cell199" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||||
<TableCell Name="Cell200" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
<TableCell Name="Cell200" Border.Lines="All" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||||
@@ -258,7 +258,7 @@ namespace FastReport
|
|||||||
<TableCell Name="Cell317" Border.Lines="All" Text="/" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
<TableCell Name="Cell317" Border.Lines="All" Text="/" HorzAlign="Center" VertAlign="Center" Font="楷体, 10.5pt"/>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableObject>
|
</TableObject>
|
||||||
<ChildBand Name="Child6" Top="361.59" Width="971.46" Height="37.8" Guides="0,37.8">
|
<ChildBand Name="Child6" Top="365.09" Width="971.46" Height="37.8" Guides="0,37.8">
|
||||||
<TableObject Name="Table5" Width="964.26" Height="37.8" Border.Lines="All">
|
<TableObject Name="Table5" Width="964.26" Height="37.8" Border.Lines="All">
|
||||||
<TableColumn Name="Column74" Width="125.46"/>
|
<TableColumn Name="Column74" Width="125.46"/>
|
||||||
<TableColumn Name="Column75" Width="116.01"/>
|
<TableColumn Name="Column75" Width="116.01"/>
|
||||||
@@ -290,7 +290,7 @@ namespace FastReport
|
|||||||
</ChildBand>
|
</ChildBand>
|
||||||
</ChildBand>
|
</ChildBand>
|
||||||
</PageHeaderBand>
|
</PageHeaderBand>
|
||||||
<DataBand Name="Data1" Top="402.51" Width="971.46" Height="37.8" Guides="0,37.8">
|
<DataBand Name="Data1" Top="406.89" Width="971.46" Height="37.8" Guides="0,37.8">
|
||||||
<TableObject Name="Table9" Width="964.26" Height="37.8" Border.Lines="All" ManualBuildEvent="Table9_ManualBuild">
|
<TableObject Name="Table9" Width="964.26" Height="37.8" Border.Lines="All" ManualBuildEvent="Table9_ManualBuild">
|
||||||
<TableColumn Name="Column96" Width="125.46"/>
|
<TableColumn Name="Column96" Width="125.46"/>
|
||||||
<TableColumn Name="Column97" Width="116.01"/>
|
<TableColumn Name="Column97" Width="116.01"/>
|
||||||
@@ -309,17 +309,17 @@ namespace FastReport
|
|||||||
<TableCell Name="Cell320" Border.Lines="All" Text="[Data.WelderCode]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
<TableCell Name="Cell320" Border.Lines="All" Text="[Data.WelderCode]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||||
<TableCell Name="Cell321" Border.Lines="All" Text="[Data.PointBatchCode]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
<TableCell Name="Cell321" Border.Lines="All" Text="[Data.PointBatchCode]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||||
<TableCell Name="Cell322" Border.Lines="All" Text="[Data.RTUTResult]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
<TableCell Name="Cell322" Border.Lines="All" Text="[Data.RTUTResult]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||||
<TableCell Name="Cell323" Border.Lines="All" Text="[Data.RTUTCheckNo]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
<TableCell Name="Cell323" Border.Lines="All" Text="[Data.RTUTCheckNo]" HorzAlign="Center" VertAlign="Center" Font="宋体, 8pt"/>
|
||||||
<TableCell Name="Cell324" Border.Lines="All" Text="[Data.MTPTResult]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
<TableCell Name="Cell324" Border.Lines="All" Text="[Data.MTPTResult]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||||
<TableCell Name="Cell325" Border.Lines="All" Text="[Data.MTPTCheckNo]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
<TableCell Name="Cell325" Border.Lines="All" Text="[Data.MTPTCheckNo]" HorzAlign="Center" VertAlign="Center" Font="宋体, 8pt"/>
|
||||||
<TableCell Name="Cell326" Border.Lines="All" Text="/" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
<TableCell Name="Cell326" Border.Lines="All" Text="/" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||||
<TableCell Name="Cell327" Border.Lines="All" Text="/" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
<TableCell Name="Cell327" Border.Lines="All" Text="/" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||||
<TableCell Name="Cell328" Border.Lines="All" Text="[Data.CHT_Remark]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
<TableCell Name="Cell328" Border.Lines="All" Text="[Data.CHT_Remark]" HorzAlign="Center" VertAlign="Center" Font="宋体, 10.5pt"/>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableObject>
|
</TableObject>
|
||||||
</DataBand>
|
</DataBand>
|
||||||
<ColumnFooterBand Name="ColumnFooter1" Top="484.36" Width="971.46">
|
<ColumnFooterBand Name="ColumnFooter1" Top="490.49" Width="971.46">
|
||||||
<ChildBand Name="Child1" Top="443.44" Width="971.46" Height="37.8" Guides="0,37.8" FillUnusedSpace="true">
|
<ChildBand Name="Child1" Top="448.69" Width="971.46" Height="37.8" Guides="0,37.8" FillUnusedSpace="true">
|
||||||
<TableObject Name="Table8" Width="964.26" Height="37.8" Border.Lines="All">
|
<TableObject Name="Table8" Width="964.26" Height="37.8" Border.Lines="All">
|
||||||
<TableColumn Name="Column85" Width="125.46"/>
|
<TableColumn Name="Column85" Width="125.46"/>
|
||||||
<TableColumn Name="Column86" Width="116.01"/>
|
<TableColumn Name="Column86" Width="116.01"/>
|
||||||
@@ -348,7 +348,7 @@ namespace FastReport
|
|||||||
</TableObject>
|
</TableObject>
|
||||||
</ChildBand>
|
</ChildBand>
|
||||||
</ColumnFooterBand>
|
</ColumnFooterBand>
|
||||||
<PageFooterBand Name="PageFooter1" Top="487.49" Width="971.46" Height="85.04" PrintOn="FirstPage" Guides="0,85.04,42.52">
|
<PageFooterBand Name="PageFooter1" Top="494.49" Width="971.46" Height="85.04" PrintOn="FirstPage" Guides="0,85.04,42.52">
|
||||||
<TableObject Name="Table6" Width="963.9" Height="85.04" Border.Lines="All" PrintOn="FirstPage">
|
<TableObject Name="Table6" Width="963.9" Height="85.04" Border.Lines="All" PrintOn="FirstPage">
|
||||||
<TableColumn Name="Column53" Width="321.3"/>
|
<TableColumn Name="Column53" Width="321.3"/>
|
||||||
<TableColumn Name="Column54" Width="321.3"/>
|
<TableColumn Name="Column54" Width="321.3"/>
|
||||||
|
|||||||
@@ -65,6 +65,49 @@
|
|||||||
<f:HiddenField runat="server" ID="hdPTP_ID"></f:HiddenField>
|
<f:HiddenField runat="server" ID="hdPTP_ID"></f:HiddenField>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
|
<f:Panel ID="Panel2" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||||
|
ShowHeader="false" Layout="Region" BoxConfigAlign="Stretch">
|
||||||
|
<Items>
|
||||||
|
<f:Panel ID="panelTopRegion" runat="server" RegionPosition="Top" ShowBorder="true" RegionPercent="40%"
|
||||||
|
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="试压看板"
|
||||||
|
TitleToolTip="试压看板" AutoScroll="true">
|
||||||
|
<Items>
|
||||||
|
<f:Grid ID="Grid2" ShowBorder="true" ShowHeader="true" Title="试压包明细" EnableCollapse="true" Collapsed="false"
|
||||||
|
runat="server" BoxFlex="1" DataKeyNames="PTP_ID" AllowCellEditing="true"
|
||||||
|
EnableColumnLines="true" ClicksToEdit="2" DataIDField="PTP_ID" AllowSorting="true"
|
||||||
|
SortField="TestPackageNo" SortDirection="ASC" EnableTextSelection="True"
|
||||||
|
AllowPaging="true" IsDatabasePaging="false" PageSize="20" ForceFit="true">
|
||||||
|
<Columns>
|
||||||
|
<f:RenderField HeaderText="单位工程" ColumnID="UnitWorkName" DataField="UnitWorkName" SortField="UnitWorkName"
|
||||||
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="140px">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField HeaderText="试压包号" ColumnID="TestPackageNo" DataField="TestPackageNo" SortField="TestPackageNo"
|
||||||
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:CheckBoxField RenderAsStaticField="true" DataField="CanPressureTest" HeaderText="是否具备试压条件" Width="120px" />
|
||||||
|
<f:RenderField HeaderText="检测完成百分比" ColumnID="DetectionCompletionPercent" DataField="DetectionCompletionPercent" SortField="DetectionCompletionPercent"
|
||||||
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField HeaderText="焊口完成百分比" ColumnID="WeldCompletionPercent" DataField="WeldCompletionPercent" SortField="WeldCompletionPercent"
|
||||||
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField HeaderText="具备程度比值" ColumnID="TestPressure" DataField="TestPressure" SortField="TestPressure"
|
||||||
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField HeaderText="状态" ColumnID="StateStr" DataField="StateStr" SortField="StateStr"
|
||||||
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="90px">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField HeaderText="已完成百分比" ColumnID="TestPressure" DataField="TestPressure" SortField="TestPressure"
|
||||||
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField HeaderText="单位工程已完成百分比" ColumnID="TestPressure" DataField="TestPressure" SortField="TestPressure"
|
||||||
|
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px">
|
||||||
|
</f:RenderField>
|
||||||
|
</Columns>
|
||||||
|
</f:Grid>
|
||||||
|
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true" Layout="VBox" ShowHeader="false" BodyPadding="2px" IconFont="PlusCircle" Title="试压包"
|
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true" Layout="VBox" ShowHeader="false" BodyPadding="2px" IconFont="PlusCircle" Title="试压包"
|
||||||
TitleToolTip="试压包" AutoScroll="true">
|
TitleToolTip="试压包" AutoScroll="true">
|
||||||
<Items>
|
<Items>
|
||||||
@@ -143,6 +186,9 @@
|
|||||||
</f:Grid>
|
</f:Grid>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
|
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
</Items>
|
</Items>
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
<f:Window ID="Window1" Title="试压包维护" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
<f:Window ID="Window1" Title="试压包维护" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||||
|
|||||||
@@ -130,6 +130,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
|
|||||||
this.Grid1.Columns[4].HeaderText = "压力试验压力kpa(g)";
|
this.Grid1.Columns[4].HeaderText = "压力试验压力kpa(g)";
|
||||||
}
|
}
|
||||||
this.InitTreeMenu();//加载树
|
this.InitTreeMenu();//加载树
|
||||||
|
BindGrid2();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@@ -321,6 +322,32 @@ namespace FineUIPro.Web.HJGL.TestPackage
|
|||||||
Grid1.DataBind();
|
Grid1.DataBind();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取当前项目下所有试压包分析
|
||||||
|
/// </summary>
|
||||||
|
private void BindGrid2()
|
||||||
|
{
|
||||||
|
// 获取当前项目下所有试压包
|
||||||
|
var projectTestPackages = BLL.TestPackageEditService.GetTestPackageByProjectId(this.CurrUser.LoginProjectId);
|
||||||
|
if (projectTestPackages == null || projectTestPackages.Count == 0)
|
||||||
|
{
|
||||||
|
Grid2.DataSource = null;
|
||||||
|
Grid2.DataBind();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 分析每个试压包
|
||||||
|
var analyzeList = new List<Model.TestPackageAnalyzeOutput>();
|
||||||
|
foreach (var pkg in projectTestPackages)
|
||||||
|
{
|
||||||
|
var analyze = BLL.TestPackageEditService.getTestPackageAnalyze(pkg.PTP_ID, pkg.ProjectId);
|
||||||
|
analyzeList.Add(analyze);
|
||||||
|
}
|
||||||
|
// 绑定到Grid1
|
||||||
|
Grid2.RecordCount = analyzeList.Count;
|
||||||
|
Grid2.DataSource = analyzeList;
|
||||||
|
Grid2.DataBind();
|
||||||
|
}
|
||||||
|
|
||||||
#region 加载页面输入保存信息
|
#region 加载页面输入保存信息
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 加载页面输入保存信息
|
/// 加载页面输入保存信息
|
||||||
|
|||||||
@@ -7,10 +7,12 @@
|
|||||||
// </自动生成>
|
// </自动生成>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace FineUIPro.Web.HJGL.TestPackage {
|
namespace FineUIPro.Web.HJGL.TestPackage
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
public partial class TestPackageComplete {
|
public partial class TestPackageComplete
|
||||||
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Head1 控件。
|
/// Head1 控件。
|
||||||
@@ -84,6 +86,33 @@ namespace FineUIPro.Web.HJGL.TestPackage {
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.HiddenField hdPTP_ID;
|
protected global::FineUIPro.HiddenField hdPTP_ID;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Panel2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Panel Panel2;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// panelTopRegion 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Panel panelTopRegion;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Grid2 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Grid Grid2;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// panelCenterRegion 控件。
|
/// panelCenterRegion 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
namespace Model
|
||||||
|
{
|
||||||
|
public class TestPackageAnalyzeOutput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 试压包号
|
||||||
|
/// </summary>
|
||||||
|
public string PTP_ID { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 试压包编号
|
||||||
|
/// </summary>
|
||||||
|
public string TestPackageNo { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 单位工程名称
|
||||||
|
/// </summary>
|
||||||
|
public string UnitWorkName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否具备试压条件(全通过数量 == 管线数量,且未通过数为0)。
|
||||||
|
/// </summary>
|
||||||
|
public bool CanPressureTest { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 检测完成百分比(已检测焊口 / 总焊口 * 100,保留两位小数)。
|
||||||
|
/// </summary>
|
||||||
|
public decimal DetectionCompletionPercent { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 焊口完成百分比(已焊口 / 总焊口 * 100,保留两位小数)。
|
||||||
|
/// </summary>
|
||||||
|
public decimal WeldCompletionPercent { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 状态
|
||||||
|
/// </summary>
|
||||||
|
public string StateStr { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 当前试压包下的管线总数。
|
||||||
|
/// </summary>
|
||||||
|
public int TotalPipelines { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 当前试压包下的焊口总数。
|
||||||
|
/// </summary>
|
||||||
|
public int TotalWeldJoints { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 当前试压包下已焊接的焊口数。
|
||||||
|
/// </summary>
|
||||||
|
public int CompletedWeldJoints { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 当前试压包下已检测的焊口数(去重)。
|
||||||
|
/// </summary>
|
||||||
|
public int DetectedWeldJoints { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -6969,6 +6969,14 @@ namespace Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public System.Data.Linq.Table<View_HJGL_WeldJointDetectionType> View_HJGL_WeldJointDetectionType
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.GetTable<View_HJGL_WeldJointDetectionType>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public System.Data.Linq.Table<View_HJGL_WPQ> View_HJGL_WPQ
|
public System.Data.Linq.Table<View_HJGL_WPQ> View_HJGL_WPQ
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -295600,6 +295608,159 @@ namespace Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_HJGL_WeldJointDetectionType")]
|
||||||
|
public partial class View_HJGL_WeldJointDetectionType
|
||||||
|
{
|
||||||
|
|
||||||
|
private string _ProjectId;
|
||||||
|
|
||||||
|
private string _PipelineCode;
|
||||||
|
|
||||||
|
private string _DetectionType;
|
||||||
|
|
||||||
|
private string _DetectionTypeStr;
|
||||||
|
|
||||||
|
private string _JointDetectionTypeStr;
|
||||||
|
|
||||||
|
private string _WeldJointId;
|
||||||
|
|
||||||
|
private string _WeldJointCode;
|
||||||
|
|
||||||
|
private string _WeldJointNumStr;
|
||||||
|
|
||||||
|
public View_HJGL_WeldJointDetectionType()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")]
|
||||||
|
public string ProjectId
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._ProjectId;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._ProjectId != value))
|
||||||
|
{
|
||||||
|
this._ProjectId = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineCode", DbType="NVarChar(50)")]
|
||||||
|
public string PipelineCode
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._PipelineCode;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._PipelineCode != value))
|
||||||
|
{
|
||||||
|
this._PipelineCode = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DetectionType", DbType="NVarChar(150)")]
|
||||||
|
public string DetectionType
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._DetectionType;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._DetectionType != value))
|
||||||
|
{
|
||||||
|
this._DetectionType = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DetectionTypeStr", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
|
||||||
|
public string DetectionTypeStr
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._DetectionTypeStr;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._DetectionTypeStr != value))
|
||||||
|
{
|
||||||
|
this._DetectionTypeStr = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JointDetectionTypeStr", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
|
||||||
|
public string JointDetectionTypeStr
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._JointDetectionTypeStr;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._JointDetectionTypeStr != value))
|
||||||
|
{
|
||||||
|
this._JointDetectionTypeStr = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldJointId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
|
||||||
|
public string WeldJointId
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._WeldJointId;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._WeldJointId != value))
|
||||||
|
{
|
||||||
|
this._WeldJointId = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldJointCode", DbType="NVarChar(50)")]
|
||||||
|
public string WeldJointCode
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._WeldJointCode;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._WeldJointCode != value))
|
||||||
|
{
|
||||||
|
this._WeldJointCode = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldJointNumStr", DbType="NVarChar(50)")]
|
||||||
|
public string WeldJointNumStr
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._WeldJointNumStr;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._WeldJointNumStr != value))
|
||||||
|
{
|
||||||
|
this._WeldJointNumStr = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_HJGL_WPQ")]
|
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_HJGL_WPQ")]
|
||||||
public partial class View_HJGL_WPQ
|
public partial class View_HJGL_WPQ
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -245,6 +245,7 @@
|
|||||||
<Compile Include="HJGL\PrePipelineItem.cs" />
|
<Compile Include="HJGL\PrePipelineItem.cs" />
|
||||||
<Compile Include="HJGL\SpWeldingDailyItem.cs" />
|
<Compile Include="HJGL\SpWeldingDailyItem.cs" />
|
||||||
<Compile Include="HJGL\sp_index_HJGLItem.cs" />
|
<Compile Include="HJGL\sp_index_HJGLItem.cs" />
|
||||||
|
<Compile Include="HJGL\TestPackageAnalyzeOutput.cs" />
|
||||||
<Compile Include="HSSE\DigDataHSEDataCollectItem.cs" />
|
<Compile Include="HSSE\DigDataHSEDataCollectItem.cs" />
|
||||||
<Compile Include="HSSE\PageDataPersonInOutItem.cs" />
|
<Compile Include="HSSE\PageDataPersonInOutItem.cs" />
|
||||||
<Compile Include="HSSE\PuApiOutput.cs" />
|
<Compile Include="HSSE\PuApiOutput.cs" />
|
||||||
|
|||||||
Reference in New Issue
Block a user