From aebf2e58305fce0dab246f18adc017a52e81a67d Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期四, 31 七月 2025 16:53:03 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/条码管理/WEBSController.cs |  300 ++++++++++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 233 insertions(+), 67 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 854b6ad..63d771f 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"
@@ -1453,28 +1453,107 @@
         {
             try
             {
-                if (oWebs.set_DelPonderationBillMain_Temp_FIFO(HInterID, HBillType, 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;
-                }
+                //鏇存柊鍏堣繘鍏堝嚭涓存椂琛ㄧ姸鎬�
+                oCn.RunProc("EXEC h_p_WMS_UPDateICInventory_FIFO_Tmp " + HInterID.ToString() + ",'" + HBillType + "'");
+                objJsonResult.code = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //鎴愬姛锛�
+                objJsonResult.data = null;
+                return objJsonResult;
             }
             catch (Exception e)
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
                 objJsonResult.Message = "鏇存柊鍏堣繘鍏堝嚭涓存椂琛℉lineStatus鍊煎け璐ワ紒" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        /// <summary>
+        /// 鍑哄簱鎵爜妯″潡锛岄��鍑烘椂鏇存柊鍏堣繘鍏堝嚭涓存椂琛ㄧ姸鎬� HlineStatus  20250722
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_DelPonderationBillMain_Temp_FIFO_New_Json")]
+        [HttpGet]
+        public object set_DelPonderationBillMain_Temp_FIFO_New_Json(long HInterID, string HBillType, Int64 HStockOrgID)
+        {
+            //鑾峰彇绯荤粺鍙傛暟
+            string sErrMsg = "";
+            if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
+            {
+                string sERPMode = oSystemParameter.omodel.WMS_WMSStockCtl_ERPMode;   //搴撳瓨鎺у埗-WMS搴撳瓨鎺у埗ERP妯″紡	(WISE銆丆LOUD銆丮ES)
+                string sFIFOCtl = "N";          //鍏堣繘鍏堝嚭鎺у埗锛�'Y'涓烘帶鍒讹級
+
+                //鐢熶骇棰嗘枡鍗�-鍏堣繘鍏堝嚭鎺у埗
+                if (HBillType == "1204" && (oSystemParameter.omodel.Kf_MateOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_MateOutBill_FIFOList.ToUpper() == "Y"))
+                {
+                    sFIFOCtl = "Y";
+                }
+                //閿�鍞嚭搴撳崟-鍏堣繘鍏堝嚭鎺у埗
+                else if (HBillType == "1205" && (oSystemParameter.omodel.Kf_SellOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_SellOutBill_FIFOList.ToUpper() == "Y"))
+                {
+                    sFIFOCtl = "Y";
+                }
+                //鍏朵粬鍑哄簱鍗�-鍏堣繘鍏堝嚭鎺у埗
+                else if (HBillType == "1206" && (oSystemParameter.omodel.Kf_OtherOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_OtherOutBill_FIFOList.ToUpper() == "Y"))
+                {
+                    sFIFOCtl = "Y";
+                }
+                //濮斿鍑哄簱鍗�-鍏堣繘鍏堝嚭鎺у埗
+                else if (HBillType == "1211" && (oSystemParameter.omodel.Kf_EntrustOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_EntrustOutBill_FIFOList.ToUpper() == "Y"))
+                {
+                    sFIFOCtl = "Y";
+                }
+                //鐩存帴璋冩嫧鍗�-鍏堣繘鍏堝嚭鎺у埗
+                else if (HBillType == "1207" && (oSystemParameter.omodel.Kf_MoveStockBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_MoveStockBill_FIFOList.ToUpper() == "Y"))
+                {
+                    sFIFOCtl = "Y";
+                }
+                //鍒嗘寮忚皟鍑哄崟-鍏堣繘鍏堝嚭鎺у埗
+                else if (HBillType == "1250" && (oSystemParameter.omodel.Kf_MoveStockStepOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_MoveStockStepOutBill_FIFOList.ToUpper() == "Y"))
+                {
+                    sFIFOCtl = "Y";
+                }
+                //鐢熶骇琛ユ枡鍗�-鍏堣繘鍏堝嚭鎺у埗
+                else if (HBillType == "1254" && (oSystemParameter.omodel.Kf_MateReplenishOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_MateReplenishOutBill_FIFOList.ToUpper() == "Y"))
+                {
+                    sFIFOCtl = "Y";
+                }
+                //濮斿琛ユ枡鍗�-鍏堣繘鍏堝嚭鎺у埗
+                else if (HBillType == "1255" && (oSystemParameter.omodel.Kf_EntrustReplenishOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_EntrustReplenishOutBill_FIFOList.ToUpper() == "Y"))
+                {
+                    sFIFOCtl = "Y";
+                }
+
+                try
+                {
+                    if(sFIFOCtl == "Y")
+                    {
+                        //鏇存柊鍏堣繘鍏堝嚭涓存椂琛ㄧ姸鎬�
+                        oCn.RunProc("EXEC h_p_WMS_UPDateICInventory_FIFO_Tmp " + HInterID.ToString() + ",'" + HBillType + "'");
+                    }
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //鎴愬姛锛�
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                catch (Exception e)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏇存柊鍏堣繘鍏堝嚭涓存椂琛℉lineStatus鍊煎け璐ワ紒" + e.ToString();
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+            }
+            else
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
                 objJsonResult.data = null;
                 return objJsonResult;
             }
@@ -1956,27 +2035,114 @@
         }
 
         /// <summary>
-        /// 鍒犻櫎缂撳瓨鍒楄〃鍗曟嵁
+        /// 鍒犻櫎缂撳瓨鍒楄〃鍗曟嵁锛屽垹闄ゆ椂鍒ゆ柇鍗曟嵁鏄惁寮傚父锛屽啓鍏ユ棩蹇�   20250722
         /// </summary>
         /// <returns></returns>
         [Route("WEBSController/set_DelPonderationBillMain_Temp_Json")]
         [HttpGet]
-        public object set_DelPonderationBillMain_Temp_Json(long HInterID, string HBillType)
+        public object set_DelPonderationBillMain_Temp_Json(long HInterID, string HBillNo, string HBillType, string HMaker, Int64 HStockOrgID, string MvarReportTitle)
         {
-            try
+            //鑾峰彇绯荤粺鍙傛暟
+            string sErrMsg = "";
+            if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
             {
-                oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo);
-                objJsonResult.code = "0";
-                objJsonResult.count = 1;
-                objJsonResult.Message = "鍒犻櫎鎴愬姛";
-                objJsonResult.data = null;
-                return objJsonResult;
+                string sERPMode = oSystemParameter.omodel.WMS_WMSStockCtl_ERPMode;   //搴撳瓨鎺у埗-WMS搴撳瓨鎺у埗ERP妯″紡	(WISE銆丆LOUD銆丮ES)
+                string sFIFOCtl = "N";          //鍏堣繘鍏堝嚭鎺у埗锛�'Y'涓烘帶鍒讹級
+
+                //鐢熶骇棰嗘枡鍗�-鍏堣繘鍏堝嚭鎺у埗
+                if (HBillType == "1204" && (oSystemParameter.omodel.Kf_MateOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_MateOutBill_FIFOList.ToUpper() == "Y"))
+                {
+                    sFIFOCtl = "Y";
+                }
+                //閿�鍞嚭搴撳崟-鍏堣繘鍏堝嚭鎺у埗
+                else if (HBillType == "1205" && (oSystemParameter.omodel.Kf_SellOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_SellOutBill_FIFOList.ToUpper() == "Y"))
+                {
+                    sFIFOCtl = "Y";
+                }
+                //鍏朵粬鍑哄簱鍗�-鍏堣繘鍏堝嚭鎺у埗
+                else if (HBillType == "1206" && (oSystemParameter.omodel.Kf_OtherOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_OtherOutBill_FIFOList.ToUpper() == "Y"))
+                {
+                    sFIFOCtl = "Y";
+                }
+                //濮斿鍑哄簱鍗�-鍏堣繘鍏堝嚭鎺у埗
+                else if (HBillType == "1211" && (oSystemParameter.omodel.Kf_EntrustOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_EntrustOutBill_FIFOList.ToUpper() == "Y"))
+                {
+                    sFIFOCtl = "Y";
+                }
+                //鐩存帴璋冩嫧鍗�-鍏堣繘鍏堝嚭鎺у埗
+                else if (HBillType == "1207" && (oSystemParameter.omodel.Kf_MoveStockBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_MoveStockBill_FIFOList.ToUpper() == "Y"))
+                {
+                    sFIFOCtl = "Y";
+                }
+                //鍒嗘寮忚皟鍑哄崟-鍏堣繘鍏堝嚭鎺у埗
+                else if (HBillType == "1250" && (oSystemParameter.omodel.Kf_MoveStockStepOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_MoveStockStepOutBill_FIFOList.ToUpper() == "Y"))
+                {
+                    sFIFOCtl = "Y";
+                }
+                //鐢熶骇琛ユ枡鍗�-鍏堣繘鍏堝嚭鎺у埗
+                else if (HBillType == "1254" && (oSystemParameter.omodel.Kf_MateReplenishOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_MateReplenishOutBill_FIFOList.ToUpper() == "Y"))
+                {
+                    sFIFOCtl = "Y";
+                }
+                //濮斿琛ユ枡鍗�-鍏堣繘鍏堝嚭鎺у埗
+                else if (HBillType == "1255" && (oSystemParameter.omodel.Kf_EntrustReplenishOutBill_FIFOCtl.ToUpper() == "Y" || oSystemParameter.omodel.Kf_EntrustReplenishOutBill_FIFOList.ToUpper() == "Y"))
+                {
+                    sFIFOCtl = "Y";
+                }
+
+                try
+                {
+                    string WorkList = "鍒犻櫎缂撳瓨鍗曟嵁锛屽崟鎹彿锛�" + HBillNo;
+                    string SystemName = "WMS-" + MvarReportTitle + "妯″潡";
+                    oCn.BeginTran();
+                    ds = oCn.RunProcReturn("exec h_p_WMS_PonderationBillMain_Temp_Delete " + HInterID + ",'" + HBillNo + "','" + HBillType + "','" + sFIFOCtl + "','" + sERPMode + "'", "h_p_WMS_PonderationBillMain_Temp_Delete");
+                    if (ds == null || ds.Tables[0].Rows.Count == 0)
+                    {
+                        oCn.RollBack();
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍒犻櫎缂撳瓨鍗曟嵁澶辫触锛屽垹闄ょ紦瀛樺崟鎹垽鏂敊璇紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1)
+                    {
+                        oCn.RollBack();
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;  //澶辫触锛�
+                        objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        //鍐欏叆鏃ュ織
+                        oCn.RunProc("Insert into  System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " +
+                            "(getdate(),'" + HMaker + "','" + ComputerName + "','" + WorkList + "','" + SystemName + "','','鍒犻櫎')"
+                            );
+                        oCn.Commit();
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鍗曟嵁鍙凤細" + HBillNo + " 鍒犻櫎鎴愬姛";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+                catch (Exception e)
+                {
+                    oCn.RollBack();
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍒犻櫎鏉$爜鍑哄叆搴撶紦瀛樺垪琛ㄥ崟鎹け璐ワ紒" + e.ToString();
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
             }
-            catch (Exception e)
+            else
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
-                objJsonResult.Message = "鍒犻櫎鏉$爜鍑哄叆搴撶紦瀛樺垪琛ㄥ崟鎹け璐ワ紒" + e.ToString();
+                objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
                 objJsonResult.data = null;
                 return objJsonResult;
             }
@@ -5923,7 +6089,7 @@
                 if (HBillType == "1201")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_POStockInBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_POStockInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -5934,10 +6100,10 @@
                     }
                 }
                 //鐢熶骇鍏ュ簱鍗�
-                if (HBillType == "1202")
+                else if (HBillType == "1202")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_ProductInBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_ProductInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -5948,10 +6114,10 @@
                     }
                 }
                 //鍏朵粬鍏ュ簱鍗�
