From 2fdbc696daa2a433c51eb34304cc82df8642c121 Mon Sep 17 00:00:00 2001
From: yxj <1qaz@123>
Date: 星期五, 07 五月 2021 15:41:53 +0800
Subject: [PATCH] 一键扫码方法、一键扫码多源单模式方法中新增托盘条码判断、扫码处理
---
CLOUDWEB/WebService1.asmx.cs | 250 +++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 218 insertions(+), 32 deletions(-)
diff --git a/CLOUDWEB/WebService1.asmx.cs b/CLOUDWEB/WebService1.asmx.cs
index dcaa939..7feff14 100644
--- a/CLOUDWEB/WebService1.asmx.cs
+++ b/CLOUDWEB/WebService1.asmx.cs
@@ -28741,15 +28741,59 @@
//鍒ゆ柇鏄惁鍚敤涓�閿壂鐮佹ā寮忥紝Y涓哄惎鐢紝鏈惎鐢ㄦ椂鍙壂鎻忕墿鏂欐潯鐮�
if (oSystemParameterMain.WMS_OneKeyMode.ToUpper() == "N")
{
- oBar = get_SavePonderationBillMain_Temp_MulSource(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, oSystemParameterMain, ref sErrMsg);
- if (oBar == null)
+ DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View();
+ if (dal.GetInfoByNumber_View(sBarCode))
{
- sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HBillID + "锛涙壂鎻忓け璐ワ紒" + sErrMsg;
- return null;
+ //濡傛灉鏄墭鐩樻潯鐮佸垎瑙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"]);
+ oBar = get_SavePonderationBillMain_Temp_MulSource(sBarCode_MX, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, oSystemParameterMain, ref sErrMsg);
+ if (oBar == null)
+ {
+ sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HBillID + "锛涙壂鎻忓け璐ワ紒" + sBarCode_MX + sErrMsg;
+ return null;
+ }
+ else
+ {
+ return oBar;
+ }
+ }
+ return oBar;
+ }
+ }
+ else
+ {
+ oBar = get_SavePonderationBillMain_Temp_MulSource(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, oSystemParameterMain, ref sErrMsg);
+ if (oBar == null)
+ {
+ sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HBillID + "锛涙壂鎻忓け璐ワ紒" + sErrMsg;
+ return null;
+ }
+ else
+ {
+ return oBar;
+ }
+ }
}
else
{
- return oBar;
+ sErrMsg = "娌℃湁鎵惧埌璇ユ潯鐮侊紒";
+ return null;
}
}
//涓�閿壂鐮佹ā寮忥紝鏍规嵁鏉$爜鍓嶇紑璧� 涓嶅悓鏂规硶锛堜粨搴撱�佷粨浣嶃�侀儴闂級锛堟簮鍗曘�佺墿鏂欐潯鐮侊級
@@ -28762,16 +28806,59 @@
//鏃犺繑鍥炴暟鎹垯涓虹墿鏂欐潯鐮�
if (Dss == null || Dss.Tables[0].Rows.Count == 0)
{
- //灏嗙墿鏂欐潯鐮佷俊鎭啓鍏ュ嚭鍏ュ簱鏉$爜涓存椂琛�
- oBar = get_SavePonderationBillMain_Temp_MulSource(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, oSystemParameterMain, ref sErrMsg);
- if (oBar == null)
+ DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View();
+ if (dal.GetInfoByNumber_View(sBarCode))
{
- sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HBillID + "锛涙壂鎻忓け璐ワ紒" + sErrMsg;
- return null;
+ //濡傛灉鏄墭鐩樻潯鐮佸垎瑙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"]);
+ oBar = get_SavePonderationBillMain_Temp_MulSource(sBarCode_MX, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, oSystemParameterMain, ref sErrMsg);
+ if (oBar == null)
+ {
+ sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HBillID + "锛涙壂鎻忓け璐ワ紒" + sBarCode_MX + sErrMsg;
+ return null;
+ }
+ else
+ {
+ return oBar;
+ }
+ }
+ return oBar;
+ }
+ }
+ else
+ {
+ oBar = get_SavePonderationBillMain_Temp_MulSource(sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HRedBlueFlag, SourceFlag, HSourceBillNo, HSourceBillType, HOWNERID, HExpressNumber, oSystemParameterMain, ref sErrMsg);
+ if (oBar == null)
+ {
+ sErrMsg = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HBillID + "锛涙壂鎻忓け璐ワ紒" + sErrMsg;
+ return null;
+ }
+ else
+ {
+ return oBar;
+ }
+ }
}
else
{
- return oBar;
+ sErrMsg = "娌℃湁鎵惧埌璇ユ潯鐮侊紒";
+ return null;
}
}
else
@@ -29638,22 +29725,72 @@
//鍒ゆ柇鏄惁鍚敤涓�閿壂鐮佹ā寮忥紝Y涓哄惎鐢紝鏈惎鐢ㄦ椂鍙壂鎻忕墿鏂欐潯鐮�
if (oSystemParameter.omodel.WMS_OneKeyMode.ToUpper() == "N")
{
- //灏嗙墿鏂欐潯鐮佷俊鎭啓鍏ュ嚭鍏ュ簱鏉$爜涓存椂琛�
- 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))
+ DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View();
+ if (dal.GetInfoByNumber_View(sBarCode))
{
- oBar.HSourceBillType = sHSourceBillType;
- oBar.HSourceBillNo = sHSourceBillNo;
- oBar.HSupID = sHSupID;
- oBar.HSupName = sHSupName;
- oBar.HDeptID = sHDeptID;
- oBar.HDeptName = sHDeptName;
+ //濡傛灉鏄墭鐩樻潯鐮佸垎瑙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 = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HBillID + "锛涙壂鎻忓け璐ワ紒" + sErrMsg;
+ sErrMsg = "娌℃湁鎵惧埌璇ユ潯鐮侊紒";
return null;
}
- return oBar;
}
//涓�閿壂鐮佹ā寮忥紝鏍规嵁鏉$爜鍓嶇紑璧� 涓嶅悓鏂规硶锛堜粨搴撱�佷粨浣嶃�侀儴闂級锛堟簮鍗曘�佺墿鏂欐潯鐮侊級
else
@@ -29674,23 +29811,72 @@
//鏃犺繑鍥炴暟鎹垯涓虹墿鏂欐潯鐮�
if (Dss == null || Dss.Tables[0].Rows.Count == 0)
{
- //灏嗙墿鏂欐潯鐮佷俊鎭啓鍏ュ嚭鍏ュ簱鏉$爜涓存椂琛�
- 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))
+ DAL.ClsGy_BarCodeBill_View dal = new DAL.ClsGy_BarCodeBill_View();
+ if (dal.GetInfoByNumber_View(sBarCode))
{
- oBar.HSourceBillType = sHSourceBillType;
- oBar.HSourceBillNo = sHSourceBillNo;
- oBar.HSupID = sHSupID;
- oBar.HSupName = sHSupName;
- oBar.HDeptID = sHDeptID;
- oBar.HDeptName = sHDeptName;
+ //濡傛灉鏄墭鐩樻潯鐮佸垎瑙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 = "鍗曟嵁鍙凤細" + HBillNo + "锛屽崟鎹甀D锛�" + HBillID + "锛涙壂鎻忓け璐ワ紒" + sErrMsg;
- //sErrMsg = "鎵弿澶辫触锛�" + sErrMsg;
+ sErrMsg = "娌℃湁鎵惧埌璇ユ潯鐮侊紒";
return null;
}
- return oBar;
}
else
{
--
Gitblit v1.9.1