周末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) 0X00, (byte) 0X01,
(byte) ikeyhigh, (byte) ikeylow,
(byte) satationhigh, (byte) satationlow,
(byte) carhigh, (byte) carlow
(byte) carhigh, (byte) carlow,
(byte) satationhigh, (byte) satationlow
};
log.info("下发AGV充电任务--{}", str1);

View File

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

View File

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