rev:优化拔前行架任务下发以及手动创建指令
This commit is contained in:
@@ -360,9 +360,11 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
}*/
|
||||
if (startdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) startdevice.getDeviceDriver();
|
||||
if (standardInspectSiteDeviceDriver.getMove() != 1) {
|
||||
notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位-烘箱对接位:" + standardInspectSiteDeviceDriver.getDevicecode() + "无货,无法下发指令!指令号:" + instruction.getInstruction_code();
|
||||
return false;
|
||||
if (ObjectUtil.equal("true", standardInspectSiteDeviceDriver.getExtraValue().get("input_move"))) {
|
||||
if (standardInspectSiteDeviceDriver.getMove() != 1) {
|
||||
notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位-烘箱对接位:" + standardInspectSiteDeviceDriver.getDevicecode() + "无货,无法下发指令!指令号:" + instruction.getInstruction_code();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (startdevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||
@@ -375,9 +377,11 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
|
||||
if (nextdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) nextdevice.getDeviceDriver();
|
||||
if (standardInspectSiteDeviceDriver.getMove() != 0) {
|
||||
notCreateInstMessage = "手动创建指令未下发电气信号原因->放货位-烘箱对接位:" + standardInspectSiteDeviceDriver.getDevicecode() + "有货,无法下发指令!指令号:" + instruction.getInstruction_code();
|
||||
return false;
|
||||
if (ObjectUtil.equal("true", standardInspectSiteDeviceDriver.getExtraValue().get("input_move"))) {
|
||||
if (standardInspectSiteDeviceDriver.getMove() != 0) {
|
||||
notCreateInstMessage = "手动创建指令未下发电气信号原因->放货位-烘箱对接位:" + standardInspectSiteDeviceDriver.getDevicecode() + "有货,无法下发指令!指令号:" + instruction.getInstruction_code();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nextdevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||
@@ -503,9 +507,11 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
}*/
|
||||
if (startdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) startdevice.getDeviceDriver();
|
||||
if (standardInspectSiteDeviceDriver.getMove() != 1) {
|
||||
notCreateInstMessage = "就绪任务未创建指令原因->取货位-烘箱对接位:" + standardInspectSiteDeviceDriver.getDevicecode() + "光电无货,无法生成指令!";
|
||||
return false;
|
||||
if (ObjectUtil.equal("true", standardInspectSiteDeviceDriver.getExtraValue().get("input_move"))) {
|
||||
if (standardInspectSiteDeviceDriver.getMove() != 1) {
|
||||
notCreateInstMessage = "就绪任务未创建指令原因->取货位-烘箱对接位:" + standardInspectSiteDeviceDriver.getDevicecode() + "光电无货,无法生成指令!";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (startdevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||
@@ -525,9 +531,11 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
}
|
||||
if (nextdevice.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) nextdevice.getDeviceDriver();
|
||||
if (standardInspectSiteDeviceDriver.getMove() != 0) {
|
||||
notCreateInstMessage = "就绪任务未创建指令原因->放货位-烘箱对接位:" + standardInspectSiteDeviceDriver.getDevicecode() + "光电有货,无法生成指令!";
|
||||
return false;
|
||||
if (ObjectUtil.equal("true", standardInspectSiteDeviceDriver.getExtraValue().get("input_move"))) {
|
||||
if (standardInspectSiteDeviceDriver.getMove() != 0) {
|
||||
notCreateInstMessage = "就绪任务未创建指令原因->放货位-烘箱对接位:" + standardInspectSiteDeviceDriver.getDevicecode() + "光电有货,无法生成指令!";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -224,7 +224,6 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
if (inst != null) {
|
||||
if (StrUtil.equals(inst.getInstruction_status(), InstructionStatusEnum.BUSY.getIndex())) {
|
||||
try {
|
||||
TaskDto dto = taskserver.findByCode(inst.getTask_code());
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
/*if (ObjectUtil.isNotEmpty(dto)){
|
||||
String interaction_json = dto.getInteraction_json();
|
||||
@@ -257,11 +256,11 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
|
||||
if (mode == 0) {
|
||||
this.setIsonline(false);
|
||||
message = LangProcess.msg("universal_off-line");
|
||||
message = "universal_off-line";
|
||||
//有报警
|
||||
} else if (error != 0) {
|
||||
this.setIserror(true);
|
||||
message = LangProcess.msg("universal_message3");
|
||||
message = "universal_message3";
|
||||
//无报警
|
||||
} else {
|
||||
this.setIsonline(true);
|
||||
@@ -337,6 +336,7 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
//放货工位
|
||||
List<String> putDeviceCodeList = this.getExtraDeviceCodes("put_device_code");
|
||||
TaskDto task = null;
|
||||
PlugPullDeviceSiteDeviceDriver plugPullDeviceSiteDeviceDriver;
|
||||
for (int i = 0; i < getDeviceCodeList.size(); i++) {
|
||||
String startDeviceCode = getDeviceCodeList.get(i);
|
||||
List<TaskDto> taskDtos = taskserver.queryTaskByDeviceCodeAndStatus(startDeviceCode);
|
||||
@@ -344,6 +344,22 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
//按照优先级排序 优先级相等按照创建时间排序
|
||||
taskDtos = this.sortTask(taskDtos);
|
||||
TaskDto taskDto = taskDtos.get(0);
|
||||
String startPoint = task.getStart_device_code();
|
||||
Device startPointDevice = deviceAppService.findDeviceByCode(startPoint);
|
||||
if (startPointDevice.getDeviceDriver() instanceof PlugPullDeviceSiteDeviceDriver) {
|
||||
plugPullDeviceSiteDeviceDriver = (PlugPullDeviceSiteDeviceDriver) startPointDevice.getDeviceDriver();
|
||||
if (plugPullDeviceSiteDeviceDriver.getAction() != 1&&plugPullDeviceSiteDeviceDriver.getAction() != 3)
|
||||
notCreateInstMessage = "universal_notCreateInstMessage9";
|
||||
return false;
|
||||
}
|
||||
String nextDeviceCode = taskDto.getNext_device_code();
|
||||
Device device = deviceAppService.findDeviceByCode(nextDeviceCode);
|
||||
if (device.getDeviceDriver() instanceof PlugPullDeviceSiteDeviceDriver) {
|
||||
plugPullDeviceSiteDeviceDriver = (PlugPullDeviceSiteDeviceDriver) device.getDeviceDriver();
|
||||
if (plugPullDeviceSiteDeviceDriver.getMode() != 2 || plugPullDeviceSiteDeviceDriver.getMove() != 0 || plugPullDeviceSiteDeviceDriver.getAction() != 2&&plugPullDeviceSiteDeviceDriver.getAction() != 3)
|
||||
notCreateInstMessage = "universal_notCreateInstMessage9";
|
||||
return false;
|
||||
}
|
||||
Instruction instruction = instructionService.findByTaskcode(taskDto.getTask_code());
|
||||
String startCode = instruction.getStart_device_code();
|
||||
String nextCode = instruction.getNext_device_code();
|
||||
@@ -380,12 +396,20 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
}
|
||||
}
|
||||
if (!ObjectUtil.isEmpty(task)) {
|
||||
String startDeviceCode = task.getStart_device_code();
|
||||
Device start_device = deviceAppService.findDeviceByCode(startDeviceCode);
|
||||
if (start_device.getDeviceDriver() instanceof PlugPullDeviceSiteDeviceDriver) {
|
||||
plugPullDeviceSiteDeviceDriver = (PlugPullDeviceSiteDeviceDriver) start_device.getDeviceDriver();
|
||||
if (plugPullDeviceSiteDeviceDriver.getAction() != 1&&plugPullDeviceSiteDeviceDriver.getAction() != 3)
|
||||
notCreateInstMessage = "universal_notCreateInstMessage9";
|
||||
return false;
|
||||
}
|
||||
String nextDeviceCode = task.getNext_device_code();
|
||||
Device device = deviceAppService.findDeviceByCode(nextDeviceCode);
|
||||
PlugPullDeviceSiteDeviceDriver plugPullDeviceSiteDeviceDriver;
|
||||
if (device.getDeviceDriver() instanceof PlugPullDeviceSiteDeviceDriver) {
|
||||
plugPullDeviceSiteDeviceDriver = (PlugPullDeviceSiteDeviceDriver) device.getDeviceDriver();
|
||||
if (plugPullDeviceSiteDeviceDriver.getMode() != 2 && plugPullDeviceSiteDeviceDriver.getMove() != 0 && plugPullDeviceSiteDeviceDriver.getAction() != 1)
|
||||
Device next_device = deviceAppService.findDeviceByCode(nextDeviceCode);
|
||||
if (next_device.getDeviceDriver() instanceof PlugPullDeviceSiteDeviceDriver) {
|
||||
plugPullDeviceSiteDeviceDriver = (PlugPullDeviceSiteDeviceDriver) next_device.getDeviceDriver();
|
||||
if (plugPullDeviceSiteDeviceDriver.getMode() != 2 || plugPullDeviceSiteDeviceDriver.getMove() != 0 || plugPullDeviceSiteDeviceDriver.getAction() != 2&&plugPullDeviceSiteDeviceDriver.getAction() != 3)
|
||||
notCreateInstMessage = "universal_notCreateInstMessage9";
|
||||
return false;
|
||||
}
|
||||
String taskId = task.getTask_id();
|
||||
@@ -393,11 +417,9 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
String vehicleCode = task.getVehicle_code();
|
||||
String priority = task.getPriority();
|
||||
String startPointCode = task.getStart_point_code();
|
||||
String startDeviceCode = task.getStart_device_code();
|
||||
String routePlanCode = task.getRoute_plan_code();
|
||||
String nextPointCode = task.getNext_point_code();
|
||||
|
||||
|
||||
Instruction instdto = new Instruction();
|
||||
instdto.setInstruction_id(IdUtil.simpleUUID());
|
||||
instdto.setRoute_plan_code(routePlanCode);
|
||||
@@ -680,8 +702,8 @@ public class PullHeadManipulatorDeviceDriver extends AbstractOpcDeviceDriver imp
|
||||
map.put("is_click", true);
|
||||
map.put("message", message);
|
||||
map.put("error", ErrorUtil.getDictDetail("error_type", String.valueOf(this.getError())));
|
||||
map.put("notCreateTaskMessage", notCreateTaskMessage);
|
||||
map.put("notCreateInstMessage", notCreateInstMessage);
|
||||
map.put("notCreateTaskMessage", LangProcess.msg(notCreateTaskMessage));
|
||||
map.put("notCreateInstMessage", LangProcess.msg(notCreateInstMessage));
|
||||
/*jo.put("x", xPosition);
|
||||
jo.put("y", yPosition);*/
|
||||
JSONObject jo = new JSONObject(map);
|
||||
|
||||
@@ -562,6 +562,16 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
if (regional(dto.getStart_device_code(), dto.getNext_device_code())) {
|
||||
throw new BadRequestException(LangProcess.msg("error_regional_max"));
|
||||
}
|
||||
|
||||
String start_device_code = dto.getStart_device_code();
|
||||
if (StrUtil.isNotEmpty(dto.getTask_code())) {
|
||||
List<InstructionMybatis> instructionMybatis = instructionMapper.selectList(Wrappers.lambdaQuery(InstructionMybatis.class)
|
||||
.eq(InstructionMybatis::getTask_code, dto.getTask_code()));
|
||||
if (CollUtil.isNotEmpty(instructionMybatis) && instructionMybatis.stream().anyMatch(inst -> inst.getStart_device_code()
|
||||
.equals(start_device_code))) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
String currentUsername = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
if (StrUtil.isEmpty(dto.getRoute_plan_code())) {
|
||||
@@ -582,14 +592,22 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
if (StrUtil.isEmpty(dto.getLink_num())) {
|
||||
dto.setIs_send(task.getLink_num());
|
||||
}
|
||||
if (task.getTask_type().equals(CommonFinalParam.ONE) || "2".equals(task.getTask_type())) {
|
||||
dto.setInstruction_type(task.getTask_type());
|
||||
} else if (false) {
|
||||
|
||||
} else {
|
||||
dto.setInstruction_type("3");
|
||||
}
|
||||
// if (task.getTask_type().equals(CommonFinalParam.ONE) || task.getTask_type().equals("2")) {
|
||||
dto.setInstruction_type(task.getTask_type());
|
||||
// } else if (false) {
|
||||
//
|
||||
// } else {
|
||||
// dto.setInstruction_type("3");
|
||||
// }
|
||||
|
||||
// 查询是否存在相同指令号
|
||||
// if (!StrUtil.isEmpty(dto.getVehicle_code() )) {
|
||||
// Instruction inst_dto = findByContainer(dto.getVehicle_code());
|
||||
// if (inst_dto != null) {
|
||||
// log.error("存在相同载具号任务,载具号"+dto.getVehicle_code());
|
||||
// throw new BadRequestException("存在相同载具号任务!");
|
||||
// }
|
||||
// }
|
||||
// 起点设备与终点设备相同则为初始指令
|
||||
if (StrUtil.equals(task.getStart_device_code(), dto.getStart_device_code())) {
|
||||
if (!StrUtil.equals(dto.getCompound_inst(), "0")
|
||||
@@ -598,12 +616,8 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
dto.setCompound_inst_data(task.getCompound_task_data());
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(currentUsername)) {
|
||||
dto.setCreate_by(currentUsername);
|
||||
}
|
||||
if (StringUtils.isNotBlank(currentUsername)) {
|
||||
dto.setUpdate_by(currentUsername);
|
||||
}
|
||||
dto.setCreate_by(ObjectUtil.isNotEmpty(currentUsername) ? currentUsername : "admin");
|
||||
dto.setUpdate_by(ObjectUtil.isNotEmpty(currentUsername) ? currentUsername : "admin");
|
||||
dto.setUpdate_time(now);
|
||||
dto.setCreate_time(now);
|
||||
dto.setStart_parent_code(task.getStart_parent_code());
|
||||
@@ -615,18 +629,12 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
|
||||
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
|
||||
Device startdevice = appService.findDeviceByCode(dto.getStart_device_code());
|
||||
Device nextdevice = appService.findDeviceByCode(dto.getNext_device_code());
|
||||
|
||||
HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver;
|
||||
StandardCoveyorControlWithScannerDeviceDriver standardCoveyorControlWithScannerDeviceDriver;
|
||||
|
||||
if (startdevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) {
|
||||
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) startdevice.getDeviceDriver();
|
||||
hongXiangConveyorDeviceDriver.writing("3", dto.getInstruction_code());
|
||||
}
|
||||
|
||||
try {
|
||||
String start_device_code = dto.getStart_device_code();
|
||||
/*String start_device_code = dto.getStart_device_code();*/
|
||||
String next_device_code = dto.getNext_device_code();
|
||||
String route_plan_code = task.getRoute_plan_code();
|
||||
List<RouteLineDto> shortPathsList =
|
||||
@@ -642,16 +650,30 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ObjectUtil.isEmpty(route) && !(start_device_code.equals(next_device_code))) {
|
||||
if (ObjectUtil.isEmpty(route) && (!start_device_code.equals(next_device_code))) {
|
||||
throw new BadRequestException(LangProcess.msg("error_isNull", "route"));
|
||||
}
|
||||
if (StrUtil.equals(shortPathsList.get(0).getType(), CommonFinalParam.ONE)) {
|
||||
if (shortPathsList.size() > 0 && StrUtil.equals(shortPathsList.get(0).getType(), CommonFinalParam.ONE) && dto.getAgv_system_type().equals(AgvSystemTypeEnum.Two_NDC_System_Type.getIndex())) {
|
||||
// 0为输送、立库任务 1 1楼叉车系统 2 2楼1区域AGV系统 3 2楼2区域AGV系统
|
||||
if (!StrUtil.equals(task.getAgv_system_type(), "0")
|
||||
&& ObjectUtil.isNotEmpty(task.getAgv_system_type())) {
|
||||
NDCAgvService ndcAgvService = SpringContextHolder.getBean(NDCAgvService.class);
|
||||
ndcAgvService.sendAgvInstToNDC(task.getAgv_system_type(), dto);
|
||||
log.warn("下发AGV指令数据," + "指令号:" + dto.getInstruction_code() + ",AGV系统类型:" + dto.getAgv_system_type()
|
||||
+ ",AGV指令类型:" + dto.getInstruction_type());
|
||||
try {
|
||||
if (StrUtil.isEmpty(dto.getAgv_inst_type()) || StrUtil.isEmpty(dto.getAgv_system_type())) {
|
||||
log.info("sendAgvInstToNDC 指令校验:" + dto.getInstruction_code() + ",inst_type:" + dto.getInstruction_type()
|
||||
+ ",inst_system_type:" + dto.getAgv_system_type());
|
||||
}
|
||||
ndcAgvService.sendAgvInstToNDC(task.getAgv_system_type(), dto);
|
||||
} catch (Exception e) {
|
||||
dto.setSend_status("2");
|
||||
dto.setRemark(e.getMessage());
|
||||
e.printStackTrace();
|
||||
log.warn("下发AGV指令异常:" + e);
|
||||
}
|
||||
} else {
|
||||
// Boolean result = createLkInst(task.getStorage_task_type(),dto);
|
||||
Resp resp = acsToLiKuService.sendInst(task.getStorage_task_type(), dto);
|
||||
if (StrUtil.equals(resp.result, "true")) {
|
||||
dto.setSend_status("1");
|
||||
@@ -660,11 +682,53 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
}
|
||||
}
|
||||
}
|
||||
//判断是否是仙工AGV
|
||||
if (shortPathsList.size() > 0 && StrUtil.equals(shortPathsList.get(0).getType(), CommonFinalParam.ONE)) {
|
||||
Device deviceByCode = deviceAppService.findDeviceByCode(dto.getStart_device_code());
|
||||
// if (StrUtil.equals(task.getRequest_again_success(), "1")) {
|
||||
// //追加订单
|
||||
// HttpResponse result = xiangGongAgvService.addOrderSequences(dto);
|
||||
// if (ObjectUtils.isEmpty(result) || result.getStatus() != 200) {
|
||||
// dto.setSend_status("2");
|
||||
// } else {
|
||||
// dto.setSend_status("1");
|
||||
// }
|
||||
//
|
||||
// } else
|
||||
if (dto.getAgv_system_type().equals(AgvSystemTypeEnum.XG_System_Type.getIndex())) {
|
||||
String interactionJson = task.getInteraction_json();
|
||||
if (StrUtil.isNotEmpty(interactionJson)){
|
||||
throw new BadRequestException("agv叉车调整长宽参数为空");
|
||||
}
|
||||
InteractionJsonDTO interactionJsonDTO = JSON.parseObject(interactionJson, InteractionJsonDTO.class);
|
||||
//仙工叉车
|
||||
HttpResponse response = xiangGongAgvService.sendOrderSequencesToForklift(dto,interactionJsonDTO);
|
||||
if (ObjectUtils.isEmpty(response) || response.getStatus() != 200) {
|
||||
dto.setSend_status("2");
|
||||
} else {
|
||||
dto.setSend_status("1");
|
||||
}
|
||||
} else if (dto.getAgv_system_type().equals(AgvSystemTypeEnum.One_NDC_System_Type.getIndex())) {
|
||||
//一楼agv任务创建运单序列
|
||||
HttpResponse response = xiangGongAgvService.sendOrderSequencesToXZ(dto);
|
||||
if (ObjectUtils.isEmpty(response) || response.getStatus() != 200) {
|
||||
dto.setSend_status("2");
|
||||
} else {
|
||||
dto.setSend_status("1");
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
dto.setSend_status("2");
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage());
|
||||
LuceneLogDto logDto = LuceneLogDto.builder()
|
||||
.device_code("创建指令报错")
|
||||
.content("任务号" + dto.getTask_code() + "报错原因:" + e.getMessage())
|
||||
.build();
|
||||
logDto.setLog_level(2);
|
||||
luceneExecuteLogService.deviceExecuteLog(logDto);
|
||||
throw e;
|
||||
}
|
||||
|
||||
InstructionMybatis entity = ConvertUtil.convert(dto, InstructionMybatis.class);
|
||||
instructionMapper.insert(entity);
|
||||
instructions.add(dto);
|
||||
|
||||
@@ -901,6 +901,8 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
String next_point_code2 = acsTask.getNext_point_code2();
|
||||
String agv_system_type = acsTask.getAgv_system_type();
|
||||
String task_type = acsTask.getTask_type();
|
||||
String start_height = acsTask.getStart_height();
|
||||
String next_height = acsTask.getNext_height();
|
||||
/** 开始平均分解校验 */
|
||||
String this_device_code =
|
||||
this.queryAssignedByDevice(acsTask.getStart_device_code(), acsTask.getNext_device_code());
|
||||
@@ -962,31 +964,37 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
instdto.setNext_device_code2(next_point_code2);
|
||||
instdto.setNext_point_code2(next_point_code2);
|
||||
instdto.setAgv_system_type(agv_system_type);
|
||||
instdto.setAgv_inst_type(CommonFinalParam.ONE);
|
||||
instdto.setStart_height(start_height);
|
||||
instdto.setNext_height(next_height);
|
||||
|
||||
if (!StrUtil.equals(agv_system_type, "1")) {
|
||||
//判断agv系统
|
||||
//1、1楼叉车系统
|
||||
//2、2楼1区域AGV系统
|
||||
//3、2楼2区域AGV系统 -已废弃
|
||||
if (StrUtil.equals(agv_system_type, CommonFinalParam.TWO)) {
|
||||
// task_type
|
||||
// 1、生箔; Itype=1:取空,取满,放空,放满;
|
||||
// 2、分切 Itype=3取满、取空、放满、放空;
|
||||
// 3、普通任务 Itype=2:取货、放货;
|
||||
// 4、叉车任务
|
||||
// 5、输送任务
|
||||
// 6、行架
|
||||
// 7、立库
|
||||
if (StrUtil.equals(task_type, "1")) {
|
||||
instdto.setAgv_inst_type("1");
|
||||
//1、生箔; Itype=1:取空,取满,放空,放满;
|
||||
//2、分切 Itype=3取满、取空、放满、放空;
|
||||
//3、普通任务 Itype=2:取货、放货;
|
||||
//4、叉车任务
|
||||
//5、输送任务
|
||||
//6、行架
|
||||
//7、立库
|
||||
if (StrUtil.equals(task_type, CommonFinalParam.ONE)) {
|
||||
instdto.setAgv_inst_type(CommonFinalParam.ONE);
|
||||
} else if (StrUtil.equals(task_type, "3")) {
|
||||
instdto.setAgv_inst_type("2");
|
||||
} else if (StrUtil.equals(task_type, "2")) {
|
||||
instdto.setAgv_inst_type("3");
|
||||
} else if (StrUtil.equals(task_type, "8")) {
|
||||
instdto.setAgv_inst_type("2");
|
||||
} else {
|
||||
log.info("未找到对应的AGV指令类型,任务号:" + acsTask.getTask_code() + ",task_type:" + acsTask.getTask_type());
|
||||
}
|
||||
} else {
|
||||
instdto.setAgv_inst_type("4");
|
||||
}
|
||||
instructionservice.create2(instdto);
|
||||
|
||||
acsTask.setTask_status(CommonFinalParam.ONE);
|
||||
this.update(acsTask);
|
||||
return instdto;
|
||||
|
||||
Reference in New Issue
Block a user