浙大调度fix
This commit is contained in:
@@ -11,6 +11,8 @@ import org.nl.acs.AcsConfig;
|
||||
import org.nl.acs.agv.AgvUtil;
|
||||
import org.nl.acs.agv.server.ZheDaAgvService;
|
||||
import org.nl.acs.device.domain.Device;
|
||||
import org.nl.acs.device.service.DeviceService;
|
||||
import org.nl.acs.device.service.dto.DeviceDto;
|
||||
import org.nl.acs.device_driver.basedriver.cargo_lift_conveyor.CargoLiftConveyorDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.empty_vehicle_stacking_position.EmptyVehicleStackingPositionDeviceDriver;
|
||||
import org.nl.acs.device_driver.basedriver.hailiang_smart_plc_test.HailiangSmartplcTestDeviceDriver;
|
||||
@@ -35,12 +37,15 @@ import org.springframework.stereotype.Service;
|
||||
public class ZheDaAgvServiceImpl implements ZheDaAgvService {
|
||||
private final ISysParamService paramService;
|
||||
private final InstructionService instructionService;
|
||||
private final DeviceService deviceService;
|
||||
@LokiLog(type = LokiLogType.AGV)
|
||||
@Override
|
||||
public HttpResponse sendAgvInstToAgv(Instruction inst) throws Exception {
|
||||
JSONObject jo = new JSONObject();
|
||||
String start_point_code = inst.getStart_point_code();
|
||||
String next_point_code = inst.getNext_point_code();
|
||||
DeviceDto startDevice= deviceService.findByCode(inst.getStart_point_code());
|
||||
String start_point_code = startDevice.getRemark();
|
||||
DeviceDto nextDevice= deviceService.findByCode(inst.getNext_point_code());
|
||||
String next_point_code = nextDevice.getRemark();
|
||||
//1楼AGV普通任务
|
||||
//2楼AGV普通任务
|
||||
//2楼AGV起点追加任务
|
||||
@@ -252,18 +257,11 @@ public class ZheDaAgvServiceImpl implements ZheDaAgvService {
|
||||
String resp = acsToWmsService.requestTaskAgain(address,task.getExt_task_id(),inst.getVehicle_code());
|
||||
JSONObject respjson = JSONObject.parseObject(resp);
|
||||
|
||||
if(StrUtil.equals(inst.getInstruction_type(),"3")){
|
||||
//2楼AGV起点追加任务
|
||||
String start_device_code = respjson.getString("device_code");
|
||||
String next_device_code = inst.getNext_device_code();
|
||||
destinations.add(destination(start_device_code, "load", "1", "1"));
|
||||
destinations.add(destination(next_device_code, "Unload", "1", "1"));
|
||||
|
||||
} else if(StrUtil.equals(inst.getInstruction_type(),"4")){
|
||||
//2楼AGV终点追加任务
|
||||
String next_device_code = respjson.getString("device_code");
|
||||
destinations.add(destination(next_device_code, "Unload", "1", "1"));
|
||||
}
|
||||
String next_device_code = respjson.getString("next_point_code");
|
||||
DeviceDto device= deviceService.findByCode(next_device_code);
|
||||
|
||||
destinations.add(destination(device.getRemark(), "Unload", "1", "1"));
|
||||
|
||||
jo.put("destinations", destinations);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user