2023-09-18

This commit is contained in:
李鹏飞 2023-09-18 13:04:48 +08:00
parent 578bb8bfa7
commit 5899ff57c0
2 changed files with 43 additions and 43 deletions

Binary file not shown.

View File

@ -259,7 +259,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand
var trustItems = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.RepairRecordId == r.RepairRecordId select x;
if (trustItems.Count() == 0) //未生成返修委托单
{
bool b = false;
bool b = false; //查找无损检测委托单中是否已进行过返修 是 节点标记为红色
var trustItem = (from x in Funs.DB.HJGL_Batch_BatchTrustItem
join y in Funs.DB.HJGL_Batch_NDEItem on x.TrustBatchItemId equals y.TrustBatchItemId
where y.NDEItemID == r.NDEItemID
@ -702,27 +702,27 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand
join y in Funs.DB.HJGL_Batch_NDEItem on x.TrustBatchItemId equals y.TrustBatchItemId
where y.NDEItemID == repairRecord.NDEItemID
select x).FirstOrDefault();
if (trustItem != null)
{
var trustItems2 = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.TrustBatchId == trustItem.TrustBatchId select x;
foreach (var item in trustItems2)
{
var ndeItem = Funs.DB.HJGL_Batch_NDEItem.FirstOrDefault(x => x.TrustBatchItemId == item.TrustBatchItemId);
if (ndeItem != null)
{
var repair = Funs.DB.HJGL_RepairRecord.FirstOrDefault(x => x.NDEItemID == ndeItem.NDEItemID);
if (repair != null)
{
var trustItem3s = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.RepairRecordId == repair.RepairRecordId select x;
if (trustItem3s.Count() > 0)
{
Alert.ShowInTop("本次返修已扩透!", MessageBoxIcon.Warning);
return;
}
}
}
}
}
//if (trustItem != null)
//{
// var trustItems2 = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.TrustBatchId == trustItem.TrustBatchId select x;
// foreach (var item in trustItems2)
// {
// var ndeItem = Funs.DB.HJGL_Batch_NDEItem.FirstOrDefault(x => x.TrustBatchItemId == item.TrustBatchItemId);
// if (ndeItem != null)
// {
// var repair = Funs.DB.HJGL_RepairRecord.FirstOrDefault(x => x.NDEItemID == ndeItem.NDEItemID);
// if (repair != null)
// {
// var trustItem3s = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.RepairRecordId == repair.RepairRecordId select x;
// if (trustItem3s.Count() > 0)
// {
// Alert.ShowInTop("本次返修已扩透!", MessageBoxIcon.Warning);
// return;
// }
// }
// }
// }
//}
if (!repairRecord.AuditDate.HasValue)
{
// 更新返修记录
@ -855,27 +855,27 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand
join y in Funs.DB.HJGL_Batch_NDEItem on x.TrustBatchItemId equals y.TrustBatchItemId
where y.NDEItemID == repairRecord.NDEItemID
select x).FirstOrDefault();
if (trustItem1 != null)
{
var trustItems2 = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.TrustBatchId == trustItem1.TrustBatchId select x;
foreach (var item in trustItems2)
{
var ndeItem = Funs.DB.HJGL_Batch_NDEItem.FirstOrDefault(x => x.TrustBatchItemId == item.TrustBatchItemId);
if (ndeItem != null)
{
var repair = Funs.DB.HJGL_RepairRecord.FirstOrDefault(x => x.NDEItemID == ndeItem.NDEItemID);
if (repair != null)
{
var trustItem3s = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.RepairRecordId == repair.RepairRecordId select x;
if (trustItem3s.Count() > 0)
{
Alert.ShowInTop("本次返修已委托!", MessageBoxIcon.Warning);
return;
}
}
}
}
}
//if (trustItem1 != null)
//{
// var trustItems2 = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.TrustBatchId == trustItem1.TrustBatchId select x;
// foreach (var item in trustItems2)
// {
// var ndeItem = Funs.DB.HJGL_Batch_NDEItem.FirstOrDefault(x => x.TrustBatchItemId == item.TrustBatchItemId);
// if (ndeItem != null)
// {
// var repair = Funs.DB.HJGL_RepairRecord.FirstOrDefault(x => x.NDEItemID == ndeItem.NDEItemID);
// if (repair != null)
// {
// var trustItem3s = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.RepairRecordId == repair.RepairRecordId select x;
// if (trustItem3s.Count() > 0)
// {
// Alert.ShowInTop("本次返修已委托!", MessageBoxIcon.Warning);
// return;
// }
// }
// }
// }
//}
var trustItem = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.RepairRecordId == repairRecordId select x;
if (trustItem.Count() == 0)
{