自动化立体仓库 - WMS系统
#
1
6 天以前 3c714a53d5cc4c61815870bef0385b7108181773
#
4个文件已修改
188 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/BasArmMastController.java 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/BasArmMastLogController.java 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/BasArmMastSignController.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/task/kingdee/handler/SaveOrderSyncHandler.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/BasArmMastController.java
@@ -38,13 +38,72 @@
                  @RequestParam(required = false)String orderByType,
                  @RequestParam(required = false)String condition,
                  @RequestParam Map<String, Object> param){
        EntityWrapper<BasArmMast> wrapper = new EntityWrapper<>();
        // ===================== 1. 手动处理 binding_tags 的精确匹配(字符串形式) =====================
        if (param.containsKey("binding_tags")) {
            String tag = String.valueOf(param.get("binding_tags")).trim();
            if (!tag.isEmpty()) {
                wrapper.eq("binding_tags", tag);
                System.out.println("手动添加精确条件: binding_tags = " + tag);
            }
            // 可选:移除原 param,防止 allLike 再次干扰(如果 allLike 会重复加条件)
            // param.remove("binding_tags");
        }
        // ===================== 2. 其他原有处理逻辑(模糊搜索等) =====================
        excludeTrash(param);
        convert(param, wrapper);
        allLike(BasArmMast.class, param.keySet(), wrapper, condition);
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
        wrapper.orderBy("create_time",false);
        return R.ok(basArmMastService.selectPage(new Page<>(curr, limit), wrapper));
        // 排序
        if (!Cools.isEmpty(orderByField)) {
            wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));
        }
        wrapper.orderBy("create_time", false);
        // 分页查询
        Page<BasArmMast> page = new Page<>(curr, limit);
        Page<BasArmMast> resultPage = basArmMastService.selectPage(page, wrapper);
        // ===================== 3. 返回数据处理(转字符串,防止前端精度丢失) =====================
        List<Map<String, Object>> newRecords = new ArrayList<>();
        for (BasArmMast item : resultPage.getRecords()) {
            Map<String, Object> map = new HashMap<>();
            map.put("id", item.getId() != null ? item.getId().toString() : null);  // 建议转字符串
            map.put("armNo", item.getArmNo());
            map.put("armDirection", item.getArmDirection());
            map.put("staNo", item.getStaNo());
            map.put("sortingLine", item.getSortingLine());
            map.put("bindingTags", item.getBindingTags() != null ? item.getBindingTags().toString() : null);
            map.put("priority", item.getPriority());
            map.put("status", item.getStatus());
            map.put("matnr", item.getMatnr());
            map.put("sku", item.getSku());
            map.put("po", item.getPo());
            map.put("upc", item.getUpc());
            map.put("supplier", item.getSupplier());
            map.put("orderNo", item.getOrderNo());
            map.put("ctns", item.getCtns());
            map.put("createTime", item.getCreateTime() != null ? item.getCreateTime().toString() : null);
            map.put("armError", item.getArmError() != null ? item.getArmError().toString() : null);  // 建议转
            map.put("armMsg", item.getArmMsg());
            map.put("barcode", item.getBarcode());
            map.put("status$", item.getStatus$());
            newRecords.add(map);
        }
        // 构造返回结构
        Map<String, Object> resultMap = new HashMap<>();
        resultMap.put("total", resultPage.getTotal());
        resultMap.put("size", resultPage.getSize());
        resultMap.put("current", resultPage.getCurrent());
        resultMap.put("pages", resultPage.getPages());
        resultMap.put("records", newRecords);
        return R.ok(resultMap);
    }
    @RequestMapping(value = "/basArmMast/listArm/auth")
    @ManagerAuth
