From 8df8b9a5784d23c65155a025436a55d235cb562c Mon Sep 17 00:00:00 2001
From: yxj <1qaz@123>
Date: 星期一, 10 五月 2021 09:51:23 +0800
Subject: [PATCH] 一键扫码方法中托盘条码处理修改,按智见、斯莫尔公司来;新增方法:扫码后根据组织、模块类型,判断子表是否刷新
---
CLOUDWEB/WebService1.asmx.cs | 237 +++++++++++++++++++++++++++++++++++++---------------------
1 files changed, 151 insertions(+), 86 deletions(-)
diff --git a/CLOUDWEB/WebService1.asmx.cs b/CLOUDWEB/WebService1.asmx.cs
index 7feff14..b443c6a 100644
--- a/CLOUDWEB/WebService1.asmx.cs
+++ b/CLOUDWEB/WebService1.asmx.cs
@@ -26989,6 +26989,27 @@
}
}
+ //鏍规嵁缁勭粐鍒ゆ柇鎵爜鍚庯紝妯″潡瀛愯〃鏄惁鑷姩鍒锋柊锛圷涓鸿嚜鍔ㄥ埛鏂帮級
+ [WebMethod]
+ public bool get_SubDisplayByOwner(string sBillType, Int64 HOWNERID)
+ {
+ DataSet DS;
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+ DS = oCN.RunProcReturn("exec h_p_WMS_DisBillEntryList_HOWNERID '" + sBillType + "'," + HOWNERID.ToString(), "h_p_WMS_DisBillEntryList_HOWNERID");
+ if (DS == null || DS.Tables[0].Rows.Count == 0)
+ {
+ return true;
+ }
+ else if (DBUtility.ClsPub.isStrNull(DS.Tables[0].Rows[0]["HDisplay"]) == "N")
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+
#endregion
@@ -29725,91 +29746,7 @@
//鍒ゆ柇鏄惁鍚敤涓�閿壂鐮佹ā寮忥紝Y涓哄惎鐢紝鏈惎鐢ㄦ椂鍙壂鎻忕墿鏂欐潯鐮�
if (oSystemParameter.omodel.WMS_OneKeyMode.ToUpper() == "N")
{
- DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View();
- if (dal.GetInfoByNumber_View(sBarCode))
- {
- //濡傛灉鏄墭鐩樻潯鐮佸垎瑙e苟妯℃嫙鎵爜
- if (dal.omodel_View.HBarCodeType == "鎵樼洏鏉$爜")
- {
- //鍒嗚В鎵樻潯鐮佸緱鍒版槑缁嗘潯鐮佷俊鎭啓鍏ュ嚭鍏ュ簱鏉$爜涓存椂琛�
- DataSet dsTBarCode;
- string sBarCode_MX;
- dsTBarCode = oCn.RunProcReturn("select HBarCode HBarCodeMX from Sc_PackUnionBillSub_Sum " +
- " Where HBarCode_Pack = '" + sBarCode + "'", "Sc_PackUnionBillSub_Sum");
- if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0)
- {
- sErrMsg = "娌℃湁鎵惧埌鎵樼洏鏉$爜瀵瑰簲瀛愭潯鐮佽褰曪紒";
- return null;
- }
- else
- {
- for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++)
- {
- sBarCode_MX = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCodeMX"]);
- if (set_SavePonderationBillMain_Temp_BarCode(sBarCode_MX, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, ref sHSourceBillNo, ref sHSourceBillType, ref sHSupID, ref sHSupName, ref sHDeptID, ref sHDeptName, ref sErrMsg))
- {
- oBar.HSourceBillType = sHSourceBillType;
- oBar.HSourceBillNo = sHSourceBillNo;
- oBar.HSupID = sHSupID;
- oBar.HSupName = sHSupName;
- oBar.HDeptID = sHDeptID;
- oBar.HDeptName = sHDeptName;
- SourceFlag = true;
- }
- else
- {
- sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HBillID + "锛涙壂鎻忓け璐ワ紒" + sBarCode_MX + sErrMsg;
- //sErrMsg = "鎵弿澶辫触锛�" + sErrMsg;
- return null;
- }
- }
- return oBar;
- }
- }
- else
- {
- //灏嗙墿鏂欐潯鐮佷俊鎭啓鍏ュ嚭鍏ュ簱鏉$爜涓存椂琛�
- if (set_SavePonderationBillMain_Temp_BarCode(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, ref sHSourceBillNo, ref sHSourceBillType, ref sHSupID, ref sHSupName, ref sHDeptID, ref sHDeptName, ref sErrMsg))
- {
- oBar.HSourceBillType = sHSourceBillType;
- oBar.HSourceBillNo = sHSourceBillNo;
- oBar.HSupID = sHSupID;
- oBar.HSupName = sHSupName;
- oBar.HDeptID = sHDeptID;
- oBar.HDeptName = sHDeptName;
- }
- else
- {
- sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HBillID + "锛涙壂鎻忓け璐ワ紒" + sErrMsg;
- return null;
- }
- return oBar;
- }
- }
- else
- {
- sErrMsg = "娌℃湁鎵惧埌璇ユ潯鐮侊紒";
- return null;
- }
- }
- //涓�閿壂鐮佹ā寮忥紝鏍规嵁鏉$爜鍓嶇紑璧� 涓嶅悓鏂规硶锛堜粨搴撱�佷粨浣嶃�侀儴闂級锛堟簮鍗曘�佺墿鏂欐潯鐮侊級
- else
- {
- string sRedBlue = "钃濆瓧";
- if (HRedBlueFlag)
- {
- sRedBlue = "绾㈠瓧";
- }
- else
- {
- sRedBlue = "钃濆瓧";
- }
- DataSet Dss;
- //鏍规嵁閫掑叆鐨勬潯鐮佸墠涓変綅锛屽垽鏂潯鐮佺被鍨嬶紙浠撳簱銆佷粨浣嶃�侀儴闂ㄣ�佹簮鍗曘�佺墿鏂欐潯鐮侊級
- Dss = oCn.RunProcReturn(" select HSourceName,BarCodeType from Xt_BarCodeType where HSourceNumber= '" + sBarCode.Substring(0, 3) + "'", "Xt_BarCodeType");
-
- //鏃犺繑鍥炴暟鎹垯涓虹墿鏂欐潯鐮�
- if (Dss == null || Dss.Tables[0].Rows.Count == 0)
+ if (oSystemParameter.omodel.WMS_CampanyName == "鏉窞鏅鸿" || oSystemParameter.omodel.WMS_CampanyName == "鏉窞鏂帿灏�") //绯荤粺鍙傛暟 瀹㈡埛瀹氬埗鍖栧悕绉� 绌虹櫧涓洪�氱敤
{
DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View();
if (dal.GetInfoByNumber_View(sBarCode))
@@ -29839,7 +29776,7 @@
oBar.HSupID = sHSupID;
oBar.HSupName = sHSupName;
oBar.HDeptID = sHDeptID;
- oBar.HDeptName = sHDeptName;
+ oBar.HDeptName = sHDeptName;
SourceFlag = true;
}
else
@@ -29880,6 +29817,134 @@
}
else
{
+ //灏嗙墿鏂欐潯鐮佷俊鎭啓鍏ュ嚭鍏ュ簱鏉$爜涓存椂琛�
+ if (set_SavePonderationBillMain_Temp_BarCode(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, ref sHSourceBillNo, ref sHSourceBillType, ref sHSupID, ref sHSupName, ref sHDeptID, ref sHDeptName, ref sErrMsg))
+ {
+ oBar.HSourceBillType = sHSourceBillType;
+ oBar.HSourceBillNo = sHSourceBillNo;
+ oBar.HSupID = sHSupID;
+ oBar.HSupName = sHSupName;
+ oBar.HDeptID = sHDeptID;
+ oBar.HDeptName = sHDeptName;
+ }
+ else
+ {
+ sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HBillID + "锛涙壂鎻忓け璐ワ紒" + sErrMsg;
+ return null;
+ }
+ return oBar;
+ }
+ }
+ //涓�閿壂鐮佹ā寮忥紝鏍规嵁鏉$爜鍓嶇紑璧� 涓嶅悓鏂规硶锛堜粨搴撱�佷粨浣嶃�侀儴闂級锛堟簮鍗曘�佺墿鏂欐潯鐮侊級
+ else
+ {
+ string sRedBlue = "钃濆瓧";
+ if (HRedBlueFlag)
+ {
+ sRedBlue = "绾㈠瓧";
+ }
+ else
+ {
+ sRedBlue = "钃濆瓧";
+ }
+ DataSet Dss;
+ //鏍规嵁閫掑叆鐨勬潯鐮佸墠涓変綅锛屽垽鏂潯鐮佺被鍨嬶紙浠撳簱銆佷粨浣嶃�侀儴闂ㄣ�佹簮鍗曘�佺墿鏂欐潯鐮侊級
+ Dss = oCn.RunProcReturn(" select HSourceName,BarCodeType from Xt_BarCodeType where HSourceNumber= '" + sBarCode.Substring(0, 3) + "'", "Xt_BarCodeType");
+
+ //鏃犺繑鍥炴暟鎹垯涓虹墿鏂欐潯鐮�
+ if (Dss == null || Dss.Tables[0].Rows.Count == 0)
+ {
+ if (oSystemParameter.omodel.WMS_CampanyName == "鏉窞鏅鸿" || oSystemParameter.omodel.WMS_CampanyName == "鏉窞鏂帿灏�") //绯荤粺鍙傛暟 瀹㈡埛瀹氬埗鍖栧悕绉� 绌虹櫧涓洪�氱敤
+ {
+ DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View();
+ if (dal.GetInfoByNumber_View(sBarCode))
+ {
+ //濡傛灉鏄墭鐩樻潯鐮佸垎瑙e苟妯℃嫙鎵爜
+ if (dal.omodel_View.HBarCodeType == "鎵樼洏鏉$爜")
+ {
+ //鍒嗚В鎵樻潯鐮佸緱鍒版槑缁嗘潯鐮佷俊鎭啓鍏ュ嚭鍏ュ簱鏉$爜涓存椂琛�
+ DataSet dsTBarCode;
+ string sBarCode_MX;
+ dsTBarCode = oCn.RunProcReturn("select HBarCode HBarCodeMX from Sc_PackUnionBillSub_Sum " +
+ " Where HBarCode_Pack = '" + sBarCode + "'", "Sc_PackUnionBillSub_Sum");
+ if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0)
+ {
+ sErrMsg = "娌℃湁鎵惧埌鎵樼洏鏉$爜瀵瑰簲瀛愭潯鐮佽褰曪紒";
+ return null;
+ }
+ else
+ {
+ for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++)
+ {
+ sBarCode_MX = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCodeMX"]);
+ if (set_SavePonderationBillMain_Temp_BarCode(sBarCode_MX, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, ref sHSourceBillNo, ref sHSourceBillType, ref sHSupID, ref sHSupName, ref sHDeptID, ref sHDeptName, ref sErrMsg))
+ {
+ oBar.HSourceBillType = sHSourceBillType;
+ oBar.HSourceBillNo = sHSourceBillNo;
+ oBar.HSupID = sHSupID;
+ oBar.HSupName = sHSupName;
+ oBar.HDeptID = sHDeptID;
+ oBar.HDeptName = sHDeptName;
+ SourceFlag = true;
+ }
+ else
+ {
+ sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HBillID + "锛涙壂鎻忓け璐ワ紒" + sBarCode_MX + sErrMsg;
+ //sErrMsg = "鎵弿澶辫触锛�" + sErrMsg;
+ return null;
+ }
+ }
+ return oBar;
+ }
+ }
+ else
+ {
+ //灏嗙墿鏂欐潯鐮佷俊鎭啓鍏ュ嚭鍏ュ簱鏉$爜涓存椂琛�
+ if (set_SavePonderationBillMain_Temp_BarCode(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, ref sHSourceBillNo, ref sHSourceBillType, ref sHSupID, ref sHSupName, ref sHDeptID, ref sHDeptName, ref sErrMsg))
+ {
+ oBar.HSourceBillType = sHSourceBillType;
+ oBar.HSourceBillNo = sHSourceBillNo;
+ oBar.HSupID = sHSupID;
+ oBar.HSupName = sHSupName;
+ oBar.HDeptID = sHDeptID;
+ oBar.HDeptName = sHDeptName;
+ }
+ else
+ {
+ sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HBillID + "锛涙壂鎻忓け璐ワ紒" + sErrMsg;
+ return null;
+ }
+ return oBar;
+ }
+ }
+ else
+ {
+ sErrMsg = "娌℃湁鎵惧埌璇ユ潯鐮侊紒";
+ return null;
+ }
+ }
+ else
+ {
+ //灏嗙墿鏂欐潯鐮佷俊鎭啓鍏ュ嚭鍏ュ簱鏉$爜涓存椂琛�
+ if (set_SavePonderationBillMain_Temp_BarCode(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, ref sHSourceBillNo, ref sHSourceBillType, ref sHSupID, ref sHSupName, ref sHDeptID, ref sHDeptName, ref sErrMsg))
+ {
+ oBar.HSourceBillType = sHSourceBillType;
+ oBar.HSourceBillNo = sHSourceBillNo;
+ oBar.HSupID = sHSupID;
+ oBar.HSupName = sHSupName;
+ oBar.HDeptID = sHDeptID;
+ oBar.HDeptName = sHDeptName;
+ }
+ else
+ {
+ sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HBillID + "锛涙壂鎻忓け璐ワ紒" + sErrMsg;
+ return null;
+ }
+ return oBar;
+ }
+ }
+ else
+ {
string sBarBillName = Pub_Class.ClsPub.isStrNull(Dss.Tables[0].Rows[0]["HSourceName"]);
string sBarBillType = Pub_Class.ClsPub.isStrNull(Dss.Tables[0].Rows[0]["BarCodeType"]);
--
Gitblit v1.9.1