-                if (HBillType == "1203")
+                else if (HBillType == "1203")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_OtherInBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_OtherInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -5965,7 +6131,7 @@
                 else if (HBillType == "1204")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_MateOutBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_MateOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -5979,7 +6145,7 @@
                 else if (HBillType == "1205")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -5993,7 +6159,7 @@
                 else if (HBillType == "1206")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_OtherOutBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_OtherOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -6007,7 +6173,7 @@
                 else if (HBillType == "1211")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -6021,7 +6187,7 @@
                 else if (HBillType == "1254")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -6035,7 +6201,7 @@
                 else if (HBillType == "1255")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -6049,7 +6215,7 @@
                 else if (HBillType == "1207")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -6319,7 +6485,7 @@
             if (oSystemParameter.ShowBillByOrgID(HStockOrgID,ref sErrMsg) == true)
             {
                 string sSourceBarCodeCtl = "N";   //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
+                if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                 {
                     //閿�鍞嚭搴撳崟
                     sSourceBarCodeCtl = "Y";
@@ -6442,25 +6608,25 @@
                 if (HBillType == "1201")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_POStockInBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_POStockInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
                 }
                 //鐢熶骇鍏ュ簱鍗�
-                if (HBillType == "1202")
+                else if (HBillType == "1202")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_ProductInBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_ProductInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
                 }
                 //鍏朵粬鍏ュ簱鍗�
