周末fix

This commit is contained in:
psh
2024-07-08 08:46:11 +08:00
parent c6b89dfe5c
commit dd4fa22af8
3 changed files with 31 additions and 20 deletions

View File

@@ -240,8 +240,9 @@ public class NDCAgvServiceImpl implements NDCAgvService {
(byte) 0X64, (byte) 0X80, (byte) 0X64, (byte) 0X80,
(byte) 0X00, (byte) 0X01, (byte) 0X00, (byte) 0X01,
(byte) ikeyhigh, (byte) ikeylow, (byte) ikeyhigh, (byte) ikeylow,
(byte) satationhigh, (byte) satationlow, (byte) carhigh, (byte) carlow,
(byte) carhigh, (byte) carlow (byte) satationhigh, (byte) satationlow
}; };
log.info("下发AGV充电任务--{}", str1); log.info("下发AGV充电任务--{}", str1);

View File

@@ -209,16 +209,17 @@ public class OneNDCSocketConnectionAutoRun extends AbstractAutoRunnable {
} }
//充电成功 //充电成功
}else if (phase == 0x65){ }else if (phase == 0x65){
log.info("AGV车号{}反馈充电成功,释放充电桩{}",agvaddr,station); log.info("AGV车号{}反馈充电中,充电桩{}",agvaddr,station);
List<Dict> dictList= dictService.getDictByName("station"); // log.info("AGV车号{}反馈充电成功,释放充电桩{}",agvaddr,station);
for(Dict dict : dictList){ // List<Dict> dictList= dictService.getDictByName("station");
if (Integer.parseInt(dict.getPara1())==station){ // for(Dict dict : dictList){
dict.setValue("0"); // if (Integer.parseInt(dict.getPara1())==station){
dict.setPara2(""); // dict.setValue("0");
dictService.updateDetail(dict); // dict.setPara2("");
break; // dictService.updateDetail(dict);
} // break;
} // }
// }
//充电取消上报 //充电取消上报
}else if (phase == 0x66){ }else if (phase == 0x66){
log.info("AGV车号{}反馈充电任务已取消,释放充电桩{}",agvaddr,station); log.info("AGV车号{}反馈充电任务已取消,释放充电桩{}",agvaddr,station);

View File

@@ -210,11 +210,7 @@ public class TBXMLTask extends AbstractTask {
// } // }
// } // }
// } // }
// // 2 没有对应的固化室、没有同工艺号的固化室、没有计划方案对应的固化室,就找新的固化室 SchBasePoint schBasePoint =null;
if (points.size() == 0) {
points = tbxMapper.getEmptyPoint(nextRegionStr, vehicle_type, workorder.getMaterial_id());
}
SchBasePoint schBasePoint =new SchBasePoint();
for(SchBasePoint temp:points){ for(SchBasePoint temp:points){
for(String ghs:ghsList) { for(String ghs:ghsList) {
if (ghs.equals(temp.getParent_point_code())) { if (ghs.equals(temp.getParent_point_code())) {
@@ -223,10 +219,23 @@ public class TBXMLTask extends AbstractTask {
} }
} }
} }
if (schBasePoint != null) { // // 2 没有对应的固化室、没有同工艺号的固化室、没有计划方案对应的固化室,就找新的固化室
schBasePoint.setCan_material_type(workorder.getMaterial_id()); if (ObjectUtil.isEmpty(schBasePoint)) {
pointService.updateById(schBasePoint); points = tbxMapper.getEmptyPoint(nextRegionStr, vehicle_type, workorder.getMaterial_id());
for(SchBasePoint temp:points){
for(String ghs:ghsList) {
if (ghs.equals(temp.getParent_point_code())) {
schBasePoint=temp;
break;
}
}
}
} }
// if (schBasePoint != null) {
// schBasePoint.setCan_material_type(workorder.getMaterial_id());
// pointService.updateById(schBasePoint);
// }
return schBasePoint; return schBasePoint;
} }