From 6cdde9817310399d7ff829dcb19e580b64f13cf4 Mon Sep 17 00:00:00 2001 From: 啊鑫 <t2856754968@163.com> Date: 星期三, 25 九月 2024 18:10:43 +0800 Subject: [PATCH] 更新SqlSugar的框架。入库检增加回写工序,工单,条码的操作。增加入库单检验结果处理后无法更改检验值的校验 --- MES.Service/service/QC/LljService.cs | 26 +++++++++++++++++++------- 1 files changed, 19 insertions(+), 7 deletions(-) diff --git a/MES.Service/service/QC/LljService.cs b/MES.Service/service/QC/LljService.cs index afbfdf1..3e4fa9a 100644 --- a/MES.Service/service/QC/LljService.cs +++ b/MES.Service/service/QC/LljService.cs @@ -82,31 +82,37 @@ string LEV = null; switch (item.FcheckLevel) { - case string s when s.Contains("S1"): + case null: + LEV = ""; // 榛樿鍊� + break; + case { } s when s.Contains("S1"): LEV = "B.FLEVEL_S1"; break; - case string s when s.Contains("S2"): + case { } s when s.Contains("S2"): LEV = "B.FLEVEL_S2"; break; - case string s when s.Contains("S3"): + case { } s when s.Contains("S3"): LEV = "B.FLEVEL_S3"; break; - case string s when s.Contains("S4"): + case { } s when s.Contains("S4"): LEV = "B.FLEVEL_S4"; break; - case string s when s.Contains("(I)"): + case { } s when s.Contains("(I)"): LEV = "B.FLEVEL_I"; break; - case string s when s.Contains("(II)"): + case { } s when s.Contains("(II)"): LEV = "B.FLEVEL_II"; break; - case string s when s.Contains("(III)"): + case { } s when s.Contains("(III)"): LEV = "B.FLEVEL_III"; break; default: LEV = ""; // 榛樿鍊� break; } + + if (string.IsNullOrEmpty(LEV)) + throw new Exception(item.SampleSizeNo + "鐨勬楠屾按骞充笉姝g‘"); var sql = "SELECT " + LEV + @@ -117,9 +123,15 @@ var maxBillNo = db.Ado.SqlQuerySingle<string>(sql); + if (string.IsNullOrEmpty(maxBillNo)) + throw new Exception(item.SampleSizeNo + "涓嬬殑" + quantity + + "杩欎釜鑼冨洿涓嬫病鏈夊尮閰嶅埌妫�楠岄」鐩�"); var result = ExtractSubstring(item.FacLevel, '(', ')'); + if (string.IsNullOrEmpty(result)) + throw new Exception(item.SampleSizeNo + "涓嬬殑" + quantity + + "鎷掓敹姘村钩涓嶆纭�"); sql = "SELECT FSAMPLE_SIZE_WORD, " + result + " Result FROM MES_QM_AQL1 A LEFT JOIN MES_QM_AQL3 C ON C.AQL1_ID=A.ID WHERE A.SAMPLE_SIZE_NO= '" + -- Gitblit v1.9.3