-                if (HBillType == "1203")
+                else if (HBillType == "1203")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_OtherInBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_OtherInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -6469,7 +6635,7 @@
                 else if (HBillType == "1204")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_MateOutBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_MateOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -6478,7 +6644,7 @@
                 else if (HBillType == "1205")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -6487,7 +6653,7 @@
                 else if (HBillType == "1206")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_OtherOutBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_OtherOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -6496,7 +6662,7 @@
                 else if (HBillType == "1211")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -6505,7 +6671,7 @@
                 else if (HBillType == "1254")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -6514,7 +6680,7 @@
                 else if (HBillType == "1255")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -6523,7 +6689,7 @@
                 else if (HBillType == "1207")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -6614,7 +6780,7 @@
             if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
             {
                 string sSourceBarCodeCtl = "N";   //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
+                if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                 {
                     //閿�鍞嚭搴撳崟
                     sSourceBarCodeCtl = "Y";
@@ -6750,25 +6916,25 @@
                 if (HBillType == "1201")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_POStockInBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_POStockInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
                 }
                 //鐢熶骇鍏ュ簱鍗�
-                if (HBillType == "1202")
+                else if (HBillType == "1202")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_ProductInBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_ProductInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
                 }
                 //鍏朵粬鍏ュ簱鍗�
