From ecc7833631efc9af3d081d3ffb64b93d45a10f6d Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期四, 05 二月 2026 11:09:58 +0800
Subject: [PATCH] 新增委外退料校验上传调用方法
---
WebAPI/Controllers/条码管理/WEBSController.cs | 472 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 433 insertions(+), 39 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 dc1871e..a06b901 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 閿�鍞��璐� 涓婁紶鐢熷崟
@@ -4925,6 +5005,66 @@
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 +5366,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 + "'");
//鏇存柊杞﹂棿鏉$爜搴撳瓨
@@ -7052,6 +7214,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 == "瀹夌憺") //绯荤粺鍙傛暟 瀹㈡埛瀹氬埗鍖栧悕绉� 绌虹櫧涓洪�氱敤
@@ -7718,6 +7950,51 @@
//鍏堣繘鍏堝嚭鎺у埗
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";
+ }
+ }
#endregion
//鍘熷崟鎹负鎵爜鐢熸垚锛屽鍘熸壂鎻忕殑鏉$爜杩涜鏍稿锛屽垹闄ゆ潯鐮佸嚭鍏ュ簱鏍¢獙缂撳瓨璁板綍
@@ -8028,6 +8305,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";
}
@@ -8804,6 +9126,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
@@ -13568,19 +13913,27 @@
{
try
{
+ string sErrMsg = "";
+ oSystemParameter.ShowBill(ref sErrMsg);
+ // 鍗庤垷瀹㈡埛
+ if(oSystemParameter.omodel.WMS_CampanyName == "鍗庤垷")
+ {
+ HBarCode = HBarCode.Split('-')[0];
+ }
+
// Mode = 1 琛ㄧず 鎵爜妯″紡 Mode = 2 琛ㄧず 閫夊崟妯″紡
- if(Mode == 1)
+ if (Mode == 1)
{
//鎵爜妯″紡闇�瑕佽В鏋愭潯鐮佽幏鍙朒InterID鍜孒EntryID
ds = oCn.RunProcReturn($@"
exec h_p_CheckBillBarCode_AnalysisBarcode
@HBillType={HBillType},
@HSourceBillType={HSourceBillType},
- @HBarCode={HBarCode},
+ @HBarCode='{HBarCode}',
@user = '{user}'
", "h_p_CheckBillBarCode_AnalysisBarcode");
- if (ds.Tables[0].Rows.Count == 0)
+ if (ds is null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -13676,7 +14029,7 @@
#endregion
#region 娣诲悍鏍规嵁灏忚溅鏉$爜鎵惧嚭鐩稿簲鐗╂枡
- #endregion
+
[Route("WEBSController/GetMaterIDByCarBarCode")]
[HttpGet]
public object GetMaterIDByCarBarCode(string CarBarCode)
@@ -13719,5 +14072,46 @@
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