Browse Source

rev 指令生成顺寻

master
周俊杰 1 year ago
parent
commit
2f49f62c5d
  1. 7
      acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java
  2. 3
      acs/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java

7
acs/nladmin-system/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java

@ -342,6 +342,9 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class); DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
Device startdevice = appService.findDeviceByCode(dto.getStart_device_code()); Device startdevice = appService.findDeviceByCode(dto.getStart_device_code());
Device nextdevice = appService.findDeviceByCode(dto.getNext_device_code()); Device nextdevice = appService.findDeviceByCode(dto.getNext_device_code());
WQLObject wo = WQLObject.getWQLObject("acs_instruction");
JSONObject json = (JSONObject) JSONObject.toJSON(dto);
wo.insert(json);
try { try {
// != 0 为agv任务 // != 0 为agv任务
@ -386,10 +389,6 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
e.printStackTrace(); e.printStackTrace();
} }
WQLObject wo = WQLObject.getWQLObject("acs_instruction");
JSONObject json = (JSONObject) JSONObject.toJSON(dto);
wo.insert(json);
instructions.add(dto); instructions.add(dto);
} }

3
acs/nladmin-system/src/main/java/org/nl/start/auto/run/NDCSocketConnectionAutoRun.java

@ -147,6 +147,7 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
int carno = arr[20]; int carno = arr[20];
Instruction link_inst = null; Instruction link_inst = null;
Instruction inst = null; Instruction inst = null;
Instruction instruction_status=null;
List<Instruction> insts = null; List<Instruction> insts = null;
boolean link_flag = false; boolean link_flag = false;
Device agv_device = null; Device agv_device = null;
@ -178,6 +179,8 @@ public class NDCSocketConnectionAutoRun extends AbstractAutoRunnable {
inst.setAgv_jobno(String.valueOf(index)); inst.setAgv_jobno(String.valueOf(index));
inst.setSend_status("1"); inst.setSend_status("1");
instructionService.update(inst); instructionService.update(inst);
} else {
log.info("agv的指令号{} agv指令状态为{} 未找到对应指令",inst,instruction_status);
} }
data = NDCAgvService.sendAgvOneModeInst(phase, index, 0); data = NDCAgvService.sendAgvOneModeInst(phase, index, 0);
} }

Loading…
Cancel
Save