天眼同步提交及浙大调度优化

This commit is contained in:
psh
2024-06-13 17:07:41 +08:00
parent 99eee485ba
commit d2dc32778e
3 changed files with 80 additions and 2 deletions

View File

@@ -76,6 +76,22 @@ public class QueryZDAgvTaskStatus {
}
} else if ("FINISHED".equals(status)) {
if (inst != null){
String startPoint=inst.getStart_point_code();
Device start_device = deviceAppService.findDeviceByCode(startPoint);
if (start_device.getDeviceDriver() instanceof SiteDeviceDriver) {
SiteDeviceDriver siteDeviceDriver=(SiteDeviceDriver)start_device.getDeviceDriver();
if(siteDeviceDriver.getMode()!=10) {
try {
siteDeviceDriver.writing(10);
siteDeviceDriver.writing(10);
siteDeviceDriver.writing(10);
siteDeviceDriver.writing(10);
siteDeviceDriver.writing(10);
}catch(Exception e){
log.error("写入信号失败:{}{}",e,e.getMessage());
}
}
}
inst.setInstruction_status("2");
instructionService.finish(inst);
}