自动化立体仓库 - WMS系统
skyouc
2 天以前 38242a15bc0a93933857018e7caf7c6ec41ee652
src/main/java/com/zy/api/service/impl/KopenApiServiceImpl.java
@@ -128,7 +128,7 @@
            } else {
                if (!Objects.isNull(order)) {
                    int reportOnce = order.getReportOnce();
                    reportOnce ++;
                    reportOnce++;
                    order.setReportOnce(reportOnce);
                    orderService.updateById(order);
                }
@@ -138,7 +138,7 @@
        } catch (Exception e) {
            if (!Objects.isNull(order)) {
                int reportOnce = order.getReportOnce();
                reportOnce ++;
                reportOnce++;
                order.setReportOnce(reportOnce);
                orderService.updateById(order);
            }
@@ -149,9 +149,10 @@
    /**
     * 获取自定义请求头
     *
     * @return java.util.Map<java.lang.String, java.lang.Object>
     * @author Ryan
     * @date 2025/12/29 9:11
     * @return java.util.Map<java.lang.String,java.lang.Object>
     */
    private Map<String, Object> getHeaderParam() {
        Map<String, Object> headerParam = new HashMap<>();
@@ -264,7 +265,12 @@
            if (Objects.isNull(mats.getPro_type())) {
                throw new CoolException("零件类型不能为空!!");
            }
            Mat matnr = matService.selectOne(new EntityWrapper<Mat>().eq("matnr", mats.getPro_komcode()));
            if (Objects.isNull(mats.getPro_id())) {
                throw new CoolException("供应商不能为空!!");
            }
            Mat matnr = matService.selectOne(new EntityWrapper<Mat>()
                    .eq("supp_code", mats.getPro_id())
                    .eq("matnr", mats.getPro_komcode()));
            if (!Objects.isNull(matnr)) {
                // 订单时间
                if (Utils.isValidFormat(mats.getUpdate_time(), "yyyy-MM-dd HH:mm:ss")) {
@@ -550,18 +556,18 @@
            wrapper.eq("matnr", params.getPro_komcode());
        }
        Page<LocDetl> locDetls = locDetlService.selectPage(new Page<>(params.getCurr(), params.getLimit()),  wrapper);
        Page<LocDetl> locDetls = locDetlService.selectPage(new Page<>(params.getCurr(), params.getLimit()), wrapper);
        return XSR.ok(locDetls.getRecords());
    }
    /**
     * 零件损溢单下发
     *
     * @author Ryan
     * @date 2025/11/24 15:22
     *
     * @param params
     * @return com.core.common.R
     * @author Ryan
     * @date 2025/11/24 15:22
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
@@ -578,11 +584,12 @@
    /**
     * 损溢单完结上报
     * @author Ryan
     * @date 2025/12/30 16:57
     *
     * @param params
     * @param order
     * @return com.zy.api.entity.dto.XSR
     * @author Ryan
     * @date 2025/12/30 16:57
     */
    @Override
    public XSR reportCheckOrder(List<StockAdjustParams> params, CheckOrder order) {
@@ -612,7 +619,7 @@
            } else {
                if (!Objects.isNull(order)) {
                    int reportOnce = order.getReportOnce();
                    reportOnce ++;
                    reportOnce++;
                    order.setReportOnce(reportOnce);
                    checkOrderService.updateById(order);
                }
@@ -634,6 +641,7 @@
    /**
     * 备货单反馈
     *
     * @param params
     * @param order
     * @return
@@ -666,7 +674,7 @@
            } else {
                if (!Objects.isNull(order)) {
                    int reportOnce = order.getReportOnce();
                    reportOnce ++;
                    reportOnce++;
                    order.setReportOnce(reportOnce);
                    orderService.updateById(order);
                }
@@ -676,7 +684,7 @@
        } catch (Exception e) {
            if (!Objects.isNull(order)) {
                int reportOnce = order.getReportOnce();
                reportOnce ++;
                reportOnce++;
                order.setReportOnce(reportOnce);
                orderService.updateById(order);
            }
@@ -685,9 +693,12 @@
        }
    }
    /** 生成新的零件损溢单
     * @param userId */
    @Transactional(rollbackFor = Exception.class)
    /**
     * 生成新的零件损溢单
     *
     * @param userId
     */
    @Transactional(rollbackFor = Exception.class)
    public void gentCheckOrders(StockAdjustParams params, Long userId) {
        if (Objects.isNull(params.getDetails()) || params.getDetails().isEmpty()) {
            throw new CoolException("订单明细不能为空!!");