From 0d19dcc80b6b1864be6813f4caf93996bb505d82 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期一, 26 一月 2026 09:46:14 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/条码管理/WEBSController.cs | 828 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 774 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 4460c05..c1b4508 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];
@@ -4846,6 +4870,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 閿�鍞��璐� 涓婁紶鐢熷崟
@@ -4973,6 +5053,33 @@
}
}
+ #endregion
+
+ #region 灏忓崼缁勬墭鏉$爜灞曠ず
+ [Route("WEBSController/get_SavePackUnion_xiaowei")]
+ [HttpGet]
+ public object get_SavePackUnion_xiaowei(string HBarCode_Pack)
+ {
+ try
+ {
+
+ DataSet ds=oCn.RunProcReturn($"select * from h_v_get_PackUnionBill where 鏍堟澘鐮�='{HBarCode_Pack}'", "h_v_get_PackUnionBill");
+
+ objJsonResult.code = "1";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "success";
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛�
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
#endregion
#region 涓婃枡闃查敊鍗� 涓婁紶鐢熷崟
@@ -5199,6 +5306,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 + "'");
//鏇存柊杞﹂棿鏉$爜搴撳瓨
@@ -6782,10 +6911,10 @@
#endregion
- #region 鎵弿鍗曟嵁鏉$爜 鍑哄叆搴撴ā鍧�
+ #region 鎵弿鍗曟嵁鏉$爜 20251225
/// <summary>
- /// 鎵弿鍗曟嵁鏉$爜 鍑哄叆搴撴ā鍧� 鏍¢獙妯″紡
+ /// 鎵弿鍗曟嵁鏉$爜 鏍¢獙妯″紡
/// </summary>
/// <returns></returns>
[Route("WEBSController/get_BillBarCode_BillCheck_Json")]
@@ -6824,7 +6953,7 @@
#endregion
- #region 鎵弿鍗曟嵁鏉$爜 宸插瓨鍦ㄦ壂鐮佽褰曚笖鍗曟嵁鍙戠敓鍙樻洿鍚庝袱杈规暟鎹笉涓�鑷存椂锛屾竻绌哄師鎵爜鏁版嵁 20241216
+ #region 鎵弿鍗曟嵁鏉$爜 宸插瓨鍦ㄦ壂鐮佽褰曚笖鍗曟嵁鍙戠敓鍙樻洿鍚庝袱杈规暟鎹笉涓�鑷存椂锛屾竻绌哄師鎵爜鏁版嵁 20251225
/// <summary>
/// 宸插瓨鍦ㄦ壂鐮佽褰曚笖鍗曟嵁鍙戠敓鍙樻洿鍚庝袱杈规暟鎹笉涓�鑷存椂锛屾竻绌哄師鎵爜鏁版嵁
@@ -6866,7 +6995,7 @@
#endregion
- #region 鎵弿鐗╂枡鏉$爜 鍑哄叆搴撴ā鍧�
+ #region 鎵弿鐗╂枡鏉$爜 20251225
/// <summary>
/// 鐗╂枡鏉$爜鏂囨湰妗� 鏍¢獙鎵爜璋冪敤 鏍¢獙妯″紡
@@ -6874,7 +7003,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 = "";
@@ -7025,6 +7154,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 == "瀹夌憺") //绯荤粺鍙傛暟 瀹㈡埛瀹氬埗鍖栧悕绉� 绌虹櫧涓洪�氱敤
@@ -7070,11 +7269,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;
@@ -7110,7 +7317,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>
/// 杩斿洖鍗曟嵁鍒楄〃淇℃伅 鏍¢獙妯″紡
@@ -7157,7 +7428,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;
@@ -7226,7 +7498,7 @@
#endregion
- #region 鏍¢獙鎵爜妯″潡锛屽垹闄ら�変腑琛屾潯鐮佸嚭鍏ュ簱涓存椂琛ㄨ褰� 20241114
+ #region 鏍¢獙鎵爜妯″潡锛屽垹闄ら�変腑琛屾潯鐮佸嚭鍏ュ簱涓存椂琛ㄨ褰� 20251225
/// <summary>
/// 鎵爜妯″潡锛屽垹闄ら�変腑琛屾潯鐮佸嚭鍏ュ簱涓存椂琛ㄨ褰�
@@ -7334,6 +7606,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>
@@ -7385,7 +7766,7 @@
#endregion
- #region 鏍¢獙缂撳瓨妯″潡 鏍规嵁鍗曟嵁ID,鍒犻櫎涓存椂琛ㄨ褰� 20241216
+ #region 鏍¢獙缂撳瓨妯″潡 鏍规嵁鍗曟嵁ID,鍒犻櫎涓存椂琛ㄨ褰� 20251225
/// <summary>
/// 鏍规嵁鍗曟嵁ID,鍒犻櫎涓存椂琛ㄨ褰�
@@ -7402,6 +7783,7 @@
if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
{
string sSourceBarCodeCtl = "N"; //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
+ string sFIFOCtl = "4"; //鍏堣繘鍏堝嚭鎺у埗锛�1銆佷笉鎺у埗浠呮樉绀轰笅鏋舵竻鍗� 2銆佷弗鏍兼帶鍒跺厛杩涘厛鍑� 3銆佷粎鎻愮ず鍜屾樉绀轰笅鏋舵竻鍗� 4銆佷笉鏄剧ず涓嬫灦娓呭崟涔熶笉鎺у埗锛�
#region 绯荤粺鍙傛暟鑾峰彇
//閲囪喘鍏ュ簱鍗�
@@ -7439,6 +7821,8 @@
{
sSourceBarCodeCtl = "Y";
}
+ //鍏堣繘鍏堝嚭鎺у埗
+ sFIFOCtl = oSystemParameter.omodel.Kf_MateOutBillCheck_FIFOCtl;
}
//閿�鍞嚭搴撳崟
else if (HBillType == "1205")
@@ -7448,6 +7832,8 @@
{
sSourceBarCodeCtl = "Y";
}
+ //鍏堣繘鍏堝嚭鎺у埗
+ sFIFOCtl = oSystemParameter.omodel.Kf_SellOutBillCheck_FIFOCtl;
}
//鍏朵粬鍑哄簱鍗�
else if (HBillType == "1206")
@@ -7457,6 +7843,8 @@
{
sSourceBarCodeCtl = "Y";
}
+ //鍏堣繘鍏堝嚭鎺у埗
+ sFIFOCtl = oSystemParameter.omodel.Kf_OtherOutBillCheck_FIFOCtl;
}
//濮斿棰嗘枡鍗�
else if (HBillType == "1211")
@@ -7466,6 +7854,8 @@
{
sSourceBarCodeCtl = "Y";
}
+ //鍏堣繘鍏堝嚭鎺у埗
+ sFIFOCtl = oSystemParameter.omodel.Kf_EntrustOutBillCheck_FIFOCtl;
}
//鐢熶骇琛ユ枡鍗�
else if (HBillType == "1254")
@@ -7475,6 +7865,8 @@
{
sSourceBarCodeCtl = "Y";
}
+ //鍏堣繘鍏堝嚭鎺у埗
+ sFIFOCtl = oSystemParameter.omodel.Kf_MateReplenishOutBillCheck_FIFOCtl;
}
//濮斿琛ユ枡鍗�
else if (HBillType == "1255")
@@ -7484,12 +7876,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";
}
@@ -7530,6 +7971,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 " +
@@ -7798,6 +8245,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";
}
@@ -8091,11 +8583,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)
@@ -8205,6 +8693,76 @@
try
{
ds = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_PackUnionBill_New '" + HBarCode + "'," + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBillSubType + "','" + HBarCode_Pack + "','" + HMaterNumber_Pack + "','" + sMaterialCtl + "','" + sSourceBillTypeCtl + "','" + sSourceBillNoCtl + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddBarCode_PackUnionBill_New");
+ 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 = null;
+ 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 鐢熶骇缁勬墭鍗曟ā鍧� 鎵弿鎵樻潯鐮佸搴旀潯鐮�--xiaowei 20250630
+
+ /// <summary>
+ /// 鐢熶骇缁勬墭鍗曟ā鍧� 鎵弿鎵樻潯鐮佸搴旀潯鐮�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/get_BarCode_PackUnionBill_New_Json_xiaowei")]
+ [HttpGet]
+ public object get_BarCode_PackUnionBill_New_Json_xiaowei(string HBarCode, Int64 HInterID, string HBillNo, string HBillType, string HBillSubType, string HBarCode_Pack, string HMaterNumber_Pack, string HMaker, Int64 HStockOrgID)
+ {
+ //鑾峰彇绯荤粺鍙傛暟
+ string sErrMsg = "";
+ if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
+ {
+ string sMaterialCtl = "Y"; //缁勬墭鐗╂枡鏄惁涓�鑷存帶鍒讹紙Y涓烘帶鍒讹級
+ string sSourceBillTypeCtl = "Y"; //鏈叆搴撴潯鐮佽繘琛岀粍鎵樻椂锛岃繘琛屽悓婧愬崟绫诲瀷鎺у埗锛圷涓烘帶鍒讹級
+ string sSourceBillNoCtl = "Y"; //鏈叆搴撴潯鐮佽繘琛岀粍鎵樻椂锛岃繘琛屽悓婧愬崟鎺у埗锛圷涓烘帶鍒讹級
+ sMaterialCtl = oSystemParameter.omodel.Sc_PackUnionBill_MaterialCtl.ToUpper();
+ sSourceBillTypeCtl = oSystemParameter.omodel.Sc_PackUnionBill_SourceBillTypeCtl.ToUpper();
+ sSourceBillNoCtl = oSystemParameter.omodel.Sc_PackUnionBill_SourceBillNoCtl.ToUpper();
+
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_PackUnionBill_New_xiaowei '" + HBarCode + "'," + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBillSubType + "','" + HBarCode_Pack + "','" + HMaterNumber_Pack + "','" + sMaterialCtl + "','" + sSourceBillTypeCtl + "','" + sSourceBillNoCtl + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddBarCode_PackUnionBill_New");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -13061,11 +13619,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";
@@ -13105,7 +13663,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)
@@ -13150,8 +13709,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)
@@ -13262,5 +13822,165 @@
}
#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
+ {
+ // 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.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 灏忚溅='" + 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
}
}
--
Gitblit v1.9.1