rev 修复bug

This commit is contained in:
USER-20220102CG\noblelift
2023-09-21 14:54:57 +08:00
parent fd0538cbca
commit e6dda0f114
3 changed files with 17 additions and 4 deletions

View File

@@ -1338,8 +1338,11 @@ public class LnshPackagePalletizingManipulatorSiteDeviceDriver extends AbstractO
Map<String, Object> itemMap = new HashMap<String, Object>();
itemMap.put(to_command, 1);
itemMap.put(to_task, instruction_num);
this.control(itemMap);
try{
this.checkcontrol(itemMap);
} catch (Exception e){
e.printStackTrace();
}
}
public void executing(Server server, Map<String, Object> itemMap) {
@@ -1386,7 +1389,11 @@ public class LnshPackagePalletizingManipulatorSiteDeviceDriver extends AbstractO
Map<String, Object> itemMap = new HashMap<String, Object>();
itemMap.put(to_command, command);
this.control(itemMap);
try{
this.checkcontrol(itemMap);
} catch (Exception e){
e.printStackTrace();
}
logServer.deviceExecuteLog(this.device_code, "", "", to_command + " 写入 " + command);
}

View File

@@ -710,6 +710,10 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
public void finish(String id) {
TaskDto entity = this.findById(id);
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
if(StrUtil.equals(entity.getTask_status(),"2") || StrUtil.equals(entity.getTask_status(),"3")){
log.info("任务已经被完成,操作失败!");
return;
}
InstructionService instructionservice = SpringContextHolder.getBean("instructionServiceImpl");
InstructionDto instdto = instructionservice.findByTaskid(id, "instruction_status <2 ");
if (instdto != null) throw new BadRequestException("有指令未完成!");

View File

@@ -613,7 +613,9 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
&& (lnshStationDeviceDriver.getIo_action() == 3 || lnshStationDeviceDriver.getIo_action() == 2)) {
try {
lnshStationDeviceDriver.writing(3);
if(lnshStationDeviceDriver.getTo_command() != 3){
lnshStationDeviceDriver.writing(3);
}
} catch (Exception e) {
log.info("下发电气信号失败:" + e.getMessage());
e.printStackTrace();