From 0e197e038377f9d7bb78d5c4ece49a507e8e8648 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期一, 15 九月 2025 18:07:01 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/SCGL/日计划管理/Xs_SendGoodsPlanBillController.cs    |   31 +++++----
 WebAPI/Controllers/MateOutController.cs                            |   47 +++++++++++++++
 WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormBillController.cs |    5 +
 WebAPI/Controllers/品质管理/质量报表/QC_QualityReportsController.cs        |   43 ++++++++++++++
 WebAPI/Controllers/条码管理/WEBSController.cs                          |   10 +++
 5 files changed, 120 insertions(+), 16 deletions(-)

diff --git a/WebAPI/Controllers/MateOutController.cs b/WebAPI/Controllers/MateOutController.cs
index ae20b46..9c2b315 100644
--- a/WebAPI/Controllers/MateOutController.cs
+++ b/WebAPI/Controllers/MateOutController.cs
@@ -1212,6 +1212,53 @@
             }
         }
 
+        //杞﹂棿瀹氫綅  杞﹂棿涓婁笅鏋舵椂闂存煡璇�
+        [Route("Kf_WorkShopICStockBill/List")]
+        [HttpGet]
+        public object Kf_WorkShopICStockBillList(string HBillType, string HCarBarCode, string HProcExBillNo, string HMaterNumber, long HWHID, long HSPID, string sWhere)
+        {
+            try
+            {
+
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                List<object> columnNameList = new List<object>();
+                DataSet ds = oCN.RunProcReturn("exec h_p_KF_WorkShopICStockBillList '" + HBillType + "','" + HCarBarCode + "','" + HProcExBillNo + "','" + HMaterNumber + "'," + HWHID + "," + HSPID + ",'" + sWhere + "'", "h_p_KF_WorkShopICStockBillList");
+                //娣诲姞鍒楀悕
+                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鍒楀璞$殑鍒楀悕
+                }
+
+                if (ds == null || ds.Tables[0].Rows.Count <= 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    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;
+            }
+        }
+
         [Route("MateOutBill/Delete_Json")]
         [HttpGet]
         public object Delete_Json(long HInterID, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, string sHBillType)
diff --git "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs" "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs"
index f4fa98c..dca9e32 100644
--- "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs"
+++ "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs"
@@ -598,13 +598,14 @@
                         }
                     }
 
-                    SumDay = uniqueDates.Count;
-
                     if (oSystemParameter.omodel.WMS_CampanyName == "娣诲悍绉戞妧") //绯荤粺鍙傛暟  瀹㈡埛瀹氬埗鍖栧悕绉�     绌虹櫧涓洪�氱敤
                     {
                         SumDay = 180;
                     }            
 
+                    SumDay = uniqueDates.Count;
+
+
                     LogService.CustomWriteLog("2.3:" + i, DateTime.Now.ToString("yyyy-MM-dd"));
                     for (int j = 0; j < SumDay; j++)
                     {
diff --git "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/Xs_SendGoodsPlanBillController.cs" "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/Xs_SendGoodsPlanBillController.cs"
index 53ec03c..ecb210b 100644
--- "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/Xs_SendGoodsPlanBillController.cs"
+++ "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/Xs_SendGoodsPlanBillController.cs"
@@ -113,21 +113,24 @@
                     {
                         error += $"娌℃湁绗﹀悎鏉′欢寰楅攢鍞鍗曚俊鎭紝瀹㈡埛璁㈠崟鍙�:{ tb2.Rows[i]["瀹㈡埛璁㈠崟鍙�"].ToString()},浜у搧浠g爜:{tb2.Rows[i]["鐗╂枡缂栫爜"].ToString()}";
                     }
+                }
+                if (error.Length > 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = ErrorResult += $"Excel妯℃澘瀛樺湪閿欒锛寋error}\r\n"; ;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
 
-                    if (error.Length > 0)
-                    {
-                        objJsonResult.code = "0";
-                        objJsonResult.count = 0;
-                        objJsonResult.Message = ErrorResult += $"Excel妯℃澘瀛樺湪閿欒锛岃鏁皗i + 1}:{error}\r\n"; ;
-                        objJsonResult.data = null;
-                        return objJsonResult;
-                    }
-                    else
-                    {
-                        tb2.Rows[i]["HMaterID"] = ds.Tables[0].Rows[0]["HMaterID"].ToString();
-                        tb2.Rows[i]["SeOrderHInterID"] = ds.Tables[0].Rows[0]["FID"].ToString();//閿�鍞鍗曚富id
-                        tb2.Rows[i]["SeOrderHEntryID"] = ds.Tables[0].Rows[0]["FENTRYID"].ToString();//閿�鍞鍗曞瓙id
-                    }
+                //鏌ヨ閿�鍞〃鍒ゆ柇鏈夋病鏈夐攢鍞鍗曚俊鎭�
+                for (int i = 0; i < tb2.Rows.Count; i++)
+                {
+                    
+                    tb2.Rows[i]["HMaterID"] = ds.Tables[0].Rows[0]["HMaterID"].ToString();
+                    tb2.Rows[i]["SeOrderHInterID"] = ds.Tables[0].Rows[0]["FID"].ToString();//閿�鍞鍗曚富id
+                    tb2.Rows[i]["SeOrderHEntryID"] = ds.Tables[0].Rows[0]["FENTRYID"].ToString();//閿�鍞鍗曞瓙id
+                    
                     //鏌ユ壘鏄惁瀛樺湪瀵瑰簲鍙戣揣璁″垝宸ュ崟
                     var dt = oCN.RunProcReturn($"select * from Xs_SendGoodsPlanBillMain where HSeOrderInterID in({ds.Tables[0].Rows[0]["FID"].ToString()}) and  HSeOrderEntryID in({ds.Tables[0].Rows[0]["FENTRYID"].ToString()})", "Xs_SendGoodsPlanBillMain");
                     if (dt.Tables[0].Rows.Count > 0)
diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_QualityReportsController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_QualityReportsController.cs"
index 2f032bc..8342b19 100644
--- "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_QualityReportsController.cs"
+++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_QualityReportsController.cs"
@@ -482,6 +482,49 @@
         }
         #endregion
 
+        #region 璐ㄩ噺妯″潡 璐ㄩ噺杩芥函鎶ヨ〃鎶ヨ〃鏌ヨ(宸℃璁板綍鍗�)
+        /// <summary>
+        /// 杩斿洖璐ㄩ噺杩芥函鎶ヨ〃鍒楄〃
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("QC_Report/QualityTraceability5")]
+        [HttpGet]
+        public object QualityTraceability5(string HICMOBillNo, string HType)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                ds = oCN.RunProcReturn("exec h_p_Sc_QueryQualityByICMOBill '" + HType + "','" + HICMOBillNo + "'", "h_p_Sc_QueryQualityByICMOBill");
+
+
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[2].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 = "Sucess锛�";
+                objJsonResult.data = ds.Tables[4];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
         #region 璐ㄩ噺妯″潡 SPC妫�楠屽崟鍒嗘瀽
         /// <summary>
         /// 杩斿洖鐩撮�氱巼鎶ヨ〃鍒楄〃
