fix: 追加诺宝封口
This commit is contained in:
@@ -61,7 +61,8 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
|
||||
@Autowired
|
||||
private LuceneExecuteLogService luceneExecuteLogService;
|
||||
// DeviceAppService deviceAppservice = SpringContextHolder.getBean(DeviceAppService.class);
|
||||
@Autowired
|
||||
private DeviceAppService deviceAppservice;
|
||||
|
||||
|
||||
@Autowired
|
||||
@@ -378,15 +379,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
jo1.put("blockId", IdUtil.simpleUUID());
|
||||
jo1.put("location", pointCode);
|
||||
jo1.put("operation", "JackLoad");
|
||||
// Device device = deviceAppservice.findDeviceByCode(pointCode);
|
||||
// StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
||||
// standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver() ;
|
||||
jo1.put("operationArgs", new JSONObject() {{
|
||||
put("recognize", true);
|
||||
}});
|
||||
ja.add(jo1);
|
||||
|
||||
|
||||
inspectInStocckSet(ja, pointCode, jo1);
|
||||
JSONObject jo2 = new JSONObject();
|
||||
jo2.put("blockId", IdUtil.simpleUUID());
|
||||
jo2.put("location", pointCode + "OUTGET");
|
||||
@@ -407,6 +400,25 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
}
|
||||
}
|
||||
|
||||
private void inspectInStocckSet(JSONArray ja, String pointCode, JSONObject jo1) {
|
||||
Device device = deviceAppservice.findDeviceByCode(pointCode);
|
||||
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
String inspectInStocck = (String)device.getExtraValue().get("inspect_in_stocck");
|
||||
if (StrUtil.isNotEmpty( inspectInStocck) && inspectInStocck.equals("true")){
|
||||
jo1.put("operationArgs", new JSONObject() {{
|
||||
put("recognize",false);
|
||||
}});
|
||||
ja.add(jo1);
|
||||
}else {
|
||||
jo1.put("operationArgs", new JSONObject() {{
|
||||
put("recognize", true);
|
||||
}});
|
||||
ja.add(jo1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 下发放货信号
|
||||
*
|
||||
@@ -851,7 +863,8 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
jo.put("id", instructionCode);
|
||||
//动作块
|
||||
jo.put("blocks", createBlocksDataTowCCStart(nextPoint));
|
||||
|
||||
//追加订单封口
|
||||
jo.put("complete", true);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code("追加叉车运单")
|
||||
.content("指令号:" + instructionCode + ",追加叉车运单参数:" + jo)
|
||||
@@ -1029,6 +1042,8 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
if (AgvActionTypeEnum.OUT_STOCK.getCode().equals(instructionDto.getAgv_action_type()) || AgvActionTypeEnum.IN_OUT_STOCK.getCode().equals(instructionDto.getAgv_action_type())) {
|
||||
jo.put("blocks", createBlocksDataTowEnd(instructionCode, point, instructionDto));
|
||||
}
|
||||
//追加订单封口
|
||||
jo.put("complete", true);
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code("追加诺宝运单")
|
||||
.content("指令号:" + instructionCode + ",追加诺宝运单参数:" + jo)
|
||||
@@ -1163,12 +1178,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
jo1.put("blockId", IdUtil.simpleUUID());
|
||||
jo1.put("location", startPoint);
|
||||
jo1.put("operation", "JackLoad");
|
||||
jo1.put("operationArgs", new JSONObject() {{
|
||||
put("recognize", true);
|
||||
}});
|
||||
ja.add(jo1);
|
||||
|
||||
|
||||
inspectInStocckSet(ja, startPoint, jo1);
|
||||
JSONObject jo2 = new JSONObject();
|
||||
jo2.put("blockId", IdUtil.simpleUUID());
|
||||
jo2.put("location", startPoint + "OUTGET");
|
||||
|
||||
Reference in New Issue
Block a user