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

---
 WebAPI/Controllers/仓存管理/条码生成/Sc_BarCodeController.cs |  100 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 100 insertions(+), 0 deletions(-)

diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Sc_BarCodeController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Sc_BarCodeController.cs"
index 423f9d1..1bfb40e 100644
--- "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Sc_BarCodeController.cs"
+++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\346\235\241\347\240\201\347\224\237\346\210\220/Sc_BarCodeController.cs"
@@ -1501,6 +1501,106 @@
         }
         #endregion
 
+        #region 鏉$爜瀛樺叆鏉$爜涓绘。
+        /// <summary>
+        /// 鏉$爜杞瓨鏉$爜涓绘。
+        /// </summary>
+        /// <param name="msg"></param>
+        /// <returns></returns>
+        [Route("Sc_BarCode/SaveBarCode_NoGenerate")]
+        [HttpPost]
+        public object SaveBarCode_NoGenerate([FromBody] JObject msg)
+        {
+            try
+            {
+                var _value = msg["msg"].ToString();
+                string msg1 = _value.ToString();
+                string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+                string msg2 = sArray[0].ToString();
+                string HOrgType = sArray[1].ToString();
+                string HSourceBillTypeName = sArray[2].ToString();
+                string HSelectBarCodeType = sArray[3].ToString();
+                string CampanyName = sArray[4].ToString() == "xxx" ? "" : sArray[4].ToString();
+                string UserName = sArray[5].ToString();
+                string barCodeNo = sArray[6].ToString();
+                ClsPub.CurUserName = UserName;
+
+                //鑾峰彇鍐呯爜
+                HInterID = DBUtility.ClsPub.CreateBillID_Prod(ModName, ref DBUtility.ClsPub.sExeReturnInfo);
+                DAL.ClsGy_ORGANIZATIONS_View oClsGy_ORGANIZATIONS_View = new DAL.ClsGy_ORGANIZATIONS_View();
+                HOrgNumber = "";
+                if (oClsGy_ORGANIZATIONS_View.GetInfoByName(HOrgType))
+                {
+                    HOrgID = oClsGy_ORGANIZATIONS_View.omodel.HItemID;
+                    HOrgNumber = DBUtility.ClsPub.isStrNull(oClsGy_ORGANIZATIONS_View.omodel.HNumber);
+                }
+                if (HOrgID == -1)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "[0000-2-055]閫夋嫨缁勭粐鏈夐敊璇�!";
+                    return objJsonResult;
+                }
+                if (!Sub_AllowSave(msg2, HSelectBarCodeType))//鍗曟嵁瀹屾暣鎬у垽鏂�
+                {
+                    return objJsonResult;
+                }
+                if (HSelectBarCodeType == "浠櫒鎴愬搧鏉$爜瑙勫垯")
+                {
+                    //瀹㈡埛瀹氬埗
+                }
+                else
+                {
+                    
+                    // 鏉$爜杞瓨
+                    msg2 = msg2.Replace("\\", "");
+                    msg2 = msg2.Replace("\n", "");  //\n
+                    List<HSouceOrderList> ordrlist = Newtonsoft.Json.JsonConvert.DeserializeObject<List<HSouceOrderList>>(msg2);
+                    LogService.Write(ordrlist[0]);
+
+                    long HSourceInterID = string.IsNullOrEmpty(ordrlist[0].HMainID) == true ? 0 : ClsPub.isLong(ordrlist[0].HMainID);
+                    long HSourceEntryID = string.IsNullOrEmpty(ordrlist[0].HSubID) == true ? 0 : ClsPub.isLong(ordrlist[0].HSubID);
+                    DataSet ds1 = oCN.RunProcReturn("exec h_p_SC_BarCode_Transfer " + 
+                        "@HBarCodeNo = N'" + barCodeNo + "'" + 
+                        ",@HSubID = " + ordrlist[0].HSubID +
+                        ",@HMaterID = " + ordrlist[0].HMaterID + 
+                        ",@HGiveAwayFlag = " + ordrlist[0].HGiveAwayFlag +
+                        ",@HQty = " + ordrlist[0].HQty +
+                        ",@HUnitID = " + ordrlist[0].HUnitID +
+                        ",@HMinQty = " + ordrlist[0].HMinQty +
+                        ",@HSupID = " + ordrlist[0].HSupID +
+                        ",@HBatchNo = N'" + ordrlist[0].HBatchNo  + "'" +
+                        ",@HMTONO = N'" + ordrlist[0].HMTONo + "'" +
+                        ",@HBarCodeDate = N'" + ordrlist[0].HDate + "'" +
+                        ",@HEmpID = " + ordrlist[0].HEmpID  +
+                        ",@HGroupID = " + ordrlist[0].HGroupID + 
+                        ",@HSourceInterID = " + HSourceInterID + 
+                        ",@HSourceEntryID = " + HSourceEntryID
+                        , "h_p_SC_BarCode_Transfer");
+
+                    if((bool)ds1.Tables[0].Rows[0]["returntype"] == true)
+                    {
+                        objJsonResult.code = "1";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "[0000-1-037]鑾峰彇璧勬簮缁戝畾鏁版嵁鎴愬姛锛�";
+                    }
+                    else
+                    {
+                        throw new Exception(ds1.Tables[0].Rows[0]["mesg"].ToString());
+                    }
+                    
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "[3899-2-006]鏉$爜鐢熸垚澶辫触!" + e.Message;
+                return objJsonResult;
+            }
+            return objJsonResult;
+        }
+        #endregion
 
         #region [鏉$爜鐢熸垚鎺ュ彛-杩﹀崡]
         [Route("Sc_BarCode/Sub_SaveBill_JiaNan")]

--
Gitblit v1.9.1