mrzhssss
2021-12-16 36b08172e90b5b03878145e5496edf1eb4a1af6d
src/main/java/com/zy/asrs/controller/LocNormalController.java
@@ -73,6 +73,8 @@
        allLike(LocNormal.class, param.keySet(), wrapper, condition);
        if (!Cools.isEmpty(orderByField)) {
            wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));
        } else {
            wrapper.orderBy("appe_time", false);
        }
        if (Cools.isEmpty(param.get("state"))) {
            wrapper.in("state", "1,2");
@@ -172,6 +174,19 @@
        LocNormalExcelListener listener = new LocNormalExcelListener(getUserId());
        EasyExcel.read(file.getInputStream(), LocNormalExcel.class, listener).sheet().doRead();
        return R.ok("成功导入" + listener.getTotal() + "条物料信息");
    }
    /* 导出 */
    @RequestMapping(value = "/locNormal/export/auth")
    @ManagerAuth(memo = "平仓管理导出")
    public R export(@RequestBody JSONObject param){
        List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
        EntityWrapper<LocNormal> wrapper = new EntityWrapper<LocNormal>();
        wrapper.ne("state", "3");
        Map<String, Object> map = excludeTrash(param.getJSONObject("exportData"));
        convert(map, wrapper);
        List<LocNormal> list = locNormalService.selectList(wrapper);
        return R.ok(exportSupport(list, fields));
    }
    /* 平仓入库 成品 */
@@ -311,7 +326,7 @@
    public R normalReportExport(@RequestBody JSONObject param){
        List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
        @SuppressWarnings("unchecked")
        List<LocNormalReport> list = JSONObject.parseArray(param.getJSONArray("exportData").toJSONString(), LocNormalReport.class);
        List<LocNormalLog> list = JSONObject.parseArray(param.getJSONArray("exportData").toJSONString(), LocNormalLog.class);
        return R.ok(exportSupport(list, fields));
    }
}