From 080398b3ec314095e2fd5cccd3590e42815cc6c8 Mon Sep 17 00:00:00 2001
From: zrg <z1873@LAPTOP-EAVL132E>
Date: 星期三, 05 十一月 2025 15:32:00 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/条码管理/WEBSController.cs | 625 ++++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 538 insertions(+), 87 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 453190c..100555b 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"
@@ -112,6 +112,8 @@
#region 鐢ㄦ埛妯″潡鏉冮檺鍒ゆ柇
+ #region 鐢ㄦ埛妯″潡鏉冮檺鍒ゆ柇 鍒ゆ柇閲戣澏璐﹀彿鏄惁姝g‘
+
/// <summary>
/// 杩涘叆妯″潡鏃惰繘琛岀敤鎴锋潈闄愬垽鏂�
/// </summary>
@@ -184,6 +186,48 @@
return objJsonResult;
}
}
+
+ #endregion
+
+ #region 鐢ㄦ埛妯″潡鏉冮檺鍒ゆ柇
+
+ /// <summary>
+ /// 杩涘叆妯″潡鏃惰繘琛岀敤鎴锋潈闄愬垽鏂�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/CheckModRight_ERP_Json")]
+ [HttpGet]
+ public object CheckModRight_ERP_Json(string ModRightName, string HUserName)
+ {
+ try
+ {
+ //鍒ゆ柇鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log(ModRightName, 3, false, HUserName))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎮ㄦ病鏈夊搴旀ā鍧楁潈闄�,璇蜂笌绠$悊鍛樿仈绯伙紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ 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;
+ }
+ }
+
+ #endregion
#endregion
@@ -381,12 +425,50 @@
{
Int64 HWhID = 0;
HWhID = DBUtility.ClsPub.isLong(HBarCode.Replace("HWH", ""));
- ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HSPFlag from Gy_Warehouse with(nolock) where HStopflag=0 and HItemID=" + HWhID.ToString() + " and HUSEORGID = " + HStockOrgID.ToString(), "Gy_Warehouse");
+ ds = oCn.RunProcReturn("exec h_p_Gy_Warehouse_PDA " + HWhID.ToString() + "," + HStockOrgID.ToString(), "h_p_Gy_Warehouse_PDA");
if (ds == null || ds.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 = ds.Tables[0];
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "杩斿洖浠撳簱淇℃伅澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ /// <summary>
+ /// 鑾峰彇PDA浠撳簱鍒楄〃淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetWarehouseList_Json")]
+ [HttpGet]
+ public object GetWarehouseList_Json(string Warehouse, Int64 HStockOrgID)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_Gy_WarehouseList_PDA '" + Warehouse + "'," + HStockOrgID.ToString(), "h_p_Gy_WarehouseList_PDA");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "娌℃湁杩斿洖浠讳綍浠撳簱璁板綍锛�";
objJsonResult.data = null;
return objJsonResult;
}
@@ -1328,6 +1410,50 @@
#endregion
+ #region 鎵爜妯″潡 鎵弿婧愬崟 杩涜鎺у埗鍒ゆ柇
+ /// <summary>
+ /// 婧愬崟鍒楄〃淇℃伅锛屾牴鎹崟鎹被鍨嬨�佹簮鍗曠被鍨嬨�佺粍缁嘔D杩斿洖婧愬崟鍒楄〃淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetSourceBillList_Control")]
+ [HttpGet]
+ public object GetSourceBillList_Control(string HBillType, string HSourceBillType, Int64 HStockOrgID, string HSourceBillNo, string HMater, string HCustom)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_WMS_GetSourceBillList_Control '" + HBillType + "','" + HSourceBillType + "'," + HStockOrgID.ToString() + ",'" + HSourceBillNo + "','" + HMater + "','" + HCustom + "'", "h_p_WMS_GetSourceBillList_Control");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍒ゆ柇婧愬崟澶辫触锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ if(DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ objJsonResult.code = "1";
+ 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;
+ }
+ }
+ #endregion
#region 鎵爜妯″潡 杩斿洖婧愬崟鍒楄〃淇℃伅
/// <summary>
@@ -2511,6 +2637,7 @@
websLsmain.HInterID = lsmain[0].HInterID;
websLsmain.HBillNo = lsmain[0].HBillNo;
websLsmain.HBillType = "1202";
+ websLsmain.HMaker = lsmain[0].HMaker;
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
if (oWebs.set_SaveProductInBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -2652,6 +2779,7 @@
websLsmain.HInterID = lsmain[0].HInterID;
websLsmain.HBillNo = lsmain[0].HBillNo;
websLsmain.HBillType = "1201";
+ websLsmain.HMaker = lsmain[0].HMaker;
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
if (oWebs.set_SavePOStockInBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -2877,6 +3005,7 @@
websLsmain.HInterID = lsmain[0].HInterID;
websLsmain.HBillNo = lsmain[0].HBillNo;
websLsmain.HBillType = "1203";
+ websLsmain.HMaker = lsmain[0].HMaker;
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
if (oWebs.set_SaveOtherInBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -3031,6 +3160,7 @@
websLsmain.HInterID = lsmain[0].HInterID;
websLsmain.HBillNo = lsmain[0].HBillNo;
websLsmain.HBillType = "1204";
+ websLsmain.HMaker = lsmain[0].HMaker;
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
if (oWebs.set_SaveMateOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -3271,6 +3401,7 @@
websLsmain.HInterID = lsmain[0].HInterID;
websLsmain.HBillNo = lsmain[0].HBillNo;
websLsmain.HBillType = "1205";
+ websLsmain.HMaker = lsmain[0].HMaker;
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
if (oWebs.set_SaveSellOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -3410,6 +3541,7 @@
websLsmain.HInterID = lsmain[0].HInterID;
websLsmain.HBillNo = lsmain[0].HBillNo;
websLsmain.HBillType = "1211";
+ websLsmain.HMaker = lsmain[0].HMaker;
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
if (oWebs.set_SaveEntrustOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -3548,6 +3680,7 @@
websLsmain.HInterID = lsmain[0].HInterID;
websLsmain.HBillNo = lsmain[0].HBillNo;
websLsmain.HBillType = "1206";
+ websLsmain.HMaker = lsmain[0].HMaker;
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
if (oWebs.set_SaveOtherOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -3685,6 +3818,7 @@
websLsmain.HInterID = lsmain[0].HInterID;
websLsmain.HBillNo = lsmain[0].HBillNo;
websLsmain.HBillType = "1254";
+ websLsmain.HMaker = lsmain[0].HMaker;
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
if (oWebs.set_SaveMateReplenishOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -3744,6 +3878,7 @@
websLsmain.HInterID = lsmain[0].HInterID;
websLsmain.HBillNo = lsmain[0].HBillNo;
websLsmain.HBillType = "1255";
+ websLsmain.HMaker = lsmain[0].HMaker;
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
if (oWebs.set_SaveEntrustReplenishOutBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -3789,96 +3924,116 @@
[HttpPost]
public object set_SaveMoveStockBill_Json([FromBody] JObject oMain)
{
- var _value = oMain["oMain"].ToString();
- string msg1 = _value.ToString();
- try
+ //鑾峰彇绯荤粺鍙傛暟
+ string sErrMsg = "";
+ if (oSystemParameter.ShowBill(ref sErrMsg) == true)
{
- List<Model.ClsKf_MoveStockBillMain> lsmain = new List<Model.ClsKf_MoveStockBillMain>();
- ListModels oListModels = new ListModels();
- lsmain = oListModels.getMoveStockBillMainByJson(msg1);
- WebS.ClsKf_MoveStockBillMain websLsmain = new WebS.ClsKf_MoveStockBillMain();
- string sSourceType = lsmain[0].HMainSourceBillType;
- websLsmain.HInterID = lsmain[0].HInterID;
- websLsmain.HBillNo = lsmain[0].HBillNo;
- websLsmain.HBillType = lsmain[0].HBillType;
- websLsmain.HDate = lsmain[0].HDate;
- websLsmain.HDeptID = lsmain[0].HDeptID;
- websLsmain.HWHID = lsmain[0].HWHID;
- websLsmain.HSCWHID = lsmain[0].HSCWHID;
- websLsmain.HSupID = lsmain[0].HSupID;
- websLsmain.HKeeperID = lsmain[0].HKeeperID;
- websLsmain.HSecManagerID = lsmain[0].HSecManagerID;
- websLsmain.HEmpID = lsmain[0].HEmpID;
- websLsmain.HManagerID = lsmain[0].HManagerID;
- websLsmain.HRemark = lsmain[0].HRemark;
- websLsmain.HExplanation = lsmain[0].HExplanation;
- websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo;
- websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag;
- websLsmain.HBillSubType = lsmain[0].HBillSubType;
- websLsmain.HStockStyle = lsmain[0].HStockStyle;
- websLsmain.HTransferDirect = lsmain[0].HTransferDirect;
- websLsmain.HShipType = lsmain[0].HShipType;
- if (lsmain[0].HMainSourceBillType == "1402")
+ var _value = oMain["oMain"].ToString();
+ string msg1 = _value.ToString();
+ try
{
- websLsmain.HMainSourceBillType = "鍙戣揣閫氱煡鍗�";
- }
- else if (lsmain[0].HMainSourceBillType == "1243")
- {
- websLsmain.HMainSourceBillType = "璋冩嫧鐢宠鍗�";
- }
- else if (lsmain[0].HMainSourceBillType == "3720")
- {
- websLsmain.HMainSourceBillType = "鐢熶骇鐢ㄦ枡娓呭崟";
- }
- else if (lsmain[0].HMainSourceBillType == "1604")
- {
- websLsmain.HMainSourceBillType = "濮斿鐢ㄦ枡娓呭崟";
- }
- else if (lsmain[0].HMainSourceBillType == "1214")
- {
- websLsmain.HMainSourceBillType = "鐢熶骇鍙戞枡閫氱煡鍗�";
- }
- else if (lsmain[0].HMainSourceBillType == "3721")
- {
- websLsmain.HMainSourceBillType = "鐢熶骇澶囨枡鍗�";
- }
- else if (lsmain[0].HMainSourceBillType == "1242")
- {
- websLsmain.HMainSourceBillType = "鍑哄簱鐢宠鍗�";
- }
- else
- {
- websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆";
- }
- websLsmain.HMaker = lsmain[0].HMaker;
- websLsmain.HBillerID = lsmain[0].HBillerID;
- websLsmain.HStockInOrgID = lsmain[0].HStockInOrgID;
- websLsmain.HStockOutOrgID = lsmain[0].HStockOutOrgID;
- websLsmain.HSTOCKORGID = lsmain[0].HStockOutOrgID;
- websLsmain.HOWNERID = lsmain[0].HStockOutOrgID;
+ List<Model.ClsKf_MoveStockBillMain> lsmain = new List<Model.ClsKf_MoveStockBillMain>();
+ ListModels oListModels = new ListModels();
+ lsmain = oListModels.getMoveStockBillMainByJson(msg1);
+ WebS.ClsKf_MoveStockBillMain websLsmain = new WebS.ClsKf_MoveStockBillMain();
+ string sSourceType = lsmain[0].HMainSourceBillType;
+ websLsmain.HInterID = lsmain[0].HInterID;
+ websLsmain.HBillNo = lsmain[0].HBillNo;
+ websLsmain.HBillType = lsmain[0].HBillType;
+ websLsmain.HDate = lsmain[0].HDate;
+ websLsmain.HDeptID = lsmain[0].HDeptID;
+ websLsmain.HWHID = lsmain[0].HWHID;
+ websLsmain.HSCWHID = lsmain[0].HSCWHID;
+ if (oSystemParameter.omodel.WMS_CampanyName == "灏忓崼") //绯荤粺鍙傛暟 瀹㈡埛瀹氬埗鍖栧悕绉� 绌虹櫧涓洪�氱敤
+ {
+ websLsmain.HSupID = lsmain[0].HCusID;
+ }
+ else
+ {
+ websLsmain.HSupID = lsmain[0].HSupID;
+ }
+ websLsmain.HKeeperID = lsmain[0].HKeeperID;
+ websLsmain.HSecManagerID = lsmain[0].HSecManagerID;
+ websLsmain.HEmpID = lsmain[0].HEmpID;
+ websLsmain.HManagerID = lsmain[0].HManagerID;
+ websLsmain.HRemark = lsmain[0].HRemark;
+ websLsmain.HExplanation = lsmain[0].HExplanation;
+ websLsmain.HInnerBillNo = lsmain[0].HInnerBillNo;
+ websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag;
+ websLsmain.HBillSubType = lsmain[0].HBillSubType;
+ websLsmain.HStockStyle = lsmain[0].HStockStyle;
+ websLsmain.HTransferDirect = lsmain[0].HTransferDirect;
+ websLsmain.HShipType = lsmain[0].HShipType;
+ if (lsmain[0].HMainSourceBillType == "1402")
+ {
+ websLsmain.HMainSourceBillType = "鍙戣揣閫氱煡鍗�";
+ }
+ else if (lsmain[0].HMainSourceBillType == "1243")
+ {
+ websLsmain.HMainSourceBillType = "璋冩嫧鐢宠鍗�";
+ }
+ else if (lsmain[0].HMainSourceBillType == "3720")
+ {
+ websLsmain.HMainSourceBillType = "鐢熶骇鐢ㄦ枡娓呭崟";
+ }
+ else if (lsmain[0].HMainSourceBillType == "1604")
+ {
+ websLsmain.HMainSourceBillType = "濮斿鐢ㄦ枡娓呭崟";
+ }
+ else if (lsmain[0].HMainSourceBillType == "1214")
+ {
+ websLsmain.HMainSourceBillType = "鐢熶骇鍙戞枡閫氱煡鍗�";
+ }
+ else if (lsmain[0].HMainSourceBillType == "3721")
+ {
+ websLsmain.HMainSourceBillType = "鐢熶骇澶囨枡鍗�";
+ }
+ else if (lsmain[0].HMainSourceBillType == "1242")
+ {
+ websLsmain.HMainSourceBillType = "鍑哄簱鐢宠鍗�";
+ }
+ else
+ {
+ websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆";
+ }
+ websLsmain.HMaker = lsmain[0].HMaker;
+ websLsmain.HBillerID = lsmain[0].HBillerID;
+ websLsmain.HStockInOrgID = lsmain[0].HStockInOrgID;
+ websLsmain.HStockOutOrgID = lsmain[0].HStockOutOrgID;
+ websLsmain.HSTOCKORGID = lsmain[0].HStockOutOrgID;
+ websLsmain.HOWNERID = lsmain[0].HStockOutOrgID;
- if (oWebs.set_SaveMoveStockBill(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo))
- {
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛�
- objJsonResult.data = null;
- return objJsonResult;
+ if (oWebs.set_SaveMoveStockBill(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //鎴愬姛锛�
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛�
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
}
- else
+ catch (Exception e)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //澶辫触锛�
+ objJsonResult.Message = "鐩存帴璋冩嫧鍗曚笂浼犲け璐ワ紒" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
}
- catch (Exception e)
+ else
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鐩存帴璋冩嫧鍗曚笂浼犲け璐ワ紒" + e.ToString();
+ objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
objJsonResult.data = null;
return objJsonResult;
}
@@ -4031,6 +4186,7 @@
websLsmain.HInterID = lsmain[0].HInterID;
websLsmain.HBillNo = lsmain[0].HBillNo;
websLsmain.HBillType = "1207";
+ websLsmain.HMaker = lsmain[0].HMaker;
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
if (oWebs.set_SaveMoveStockBill_BillCheck(websLsmain, ref DBUtility.ClsPub.sErrInfo))
@@ -4325,6 +4481,10 @@
{
websLsmain.HMainSourceBillType = "閫�鏂欓�氱煡鍗�";
}
+ else if (lsmain[0].HMainSourceBillType == "1201")
+ {
+ websLsmain.HMainSourceBillType = "閲囪喘鍏ュ簱鍗�";
+ }
else
{
websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆";
@@ -4406,6 +4566,10 @@
if (lsmain[0].HMainSourceBillType == "3720")
{
websLsmain.HMainSourceBillType = "鐢熶骇鐢ㄦ枡娓呭崟";
+ }
+ else if (lsmain[0].HMainSourceBillType == "1204")
+ {
+ websLsmain.HMainSourceBillType = "鐢熶骇棰嗘枡鍗�";
}
else
{
@@ -7535,6 +7699,55 @@
#endregion
+ #region 鏍¢獙妯″潡 杩斿洖婧愬崟鍒楄〃淇℃伅
+ /// <summary>
+ /// 婧愬崟鍒楄〃淇℃伅锛屾牴鎹崟鎹被鍨嬨�佺粍缁嘔D杩斿洖婧愬崟鍒楄〃淇℃伅
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/GetCheckBillList_Json")]
+ [HttpGet]
+ public object GetCheckBillList_Json(string HBillType, Int64 HStockOrgID, string HBillNo, string HMater, string HCustom)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_WMS_GetCheckBillList '" + HBillType + "'," + HStockOrgID.ToString() + ",'" + HBillNo + "','" + HMater + "','" + HCustom + "'", "h_p_WMS_GetCheckBillList");
+ 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
+
#endregion
@@ -7552,13 +7765,20 @@
{
try
{
- WebS.ClsGy_BarCodeBill_WMS_Model WebSoBarModel = new WebS.ClsGy_BarCodeBill_WMS_Model();
- WebSoBarModel = oWebs.get_PackBarCode_PackUnionBill(HInterID, HBillNo, HBillType, HBarCode_Pack, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
- if (WebSoBarModel == null)
+ ds = oCn.RunProcReturn("exec h_p_WMS_AddPackBarCode_PackUnionBill " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode_Pack + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddPackBarCode_PackUnionBill");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+ 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;
}
@@ -7566,8 +7786,8 @@
{
objJsonResult.code = "0";
objJsonResult.count = 1;
- objJsonResult.Message = "鎴愬姛";
- objJsonResult.data = WebSoBarModel;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
return objJsonResult;
}
}
@@ -7596,6 +7816,56 @@
try
{
ds = oCn.RunProcReturn("exec h_p_WMS_AddPackBarCode_PackUnionBill_New " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBillSubType + "','" + HBarCode_Pack + "'", "h_p_WMS_AddPackBarCode_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 = 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 鐢熶骇缁勬墭鍗曟ā鍧� 鎵弿瀹㈡埛绠憋紙鎵橈級鏉$爜 -鍑礉瑁呯鍗� 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)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_WMS_AddPackBarCode_PackUnionBill_New_Cus " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBillSubType + "','" + HBarCode_Pack + "','" + HSourceBillNo + "'", "h_p_WMS_AddPackBarCode_PackUnionBill_New_Cus");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -7688,7 +7958,7 @@
string sErrMsg = "";
if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
{
- string sMaterialCtl = "Y"; //缁勬墭鏃舵墭鏉$爜瀵瑰簲鐗╂枡涓庨渶瑕佺粍鎵樼殑鏉$爜瀵瑰簲鐗╂枡瑕佷竴鑷达紙Y涓洪渶涓�鑷达級
+ string sMaterialCtl = "Y"; //缁勬墭鐗╂枡鏄惁涓�鑷存帶鍒讹紙Y涓烘帶鍒讹級
string sSourceBillTypeCtl = "Y"; //鏈叆搴撴潯鐮佽繘琛岀粍鎵樻椂锛岃繘琛屽悓婧愬崟绫诲瀷鎺у埗锛圷涓烘帶鍒讹級
string sSourceBillNoCtl = "Y"; //鏈叆搴撴潯鐮佽繘琛岀粍鎵樻椂锛岃繘琛屽悓婧愬崟鎺у埗锛圷涓烘帶鍒讹級
sMaterialCtl = oSystemParameter.omodel.Sc_PackUnionBill_MaterialCtl.ToUpper();
@@ -7698,6 +7968,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 鐢熶骇缁勬墭鍗曟ā鍧� 鎵弿瀹㈡埛鎵樻潯鐮佸搴旀潯鐮� -鍑礉瑁呯鍗� 20251103
+
+ /// <summary>
+ /// 鐢熶骇缁勬墭鍗曟ā鍧� 鎵弿鎵樻潯鐮佸搴旀潯鐮�
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/Get_BarCode_PackUnionBill_New_Json_Cus")]
+ [HttpGet]
+ public object Get_BarCode_PackUnionBill_New_Json_Cus(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_Cus '" + HBarCode + "'," + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBillSubType + "','" + HBarCode_Pack + "','" + HMaterNumber_Pack + "','" + sMaterialCtl + "','" + sSourceBillTypeCtl + "','" + sSourceBillNoCtl + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddBarCode_PackUnionBill_New_Cus");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -9763,12 +10103,12 @@
/// <returns></returns>
[Route("WEBSController/GetGy_BarCodeBill_QiaoYi_PDA_Json")]
[HttpGet]
- public object GetGy_BarCodeBill_QiaoYi_PDA_Json(string sBarCode, string sBarCodeOutDate, string sCustomerName, string sSellOutBillNo)
+ public object GetGy_BarCodeBill_QiaoYi_PDA_Json(string sBarCode)
{
try
{
- //ds = oCn.RunProcReturn("exec h_p_Gy_BarCodeBillList_QiaoYi '" + sBarCode+ "'", "h_p_Gy_BarCodeBillList_QiaoYi");
- ds = oCn.RunProcReturn("exec h_p_Gy_BarCodeBillList_QiaoYi2 '" + sBarCode + "','" + sBarCodeOutDate + "','" + sCustomerName + "','" + sSellOutBillNo + "'", "h_p_Gy_BarCodeBillList_QiaoYi2");
+ ds = oCn.RunProcReturn("exec h_p_Gy_BarCodeBillList_QiaoYi '" + sBarCode + "'", "h_p_Gy_BarCodeBillList_QiaoYi");
+ //ds = oCn.RunProcReturn("exec h_p_Gy_BarCodeBillList_QiaoYi2 '" + sBarCode + "','" + sBarCodeOutDate + "','" + sCustomerName + "','" + sSellOutBillNo + "'", "h_p_Gy_BarCodeBillList_QiaoYi2");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -12574,5 +12914,116 @@
}
}
+ #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)
+ {
+
+ try
+ {
+ WebSoBar = null;
+ // 1. 鏌ヨ閲戣澏浜戜腑 鎵�鏈夌鍚堢殑鐢熶骇棰嗘枡鍗曞拰涓嬫父棰嗘枡鍗�
+ ds = oCn.RunProcReturn($@"
+ select HBillNo, HChecker,HMaker from h_v_Kf_MateOutBillList_K3 where HBillNo like '%{HBillNo}%'
+ ", "h_v_Kf_MateOutBillList_K3");
+
+ List<string> HBillNoList = new List<string>();
+ foreach (DataRow row in ds.Tables[0].Rows)
+ {
+ if (string.IsNullOrWhiteSpace(row["HChecker"].ToString())){
+ // 2. 鍒ゆ柇鍗曟嵁瀹℃牳鐘舵�侊紝鏌ユ壘鏈瀹℃牳鐨勫崟鎹�
+ WebSoBar = oWebs.get_BillBarCode_BillCheck(row["HBillNo"].ToString(), HBillType, row["HMaker"].ToString(), HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
+
+ if (WebSoBar != null)
+ {
+ // 3. 鑾峰彇鍒扮鍚堟潯浠剁殑杩斿洖鍊硷紝绔嬪嵆杩斿洖
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛";
+ objJsonResult.data = WebSoBar;
+ return objJsonResult;
+ }
+ }
+ }
+
+
+ // 3. 鎵�鏈夊崟鎹兘琚鏍革紝鎴栬�呮病鏈夌鍚堣姹傜殑鍗曟嵁锛岃繑鍥為敊璇俊鎭�
+ if (WebSoBar == null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎴愬姛";
+ objJsonResult.data = WebSoBar;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵弿鍗曟嵁鏉$爜澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+
+ #region 鍑礉 瑁呯鍗曚繚瀛樺悗 鑷姩鐢熸垚浜ч噺姹囨姤鍗�
+
+ [Route("WEBSController/Sc_ICMOBillWorkQtyStatus_Tmp_Save")]
+ [HttpGet]
+ public object Sc_ICMOBillWorkQtyStatus_Tmp_Save(string HInterID)
+ {
+ try
+ {
+
+ string sql = $"exec [h_p_Sc_ICMOBillWorkQtyStatus_Save] {HInterID}";
+ ds = oCn.RunProcReturn(sql, "[h_p_Sc_ICMOBillWorkQtyStatus_Save]");
+ 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 = "鑷姩鐢熸垚浜ч噺姹囨姤鍗曞け璐ワ紒" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #endregion
}
}
--
Gitblit v1.9.1