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 | 1144 ++++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 967 insertions(+), 177 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 9fa1b18..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"
@@ -72,7 +72,7 @@
objJsonResult.data = null;
return objJsonResult;
}
- else if (DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HBack"])==1)
+ else if (DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HBack"]) == 1)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -111,6 +111,8 @@
#endregion
#region 鐢ㄦ埛妯″潡鏉冮檺鍒ゆ柇
+
+ #region 鐢ㄦ埛妯″潡鏉冮檺鍒ゆ柇 鍒ゆ柇閲戣澏璐﹀彿鏄惁姝g‘
/// <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;
}
@@ -432,7 +514,7 @@
sHWhID = DBUtility.ClsPub.isLong(sArray[0]);
}
- if(HWhID==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)
@@ -990,13 +1072,13 @@
/// <returns></returns>
[Route("WEBSController/GetEquipList_Json")]
[HttpGet]
- public object GetEquipList_Json(string Equip,int HCenterID)
+ public object GetEquipList_Json(string Equip, int HCenterID)
{
try
{
- if (HCenterID !=0)
+ if (HCenterID != 0)
{
- ds = oCn.RunProcReturn("select HInterID,HEquipFileNumber,HName,HSourceID,HSourceName,HCenterID from h_v_Gy_EquipFileBill where HCenterID='"+HCenterID+"' and ( HEquipFileNumber like '%" + Equip + "%' or HName like '%" + Equip + "%')", "h_v_Gy_EquipFileBill");
+ ds = oCn.RunProcReturn("select HInterID,HEquipFileNumber,HName,HSourceID,HSourceName,HCenterID from h_v_Gy_EquipFileBill where HCenterID='" + HCenterID + "' and ( HEquipFileNumber like '%" + Equip + "%' or HName like '%" + Equip + "%')", "h_v_Gy_EquipFileBill");
}
else
{
@@ -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>
@@ -1567,7 +1693,7 @@
try
{
- if(sFIFOCtl == "Y")
+ if (sFIFOCtl == "Y")
{
//鏇存柊鍏堣繘鍏堝嚭涓存椂琛ㄧ姸鎬�
oCn.RunProc("EXEC h_p_WMS_UPDateICInventory_FIFO_Tmp " + HInterID.ToString() + ",'" + HBillType + "'");
@@ -1990,7 +2116,7 @@
{
try
{
- ds = oCn.RunProcReturn("exec h_p_Kf_ICStockBillQueryList_New '" + HBillType + "','" + HBillNo + "','" + HSourceBillNo + "','" + HMaker + "'," + HStockOrgID.ToString() + ",'" + sWhere+"'", "h_p_Kf_ICStockBillQueryList_New");
+ ds = oCn.RunProcReturn("exec h_p_Kf_ICStockBillQueryList_New '" + HBillType + "','" + HBillNo + "','" + HSourceBillNo + "','" + HMaker + "'," + HStockOrgID.ToString() + ",'" + sWhere + "'", "h_p_Kf_ICStockBillQueryList_New");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -2040,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;
}
@@ -2223,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)
@@ -2249,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 + "','','鍒犻櫎')"
@@ -2318,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
@@ -2511,6 +2874,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 +3016,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))
@@ -2811,7 +3176,7 @@
websLsmain.HRedBlueFlag = lsmain[0].HRedBlueFlag;
websLsmain.HStockStyle = lsmain[0].HStockStyle;
websLsmain.HBillSubType = lsmain[0].HBillSubType;
- if(lsmain[0].HMainSourceBillType== "1241")
+ if (lsmain[0].HMainSourceBillType == "1241")
{
websLsmain.HMainSourceBillType = "鍏ュ簱鐢宠鍗�";
}
@@ -2877,6 +3242,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))
@@ -2973,7 +3339,7 @@
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
websLsmain.HOWNERID = lsmain[0].HSTOCKORGID;
- if(sSourceType== "3710")
+ if (sSourceType == "3710")
{
sSourceType = "3720";
}
@@ -3031,6 +3397,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 +3638,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))
@@ -3355,7 +3723,7 @@
websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
websLsmain.HOWNERID = lsmain[0].HSTOCKORGID;
-
+
if (oWebs.set_SaveEntrustOutBill_New(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo))
{
@@ -3410,6 +3778,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 +3917,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 +4055,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 +4115,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 +4161,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;
}
@@ -3954,7 +4346,7 @@
//鏁伴噺涓庢簮鍗曟暟閲忎笉涓�鑷存椂锛屾洿鏂版潯鐮佸嚭鍏ュ簱涓存椂琛� HQty 瀛楁鍊�
if (item.HQty != item.HQtyMust)
{
- oCn.RunProc("Update KF_PonderationBillMain_Temp set HQty=" + item.HQty.ToString() + " where HInterID= " + websLsmain.HInterID.ToString() + " and HBillType='" + websLsmain.HBillType + "' and HSourceInterID= " + item.HSourceInterID.ToString() + " and HSourceEntryID= " + item.HSourceEntryID.ToString());
+ oCn.RunProc("Update KF_PonderationBillMain_Temp set HQty2=" + item.HQty.ToString() + " where HInterID= " + websLsmain.HInterID.ToString() + " and HBillType='" + websLsmain.HBillType + "' and HSourceInterID= " + item.HSourceInterID.ToString() + " and HSourceEntryID= " + item.HSourceEntryID.ToString());
}
}
@@ -4031,6 +4423,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 +4718,10 @@
{
websLsmain.HMainSourceBillType = "閫�鏂欓�氱煡鍗�";
}
+ else if (lsmain[0].HMainSourceBillType == "1201")
+ {
+ websLsmain.HMainSourceBillType = "閲囪喘鍏ュ簱鍗�";
+ }
else
{
websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆";
@@ -4406,6 +4803,10 @@
if (lsmain[0].HMainSourceBillType == "3720")
{
websLsmain.HMainSourceBillType = "鐢熶骇鐢ㄦ枡娓呭崟";
+ }
+ else if (lsmain[0].HMainSourceBillType == "1204")
+ {
+ websLsmain.HMainSourceBillType = "鐢熶骇棰嗘枡鍗�";
}
else
{
@@ -4952,7 +5353,7 @@
lsmain = oListModels.getObjectByJson_Kf_TrolleyPositionBillMain(msg2);
foreach (Model.ClsKf_TrolleyPositionBillMain oItem in lsmain)
- {
+ {
DBUtility.ClsPub.CurUserName = oItem.HMaker;
oItem.HBillType = "10004";
oItem.HBillSubType = "10004";
@@ -4994,7 +5395,7 @@
bool bResult;
if (OperationType == "1")
{
- bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+ bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
}
else
{
@@ -5263,7 +5664,7 @@
{
if (oSystemParameter.omodel.WMS_CloudMode.ToUpper() == "N") //绯荤粺鍙傛暟鏄惁涓虹鏈変簯妯″紡,N涓哄叕鏈変簯妯″紡锛孻涓虹鏈変簯妯″紡
{
- if(HSourceBillType == "1214")
+ if (HSourceBillType == "1214")
{
//閲嶆柊鍚屾鐢熶骇鍙戞枡閫氱煡鍗�
Kf_MateOutRequestBillController obill = new Kf_MateOutRequestBillController();
@@ -5840,7 +6241,7 @@
sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOrgID, HBillNo, HMaker);
SourceFlag = true;
}
- else if(oSystemParameter.omodel.WMS_CampanyName == "妫シ" && HSourceBillType == "1241")
+ else if (oSystemParameter.omodel.WMS_CampanyName == "妫シ" && HSourceBillType == "1241")
{
//鑷姩鍖呰绾垮悓姝ラ噾铦剁敓浜у叆搴撶敵璇峰崟
sJXCode = Kf_OtherInBill_SK(sBarCode, HCustom1);
@@ -5895,7 +6296,7 @@
objJsonResult.data = null;
return objJsonResult;
}
- }
+ }
#endregion
@@ -5975,7 +6376,7 @@
{
if (oSystemParameter.omodel.WMS_CampanyName == "瀹夌憺") //绯荤粺鍙傛暟 瀹㈡埛瀹氬埗鍖栧悕绉� 绌虹櫧涓洪�氱敤
{
- sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOutOrgID, HBillNo, HMaker);
+ sJXCode = POStockInBillController.JX_Json(sBarCode, HInterID, HBillType, HStockOutOrgID, HBillNo, HMaker);
SourceFlag = true;
}
else
@@ -6695,8 +7096,8 @@
objJsonResult.Message = "鏍¢獙妯″紡锛屾壂鎻忔潯鐮佸け璐ワ紒" + e.ToString();
objJsonResult.data = null;
return objJsonResult;
- }
}
+ }
else
{
objJsonResult.code = "0";
@@ -6881,7 +7282,7 @@
{
//鑾峰彇绯荤粺鍙傛暟
string sErrMsg = "";
- if (oSystemParameter.ShowBillByOrgID(HStockOrgID,ref sErrMsg) == true)
+ if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
{
string sSourceBarCodeCtl = "N"; //鏍¢獙-鏄惁杩涜婧愬崟瀵瑰簲鏉$爜鏍稿锛�'Y'涓烘牳瀵癸級
if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl.ToUpper() == "Y")
@@ -7524,15 +7925,64 @@
}
}
else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+
+ #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 = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
+ 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 +8002,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 +8023,8 @@
{
objJsonResult.code = "0";
objJsonResult.count = 1;
- objJsonResult.Message = "鎴愬姛";
- objJsonResult.data = WebSoBarModel;
+ objJsonResult.Message = "鎴愬姛锛�";
+ objJsonResult.data = ds.Tables[0];
return objJsonResult;
}
}
@@ -7596,6 +8053,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 +8195,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 +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";
@@ -8148,7 +8725,7 @@
string HIPAddress = ""; //IP
string HModCaption = "WMS-鎷嗙锛堟媶鎵橈級妯″潡"; //妯″潡鍚�
ds = oCn.RunProcReturn("exec h_p_Sc_PackUnionBill_Delete_New " + HInterID.ToString() + ",'" + HBillNo + "','" + HBarCode_Pack + "','" + HMaker + "','" + ComputerName + "','" + HIPAddress + "','" + HModCaption + "'", "h_p_Sc_PackUnionBill_Delete_New");
-
+
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "鎴愬姛";
@@ -8719,7 +9296,8 @@
try
{
ds = oCn.RunProcReturn("select * from Gy_BarCodeBill where HBarcode='" + HBarCode + "'", "Gy_BarCodeBill");
- if (ds.Tables[0].Rows.Count == 0) {
+ if (ds.Tables[0].Rows.Count == 0)
+ {
DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View();
string sErrMsg = "";
oSystemParameter.ShowBill(ref sErrMsg);
@@ -9514,7 +10092,7 @@
try
{
- ds = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_WorkShop " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode + "'," + HQty.ToString() + ",'" + HSourceBillType + "'," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HCarBarCode + "'," + HStockOrgID.ToString() + ",'" + HMaker + "'," + DBUtility.ClsPub.BoolToString(SourceFlag) + ",'" + sBatchNoCtl + "','" + sMustQtyCtl + "'", "h_p_WMS_AddBarCode_WorkShop");
+ ds = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_WorkShop_TestByLLJ " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode + "'," + HQty.ToString() + ",'" + HSourceBillType + "'," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HCarBarCode + "'," + HStockOrgID.ToString() + ",'" + HMaker + "'," + DBUtility.ClsPub.BoolToString(SourceFlag) + ",'" + sBatchNoCtl + "','" + sMustQtyCtl + "'", "h_p_WMS_AddBarCode_WorkShop");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -9550,14 +10128,14 @@
}
}
else
- {
- objJsonResult.code = "0";
- objJsonResult.count = 0;
- objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
- objJsonResult.data = null;
- return objJsonResult;
- }
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
+ objJsonResult.data = null;
+ return objJsonResult;
}
+ }
#endregion
@@ -9621,7 +10199,7 @@
public object MaterialLowerBill_MaterInv(long HInterID, string HBillNo, string HBillType, Int64 HStockOrgID)
{
try
- {
+ {
ds = oCn.RunProcReturn("exec h_p_Kf_MaterialInventory " + HInterID + "," + HBillType + "," + HStockOrgID, "h_p_Kf_MaterialInventory");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
@@ -9668,7 +10246,7 @@
{
try
{
- ds = oCn.RunProcReturn("select * from h_v_Gy_MouldIsUsed where 灏忚溅鏉$爜='" + HCarBarCode + "'" , "h_v_Gy_MouldIsUsed");
+ ds = oCn.RunProcReturn("select * from h_v_Gy_MouldIsUsed where 灏忚溅鏉$爜='" + HCarBarCode + "'", "h_v_Gy_MouldIsUsed");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -9762,12 +10340,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";
@@ -9967,14 +10545,14 @@
try
{
ds = oCn.RunProcReturn("exec h_p_MES_ProcessExchangeBillList_APP_HaiCheng " +
- "@HBillNo = N'" + HBillNo + "', " +
- "@HNumber = N'" + HNumber + "', " +
- "@HName = N'" + HName + "', " +
+ "@HBillNo = N'" + HBillNo + "', " +
+ "@HNumber = N'" + HNumber + "', " +
+ "@HName = N'" + HName + "', " +
"@HICMOBillNo = N'" + HICMOBillNo + "'," +
"@HProcID = N'" + HProcID + "', " +
"@HDeptID = N'" + HDeptID + "'"
, "h_p_MES_ProcessExchangeBillList_PDA_QiaoYi");
- if((bool)ds.Tables[1].Rows[0]["returntype"] == false)
+ if ((bool)ds.Tables[1].Rows[0]["returntype"] == false)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -9989,7 +10567,8 @@
objJsonResult.Message = "褰撳墠鎵�杈撳叆杩囨护鏉′欢锛屾病鏈夎繑鍥炰换浣曠粨鏋滐紒";
objJsonResult.data = null;
return objJsonResult;
- }else
+ }
+ else
{
List<object> columnNameList = new List<object>();
//娣诲姞鍒楀悕
@@ -10029,7 +10608,7 @@
{
try
{
- ds = oCn.RunProcReturn("exec h_p_MES_ProcessExchangeSubBillList_PDA_QiaoYi '" + HInterID+ "'", "h_p_MES_ProcessExchangeSubBillList_PDA_QiaoYi");
+ ds = oCn.RunProcReturn("exec h_p_MES_ProcessExchangeSubBillList_PDA_QiaoYi '" + HInterID + "'", "h_p_MES_ProcessExchangeSubBillList_PDA_QiaoYi");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -10151,7 +10730,7 @@
string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
}
- if (HDATA=="HSPE")
+ if (HDATA == "HSPE")
{
objJsonResult.code = "0";
objJsonResult.count = 1;
@@ -10160,7 +10739,7 @@
objJsonResult.list = columnNameList;
return objJsonResult;
}
- else if (HDATA == "HICM")
+ else if (HDATA == "HICM")
{
objJsonResult.code = "0";
objJsonResult.count = 1;
@@ -10169,7 +10748,7 @@
objJsonResult.list = columnNameList;
return objJsonResult;
}
- else
+ else
{
objJsonResult.code = "0";
objJsonResult.count = 1;
@@ -10666,13 +11245,13 @@
columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
}
-
+
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "Sucess锛�";
objJsonResult.data = ds.Tables[0];
objJsonResult.list = columnNameList;
- return objJsonResult;
+ return objJsonResult;
}
catch (Exception e)
{
@@ -10692,7 +11271,7 @@
/// <returns></returns>
[Route("WEBSController/UpdateKf_ICInvBal")]
[HttpGet]
- public object UpdateKf_ICInvBal( )
+ public object UpdateKf_ICInvBal()
{
try
{
@@ -10728,7 +11307,7 @@
try
{
ds = oCn.RunProcReturn("exec h_p_Kf_SellOutBarTraceReport '" + HBeginDate.ToShortDateString() + "','" + HEndDate.ToShortDateString() + "','" + HBarCode + "'," + HStockOrgID.ToString() + ",'" + HWhere + "'", "h_p_Kf_SellOutBarTraceReport");
-
+
List<object> columnNameList = new List<object>();
//娣诲姞鍒楀悕
foreach (DataColumn col in ds.Tables[0].Columns)
@@ -10906,7 +11485,7 @@
"and HMaker = '" + HMaker + "' " +
"and HOrgID = " + HStockOrgID;
DataSet ds = oCn.RunProcReturn(sql, "Gy_getCusBarCodeBillMain");
- if(ds!=null && ds.Tables[0].Rows.Count > 0)
+ if (ds != null && ds.Tables[0].Rows.Count > 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -10957,7 +11536,7 @@
/// <returns></returns>
[Route("WEBSController/Gy_getCusBarCodeBill_rushBarCode")]
[HttpGet]
- public object Gy_getCusBarCodeBill_rushBarCode(Int64 HInterID, string HBillNo, string HBillType, string HBarCode, string HMaker, Int64 HStockOrgID,string HBarCode_Pre)
+ public object Gy_getCusBarCodeBill_rushBarCode(Int64 HInterID, string HBillNo, string HBillType, string HBarCode, string HMaker, Int64 HStockOrgID, string HBarCode_Pre)
{
DataSet ds;
try
@@ -11144,7 +11723,7 @@
[HttpGet]
public object Gy_getCusBarCodeBill_submitRushedBarCodeList(Int64 HInterID, string HBillNo, string HBillType, string HMaker, Int64 HStockOrgID)
{
-
+
DataSet ds;
try
{
@@ -11323,7 +11902,7 @@
return objJsonResult;
}
//=============================================================================================================================================
-
+
//寮�鍚簨鍔�
oCn.BeginTran();
@@ -11673,7 +12252,7 @@
{
string sql = "exec h_p_Gy_BarCodeConfirmBill_rushBarCode " + HInterID + ",'" + HBillNo + "','" + HBillType + "','" + HMaker + "'," + HStockOrgID + ",'" + HBarCode + "'";
ds = oCn.RunProcReturn(sql, "h_p_Gy_BarCodeConfirmBill_rushBarCode");
- if(ds==null || ds.Tables[0].Rows.Count == 0)
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -12150,7 +12729,7 @@
#region 妫シ鍏朵粬鍏ュ簱鎵爜
- public string Kf_OtherInBill_SK(string sBarCode,string HCustom1)
+ public string Kf_OtherInBill_SK(string sBarCode, string HCustom1)
{
string HReturnResult;
SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
@@ -12203,7 +12782,8 @@
//鐢熶骇杩斾慨鐢宠
model.Add("FBillTypeID", new JObject() { ["FNumber"] = "SCRKSQ004" }); //鍗曟嵁绫诲瀷
}
- else {
+ else
+ {
//鏍囧噯鐢熶骇鍏ュ簱鐢宠鍗�
model.Add("FBillTypeID", new JObject() { ["FNumber"] = "SCRUSQD" }); //鍗曟嵁绫诲瀷
}
@@ -12373,7 +12953,7 @@
return "鍙戠敓寮傚父锛屽叆搴撶敵璇峰崟鍗曞彿:" + ",瀹℃牳澶辫触" + result2;
}
}
- }
+ }
}
}
@@ -12391,7 +12971,7 @@
//鑾峰彇鍏ュ簱鐢宠鍗曞崟鎹彿
string HBillNo = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["FBILLNO"]);
//鍖呰绾跨敓鎴愮殑鐢熶骇鍏ュ簱鐢宠鍗曞弬涓庤嚜鍔ㄥ鏍�
- if (HBillNo.Substring(0,2) == "RK" )
+ if (HBillNo.Substring(0, 2) == "RK")
{
//鑾峰彇鍏ュ簱鐢宠鍗曞崟鎹姸鎬�
string HBillStatus = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["FDOCUMENTSTATUS"]);
@@ -12458,7 +13038,7 @@
//鎵ц鏇存柊璇彞
oCn.RunProc(sql);
}
-
+
}
}
@@ -12472,5 +13052,215 @@
return HReturnResult;
}
#endregion
+
+
+ #region 缁戝畾灏忚溅浠撳簱浠撲綅
+ /// <summary>
+ /// 缁戝畾灏忚溅浠撳簱浠撲綅
+ /// </summary>
+ /// <returns></returns>
+ [Route("WEBSController/BindCarAndWH")]
+ [HttpGet]
+ public object BindCarAndWH( string HMaker, Int64 HWhID, Int64 HSPID, string HCarBarCode, Int64 HStockOrgID)
+ {
+ try
+ {
+ ds = oCn.RunProcReturn("exec h_p_bindingCarintoWh " + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HCarBarCode + "','" + HMaker+ "'," + HStockOrgID.ToString(), "h_p_bindingCarintoWh");
+ 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
+
+ //杞Щ妯″潡
+ [Route("WEBSController/CheckHW")]
+ [HttpGet]
+ public object CheckHW(int HWhID,int HSPID,int HWhID2,int HSPID2,string HBarCode,string HCarBarCode1,string HCarBarCode2,string UserID)
+ {
+ try
+ {
+ if (HCarBarCode1 == null) HCarBarCode1 = "";
+ if (HCarBarCode2 == null) HCarBarCode2 = "";
+ string sql = $"exec Transfer_Operation {HWhID},{HSPID},{HWhID2},{HSPID2},'{HBarCode}','{HCarBarCode1}','{HCarBarCode2}','{UserID}'";
+ ds = oCn.RunProcReturn(sql, "Transfer_Operation");
+ 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;
+ }
+ }
+
+ #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