chen.lin
昨天 b003a49794f49a329e2702918ecfc8d14b371d0d
rsf-open-api/src/main/java/com/vincent/rsf/openApi/service/impl/WmsErpServiceImpl.java
@@ -136,6 +136,9 @@
            log.info("order/add 收到 operateType=3,走统一取消逻辑: {}", params.getOrderNo());
            return doCancel(params);
        }
        if (params.getOrderInternalCode() == null || params.getOrderInternalCode().trim().isEmpty()) {
            throw new CoolException("单据内码不能为空!!");
        }
        Map<String, Object> mapParams = toServerOrderMap(params);
        List<Map<String, Object>> maps = Collections.singletonList(mapParams);
        log.info("新增/修改单据,请求参数: {}", JSONArray.toJSONString(maps));
@@ -150,9 +153,12 @@
    private Map<String, Object> toServerOrderMap(ErpOpParams params) {
        Map<String, Object> m = new HashMap<>();
        m.put("orderNo", params.getOrderNo());
        m.put("orderInternalCode", params.getOrderInternalCode());
        m.put("stationId", params.getStationId());
        m.put("wkType", params.getWkType());
        m.put("type", params.getOrderType() != null ? String.valueOf(params.getOrderType()) : null);
        m.put("orderId", params.getOrderId());
        m.put("operateType", params.getOperateType());
        double anfmeSum = 0;
        if (params.getOrderItems() != null) {
            List<Map<String, Object>> items = params.getOrderItems().stream()
@@ -167,9 +173,9 @@
        }
        m.put("anfme", anfmeSum);
        if (params.getBusinessTime() != null) {
            m.put("arrTime", new Date(params.getBusinessTime() * 1000));
            m.put("arrTime", params.getBusinessTime());
        } else if (params.getCreateTime() != null) {
            m.put("arrTime", new Date(params.getCreateTime() * 1000));
            m.put("arrTime", params.getCreateTime());
        }
        return m;
    }
@@ -184,6 +190,10 @@
        m.put("model", item.getModel());
        m.put("unit", item.getUnit());
        m.put("batch", item.getBatch());
        m.put("planNo", item.getPlanNo());
        m.put("palletId", item.getPalletId());
        m.put("targetWareHouseId", item.getTargetWareHouseId());
        m.put("sourceWareHouseId", item.getSourceWareHouseId());
        return m;
    }