diff --git "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
index 064ccda..de6c9fb 100644
--- "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
+++ "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
@@ -2549,6 +2549,7 @@
                 websLsmain.HInterID = lsmain[0].HInterID;
                 websLsmain.HBillNo = lsmain[0].HBillNo;
                 websLsmain.HBillType = "1202";
+                websLsmain.HMaker = lsmain[0].HMaker;
                 websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
 
                 if (oWebs.set_SaveProductInBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -2690,6 +2691,7 @@
                 websLsmain.HInterID = lsmain[0].HInterID;
                 websLsmain.HBillNo = lsmain[0].HBillNo;
                 websLsmain.HBillType = "1201";
+                websLsmain.HMaker = lsmain[0].HMaker;
                 websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
 
                 if (oWebs.set_SavePOStockInBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -2915,6 +2917,7 @@
                 websLsmain.HInterID = lsmain[0].HInterID;
                 websLsmain.HBillNo = lsmain[0].HBillNo;
                 websLsmain.HBillType = "1203";
+                websLsmain.HMaker = lsmain[0].HMaker;
                 websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
 
                 if (oWebs.set_SaveOtherInBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -3069,6 +3072,7 @@
                 websLsmain.HInterID = lsmain[0].HInterID;
                 websLsmain.HBillNo = lsmain[0].HBillNo;
                 websLsmain.HBillType = "1204";
+                websLsmain.HMaker = lsmain[0].HMaker;
                 websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
 
                 if (oWebs.set_SaveMateOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -3309,6 +3313,7 @@
                 websLsmain.HInterID = lsmain[0].HInterID;
                 websLsmain.HBillNo = lsmain[0].HBillNo;
                 websLsmain.HBillType = "1205";
+                websLsmain.HMaker = lsmain[0].HMaker;
                 websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
 
                 if (oWebs.set_SaveSellOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -3448,6 +3453,7 @@
                 websLsmain.HInterID = lsmain[0].HInterID;
                 websLsmain.HBillNo = lsmain[0].HBillNo;
                 websLsmain.HBillType = "1211";
+                websLsmain.HMaker = lsmain[0].HMaker;
                 websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
 
                 if (oWebs.set_SaveEntrustOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -3586,6 +3592,7 @@
                 websLsmain.HInterID = lsmain[0].HInterID;
                 websLsmain.HBillNo = lsmain[0].HBillNo;
                 websLsmain.HBillType = "1206";
+                websLsmain.HMaker = lsmain[0].HMaker;
                 websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
 
                 if (oWebs.set_SaveOtherOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -3723,6 +3730,7 @@
                 websLsmain.HInterID = lsmain[0].HInterID;
                 websLsmain.HBillNo = lsmain[0].HBillNo;
                 websLsmain.HBillType = "1254";
+                websLsmain.HMaker = lsmain[0].HMaker;
                 websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
 
                 if (oWebs.set_SaveMateReplenishOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -3782,6 +3790,7 @@
                 websLsmain.HInterID = lsmain[0].HInterID;
                 websLsmain.HBillNo = lsmain[0].HBillNo;
                 websLsmain.HBillType = "1255";
+                websLsmain.HMaker = lsmain[0].HMaker;
                 websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
 
                 if (oWebs.set_SaveEntrustReplenishOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -4069,6 +4078,7 @@
                 websLsmain.HInterID = lsmain[0].HInterID;
                 websLsmain.HBillNo = lsmain[0].HBillNo;
                 websLsmain.HBillType = "1207";
+                websLsmain.HMaker = lsmain[0].HMaker;
                 websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
 
                 if (oWebs.set_SaveMoveStockBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))

--
Gitblit v1.9.1