From 761327ecedb5f3d9a9502e8ab8fcdf4f05ba29e0 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期二, 24 十月 2023 16:14:50 +0800
Subject: [PATCH] 称重入库、涤纶半成品生成条码模块,生成条码前增加判断控制
---
WarM/条码打印/Kf_WeighToBarCode_StationOutBill.cs | 35 +++++++++++++++++
WarM/条码打印/Kf_WeighToBarCode.cs | 49 +++++++++++++++++++++---
WebAPI/Web.config | 4 +-
3 files changed, 78 insertions(+), 10 deletions(-)
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.cs"
index 9be67cd..c0fcab3 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.cs"
@@ -35,7 +35,7 @@
public Int64 HSourceEntryID = 0;
public string HSourceBillNo = "";
public string HSourceBillType = "";
- public Int64 ProcessExchangeInterID = 0;
+ public Int64 HProcessExchangeInterID = 0;
public Int64 HSupID = 0;
public double HSourceQty = 0;
public double HMaterWeight = 0; //鐗╂枡鍏嬮噸
@@ -578,6 +578,38 @@
{
if (MessageBox.Show("鐗╂枡缁存姢鍏嬮噸涓猴細"+HMaterWeight.ToString()+ "锛屽疄闄呭厠閲嶄负锛�" + sQty.ToString() + "锛屾墍杈撳叆瀹為檯鍏嬮噸瓒呭嚭鐗╂枡缁存姢鍏嬮噸鐨勭櫨鍒嗕箣浜屽崄鎴栦笉瓒崇墿鏂欑淮鎶ゅ厠閲嶇殑鐧惧垎涔嬪叓鍗侊紝璇锋鏌ヨ緭鍏ョ殑鏁版嵁鏄惁姝g‘锛�", "鎻愮ず", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
{
+ //return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ //鏉$爜鐢熸垚鍓嶆帶鍒跺垽鏂�
+ double HNowQty = 0; //绫虫暟
+ double HWeightQyt = 0; //閲嶉噺
+ double HKDQty = 0; //鎵g偣鏁�
+ HNowQty = DBUtility.ClsPub.isDoule(txtHQty.Text);
+ HWeightQyt = DBUtility.ClsPub.isDoule(txtHWeightQyt.Text);
+ HKDQty = DBUtility.ClsPub.isDoule(txtHKDQty.Text);
+
+ DataSet oDsCheck = oCn.RunProcReturn("exec h_p_Kf_WeighToBarCode_AddBarCodeCheck " + HInterID.ToString() + "," + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + "," + HProcessExchangeInterID.ToString() + "," + HSourceQty.ToString() + "," + HNowQty.ToString() + "," + HWeightQyt.ToString() + "," + HKDQty.ToString(), "h_p_Kf_WeighToBarCode_AddBarCodeCheck");
+ //
+ if (oDsCheck == null && oDsCheck.Tables[0].Rows.Count == 0)
+ {
+ MessageBox.Show("鏉$爜鐢熸垚鍓嶅垽鏂敊璇紒");
+ return false;
+ }
+ else if (DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0][0]) == "1")
+ {
+ MessageBox.Show(DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0]["HRemark"]), "鎻愮ず");
+ return false;
+ }
+ else if (DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0][0]) == "2")
+ {
+ if (MessageBox.Show(DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0]["HRemark"]), "鎻愮ず", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
+ {
return true;
}
else
@@ -585,7 +617,10 @@
return false;
}
}
- return true;
+ else
+ {
+ return true;
+ }
}
//鐢熸垚鏉$爜
@@ -652,7 +687,7 @@
string HRemark = "";
string HMaterName = "";
string HMaterModel = "";
- string ProcessExchangeBillNo = "";
+ string HProcessExchangeBillNo = "";
Int64 HBarcodeNo = 0; //鍖呮暟
Int64 HBadReasonID = 0; //涓嶈壇鍘熷洜ID
string HCusMaterName = ""; //瀹㈡埛鐗╂枡鍚嶇О
@@ -668,7 +703,7 @@
HRemark = DBUtility.ClsPub.isStrNull(txtHRemark.Text);
HMaterName = DBUtility.ClsPub.isStrNull(txtHMaterName.Text);
HMaterModel = DBUtility.ClsPub.isStrNull(txtHMaterModel.Text);
- ProcessExchangeBillNo = DBUtility.ClsPub.isStrNull(txtHBillNo.Text);
+ HProcessExchangeBillNo = DBUtility.ClsPub.isStrNull(txtHBillNo.Text);
HBarcodeNo = DBUtility.ClsPub.isLong(txtHBarcodeNo.Text);
HBadReasonID = DBUtility.ClsPub.isLong(txtHRemark.Tag);
HCusMaterName = DBUtility.ClsPub.isStrNull(txtHCusMaterName.Text);
@@ -694,14 +729,14 @@
+ ", 1," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HRemark + "'"
+ ", 0,'',getdate(),'','" + sDate + "'," + HMaterialJQty.ToString() + "," + HMaterialMQty.ToString() + "," + HNowQty.ToString()
+ ", " + HStockOrgID.ToString() + "," + HStockOrgID.ToString() + ",''," + HInterID.ToString() + ",0"
- + ", " + ProcessExchangeInterID.ToString() + ",0,'" + ProcessExchangeBillNo + "'," + HBadReasonID.ToString() + ",'" + HCusMaterName + "','" + HCusModel + "'"
+ + ", " + HProcessExchangeInterID.ToString() + ",0,'" + HProcessExchangeBillNo + "'," + HBadReasonID.ToString() + ",'" + HCusMaterName + "','" + HCusModel + "'"
+ ",'" + HMaterName + "','" + HMaterModel + "',''," + HAuxPropID.ToString() + ",'','','1')");
//鍥炲~鏈�澶ф祦姘村彿
oCn.RunProc("exec h_p_WMS_SetMaxNo_QTY '" + sTMNumber + "',1 ");
//鍥炲~婧愬崟涓存椂琛℉InterID
- oCn.RunProc("update a set a.HInterID=" + HInterID.ToString() + ",a.HBillNo='" + HBillNo +"',a.HRelationInterID= 0 from KF_WeighSource_Temp a where a.HInterID<>" + HInterID.ToString() + " and a.HMaker='" + HMaker + "' and a.HSourceBillNo='" + ProcessExchangeBillNo + "'");
+ oCn.RunProc("update a set a.HInterID=" + HInterID.ToString() + ",a.HBillNo='" + HBillNo +"',a.HRelationInterID= 0 from KF_WeighSource_Temp a where a.HInterID<>" + HInterID.ToString() + " and a.HMaker='" + HMaker + "' and a.HSourceBillNo='" + HProcessExchangeBillNo + "'");
//鍐欏叆鏉$爜鍑哄叆搴撲复鏃惰〃
oCn.RunProc("Insert into KF_PonderationBillMain_Temp " +
@@ -757,7 +792,7 @@
HSourceBillNo = DBUtility.ClsPub.isStrNull(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("鐢熶骇璁㈠崟")].Value);
HSourceBillType = DBUtility.ClsPub.isStrNull(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HSourceBillType")].Value);
HSourceQty = DBUtility.ClsPub.isDoule(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("鏁伴噺")].Value);
- ProcessExchangeInterID = DBUtility.ClsPub.isLong(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("ProcessExchangeInterID")].Value);
+ HProcessExchangeInterID = DBUtility.ClsPub.isLong(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("ProcessExchangeInterID")].Value);
HSupID = DBUtility.ClsPub.isLong(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HSupID")].Value);
HMaterWeight = DBUtility.ClsPub.isDoule(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HMaterWeight")].Value);
}
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode_StationOutBill.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode_StationOutBill.cs"
index 5822cc5..463f03c 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode_StationOutBill.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode_StationOutBill.cs"
@@ -613,6 +613,36 @@
{
if (MessageBox.Show("鐗╂枡缁存姢鍏嬮噸涓猴細" + HMaterWeight.ToString() + "锛屽疄闄呭厠閲嶄负锛�" + sQty.ToString() + "锛屾墍杈撳叆瀹為檯鍏嬮噸瓒呭嚭鐗╂枡缁存姢鍏嬮噸鐨勭櫨鍒嗕箣浜屽崄鎴栦笉瓒崇墿鏂欑淮鎶ゅ厠閲嶇殑鐧惧垎涔嬪叓鍗侊紝璇锋鏌ヨ緭鍏ョ殑鏁版嵁鏄惁姝g‘锛�", "鎻愮ず", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
{
+ //return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ //鏉$爜鐢熸垚鍓嶆帶鍒跺垽鏂�
+ double HNowQty = 0; //绫虫暟
+ double HWeightQyt = 0; //閲嶉噺
+ HNowQty = DBUtility.ClsPub.isDoule(txtHQty.Text);
+ HWeightQyt = DBUtility.ClsPub.isDoule(txtHWeightQyt.Text);
+
+ DataSet oDsCheck = oCn.RunProcReturn("exec h_p_Kf_WeighToBarCode_StationOutBill_AddBarCodeCheck " + HInterID.ToString() + "," + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + "," + HProcessExchangeInterID.ToString() + "," + HProcessExchangeEntryID.ToString() + "," + HSourceQty.ToString() + "," + HNowQty.ToString() + "," + HWeightQyt.ToString(), "h_p_Kf_WeighToBarCode_StationOutBill_AddBarCodeCheck");
+ //
+ if (oDsCheck == null && oDsCheck.Tables[0].Rows.Count == 0)
+ {
+ MessageBox.Show("鏉$爜鐢熸垚鍓嶅垽鏂敊璇紒");
+ return false;
+ }
+ else if (DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0][0]) == "1")
+ {
+ MessageBox.Show(DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0]["HRemark"]), "鎻愮ず");
+ return false;
+ }
+ else if (DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0][0]) == "2")
+ {
+ if (MessageBox.Show(DBUtility.ClsPub.isStrNull(oDsCheck.Tables[0].Rows[0]["HRemark"]), "鎻愮ず", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
+ {
return true;
}
else
@@ -620,7 +650,10 @@
return false;
}
}
- return true;
+ else
+ {
+ return true;
+ }
}
//鐢熸垚鏉$爜
diff --git a/WebAPI/Web.config b/WebAPI/Web.config
index 251181b..87fce6c 100644
--- a/WebAPI/Web.config
+++ b/WebAPI/Web.config
@@ -22,7 +22,7 @@
<!--<add key="FileIP" value="http://localhost:8082/LuBaoAPI"/>-->
<!--<add key="FileIP" value="http://localhost:8080/" />-->
<!--<add key="sUrl" value="http://183.129.128.86:9090/WEBS-WMSTest/WebService1.asmx"/> -->
- <!--<add key="sUrl" value="http://192.168.63.20/WEBS-WMS/WebService1.asmx"/> 棰滃彴寮忔満-->
+ <add key="sUrl" value="http://192.168.63.20/WEBS-WMS/WebService1.asmx"/> <!--棰滃彴寮忔満-->
<!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> 澶忓疂-->
<!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> -->
<!--<add key="sUrl" value="http://10.10.130.181/WEBS-WMS/WebService1.asmx"/> 鍗氭棩绉戞妧-->
@@ -34,7 +34,7 @@
<!--<add key="sUrl" value="http://192.168.80.90:9090/WEBS-WMS/WebService1.asmx"/> 瀹夌憺鏈嶅姟鍣�-->
<!--<add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/> --> <!--娴嬭瘯鏈嶅姟鍣�-->
<!--<add key="sUrl" value="http://localhost:8082/WEBS/WebService1.asmx"/> 鏈湴-->
- <add key="sUrl" value="http://192.168.56.1:81/web/WebService1.asmx"/><!--闄堥洴闈欐湰鍦伴厤缃�-->
+ <!--<add key="sUrl" value="http://192.168.56.1:81/web/WebService1.asmx"/> 闄堥洴闈欐湰鍦伴厤缃�-->
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="ClientValidationEnabled" value="true" />
--
Gitblit v1.9.1