#
luxiaotao1123
2 天以前 788c049b641607b4288f76b57dd73230bf882177
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/TransferStationHandler.java
@@ -13,26 +13,11 @@
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 {
    private static final long LOAD_DELAY_MS  = 15000L; // load ( inbound ) delay timeout
    private static final long LOAD_DELAY_MS  = 60000L; // load ( inbound ) delay timeout
    private static final long PLACE_DELAY_MS  = 15000L; // place ( outbound ) delay timeout
    @Autowired
@@ -55,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;
        }
@@ -77,14 +63,13 @@
        }
        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);
            List<Integer> usedBackpacks = segmentService.selectUsedBackpacks(currSeg.getTravelId(), agvId);
            List<Integer> usedBackpacks = segmentService.selectUsedBackpacks(currSeg.getTravelId(), agvId); // todo:vincent 拿不到数据
            if (usedBackpacks.size() >= backpack) {
                return false;
            }