From 0bb73d4cccd49e09c033ad0378da94f6ebbc280e Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 09 二月 2026 08:58:21 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/条码管理/WEBSController.cs | 1034 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 980 insertions(+), 54 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 1180941..5b5be87 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"
@@ -505,42 +505,22 @@
{
try
{
- Int64 sHSPID = 0;
- Int64 sHWhID = 0;
- if (HBarCode.Contains(";"))
+ //鏉$爜鏍煎紡='HSP'+浠撳簱鍐呯爜+';'+浠撲綅鍐呯爜
+ if (HBarCode.Contains("HSP") && HBarCode.Contains(";"))
{
- string[] sArray = HBarCode.Replace("HSP", "").Split(';');
- sHSPID = DBUtility.ClsPub.isLong(sArray[1]);
- sHWhID = DBUtility.ClsPub.isLong(sArray[0]);
- }
+ Int64 sHSPID = 0;
+ Int64 sHWhID = 0;
+ if (HBarCode.Contains(";"))
+ {
+ string[] sArray = HBarCode.Replace("HSP", "").Split(';');
+ sHSPID = DBUtility.ClsPub.isLong(sArray[1]);
+ sHWhID = DBUtility.ClsPub.isLong(sArray[0]);
+ }
- if (HWhID == 0)
- {
- ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + sHWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
- if (ds == null || ds.Tables[0].Rows.Count == 0)
+ if (HWhID == 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;
- }
- }
- else
- {
- ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + HWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
- if (ds == null || ds.Tables[0].Rows.Count == 0)
- {
- DataSet ds2 = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + sHWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
- if (ds2 == null || ds2.Tables[0].Rows.Count == 0)
+ ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + sHWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -553,9 +533,53 @@
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "鎴愬姛锛�";
- objJsonResult.data = ds2.Tables[0];
+ objJsonResult.data = ds.Tables[0];
return objJsonResult;
}
+ }
+ else
+ {
+ ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + HWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ DataSet ds2 = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HItemID=" + sHSPID.ToString() + " and HWHID=" + sHWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
+ if (ds2 == null || ds2.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 = ds2.Tables[0];
+ return objJsonResult;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ }
+ else
+ {
+ ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HBarCode='" + HBarCode + "' and HUSEORGID = " + HStockOrgID.ToString(), "h_v_IF_StockPlace");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛岃纭鎵�鎵粨浣嶆潯鐮佹槸鍚﹀睘浜庤缁勭粐锛屼笖涓洪潪绂佺敤鐘舵�侊紒";
+ objJsonResult.data = null;
+ return objJsonResult;
}
else
{
@@ -1094,7 +1118,7 @@
}
else
{
- objJsonResult.code = "0";
+ objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "鎴愬姛锛�";
objJsonResult.data = ds.Tables[0];
@@ -4672,6 +4696,66 @@
#endregion
+ #region 鐢熶骇閫�搴� 涓婁紶鐢熷崟
+
+ #region 鐢熶骇閫�搴� 鏍¢獙妯″紡
+
+ /// <summary>
+ /// 鐢熶骇閫�搴撴牎楠屼笂浼�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_SaveProductInBackBill_BillCheck_Json")]
+ [HttpPost]
+ public object set_SaveProductInBackBill_BillCheck_Json([FromBody] JObject oMain)
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+
+ try
+ {
+ List<Model.ClsKf_ICStockBillMain> lsmain = new List<Model.ClsKf_ICStockBillMain>();
+ ListModels oListModels = new ListModels();
+ lsmain = oListModels.getICStockBillMainByJson(msg1);
+
+ WebAPI.WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain();
+
+ websLsmain.HInterID = lsmain[0].HInterID;
+ websLsmain.HBillNo = lsmain[0].HBillNo;
+ websLsmain.HBillType = "1245";
+ websLsmain.HMaker = lsmain[0].HMaker;
+ websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
+
+ if (oWebs.set_SaveProductInBackBill_BillCheck(websLsmain, 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 閲囪喘閫�鏂� 鏂板妯″紡
@@ -4753,6 +4837,62 @@
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "閲囪喘閫�鏂欏崟涓婁紶澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 閲囪喘閫�鏂� 鏍¢獙妯″紡
+
+ /// <summary>
+ /// 閲囪喘閫�鏂欐牎楠屼笂浼�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_SavePOStockInBackBill_BillCheck_Json")]
+ [HttpPost]
+ public object set_SavePOStockInBackBill_BillCheck_Json([FromBody] JObject oMain)
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+
+ try
+ {
+ List<Model.ClsKf_ICStockBillMain> lsmain = new List<Model.ClsKf_ICStockBillMain>();
+ ListModels oListModels = new ListModels();
+ lsmain = oListModels.getICStockBillMainByJson(msg1);
+
+ WebAPI.WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain();
+
+ websLsmain.HInterID = lsmain[0].HInterID;
+ websLsmain.HBillNo = lsmain[0].HBillNo;
+ websLsmain.HBillType = "1239";
+ websLsmain.HMaker = lsmain[0].HMaker;
+ websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
+
+ if (oWebs.set_SavePOStockInBackBill_BillCheck(websLsmain, 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;
}
@@ -4846,6 +4986,62 @@
#endregion
+ #region 鐢熶骇閫�鏂� 鏍¢獙妯″紡
+
+ /// <summary>
+ /// 鐢熶骇閫�鏂欐牎楠屼笂浼�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_SaveMateOutBackBill_BillCheck_Json")]
+ [HttpPost]
+ public object set_SaveMateOutBackBill_BillCheck_Json([FromBody] JObject oMain)
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+
+ try
+ {
+ List<Model.ClsKf_ICStockBillMain> lsmain = new List<Model.ClsKf_ICStockBillMain>();
+ ListModels oListModels = new ListModels();
+ lsmain = oListModels.getICStockBillMainByJson(msg1);
+
+ WebAPI.WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain();
+
+ websLsmain.HInterID = lsmain[0].HInterID;
+ websLsmain.HBillNo = lsmain[0].HBillNo;
+ websLsmain.HBillType = "1244";
+ websLsmain.HMaker = lsmain[0].HMaker;
+ websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
+
+ if (oWebs.set_SaveMateOutBackBill_BillCheck(websLsmain, 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 閿�鍞��璐� 涓婁紶鐢熷崟
@@ -4925,6 +5121,122 @@
objJsonResult.code = "0";
objJsonResult.count = 0;
objJsonResult.Message = "閿�鍞��璐у崟涓婁紶澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 閿�鍞��璐� 鏍¢獙妯″紡
+
+ /// <summary>
+ /// 閿�鍞��璐ф牎楠屼笂浼�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_SaveSellOutBackBill_BillCheck_Json")]
+ [HttpPost]
+ public object set_SaveSellOutBackBill_BillCheck_Json([FromBody] JObject oMain)
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+
+ try
+ {
+ List<Model.ClsKf_ICStockBillMain> lsmain = new List<Model.ClsKf_ICStockBillMain>();
+ ListModels oListModels = new ListModels();
+ lsmain = oListModels.getICStockBillMainByJson(msg1);
+
+ WebAPI.WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain();
+
+ websLsmain.HInterID = lsmain[0].HInterID;
+ websLsmain.HBillNo = lsmain[0].HBillNo;
+ websLsmain.HBillType = "1247";
+ websLsmain.HMaker = lsmain[0].HMaker;
+ websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
+
+ if (oWebs.set_SaveSellOutBackBill_BillCheck(websLsmain, 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_SaveEntrustOutBackBill_BillCheck_Json")]
+ [HttpPost]
+ public object set_SaveEntrustOutBackBill_BillCheck_Json([FromBody] JObject oMain)
+ {
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+
+ try
+ {
+ List<Model.ClsKf_ICStockBillMain> lsmain = new List<Model.ClsKf_ICStockBillMain>();
+ ListModels oListModels = new ListModels();
+ lsmain = oListModels.getICStockBillMainByJson(msg1);
+
+ WebAPI.WebS.ClsKf_ICStockBillMain websLsmain = new WebS.ClsKf_ICStockBillMain();
+
+ websLsmain.HInterID = lsmain[0].HInterID;
+ websLsmain.HBillNo = lsmain[0].HBillNo;
+ websLsmain.HBillType = "1238";
+ websLsmain.HMaker = lsmain[0].HMaker;
+ websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
+
+ if (oWebs.set_SaveEntrustOutBackBill_BillCheck(websLsmain, 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;
}
@@ -5226,6 +5538,28 @@
}
else
{
+
+ //鍒犻櫎鍓嶆帶鍒�=========================================
+ DataSet dds = oCn.RunProcReturn("Exec h_p_KF_ICInventory_WorkShop_BeforeDelCtrl " + mainList[0].HInterID.ToString() , "h_p_KF_ICInventory_WorkShop_BeforeDelCtrl");
+
+ if (dds == null)
+ {
+ oCn.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎鍓嶅垽鏂け璐ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if (DBUtility.ClsPub.isStrNull(dds.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ oCn.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒犻櫎澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
//鏇存柊杞﹂棿鐗╂枡搴撳瓨
oCn.RunProc("EXEC h_p_WMS_UPDateICinventory_WorkShop " + mainList[0].HInterID.ToString() + ",'" + mainList[0].HBillType + "'");
//鏇存柊杞﹂棿鏉$爜搴撳瓨
@@ -6809,10 +7143,10 @@
#endregion
- #region 鎵弿鍗曟嵁鏉$爜 鍑哄叆搴撴ā鍧�
+ #region 鎵弿鍗曟嵁鏉$爜 20251225
/// <summary>
- /// 鎵弿鍗曟嵁鏉$爜 鍑哄叆搴撴ā鍧� 鏍¢獙妯″紡
+ /// 鎵弿鍗曟嵁鏉$爜 鏍¢獙妯″紡
/// </summary>
/// <returns></returns>
[Route("WEBSController/get_BillBarCode_BillCheck_Json")]
@@ -6851,7 +7185,7 @@
#endregion
- #region 鎵弿鍗曟嵁鏉$爜 宸插瓨鍦ㄦ壂鐮佽褰曚笖鍗曟嵁鍙戠敓鍙樻洿鍚庝袱杈规暟鎹笉涓�鑷存椂锛屾竻绌哄師鎵爜鏁版嵁 20241216
+ #region 鎵弿鍗曟嵁鏉$爜 宸插瓨鍦ㄦ壂鐮佽褰曚笖鍗曟嵁鍙戠敓鍙樻洿鍚庝袱杈规暟鎹笉涓�鑷存椂锛屾竻绌哄師鎵爜鏁版嵁 20251225
/// <summary>
/// 宸插瓨鍦ㄦ壂鐮佽褰曚笖鍗曟嵁鍙戠敓鍙樻洿鍚庝袱杈规暟鎹笉涓�鑷存椂锛屾竻绌哄師鎵爜鏁版嵁
@@ -6893,7 +7227,7 @@
#endregion
- #region 鎵弿鐗╂枡鏉$爜 鍑哄叆搴撴ā鍧�
+ #region 鎵弿鐗╂枡鏉$爜 20251225
/// <summary>
/// 鐗╂枡鏉$爜鏂囨湰妗� 鏍¢獙鎵爜璋冪敤 鏍¢獙妯″紡
@@ -6901,7 +7235,7 @@
/// <returns></returns>
[Route("WEBSController/get_CheckTypeByBarCode_BillCheck_Json")]
[HttpGet]
- public Object get_CheckTypeByBarCode_BillCheck_Json(string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Double HQty, Int64 HStockOrgID)
+ public Object get_CheckTypeByBarCode_BillCheck_Json(string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWHID, Int64 HSCSPID, Double HQty, Int64 HStockOrgID)
{
//鑾峰彇绯荤粺鍙傛暟
string sErrMsg = "";
@@ -7052,6 +7386,76 @@
sAutoBarCode = "Y";
}
}
+ //閲囪喘閫�鏂欏崟
+ else if (HBillType == "1239")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_AutoBarCode.ToUpper() == "Y")
+ {
+ sAutoBarCode = "Y";
+ }
+ }
+ //鐢熶骇閫�搴撳崟
+ else if (HBillType == "1245")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_AutoBarCode.ToUpper() == "Y")
+ {
+ sAutoBarCode = "Y";
+ }
+ }
+ //鐢熶骇閫�鏂欏崟
+ else if (HBillType == "1244")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_AutoBarCode.ToUpper() == "Y")
+ {
+ sAutoBarCode = "Y";
+ }
+ }
+ //閿�鍞��璐у崟
+ else if (HBillType == "1247")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_AutoBarCode.ToUpper() == "Y")
+ {
+ sAutoBarCode = "Y";
+ }
+ }
+ //濮斿閫�鏂欏崟
+ else if (HBillType == "1238")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_AutoBarCode.ToUpper() == "Y")
+ {
+ sAutoBarCode = "Y";
+ }
+ }
#endregion
if (oSystemParameter.omodel.WMS_CampanyName == "瀹夌憺") //绯荤粺鍙傛暟 瀹㈡埛瀹氬埗鍖栧悕绉� 绌虹櫧涓洪�氱敤
@@ -7097,11 +7501,19 @@
//鍘熷崟鎹潪鎵爜鐢熸垚锛屾牎楠屾椂鐢熸垚鏉$爜璁板綍
else
{
- WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sJXCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
+ WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck_New(sJXCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, 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 if (WebSoBar.HRemark == "浠呮彁绀�")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 2;
objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
objJsonResult.data = null;
return objJsonResult;
@@ -7137,7 +7549,71 @@
#endregion
- #region 杩斿洖鍗曟嵁鍒楄〃淇℃伅 20241114
+ #region 鎵弿鐗╂枡鏉$爜 鍚敤鍏堣繘鍏堝嚭浠呮彁绀烘帶鍒讹紝鏉$爜涓嶅湪鍏堣繘鍏堝嚭鍒楄〃涓厑璁告壂鎻忓啓鍏� 20251225
+
+ /// <summary>
+ /// 鍚敤鍏堣繘鍏堝嚭浠呮彁绀烘帶鍒讹紝鏉$爜涓嶅湪鍏堣繘鍏堝嚭鍒楄〃涓� 瀛樺叆鏉$爜鍑哄叆搴撲复鏃惰〃
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/get_SavePonderationBillMain_Temp_BarCodeFIFO_BillCheck_Json")]
+ [HttpGet]
+ public Object get_SavePonderationBillMain_Temp_BarCodeFIFO_BillCheck_Json(string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWHID, Int64 HSCSPID, Double HQty, Int64 HStockOrgID)
+ {
+ //鑾峰彇绯荤粺鍙傛暟
+ string sErrMsg = "";
+ string sJXCode = "";
+ if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
+ {
+ if (oSystemParameter.omodel.WMS_CampanyName == "瀹夌憺") //绯荤粺鍙傛暟 瀹㈡埛瀹氬埗鍖栧悕绉� 绌虹櫧涓洪�氱敤
+ {
+ sJXCode = POStockInBillController.JX_Json(sBarCode, HBillID, HBillType, HStockOrgID, HBillNo, HMaker);
+ }
+ else
+ {
+ sJXCode = sBarCode;
+ }
+ try
+ {
+ WebSoBar = oWebs.get_SavePonderationBillMain_Temp_BarCodeFIFO_BillCheck(sJXCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, 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;
+ }
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 杩斿洖鍗曟嵁鍒楄〃淇℃伅 20251225
/// <summary>
/// 杩斿洖鍗曟嵁鍒楄〃淇℃伅 鏍¢獙妯″紡
@@ -7184,7 +7660,8 @@
objJsonResult.data = new
{
Materlist = ds.Tables[0], //杩斿洖鐗╂枡鏄庣粏鍒楄〃淇℃伅锛�0锛�
- BarCodeDetailslist = ds.Tables[1], //杩斿洖褰撳墠鎵�鎵弿鏉$爜鏄庣粏淇℃伅锛�5锛�
+ BarCodeDetailslist = ds.Tables[1], //杩斿洖褰撳墠鎵�鎵弿鏉$爜鏄庣粏淇℃伅锛�1锛�
+ FIFOlist = ds.Tables[2], //杩斿洖鍏堣繘鍏堝嚭鍒楄〃淇℃伅锛�2锛�
};
objJsonResult.list = columnNameList;
return objJsonResult;
@@ -7253,7 +7730,7 @@
#endregion
- #region 鏍¢獙鎵爜妯″潡锛屽垹闄ら�変腑琛屾潯鐮佸嚭鍏ュ簱涓存椂琛ㄨ褰� 20241114
+ #region 鏍¢獙鎵爜妯″潡锛屽垹闄ら�変腑琛屾潯鐮佸嚭鍏ュ簱涓存椂琛ㄨ褰� 20251225
/// <summary>
/// 鎵爜妯″潡锛屽垹闄ら�変腑琛屾潯鐮佸嚭鍏ュ簱涓存椂琛ㄨ褰�
@@ -7361,6 +7838,115 @@
#endregion
+ #region 鎵爜妯″潡 閫�鍑哄姛鑳芥寜閽皟鐢� 鏇存柊鍏堣繘鍏堝嚭涓存椂琛ㄧ姸鎬侊紙鏇存柊 HlineStatus =1锛� 20251225
+
+ /// <summary>
+ /// 鎵爜妯″潡锛岄��鍑烘椂鏇存柊鍏堣繘鍏堝嚭涓存椂琛ㄧ姸鎬� HlineStatus
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/set_UPDateFIFOTmp_BillCheck_Json")]
+ [HttpGet]
+ public object set_UPDateFIFOTmp_BillCheck_Json(long HInterID, string HBillType, Int64 HStockOrgID)
+ {
+ //鑾峰彇绯荤粺鍙傛暟
+ string sErrMsg = "";
+ if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
+ {
+ string sFIFOCtl = "N"; //鍏堣繘鍏堝嚭鎺у埗锛�1銆佷笉鎺у埗浠呮樉绀轰笅鏋舵竻鍗� 2銆佷弗鏍兼帶鍒跺厛杩涘厛鍑� 3銆佷粎鎻愮ず鍜屾樉绀轰笅鏋舵竻鍗� 4銆佷笉鏄剧ず涓嬫灦娓呭崟涔熶笉鎺у埗锛�
+
+ #region 绯荤粺鍙傛暟鑾峰彇
+ //鐢熶骇棰嗘枡鍗�-鍏堣繘鍏堝嚭鎺у埗
+ if (HBillType == "1204"
+ && oSystemParameter.omodel.Kf_MateOutBillCheck_AutoBarCode.ToUpper() == "N" //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ && oSystemParameter.omodel.Kf_MateOutBillCheck_SourceBarCodeCtl.ToUpper() == "N" //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ && (oSystemParameter.omodel.Kf_MateOutBillCheck_FIFOCtl == "1" || oSystemParameter.omodel.Kf_MateOutBillCheck_FIFOCtl == "2" || oSystemParameter.omodel.Kf_MateOutBillCheck_FIFOCtl == "3"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //閿�鍞嚭搴撳崟-鍏堣繘鍏堝嚭鎺у埗
+ if (HBillType == "1205"
+ && oSystemParameter.omodel.Kf_SellOutBillCheck_AutoBarCode.ToUpper() == "N" //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl.ToUpper() == "N" //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ && (oSystemParameter.omodel.Kf_SellOutBillCheck_FIFOCtl == "1" || oSystemParameter.omodel.Kf_SellOutBillCheck_FIFOCtl == "2" || oSystemParameter.omodel.Kf_SellOutBillCheck_FIFOCtl == "3"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //鍏朵粬鍑哄簱鍗�-鍏堣繘鍏堝嚭鎺у埗
+ if (HBillType == "1206"
+ && oSystemParameter.omodel.Kf_OtherOutBillCheck_AutoBarCode.ToUpper() == "N" //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ && oSystemParameter.omodel.Kf_OtherOutBillCheck_SourceBarCodeCtl.ToUpper() == "N" //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ && (oSystemParameter.omodel.Kf_OtherOutBillCheck_FIFOCtl == "1" || oSystemParameter.omodel.Kf_OtherOutBillCheck_FIFOCtl == "2" || oSystemParameter.omodel.Kf_OtherOutBillCheck_FIFOCtl == "3"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //濮斿鍑哄簱鍗�-鍏堣繘鍏堝嚭鎺у埗
+ if (HBillType == "1211"
+ && oSystemParameter.omodel.Kf_EntrustOutBillCheck_AutoBarCode.ToUpper() == "N" //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ && oSystemParameter.omodel.Kf_EntrustOutBillCheck_SourceBarCodeCtl.ToUpper() == "N" //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ && (oSystemParameter.omodel.Kf_EntrustOutBillCheck_FIFOCtl == "1" || oSystemParameter.omodel.Kf_EntrustOutBillCheck_FIFOCtl == "2" || oSystemParameter.omodel.Kf_EntrustOutBillCheck_FIFOCtl == "3"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //鐢熶骇琛ユ枡鍗�-鍏堣繘鍏堝嚭鎺у埗
+ if (HBillType == "1254"
+ && oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_AutoBarCode.ToUpper() == "N" //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ && oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "N" //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ && (oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_FIFOCtl == "1" || oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_FIFOCtl == "2" || oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_FIFOCtl == "3"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //濮斿琛ユ枡鍗�-鍏堣繘鍏堝嚭鎺у埗
+ if (HBillType == "1255"
+ && oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_AutoBarCode.ToUpper() == "N" //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ && oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_SourceBarCodeCtl.ToUpper() == "N" //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ && (oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_FIFOCtl == "1" || oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_FIFOCtl == "2" || oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_FIFOCtl == "3"))
+ {
+ sFIFOCtl = "Y";
+ }
+ //鐩存帴璋冩嫧鍗�-鍏堣繘鍏堝嚭鎺у埗
+ if (HBillType == "1207"
+ && oSystemParameter.omodel.Kf_MoveStockBillCheck_AutoBarCode.ToUpper() == "N" //鍏嶆壂鐗╂枡鏉$爜妯″紡锛�'Y'涓轰笉鎵墿鏂欐潯鐮侊級
+ && oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl.ToUpper() == "N" //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ && (oSystemParameter.omodel.Kf_MoveStockBillCheck_FIFOCtl == "1" || oSystemParameter.omodel.Kf_MoveStockBillCheck_FIFOCtl == "2" || oSystemParameter.omodel.Kf_MoveStockBillCheck_FIFOCtl == "3"))
+ {
+ sFIFOCtl = "Y";
+ }
+ #endregion
+
+ try
+ {
+ if (sFIFOCtl == "Y")
+ {
+ //鏇存柊鍏堣繘鍏堝嚭涓存椂琛ㄧ姸鎬�
+ oCn.RunProc("EXEC h_p_WMS_UPDateICInventory_FIFO_Tmp_BillCheck " + 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;
+ }
+ }
+
+ #endregion
+
#region 鏍¢獙缂撳瓨妯″潡 杩斿洖缂撳瓨鍒楄〃淇℃伅
/// <summary>
@@ -7412,7 +7998,7 @@
#endregion
- #region 鏍¢獙缂撳瓨妯″潡 鏍规嵁鍗曟嵁ID,鍒犻櫎涓存椂琛ㄨ褰� 20241216
+ #region 鏍¢獙缂撳瓨妯″潡 鏍规嵁鍗曟嵁ID,鍒犻櫎涓存椂琛ㄨ褰� 20251225
/// <summary>
/// 鏍规嵁鍗曟嵁ID,鍒犻櫎涓存椂琛ㄨ褰�
@@ -7429,6 +8015,7 @@
if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
{
string sSourceBarCodeCtl = "N"; //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ string sFIFOCtl = "4"; //鍏堣繘鍏堝嚭鎺у埗锛�1銆佷笉鎺у埗浠呮樉绀轰笅鏋舵竻鍗� 2銆佷弗鏍兼帶鍒跺厛杩涘厛鍑� 3銆佷粎鎻愮ず鍜屾樉绀轰笅鏋舵竻鍗� 4銆佷笉鏄剧ず涓嬫灦娓呭崟涔熶笉鎺у埗锛�
#region 绯荤粺鍙傛暟鑾峰彇
//閲囪喘鍏ュ簱鍗�
@@ -7466,6 +8053,8 @@
{
sSourceBarCodeCtl = "Y";
}
+ //鍏堣繘鍏堝嚭鎺у埗
+ sFIFOCtl = oSystemParameter.omodel.Kf_MateOutBillCheck_FIFOCtl;
}
//閿�鍞嚭搴撳崟
else if (HBillType == "1205")
@@ -7475,6 +8064,8 @@
{
sSourceBarCodeCtl = "Y";
}
+ //鍏堣繘鍏堝嚭鎺у埗
+ sFIFOCtl = oSystemParameter.omodel.Kf_SellOutBillCheck_FIFOCtl;
}
//鍏朵粬鍑哄簱鍗�
else if (HBillType == "1206")
@@ -7484,6 +8075,8 @@
{
sSourceBarCodeCtl = "Y";
}
+ //鍏堣繘鍏堝嚭鎺у埗
+ sFIFOCtl = oSystemParameter.omodel.Kf_OtherOutBillCheck_FIFOCtl;
}
//濮斿棰嗘枡鍗�
else if (HBillType == "1211")
@@ -7493,6 +8086,8 @@
{
sSourceBarCodeCtl = "Y";
}
+ //鍏堣繘鍏堝嚭鎺у埗
+ sFIFOCtl = oSystemParameter.omodel.Kf_EntrustOutBillCheck_FIFOCtl;
}
//鐢熶骇琛ユ枡鍗�
else if (HBillType == "1254")
@@ -7502,6 +8097,8 @@
{
sSourceBarCodeCtl = "Y";
}
+ //鍏堣繘鍏堝嚭鎺у埗
+ sFIFOCtl = oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_FIFOCtl;
}
//濮斿琛ユ枡鍗�
else if (HBillType == "1255")
@@ -7511,12 +8108,61 @@
{
sSourceBarCodeCtl = "Y";
}
+ //鍏堣繘鍏堝嚭鎺у埗
+ sFIFOCtl = oSystemParameter.omodel.Kf_EntrustReplenishOutBillCheck_FIFOCtl;
}
//鐩存帴璋冩嫧鍗�
else if (HBillType == "1207")
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ //鍏堣繘鍏堝嚭鎺у埗
+ sFIFOCtl = oSystemParameter.omodel.Kf_MoveStockBillCheck_FIFOCtl;
+ }
+ //閲囪喘閫�鏂欏崟
+ else if (HBillType == "1239")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //鐢熶骇閫�搴撳崟
+ else if (HBillType == "1245")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //鐢熶骇閫�鏂欏崟
+ else if (HBillType == "1244")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //閿�鍞��璐у崟
+ else if (HBillType == "1247")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //濮斿閫�鏂欏崟
+ else if (HBillType == "1238")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
}
@@ -7557,6 +8203,12 @@
try
{
oCn.BeginTran();
+ //鍒犻櫎鍏堣繘鍏堝嚭涓存椂琛ㄨ褰�
+ if (sFIFOCtl == "1" || sFIFOCtl == "2" || sFIFOCtl == "3")
+ {
+ oCn.RunProc("Delete from Kf_ICInventory_FIFO_Tmp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo);
+ }
+ //鍒犻櫎鏉$爜鍑哄叆搴撲复鏃惰〃璁板綍
oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HSubBillType=1", ref DBUtility.ClsPub.sExeReturnInfo);
//鍐欏叆鏃ュ織
oCn.RunProc("Insert into System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " +
@@ -7825,6 +8477,51 @@
{
//鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
if (oSystemParameter.omodel.Kf_MoveStockBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //閲囪喘閫�鏂欏崟
+ else if (HBillType == "1239")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_POStockInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //鐢熶骇閫�搴撳崟
+ else if (HBillType == "1245")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_ProductInBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //鐢熶骇閫�鏂欏崟
+ else if (HBillType == "1244")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_MateOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //閿�鍞��璐у崟
+ else if (HBillType == "1247")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_SellOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
+ {
+ sSourceBarCodeCtl = "Y";
+ }
+ }
+ //濮斿閫�鏂欏崟
+ else if (HBillType == "1238")
+ {
+ //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ if (oSystemParameter.omodel.Kf_EntrustOutBackBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
{
sSourceBarCodeCtl = "Y";
}
@@ -8118,11 +8815,7 @@
#endregion
#region 鐢熶骇缁勬墭鍗曟ā鍧� 鎵弿瀹㈡埛绠憋紙鎵橈級鏉$爜 -鍑礉瑁呯鍗� 20251103
-
- /// <summary>
- /// 鐢熶骇缁勬墭鍗曟ā鍧� 鎵弿绠憋紙鎵橈級鏉$爜
- /// </summary>
- /// <returns></returns>
+
[Route("WEBSController/Get_PackBarCode_PackUnionBill_New_Json_Cus")]
[HttpGet]
public object Get_PackBarCode_PackUnionBill_New_Json_Cus(Int64 HInterID, string HBillNo, string HBillType, string HBillSubType, string HBarCode_Pack, string HSourceBillNo)
@@ -8605,6 +9298,29 @@
#endregion
+ #endregion
+
+ #region 鏍规嵁sn鐮佸鎵惧搴旂殑涓鐮�
+ [Route("WEBSController/getMiddleCodeBySn")]
+ [HttpGet]
+ public object getMiddleCodeBySn(string HBarCode,int HStockOrgID)
+ {
+ DataSet dss = oCn.RunProcReturn("select * from Gy_CaseCodeRelation where HBarCode='"+ HBarCode + "'", "Gy_CaseCodeRelation");
+
+ if (dss.Tables[0].Rows[0]["HCaseCode"].ToString() == "" || dss == null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏈壘鍒皊n鐮佹墍瀵瑰簲鐨勪腑绠辩爜";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛";
+ objJsonResult.data = dss.Tables[0];
+ return objJsonResult;
+ }
#endregion
#endregion
@@ -13158,11 +13874,11 @@
/// <returns></returns>
[Route("WEBSController/BindCarAndWH")]
[HttpGet]
- public object BindCarAndWH( string HMaker, Int64 HWhID, Int64 HSPID, string HCarBarCode, Int64 HStockOrgID)
+ public object BindCarAndWH( string HMaker, Int64 HWhID, Int64 HSPID, string HCarBarCode, Int64 HStockOrgID,int bindsignal)
{
try
{
- ds = oCn.RunProcReturn("exec h_p_bindingCarintoWh " + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HCarBarCode + "','" + HMaker+ "'," + HStockOrgID.ToString(), "h_p_bindingCarintoWh");
+ ds = oCn.RunProcReturn("exec h_p_bindingCarintoWh " + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HCarBarCode + "','" + HMaker+ "'," + HStockOrgID.ToString()+","+ bindsignal, "h_p_bindingCarintoWh");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -13202,7 +13918,8 @@
}
#endregion
- //杞Щ妯″潡
+ #region 杞Щ妯″潡
+ // 杞Щ妯″潡
[Route("WEBSController/CheckHW")]
[HttpGet]
public object CheckHW(int HWhID,int HSPID,int HWhID2,int HSPID2,string HBarCode,string HCarBarCode1,string HCarBarCode2,string UserID)
@@ -13247,8 +13964,9 @@
return objJsonResult;
}
}
+ #endregion
- #region 鎯犲悍 鐢熶骇棰嗘枡鍗曟牎楠� 鎵弿婧愬崟 鑾峰彇鐢熶骇棰嗘枡鍗曞拰涓嬫父棰嗘枡鍗曟湭瀹℃牳 鍗曟嵁
+ #region 鎯犲悍 鐢熶骇棰嗘枡鍗曟牎楠� 鎵弿婧愬崟 鑾峰彇鐢熶骇棰嗘枡鍗曞拰涓嬫父棰嗘枡鍗曟湭瀹℃牳 鍗曟嵁
[Route("WEBSController/get_BillBarCode_BillCheck_Json_MateOut_HuiKang")]
[HttpGet]
public Object get_BillBarCode_BillCheck_Json_MateOut_HuiKang(string HBillNo, string HBillType, string HMaker, Int64 HStockOrgID)
@@ -13359,5 +14077,213 @@
}
#endregion
+
+ #region 妫�楠屽崟 鎵弿婧愬崟 鏍规嵁鍗曟嵁绫诲瀷 婧愬崟绫诲瀷 婧愬崟鍙� 瑙f瀽骞惰繑鍥炴楠岄」鐩�
+ [Route("WEBSController/get_CheckBillBarCode_Json_CheckItem")]
+ [HttpGet]
+ public Object get_CheckBillBarCode_Json_CheckItem(int HBillType, int HSourceBillType, string HBarCode, string HInterID, string HEntryID, int Mode,string user)
+ {
+ try
+ {
+ string sErrMsg = "";
+ oSystemParameter.ShowBill(ref sErrMsg);
+ // 鍗庤垷瀹㈡埛
+ if(oSystemParameter.omodel.WMS_CampanyName == "鍗庤垷")
+ {
+ HBarCode = HBarCode.Split('-')[0];
+ }
+
+ // Mode = 1 琛ㄧず 鎵爜妯″紡 Mode = 2 琛ㄧず 閫夊崟妯″紡
+ if (Mode == 1)
+ {
+ //鎵爜妯″紡闇�瑕佽В鏋愭潯鐮佽幏鍙朒InterID鍜孒EntryID
+ ds = oCn.RunProcReturn($@"
+ exec h_p_CheckBillBarCode_AnalysisBarcode
+ @HBillType={HBillType},
+ @HSourceBillType={HSourceBillType},
+ @HBarCode='{HBarCode}',
+ @user = '{user}'
+ ", "h_p_CheckBillBarCode_AnalysisBarcode");
+
+ if (ds is null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵弿鍗曟嵁鏉$爜澶辫触锛佹潯鐮佽В鏋愬け璐ワ紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ HInterID = ds.Tables[0].Rows[0]["HInterID"].ToString();
+ HEntryID = ds.Tables[0].Rows[0]["HEntryID"].ToString();
+ }
+ // 閫夊崟妯″紡鐩存帴閫掑叆HInterID 鍜� HEntryID 鏍规嵁 鍙栬川妫�鏂规鏉ユ簮 鑾峰彇 妫�楠岄」鐩�
+ ds = oCn.RunProcReturn($@"
+ exec h_p_CheckBillBarCode_CheckItem
+ @HBillType={HBillType},
+ @HSourceBillType={HSourceBillType},
+ @HInterID={HInterID},
+ @HEntryID={HEntryID}
+ ", "h_p_CheckBillBarCode_CheckItem");
+
+ if(ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵弿鍗曟嵁鏉$爜澶辫触锛佹棤缁戝畾璐ㄦ鏂规淇℃伅";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "success锛�";
+ 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 鍑礉 瑁呯鍗曟壂鎻忕鏉$爜鏌ヨ鏄惁鍦ㄥ鎴锋潯鐮佹。妗堬紝涓嶅湪灏辫В鏋愪繚瀛樺鎴锋潯鐮佹。妗堣〃
+
+ [Route("WEBSController/GetHBarCode_CusJX")]
+ [HttpGet]
+ public object GetHBarCode_CusJX(Int64 HInterID, string HBillNo, string HBillType, string HBillSubType, string HBarCode_Pack, string HSourceBillNo)
+ {
+ try
+ {
+
+ ds = oCn.RunProcReturn("exec h_p_WMS_AddPackBarCode_PackUnionBill_New_CusJX " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBillSubType + "','" + HBarCode_Pack + "','" + HSourceBillNo + "'", "h_p_WMS_AddPackBarCode_PackUnionBill_New_CusJX");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ 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)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+ 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 = "鎻掑叆瀹㈡埛鏉$爜妗f琛ㄥけ璐ワ紒" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
+
+ #region 娣诲悍鏍规嵁灏忚溅鏉$爜鎵惧嚭鐩稿簲鐗╂枡
+
+ [Route("WEBSController/GetMaterIDByCarBarCode")]
+ [HttpGet]
+ public object GetMaterIDByCarBarCode(string CarBarCode)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("select * from GetMaterMesByCarBarCode where HQty>=0 and 灏忚溅='" + CarBarCode.ToString() + "'" , "GetMaterMesByCarBarCode");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ List<object> columnNameList = new List<object>();
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏍规嵁鐗╂枡杩斿洖缂撳瓨鍒楄〃鏉$爜淇℃伅澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region [鍙栨牱鍗昡 鑾峰彇鏈笅鎺ㄦ垚妫�楠屽崟鐨勫彇鏍峰崟鍒楄〃
+ [Route("WEBSController/AwaitCheckSampleBillList")]
+ [HttpGet]
+ public Object AwaitCheckSampleBillList(string user)
+ {
+ List<object> columnNameList = new List<object>();
+ try
+ {
+ ds = oCn.RunProcReturn($@"
+ exec h_p_AwaitCheckSampleBillList @user={user}
+ ", "h_p_CheckBillBarCode_CheckItem");
+
+ //娣诲姞鍒楀悕
+ foreach (DataColumn col in ds.Tables[0].Columns)
+ {
+ Type dataType = col.DataType;
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+ columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "success锛�";
+ objJsonResult.data = ds.Tables;
+ objJsonResult.list = columnNameList;
+
+ return objJsonResult;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵弿鍗曟嵁鏉$爜澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
}
}
--
Gitblit v1.9.1