fix: 追加诺宝封口
This commit is contained in:
@@ -61,7 +61,8 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private LuceneExecuteLogService luceneExecuteLogService;
|
private LuceneExecuteLogService luceneExecuteLogService;
|
||||||
// DeviceAppService deviceAppservice = SpringContextHolder.getBean(DeviceAppService.class);
|
@Autowired
|
||||||
|
private DeviceAppService deviceAppservice;
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@@ -378,15 +379,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
|||||||
jo1.put("blockId", IdUtil.simpleUUID());
|
jo1.put("blockId", IdUtil.simpleUUID());
|
||||||
jo1.put("location", pointCode);
|
jo1.put("location", pointCode);
|
||||||
jo1.put("operation", "JackLoad");
|
jo1.put("operation", "JackLoad");
|
||||||
// Device device = deviceAppservice.findDeviceByCode(pointCode);
|
inspectInStocckSet(ja, pointCode, jo1);
|
||||||
// StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
|
||||||
// standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver() ;
|
|
||||||
jo1.put("operationArgs", new JSONObject() {{
|
|
||||||
put("recognize", true);
|
|
||||||
}});
|
|
||||||
ja.add(jo1);
|
|
||||||
|
|
||||||
|
|
||||||
JSONObject jo2 = new JSONObject();
|
JSONObject jo2 = new JSONObject();
|
||||||
jo2.put("blockId", IdUtil.simpleUUID());
|
jo2.put("blockId", IdUtil.simpleUUID());
|
||||||
jo2.put("location", pointCode + "OUTGET");
|
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("id", instructionCode);
|
||||||
//动作块
|
//动作块
|
||||||
jo.put("blocks", createBlocksDataTowCCStart(nextPoint));
|
jo.put("blocks", createBlocksDataTowCCStart(nextPoint));
|
||||||
|
//追加订单封口
|
||||||
|
jo.put("complete", true);
|
||||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
.device_code("追加叉车运单")
|
.device_code("追加叉车运单")
|
||||||
.content("指令号:" + instructionCode + ",追加叉车运单参数:" + jo)
|
.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())) {
|
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("blocks", createBlocksDataTowEnd(instructionCode, point, instructionDto));
|
||||||
}
|
}
|
||||||
|
//追加订单封口
|
||||||
|
jo.put("complete", true);
|
||||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||||
.device_code("追加诺宝运单")
|
.device_code("追加诺宝运单")
|
||||||
.content("指令号:" + instructionCode + ",追加诺宝运单参数:" + jo)
|
.content("指令号:" + instructionCode + ",追加诺宝运单参数:" + jo)
|
||||||
@@ -1163,12 +1178,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
|||||||
jo1.put("blockId", IdUtil.simpleUUID());
|
jo1.put("blockId", IdUtil.simpleUUID());
|
||||||
jo1.put("location", startPoint);
|
jo1.put("location", startPoint);
|
||||||
jo1.put("operation", "JackLoad");
|
jo1.put("operation", "JackLoad");
|
||||||
jo1.put("operationArgs", new JSONObject() {{
|
inspectInStocckSet(ja, startPoint, jo1);
|
||||||
put("recognize", true);
|
|
||||||
}});
|
|
||||||
ja.add(jo1);
|
|
||||||
|
|
||||||
|
|
||||||
JSONObject jo2 = new JSONObject();
|
JSONObject jo2 = new JSONObject();
|
||||||
jo2.put("blockId", IdUtil.simpleUUID());
|
jo2.put("blockId", IdUtil.simpleUUID());
|
||||||
jo2.put("location", startPoint + "OUTGET");
|
jo2.put("location", startPoint + "OUTGET");
|
||||||
|
|||||||
Reference in New Issue
Block a user