#
vincentlu
2025-01-13 89c7f6e5bcc21b0e8f83a2bc6d680e2ffe431e6f
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/PatrolService.java
@@ -62,7 +62,6 @@
    private void patrolOfMove(String agvNo) {
        Long agvId = agvService.getAgvId(agvNo);
        AgvDetail agvDetail = agvDetailService.selectMajorByAgvId(agvId);
        if (0 < travelService.count(new LambdaQueryWrapper<Travel>()
                .eq(Travel::getAgvId, agvId)
                .eq(Travel::getState, TravelStateType.RUNNING.toString()))) {
@@ -77,13 +76,13 @@
        if (!agvService.judgeEnable(agvId)) {
            return;
        }
        Agv agv = agvService.getById(agvId);
        Code destinationCode = this.getDestinationCode(agv, agvDetail);
        AgvDetail agvDetail = agvDetailService.selectMajorByAgvId(agvId);
        Code destinationCode = this.getDestinationCode(agvNo, agvDetail);
        if (null == destinationCode) {
            return;
        }
        if (mainLockWrapService.buildMinorTask(agv, TaskTypeType.MOVE, destinationCode.getData(), null)) {
            log.info(agv.getUuid() + "开始走行演示...");
        if (mainLockWrapService.buildMinorTask(agvId, TaskTypeType.MOVE, destinationCode.getData(), null)) {
            log.info(agvNo + "开始走行演示...");
        }
    }
@@ -98,7 +97,7 @@
     * 评估HandlerController没有调用buildMajorTask,手动创建task的可行性
     * agv地图图标变化
     */
    public Code getDestinationCode(Agv agv, AgvDetail agvDetail) {
    public Code getDestinationCode(String agvNo, AgvDetail agvDetail) {
        Integer maxAgvCountInLane = configService.getVal("maxAgvCountInLane", Integer.class);
        Code startCode = codeService.getById(agvDetail.getRecentCode());
@@ -128,7 +127,7 @@
        for (Code endCode : list) {
            // valid lane
            if (!allocateService.validCapacityOfLane(agv, endCode)) {
            if (!allocateService.validCapacityOfLane(agvNo, endCode)) {
                continue;
            }