自动化立体仓库 - WMS系统
zhangc
2025-01-01 6cfcb307f01b9550b6cd67321f2c1db345b4da19
src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java
@@ -43,9 +43,9 @@
    //移库类型数组
    private static final List<Integer> MOVE_TYPE_List = new ArrayList<Integer>() {{
        add(11);
        add(101);
        add(12);
        add(53);
        add(101);
        add(103);
        add(108);
        add(111);
@@ -135,6 +135,26 @@
            }
            Integer pltType = agvWrkMast.getPltType();
            if (Cools.isEmpty(pltType)) {
                AgvLocMast agvLocMast;
                if (!Cools.isEmpty(agvWrkMast.getLocNo())) {
                    agvLocMast = agvLocMastService.selectById(agvWrkMast.getLocNo());
                    if (agvLocMast != null) {
                        pltType = agvLocMast.getPltType();
                    }
                }
                if (!Cools.isEmpty(agvWrkMast.getSourceLocNo())) {
                    agvLocMast = agvLocMastService.selectById(agvWrkMast.getSourceLocNo());
                    if (agvLocMast != null) {
                        pltType = agvLocMast.getPltType();
                    }
                }
                if (pltType != null) {
                    agvWrkMast.setPltType(pltType);
                }
                log.info("工作号--{},仓库编码:{}", agvWrkMast.getWrkNo(), agvWrkMast.getPltType());
            }
            agvWrkMast.setModiTime(new Date());
            //修改工作档状态为207.库存更新完成
            agvWrkMast.setWrkSts(207L);
@@ -339,12 +359,13 @@
            if (!isJSON(orderNo)) {
                //检查订单是否已完成
                orderService.checkComplete(orderNo, agvWrkMast.getPltType());
                orderService.checkComplete(orderNo, pltType);
            } else {
                List<Map> maps = JSONArray.parseArray(orderNo, Map.class);
                Integer finalPltType = pltType;
                maps.forEach(map -> {
                    String o = map.get("orderNo").toString();
                    orderService.checkComplete(o, agvWrkMast.getPltType());
                    orderService.checkComplete(o, finalPltType);
                });
            }
@@ -706,23 +727,27 @@
        if (Cools.isEmpty(agvWrkDetls)) {
            return;
        }
        List<AgvWrkDetl> data = new ArrayList<>();
        //区分不同任务类型的上报方式
        if (IN_TYPE_LIST.contains(agvWrkMast.getIoType())) {
            String barcode = agvWrkMast.getBarcode();
            if (barcode.startsWith("20") || barcode.startsWith("21") || barcode.startsWith("40")) {
                reportMesPakinOrder(agvWrkMast, agvWrkDetls);
        for (AgvWrkDetl agvWrkDetl : agvWrkDetls) {
            if (agvWrkDetl.getMatnr().compareTo("39") <= 0) {
                data.add(agvWrkDetl);
            }
        }
        if (OUT_TYPE_List.contains(agvWrkMast.getIoType())) {
            reportMesPakoutOrder(agvWrkMast, agvWrkDetls);
        if (!data.isEmpty()) {
            if (IN_TYPE_LIST.contains(agvWrkMast.getIoType())) {
                reportMesPakinOrder(agvWrkMast, data);
            }
            if (OUT_TYPE_List.contains(agvWrkMast.getIoType())) {
                reportMesPakoutOrder(agvWrkMast, data);
            }
            if (MOVE_TYPE_List.contains(agvWrkMast.getIoType())) {
                generateMesParam(agvWrkMast, data);
            }
        }
        if (MOVE_TYPE_List.contains(agvWrkMast.getIoType())) {
            generateMesParam(agvWrkMast, agvWrkDetls);
        }
    }
    private void reportMesPakinOrder(AgvWrkMast agvWrkMast, List<AgvWrkDetl> agvWrkDetls) {
@@ -748,7 +773,7 @@
                iteam.setLineNo(orderDetl.getItemNum());
                iteam.setSupplierCode(order.getSalesman());
                iteam.setUnit(agvWrkDetl.getUnit());
                iteam.setRemark(agvWrkDetl.getThreeCode());
                iteams.add(iteam);
                mesBuyPakinReportParam.setCode(orderNo);