自动化立体仓库 - WMS系统
skyouc
7 天以前 b2dbc07e7d3c3f336a0090b7457c89c6895d5e40
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -557,6 +557,13 @@
        return R.ok().add(maps);
    }
    /**
     * 单据组托
     * @author Ryan
     * @date 2026/1/5 14:12
     * @param param
     * @param userId
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void comb(CombParam param, Long userId) {
@@ -683,17 +690,16 @@
                if (Cools.isEmpty(mat)) {
                    throw new CoolException(detlDto.getMatnr() + "商品档案不存在");
                }
                //最多可放数量
                Double singleMax = mat.getUpQty() * suplus;
                if (singleMax.compareTo(detlDto.getAnfme()) < 0) {
                    throw new CoolException("单次最大组托上限为:" + singleMax);
                    throw new CoolException("物料:" + detlDto.getMatnr() + "单次组托上限为:" + mat.getUpQty() + ",当前总量超出托盘装载上限!!");
                }
                BigDecimal decimal = new BigDecimal(detlDto.getAnfme() / mat.getUpQty());
                //当前物料需要占用料箱格数
                Integer curr = decimal.setScale(0, RoundingMode.CEILING).intValue();
                suplus = suplus - curr;
                if (suplus == 0 || suplus < 0) {
                if (suplus < 0) {
                    throw new CoolException("物料:" + detlDto.getMatnr() + ", 超出当前托盘装载上限!!");
                }
@@ -1375,7 +1381,7 @@
        task.setWrkNo(workNo)
                .setIoTime(new Date())
                .setWrkSts(1L) // 工作状态:11.生成出库ID
                .setIoType(11) // 入出库状态: 11.库格移载
                .setIoType(1) // 入出库状态: 11.库格移载
                .setTaskType("agv")
                .setIoPri(10D)
                .setLocNo(loc.getLocNo()) // 目标库位