From 2c3c5f1d4532cd03f301d5ff6460023dc28f6765 Mon Sep 17 00:00:00 2001
From: yxj <1qaz@123>
Date: 星期四, 30 十二月 2021 22:59:02 +0800
Subject: [PATCH] 扫描物料条码判断是否在源单中修改
---
DLL/DAL.dll | 0
CLOUDWEB/WebService1.asmx.cs | 214 +++++++++++++++++++++++++++++------------------------
2 files changed, 118 insertions(+), 96 deletions(-)
diff --git a/CLOUDWEB/WebService1.asmx.cs b/CLOUDWEB/WebService1.asmx.cs
index b7a4308..e27b199 100644
--- a/CLOUDWEB/WebService1.asmx.cs
+++ b/CLOUDWEB/WebService1.asmx.cs
@@ -2630,8 +2630,78 @@
}
}
}
-
//淇濆瓨鍒板嚭鍏ュ簱鏉$爜涓存椂琛�(涓�寮犲崟鎹�,瀛樺湪鐩稿悓鐗╂枡)
+ [WebMethod]
+ public bool set_SavePonderationBillMain_Temp_Select_Qty(Model.ClsKF_PonderationBillMain_Temp oMain, Double sQty, ref string sErrMsg)
+ {
+ DAL.ClsKF_PonderationBillMain_Temp_Ctl dal = new DAL.ClsKF_PonderationBillMain_Temp_Ctl();
+ DAL.ClsGy_BarCodeBill_View oBar = new DAL.ClsGy_BarCodeBill_View();
+ dal.oModel = oMain;
+ if (!oBar.GetInfoByNumber_View(oMain.HBarCode))
+ {
+ sErrMsg = "鏃犳晥鏉$爜";
+ return false;
+ }
+ else
+ {
+ if (oBar.omodel_View.HBarCodeType == "鎵樼洏鏉$爜")
+ {
+ if (!dal.IsBarCode_Pack(oMain.HBarCode, oMain.HInterID, oMain.HBillType))
+ {
+ sErrMsg = "瀛樺湪鐩稿悓鏉$爜锛岃鍕块噸澶嶆壂鎻忥紒";
+ return false;
+ }
+ if (dal.AddNew_More_Select(ref sErrMsg))
+ {
+ //sErrMsg = "淇濆瓨鎴愬姛锛�";
+ return true;
+ }
+ else
+ {
+ //sErrMsg = "淇濆瓨澶辫触锛�";
+ return false;
+ }
+ }
+ else
+ {
+ if (oBar.omodel_View.HBarCodeType == "鍞竴鏉$爜")
+ {
+ if (!dal.IsBarCode(oMain.HBarCode, oMain.HInterID, oMain.HErpClsID, oMain.HBillType))
+ {
+ sErrMsg = "瀛樺湪鐩稿悓鏉$爜锛岃鍕块噸澶嶆壂鎻忥紒";
+ return false;
+ }
+ //涓�娆℃壂鐮佹帶鍒讹紝鍚屼竴鏉$爜銆佸悓涓�鍗曟嵁绫诲瀷锛屽湪WMS琛ㄥ拰TEMP琛ㄩ噷锛屽彧鍏佽杩涜涓�娆℃壂鐮�
+ SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+ DataSet ds = oCn.RunProcReturn("exec h_p_WMS_CheckBarCodeOneScan " + oMain.HInterID.ToString() + ",'" + oMain.HBarCode + "','" + oMain.HBillType + "'," + oMain.HWhID.ToString() + "," + oMain.HStockPlaceID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HOutStockPlaceID.ToString() + ",'" + oMain.HMaker + "'", "h_p_WMS_CheckBarCodeOneScan");
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ }
+ else
+ {
+ if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 1)
+ {
+ sErrMsg = "瀵逛笉璧凤紝鎮ㄦ壂鎻忕殑鏉″舰鐮佸凡琚壂鎻忚繃锛屼笉绗﹀悎涓�娆℃壂鐮佺郴缁熷弬鏁扮殑瑕佹眰锛�";
+ return false;
+ }
+ }
+ }
+ if (dal.AddNew_Source(sQty, ref sErrMsg))
+ {
+ //sErrMsg = "淇濆瓨鎴愬姛锛�";
+ return true;
+ }
+ else
+ {
+ //sErrMsg = "淇濆瓨澶辫触锛�";
+ return false;
+ }
+ }
+ }
+ }
+
+
+ //淇濆瓨鍒板嚭鍏ュ簱鏉$爜涓存椂琛�(涓�寮犲崟鎹�,瀛樺湪鐩稿悓鐗╂枡) 妯″叿
[WebMethod]
public bool set_SavePonderationBillMain_Temp_Select_Qty_Mould(Model.ClsSc_MouldStockBillMain_Temp oMain, Double sQty, ref string sErrMsg)
{
@@ -31568,42 +31638,64 @@
}
else //闈炲鍘熷崟
{
- //鑾峰彇TMP涓殑鍘熷崟涓诲唴鐮佸拰瀛愬唴鐮� //鍒ゆ柇璇ユ潯鐮佹槸鍚﹀湪鍘熷崟鍒楄〃涓環_p_WMS_GetBarCodeSourceInterID
- DataSet ds2 = oCn.RunProcReturn("exec h_p_WMS_GetBarCodeSourceInterID " + HBillID.ToString() + ",'" + sBarCode + "' ", "h_p_WMS_GetBarCodeSourceInterID");
+ //鏈夋簮鍗曪紝鍒ゆ柇鏉$爜瀵瑰簲鐗╂枡鏄惁瀛樺湪浜庢婧愬崟涓紝瀛樺湪鐩稿悓鐗╂枡鏃惰嚜鍔ㄨ幏鍙栦竴琛屾簮鍗曚俊鎭�
+ DataSet ds2 = oCn.RunProcReturn("exec h_p_WMS_GetBarCodeSourceInterID_New " + HBillID.ToString() + ",'" + HBillType + "','" + HSourceBillType + "','" + sBarCode + "'", "h_p_WMS_GetBarCodeSourceInterID_New");
if (ds2 == null || ds2.Tables[0].Rows.Count == 0)
{
- sErrMsg = "鎵弿鐗╂枡鏉$爜鍚庢湁婧愬崟鑷姩鑾峰彇涓�琛屾簮鍗曚俊鎭紝鏈煡閿欒锛�";
+ sErrMsg = "鎵弿鐗╂枡鏉$爜鍚庢湁婧愬崟鑷姩鑾峰彇涓�琛屾簮鍗曚俊鎭紒";
return false;
}
else
{
- if (HSourceBillNo != "" && SourceFlag == true)
+ if (DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0][0]) == 0)
{
- if (HBillType == "1202" && oSystemParameter.omodel.WMS_CampanyName != "鍗氭棩绉戞妧") //鐢熶骇鍏ュ簱鏃� 鏉$爜涓诲唴鐮併�佸瓙鍐呯爜鍜屾簮鍗曚富鍐呯爜銆佸瓙鍐呯爜蹇呴』涓�鑷�
- {
- if (dal.omodel_View.HSourceInterID != DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HSourceInterID"])
- && dal.omodel_View.HSourceEntryID != DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HSourceEntryID"])
- )
- {
- sErrMsg = "璇ユ潯鐮佺殑婧愬崟涓庢壂鎻忕殑婧愬崟涓嶄竴鑷达紝璇风‘璁ゆ棤璇悗閲嶆柊鎵弿锛�";
- return false;
- }
- }
+ dal.omodel_View.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HSourceBillNo"]);
+ dal.omodel_View.HSourceEntryID = DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HSourceEntryID"]);
+ dal.omodel_View.HSourceInterID = DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HSourceInterID"]);
+ dal.omodel_View.HinitQty = DBUtility.ClsPub.isDoule(ds2.Tables[0].Rows[0]["HQtyMust"]); //婧愬崟鏁伴噺
}
- dal.omodel_View.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HSourceBillNo"]);
- dal.omodel_View.HSourceEntryID = DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HSourceEntryID"]);
- dal.omodel_View.HSourceInterID = DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HSourceInterID"]);
- dal.omodel_View.HinitQty = DBUtility.ClsPub.isDoule(ds2.Tables[0].Rows[0]["HQtyMust"]);//鍘熷崟鏁伴噺
- //鎵�鎵弿鐗╂枡鏉$爜鐨勭墿鏂欎笉灞炰簬璇ユ簮鍗曚笅
- if (DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0][0]) != 0)
+ else
{
- if (HSourceBillNo != "" && SourceFlag == true)
- {
- sErrMsg = "璇ョ墿鏂欏苟涓嶅瓨鍦ㄤ簬姝ゆ槑缁嗕俊鎭腑锛岃纭鐗╂枡鏃犺鍚庨噸鏂版壂鎻忥紒";
- return false;
- }
+ sErrMsg = DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HRemark"]);
+ return false;
}
}
+ ////鑾峰彇TMP涓殑鍘熷崟涓诲唴鐮佸拰瀛愬唴鐮� //鍒ゆ柇璇ユ潯鐮佹槸鍚﹀湪鍘熷崟鍒楄〃涓環_p_WMS_GetBarCodeSourceInterID
+ //DataSet ds2 = oCn.RunProcReturn("exec h_p_WMS_GetBarCodeSourceInterID " + HBillID.ToString() + ",'" + sBarCode + "' ", "h_p_WMS_GetBarCodeSourceInterID");
+ //if (ds2 == null || ds2.Tables[0].Rows.Count == 0)
+ //{
+ // sErrMsg = "鎵弿鐗╂枡鏉$爜鍚庢湁婧愬崟鑷姩鑾峰彇涓�琛屾簮鍗曚俊鎭紝鏈煡閿欒锛�";
+ // return false;
+ //}
+ //else
+ //{
+ // //if (HSourceBillNo != "" && SourceFlag == true)
+ // //{
+ // // if (HBillType == "1202" && oSystemParameter.omodel.WMS_CampanyName != "鍗氭棩绉戞妧") //鐢熶骇鍏ュ簱鏃� 鏉$爜涓诲唴鐮併�佸瓙鍐呯爜鍜屾簮鍗曚富鍐呯爜銆佸瓙鍐呯爜蹇呴』涓�鑷�
+ // // {
+ // // if (dal.omodel_View.HSourceInterID != DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HSourceInterID"])
+ // // && dal.omodel_View.HSourceEntryID != DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HSourceEntryID"])
+ // // )
+ // // {
+ // // sErrMsg = "璇ユ潯鐮佺殑婧愬崟涓庢壂鎻忕殑婧愬崟涓嶄竴鑷达紝璇风‘璁ゆ棤璇悗閲嶆柊鎵弿锛�";
+ // // return false;
+ // // }
+ // // }
+ // //}
+ // dal.omodel_View.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HSourceBillNo"]);
+ // dal.omodel_View.HSourceEntryID = DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HSourceEntryID"]);
+ // dal.omodel_View.HSourceInterID = DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HSourceInterID"]);
+ // dal.omodel_View.HinitQty = DBUtility.ClsPub.isDoule(ds2.Tables[0].Rows[0]["HQtyMust"]);//鍘熷崟鏁伴噺
+ // //鎵�鎵弿鐗╂枡鏉$爜鐨勭墿鏂欎笉灞炰簬璇ユ簮鍗曚笅
+ // if (DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0][0]) != 0)
+ // {
+ // if (HSourceBillNo != "" && SourceFlag == true)
+ // {
+ // sErrMsg = "璇ョ墿鏂欏苟涓嶅瓨鍦ㄤ簬姝ゆ槑缁嗕俊鎭腑锛岃纭鐗╂枡鏃犺鍚庨噸鏂版壂鎻忥紒";
+ // return false;
+ // }
+ // }
+ //}
}
}
else
@@ -34319,76 +34411,6 @@
-
- //淇濆瓨鍒板嚭鍏ュ簱鏉$爜涓存椂琛�(涓�寮犲崟鎹�,瀛樺湪鐩稿悓鐗╂枡)
- [WebMethod]
- public bool set_SavePonderationBillMain_Temp_Select_Qty(Model.ClsKF_PonderationBillMain_Temp oMain, Double sQty, ref string sErrMsg)
- {
- DAL.ClsKF_PonderationBillMain_Temp_Ctl dal = new DAL.ClsKF_PonderationBillMain_Temp_Ctl();
- DAL.ClsGy_BarCodeBill_View oBar = new DAL.ClsGy_BarCodeBill_View();
- dal.oModel = oMain;
- if (!oBar.GetInfoByNumber_View(oMain.HBarCode))
- {
- sErrMsg = "鏃犳晥鏉$爜";
- return false;
- }
- else
- {
- if (oBar.omodel_View.HBarCodeType == "鎵樼洏鏉$爜")
- {
- if (!dal.IsBarCode_Pack(oMain.HBarCode, oMain.HInterID, oMain.HBillType))
- {
- sErrMsg = "瀛樺湪鐩稿悓鏉$爜锛岃鍕块噸澶嶆壂鎻忥紒";
- return false;
- }
- if (dal.AddNew_More_Select(ref sErrMsg))
- {
- //sErrMsg = "淇濆瓨鎴愬姛锛�";
- return true;
- }
- else
- {
- //sErrMsg = "淇濆瓨澶辫触锛�";
- return false;
- }
- }
- else
- {
- if (oBar.omodel_View.HBarCodeType == "鍞竴鏉$爜")
- {
- if (!dal.IsBarCode(oMain.HBarCode, oMain.HInterID, oMain.HErpClsID, oMain.HBillType))
- {
- sErrMsg = "瀛樺湪鐩稿悓鏉$爜锛岃鍕块噸澶嶆壂鎻忥紒";
- return false;
- }
- //涓�娆℃壂鐮佹帶鍒讹紝鍚屼竴鏉$爜銆佸悓涓�鍗曟嵁绫诲瀷锛屽湪WMS琛ㄥ拰TEMP琛ㄩ噷锛屽彧鍏佽杩涜涓�娆℃壂鐮�
- SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
- DataSet ds = oCn.RunProcReturn("exec h_p_WMS_CheckBarCodeOneScan " + oMain.HInterID.ToString() + ",'" + oMain.HBarCode + "','" + oMain.HBillType + "'," + oMain.HWhID.ToString() + "," + oMain.HStockPlaceID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HOutStockPlaceID.ToString() + ",'" + oMain.HMaker + "'", "h_p_WMS_CheckBarCodeOneScan");
- if (ds == null || ds.Tables[0].Rows.Count == 0)
- {
- }
- else
- {
- if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 1)
- {
- sErrMsg = "瀵逛笉璧凤紝鎮ㄦ壂鎻忕殑鏉″舰鐮佸凡琚壂鎻忚繃锛屼笉绗﹀悎涓�娆℃壂鐮佺郴缁熷弬鏁扮殑瑕佹眰锛�";
- return false;
- }
- }
- }
- if (dal.AddNew_Source(sQty, ref sErrMsg))
- {
- //sErrMsg = "淇濆瓨鎴愬姛锛�";
- return true;
- }
- else
- {
- //sErrMsg = "淇濆瓨澶辫触锛�";
- return false;
- }
- }
- }
- }
//鍒犻櫎鍑哄叆搴撴潯鐮佷复鏃惰〃 鎵弿璁板綍
diff --git a/DLL/DAL.dll b/DLL/DAL.dll
index c2b4dc2..7fa19e7 100644
--- a/DLL/DAL.dll
+++ b/DLL/DAL.dll
Binary files differ
--
Gitblit v1.9.1