行架盘点时序变更 条码更新细节修改 任务完成修改

This commit is contained in:
张江玮
2023-01-11 16:13:53 +08:00
parent e749e23a93
commit db73b74654
3 changed files with 11 additions and 7 deletions

View File

@@ -181,10 +181,12 @@ public class HfGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
logServer.deviceInfo("反馈电气信号", this.getDevice_code(), "机械手取货时条码校验失败,开始反馈电气信号");
Instruction instructionDto = instructionService.findByCodeFromCache(String.valueOf(task));
instructionService.cancel(instructionDto.getInstruction_id());
this.writing("to_command", "4");
taskserver.cancel(instructionDto.getTask_id());
this.writing("to_onset", "0");
this.writing("to_target", "0");
this.writing("to_task", "0");
this.writing("to_barcode", "0");
this.writing("to_command", "4");
}
//申请放货
@@ -233,10 +235,11 @@ public class HfGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
}
}
logServer.deviceInfo("反馈电气信号", this.getDevice_code(), "机械手任务完成,开始反馈电气信号");
this.writing("to_command", "0");
this.writing("to_onset", "0");
this.writing("to_target", "0");
this.writing("to_task", "0");
this.writing("to_barcode", "0");
this.writing("to_command", "0");
}
}
}

View File

@@ -672,10 +672,9 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
JSONObject json = (JSONObject) JSONObject.toJSON(entity);
wo.update(json);
removeByCodeFromCache(entity.getTask_code());
Long currentUserId = SecurityUtils.getCurrentUserId();
//判断是否为WMS下发的任务如果是反馈任务状态给WMS
String hasWms = paramService.findByCode(AcsConfig.HASWMS).getValue();
if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1") && ObjectUtil.isNotEmpty(currentUserId)) {
if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) {
TaskFeedbackDto feefbackdto = taskFeedbackService.findByCode(entity.getTask_code());
JSONObject feed_jo = new JSONObject();
feed_jo.put("task_id", entity.getExt_task_id());
@@ -785,10 +784,9 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
if (instdto != null) {
throw new BadRequestException("有指令未完成!");
}
Long currentUserId = SecurityUtils.getCurrentUserId();
//判断是否为WMS下发的任务如果是反馈任务状态给WMS
String hasWms = paramService.findByCode(AcsConfig.HASWMS).getValue();
if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1") && ObjectUtil.isNotEmpty(currentUserId)) {
if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) {
JSONObject feed_jo = new JSONObject();
feed_jo.put("task_id", entity.getExt_task_id());
feed_jo.put("task_code", entity.getTask_code());

View File

@@ -345,11 +345,14 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
//将新的条码 物料等信息更新到到库存表中
StructivtDto structivtDto = structivtService.findByCode(device_code);
structivtDto.setMaterial_id(materialId);
structivtDto.setVehicle_code(barcode);
structivtDto.setIvt_qty(new BigDecimal(ivt_qty));
VehicleDto vehicleDto = vehicleService.findByCode(barcode);
if (ObjectUtil.isNotEmpty(vehicleDto)) {
structivtDto.setVehicle_code(barcode);
structivtDto.setVehicle_type(vehicleDto.getVehicle_type());
} else {
structivtDto.setVehicle_code("");
structivtDto.setVehicle_type("");
}
structivtDto.setUpdate_time(DateUtil.now());
structivtDto.setUpdate_optname("acs");