| | |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<DocType> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | if(param.containsKey("doc_class")){ |
| | | Integer docClass = Integer.parseInt(param.get("doc_class").toString()); |
| | | wrapper.eq("doc_class",param.get("doc_class")); |
| | | param.remove("doc_class"); |
| | | } |
| | | convert(param, wrapper); |
| | | hostEq(wrapper); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | |
| | | @RequestMapping(value = "/docType/add/auth") |
| | | @ManagerAuth |
| | | public R add(DocType docType) { |
| | | if(Cools.isEmpty(docType) || null==docType.getDocId()) { |
| | | return R.error(); |
| | | } |
| | | DocType one = docTypeService.selectOne(new EntityWrapper<DocType>().eq("doc_id", docType.getDocId())); |
| | | if(!Cools.isEmpty(one)){ |
| | | return R.error("单据编码已存在"); |
| | | } |
| | | docType.setHostId(getHostId()); |
| | | docType.setCreateBy(getUserId()); |
| | | docType.setCreateTime(new Date()); |