From 1948124877478db58b27841f9398aed97ef13053 Mon Sep 17 00:00:00 2001
From: chenhaozhe <gaozhechen26@gmail.com>
Date: 星期日, 26 十月 2025 17:19:15 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WebAPI/Controllers/条码管理/WEBSController.cs | 301 ++++++++++++++++++++++++++++++++++++-------------
1 files changed, 218 insertions(+), 83 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 40d3c77..e883fcf 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
@@ -3836,96 +3880,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;
}
@@ -7657,13 +7721,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;
}
@@ -7671,8 +7742,8 @@
{
objJsonResult.code = "0";
objJsonResult.count = 1;
- objJsonResult.Message = "鎴愬姛";
- objJsonResult.data = WebSoBarModel;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
return objJsonResult;
}
}
@@ -7793,7 +7864,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();
@@ -12679,5 +12750,69 @@
}
}
+ #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 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(HBillNo, HBillType, HMaker, 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
+
}
}
--
Gitblit v1.9.1