From e4ea838c20e94dff4fdbb4f82b542a8b5790fa9d Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期五, 18 六月 2021 09:22:06 +0800 Subject: [PATCH] # 库存跳转上报erp --- src/main/java/zy/cloud/wms/manager/controller/TagController.java | 20 ++++++++++++++++---- 1 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/main/java/zy/cloud/wms/manager/controller/TagController.java b/src/main/java/zy/cloud/wms/manager/controller/TagController.java index 8cedaf2..b5d596e 100644 --- a/src/main/java/zy/cloud/wms/manager/controller/TagController.java +++ b/src/main/java/zy/cloud/wms/manager/controller/TagController.java @@ -29,6 +29,18 @@ @Autowired private TreeUtils treeUtils; + @RequestMapping(value = "/tag/list/pda/auth") + @ManagerAuth + public R pdaList(@RequestParam(defaultValue = "1")Integer curr, + @RequestParam(defaultValue = "10")Integer limit, + @RequestParam(required = false)Long parentId){ + EntityWrapper<Tag> wrapper = new EntityWrapper<>(); + wrapper.eq("parent_id", parentId==null?getOriginTag().getId():parentId); + wrapper.orderBy("sort"); + List<Tag> tags = tagService.selectList(wrapper); + return R.ok().add(tags); + } + @RequestMapping(value = "/tag/{id}/auth") @ManagerAuth public R get(@PathVariable("id") String id) { @@ -141,13 +153,13 @@ @ManagerAuth public R query(String condition) { EntityWrapper<Tag> wrapper = new EntityWrapper<>(); - wrapper.like("id", condition); + wrapper.like("uuid", condition).or().like("name", condition); Page<Tag> page = tagService.selectPage(new Page<>(0, 10), wrapper); List<Map<String, Object>> result = new ArrayList<>(); for (Tag tag : page.getRecords()){ Map<String, Object> map = new HashMap<>(); map.put("id", tag.getId()); - map.put("value", tag.getId()); + map.put("value", tag.getName()); result.add(map); } return R.ok(result); @@ -166,14 +178,14 @@ @PostMapping(value = "/tag/tree/auth") @ManagerAuth public R tree(@RequestParam(required = false, defaultValue = "") String condition) throws IOException, ClassNotFoundException { - ArrayList<Map> tree = treeUtils.getTree("1"); + ArrayList<Map> tree = treeUtils.getTree(String.valueOf(getOriginTag().getId())); // 娣辨嫹璐� List<Map> result = ListUtils.deepCopy(tree); if (!Cools.isEmpty(condition)) { treeUtils.remove(condition, result); treeUtils.remove(condition, result); } - return R.ok(tree); + return R.ok(result); } } -- Gitblit v1.9.1