输送指令问题解决
This commit is contained in:
@@ -7,6 +7,7 @@ import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import io.swagger.models.auth.In;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.sf.json.JSONArray;
|
||||
@@ -345,6 +346,17 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
if (ObjectUtils.isEmpty(shortPathsList)) {
|
||||
throw new Exception(dto.getStart_device_code() + "->" + dto.getNext_device_code() + "路由不通");
|
||||
}
|
||||
|
||||
for (int i = 0; i < shortPathsList.size(); i++) {
|
||||
RouteLineDto routeLineDto = shortPathsList.get(i);
|
||||
if (routeLineDto.getType().equals("0")) {
|
||||
Instruction byContainer = this.findByContainer(dto.getVehicle_code());
|
||||
if (ObjectUtil.isNotEmpty(byContainer)) {
|
||||
throw new RuntimeException("已有当前载具号的输送指令");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String carno = "";
|
||||
//判断是agv指令才能指定车号
|
||||
List<Device> deviceByType = deviceAppService.findDevice(DeviceType.agv);
|
||||
@@ -432,7 +444,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
for (int i = 0; i < shortPathsList.size(); i++) {
|
||||
RouteLineDto routeLineDto = shortPathsList.get(i);
|
||||
if (routeLineDto.getType().equals("1") && carno.equals("")) {
|
||||
throw new RuntimeException("agv车号为空!");
|
||||
throw new RuntimeException("创建agv指令未找到可分配agv!");
|
||||
}
|
||||
}
|
||||
String type = shortPathsList.get(0).getType();
|
||||
|
||||
Reference in New Issue
Block a user