自动化立体仓库 - WMS系统
lty
2026-04-20 c82f9100d3586218e9e41497c2cea73a2cac44fe
src/main/java/com/zy/asrs/controller/LocDetlController.java
@@ -78,6 +78,26 @@
        return R.ok(locDetlPage);
    }
    @RequestMapping(value = "/locDetl/groupLocExport/auth")
    @ManagerAuth(memo = "库位汇总导出")
    public R groupLocExport(@RequestBody JSONObject param) {
        List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
        Map<String, Object> map = excludeTrash(param.getJSONObject("locDetl"));
        Map<String, Object> queryParam = new HashMap<>();
        putIfPresent(queryParam, "matnr", map.get("matnr"));
        putIfPresent(queryParam, "maktx", map.get("maktx"));
        putIfPresent(queryParam, "specs", map.get("specs"));
        putIfPresent(queryParam, "warnStatus", map.get("warnStatus"));
        int total = Optional.ofNullable(locDetlMapper.groupLocListCount(queryParam)).orElse(0);
        if (total <= 0) {
            return R.ok(new ArrayList<>());
        }
        queryParam.put("pageNumber", 1);
        queryParam.put("pageSize", total);
        List<AbnormalLocDetlParam> list = locDetlMapper.groupLocList(queryParam);
        return R.ok(exportSupport(list, fields));
    }
    private void putIfPresent(Map<String, Object> target, String key, Object value) {
        String normalized = normalizeFilterText(value);
        if (normalized != null) {