##
mrzhssss
2022-09-06 20004f666ec4568ba161a112cb6d955dedc1014a
src/main/java/zy/cloud/wms/manager/controller/DocTypeController.java
@@ -39,6 +39,11 @@
                  @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));}
@@ -61,6 +66,13 @@
    @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());