rev 修复bug
This commit is contained in:
@@ -1338,8 +1338,11 @@ public class LnshPackagePalletizingManipulatorSiteDeviceDriver extends AbstractO
|
|||||||
Map<String, Object> itemMap = new HashMap<String, Object>();
|
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||||
itemMap.put(to_command, 1);
|
itemMap.put(to_command, 1);
|
||||||
itemMap.put(to_task, instruction_num);
|
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) {
|
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>();
|
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||||
itemMap.put(to_command, command);
|
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);
|
logServer.deviceExecuteLog(this.device_code, "", "", to_command + " 写入 " + command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -710,6 +710,10 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
|||||||
public void finish(String id) {
|
public void finish(String id) {
|
||||||
TaskDto entity = this.findById(id);
|
TaskDto entity = this.findById(id);
|
||||||
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
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");
|
InstructionService instructionservice = SpringContextHolder.getBean("instructionServiceImpl");
|
||||||
InstructionDto instdto = instructionservice.findByTaskid(id, "instruction_status <2 ");
|
InstructionDto instdto = instructionservice.findByTaskid(id, "instruction_status <2 ");
|
||||||
if (instdto != null) throw new BadRequestException("有指令未完成!");
|
if (instdto != null) throw new BadRequestException("有指令未完成!");
|
||||||
|
|||||||
@@ -613,7 +613,9 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
|
|||||||
&& (lnshStationDeviceDriver.getIo_action() == 3 || lnshStationDeviceDriver.getIo_action() == 2)) {
|
&& (lnshStationDeviceDriver.getIo_action() == 3 || lnshStationDeviceDriver.getIo_action() == 2)) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
lnshStationDeviceDriver.writing(3);
|
if(lnshStationDeviceDriver.getTo_command() != 3){
|
||||||
|
lnshStationDeviceDriver.writing(3);
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.info("下发电气信号失败:" + e.getMessage());
|
log.info("下发电气信号失败:" + e.getMessage());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
Reference in New Issue
Block a user