From 0d19dcc80b6b1864be6813f4caf93996bb505d82 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期一, 26 一月 2026 09:46:14 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/条码管理/WEBSController.cs |  243 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 241 insertions(+), 2 deletions(-)

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 b5d5add..c1b4508 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"
@@ -1118,7 +1118,7 @@
                 }
                 else
                 {
-                    objJsonResult.code = "0";
+                    objJsonResult.code = "1";
                     objJsonResult.count = 1;
                     objJsonResult.Message = "鎴愬姛锛�";
                     objJsonResult.data = ds.Tables[0];
@@ -4870,6 +4870,62 @@
 
         #endregion
 
+        #region 鐢熶骇閫�鏂�    鏍¢獙妯″紡
+
+        /// <summary>
+        /// 鐢熶骇閫�鏂欐牎楠屼笂浼�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_SaveMateOutBackBill_BillCheck_Json")]
+        [HttpPost]
+        public object set_SaveMateOutBackBill_BillCheck_Json([FromBody] JObject oMain)
+        {
+            var _value = oMain["oMain"].ToString();
+            string msg1 = _value.ToString();
+
+            try
+            {
+                List<Model.ClsKf_ICStockBillMain> lsmain = new List<Model.ClsKf_ICStockBillMain>();
+                ListModels oListModels = new ListModels();
+                lsmain = oListModels.getICStockBillMainByJson(msg1);
+
+                WebAPI.WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain();
+
+                websLsmain.HInterID = lsmain[0].HInterID;
+                websLsmain.HBillNo = lsmain[0].HBillNo;
+                websLsmain.HBillType = "1244";
+                websLsmain.HMaker = lsmain[0].HMaker;
+                websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
+
+                if (oWebs.set_SaveMateOutBackBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //鎴愬姛锛�
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //澶辫触锛�
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鐢熶骇閫�鏂欐牎楠屽け璐ワ紒" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
         #endregion
 
         #region 閿�鍞��璐�    涓婁紶鐢熷崟
@@ -5250,6 +5306,28 @@
                 }
                 else
                 {
+
+                    //鍒犻櫎鍓嶆帶鍒�=========================================
+                    DataSet dds = oCn.RunProcReturn("Exec h_p_KF_ICInventory_WorkShop_BeforeDelCtrl " + mainList[0].HInterID.ToString()  , "h_p_KF_ICInventory_WorkShop_BeforeDelCtrl");
+
+                    if (dds == null)
+                    {
+                        oCn.RollBack();
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍒犻櫎鍓嶅垽鏂け璐ワ紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    if (DBUtility.ClsPub.isStrNull(dds.Tables[0].Rows[0]["HBack"]) != "0")
+                    {
+                        oCn.RollBack();
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍒犻櫎澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
                     //鏇存柊杞﹂棿鐗╂枡搴撳瓨
                     oCn.RunProc("EXEC h_p_WMS_UPDateICinventory_WorkShop " + mainList[0].HInterID.ToString() + ",'" + mainList[0].HBillType + "'");
                     //鏇存柊杞﹂棿鏉$爜搴撳瓨
@@ -7076,6 +7154,76 @@
                         sAutoBarCode = "Y";
                     }
                 }
+                //閲囪喘閫�鏂欏崟
+                else if (HBillType == "1239")
+                {
+                    //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+                    if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+                    {
+                        sSourceBarCodeCtl = "Y";
+                    }
+                    //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+                    if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_AutoBarCode.ToUpper() == "Y")
+                    {
+                        sAutoBarCode = "Y";
+                    }
+                }
+                //鐢熶骇閫�搴撳崟
+                else if (HBillType == "1245")
+                {
+                    //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+                    if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+                    {
+                        sSourceBarCodeCtl = "Y";
+                    }
+                    //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+                    if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_AutoBarCode.ToUpper() == "Y")
+                    {
+                        sAutoBarCode = "Y";
+                    }
+                }
+                //鐢熶骇閫�鏂欏崟
+                else if (HBillType == "1244")
+                {
+                    //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+                    if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+                    {
+                        sSourceBarCodeCtl = "Y";
+                    }
+                    //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+                    if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_AutoBarCode.ToUpper() == "Y")
+                    {
+                        sAutoBarCode = "Y";
+                    }
+                }
+                //閿�鍞��璐у崟
+                else if (HBillType == "1247")
+                {
+                    //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+                    if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+                    {
+                        sSourceBarCodeCtl = "Y";
+                    }
+                    //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+                    if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_AutoBarCode.ToUpper() == "Y")
+                    {
+                        sAutoBarCode = "Y";
+                    }
+                }
+                //濮斿閫�鏂欏崟
+                else if (HBillType == "1238")
+                {
+                    //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+                    if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+                    {
+                        sSourceBarCodeCtl = "Y";
+                    }
+                    //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+                    if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_AutoBarCode.ToUpper() == "Y")
+                    {
+                        sAutoBarCode = "Y";
+                    }
+                }
                 #endregion
 
                 if (oSystemParameter.omodel.WMS_CampanyName == "瀹夌憺") //绯荤粺鍙傛暟  瀹㈡埛瀹氬埗鍖栧悕绉�     绌虹櫧涓洪�氱敤
