From 3904343d1ce99e62e6a6c64b43387af328803e60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B?= <1063331231@qq.com> Date: Thu, 12 Jun 2025 01:34:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E7=83=AD=E6=97=B6=E9=97=B4bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iflytop/sgs/app/service/crafts/CraftsStepService.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/iflytop/sgs/app/service/crafts/CraftsStepService.java b/src/main/java/com/iflytop/sgs/app/service/crafts/CraftsStepService.java index de70bb0..c27cd4b 100644 --- a/src/main/java/com/iflytop/sgs/app/service/crafts/CraftsStepService.java +++ b/src/main/java/com/iflytop/sgs/app/service/crafts/CraftsStepService.java @@ -476,15 +476,18 @@ public class CraftsStepService { delay(1); } log.info("工艺{},温度达到", heatModuleCode); + log.info("工艺{},恒温时间", time); webSocketService.pushCraftsDebug(CraftsDebugGenerator.generateJson(heatModuleCode.toString(), "温度达到", temperature)); deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setHeatingType(HeatingType.constant); //恒温中 todo 前端显示 deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setStartHeatTime(LocalDateTime.now());//开始加热时间 deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setTargetTime(time);//加热器目标加热时间 int clock = 0; int cycle = time / 60; - int seconds = cycle % 60; - delay(time); + int seconds = time % 60; + log.info("工艺{},恒温时间分钟:", cycle); + log.info("工艺{},恒温时间秒数:", seconds); while (cycle > 0) { + log.info("工艺,恒温第{}分:", cycle); delay(60); cycle--; clock = clock + 60; @@ -496,6 +499,7 @@ public class CraftsStepService { /*保存到工艺监控*/ } delay(seconds); + log.info("工艺,恒温结束:"); deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setStartHeatTime(null);//开始加热时间 deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setTargetTime(null);//加热器目标加热时间 deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setHeatingType(HeatingType.finish); //加热完成 @@ -711,8 +715,7 @@ public class CraftsStepService { craftMonitor.setCurrentStepResult(String.valueOf(result)); craftMonitorService.saveOrUpdate(craftMonitor);//保存到监控 int cycle = time / 60; - int seconds = cycle % 60; - delay(time); + int seconds = time % 60; while (cycle > 0) { delay(60); cycle--; @@ -801,8 +804,7 @@ public class CraftsStepService { craftMonitor.setCurrentStepResult(String.valueOf(result)); craftMonitorService.saveOrUpdate(craftMonitor);//保存到监控 int cycle = time / 60; - int seconds = cycle % 60; - delay(time); + int seconds = time % 60; while (cycle > 0) { delay(60); cycle--;