From aefdf847ad509b52fe46ed58158e75ca66545d09 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期五, 07 十一月 2025 16:33:01 +0800
Subject: [PATCH] 条码缓存列表删除单据、已上传列表撤销单据调用方法修改
---
WebAPI/Controllers/条码管理/WEBSController.cs | 528 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 488 insertions(+), 40 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 e883fcf..4460c05 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"
@@ -1410,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>
@@ -2122,50 +2166,73 @@
[HttpGet]
public object set_DeleteICStockBillAndWMS_Json(Int64 HInterID, string HBillNo, string HBillType, string HMaker, string MvarReportTitle)
{
- try
+ //鑾峰彇绯荤粺鍙傛暟
+ string sErrMsg = "";
+ if (oSystemParameter.ShowBill(ref sErrMsg) == true)
{
- string WorkList = "鎾ら攢宸蹭笂浼犲崟鎹紝鍗曟嵁鍙凤細" + HBillNo;
- string SystemName = "WMS-" + MvarReportTitle + "妯″潡";
- oCn.BeginTran();
- ds = oCn.RunProcReturn("exec h_p_WMS_ICStockBillAndWMS_Delete " + HInterID + ",'" + HBillNo + "','" + HBillType + "'", "h_p_WMS_ICStockBillAndWMS_Delete");
- if (ds == null || ds.Tables[0].Rows.Count == 0)
+ //鎾ら攢鍓嶅垽鏂噾铦朵簯涓崟鎹槸鍚﹀瓨鍦�
+ if (!GetBillQuery_WMS(HInterID, HBillNo, HBillType, HMaker, oSystemParameter.omodel.WMS_CloudMode, oSystemParameter.omodel.WMS_WMSStockCtl_ERPMode, 2, ref sErrMsg))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = sErrMsg;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ try
+ {
+ oCn.BeginTran();
+ ds = oCn.RunProcReturn("exec h_p_WMS_ICStockBillAndWMS_Delete " + HInterID + ",'" + HBillNo + "','" + HBillType + "'", "h_p_WMS_ICStockBillAndWMS_Delete");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ oCn.RollBack();
+ 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)
+ {
+ oCn.RollBack();
+ objJsonResult.code = "0";
+ objJsonResult.count = 0; //澶辫触锛�
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ else
+ {
+ string WorkList = "鎾ら攢宸蹭笂浼犲崟鎹紝鍗曟嵁鍙凤細" + HBillNo;
+ string SystemName = "WMS-" + MvarReportTitle + "妯″潡";
+ //鍐欏叆鏃ュ織
+ oCn.RunProc("Insert into System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " +
+ "(getdate(),'" + HMaker + "','" + ComputerName + "','" + WorkList + "','" + SystemName + "','','鎾ら攢')"
+ );
+ oCn.Commit();
+ objJsonResult.code = "0";
+ objJsonResult.count = 1; //鎴愬姛锛�
+ objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ catch (Exception e)
{
oCn.RollBack();
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)
- {
- oCn.RollBack();
- objJsonResult.code = "0";
- objJsonResult.count = 0; //澶辫触锛�
- objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
- objJsonResult.data = null;
- return objJsonResult;
- }
- else
- {
- //鍐欏叆鏃ュ織
- oCn.RunProc("Insert into System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " +
- "(getdate(),'" + HMaker + "','" + ComputerName + "','" + WorkList + "','" + SystemName + "','','鎾ら攢')"
- );
- oCn.Commit();
- objJsonResult.code = "0";
- objJsonResult.count = 1; //鎴愬姛锛�
- objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+ objJsonResult.Message = "鎾ら攢鍗曟嵁宸蹭笂浼犺褰曞け璐ワ紒" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
}
}
- catch (Exception e)
+ else
{
- oCn.RollBack();
objJsonResult.code = "0";
objJsonResult.count = 0;
- objJsonResult.Message = "鎾ら攢鍗曟嵁宸蹭笂浼犺褰曞け璐ワ紒" + e.ToString();
+ objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
objJsonResult.data = null;
return objJsonResult;
}
@@ -2305,10 +2372,18 @@
sFIFOCtl = "Y";
}
+ //鍒犻櫎鍓嶅垽鏂噾铦朵簯涓崟鎹槸鍚﹀瓨鍦�
+ if (!GetBillQuery_WMS(HInterID, HBillNo, HBillType, HMaker, oSystemParameter.omodel.WMS_CloudMode, sERPMode, 1, ref sErrMsg))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = sErrMsg;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
try
{
- string WorkList = "鍒犻櫎缂撳瓨鍗曟嵁锛屽崟鎹彿锛�" + HBillNo;
- string SystemName = "WMS-" + MvarReportTitle + "妯″潡";
oCn.BeginTran();
ds = oCn.RunProcReturn("exec h_p_WMS_PonderationBillMain_Temp_Delete " + HInterID + ",'" + HBillNo + "','" + HBillType + "','" + sFIFOCtl + "','" + sERPMode + "'", "h_p_WMS_PonderationBillMain_Temp_Delete");
if (ds == null || ds.Tables[0].Rows.Count == 0)
@@ -2331,6 +2406,8 @@
}
else
{
+ string WorkList = "鍒犻櫎缂撳瓨鍗曟嵁锛屽崟鎹彿锛�" + HBillNo;
+ string SystemName = "WMS-" + MvarReportTitle + "妯″潡";
//鍐欏叆鏃ュ織
oCn.RunProc("Insert into System_Log(GeginDate,userid,WorkstationName,WorkList,SystemName,NetUserName,State) values " +
"(getdate(),'" + HMaker + "','" + ComputerName + "','" + WorkList + "','" + SystemName + "','','鍒犻櫎')"
@@ -2400,6 +2477,210 @@
}
}
+ #endregion
+
+ #region 閲戣澏浜戝崟鎹煡璇�
+ public bool GetBillQuery_WMS(Int64 HInterID, string HBillNo, string HBillType, string HMaker, string sCloudMode, string sERPMode, Int64 sHType, ref string sErrMsg)
+ {
+ //sCloudMode锛氱郴缁熷弬鏁� 鏄惁涓虹鏈変簯妯″紡(N涓哄叕鏈変簯妯″紡锛孻涓虹鏈変簯妯″紡)锛�
+ //sERPMode锛氱郴缁熷弬鏁� 搴撳瓨鎺у埗-WMS搴撳瓨鎺у埗ERP妯″紡 (WISE銆丆LOUD銆丮ES)锛�
+ //sHType锛氬�� 1 瀵瑰簲缂撳瓨鍒楄〃鍒犻櫎锛涘�� 2 瀵瑰簲宸蹭笂浼犳挙閿�锛�
+
+ //鍏湁浜戞ā寮�
+ if (sCloudMode == "N")
+ {
+ string sFormId = ""; //涓氬姟瀵硅薄琛ㄥ崟Id
+
+ //鐢熶骇姹囨姤鍗�
+ if (HBillType == "3711")
+ {
+ sFormId = "PRD_MORPT";
+ }
+ //閲囪喘鍏ュ簱鍗曘�佸澶栧叆搴撳崟
+ else if (HBillType == "1201" || HBillType == "1210")
+ {
+ sFormId = "STK_InStock";
+ }
+ //鐢熶骇鍏ュ簱鍗�
+ else if (HBillType == "1202")
+ {
+ sFormId = "PRD_INSTOCK";
+ }
+ //鍏朵粬鍏ュ簱鍗�
+ else if (HBillType == "1203")
+ {
+ sFormId = "STK_MISCELLANEOUS";
+ }
+ //棰嗘枡鍑哄簱鍗�
+ else if (HBillType == "1204")
+ {
+ sFormId = "PRD_PickMtrl";
+ }
+ //閿�鍞嚭搴撳崟
+ else if (HBillType == "1205")
+ {
+ sFormId = "SAL_OUTSTOCK";
+ }
+ //鍏朵粬鍑哄簱鍗�
+ else if (HBillType == "1206")
+ {
+ sFormId = "STK_MisDelivery";
+ }
+ //濮斿鍑哄簱鍗�
+ else if (HBillType == "1211")
+ {
+ sFormId = "SUB_PickMtrl";
+ }
+ //鐢熶骇琛ユ枡鍗�
+ else if (HBillType == "1254")
+ {
+ sFormId = "PRD_FeedMtrl";
+ }
+ //濮斿琛ユ枡鍗�
+ else if (HBillType == "1255")
+ {
+ sFormId = "SUB_FEEDMTRL";
+ }
+ //鐩存帴璋冩嫧鍗�
+ else if (HBillType == "1207")
+ {
+ sFormId = "STK_TransferDirect";
+ }
+ //鍒嗘寮忚皟鍑哄崟
+ else if (HBillType == "1250")
+ {
+ sFormId = "STK_TRANSFEROUT";
+ }
+ //鍒嗘寮忚皟鍏ュ崟
+ else if (HBillType == "1251")
+ {
+ sFormId = "STK_TRANSFERIN";
+ }
+ //閲囪喘閫�鏂欏崟锛堥噰璐叆搴撳崟绾㈠瓧锛�
+ else if (HBillType == "1239")
+ {
+ sFormId = "PUR_MRB";
+ }
+ //鐢熶骇閫�搴撳崟锛堜骇鍝佸叆搴撳崟绾㈠瓧锛�
+ else if (HBillType == "1245")
+ {
+ sFormId = "PRD_RetStock";
+ }
+ //鍏朵粬鍏ュ簱鍗曪紙绾㈠瓧锛�
+ else if (HBillType == "1248")
+ {
+ sFormId = "";
+ }
+ //濮斿閫�搴撳崟锛堝澶栧叆搴撳崟绾㈠瓧锛�
+ else if (HBillType == "1246")
+ {
+ sFormId = "";
+ }
+ //鐢熶骇閫�鏂欏崟锛堢敓浜ч鏂欏崟绾㈠瓧锛�
+ else if (HBillType == "1244")
+ {
+ sFormId = "PRD_ReturnMtrl";
+ }
+ //閿�鍞��璐у崟锛堥攢鍞嚭搴撳崟绾㈠瓧锛�
+ else if (HBillType == "1247")
+ {
+ sFormId = "SAL_RETURNSTOCK";
+ }
+ //鍏朵粬鍑哄簱鍗曪紙绾㈠瓧锛�
+ else if (HBillType == "1249")
+ {
+ sFormId = "";
+ }
+ //濮斿閫�鏂欏崟锛堝澶栧嚭搴撳崟绾㈠瓧锛�
+ else if (HBillType == "1238")
+ {
+ sFormId = "SUB_RETURNMTRL";
+ }
+
+ //鐧诲綍閲戣澏
+ var loginRet = InvokeHelper.Login();
+ var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>();
+ //鍒ゆ柇鏄惁鐧诲綍鎴愬姛
+ if (isSuccess < 0)
+ {
+ sErrMsg = "榛樿閲戣澏浜戣处鍙风櫥褰曞け璐ワ紒";
+ return false;
+ }
+ else
+ {
+ //鍗曟嵁鏌ヨ
+ var sJson = new
+ {
+ FormId = sFormId,
+ FieldKeys = "FBillNo",
+ FilterString = $@"FBillNo='{HBillNo}'",
+ OrderString = "",
+ TopRowCount = 0,
+ StartRow = 0,
+ Limit = 0
+ };;
+ var _result = InvokeHelper.Query(sFormId, JsonConvert.SerializeObject(sJson));
+ var _saveObj = JArray.Parse(_result);
+
+ //鍒ゆ柇杩斿洖鐨勬暟缁勪腑鏈夋棤鏁版嵁锛屾棤鏁版嵁浠h〃娌℃煡璇㈠埌瀵瑰簲鍗曟嵁
+ if (_saveObj.Count == 0)
+ {
+ return true;
+ }
+ else
+ {
+ //sHType = 1瀵瑰簲缂撳瓨鍒楄〃鍒犻櫎
+ if (sHType == 1)
+ {
+ //鍒ゆ柇杩斿洖鐨勬暟缁勬暟鎹腑鏄惁瀛樺湪"false"锛屽瓨鍦ㄤ唬琛ㄩ�掑叆鐨勪笟鍔″璞¤〃鍗旾d涓嶆纭�
+ if (_saveObj[0][0].ToString().Contains("false") == true)
+ {
+ return true;
+ }
+ else
+ {
+ sErrMsg = "鏁版嵁瀛樺湪寮傚父锛屼笉鍏佽鍒犻櫎锛佸崟鎹彿锛�" + HBillNo + " 鍦ㄩ噾铦朵簯涓凡鐢熸垚鍗曟嵁锛岃鍏堝湪閲戣澏浜戦噷鍒犻櫎璇ュ崟鎹紝骞跺湪缂撳瓨鍒楄〃鐨勫凡涓婁紶鐣岄潰鎾ら攢璇ュ崟鎹紝鍐嶅璇ュ崟鎹繘琛岀紪杈戞垨鍒犻櫎鎿嶄綔锛�";
+ return false;
+ }
+ }
+ //sHType = 2瀵瑰簲宸蹭笂浼犳挙閿�
+ else
+ {
+ //鍒ゆ柇杩斿洖鐨勬暟缁勬暟鎹腑鏄惁瀛樺湪"false"锛屽瓨鍦ㄤ唬琛ㄩ�掑叆鐨勪笟鍔″璞¤〃鍗旾d涓嶆纭�
+ if (_saveObj[0][0].ToString().Contains("false") == true)
+ {
+ sErrMsg = "姝ゆā鍧楁殏涓嶆敮鎸佹挙閿�鍔熻兘锛�";
+ return false;
+ }
+ else
+ {
+ sErrMsg = "鎾ら攢鍗曟嵁澶辫触锛屽崟鎹彿锛�" + HBillNo + "锛岄噾铦朵簯閲屾湭鍒犻櫎锛屼笉鍏佽鎾ら攢锛�";
+ return false;
+ }
+ }
+ }
+ }
+ }
+ //绉佹湁浜戞ā寮�
+ else
+ {
+ ds = oCn.RunProcReturn("exec h_p_WMS_BillQuery " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + sERPMode + "'," + sHType.ToString(), "h_p_WMS_BillQuery");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ sErrMsg = "鍗曟嵁鏌ヨ鍙戠敓閿欒锛�";
+ return false;
+ }
+ else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1)
+ {
+ sErrMsg = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+ }
#endregion
#endregion
@@ -7809,6 +8090,56 @@
#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";
+ 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 鐢熶骇缁勬墭鍗曟ā鍧� 鎵弿鎵樻潯鐮佸搴斿崟涓潯鐮�
/// <summary>
@@ -7874,6 +8205,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";
@@ -12750,27 +13151,26 @@
}
}
- #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)
{
-
+
try
{
WebSoBar = null;
// 1. 鏌ヨ閲戣澏浜戜腑 鎵�鏈夌鍚堢殑鐢熶骇棰嗘枡鍗曞拰涓嬫父棰嗘枡鍗�
ds = oCn.RunProcReturn($@"
- select HBillNo, HChecker from h_v_Kf_MateOutBillList_K3 where HBillNo like '%{HBillNo}%'
+ 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()))
- {
+ if (string.IsNullOrWhiteSpace(row["HChecker"].ToString())){
// 2. 鍒ゆ柇鍗曟嵁瀹℃牳鐘舵�侊紝鏌ユ壘鏈瀹℃牳鐨勫崟鎹�
- WebSoBar = oWebs.get_BillBarCode_BillCheck(HBillNo, HBillType, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
+ WebSoBar = oWebs.get_BillBarCode_BillCheck(row["HBillNo"].ToString(), HBillType, row["HMaker"].ToString(), HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
if (WebSoBar != null)
{
@@ -12814,5 +13214,53 @@
}
#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