From 36268bf1daef77d123cd8f9ee2ae07890f3aa5bf Mon Sep 17 00:00:00 2001 From: zhou keda <1315948824@qq.com> Date: Sun, 29 Sep 2024 01:45:01 +0800 Subject: [PATCH] =?UTF-8?q?pda=20=E4=BB=BB=E5=8A=A1=E5=8D=95=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=87=8C=E6=99=A8=E7=9C=8B=E4=B8=8D=E5=88=B0bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs | 5 +++++ ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs index 2502b1f7..4290dd50 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdMaterialReceiptService.cs @@ -101,6 +101,11 @@ namespace Tnb.ProductionMgr // .FirstAsync(); string nowTime = DateTime.Now.ToString("HH:mm"); + string nowHour = DateTime.Now.ToString("HH"); + if (int.Parse(nowHour) < 7) + { + nowTime = int.Parse(nowHour) + 24 +":"+ DateTime.Now.ToString("mm"); + } BasFactoryConfig config = await db.Queryable().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.DAYNIGHTWORKTIME); Dictionary dayNightWorkTime = JsonConvert.DeserializeObject>(config.value); string dayStime = dayNightWorkTime["白班"].Split("-")[0]; diff --git a/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs b/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs index 1279ce90..a8014a48 100644 --- a/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs +++ b/ProductionMgr/Tnb.ProductionMgr/PrdPackReportService.cs @@ -424,6 +424,11 @@ namespace Tnb.ProductionMgr OrganizeEntity workline = await _organizeService.GetAnyParentByWorkstationId(_userManager.User.OrganizeId,DictConst.RegionCategoryWorklineCode); string userWorklineId = workline?.Id ?? ""; string nowTime = DateTime.Now.ToString("HH:mm"); + string nowHour = DateTime.Now.ToString("HH"); + if (int.Parse(nowHour) < 7) + { + nowTime = int.Parse(nowHour) + 24 +":"+ DateTime.Now.ToString("mm"); + } BasFactoryConfig config = await _db.Queryable().FirstAsync(x => x.enabled == 1 && x.key == FactoryConfigConst.DAYNIGHTWORKTIME); Dictionary dayNightWorkTime = JsonConvert.DeserializeObject>(config.value); string dayStime = dayNightWorkTime["白班"].Split("-")[0];