From 74e04e7e42e3c395073f3f3971c2131da4861f11 Mon Sep 17 00:00:00 2001
From: jhz <jinghz@oceic.com>
Date: 星期二, 16 八月 2022 10:32:26 +0800
Subject: [PATCH] 职员

---
 WarM/条码打印/Sc_ICMOToBarCode.cs |   35 +++++++++++++++++++++++++----------
 1 files changed, 25 insertions(+), 10 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..27b3428 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"
@@ -875,17 +875,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 +993,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