| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/docType/add/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "新增单据类型") |
| | | public R add(DocType docType) { |
| | | docType.setStatus(1); |
| | | docType.setCreateBy(getUserId()); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/docType/update/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "修改单据类型") |
| | | public R update(DocType docType){ |
| | | if (Cools.isEmpty(docType) || null==docType.getDocId()){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/docType/delete/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "删除单据类型") |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | docTypeService.deleteById(id); |
| | |
| | | public R query(String condition) { |
| | | EntityWrapper<DocType> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("doc_name", condition); |
| | | Page<DocType> page = docTypeService.selectPage(new Page<>(0, 10), wrapper); |
| | | wrapper.eq("status", 1); |
| | | Page<DocType> page = docTypeService.selectPage(new Page<>(0, 30), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (DocType docType : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |