diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/CurrTaskController.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/CurrTaskController.java index 43d30fb..44e96b5 100644 --- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/CurrTaskController.java +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/CurrTaskController.java @@ -22,6 +22,7 @@ import com.mt.wms.empty.params.*; import com.mt.wms.empty.service.CurrTaskDetService; import com.mt.wms.empty.service.CurrTaskService; import com.mt.wms.empty.service.OrderInfoService; +import com.mt.wms.empty.task.TaskDistanceUtils; import com.mt.wms.empty.vo.ApmsCreateProcessSheetVo; import com.mt.wms.empty.vo.ApmsStoveVo; import com.mt.wms.empty.vo.CurrTaskMainQueryVo; @@ -303,6 +304,12 @@ public class CurrTaskController extends BaseController { sendTaskToRgv(rgvTask.getTaskType(),rgvTask.getVehicleId(),rgvTask.getTaskNo(),rgvTask.getPickRow(),rgvTask.getSendRow(),rgvTask.getProcessNumber()); return null; } + @PostMapping(value = "testRgv") + @ApiOperation(value = "测试rgv避让逻辑") + private Boolean testRgv(@RequestBody TestRgv testRgv) throws IOException { + TaskDistanceUtils taskDistanceUtils=new TaskDistanceUtils(); + return taskDistanceUtils.conflictForVehicle(testRgv.getVehicleId(),testRgv.getStartPoint(),testRgv.getEndPoint(),testRgv.getOtherVehicle()); + } private Integer sendTaskToRgv(Integer taskType,Long vehicleId, Long currTaskId, Long startPoint, Long endPoint, Integer processNumber) { Map json = new HashMap(); // taskType 1 搬运 diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/params/TestRgv.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/params/TestRgv.java new file mode 100644 index 0000000..05e3530 --- /dev/null +++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/params/TestRgv.java @@ -0,0 +1,23 @@ +package com.mt.wms.empty.params; + +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Author: LGH + * @Date: 2022/8/3 + */ + +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@ApiModel(value = "测试rgv避让", description = "测试rgv避让") +public class TestRgv { + private String startPoint; + private String endPoint; + + private Double otherVehicle; + private Long vehicleId; +}