From 202667c5682da2eb9d652eea538cb181641f67b9 Mon Sep 17 00:00:00 2001 From: ch <37327@LLOOCCY> Date: 星期四, 04 八月 2022 11:05:12 +0800 Subject: [PATCH] 快速生成条码模块增加了厂休设置 白夜班 箱号 --- WarM/条码打印/Sc_ICMOToBarCode.cs | 52 ++++++++++++++++++++----- WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user | 34 ++++++++-------- 2 files changed, 58 insertions(+), 28 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 477733f..2e60eae 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" @@ -781,6 +781,8 @@ DataSet Ds; int LSH = 0; //娴佹按鍙� string LSH2 = ""; //娴佹按鍙疯浆鎹㈡垚瀛楃 + + double HZXQty = 0; //瑁呯鏁伴噺 double HDDQty = 0; //璁㈠崟鏁伴噺 double HBQty = 0; //绠辨暟 @@ -792,10 +794,18 @@ string sPackBarCode = ""; string HPrdDate = ""; string HBC = ""; + string HDate1 = ""; + DataSet Ds99; + //绠卞彿 + string HXH = ""; + //绠卞彿娴佹按鍙� + int LSH3 = 0; //娴佹按鍙� + string LSH4 = ""; //娴佹按鍙疯浆鎹㈡垚瀛楃 + //鏈哄彴 + string HJT = ""; - - HDate = dtpHBeginDate.Value.ToShortDateString(); + HDate = DateTime.Now.ToString(); //鍒ゆ柇褰撳墠鏃堕棿鏄惁鍦ㄥ伐浣滄椂闂存鍐� string _strWorkingDayAM = "07:30";//宸ヤ綔鏃堕棿涓婂崍08:30 @@ -811,11 +821,13 @@ DateTime t1 = Convert.ToDateTime(HDate); TimeSpan dspNow = t1.TimeOfDay; + HDate1 = Convert.ToDateTime(HDate).ToShortDateString(); //1.姝e父涓婄彮鏃堕棿 灏辨槸鐧界彮 濡傛灉涓嶆槸绀兼嫓澶� 灏卞線鍓嶆彁鍓嶄竴澶� if (dspNow > dspWorkingDayAM && dspNow < dspWorkingDayPM) { HBC = "鐧界彮"; - DataSet DSet2 = oCn.RunProcReturn("select * from Gy_FactoryDayOff Where HFactoryDayOffDate='" + HDate.ToString() + "'", "Gy_FactoryDayOff", ref DBUtility.ClsPub.sExeReturnInfo); + + DataSet DSet2 = oCn.RunProcReturn("select * from Gy_FactoryDayOff Where HFactoryDayOffDate='" + HDate1.ToString() + "'", "Gy_FactoryDayOff", ref DBUtility.ClsPub.sExeReturnInfo); if (DSet2 == null || DSet2.Tables[0].Rows.Count == 0) { HPrdDate = HDate; @@ -829,7 +841,7 @@ if (dspNow > dspWorkingDayPM && dspNow < dspWorkingDaySM) { HBC = "澶滅彮"; - DataSet DSet2 = oCn.RunProcReturn("select * from Gy_FactoryDayOff Where HFactoryDayOffDate='" + HDate.ToString() + "'", "Gy_FactoryDayOff", ref DBUtility.ClsPub.sExeReturnInfo); + DataSet DSet2 = oCn.RunProcReturn("select * from Gy_FactoryDayOff Where HFactoryDayOffDate='" + HDate1.ToString() + "'", "Gy_FactoryDayOff", ref DBUtility.ClsPub.sExeReturnInfo); if (DSet2 == null || DSet2.Tables[0].Rows.Count == 0) { HPrdDate = HDate; @@ -857,15 +869,23 @@ } HYear = ClsPub.isDate(HPrdDate).Year.ToString().Substring(2, 2); HPeriod = "0" + ClsPub.isDate(HPrdDate).Month.ToString(); - HPeriod = HPeriod.Substring(HPrdDate.Length - 2, 2); + HPeriod = HPeriod.Substring(HPeriod.Length - 2, 2); HDay = "0" + ClsPub.isDate(HPrdDate).Day.ToString(); - HDay = HDay.Substring(HPrdDate.Length - 2, 2); + HDay = HDay.Substring(HDay.Length - 2, 2); long HTMaterID = 0; HTMaterID = ClsPub.isLong(grdMain.Rows[0].Cells[Fun_GetCol("HMaterID")].Value); string sPackStr = "ZXM" + HYear + HPeriod + HDay + HTMaterID; //澶栫鐮� 鍓嶇紑 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; - 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 + "'"); @@ -952,6 +972,15 @@ HBatchNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[j].Cells[Fun_GetCol("鎵规")].Value); HOrgNumber = ClsPub.HOrgNumber; + + + //绠卞彿鐢熸垚瑙勫垯 鏃ユ湡 + 鏈哄彴 + 鐝 + 鐗╂枡 鍙鑾峰彇鏈�澶х殑娴佹按鍙� + 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]); + LSH4 = LSH3.ToString(); + //HBQty = HBQty + ClsPub.isInt(txtHBQty.Text); @@ -1047,7 +1076,7 @@ ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark " + ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate " + ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HSourceID,HInterID " + - ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HPrdDate,HBC,HInnerBillNo " + + ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HPrdDate,HBC,HXH,HInnerBillNo " + ") values (" + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID1.ToString() + "," + HUnitID.ToString() + "," + HQty2.ToString() + ", " + HMZQty.ToString() + ",'" + HBatchNo2 + "'," + HSupID.ToString() + "," + HGroupID.ToString() + ",'" + ClsPub.CurUserName + "',getdate()," + HPrintQty.ToString() + "," + HQty2.ToString() @@ -1055,22 +1084,23 @@ + ", " + HBarcodeQtys.ToString() + "," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HRemark + "'" + ", " + HCusID.ToString() + ",'" + HCusType + "','" + HEndDate.ToShortDateString() + "','" + HWorkLineName + "','" + HDate + "'" + ", " + ClsPub.HOrgID.ToString() + "," + ClsPub.HOrgID.ToString() + ",'" + HSeOrderBillNo + "'," + HSourceID.ToString() + "," + HInterID.ToString() - + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HPrdDate + "','" + HBC + "','" + HInnerBillNo + "')"); + + ",'" + HMaterName + "','" + HMaterModel + "','" + HPinfan + "'," + HAuxPropID.ToString() + ",'" + HMTONo + "','" + HPrdDate + "','" + HBC + "','" + LSH4 + "','" + HInnerBillNo + "')"); oCn.RunProc("exec h_p_WMS_SetMaxNo '" + HTMNumber + "'"); + oCn.RunProc("exec h_p_WMS_SetMaxNo '" + HXH + "'"); DisplayTM(); } } //2.寰幆缁撴潫鍚庯紝鏍规嵁 鏈鐢熸垚鐨� 涓诲唴鐮侊紝浠庡悗鍙版暟鎹簱鑾峰彇 鏉$爜鍒楄〃锛岀敓鎴� 缁勬墭鍗� 鍜� 鎵樻潯鐮侊紝 鐩存帴璋冪敤瀛樺偍杩囩▼ //鏍规嵁澶栫鐮� 鍐欏叆 缁勬墭鍗曚富琛紝缁勬墭鍗曞瓙琛紝SUM锛屽绠辩爜妗f锛孲UM妗f - oCn.RunProc("exec h_p_WMS_PackUnionBill_AddNew '" + sPackBarCode + "'," + HInterID_TTM.ToString() + ",'" + DBUtility.ClsPub.CurUserName + "','" + HDate + "'," + HInterID.ToString()); //鏍规嵁绠辨潯鐮侊紝鍐欏叆 涓昏〃锛屽瓙琛� 锛岀鏉$爜妗f + oCn.RunProc("exec h_p_WMS_PackUnionBill_AddNew_test '" + sPackBarCode + "'," + HInterID_TTM.ToString() + ",'" + DBUtility.ClsPub.CurUserName + "'," + HInterID.ToString()); //鏍规嵁绠辨潯鐮侊紝鍐欏叆 涓昏〃锛屽瓙琛� 锛岀鏉$爜妗f oCn.RunProc("exec h_p_WMS_PackUnionBill_SumSubBill " + HInterID_TTM.ToString() + ",'" + sPackBarCode + "','3783','" + DBUtility.ClsPub.CurUserName + "'," + HInterID.ToString()); //鏍规嵁绠辨潯鐮侊紝鍐欏叆 SUM琛紝SUM鏉$爜妗f sPackBarCode = ""; - DataSet DSet = oCn.RunProcReturn("select * from h_v_IF_BarCodeBillList_CS Where HInterID=" + HInterID.ToString() + " and 鏉$爜绫诲瀷 = '鎵樼洏鏉$爜'", "h_v_IF_BarCodeBillList_CS", ref DBUtility.ClsPub.sExeReturnInfo); + DataSet DSet = oCn.RunProcReturn("select * from h_v_IF_BarCodeBillList_CS_Test Where HInterID=" + HInterID.ToString() + " and 鏉$爜绫诲瀷 = '鎵樼洏鏉$爜'", "h_v_IF_BarCodeBillList_CS_Test", ref DBUtility.ClsPub.sExeReturnInfo); //鐢熸垚棣栬鏍囬 if (DSet == null) { diff --git a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user index cad06b8..ccefbb1 100644 --- a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -18,28 +18,28 @@ <publishTime>02/22/2013 16:43:40</publishTime> </File> <File Include="bin/BLL.dll"> - <publishTime>07/31/2022 12:56:21</publishTime> + <publishTime>07/31/2022 16:05:34</publishTime> </File> <File Include="bin/BLL.pdb"> - <publishTime>07/31/2022 12:56:21</publishTime> + <publishTime>07/31/2022 16:05:34</publishTime> </File> <File Include="bin/BouncyCastle.Crypto.dll"> <publishTime>12/18/2020 05:32:28</publishTime> </File> <File Include="bin/DAL.dll"> - <publishTime>07/31/2022 12:56:19</publishTime> + <publishTime>07/31/2022 16:05:32</publishTime> </File> <File Include="bin/DAL.pdb"> - <publishTime>07/31/2022 12:56:19</publishTime> + <publishTime>07/31/2022 16:05:32</publishTime> </File> <File Include="bin/Dapper.dll"> <publishTime>07/22/2016 22:52:40</publishTime> </File> <File Include="bin/DBUtility.dll"> - <publishTime>07/31/2022 12:56:12</publishTime> + <publishTime>07/31/2022 16:05:26</publishTime> </File> <File Include="bin/DBUtility.pdb"> - <publishTime>07/31/2022 12:56:12</publishTime> + <publishTime>07/31/2022 16:05:26</publishTime> </File> <File Include="bin/Grpc.Core.Api.dll"> <publishTime>03/22/2022 13:17:26</publishTime> @@ -93,10 +93,10 @@ <publishTime>07/25/2012 19:48:56</publishTime> </File> <File Include="bin/Model.dll"> - <publishTime>07/31/2022 12:56:15</publishTime> + <publishTime>07/31/2022 16:05:28</publishTime> </File> <File Include="bin/Model.pdb"> - <publishTime>07/31/2022 12:56:15</publishTime> + <publishTime>07/31/2022 16:05:28</publishTime> </File> <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs"> <publishTime>03/15/2022 10:06:42</publishTime> @@ -129,22 +129,22 @@ <publishTime>10/23/2021 17:07:54</publishTime> </File> <File Include="bin/Pub_Class.dll"> - <publishTime>07/31/2022 12:56:10</publishTime> + <publishTime>07/31/2022 16:05:24</publishTime> </File> <File Include="bin/Pub_Class.pdb"> - <publishTime>07/31/2022 12:56:10</publishTime> + <publishTime>07/31/2022 16:05:24</publishTime> </File> <File Include="bin/Pub_Control.dll"> - <publishTime>07/31/2022 12:56:11</publishTime> + <publishTime>07/31/2022 16:05:25</publishTime> </File> <File Include="bin/Pub_Control.pdb"> - <publishTime>07/31/2022 12:56:11</publishTime> + <publishTime>07/31/2022 16:05:25</publishTime> </File> <File Include="bin/SQLHelper.dll"> - <publishTime>07/31/2022 12:56:11</publishTime> + <publishTime>07/31/2022 16:05:25</publishTime> </File> <File Include="bin/SQLHelper.pdb"> - <publishTime>07/31/2022 12:56:11</publishTime> + <publishTime>07/31/2022 16:05:25</publishTime> </File> <File Include="bin/stdole.dll"> <publishTime>05/09/2021 13:35:37</publishTime> @@ -255,13 +255,13 @@ <publishTime>11/24/2014 19:18:48</publishTime> </File> <File Include="bin/WebAPI.dll"> - <publishTime>07/31/2022 12:56:25</publishTime> + <publishTime>07/31/2022 16:05:39</publishTime> </File> <File Include="bin/WebAPI.dll.config"> <publishTime>12/15/2021 17:59:43</publishTime> </File> <File Include="bin/WebAPI.pdb"> - <publishTime>07/31/2022 12:56:25</publishTime> + <publishTime>07/31/2022 16:05:39</publishTime> </File> <File Include="bin/WebGrease.dll"> <publishTime>07/18/2013 01:03:52</publishTime> @@ -459,7 +459,7 @@ <publishTime>12/20/2021 13:19:56</publishTime> </File> <File Include="Web.config"> - <publishTime>07/31/2022 12:56:38</publishTime> + <publishTime>07/31/2022 16:05:46</publishTime> </File> </ItemGroup> </Project> \ No newline at end of file -- Gitblit v1.9.1