add: 测试新添内容

This commit is contained in:
ls
2024-09-18 14:26:11 +08:00
parent e56a6505bc
commit 84e54c0c27
4 changed files with 25 additions and 18 deletions

View File

@@ -74,11 +74,10 @@ public class NDCAgvServiceImpl implements NDCAgvService {
} }
@Override @Override
public void sendAgvInstToNDC(String agv_system_type, Instruction inst) { public void sendAgvInstToNDC(String agv_system_type, Instruction inst) {
log.info("sendAgvInstToNDC 指令下发NDC:" + "inst_code:" + inst.getInstruction_code() + ",agv_system_type:" + agv_system_type + ",agv_inst_type:" + inst.getAgv_inst_type() + log.info("sendAgvInstToNDC 指令下发NDC:" + "inst_code:" + inst.getInstruction_code() + ",agv_system_type:" + agv_system_type + ",agv_inst_type:" + inst.getAgv_inst_type() +
",priority:" + inst.getPriority() + ",startAddress:" + inst.getStart_point_code() + ",priority:" + inst.getPriority() + ",startAddress:" + inst.getStart_point_code() +
",nextAddress:" + inst.getNext_point_code()); ",nextAddress:" + inst.getNext_point_code());
if (StrUtil.equals(paramService.findByCode(AcsConfig.FORKAGV).getValue(), "1")) { if (StrUtil.equals(paramService.findByCode(AcsConfig.FORKAGV).getValue(), "1")) {
if (!StrUtil.equals(agv_system_type, "1")) { if (!StrUtil.equals(agv_system_type, "1")) {
@@ -104,6 +103,12 @@ public class NDCAgvServiceImpl implements NDCAgvService {
byte fhdhigh2 = (byte) IntToHexHigh(nextAddress2); byte fhdhigh2 = (byte) IntToHexHigh(nextAddress2);
byte fhdlow2 = (byte) IntToHexLow(nextAddress2); byte fhdlow2 = (byte) IntToHexLow(nextAddress2);
byte prioritylow = (byte) IntToHexLow(priority); byte prioritylow = (byte) IntToHexLow(priority);
byte carnohigh = 0X00;
byte carnolow = 0X00;
if (StrUtil.isNotEmpty(inst.getCarno())) {
carnohigh = (byte) IntToHexHigh(Integer.parseInt(inst.getCarno()));
carnolow = (byte) IntToHexLow(Integer.parseInt(inst.getCarno()));
}
String str = "十进制下发:"; String str = "十进制下发:";
String str1 = "十六进制下发:"; String str1 = "十六进制下发:";
@@ -130,10 +135,10 @@ public class NDCAgvServiceImpl implements NDCAgvService {
if (type == 1) { if (type == 1) {
b = new byte[]{(byte) 0X87, (byte) 0XCD, b = new byte[]{(byte) 0X87, (byte) 0XCD,
(byte) 0X00, (byte) 0X08, (byte) 0X00, (byte) 0X08,
(byte) 0X00, (byte) 0X16, (byte) 0X00, (byte) 0X18,
(byte) 0X00, (byte) 0X01, (byte) 0X00, (byte) 0X01,
(byte) 0X00, (byte) 0X71, (byte) 0X00, (byte) 0X71,
(byte) 0X00, (byte) 0X12, (byte) 0X00, (byte) 0X14,
(byte) 0X01, prioritylow, (byte) 0X01, prioritylow,
(byte) 0X00, (byte) 0X01, (byte) 0X00, (byte) 0X01,
(byte) ikeyhigh, (byte) ikeylow, (byte) ikeyhigh, (byte) ikeylow,
@@ -141,16 +146,17 @@ public class NDCAgvServiceImpl implements NDCAgvService {
(byte) typehigh, (byte) typelow, (byte) typehigh, (byte) typelow,
(byte) qhdhigh, (byte) qhdlow, (byte) qhdhigh, (byte) qhdlow,
(byte) qhdhigh2, (byte) qhdlow2, (byte) qhdhigh2, (byte) qhdlow2,
(byte) fhdhigh, (byte) fhdlow, (byte) fhdhigh2, (byte) fhdlow2,
(byte) fhdhigh2, (byte) fhdlow2 (byte) 0X00, (byte) 0X00,
(byte) carnohigh, (byte) carnolow
}; };
} else if (type == 2) { } else if (type == 2) {
b = new byte[]{(byte) 0X87, (byte) 0XCD, b = new byte[]{(byte) 0X87, (byte) 0XCD,
(byte) 0X00, (byte) 0X08, (byte) 0X00, (byte) 0X08,
(byte) 0X00, (byte) 0X16, (byte) 0X00, (byte) 0X18,
(byte) 0X00, (byte) 0X01, (byte) 0X00, (byte) 0X01,
(byte) 0X00, (byte) 0X71, (byte) 0X00, (byte) 0X71,
(byte) 0X00, (byte) 0X12, (byte) 0X00, (byte) 0X14,
(byte) 0X01, prioritylow, (byte) 0X01, prioritylow,
(byte) 0X00, (byte) 0X01, (byte) 0X00, (byte) 0X01,
(byte) ikeyhigh, (byte) ikeylow, (byte) ikeyhigh, (byte) ikeylow,
@@ -159,7 +165,8 @@ public class NDCAgvServiceImpl implements NDCAgvService {
(byte) qhdhigh, (byte) qhdlow, (byte) qhdhigh, (byte) qhdlow,
(byte) 0X00, (byte) 0X00, (byte) 0X00, (byte) 0X00,
(byte) fhdhigh, (byte) fhdlow, (byte) fhdhigh, (byte) fhdlow,
(byte) 0X00, (byte) 0X00 (byte) 0X00, (byte) 0X00,
(byte) carnohigh, (byte) carnolow
}; };
} else if (type == 3) { } else if (type == 3) {
b = new byte[]{(byte) 0X87, (byte) 0XCD, b = new byte[]{(byte) 0X87, (byte) 0XCD,
@@ -167,7 +174,7 @@ public class NDCAgvServiceImpl implements NDCAgvService {
(byte) 0X00, (byte) 0X16, (byte) 0X00, (byte) 0X16,
(byte) 0X00, (byte) 0X01, (byte) 0X00, (byte) 0X01,
(byte) 0X00, (byte) 0X71, (byte) 0X00, (byte) 0X71,
(byte) 0X00, (byte) 0X12, (byte) 0X00, (byte) 0X14,
(byte) 0X01, prioritylow, (byte) 0X01, prioritylow,
(byte) 0X00, (byte) 0X01, (byte) 0X00, (byte) 0X01,
(byte) ikeyhigh, (byte) ikeylow, (byte) ikeyhigh, (byte) ikeylow,
@@ -337,7 +344,7 @@ public class NDCAgvServiceImpl implements NDCAgvService {
} }
@Override @Override
public byte[] sendAgvTwoModeInst(int phase, int index, int result,int offset,int quantity) { public byte[] sendAgvTwoModeInst(int phase, int index, int result, int offset, int quantity) {
if (phase < 0 || index < 0) if (phase < 0 || index < 0)
return null; return null;
byte indexhigh = (byte) IntToHexHigh(index); byte indexhigh = (byte) IntToHexHigh(index);
@@ -364,7 +371,7 @@ public class NDCAgvServiceImpl implements NDCAgvService {
log.info("反馈agv动作数据--index:" + hexToString(indexhigh & 0xFF) + hexToString(indexlow & 0xFF) + ",phase:" log.info("反馈agv动作数据--index:" + hexToString(indexhigh & 0xFF) + hexToString(indexlow & 0xFF) + ",phase:"
+ hexToString(phasehigh & 0xFF) + hexToString(phaselow & 0xFF)+",是否侧移: "+(offset == 1?"侧移":"不测移") + ",偏离量: " + quantity); + hexToString(phasehigh & 0xFF) + hexToString(phaselow & 0xFF) + ",是否侧移: " + (offset == 1 ? "侧移" : "不测移") + ",偏离量: " + quantity);
System.out.println("反馈agv动作数据:" + Bytes2HexString(b)); System.out.println("反馈agv动作数据:" + Bytes2HexString(b));
return b; return b;
@@ -506,7 +513,6 @@ public class NDCAgvServiceImpl implements NDCAgvService {
} }
@Override @Override
public Map<String, AgvDto> findAllAgvFromCache() { public Map<String, AgvDto> findAllAgvFromCache() {
return AGVDeviceStatus; return AGVDeviceStatus;

View File

@@ -822,6 +822,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
//向缓存添加任务信息 //向缓存添加任务信息
this.addTaskToCache(dto); this.addTaskToCache(dto);
//反馈上位系统任务状态 //反馈上位系统任务状态
entity.setCar_no(dto.getCar_no());
this.feedWmsTaskStatus(entity); this.feedWmsTaskStatus(entity);
@@ -1026,6 +1027,7 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
instdto.setStart_height(start_height); instdto.setStart_height(start_height);
instdto.setNext_height(next_height); instdto.setNext_height(next_height);
instdto.setAgv_action_type(acsTask.getAgv_action_type()); instdto.setAgv_action_type(acsTask.getAgv_action_type());
instdto.setCarno(acsTask.getCar_no());
if (StrUtil.equals(agv_system_type, CommonFinalParam.TWO)) { if (StrUtil.equals(agv_system_type, CommonFinalParam.TWO)) {
// task_type // task_type
//1、生箔 Itype=1:取空,取满,放空,放满; //1、生箔 Itype=1:取空,取满,放空,放满;

View File

@@ -163,6 +163,7 @@ public class AutoCreateInst {
instdto.setStart_height(start_height); instdto.setStart_height(start_height);
instdto.setNext_height(next_height); instdto.setNext_height(next_height);
instdto.setAgv_action_type(agvActionType); instdto.setAgv_action_type(agvActionType);
instdto.setCarno(acsTask.getCar_no());
//判断agv系统 //判断agv系统
//1、1楼叉车系统 //1、1楼叉车系统
//2、2楼1区域AGV系统 //2、2楼1区域AGV系统
@@ -176,12 +177,10 @@ public class AutoCreateInst {
//5、输送任务 //5、输送任务
//6、行架 //6、行架
//7、立库 //7、立库
if (StrUtil.equals(task_type, CommonFinalParam.ONE)) { if (StrUtil.equals(task_type, CommonFinalParam.ONE) || StrUtil.equals(task_type, "2")) {
instdto.setAgv_inst_type(CommonFinalParam.ONE); instdto.setAgv_inst_type(CommonFinalParam.ONE);
} else if (StrUtil.equals(task_type, "3")) { } else if (StrUtil.equals(task_type, "3")) {
instdto.setAgv_inst_type("2"); instdto.setAgv_inst_type("2");
} else if (StrUtil.equals(task_type, "2")) {
instdto.setAgv_inst_type("3");
} else if (StrUtil.equals(task_type, "8")) { } else if (StrUtil.equals(task_type, "8")) {
instdto.setAgv_inst_type("2"); instdto.setAgv_inst_type("2");
} else { } else {

View File

@@ -22,7 +22,7 @@
<span class="role-span">指令相关</span> <span class="role-span">指令相关</span>
</div> </div>
<el-form ref="form" :inline="true" :model="form" :rules="rules" size="small" label-width="78px"> <el-form ref="form" :inline="true" :model="form" :rules="rules" size="small" label-width="78px">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="忽略校验"> <el-form-item label="忽略校验">
<el-switch v-model="form.inspect_in_stocck" /> <el-switch v-model="form.inspect_in_stocck" />