This commit is contained in:
psh
2024-06-11 15:00:45 +08:00
parent e03718c695
commit ee149a96e0
9 changed files with 74 additions and 63 deletions

View File

@@ -18,6 +18,7 @@ import org.nl.acs.device_driver.basedriver.empty_vehicle_stacking_position.Empty
import org.nl.acs.device_driver.basedriver.hailiang_smart_plc_test.HailiangSmartplcTestDeviceDriver;
import org.nl.acs.device_driver.basedriver.hongxiang_device.HongXiangConveyorDeviceDriver;
import org.nl.acs.device_driver.basedriver.paint_conveyor.PaintConveyorDeviceDriver;
import org.nl.acs.device_driver.tianneng.site.SiteDeviceDriver;
import org.nl.acs.ext.wms.service.AcsToWmsService;
import org.nl.acs.instruction.domain.Instruction;
import org.nl.acs.instruction.service.InstructionService;
@@ -31,6 +32,8 @@ import org.nl.system.service.param.ISysParamService;
import org.nl.config.SpringContextHolder;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Slf4j
@Service
@RequiredArgsConstructor
@@ -38,6 +41,7 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService {
private final ISysParamService paramService;
private final InstructionService instructionService;
private final DeviceService deviceService;
private final DeviceAppService deviceAppService;
@LokiLog(type = LokiLogType.AGV)
@Override
public HttpResponse sendAgvInstToAgv(Instruction inst) throws Exception {
@@ -225,6 +229,15 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService {
.timeout(20000)//超时,毫秒
.execute();
log.info("下发agv任务请求反馈:{}", result2);
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) {
siteDeviceDriver.writing(10);
siteDeviceDriver.writing(10);
}
}
}
}
//放货的进入前等待和离开等待

View File

@@ -31,9 +31,6 @@ public class QueryZDAgvTaskStatus {
@Autowired
ZheDaAgvService agvService;
@Resource
private DeviceAppService deviceAppService;
public void run() throws Exception {
try {
@@ -76,15 +73,6 @@ public class QueryZDAgvTaskStatus {
}
} else if ("FINISHED".equals(status)) {
if (inst != null){
String startPoint=inst.getStart_point_code();
Device device = deviceAppService.findDeviceByCode(startPoint);
if (device.getDeviceDriver() instanceof SiteDeviceDriver) {
SiteDeviceDriver siteDeviceDriver=(SiteDeviceDriver)device.getDeviceDriver();
if(siteDeviceDriver.getMode()!=10) {
siteDeviceDriver.writing(10);
siteDeviceDriver.writing(10);
}
}
inst.setInstruction_status("2");
instructionService.finish(inst);
}

View File

@@ -2,7 +2,7 @@ spring:
freemarker:
check-template-location: false
profiles:
active: dev
active: prod
jackson:
time-zone: GMT+8
data: