From dd5ee46ce65024040796301aef1679a4df199c14 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期三, 03 十二月 2025 17:16:09 +0800
Subject: [PATCH] 增加上模单app保存方法和校验方法 增加量具临期预警报表

---
 WebAPI/Controllers/SCGL/QC_OutCompCheckBillController.cs |  156 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 156 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/SCGL/QC_OutCompCheckBillController.cs b/WebAPI/Controllers/SCGL/QC_OutCompCheckBillController.cs
index a2242cf..ea72ee8 100644
--- a/WebAPI/Controllers/SCGL/QC_OutCompCheckBillController.cs
+++ b/WebAPI/Controllers/SCGL/QC_OutCompCheckBillController.cs
@@ -299,6 +299,7 @@
                 BillNew.omodel.HBillNo = mainList[0].HBillNo;//閫掑叆type寰楀埌鐨勫崟鎹彿
                 BillNew.omodel.HDate = HDate;
                 BillNew.omodel.HRemark = mainList[0].HRemark;//澶囨敞
+                BillNew.omodel.HRemarkSN = mainList[0].HRemarkSN;//SN澶囨敞
                 BillNew.omodel.HMaker = mainList[0].HMaker;
                 BillNew.omodel.HSourceID = ClsPub.isLong(mainList[0].HSourceID);
                 BillNew.omodel.HICMOInterID = ClsPub.isLong(mainList[0].HICMOInterID);
@@ -372,6 +373,12 @@
                         oSub.HKeyInspect = DBUtility.ClsPub.isLong(subList[i].HKeyInspect);
                         oSub.HInspectInstruMentID = DBUtility.ClsPub.isLong(subList[i].HInspectInstruMentID);
                         oSub.HInspectResult = DBUtility.ClsPub.isStrNull(subList[i].HResult);
+
+                        oSub.HQualityStdID = DBUtility.ClsPub.isLong(subList[i].HQualityStdID);//璐ㄩ噺鏍囧噯
+                        oSub.HInspectMethodID = DBUtility.ClsPub.isLong(subList[i].HInspectMethodID);//妫�楠屾柟娉�
+                        oSub.HInspectBasisID = DBUtility.ClsPub.isLong(subList[i].HInspectBasisID);//妫�楠屼緷鎹�
+                        oSub.HCompareSymbol = DBUtility.ClsPub.isStrNull(subList[i].HCompareSymbol);//姣旇緝绗�
+
                         BillNew.DetailColl.Add(oSub);
                     }
                     else
@@ -1268,5 +1275,154 @@
             }
         }
         #endregion
+
+
+        #region 鍑哄巶妫�楠屽崟鏍规嵁婧愬崟鑾峰彇淇℃伅-婧愬崟涓洪攢鍞鍗曢�氳繃鍗曟嵁鍙�(1401)
+        /// <summary>
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("QC_OutCompCheckBill/get_SeOrderBill_Tmp_ByBiilNo")]
+        [HttpGet]
+        public object get_SeOrderBill_Tmp_ByBiilNo(string HBillNo, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                if ( HBillNo.Equals(""))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍙傛暟涓嶅叏锛岃幏鍙栨簮鍗曚俊鎭け璐ワ紒 ";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                string sReturn = "";
+                string sql = "";
+                if (oSystemParameter.ShowBill(ref sReturn))
+                {
+                    switch (oSystemParameter.omodel.QC_OutCompCheckBill_QCSchemeSource)
+                    {
+                        case "鐗╂枡":
+                            sql = "exec h_p_QC_GetInfoBySeOrderBill_ByBillNo " + "'鐗╂枡'" + ",'" + HBillNo +"'";
+                            break;
+                    }
+
+                }
+
+                ds = oCN.RunProcReturn(sql, "h_p_QC_GetInfoBySeOrderBill_ByBillNo");
+
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃煡璇㈠埌鏁版嵁锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    //娣诲姞鍒楀悕
+                    foreach (DataColumn col in ds.Tables[0].Columns)
+                    {
+                        Type dataType = col.DataType;
+                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                    }
+
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+                    objJsonResult.data = ds.Tables[0];
+                    objJsonResult.list = columnNameList;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 鍑哄巶妫�楠屽崟鏍规嵁婧愬崟鑾峰彇淇℃伅-婧愬崟涓哄彂璐ч�氱煡鍗曢�氳繃鍗曟嵁鍙�(1401)
+        /// <summary>
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("QC_OutCompCheckBill/get_SeOutStockBill_Tmp_ByBillNo")]
+        [HttpGet]
+        public object get_SeOutStockBill_Tmp_ByBillNo(string HBillNo, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                if (HBillNo.Equals(""))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍙傛暟涓嶅叏锛岃幏鍙栨簮鍗曚俊鎭け璐ワ紒 ";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                string sReturn = "";
+                string sql = "";
+                if (oSystemParameter.ShowBill(ref sReturn))
+                {
+                    switch (oSystemParameter.omodel.QC_OutCompCheckBill_QCSchemeSource)
+                    {
+                        case "鐗╂枡":
+                            sql = "exec h_p_QC_GetInfoBySeOutStockBill_ByBillNo " + "'鐗╂枡'" + ",'" + HBillNo + "'";
+                            break;
+                    }
+
+                }
+
+                ds = oCN.RunProcReturn(sql, "h_p_QC_GetInfoBySeOutStockBill_ByBillNo");
+
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃煡璇㈠埌鏁版嵁锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    //娣诲姞鍒楀悕
+                    foreach (DataColumn col in ds.Tables[0].Columns)
+                    {
+                        Type dataType = col.DataType;
+                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                    }
+
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+                    objJsonResult.data = ds.Tables[0];
+                    objJsonResult.list = columnNameList;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1