#
vincentlu
3 天以前 b1dd4c6e284244bd7224e2c050a9670fbd9a38ea
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/TransferStationHandler.java
@@ -10,23 +10,9 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Objects;
// man_segment: start_time, end_time, alter table man_segment
//    add roller_waiting int(1) default 0 null comment '滚筒线等待' after end_time;
/**
 * alter table man_sta
 *     add capacity int null comment '槽位数' after angle;
 *
 * alter table man_sta
 *     add occ_cnt int null comment '占用数' after capacity;
 *
 * alter table man_sta
 *     add rsv_in_cnt int null comment '预约放货量' after occ_cnt;
 *
 * alter table man_sta
 *     add rsv_out_cnt int null comment '预约取货量' after rsv_in_cnt;
 */
@Slf4j
@Service
public class TransferStationHandler {
@@ -54,8 +40,9 @@
        if (currSeg == null) {
            throw new NullPointerException("segment is null in hasDelayAtSta.");
        }
        Long agvId = currSeg.getAgvId();
        // 判断AGV是否在滚动输送线前
        Code currentCode = agvDetailService.getCurrentCode(currSeg.getAgvId());
        Code currentCode = agvDetailService.getCurrentCode(agvId);
        if (null == currentCode) {
            return false;
        }
@@ -76,15 +63,14 @@
        }
        long preEndTime = preSeg.getEndTime().getTime();
        long now = System.currentTimeMillis();
        Long agvId = currSeg.getAgvId();
        // inbound
        if (prePosType.equals(TaskPosDto.PosType.ORI_STA)) {
            // 背篓未满才等
            Integer backpack = agvService.getBackpack(agvId);
            int countRemainingBackpack = segmentService.countRemainingBackpack(currSeg.getTravelId(), agvId);
            if (countRemainingBackpack >= backpack) {
            List<Integer> usedBackpacks = segmentService.selectUsedBackpacks(currSeg.getTravelId(), agvId);
            if (usedBackpacks.size() >= backpack) {
                return false;
            }