From faf45af2a9ad45e56ca441fdfdab92b83472a81f Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期三, 28 二月 2024 10:01:52 +0800
Subject: [PATCH] 新增PDA分步式调出单、分步式调入单上传方法

---
 WebAPI/Controllers/条码管理/WEBSController.cs |  426 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 423 insertions(+), 3 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 64eaf38..279d1bd 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"
@@ -857,6 +857,90 @@
 
         #region 鎵爜妯″潡璋冪敤鏂规硶
 
+        #region 鐩存帴璋冩嫧    鑾峰彇璋冩嫧鍑鸿揣绫诲瀷
+
+        /// <summary>
+        /// 鑾峰彇璋冩嫧鍑鸿揣绫诲瀷
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetStockMoveStyle_Json")]
+        [HttpGet]
+        public Object GetStockMoveStyle_Json()
+        {
+            try
+            {
+                ds = oWebs.get_StockMoveStyle();
+                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 = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鎴愬姛";
+                    objJsonResult.data = ds.Tables[0];
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鑾峰彇鍑鸿揣绫诲瀷淇℃伅澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+        #region 鐩存帴璋冩嫧    鑾峰彇璋冩嫧鏂瑰悜
+
+        /// <summary>
+        /// 鑾峰彇璋冩嫧鏂瑰悜
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetMoveDirect_Json")]
+        [HttpGet]
+        public Object GetMoveDirect_Json()
+        {
+            try
+            {
+                ds = oWebs.get_MoveDirect();
+                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 = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鎴愬姛";
+                    objJsonResult.data = ds.Tables[0];
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鑾峰彇璋冩嫧鏂瑰悜淇℃伅澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
         #region 鏍规嵁鍗曟嵁绫诲瀷鑾峰彇鍗曟嵁瀛愮被鍨�
 
         /// <summary>
@@ -2233,7 +2317,6 @@
 
         #endregion
 
-
         #region 鐢熶骇琛ユ枡    涓婁紶鐢熷崟
 
         #region 鐢熶骇琛ユ枡    鏍¢獙妯″紡
@@ -2292,7 +2375,6 @@
         #endregion
 
         #endregion
-
 
         #region 濮斿琛ユ枡    涓婁紶鐢熷崟
 
@@ -2353,8 +2435,114 @@
 
         #endregion
 
-
         #region 鐩存帴璋冩嫧    涓婁紶鐢熷崟
+
+        #region 鐩存帴璋冩嫧    鏂板妯″紡
+
+        /// <summary>
+        /// 鐩存帴璋冩嫧鏂板涓婁紶
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_SaveMoveStockBill_Json")]
+        [HttpPost]
+        public object set_SaveMoveStockBill_Json([FromBody] JObject oMain)
+        {
+            var _value = oMain["oMain"].ToString();
+            string msg1 = _value.ToString();
+            try
+            {
+                List<Model.ClsKf_MoveStockBillMain> lsmain = new List<Model.ClsKf_MoveStockBillMain>();
+                ListModels oListModels = new ListModels();
+                lsmain = oListModels.getMoveStockBillMainByJson(msg1);
+                WebS.ClsKf_MoveStockBillMain websLsmain = new WebS.ClsKf_MoveStockBillMain();
+                string sSourceType = lsmain[0].HMainSourceBillType;
+                websLsmain.HInterID = lsmain[0].HInterID;
+                websLsmain.HBillNo = lsmain[0].HBillNo;
+                websLsmain.HBillType = lsmain[0].HBillType;
+                websLsmain.HDate = lsmain[0].HDate;
+                websLsmain.HDeptID = lsmain[0].HDeptID;
+                websLsmain.HWHID = lsmain[0].HWHID;
+                websLsmain.HSCWHID = lsmain[0].HSCWHID;
+                websLsmain.HSupID = lsmain[0].HSupID;
+                websLsmain.HKeeperID = lsmain[0].HKeeperID;
+                websLsmain.HSecManagerID = lsmain[0].HSecManagerID;
+                websLsmain.HEmpID = lsmain[0].HEmpID;
+                websLsmain.HManagerID = lsmain[0].HManagerID;
+                websLsmain.HRemark = lsmain[0].HRemark;
+                websLsmain.HExplanation = lsmain[0].HExplanation;
+                websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo;
+                websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag;
+                websLsmain.HBillSubType = lsmain[0].HBillSubType;
+                websLsmain.HStockStyle = lsmain[0].HStockStyle;
+                websLsmain.HTransferDirect = lsmain[0].HTransferDirect;
+                websLsmain.HShipType = lsmain[0].HShipType;
+                if (lsmain[0].HMainSourceBillType == "1402")
+                {
+                    websLsmain.HMainSourceBillType = "鍙戣揣閫氱煡鍗�";
+                }
+                else if (lsmain[0].HMainSourceBillType == "1243")
+                {
+                    websLsmain.HMainSourceBillType = "璋冩嫧鐢宠鍗�";
+                }
+                else if (lsmain[0].HMainSourceBillType == "3720")
+                {
+                    websLsmain.HMainSourceBillType = "鐢熶骇鐢ㄦ枡娓呭崟";
+                }
+                else if (lsmain[0].HMainSourceBillType == "1604")
+                {
+                    websLsmain.HMainSourceBillType = "濮斿鐢ㄦ枡娓呭崟";
+                }
+                else if (lsmain[0].HMainSourceBillType == "1214")
+                {
+                    websLsmain.HMainSourceBillType = "鐢熶骇鍙戞枡閫氱煡鍗�";
+                }
+                else if (lsmain[0].HMainSourceBillType == "3721")
+                {
+                    websLsmain.HMainSourceBillType = "鐢熶骇澶囨枡鍗�";
+                }
+                else if (lsmain[0].HMainSourceBillType == "1242")
+                {
+                    websLsmain.HMainSourceBillType = "鍑哄簱鐢宠鍗�";
+                }
+                else
+                {
+                    websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆";
+                }
+                websLsmain.HMaker = lsmain[0].HMaker;
+                websLsmain.HBillerID = lsmain[0].HBillerID;
+                websLsmain.HStockInOrgID = lsmain[0].HStockInOrgID;
+                websLsmain.HStockOutOrgID = lsmain[0].HStockOutOrgID;
+                websLsmain.HSTOCKORGID = lsmain[0].HStockOutOrgID;
+                websLsmain.HOWNERID = lsmain[0].HStockOutOrgID;
+
+                if (oWebs.set_SaveMoveStockBill(websLsmain, sSourceType, 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
 
         #region 鎹㈡墭璋冩嫧鍗�
 
@@ -2399,7 +2587,179 @@
 
         #endregion
 
+        #region 鍒嗘寮忚皟鍑�    涓婁紶鐢熷崟
 
+        #region 鍒嗘寮忚皟鍑�    鏂板妯″紡
+
+        /// <summary>
+        /// 鍒嗘寮忚皟鍑烘柊澧炰笂浼�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_SaveMoveStockStepOutBill_Json")]
+        [HttpPost]
+        public object set_SaveMoveStockStepOutBill_Json([FromBody] JObject oMain)
+        {
+            var _value = oMain["oMain"].ToString();
+            string msg1 = _value.ToString();
+            try
+            {
+                List<Model.ClsKf_MoveStockStepOutBillMain> lsmain = new List<Model.ClsKf_MoveStockStepOutBillMain>();
+                ListModels oListModels = new ListModels();
+                lsmain = oListModels.getMoveStockStepOutBillMainByJson(msg1);
+                WebS.ClsKf_MoveStockStepOutBillMain websLsmain = new WebS.ClsKf_MoveStockStepOutBillMain();
+                string sSourceType = lsmain[0].HMainSourceBillType;
+                websLsmain.HInterID = lsmain[0].HInterID;
+                websLsmain.HBillNo = lsmain[0].HBillNo;
+                websLsmain.HBillType = lsmain[0].HBillType;
+                websLsmain.HDate = lsmain[0].HDate;
+                websLsmain.HDeptID = lsmain[0].HDeptID;
+                websLsmain.HWHID = lsmain[0].HWHID;
+                websLsmain.HSCWHID = lsmain[0].HSCWHID;
+                websLsmain.HSupID = lsmain[0].HSupID;
+                websLsmain.HKeeperID = lsmain[0].HKeeperID;
+                websLsmain.HSecManagerID = lsmain[0].HSecManagerID;
+                websLsmain.HEmpID = lsmain[0].HEmpID;
+                websLsmain.HManagerID = lsmain[0].HManagerID;
+                websLsmain.HRemark = lsmain[0].HRemark;
+                websLsmain.HExplanation = lsmain[0].HExplanation;
+                websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo;
+                websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag;
+                websLsmain.HBillSubType = lsmain[0].HBillSubType;
+                websLsmain.HStockStyle = lsmain[0].HStockStyle;
+                if (lsmain[0].HMainSourceBillType == "1402")
+                {
+                    websLsmain.HMainSourceBillType = "鍙戣揣閫氱煡鍗�";
+                }
+                else if (lsmain[0].HMainSourceBillType == "1243")
+                {
+                    websLsmain.HMainSourceBillType = "璋冩嫧鐢宠鍗�";
+                }
+                else
+                {
+                    websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆";
+                }
+                websLsmain.HMaker = lsmain[0].HMaker;
+                websLsmain.HBillerID = lsmain[0].HBillerID;
+                websLsmain.HStockInOrgID = lsmain[0].HStockInOrgID;
+                websLsmain.HStockOutOrgID = lsmain[0].HStockOutOrgID;
+                websLsmain.HSTOCKORGID = lsmain[0].HStockOutOrgID;
+                websLsmain.HOWNERID = lsmain[0].HStockOutOrgID;
+
+                if (oWebs.set_SaveMoveStockStepOutBill_New(websLsmain, sSourceType, 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 鍒嗘寮忚皟鍏�    涓婁紶鐢熷崟
+
+        #region 鍒嗘寮忚皟鍏�    鏂板妯″紡
+
+        /// <summary>
+        /// 鍒嗘寮忚皟鍏ユ柊澧炰笂浼�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/set_SaveMoveStockStepInBill_Json")]
+        [HttpPost]
+        public object set_SaveMoveStockStepInBill_Json([FromBody] JObject oMain)
+        {
+            var _value = oMain["oMain"].ToString();
+            string msg1 = _value.ToString();
+            try
+            {
+                List<Model.ClsKf_MoveStockStepInBillMain> lsmain = new List<Model.ClsKf_MoveStockStepInBillMain>();
+                ListModels oListModels = new ListModels();
+                lsmain = oListModels.getMoveStockStepInBillMainByJson(msg1);
+                WebS.ClsKf_MoveStockStepInBillMain websLsmain = new WebS.ClsKf_MoveStockStepInBillMain();
+                string sSourceType = lsmain[0].HMainSourceBillType;
+                websLsmain.HInterID = lsmain[0].HInterID;
+                websLsmain.HBillNo = lsmain[0].HBillNo;
+                websLsmain.HBillType = lsmain[0].HBillType;
+                websLsmain.HDate = lsmain[0].HDate;
+                websLsmain.HDeptID = lsmain[0].HDeptID;
+                websLsmain.HWHID = lsmain[0].HWHID;
+                websLsmain.HSCWHID = lsmain[0].HSCWHID;
+                websLsmain.HSupID = lsmain[0].HSupID;
+                websLsmain.HKeeperID = lsmain[0].HKeeperID;
+                websLsmain.HSecManagerID = lsmain[0].HSecManagerID;
+                websLsmain.HEmpID = lsmain[0].HEmpID;
+                websLsmain.HManagerID = lsmain[0].HManagerID;
+                websLsmain.HRemark = lsmain[0].HRemark;
+                websLsmain.HExplanation = lsmain[0].HExplanation;
+                websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo;
+                websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag;
+                websLsmain.HBillSubType = lsmain[0].HBillSubType;
+                websLsmain.HStockStyle = lsmain[0].HStockStyle;
+                if (lsmain[0].HMainSourceBillType == "1250")
+                {
+                    websLsmain.HMainSourceBillType = "鍒嗘寮忚皟鍑哄崟";
+                }
+                else
+                {
+                    websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆";
+                }
+                websLsmain.HMaker = lsmain[0].HMaker;
+                websLsmain.HBillerID = lsmain[0].HBillerID;
+                websLsmain.HStockInOrgID = lsmain[0].HStockInOrgID;
+                websLsmain.HStockOutOrgID = lsmain[0].HStockOutOrgID;
+                websLsmain.HSTOCKORGID = lsmain[0].HStockOutOrgID;
+                websLsmain.HOWNERID = lsmain[0].HStockOutOrgID;
+
+                if (oWebs.set_SaveMoveStockStepInBill_New(websLsmain, sSourceType, 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 鐢熶骇缁勬墭鍗�    涓婁紶鐢熷崟
 
@@ -3022,6 +3382,66 @@
         #region 鐗╂枡鏉$爜澶勭悊鏂规硶    璋冩嫧妯″潡
 
         /// <summary>
+        /// 鐗╂枡鏉$爜鏂囨湰妗� 璋冩嫧鎵爜璋冪敤  20240222
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/get_BarCode_MoveStock_Json")]
+        [HttpGet]
+        public Object get_BarCode_MoveStock_Json(string sBarCode, Int64 HInterID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWHID, Int64 HSCSPID, Double HQty, bool SourceFlag, string HSourceBillNo, string HSourceBillType, Int64 HStockInOrgID, Int64 HStockOutOrgID, string HScanStyle, string HCustom1, string HCustom2)
+        {
+            string sErrMsg = "";
+            string sJXCode = "";
+            if (oSystemParameter.ShowBill(ref sErrMsg) == true)
+            {
+                if (oSystemParameter.omodel.WMS_CampanyName == "瀹夌憺") //绯荤粺鍙傛暟  瀹㈡埛瀹氬埗鍖栧悕绉�     绌虹櫧涓洪�氱敤
+                {
+                    sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOutOrgID, HBillNo, HMaker);
+                    SourceFlag = true;
+                }
+                else
+                {
+                    sJXCode = sBarCode;
+                }
+                try
+                {
+                    WebSoBar = oWebs.get_BarCode_MoveStock(sJXCode, HInterID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, SourceFlag, HSourceBillNo, HSourceBillType, HStockInOrgID, HStockOutOrgID, HScanStyle, ref DBUtility.ClsPub.sErrInfo, HCustom1, HCustom2);
+                    if (WebSoBar == null)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鎴愬姛";
+                        objJsonResult.data = WebSoBar;
+                        return objJsonResult;
+                    }
+                }
+                catch (Exception e)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鎵弿鏉$爜澶辫触锛�" + e.ToString();
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+            }
+            else
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        /// <summary>
         /// 鐗╂枡鏉$爜鏂囨湰妗� 鎵爜璋冪敤
         /// </summary>
         /// <returns></returns>

--
Gitblit v1.9.1