From 36ac7452cd5345809df4fe27f24ea83f70cd0919 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期二, 18 十月 2022 14:27:13 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WarM/条码打印/Sc_ICMOToBarCode.cs | 36 +++++++++++++++++++++++++-----------
1 files changed, 25 insertions(+), 11 deletions(-)
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Sc_ICMOToBarCode.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Sc_ICMOToBarCode.cs"
index 2e60eae..4d74421 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Sc_ICMOToBarCode.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Sc_ICMOToBarCode.cs"
@@ -752,7 +752,6 @@
private void cmdHSaveBill_Click(object sender, EventArgs e)
{
-
Display();
}
@@ -875,17 +874,32 @@
long HTMaterID = 0;
HTMaterID = ClsPub.isLong(grdMain.Rows[0].Cells[Fun_GetCol("HMaterID")].Value);
string sPackStr = "ZXM" + HYear + HPeriod + HDay + HTMaterID; //澶栫鐮� 鍓嶇紑
+
+
+ //鑾峰彇澶勭悊杩囩殑鏃ユ湡璺熶粖澶╁樊鍑犲ぉ 鐒跺悗鍔犲嚑涓�+鍙�
+ TimeSpan HCY = Convert.ToDateTime(HPrdDate) - Convert.ToDateTime(DateTime.Now.ToString());
+ int a = 1;
+ while (a <= HCY.Days) //褰揳 灏忎簬 宸紓澶╂暟 寰幆鍔犱笂 + 鍙�
+ {
+ HPrdDate = HPrdDate + "+";
+ a = a + 1;
+ }
DataSet DsTM = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sPackStr + "'", "h_p_WMS_GetMaxNo"); //鑾峰彇鏈�澶ф祦姘村彿 //oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sTMNumber + "'");
Int64 TTM_LSH = ClsPub.isInt(DsTM.Tables[0].Rows[0][0]) + 1;
- DataSet DSet3 = oCn.RunProcReturn("select * from Gy_FactoryDayOff Where HFactoryDayOffDate='" + HDate1.ToString() + "'", "Gy_FactoryDayOff", ref DBUtility.ClsPub.sExeReturnInfo);
- if (DSet3 == null || DSet3.Tables[0].Rows.Count == 0)
- {
- sPackBarCode = sPackStr + TTM_LSH.ToString() ;
- }
- else
- {
- sPackBarCode = sPackStr + TTM_LSH.ToString() + "+";
- }
+
+
+ sPackBarCode = sPackStr + TTM_LSH.ToString();
+ //DataSet DSet3 = oCn.RunProcReturn("select * from Gy_FactoryDayOff Where HFactoryDayOffDate='" + HDate1.ToString() + "'", "Gy_FactoryDayOff", ref DBUtility.ClsPub.sExeReturnInfo);
+ //if (DSet3 == null || DSet3.Tables[0].Rows.Count == 0)
+ //{
+ // sPackBarCode = sPackStr + TTM_LSH.ToString() ;
+ //}
+ //else
+ //{
+ // sPackBarCode = sPackStr + TTM_LSH.ToString() + "+";
+ //}
+
+
oCn.RunProc("exec h_p_WMS_SetMaxNo '" + sPackStr + "'");
@@ -978,7 +992,7 @@
HJT = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[Fun_GetCol("璁惧")].Value);
HXH = HYear + HPeriod + HDay + HBC + HJT + HMaterNumber;
Ds99 = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + HXH + "'", "h_p_WMS_GetMaxNo"); //鑾峰彇鏈�澶ф祦姘村彿
- LSH3 = ClsPub.isInt(Ds99.Tables[0].Rows[0][0]);
+ LSH3 = ClsPub.isInt(Ds99.Tables[0].Rows[0][0]) + 1;
LSH4 = LSH3.ToString();
--
Gitblit v1.9.1