自动化立体仓库 - WMS系统
skyouc
昨天 1fdb053b64a033280a8ffe0ea10ad54b604e58cd
no message
1个文件已修改
83 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/task/handler/OrderSyncHandler.java
@@ -144,6 +144,7 @@
                orderDetlList.add(detail);
            }
        }
        for (OrderDetl orderDetl : orderDetlList) {
            orderDetl.setWorkQty(0D);
            OrderInAndOutUtil.insertOrderDetl(order.getPakinPakoutStatus$(), order, orderDetl);
@@ -165,21 +166,24 @@
    @Transactional(rollbackFor = Exception.class)
    public void ifTransfetInsertStockIn(Order order, OrderDetl orderDetl) {
        OrderPakin orderPakin = new OrderPakin();
        BeanUtils.copyProperties(order, orderPakin);
        orderPakin.setDocType(OrderTypeEnum.STOCK_IN.type.longValue());
        if (!orderPakinService.insert(orderPakin)) {
            throw new CoolException("插入备货入库单失败");
        OrderPakin pakin = orderPakinService.selectOne(new EntityWrapper<OrderPakin>()
                .eq("order_no", order.getOrderNo())
                .eq("doc_type", OrderTypeEnum.STOCK_IN.type.longValue()));
        if (Objects.isNull(pakin)) {
            OrderPakin orderPakin = new OrderPakin();
            BeanUtils.copyProperties(order, orderPakin);
            orderPakin.setDocType(OrderTypeEnum.STOCK_IN.type.longValue());
            if (!orderPakinService.insert(orderPakin)) {
                throw new CoolException("插入备货入库单失败");
            }
        }
        OrderDetlPakin orderDetlPakin = new OrderDetlPakin();
        BeanUtils.copyProperties(orderDetl, orderDetlPakin);
        orderDetlPakin.setOrderId(orderPakin.getId());
        orderDetlPakin.setOrderId(pakin.getId());
        if (!orderDetlPakinService.insert(orderDetlPakin)) {
            throw new CoolException("插入备货入库单失败");
        }
    }
    @Transactional
@@ -279,29 +283,46 @@
                        .eq("supp_code", detl.getSuppCode())
                        .eq("order_no", detl.getOrderNo()));
                if (Objects.isNull(locDetl)) {
                    throw new CoolException("库存明细不存在 ,请检查单据是否完成!!");
                    // BS Code
                    itemParam.setTotal_serial(detl.getThreeCode())
                            // 上报时,默认产品类型是null
                            .setPro_type(material.getProType())
                            // 上报时,默认产品编码
                            .setPro_komcode(detl.getMatnr())
                            // 上报时,默认产品id是供应商编码
                            .setPro_id(detl.getSuppCode())
                            .setLocation_no("LX000000000")
                            .setSj_emp("9527")
                            .setLocation_type(MatLocType.getMatTag(material.getTagId() + ""))
                            // 上报时,默认上报时间是更新时间
                            .setSj_date(Utils.dateToStr(order.getUpdateTime(), "yyyy-MM-dd HH:mm:ss"))
                            // 上报时,如果为空默认上报 0
                            .setPick_qty(0)
                            // 上报时,默认损坏数量是0
                            .setDamage_qty(0)
                            // 上报时,默认差异数量是0
                            .setDiff_qty(0);
                } else {
                    // BS Code
                    itemParam.setTotal_serial(detl.getThreeCode())
                            // 上报时,默认产品类型是null
                            .setPro_type(material.getProType())
                            // 上报时,默认产品编码
                            .setPro_komcode(detl.getMatnr())
                            // 上报时,默认产品id是供应商编码
                            .setPro_id(detl.getSuppCode())
                            .setLocation_no(locDetl.getZpallet())
                            .setSj_emp(locDetl.getModiUser$())
                            .setLocation_type(MatLocType.getMatTag(material.getTagId() + ""))
                            // 上报时,默认上报时间是更新时间
                            .setSj_date(Utils.dateToStr(order.getUpdateTime(), "yyyy-MM-dd HH:mm:ss"))
                            // 上报时,默认上报数量是订单数量
                            .setPick_qty(locDetl.getAnfme().intValue())
                            // 上报时,默认损坏数量是0
                            .setDamage_qty(0)
                            // 上报时,默认差异数量是0
                            .setDiff_qty(0);
                }
                // BS Code
                itemParam.setTotal_serial(detl.getThreeCode())
                        // 上报时,默认产品类型是null
                        .setPro_type(material.getProType())
                        // 上报时,默认产品编码
                        .setPro_komcode(detl.getMatnr())
                        // 上报时,默认产品id是供应商编码
                        .setPro_id(detl.getSuppCode())
                        .setLocation_no(locDetl.getZpallet())
                        .setSj_emp(locDetl.getModiUser$())
                        .setLocation_type(MatLocType.getMatTag(material.getTagId() + ""))
                        // 上报时,默认上报时间是更新时间
                        .setSj_date(Utils.dateToStr(order.getUpdateTime(), "yyyy-MM-dd HH:mm:ss"))
                        // 上报时,默认上报数量是订单数量
                        .setPick_qty(detl.getQty().intValue())
                        // 上报时,默认损坏数量是0
                        .setDamage_qty(0)
                        // 上报时,默认差异数量是0
                        .setDiff_qty(0);
                reportOrderParams.add(itemParam);
            });