fix : 烘箱时间修改

This commit is contained in:
ls
2024-10-16 10:37:37 +08:00
parent db2a3f6eda
commit 3620f6e20b
2 changed files with 9 additions and 3 deletions

View File

@@ -37,7 +37,13 @@ public class AbstractOpcDeviceDriver extends AbstractDeviceDriver implements Opc
public void checkcontrol(Map<String, Object> itemValues) throws Exception {
Group group = opcServerService.getServer(this.getOpcServer());
Group group;
try {
group = opcServerService.getServer(this.getOpcServer());
}catch (Exception e){
e.printStackTrace();
group = opcServerService.getServer(this.getOpcServer());
}
Map<String, Object> write = new HashMap();
Map<String, Item> readitems = new LinkedHashMap();
List<String> itemsString = new ArrayList();

View File

@@ -1066,8 +1066,8 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
if (StrUtil.isNotEmpty(taskDto.getOven_time())) {
//下发烘箱时间
int time = Integer.parseInt(taskDto.getOven_time());
int hours = (time % (60 * 60 * 24)) / (60 * 60);
int minutes = (time % (60 * 60)) / 60;
int hours = (time / (60 * 60)); // 整数小时
int minutes = (time % (60 * 60)) / 60; // 剩余分钟
map.put("to_time_house", String.valueOf(hours));
map.put("to_time_min", String.valueOf(minutes));
hongXiangConveyorDeviceDriver.writing(map);