-                if (HBillType == "1203")
+                else if (HBillType == "1203")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_OtherInBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_OtherInBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -6777,7 +6943,7 @@
                 else if (HBillType == "1204")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_MateOutBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_MateOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -6786,7 +6952,7 @@
                 else if (HBillType == "1205")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -6795,7 +6961,7 @@
                 else if (HBillType == "1206")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_OtherOutBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_OtherOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -6804,7 +6970,7 @@
                 else if (HBillType == "1211")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_EntrustOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -6813,7 +6979,7 @@
                 else if (HBillType == "1254")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -6822,7 +6988,7 @@
                 else if (HBillType == "1255")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -6831,7 +6997,7 @@
                 else if (HBillType == "1207")
                 {
                     //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                    if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl == "Y")
+                    if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                     {
                         sSourceBarCodeCtl = "Y";
                     }
@@ -6911,7 +7077,7 @@
             if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
             {
                 string sSourceBarCodeCtl = "N";   //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
-                if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
+                if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
                 {
                     //閿�鍞嚭搴撳崟
                     sSourceBarCodeCtl = "Y";
@@ -11727,7 +11893,7 @@
                                 string sJXCode = "";
                                 if (oSystemParameter.ShowBill(ref sErrMsg) == true)
                                 {
-                                    if (oSystemParameter.omodel.Kf_StockInRequestBill_AutoCheck == "Y") //绯荤粺鍙傛暟  鑷姩瀹℃牳 
+                                    if (oSystemParameter.omodel.Kf_StockInRequestBill_AutoCheck.ToUpper() == "Y") //绯荤粺鍙傛暟  鑷姩瀹℃牳 
                                     {
                                         result1 = InvokeHelper.Submit("k18d2ab4f14034c569576ec8e0835a80c", JsonConvert.SerializeObject(json));//鎻愪氦
                                         result2 = InvokeHelper.Audit("k18d2ab4f14034c569576ec8e0835a80c", JsonConvert.SerializeObject(json));//瀹℃牳

--
Gitblit v1.9.1