add:二期流程开发
This commit is contained in:
@@ -644,11 +644,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
JSONObject block = new JSONObject();
|
||||
block.put("blockId", IdUtil.simpleUUID());
|
||||
block.put("location", inst.getStart_point_code() + "INGET");
|
||||
if ("CPJSSX,BZXXL".contains(inst.getStart_device_code())) {
|
||||
block.put("operation", "script");
|
||||
} else {
|
||||
block.put("operation", "ForkHeight");
|
||||
}
|
||||
block.put("operation", "ForkHeight");
|
||||
block.put("id", inst.getStart_point_code() + "INGET");
|
||||
block.put("script_name", "userpy/interact.py");
|
||||
JSONObject scriptArgs = new JSONObject();
|
||||
@@ -666,17 +662,8 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
|
||||
JSONObject block = new JSONObject();
|
||||
block.put("blockId", IdUtil.simpleUUID());
|
||||
// 判断起点是否是钢平台对接点
|
||||
String start_point_code = inst.getStart_point_code();
|
||||
if (start_point_code.equals("GPTDJDIN")) {
|
||||
start_point_code += "1";
|
||||
}
|
||||
block.put("location", start_point_code);
|
||||
block.put("location", inst.getStart_point_code());
|
||||
block.put("binTask", "ForkLoad");
|
||||
// 判断是否是A生产区,并且后缀是 _2 的货位
|
||||
if (start_point_code.contains("A") && start_point_code.endsWith("_2")) {
|
||||
block.put("binTask", "ForkLoad1");
|
||||
}
|
||||
blocks.add(block);
|
||||
|
||||
if ("true".equals(device1.getExtraValue().get("ignore_pickup_check"))) {
|
||||
@@ -684,11 +671,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
block = new JSONObject();
|
||||
block.put("blockId", IdUtil.simpleUUID());
|
||||
block.put("location", inst.getStart_point_code() + "OUTGET");
|
||||
if ("CPJSSX,BZXXL".contains(inst.getStart_device_code())) {
|
||||
block.put("operation", "script");
|
||||
} else {
|
||||
block.put("operation", "ForkHeight");
|
||||
}
|
||||
block.put("operation", "ForkHeight");
|
||||
block.put("id", inst.getStart_point_code() + "OUTGET");
|
||||
block.put("script_name", "userpy/interact.py");
|
||||
JSONObject scriptArgs = new JSONObject();
|
||||
@@ -703,13 +686,6 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
block.put("script_args", scriptArgs);
|
||||
blocks.add(block);
|
||||
} else {
|
||||
if (inst.getStart_point_code().equals("GPTDJDIN") || inst.getStart_point_code().equals("GPTDJDOUT")) {
|
||||
JSONObject block1 = new JSONObject();
|
||||
block1.put("blockId", IdUtil.simpleUUID());
|
||||
block1.put("binTask", "ForkHeight");
|
||||
block1.put("location", start_point_code + "OUTGET");
|
||||
blocks.add(block1);
|
||||
}
|
||||
if (device1.getDeviceDriver() instanceof StandardStorageDeviceDriver) {
|
||||
block = new JSONObject();
|
||||
block.put("binTask", "ForkHeight");
|
||||
@@ -726,11 +702,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
block = new JSONObject();
|
||||
block.put("blockId", IdUtil.simpleUUID());
|
||||
block.put("location", inst.getNext_point_code() + "INPUT");
|
||||
if ("CPJSSX,BZXXL".contains(inst.getNext_device_code())) {
|
||||
block.put("operation", "script");
|
||||
} else {
|
||||
block.put("operation", "ForkHeight");
|
||||
}
|
||||
block.put("operation", "ForkHeight");
|
||||
block.put("id", inst.getNext_point_code() + "INPUT");
|
||||
block.put("script_name", "userpy/interact.py");
|
||||
JSONObject scriptArgs = new JSONObject();
|
||||
@@ -748,26 +720,8 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
|
||||
block = new JSONObject();
|
||||
block.put("blockId", IdUtil.simpleUUID());
|
||||
// 判断终点是不是钢平台对接点
|
||||
String next_point_code = inst.getNext_point_code();
|
||||
if (next_point_code.equals("GPTDJDOUT")) {
|
||||
next_point_code += "1";
|
||||
}
|
||||
block.put("location", next_point_code);
|
||||
block.put("location", inst.getNext_point_code());
|
||||
block.put("binTask", "ForkUnload");
|
||||
|
||||
TaskDto task = taskService.findByCode(inst.getTask_code());
|
||||
if ("CPJSSX,BZXXL".contains(inst.getNext_device_code()) && task.getIs_vehicle().equals("0")) {
|
||||
block.put("binTask", "ForkUnload1");
|
||||
}
|
||||
// 判断是否是A生产区,并且后缀是 _2 的货位(起点是钢平台的则不用带1)
|
||||
if (next_point_code.contains("A") && next_point_code.endsWith("_2")) {
|
||||
if (start_point_code.equals("GPTDJDOUT")) {
|
||||
block.put("binTask", "ForkUnload");
|
||||
} else {
|
||||
block.put("binTask", "ForkUnload1");
|
||||
}
|
||||
}
|
||||
blocks.add(block);
|
||||
|
||||
if ("true".equals(device2.getExtraValue().get("ignore_release_check"))) {
|
||||
@@ -775,11 +729,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
block = new JSONObject();
|
||||
block.put("blockId", IdUtil.simpleUUID());
|
||||
block.put("location", inst.getNext_point_code() + "OUTPUT");
|
||||
if ("CPJSSX,BZXXL".contains(inst.getNext_device_code())) {
|
||||
block.put("operation", "script");
|
||||
} else {
|
||||
block.put("operation", "ForkHeight");
|
||||
}
|
||||
block.put("operation", "ForkHeight");
|
||||
block.put("id", inst.getNext_point_code() + "OUTPUT");
|
||||
block.put("script_name", "userpy/interact.py");
|
||||
JSONObject scriptArgs = new JSONObject();
|
||||
@@ -794,13 +744,6 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
block.put("script_args", scriptArgs);
|
||||
blocks.add(block);
|
||||
} else {
|
||||
if (inst.getNext_point_code().equals("GPTDJDIN") || inst.getNext_point_code().equals("GPTDJDOUT")) {
|
||||
JSONObject block1 = new JSONObject();
|
||||
block1.put("blockId", IdUtil.simpleUUID());
|
||||
block1.put("binTask", "ForkHeight");
|
||||
block1.put("location", next_point_code + "OUTPUT");
|
||||
blocks.add(block1);
|
||||
}
|
||||
if (device2.getDeviceDriver() instanceof StandardStorageDeviceDriver) {
|
||||
block = new JSONObject();
|
||||
block.put("binTask", "ForkHeight");
|
||||
@@ -818,11 +761,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
block = new JSONObject();
|
||||
block.put("blockId", IdUtil.simpleUUID());
|
||||
block.put("location", inst.getStart_point_code2() + "INGET");
|
||||
if ("CPJSSX,BZXXL".contains(inst.getStart_device_code2())) {
|
||||
block.put("operation", "script");
|
||||
} else {
|
||||
block.put("operation", "ForkHeight");
|
||||
}
|
||||
block.put("operation", "ForkHeight");
|
||||
block.put("id", inst.getStart_point_code2() + "INGET");
|
||||
block.put("script_name", "userpy/interact.py");
|
||||
JSONObject scriptArgs = new JSONObject();
|
||||
@@ -842,9 +781,6 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
block.put("blockId", IdUtil.simpleUUID());
|
||||
block.put("location", inst.getStart_point_code2());
|
||||
block.put("binTask", "ForkLoad");
|
||||
// block.put("operationArgs", new JSONObject() {{
|
||||
// put("recognize", true);
|
||||
// }});
|
||||
blocks.add(block);
|
||||
|
||||
if ("true".equals(device3.getExtraValue().get("ignore_pickup_check"))) {
|
||||
@@ -852,11 +788,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
block = new JSONObject();
|
||||
block.put("blockId", IdUtil.simpleUUID());
|
||||
block.put("location", inst.getStart_point_code2() + "OUTGET");
|
||||
if ("CPJSSX,BZXXL".contains(inst.getStart_device_code2())) {
|
||||
block.put("operation", "script");
|
||||
} else {
|
||||
block.put("operation", "ForkHeight");
|
||||
}
|
||||
block.put("operation", "ForkHeight");
|
||||
block.put("id", inst.getStart_point_code2() + "OUTGET");
|
||||
block.put("script_name", "userpy/interact.py");
|
||||
JSONObject scriptArgs = new JSONObject();
|
||||
@@ -889,11 +821,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
block = new JSONObject();
|
||||
block.put("blockId", IdUtil.simpleUUID());
|
||||
block.put("location", inst.getNext_point_code2() + "INPUT");
|
||||
if ("CPJSSX,BZXXL".contains(inst.getNext_device_code2())) {
|
||||
block.put("operation", "script");
|
||||
} else {
|
||||
block.put("operation", "ForkHeight");
|
||||
}
|
||||
block.put("operation", "ForkHeight");
|
||||
block.put("id", inst.getNext_point_code2() + "INPUT");
|
||||
block.put("script_name", "userpy/interact.py");
|
||||
JSONObject scriptArgs = new JSONObject();
|
||||
@@ -920,11 +848,7 @@ public class XianGongAgvServiceImpl implements XianGongAgvService {
|
||||
block = new JSONObject();
|
||||
block.put("blockId", IdUtil.simpleUUID());
|
||||
block.put("location", inst.getNext_point_code2() + "OUTPUT");
|
||||
if ("CPJSSX,BZXXL".contains(inst.getNext_device_code2())) {
|
||||
block.put("operation", "script");
|
||||
} else {
|
||||
block.put("operation", "ForkHeight");
|
||||
}
|
||||
block.put("operation", "ForkHeight");
|
||||
block.put("id", inst.getNext_point_code2() + "OUTPUT");
|
||||
block.put("script_name", "userpy/interact.py");
|
||||
JSONObject scriptArgs = new JSONObject();
|
||||
|
||||
Binary file not shown.
@@ -81,4 +81,14 @@ public class StorageCellDto implements Serializable {
|
||||
* 修改时间
|
||||
*/
|
||||
private String update_time;
|
||||
|
||||
/**
|
||||
* 区域
|
||||
*/
|
||||
private String region_code;
|
||||
|
||||
/**
|
||||
* 关联货位
|
||||
*/
|
||||
private String contact;
|
||||
}
|
||||
|
||||
@@ -545,22 +545,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
if (ObjectUtil.isEmpty(regionEnumList)) {
|
||||
throw new BadRequestException("任务 [" + instdto.getTask_code() + "] 起点或终点没有找到对应AGV类型无法生成指令。");
|
||||
}
|
||||
// 判断是否是AB生产区到地面货架
|
||||
if (regionEnumList.size() > 1) {
|
||||
// 如果是终点是13排的则是PS30车辆
|
||||
if (nextJson.getString("x").equals("13")) {
|
||||
instdto.setMaterial(RegionEnum.AB_DMHJ_ONE.getAgv_type());
|
||||
} else {
|
||||
// 判断终点是否是1层的
|
||||
if (nextJson.getString("z").equals("01")) {
|
||||
instdto.setMaterial(RegionEnum.AB_DMHJ_ONE.getAgv_type());
|
||||
} else {
|
||||
instdto.setMaterial(RegionEnum.AB_DMHJ.getAgv_type());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
instdto.setMaterial(regionEnumList.get(0).getAgv_type());
|
||||
}
|
||||
instdto.setMaterial(regionEnumList.get(0).getAgv_type());
|
||||
this.create(instdto);
|
||||
}
|
||||
|
||||
|
||||
@@ -459,22 +459,8 @@ public class TaskServiceImpl implements TaskService, ApplicationAutoInitial {
|
||||
throw new BadRequestException("任务 [" + taskcode + "] 起点或终点没有找到对应AGV类型无法生成指令。");
|
||||
}
|
||||
|
||||
// 判断是否是AB生产区到地面货架
|
||||
if (regionEnumList.size() > 1) {
|
||||
// 如果是终点是13排的则是PS30车辆
|
||||
if (nextJson.getString("x").equals("13")) {
|
||||
instdto.setMaterial(RegionEnum.AB_DMHJ_ONE.getAgv_type());
|
||||
} else {
|
||||
// 判断终点是否是1层的
|
||||
if (nextJson.getString("z").equals("01")) {
|
||||
instdto.setMaterial(RegionEnum.AB_DMHJ_ONE.getAgv_type());
|
||||
} else {
|
||||
instdto.setMaterial(RegionEnum.AB_DMHJ.getAgv_type());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
instdto.setMaterial(regionEnumList.get(0).getAgv_type());
|
||||
}
|
||||
instdto.setMaterial(regionEnumList.get(0).getAgv_type());
|
||||
|
||||
try {
|
||||
instructionService.create(instdto);
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -32,137 +32,33 @@ import java.util.List;
|
||||
@AllArgsConstructor
|
||||
public enum RegionEnum {
|
||||
|
||||
// AB生产区-->C生产区
|
||||
AB_C("AB", "C","PS20","Group-001"),
|
||||
// A区到E区
|
||||
A_E("A", "E","PS15","Group-005"),
|
||||
|
||||
// AB生产区到-->地面面货架
|
||||
AB_DMHJ("AB", "DMHJ","PS20","Group-001"),
|
||||
// E区到G区
|
||||
E_G("E", "G","PS15","Group-005"),
|
||||
|
||||
// C生产区-->D生产区
|
||||
C_D("C", "D","PS20","Group-001"),
|
||||
// B区到D区
|
||||
B_D("B", "D","PS15","Group-005"),
|
||||
|
||||
// C生产区-->地面货架
|
||||
C_DMHJ("C", "DMHJ","PS20","Group-001"),
|
||||
// B区到C区
|
||||
B_C("B", "C","PS15","Group-005"),
|
||||
|
||||
// 地面货架-->C生产区
|
||||
DMHJ_C("DMHJ", "C","PS20","Group-001"),
|
||||
// C区到C区
|
||||
C_C("C", "C","PS15","Group-005"),
|
||||
|
||||
// D生产区-->地面货架
|
||||
D_DMHJ("D", "DMHJ","PS20","Group-001"),
|
||||
// F区到B区
|
||||
F_B("F", "B","PS15","Group-005"),
|
||||
|
||||
// 地面货架-->拆盘机
|
||||
DMHJ_CPJ("DMHJ", "CPJ","PS20","Group-001"),
|
||||
// F区到H区
|
||||
F_H("F", "H","PS15","Group-005"),
|
||||
|
||||
// AB生产区-->地面货架一层
|
||||
AB_DMHJ_ONE("AB", "DMHJ","PS30","Group-002"),
|
||||
// F区到G区
|
||||
F_G("F", "G","PS15","Group-005"),
|
||||
|
||||
// 地面货架-->AB生产区
|
||||
DMHJ_AB("DMHJ", "AB","PS30","Group-002"),
|
||||
// G区到F区
|
||||
G_F("G", "F","PS15","Group-005"),
|
||||
|
||||
// AB生产区-->钢平台接驳
|
||||
AB_GPTJB("AB", "GPTJB","PS20","Group-001"),
|
||||
|
||||
// 钢平台接驳-->钢平台货架
|
||||
GPTJB_GPTHJ("GPTJB", "GPTHJ","PS10","Group-003"),
|
||||
|
||||
// 钢平台货架-->钢平台接驳
|
||||
GPTHJ_GPTJB("GPTHJ", "GPTJB","PS10","Group-003"),
|
||||
|
||||
// 钢平台接驳-->AB生产区
|
||||
GPTJB_AB("GPTJB", "AB","PS20","Group-001"),
|
||||
|
||||
// 钢平台接驳-->拆盘机
|
||||
GPTJB_CPJ("GPTJB", "CPJ","PS20","Group-001"),
|
||||
|
||||
// 包装线-->拆盘机
|
||||
BZX_CPJ("BZX", "CPJ","PS15","Group-004"),
|
||||
|
||||
// 拆盘机-->良品区
|
||||
CPJ_LPQ("CPJ", "LPQ","PS20","Group-001"),
|
||||
|
||||
// 良品区-->拆盘机
|
||||
LPQ_CPJ("LPQ", "CPJ","PS20","Group-001"),
|
||||
|
||||
// AB生产区-->良品区
|
||||
AB_LPQ("AB", "LPQ","PS20","Group-001"),
|
||||
|
||||
// 良品区-->AB生产区
|
||||
LPQ_AB("LPQ", "AB","PS20","Group-001"),
|
||||
|
||||
// C生产区-->良品区
|
||||
C_LPQ("C", "LPQ","PS20","Group-001"),
|
||||
|
||||
// 良品区-->C生产区
|
||||
LPQ_C("LPQ", "C","PS20","Group-001"),
|
||||
|
||||
// D生产区-->良品区
|
||||
D_LPQ("D", "LPQ","PS20","Group-001"),
|
||||
|
||||
// 良品区-->D生产区
|
||||
LPQ_D("LPQ", "D","PS20","Group-001"),
|
||||
|
||||
// 包装线-->良品区
|
||||
BZX_LPQ("BZX", "LPQ","PS20","Group-001"),
|
||||
|
||||
// 良品区-->包装线
|
||||
LPQ_BZX("LPQ", "BZX","PS20","Group-001"),
|
||||
|
||||
// 地面货架-->良品区
|
||||
DMHJ_LPQ("DMHJ", "LPQ","PS20","Group-001"),
|
||||
|
||||
// 良品区-->地面货架
|
||||
LPQ_DMHJ("LPQ", "DMHJ","PS20","Group-001"),
|
||||
|
||||
// 钢平台接驳-->良品区
|
||||
GPTJB_LPQ("GPTJB", "LPQ","PS20","Group-001"),
|
||||
|
||||
// 良品区-->钢平台接驳
|
||||
LPQ_GPTJB("LPQ", "GPTJB","PS20","Group-001"),
|
||||
|
||||
// AB生产区-->AB生产区
|
||||
AB_AB("AB", "AB","PS20","Group-001"),
|
||||
|
||||
// C生产区-->C生产区
|
||||
C_C("C", "C","PS20","Group-001"),
|
||||
|
||||
// D生产区-->D生产区
|
||||
D_D("D", "D","PS20","Group-001"),
|
||||
|
||||
// 良品区-->良品区
|
||||
LPQ_LPQ("LPQ", "LPQ","PS20","Group-001"),
|
||||
|
||||
// 地面货架-->地面货架
|
||||
DMHJ_DMHJ("DMHJ", "DMHJ","PS20","Group-001"),
|
||||
|
||||
// 钢平台货架-->钢平台货架
|
||||
GPTHJ_GPTHJ("GPTHJ", "GPTHJ","PS10","Group-003"),
|
||||
|
||||
// 拆盘机输送线-->空托盘
|
||||
CPJ_KPT("CPJ", "KTP","PS15","Group-004"),
|
||||
|
||||
// AB生产区-->拆盘机输送线
|
||||
AB_CPJ("AB", "CPJ","PS20","Group-001"),
|
||||
|
||||
// 拆盘机输送线--> 空托盘拆盘机
|
||||
CPJ_KTPCPJ("CPJ", "KTPCPJ","PS15","Group-004"),
|
||||
|
||||
// 空托盘缓存--> 空托盘拆盘机
|
||||
KTP_KTPCPJ("KTP", "KTPCPJ","PS15","Group-004"),
|
||||
|
||||
// 包装线--> 满托缓存位
|
||||
BZX_MTHC("BZX", "MTHC","PS15","Group-004"),
|
||||
|
||||
// 满托缓存--> 拆盘机输送线
|
||||
MTHC_CPJ("MTHC", "CPJ","PS15","Group-004"),
|
||||
|
||||
// 拆盘机输送线--> 玻璃纤维区域
|
||||
CPJ_BLXW("CPJ", "BLXW","PS15","Group-004"),
|
||||
|
||||
// 拆盘机输送线--> 环氧树脂区域
|
||||
CPJ_HYSZ("CPJ", "HYSZ","PS15","Group-004"),
|
||||
|
||||
// 拆盘机输送线--> 固化剂区域
|
||||
CPJ_GHJ("CPJ", "GHJ","PS15","Group-004"),
|
||||
;
|
||||
|
||||
// 起点区域
|
||||
|
||||
@@ -8,6 +8,8 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.nl.acs.config.AcsConfig;
|
||||
import org.nl.acs.device.service.StorageCellService;
|
||||
import org.nl.acs.device.service.dto.StorageCellDto;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
import org.nl.acs.opc.Device;
|
||||
@@ -46,30 +48,44 @@ public class AutoCreateInst {
|
||||
ParamService acsConfigService = SpringContextHolder.getBean(ParamService.class);
|
||||
// 设备接口
|
||||
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
|
||||
// 货位接口
|
||||
StorageCellService storageCellService = SpringContextHolder.getBean(StorageCellService.class);
|
||||
|
||||
// 查询所有就绪的任务
|
||||
List<TaskDto> list = taskserver.findReadyTask();
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
TaskDto acsTask = list.get(i);
|
||||
// 起点或者是终点是钢平台货架的 只能同时支持一个入一个出
|
||||
String startPoint = acsTask.getStart_device_code();
|
||||
String nextPoint = acsTask.getNext_device_code();
|
||||
if (startPoint.startsWith("L")) {
|
||||
// 如果有深浅的货位需要判断对应关联货位,只允许一个任务执行
|
||||
List<StorageCellDto> storageCellDtos = storageCellService.queryAll(null);
|
||||
StorageCellDto startPoint = storageCellDtos.stream()
|
||||
.filter(row -> row.getStorage_code().equals(acsTask.getStart_device_code()))
|
||||
.findFirst().orElse(null);
|
||||
|
||||
StorageCellDto nextPoint = storageCellDtos.stream()
|
||||
.filter(row -> row.getStorage_code().equals(acsTask.getNext_device_code()))
|
||||
.findFirst().orElse(null);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(startPoint.getContact())) {
|
||||
// 查询所有执行中的任务
|
||||
List<TaskDto> readyExTask = taskserver.findReadyExTask();
|
||||
// 判断执行中的任务有没有起点是钢平台的
|
||||
// 判断执行中的任务
|
||||
boolean isStart = readyExTask.stream()
|
||||
.anyMatch(row -> row.getStart_device_code().startsWith("L"));
|
||||
.anyMatch(row -> startPoint.getContact().contains(row.getStart_device_code())
|
||||
|| startPoint.getContact().contains(row.getNext_device_code())
|
||||
);
|
||||
if (isStart) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (nextPoint.startsWith("L")) {
|
||||
|
||||
if (ObjectUtil.isNotEmpty(nextPoint.getContact())) {
|
||||
// 查询所有执行中的任务
|
||||
List<TaskDto> readyExTask = taskserver.findReadyExTask();
|
||||
// 判断执行中的任务有没有终点是钢平台的
|
||||
// 判断执行中的任务
|
||||
boolean isEnd = readyExTask.stream()
|
||||
.anyMatch(row -> row.getNext_device_code().startsWith("L"));
|
||||
.anyMatch(row -> nextPoint.getContact().contains(row.getStart_device_code())
|
||||
|| nextPoint.getContact().contains(row.getNext_device_code())
|
||||
);
|
||||
if (isEnd) {
|
||||
continue;
|
||||
}
|
||||
@@ -212,22 +228,7 @@ public class AutoCreateInst {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 判断是否是AB生产区到地面货架
|
||||
if (regionEnumList.size() > 1) {
|
||||
// 如果是终点是13排的则是PS30车辆
|
||||
if (nextJson.getString("x").equals("13")) {
|
||||
instdto.setMaterial(RegionEnum.AB_DMHJ_ONE.getAgv_type());
|
||||
} else {
|
||||
// 判断终点是否是1层的
|
||||
if (nextJson.getString("z").equals("01")) {
|
||||
instdto.setMaterial(RegionEnum.AB_DMHJ_ONE.getAgv_type());
|
||||
} else {
|
||||
instdto.setMaterial(RegionEnum.AB_DMHJ.getAgv_type());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
instdto.setMaterial(regionEnumList.get(0).getAgv_type());
|
||||
}
|
||||
instdto.setMaterial(regionEnumList.get(0).getAgv_type());
|
||||
|
||||
try {
|
||||
instructionService.create(instdto);
|
||||
|
||||
Reference in New Issue
Block a user