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分步式调出单、分步式调入单上传方法 --- Model/仓库管理/ClsKf_MoveStockStepInBillMain.cs | 24 ++++ WebAPI/Web References/WebS/WebService1.wsdl | 2 WebAPI/ListModels.cs | 13 ++ Model/仓库管理/ClsKf_MoveStockBillMain.cs | 2 Model/仓库管理/ClsKf_MoveStockStepInBillScheme.cs | 30 +++++ WebAPI/Web References/WebS/Reference.cs | 24 ++++ WebAPI/Controllers/条码管理/WEBSController.cs | 181 +++++++++++++++++++++++++++++ Model/Model.csproj | 4 Model/仓库管理/ClsKf_MoveStockStepOutBillScheme.cs | 30 +++++ Model/仓库管理/ClsKf_MoveStockStepOutBillMain.cs | 3 Model/仓库管理/ClsKf_MoveStockStepInBillSub.cs | 30 +++++ 11 files changed, 338 insertions(+), 5 deletions(-) diff --git a/Model/Model.csproj b/Model/Model.csproj index e7160a2..357a702 100644 --- a/Model/Model.csproj +++ b/Model/Model.csproj @@ -225,6 +225,9 @@ <Compile Include="浠撳簱绠$悊\ClsKf_EntrustOutBillMain.cs" /> <Compile Include="浠撳簱绠$悊\ClsKf_EntrustOutBillSub.cs" /> <Compile Include="浠撳簱绠$悊\ClsKf_EntrustReplenishOutBillMain.cs" /> + <Compile Include="浠撳簱绠$悊\ClsKf_MoveStockStepInBillMain.cs" /> + <Compile Include="浠撳簱绠$悊\ClsKf_MoveStockStepInBillScheme.cs" /> + <Compile Include="浠撳簱绠$悊\ClsKf_MoveStockStepOutBillScheme.cs" /> <Compile Include="浠撳簱绠$悊\ClsKf_MateReplenishOutBillMain.cs" /> <Compile Include="浠撳簱绠$悊\ClsKf_MateOutBillMain.cs" /> <Compile Include="浠撳簱绠$悊\ClsKf_MateOutBillScheme.cs" /> @@ -238,6 +241,7 @@ <Compile Include="浠撳簱绠$悊\ClsKf_MoveStockStepOutBillMain.cs" /> <Compile Include="浠撳簱绠$悊\ClsKf_MoveStockBillMain.cs" /> <Compile Include="浠撳簱绠$悊\ClsKf_MoveStockBillScheme.cs" /> + <Compile Include="浠撳簱绠$悊\ClsKf_MoveStockStepInBillSub.cs" /> <Compile Include="浠撳簱绠$悊\ClsKf_MoveStockStepOutBillSub.cs" /> <Compile Include="浠撳簱绠$悊\ClsKf_MoveStockBillSub.cs" /> <Compile Include="浠撳簱绠$悊\ClsKf_OtherInBillMain.cs" /> diff --git "a/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockBillMain.cs" "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockBillMain.cs" index 1d498d9..91159fd 100644 --- "a/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockBillMain.cs" +++ "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockBillMain.cs" @@ -28,5 +28,7 @@ public string HTransferDirect; // varchar(100) //调拨方向 public string HShipType; // varchar(100) //出货类型 public Int64 HGroupID; + public int HStockInOrgID; // int //调入组织ID + public int HStockOutOrgID; // int //调出组织ID } } diff --git "a/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockStepInBillMain.cs" "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockStepInBillMain.cs" new file mode 100644 index 0000000..c475add --- /dev/null +++ "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockStepInBillMain.cs" @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Model +{ + public class ClsKf_MoveStockStepInBillMain : DBUtility.ClsXt_BaseBillMain + { + public Int64 HSupID; // int --供应商 + public Int64 HWHID; // int --仓库 + public Int64 HSCWHID; // int --调出仓库 + public Int64 HEmpID; // int --业务员 + public Int64 HManagerID; // int --负责人 + public Int64 HSecManagerID; // int --验收 + public Int64 HKeeperID; // int --保管员 + public Int64 HDeptID; // int --部门 + public string HExplanation; // varchar(200) --摘要 + public string HInnerBillNo; // varchar(50) --内部单据号 + public bool HRedBlueFlag; // bit --红蓝单 + public string HStockStyle; // varchar(100) --调拨类型 + public Int64 HStockInOrgID; // int --调入库存组织 + public Int64 HStockOutOrgID; // int --调出库存组织 + } +} diff --git "a/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockStepInBillScheme.cs" "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockStepInBillScheme.cs" new file mode 100644 index 0000000..25c29b7 --- /dev/null +++ "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockStepInBillScheme.cs" @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Model +{ + public class ClsKf_MoveStockStepInBillScheme : DBUtility.ClsXt_BaseBillSub + { + public Int64 HInterID; + public Int64 HEntryID; + public Int64 HItemID; + public string HBillType; + public Int64 HMaterID; + public Int64 HProcID; + public Int64 HWhID; + public Int64 HSCWhID; + public Int64 HGroupID; + public double HQty; + public string HBarCode; + public string HAddr; + public string HMaker; + public DateTime HMakeDate; + public Int64 HSourceInterID; + public Int64 HSourceEntryID; + public string HSourceBillType; + public string HSourceBillNo; + public Int64 HSourceItemID; + + } +} diff --git "a/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockStepInBillSub.cs" "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockStepInBillSub.cs" new file mode 100644 index 0000000..3c5dba5 --- /dev/null +++ "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockStepInBillSub.cs" @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Model +{ + public class ClsKf_MoveStockStepInBillSub : DBUtility.ClsXt_BaseBillSub + { + public Int64 HMaterID; // int --物料ID + public string HBatchNo; // varchar(50) --批次 + public Int64 HPropertyID; // int --辅助属性 + public Int64 HSecUnitID; // int --辅助计量单位 + public Single HSecUnitRate; // money --换算率 + public Int64 HUnitID; // int --计量单位 + public double HQtyMust; // dec(18,8) --应收数量 + public double HQty; // dec(18,8) --实收数量 + public double HPrice; // dec(18,8) --单价 + public double HMoney; // dec(18,8) --金额 + public Int64 HWHID; // int --收料仓库 + public Int64 HSCWHID; // int --调出仓库ID + public Int64 HSPID; // int --调入仓位 + public Int64 HSCSPID; // int --调出仓位ID + public Int64 HPOOrderInterID; // int --采购订单主内码 + public Int64 HPOOrderEntryID; // int --采购订单子内码 + public string HPOOrderBillNo; // varchar(50) --采购订单号 + public Int64 HSeOrderInterID; // int --销售订单主内码 + public Int64 HSeOrderEntryID; // int --销售订单子内码 + public string HSeOrderBillNo; // varchar(50) --销售订单号 + } +} diff --git "a/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockStepOutBillMain.cs" "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockStepOutBillMain.cs" index 31d783d..0d0af80 100644 --- "a/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockStepOutBillMain.cs" +++ "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockStepOutBillMain.cs" @@ -18,6 +18,9 @@ public string HInnerBillNo;// varchar(50) --内部单据号 public bool HRedBlueFlag;// bit --红蓝单 public int HCurID; + public string HStockStyle; // varchar(100) //调拨类型 + public int HStockInOrgID; // int //调入组织ID + public int HStockOutOrgID; // int //调出组织ID } } diff --git "a/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockStepOutBillScheme.cs" "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockStepOutBillScheme.cs" new file mode 100644 index 0000000..a5f9cc5 --- /dev/null +++ "b/Model/\344\273\223\345\272\223\347\256\241\347\220\206/ClsKf_MoveStockStepOutBillScheme.cs" @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Model +{ + public class ClsKf_MoveStockStepOutBillScheme : DBUtility.ClsXt_BaseBillSub + { + public Int64 HInterID; + public Int64 HEntryID; + public Int64 HItemID; + public string HBillType; + public Int64 HMaterID; + public Int64 HProcID; + public Int64 HWhID; + public Int64 HSCWhID; + public Int64 HGroupID; + public double HQty; + public string HBarCode; + public string HAddr; + public string HMaker; + public DateTime HMakeDate; + public Int64 HSourceInterID; + public Int64 HSourceEntryID; + public string HSourceBillType; + public string HSourceBillNo; + public Int64 HSourceItemID; + + } +} 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 d0e61c6..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" @@ -2317,7 +2317,6 @@ #endregion - #region 鐢熶骇琛ユ枡 涓婁紶鐢熷崟 #region 鐢熶骇琛ユ枡 鏍¢獙妯″紡 @@ -2377,7 +2376,6 @@ #endregion - #region 濮斿琛ユ枡 涓婁紶鐢熷崟 #region 濮斿琛ユ枡 鏍¢獙妯″紡 @@ -2436,7 +2434,6 @@ #endregion #endregion - #region 鐩存帴璋冩嫧 涓婁紶鐢熷崟 @@ -2513,8 +2510,10 @@ } websLsmain.HMaker = lsmain[0].HMaker; websLsmain.HBillerID = lsmain[0].HBillerID; - websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID; - websLsmain.HOWNERID = lsmain[0].HSTOCKORGID; + 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)) { @@ -2588,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 鐢熶骇缁勬墭鍗� 涓婁紶鐢熷崟 diff --git a/WebAPI/ListModels.cs b/WebAPI/ListModels.cs index c3cb37c..b5538f6 100644 --- a/WebAPI/ListModels.cs +++ b/WebAPI/ListModels.cs @@ -101,6 +101,19 @@ List<Model.ClsKf_MoveStockStepOutBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsKf_MoveStockStepOutBillMain>>(jsonString); return list; } + + /// <summary> + /// 鍒嗘寮忚皟鍏ュ崟鍙嶅簭鍒楀寲 + /// </summary> + /// <param name="jsonString"></param> + /// <returns></returns> + public List<Model.ClsKf_MoveStockStepInBillMain> getMoveStockStepInBillMainByJson(string jsonString) + { + jsonString = "[" + jsonString.ToString() + "]"; + List<Model.ClsKf_MoveStockStepInBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsKf_MoveStockStepInBillMain>>(jsonString); + return list; + } + /// <summary> /// 浜у搧鍏ュ簱鍙嶅簭鍒楀寲 /// </summary> diff --git a/WebAPI/Web References/WebS/Reference.cs b/WebAPI/Web References/WebS/Reference.cs index 14942a0..6a789db 100644 --- a/WebAPI/Web References/WebS/Reference.cs +++ b/WebAPI/Web References/WebS/Reference.cs @@ -42881,6 +42881,10 @@ private long hOWNERIDField; + private long hStockInOrgIDField; + + private long hStockOutOrgIDField; + /// <remarks/> public long HSupID { get { @@ -43100,6 +43104,26 @@ this.hOWNERIDField = value; } } + + /// <remarks/> + public long HStockInOrgID { + get { + return this.hStockInOrgIDField; + } + set { + this.hStockInOrgIDField = value; + } + } + + /// <remarks/> + public long HStockOutOrgID { + get { + return this.hStockOutOrgIDField; + } + set { + this.hStockOutOrgIDField = value; + } + } } /// <remarks/> diff --git a/WebAPI/Web References/WebS/WebService1.wsdl b/WebAPI/Web References/WebS/WebService1.wsdl index aae9795..6de8fc9 100644 --- a/WebAPI/Web References/WebS/WebService1.wsdl +++ b/WebAPI/Web References/WebS/WebService1.wsdl @@ -9262,6 +9262,8 @@ <s:element minOccurs="0" maxOccurs="1" name="HShipType" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="HSTOCKORGID" type="s:long" /> <s:element minOccurs="1" maxOccurs="1" name="HOWNERID" type="s:long" /> + <s:element minOccurs="1" maxOccurs="1" name="HStockInOrgID" type="s:long" /> + <s:element minOccurs="1" maxOccurs="1" name="HStockOutOrgID" type="s:long" /> </s:sequence> </s:extension> </s:complexContent> -- Gitblit v1.9.1