This commit is contained in:
2023-09-18 13:47:50 +08:00
2 changed files with 43 additions and 43 deletions
Binary file not shown.
@@ -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; var trustItems = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.RepairRecordId == r.RepairRecordId select x;
if (trustItems.Count() == 0) //未生成返修委托单 if (trustItems.Count() == 0) //未生成返修委托单
{ {
bool b = false; bool b = false; //查找无损检测委托单中是否已进行过返修 是 节点标记为红色
var trustItem = (from x in Funs.DB.HJGL_Batch_BatchTrustItem var trustItem = (from x in Funs.DB.HJGL_Batch_BatchTrustItem
join y in Funs.DB.HJGL_Batch_NDEItem on x.TrustBatchItemId equals y.TrustBatchItemId join y in Funs.DB.HJGL_Batch_NDEItem on x.TrustBatchItemId equals y.TrustBatchItemId
where y.NDEItemID == r.NDEItemID 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 join y in Funs.DB.HJGL_Batch_NDEItem on x.TrustBatchItemId equals y.TrustBatchItemId
where y.NDEItemID == repairRecord.NDEItemID where y.NDEItemID == repairRecord.NDEItemID
select x).FirstOrDefault(); select x).FirstOrDefault();
if (trustItem != null) //if (trustItem != null)
{ //{
var trustItems2 = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.TrustBatchId == trustItem.TrustBatchId select x; // var trustItems2 = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.TrustBatchId == trustItem.TrustBatchId select x;
foreach (var item in trustItems2) // foreach (var item in trustItems2)
{ // {
var ndeItem = Funs.DB.HJGL_Batch_NDEItem.FirstOrDefault(x => x.TrustBatchItemId == item.TrustBatchItemId); // var ndeItem = Funs.DB.HJGL_Batch_NDEItem.FirstOrDefault(x => x.TrustBatchItemId == item.TrustBatchItemId);
if (ndeItem != null) // if (ndeItem != null)
{ // {
var repair = Funs.DB.HJGL_RepairRecord.FirstOrDefault(x => x.NDEItemID == ndeItem.NDEItemID); // var repair = Funs.DB.HJGL_RepairRecord.FirstOrDefault(x => x.NDEItemID == ndeItem.NDEItemID);
if (repair != null) // if (repair != null)
{ // {
var trustItem3s = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.RepairRecordId == repair.RepairRecordId select x; // var trustItem3s = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.RepairRecordId == repair.RepairRecordId select x;
if (trustItem3s.Count() > 0) // if (trustItem3s.Count() > 0)
{ // {
Alert.ShowInTop("本次返修已扩透!", MessageBoxIcon.Warning); // Alert.ShowInTop("本次返修已扩透!", MessageBoxIcon.Warning);
return; // return;
} // }
} // }
} // }
} // }
} //}
if (!repairRecord.AuditDate.HasValue) 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 join y in Funs.DB.HJGL_Batch_NDEItem on x.TrustBatchItemId equals y.TrustBatchItemId
where y.NDEItemID == repairRecord.NDEItemID where y.NDEItemID == repairRecord.NDEItemID
select x).FirstOrDefault(); select x).FirstOrDefault();
if (trustItem1 != null) //if (trustItem1 != null)
{ //{
var trustItems2 = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.TrustBatchId == trustItem1.TrustBatchId select x; // var trustItems2 = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.TrustBatchId == trustItem1.TrustBatchId select x;
foreach (var item in trustItems2) // foreach (var item in trustItems2)
{ // {
var ndeItem = Funs.DB.HJGL_Batch_NDEItem.FirstOrDefault(x => x.TrustBatchItemId == item.TrustBatchItemId); // var ndeItem = Funs.DB.HJGL_Batch_NDEItem.FirstOrDefault(x => x.TrustBatchItemId == item.TrustBatchItemId);
if (ndeItem != null) // if (ndeItem != null)
{ // {
var repair = Funs.DB.HJGL_RepairRecord.FirstOrDefault(x => x.NDEItemID == ndeItem.NDEItemID); // var repair = Funs.DB.HJGL_RepairRecord.FirstOrDefault(x => x.NDEItemID == ndeItem.NDEItemID);
if (repair != null) // if (repair != null)
{ // {
var trustItem3s = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.RepairRecordId == repair.RepairRecordId select x; // var trustItem3s = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.RepairRecordId == repair.RepairRecordId select x;
if (trustItem3s.Count() > 0) // if (trustItem3s.Count() > 0)
{ // {
Alert.ShowInTop("本次返修已委托!", MessageBoxIcon.Warning); // Alert.ShowInTop("本次返修已委托!", MessageBoxIcon.Warning);
return; // return;
} // }
} // }
} // }
} // }
} //}
var trustItem = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.RepairRecordId == repairRecordId select x; var trustItem = from x in Funs.DB.HJGL_Batch_BatchTrustItem where x.RepairRecordId == repairRecordId select x;
if (trustItem.Count() == 0) if (trustItem.Count() == 0)
{ {