@@ -7742,6 +7890,51 @@
                     //鍏堣繘鍏堝嚭鎺у埗
                     sFIFOCtl = oSystemParameter.omodel.Kf_MoveStockBillCheck_FIFOCtl;
                 }
+                //閲囪喘閫�鏂欏崟
+                else if (HBillType == "1239")
+                {
+                    //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+                    if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+                    {
+                        sSourceBarCodeCtl = "Y";
+                    }
+                }
+                //鐢熶骇閫�搴撳崟
+                else if (HBillType == "1245")
+                {
+                    //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+                    if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+                    {
+                        sSourceBarCodeCtl = "Y";
+                    }
+                }
+                //鐢熶骇閫�鏂欏崟
+                else if (HBillType == "1244")
+                {
+                    //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+                    if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+                    {
+                        sSourceBarCodeCtl = "Y";
+                    }
+                }
+                //閿�鍞��璐у崟
+                else if (HBillType == "1247")
+                {
+                    //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+                    if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+                    {
+                        sSourceBarCodeCtl = "Y";
+                    }
+                }
+                //濮斿閫�鏂欏崟
+                else if (HBillType == "1238")
+                {
+                    //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+                    if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+                    {
+                        sSourceBarCodeCtl = "Y";
+                    }
+                }
                 #endregion
 
                 //鍘熷崟鎹负鎵爜鐢熸垚锛屽鍘熸壂鎻忕殑鏉$爜杩涜鏍稿锛屽垹闄ゆ潯鐮佸嚭鍏ュ簱鏍¢獙缂撳瓨璁板綍
@@ -8052,6 +8245,51 @@
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
                     if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+                    {
+                        sSourceBarCodeCtl = "Y";
+                    }
+                }
+                //閲囪喘閫�鏂欏崟
+                else if (HBillType == "1239")
+                {
+                    //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+                    if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+                    {
+                        sSourceBarCodeCtl = "Y";
+                    }
+                }
+                //鐢熶骇閫�搴撳崟
+                else if (HBillType == "1245")
+                {
+                    //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+                    if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+                    {
+                        sSourceBarCodeCtl = "Y";
+                    }
+                }
+                //鐢熶骇閫�鏂欏崟
+                else if (HBillType == "1244")
+                {
+                    //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+                    if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+                    {
+                        sSourceBarCodeCtl = "Y";
+                    }
+                }
+                //閿�鍞��璐у崟
+                else if (HBillType == "1247")
+                {
+                    //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+                    if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+                    {
+                        sSourceBarCodeCtl = "Y";
+                    }
+                }
+                //濮斿閫�鏂欏崟
+                else if (HBillType == "1238")
+                {
+                    //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+                    if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -13700,7 +13938,7 @@
         #endregion
 
         #region 娣诲悍鏍规嵁灏忚溅鏉$爜鎵惧嚭鐩稿簲鐗╂枡
-        #endregion
+        
         [Route("WEBSController/GetMaterIDByCarBarCode")]
         [HttpGet]
         public object GetMaterIDByCarBarCode(string CarBarCode)
@@ -13743,5 +13981,6 @@
                 return objJsonResult;
             }
         }
+        #endregion
     }
 }

--
Gitblit v1.9.1