diff --git a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRating.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRating.aspx.cs index cf19ad1..4ec0d51 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRating.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/CheckManage/QualityRating.aspx.cs @@ -663,6 +663,7 @@ namespace FineUIPro.Web.HJGL.CheckManage bool b = true; //默认合格 bool bRT = true; //RT默认合格 bool needRemake = false; //重拍 + bool hasResult = true; //是否有检测结果 foreach (JObject mergedRow in Grid1.GetMergedData()) { JObject values = mergedRow.Value("values"); @@ -678,39 +679,45 @@ namespace FineUIPro.Web.HJGL.CheckManage Model.HJGL_CH_Trust trust1 = BLL.HJGL_TrustManageEditService.GetCH_TrustByID(oldTrustItem.CH_TrustID); if (trust1.CH_NDTMethod != "20d2cbca-8b3d-434b-b1c1-181796986fa5") //非RT检测,更新焊口检测状态 { - if (b) + if (hasResult) { - if (needRemake) + if (b) { - oldTrustItem.States = "3"; //待重检 + if (needRemake) + { + oldTrustItem.States = "3"; //待重检 + } + else + { + oldTrustItem.States = "2"; //检测合格 + } } else { - oldTrustItem.States = "2"; //检测合格 + oldTrustItem.States = "4"; //待返修 } } - else - { - oldTrustItem.States = "4"; //待返修 - } } else { - if (bRT) + if (hasResult) { - if (needRemake) + if (bRT) { - oldTrustItem.States = "3"; //待重检 + if (needRemake) + { + oldTrustItem.States = "3"; //待重检 + } + else + { + oldTrustItem.States = "2"; //检测合格 + } } else { - oldTrustItem.States = "2"; //检测合格 + oldTrustItem.States = "4"; //待返修 } } - else - { - oldTrustItem.States = "4"; //待返修 - } } oldTrustItem.FeedbackMan = this.CurrUser.UserName; @@ -721,7 +728,7 @@ namespace FineUIPro.Web.HJGL.CheckManage b = true; bRT = true; needRemake = false; - + hasResult = true; filmNum = 0; rMatNum = 0; } @@ -795,6 +802,10 @@ namespace FineUIPro.Web.HJGL.CheckManage b = false; bRT = false; } + if (values.Value("IsPass") == "") + { + hasResult = false; + } if (Convert.ToBoolean(values.Value("Remake"))) { needRemake = true; @@ -869,39 +880,45 @@ namespace FineUIPro.Web.HJGL.CheckManage Model.HJGL_CH_Trust trust1 = BLL.HJGL_TrustManageEditService.GetCH_TrustByID(oldTrustItem1.CH_TrustID); if (trust1.CH_NDTMethod != "20d2cbca-8b3d-434b-b1c1-181796986fa5") //非RT检测,更新焊口检测状态 { - if (b) + if (hasResult) { - if (needRemake) + if (b) { - oldTrustItem1.States = "3"; //待重检 + if (needRemake) + { + oldTrustItem1.States = "3"; //待重检 + } + else + { + oldTrustItem1.States = "2"; //检测合格 + } } else { - oldTrustItem1.States = "2"; //检测合格 + oldTrustItem1.States = "4"; //待返修 } } - else - { - oldTrustItem1.States = "4"; //待返修 - } } else { - if (bRT) + if (hasResult) { - if (needRemake) + if (bRT) { - oldTrustItem1.States = "3"; //待重检 + if (needRemake) + { + oldTrustItem1.States = "3"; //待重检 + } + else + { + oldTrustItem1.States = "2"; //检测合格 + } } else { - oldTrustItem1.States = "2"; //检测合格 + oldTrustItem1.States = "4"; //待返修 } } - else - { - oldTrustItem1.States = "4"; //待返修 - } } oldTrustItem1.FeedbackMan = this.CurrUser.UserName; oldTrustItem1.FeedbackDate = DateTime.Now;