From 76fd3e6c367a96d182c222416e6e48235e082603 Mon Sep 17 00:00:00 2001 From: liuyunfeng Date: Wed, 22 Nov 2023 17:32:19 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E7=BA=BF=E8=B6=85?= =?UTF-8?q?=E6=97=B6=E6=8F=90=E9=86=92=20bug=EF=BC=8C=20=E5=85=B6=E5=AE=83?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MsgCheck/BillM100s/BillM100AppService.cs | 11 ++++++++--- .../PrintTable/WaitPrintAppService.cs | 7 ++++--- vue/src/router/index.js | 4 ++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/BillM100AppService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/BillM100AppService.cs index 787420b..afce8a1 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/BillM100AppService.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/BillM100AppService.cs @@ -2201,11 +2201,16 @@ select * from retObj.ProductLine = plStr; retObj.ConfigMinutes = _configuration[$"ConfigDic:ProductLineTimeoutRemind_New:{plStr}"].TryToInt() ?? 30; - int maxSN2= await _waitPrintRepository.Where(itm => itm.ProductLine == plStr).MaxAsync(itm => itm.HostSN2); - WaitPrint lastitem = await _waitPrintRepository.FirstOrDefaultAsync(itm => itm.ProductLine == plStr && itm.HostSN2 == maxSN2); + var qry = _waitPrintRepository.Where(itm => itm.ProductLine == plStr); + bool hasData = await qry.AnyAsync(); + var cache = _timeoutCacheList.FirstOrDefault(itm => itm.ProductLine == plStr); - if (lastitem != null) //未打印表有数据 + if (hasData) //未打印表有数据 { + int maxSN2 = await qry.MaxAsync(itm => itm.HostSN2); + WaitPrint lastitem = await _waitPrintRepository.FirstOrDefaultAsync(itm => itm.ProductLine == plStr && itm.HostSN2 == maxSN2); + + retObj.LastReceiveTime = lastitem.ReceiveTime ?? ServerHelper.CurrentDateTime; retObj.TimeoutMinutes = MinuteDiff(retObj.LastReceiveTime, ServerHelper.CurrentDateTime); if (cache != null) diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs index 5455b89..105bf69 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs @@ -1248,10 +1248,11 @@ namespace WY.NewJit.PrintTable ret.TotalCount = await GetEntityCountAsync("FisWaitPrint", where); //计算分页 - int fromRec = input.SkipCount; - int ToRec = input.SkipCount + input.MaxResultCount; + int skipNum = input.SkipCount; + int takeNum = input.MaxResultCount; + + var lst = await GetEntityListFromToAsync("FisWaitPrint", where, "HostSN2", skipNum, takeNum); - var lst = await GetEntityListFromToAsync("FisWaitPrint", where, "HostSN2", fromRec, ToRec); ret.Items = lst; return ret; } diff --git a/vue/src/router/index.js b/vue/src/router/index.js index 7753e71..012c1f6 100644 --- a/vue/src/router/index.js +++ b/vue/src/router/index.js @@ -64,10 +64,10 @@ export const constantRoutes = [ }, { path: '/login', - //component: () => import('@/views/login/index'), + component: () => import('@/views/login/index'), //component: () => import('@/views/pg-fis/basedate/partSwitch'), //?? one //component: () => import('@/views/pg-fis/basedate/assemblyCfg'), //?? one - component: () => import('@/views/pg-fis/basedate/m100Online/normalPritIndex.vue'), + //component: () => import('@/views/pg-fis/basedate/m100Online/normalPritIndex.vue'), hidden: true }, { From c72cec5f83e0a0609de3f4e11c9056972c40a9b3 Mon Sep 17 00:00:00 2001 From: liuyunfeng Date: Thu, 23 Nov 2023 08:52:43 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=8C=E6=AD=A5WMS?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/WmsSyncService.cs | 4 ++-- .../appsettings.json | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleSyncToWms/Services/WmsSyncService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleSyncToWms/Services/WmsSyncService.cs index ebcc8b3..ad69242 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleSyncToWms/Services/WmsSyncService.cs +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleSyncToWms/Services/WmsSyncService.cs @@ -169,7 +169,7 @@ namespace WY.NewJit.Job.ConsoleWmsSync.Services int cnt = 0; try { - int interval = _configuration["ConfigDic:MyTimer:IntervalInSeconds"].TryToInt() ?? 100; + int intervalInSeconds = _configuration["ConfigDic:MyTimer:IntervalInSeconds"].TryToInt() ?? 60; //取待报废单据 List scrapBillNumLst = await _tbBillScrapRepository.Where(itm => itm.IsExecute == false).Select(itm => itm.BillNum).ToListAsync(); @@ -226,7 +226,7 @@ namespace WY.NewJit.Job.ConsoleWmsSync.Services } else { - Thread.Sleep(interval * 1000); + Thread.Sleep(intervalInSeconds * 1000); } } catch (Exception ex) diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleSyncToWms/appsettings.json b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleSyncToWms/appsettings.json index 57fed70..3e28798 100644 --- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleSyncToWms/appsettings.json +++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleSyncToWms/appsettings.json @@ -9,7 +9,7 @@ "TakeCountPerTime": 10, "MyTimer": { "IsStop": false, - "IntervalInSeconds": 3600 //10 + "IntervalInSeconds": 10 } }, @@ -17,12 +17,12 @@ //"Default": "Server=192.168.0.140;Database=NewJitPG_TEST_20230703;uid=sa;pwd=Microsoft2008;", //"ABP": "Server=192.168.0.140;Database=ABP;User ID=sa;Password=Microsoft2008;", //"WMS": "Server=192.168.0.140;Database=CPAT_WMS_TEST;User ID=sa;Password=Microsoft2008;" - //"Default": "Server=dev.ccwin-in.com,6208;Database=NewJitPG_15;uid=sa;pwd=ChangkeTec@2021;", - //"ABP": "Server=dev.ccwin-in.com,6208;Database=ABP;User ID=sa;Password=ChangkeTec@2021;", - //"WMS": "Server=dev.ccwin-in.com,6208;Database=CPAT_WMS;User ID=sa;Password=ChangkeTec@2021;" - "Default": "Server=192.168.0.228;Database=NewJitPG_15;uid=sa;pwd=ChangkeTec@2021;", - "ABP": "Server=192.168.0.228;Database=ABP;User ID=sa;Password=ChangkeTec@2021;", - "WMS": "Server=192.168.0.228;Database=CPAT_WMS;User ID=sa;Password=ChangkeTec@2021;" + "Default": "Server=dev.ccwin-in.com,6208;Database=NewJitPG_15;uid=sa;pwd=ChangkeTec@2021;", + "ABP": "Server=dev.ccwin-in.com,6208;Database=ABP;User ID=sa;Password=ChangkeTec@2021;", + "WMS": "Server=dev.ccwin-in.com,6208;Database=CPAT_WMS;User ID=sa;Password=ChangkeTec@2021;" + //"Default": "Server=192.168.0.228;Database=NewJitPG_15;uid=sa;pwd=ChangkeTec@2021;", + //"ABP": "Server=192.168.0.228;Database=ABP;User ID=sa;Password=ChangkeTec@2021;", + //"WMS": "Server=192.168.0.228;Database=CPAT_WMS;User ID=sa;Password=ChangkeTec@2021;" },