啊鑫
2024-09-23 54445846644d77fb7a89f736f2c5bfe673ce3653
MES.Service/service/QC/RKJService.cs
@@ -106,25 +106,28 @@
            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:
@@ -132,7 +135,7 @@
                    break;
            }
            if (string.IsNullOrEmpty(LEV)) throw new Exception("检验水平维护的不正确");
            if (string.IsNullOrEmpty(LEV)) throw new Exception(item.QsCode+"下的检验水平维护的不正确");
            var sql =
                "SELECT " + LEV +
@@ -143,12 +146,12 @@
            var maxBillNo = db.Ado.SqlQuerySingle<string>(sql);
            if (string.IsNullOrEmpty(maxBillNo))
                throw new Exception("没有" + quantity + "这个范围的抽样基准");
                throw new Exception(item.QsCode+"下没有" + quantity + "这个范围的抽样基准");
            var result = ExtractSubstring(item.FacLevel, '(', ')');
            if (string.IsNullOrEmpty(result))
                throw new Exception("维护的接收水平不正确,应该是0.010---(AQL_0_0010)像这样的");
                throw new Exception(item.QsCode+"维护的接收水平不正确,应该是0.010---(AQL_0_0010)这样");
            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= '" +