From 6953c0394201ef74007978f334397ea30a32ec63 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期一, 26 一月 2026 09:47:02 +0800
Subject: [PATCH] 添加 获取 待检验列表 接口
---
WebAPI/Controllers/条码管理/WEBSController.cs | 294 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 290 insertions(+), 4 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 b5d5add..ed05dcf 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"
@@ -1118,7 +1118,7 @@
}
else
{
- objJsonResult.code = "0";
+ objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "鎴愬姛锛�";
objJsonResult.data = ds.Tables[0];
@@ -4870,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 閿�鍞��璐� 涓婁紶鐢熷崟
@@ -5250,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 + "'");
//鏇存柊杞﹂棿鏉$爜搴撳瓨
@@ -7076,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 == "瀹夌憺") //绯荤粺鍙傛暟 瀹㈡埛瀹氬埗鍖栧悕绉� 绌虹櫧涓洪�氱敤
@@ -7742,6 +7890,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
//鍘熷崟鎹负鎵爜鐢熸垚锛屽鍘熸壂鎻忕殑鏉$爜杩涜鏍稿锛屽垹闄ゆ潯鐮佸嚭鍏ュ簱鏍¢獙缂撳瓨璁板綍
@@ -8052,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";
}
@@ -13596,15 +13834,22 @@
if(Mode == 1)
{
//鎵爜妯″紡闇�瑕佽В鏋愭潯鐮佽幏鍙朒InterID鍜孒EntryID
+ LogService.Write($@"
+ exec h_p_CheckBillBarCode_AnalysisBarcode
+ @HBillType={HBillType},
+ @HSourceBillType={HSourceBillType},
+ @HBarCode='{HBarCode}',
+ @user = '{user}'
+ ");
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;
@@ -13700,7 +13945,7 @@
#endregion
#region 娣诲悍鏍规嵁灏忚溅鏉$爜鎵惧嚭鐩稿簲鐗╂枡
- #endregion
+
[Route("WEBSController/GetMaterIDByCarBarCode")]
[HttpGet]
public object GetMaterIDByCarBarCode(string CarBarCode)
@@ -13743,5 +13988,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