From e294473fbac1442d4d2466edd0bf0ce0385460a5 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期二, 30 四月 2024 11:21:45 +0800
Subject: [PATCH] 托盘条码自动组托:组托保证数据一致性。
---
WebAPI/Controllers/条码管理/WEBSController.cs | 173 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 173 insertions(+), 0 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 6b40952..9f7c131 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"
@@ -243,6 +243,59 @@
#endregion
+ #region 鑾峰彇鏈�澶у崟鎹彿
+
+ /// <summary>
+ /// 鑾峰彇鏈�澶у崟鎹彿
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetMaxBillNo_Json")]
+ [HttpGet]
+ public object GetMaxBillNo_Json(string HBillType)
+ {
+ try
+ {
+ string sErrMsg = "";
+ string HBillNo = "";
+ HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(HBillType, ref sErrMsg, true);
+
+ //----------鍒涘缓铏氳〃------------------------
+ DataTable dt_Main = new DataTable("Json");
+ dt_Main.Columns.Add("HBillNo", typeof(string));
+ //---------鍒涘缓鏂拌------------------------
+ DataRow dr_main = dt_Main.NewRow(); //鍒涘缓鏂拌
+ dt_Main.Rows.Add(dr_main); //灏嗘柊琛屽姞鍏ュ埌琛ㄤ腑
+ dr_main["HBillNo"] = DBUtility.ClsPub.isStrNull(HBillNo);
+ //杩斿洖鏁版嵁
+ if (HBillNo == "")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏈�澶у崟鎹彿鑾峰彇澶辫触";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇鎴愬姛";
+ objJsonResult.data = dt_Main;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇鏈�澶у崟鎹彿澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
#region 鏍规嵁鏉$爜锛岃繑鍥炴潯鐮佹。妗堜腑鏉$爜淇℃伅
@@ -2366,6 +2419,84 @@
#region 鐢熶骇琛ユ枡 涓婁紶鐢熷崟
+ #region 鐢熶骇琛ユ枡 鏂板妯″紡
+
+ /// <summary>
+ /// 鐢熶骇琛ユ枡鏂板涓婁紶
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_SaveMateReplenishOutBill_Json")]
+ [HttpPost]
+ public object set_SaveMateReplenishOutBill_Json([FromBody] JObject oMain)
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ try
+ {
+ List<Model.ClsKf_MateReplenishOutBillMain> lsmain = new List<Model.ClsKf_MateReplenishOutBillMain>();
+ ListModels oListModels = new ListModels();
+ lsmain = oListModels.getMateReplenishOutBillMainByJson(msg1);
+ WebS.ClsKf_MateReplenishOutBillMain websLsmain = new WebS.ClsKf_MateReplenishOutBillMain();
+ 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;
+ if (lsmain[0].HMainSourceBillType == "3720")
+ {
+ websLsmain.HMainSourceBillType = "鐢熶骇鐢ㄦ枡娓呭崟";
+ }
+ else
+ {
+ websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆";
+ }
+ websLsmain.HMaker = lsmain[0].HMaker;
+ websLsmain.HBillerID = lsmain[0].HBillerID;
+ websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
+ websLsmain.HOWNERID = lsmain[0].HSTOCKORGID;
+
+ if (oWebs.set_SaveMateReplenishOutBill_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
+
#region 鐢熶骇琛ユ枡 鏍¢獙妯″紡
/// <summary>
@@ -3232,6 +3363,48 @@
#endregion
+ #region 鐢熶骇琛ユ枡 鎵弿婧愬崟鏉$爜
+
+ /// <summary>
+ /// 鐢熶骇琛ユ枡 鎵弿婧愬崟鏉$爜
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/Get_SourceBarCode_MateReplenishOut_Json")]
+ [HttpGet]
+ public object get_SourceBarCode_MateReplenishOut_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HFIFOWhID, Int64 HStockOrgID)
+ {
+ try
+ {
+ WebSoBar = oWebs.get_SourceBarCode_MateReplenishOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HFIFOWhID, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
+ 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;
+ }
+ }
+
+ #endregion
+
#region 鐩存帴璋冩嫧 鎵弿婧愬崟鏉$爜
/// <summary>
--
Gitblit v1.9.1