1
2 天以前 33df2026a4a69be7badbc0342fff7e1f544c58a8
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/impl/WaitPakinServiceImpl.java
@@ -177,6 +177,38 @@
        return pakin;
    }
    /**
     * @author Munch D. Luffy
     * @date 2026/01/23
     * @description: PDA组拖前置检查
     * @version 1.0
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public synchronized boolean mergeItemsCheck(WaitPakinParam waitPakin, Long userId) {
        if (StringUtils.isBlank(waitPakin.getBarcode())) {
            throw new CoolException("参数错误:托盘码为空!!");
        }
        WaitPakin pakin = waitPakinService.getOne(new LambdaQueryWrapper<WaitPakin>()
                .eq(WaitPakin::getBarcode, waitPakin.getBarcode()));
        if (!Objects.isNull(pakin)) {
            throw new CoolException("托盘码:" + waitPakin.getBarcode() + "已被组托单:" + pakin.getCode() + "使用!!");
        }
        List<Loc> locs = locService.list(new LambdaQueryWrapper<Loc>().eq(Loc::getBarcode, waitPakin.getBarcode()));
        if (!locs.isEmpty()) {
            List<String> locCodes = locs.stream().map(Loc::getCode).collect(Collectors.toList());
            String join = StringUtils.join(locCodes, ",");
            throw new CoolException("托盘码:" + waitPakin.getBarcode() + "已被库位:" + join + "使用!!");
        }
        String ruleCode = SerialRuleUtils.generateRuleCode(SerialRuleCode.SYS_WAIT_PAKIN_CODE, null);
        if (StringUtils.isBlank(ruleCode)) {
            throw new CoolException("编码规则错误: 编码规则「SYS_WAIT_PAKIN_CODE」规则是不存在");
        }
        return agvService.AGVBindAndInTaskStart(waitPakin.getBarcode(),waitPakin.getStaNo());
    }
    /**