opt: 添加普通站点取货完成反馈

This commit is contained in:
yanps
2024-06-28 16:04:18 +08:00
parent 5b96e256ad
commit ed59096b16
2 changed files with 31 additions and 7 deletions

View File

@@ -570,15 +570,30 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
logDto.setLog_level(4); logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto); luceneExecuteLogService.deviceExecuteLog(logDto);
} }
String task_code = inst.getTask_code();
EXECUTOR.submit(() -> {
if(ObjectUtil.isNotEmpty(standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("feedbackToLms"))
&& StrUtil.equals("true", standardOrdinarySiteDeviceDriver.getDevice().getExtraValue().get("feedbackToLms").toString())){
JSONObject jsonObject = new JSONObject();
jsonObject.put("task_code", task_code);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(standardOrdinarySiteDeviceDriver.getDevice_code())
.content("取货完成反馈:" + jsonObject.toJSONString() + ";设备:" + standardOrdinarySiteDeviceDriver.getDevice_code())
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
acsToWmsService.actionFinishRequest2(jsonObject);
}
});
this.setPhase(phase); this.setPhase(phase);
} else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) { } else if (device.getDeviceDriver() instanceof ManipulatorAgvStationDeviceDriver) {
manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver(); manipulatorAgvStationDeviceDriver = (ManipulatorAgvStationDeviceDriver) device.getDeviceDriver();
try { /*try {
manipulatorAgvStationDeviceDriver.writing(3); // manipulatorAgvStationDeviceDriver.writing(3);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }*/
data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0); data = ndcAgvService.sendAgvTwoModeInst(phase, index, 0, 0, 0);
LuceneLogDto logDto = LuceneLogDto.builder() LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code) .device_code(device_code)
@@ -588,15 +603,19 @@ public class AgvNdcTwoDeviceDriver extends AbstractDeviceDriver implements Devic
luceneExecuteLogService.deviceExecuteLog(logDto); luceneExecuteLogService.deviceExecuteLog(logDto);
String task_code = inst.getTask_code(); String task_code = inst.getTask_code();
EXECUTOR.submit(() -> { EXECUTOR.submit(() -> {
boolean feedbackToLms = (boolean)manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("feedbackToLms"); if(ObjectUtil.isNotEmpty(manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("feedbackToLms"))
if(feedbackToLms){ && StrUtil.equals("true", manipulatorAgvStationDeviceDriver.getDevice().getExtraValue().get("feedbackToLms").toString())){
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("task_code", task_code); jsonObject.put("task_code", task_code);
LuceneLogDto logDto1 = LuceneLogDto.builder()
.device_code(manipulatorAgvStationDeviceDriver.getDevice_code())
.content("取货完成反馈:" + jsonObject.toJSONString() + ";设备:" + manipulatorAgvStationDeviceDriver.getDevice_code())
.build();
logDto1.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto1);
acsToWmsService.actionFinishRequest2(jsonObject); acsToWmsService.actionFinishRequest2(jsonObject);
} }
}); });
} else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) { } else if (device.getDeviceDriver() instanceof HongXiangStationDeviceDriver) {
hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver(); hongXiangStationDeviceDriver = (HongXiangStationDeviceDriver) device.getDeviceDriver();
try { try {

View File

@@ -38,6 +38,11 @@
<el-switch v-model="form.ignore_release_check" /> <el-switch v-model="form.ignore_release_check" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8">
<el-form-item label="取货完成反馈" label-width="78px">
<el-switch v-model="form.feedbackToLms" />
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row> <el-row>