src/main/java/com/zy/asrs/controller/BasArmMastLogController.java
@@ -39,12 +39,70 @@
                  @RequestParam(required = false)String condition,
                  @RequestParam Map<String, Object> param){
        EntityWrapper<BasArmMastLog> wrapper = new EntityWrapper<>();
        // ===================== 1. 手动处理 binding_tags 的精确匹配(字符串形式) =====================
        if (param.containsKey("binding_tags")) {
            String tag = String.valueOf(param.get("binding_tags")).trim();
            if (!tag.isEmpty()) {
                wrapper.eq("binding_tags", tag);
                System.out.println("手动添加精确条件: binding_tags = " + tag);
            }
            // 可选:移除原 param,防止 allLike 再次干扰(如果 allLike 会重复加条件)
            // param.remove("binding_tags");
        }
        // ===================== 2. 其他原有处理逻辑(模糊搜索等) =====================
        excludeTrash(param);
        convert(param, wrapper);
        allLike(BasArmMastLog.class, param.keySet(), wrapper, condition);
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
        wrapper.orderBy("create_time",false);
        return R.ok(basArmMastLogService.selectPage(new Page<>(curr, limit), wrapper));
        // 排序
        if (!Cools.isEmpty(orderByField)) {
            wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));
        }
        wrapper.orderBy("create_time", false);
        // 分页查询
        Page<BasArmMastLog> page = new Page<>(curr, limit);
        Page<BasArmMastLog> resultPage = basArmMastLogService.selectPage(page, wrapper);
        // ===================== 3. 返回数据处理(转字符串,防止前端精度丢失) =====================
        List<Map<String, Object>> newRecords = new ArrayList<>();
        for (BasArmMastLog item : resultPage.getRecords()) {
            Map<String, Object> map = new HashMap<>();
            map.put("id", item.getId() != null ? item.getId().toString() : null);  // 建议转字符串
            map.put("armNo", item.getArmNo());
            map.put("armDirection", item.getArmDirection());
            map.put("staNo", item.getStaNo());
            map.put("sortingLine", item.getSortingLine());
            map.put("bindingTags", item.getBindingTags() != null ? item.getBindingTags().toString() : null);
            map.put("priority", item.getPriority());
            map.put("status", item.getStatus());
            map.put("matnr", item.getMatnr());
            map.put("sku", item.getSku());
            map.put("po", item.getPo());
            map.put("upc", item.getUpc());
            map.put("supplier", item.getSupplier());
            map.put("orderNo", item.getOrderNo());
            map.put("ctns", item.getCtns());
            map.put("createTime", item.getCreateTime() != null ? item.getCreateTime().toString() : null);
            map.put("armError", item.getArmError() != null ? item.getArmError().toString() : null);  // 建议转
            map.put("armMsg", item.getArmMsg());
            map.put("barcode", item.getBarcode());
            map.put("status$", item.getStatus$());
            newRecords.add(map);
        }
        // 构造返回结构
        Map<String, Object> resultMap = new HashMap<>();
        resultMap.put("total", resultPage.getTotal());
        resultMap.put("size", resultPage.getSize());
        resultMap.put("current", resultPage.getCurrent());
        resultMap.put("pages", resultPage.getPages());
        resultMap.put("records", newRecords);
        return R.ok(resultMap);
    }
    private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){
src/main/java/com/zy/asrs/controller/BasArmMastSignController.java
@@ -39,12 +39,60 @@
                  @RequestParam(required = false)String condition,
                  @RequestParam Map<String, Object> param){
        EntityWrapper<BasArmMastSign> wrapper = new EntityWrapper<>();
        // ===================== 1. 手动处理 binding_tags 的精确匹配(字符串形式) =====================
        if (param.containsKey("create_time")) {
            String tag = String.valueOf(param.get("create_time")).trim();
            if (!tag.isEmpty()) {
                wrapper.eq("create_time", tag);
                System.out.println("手动添加精确条件: create_time = " + tag);
            }
            // 可选:移除原 param,防止 allLike 再次干扰(如果 allLike 会重复加条件)
            // param.remove("binding_tags");
        }
        // ===================== 2. 其他原有处理逻辑(模糊搜索等) =====================
        excludeTrash(param);
        convert(param, wrapper);
        allLike(BasArmMastSign.class, param.keySet(), wrapper, condition);
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
        wrapper.orderBy("create_time",false);
        return R.ok(basArmMastSignService.selectPage(new Page<>(curr, limit), wrapper));
        // 排序
        if (!Cools.isEmpty(orderByField)) {
            wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));
        }
        wrapper.orderBy("create_time", false);
        // 分页查询
        Page<BasArmMastSign> page = new Page<>(curr, limit);
        Page<BasArmMastSign> resultPage = basArmMastSignService.selectPage(page, wrapper);
        // ===================== 3. 返回数据处理(转字符串,防止前端精度丢失) =====================
        List<Map<String, Object>> newRecords = new ArrayList<>();
        for (BasArmMastSign item : resultPage.getRecords()) {
            Map<String, Object> map = new HashMap<>();
            map.put("id", item.getId() != null ? item.getId().toString() : null);  // 建议转字符串
            map.put("status", item.getStatus());
            map.put("matnr", item.getMatnr());
            map.put("sku", item.getSku());
            map.put("po", item.getPo());
            map.put("upc", item.getUpc());
            map.put("supplier", item.getSupplier());
            map.put("orderNo", item.getOrderNo());
            map.put("createTime", item.getCreateTime() != null ? item.getCreateTime().toString() : null);
            map.put("status$", item.getStatus$());
            newRecords.add(map);
        }
        // 构造返回结构
        Map<String, Object> resultMap = new HashMap<>();
        resultMap.put("total", resultPage.getTotal());
        resultMap.put("size", resultPage.getSize());
        resultMap.put("current", resultPage.getCurrent());
        resultMap.put("pages", resultPage.getPages());
        resultMap.put("records", newRecords);
        return R.ok(resultMap);
    }
    private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){
src/main/java/com/zy/asrs/task/kingdee/handler/SaveOrderSyncHandler.java
@@ -94,7 +94,7 @@
    }
    private JSONObject buildRequestParams(Order order, KingDeeUtilType kingDeeUtilType, SimpleDateFormat sdf1, SimpleDateFormat sdf2) {
        List<OrderDetl> orderDetlList = orderDetlService.selectList(new EntityWrapper<OrderDetl>().eq("order_no",order.getOrderNo()));
        List<OrderDetl> orderDetlList = orderDetlService.selectList(new EntityWrapper<OrderDetl>().eq("order_id",order.getId()));
        if (kingDeeUtilType == null || kingDeeUtilType.formId == null) {
            log.warn("kingDeeUtilType 为空,已跳过本次同步!");
            return null;
@@ -102,7 +102,6 @@
        switch (kingDeeUtilType.formId) {
            case "PUR_RECEIVEBIll": // 进仓通知单
                path = imPurinbillAdd;
                JSONArray billentryLkArray = new JSONArray();
                JSONArray billentryArray = new JSONArray();  // 用于存储 billentry 对象
                String suppCode = null;  // 供应商
                String boxType2 = null;  // 货主/货源
@@ -115,6 +114,8 @@
                    }
                    Mat mat = matService.selectByMatnr(orderDetl.getMatnr());
                    Double qty = orderDetl.getQty()*mat.getSafeQty();
                    JSONArray billentryLkArray = new JSONArray();
//                    Double qtytotal = orderDetl.getAnfme()*mat.getSafeQty();
//                    JSONArray idArr = new JSONArray();
//                    idArr.add(0L);