Pārlūkot izejas kodu

党员管理-党务工作指引-党务工作资源库

lizeyu 9 mēneši atpakaļ
vecāks
revīzija
2c2cb72864
26 mainītis faili ar 4237 papildinājumiem un 0 dzēšanām
  1. 306 0
      src/main/java/com/ghsc/partybuild/controller/workresourcelibrary/WorkResourceLibraryController.java
  2. 30 0
      src/main/java/com/ghsc/partybuild/mapper/DjWorkresourcelibraryMapper.java
  3. 30 0
      src/main/java/com/ghsc/partybuild/mapper/DjWorkresourcelibrarytypeMapper.java
  4. 85 0
      src/main/java/com/ghsc/partybuild/model/DjWorkresourcelibrary.java
  5. 741 0
      src/main/java/com/ghsc/partybuild/model/DjWorkresourcelibraryExample.java
  6. 43 0
      src/main/java/com/ghsc/partybuild/model/DjWorkresourcelibrarytype.java
  7. 470 0
      src/main/java/com/ghsc/partybuild/model/DjWorkresourcelibrarytypeExample.java
  8. 278 0
      src/main/java/com/ghsc/partybuild/service/impl/workresourcelibrary/WorkResourceLibraryServiceImpl.java
  9. 123 0
      src/main/java/com/ghsc/partybuild/service/workresourcelibrary/WorkResourceLibraryService.java
  10. 2 0
      src/main/resources/generatorConfig.xml
  11. 258 0
      src/main/resources/mapping/DjWorkresourcelibraryMapper.xml
  12. 196 0
      src/main/resources/mapping/DjWorkresourcelibrarytypeMapper.xml
  13. 20 0
      src/main/resources/static/app/main/app.js
  14. 10 0
      src/main/resources/static/app/main/partyUser/workResourceLibrary/fileEdit.css
  15. 109 0
      src/main/resources/static/app/main/partyUser/workResourceLibrary/fileEdit.html
  16. 5 0
      src/main/resources/static/app/main/partyUser/workResourceLibrary/fileFrame.html
  17. 12 0
      src/main/resources/static/app/main/partyUser/workResourceLibrary/fileFrame.js
  18. 87 0
      src/main/resources/static/app/main/partyUser/workResourceLibrary/fileTabList.html
  19. 695 0
      src/main/resources/static/app/main/partyUser/workResourceLibrary/fileTabList.js
  20. 60 0
      src/main/resources/static/app/main/partyUser/workResourceLibrary/fileTreeList.css
  21. 127 0
      src/main/resources/static/app/main/partyUser/workResourceLibrary/fileTreeList.html
  22. 77 0
      src/main/resources/static/app/main/partyUser/workResourceLibrary/filetype/edit.html
  23. 121 0
      src/main/resources/static/app/main/partyUser/workResourceLibrary/filetype/manage.html
  24. 303 0
      src/main/resources/static/app/main/partyUser/workResourceLibrary/filetype/manage.js
  25. 7 0
      src/main/resources/static/app/main/partyUser/workResourceLibrary/filetype/select.css
  26. 42 0
      src/main/resources/static/app/main/partyUser/workResourceLibrary/filetype/selectParent.html

+ 306 - 0
src/main/java/com/ghsc/partybuild/controller/workresourcelibrary/WorkResourceLibraryController.java

@@ -0,0 +1,306 @@
+package com.ghsc.partybuild.controller.workresourcelibrary;
+
+import com.ghsc.partybuild.AppConfig;
+import com.ghsc.partybuild.controller.jsonmodel.RequsetData;
+import com.ghsc.partybuild.model.DjWorkresourcelibrary;
+import com.ghsc.partybuild.model.DjWorkresourcelibrarytype;
+import com.ghsc.partybuild.service.workresourcelibrary.WorkResourceLibraryService;
+import com.ghsc.partybuild.util.Word2PdfUtil;
+import com.ghsc.partybuild.vo.DsjTreeFiletype;
+import com.github.pagehelper.PageInfo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.URLEncoder;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.*;
+ 
+
+@RestController
+@RequestMapping(value = "/api/workresourcelibrary")
+public class WorkResourceLibraryController {
+
+    private final Logger logger;
+
+    public WorkResourceLibraryController() {
+        logger = LoggerFactory.getLogger(this.getClass());
+    }
+
+    @Autowired
+    private WorkResourceLibraryService workResourceLibraryService;
+
+    @Autowired
+    private Word2PdfUtil word2PdfUtil;
+
+    @Autowired
+    private AppConfig appConfig;
+
+    @GetMapping("/GetFilesByType")
+    @ResponseBody
+    public RequsetData<PageInfo<DjWorkresourcelibrary>> GetFilesByType(@RequestParam("filetypeid") String fileTypeId, @RequestParam(required = false) String fileName , @RequestParam("pageindex") int pageIndex, @RequestParam("pagesize") int pageSize) {
+        RequsetData<PageInfo<DjWorkresourcelibrary>> res = new RequsetData<>();
+
+        res.setItem(workResourceLibraryService.getFilesByType(fileTypeId,fileName,pageIndex, pageSize));
+
+        return res;
+    }
+    @ResponseBody
+    @GetMapping("/getFile")
+    public RequsetData<DjWorkresourcelibrary> getFile(@RequestParam(required = false) String fileId) {
+        RequsetData<DjWorkresourcelibrary> result = new RequsetData<>();
+        DjWorkresourcelibrary model = workResourceLibraryService.getFileInfo(fileId);
+        if (model==null) {
+            model=new DjWorkresourcelibrary();
+            model.setFileid(UUID.randomUUID().toString());
+        }
+        result.setItem(model);
+        return result;
+    }
+    @ResponseBody
+    @PostMapping("/saveFile")
+    public RequsetData<String> saveFile(@RequestBody DjWorkresourcelibrary model) {
+
+        RequsetData<String> result = new RequsetData<>();
+        model.setCreatedatetime(new Date());
+        model.setFileurl(model.getFileid());
+        model.setExtendedname(".pdf");
+        result = workResourceLibraryService.saveFile(model);
+
+        return result;
+    }
+    @ResponseBody
+    @GetMapping("/deleteFile")
+    public RequsetData<Integer> deleteFile(@RequestParam("fileId") String fileId) {
+
+        RequsetData<Integer> result = new RequsetData<>();
+        int row = workResourceLibraryService.deleteFile(fileId);
+        result.setItem(row);
+        if (row == 0) {
+            result.setSuccess(false);
+            result.setMsg("删除失败!");
+        } else {
+            result.setMsg("删除成功!");
+        }
+        return result;
+    }
+    @GetMapping("/GetFilesByKey")
+    @ResponseBody
+    public RequsetData<PageInfo<DjWorkresourcelibrary>> GetFilesByKey(@RequestParam("fileName") String fileName, @RequestParam("pageindex") int pageIndex, @RequestParam("pagesize") int pageSize) {
+        RequsetData<PageInfo<DjWorkresourcelibrary>> res = new RequsetData<>();
+
+        res.setItem(workResourceLibraryService.getFilesByKey(fileName, pageIndex, pageSize));
+
+        return res;
+    }
+
+    @GetMapping("/GetFileTypeRoot")
+    @ResponseBody
+    public RequsetData<List<DsjTreeFiletype>> GetFileTypeRoot() {
+        RequsetData<List<DsjTreeFiletype>> res = new RequsetData<>();
+        //res.setItem(workResourceLibraryService.getFileTypeRoot());
+        res.setItem(workResourceLibraryService.getFileTreeByParent("",null,null));
+        return res;
+    }
+
+    @GetMapping("/GetFileTypesByParent")
+    @ResponseBody
+    public RequsetData<List<DsjTreeFiletype>> GetFileTypesByParent(@RequestParam("parentid") String parentId) {
+        RequsetData<List<DsjTreeFiletype>> res = new RequsetData<>();
+        //List<DjWorkresourcelibrarytype> parents = workResourceLibraryService.getFileTypeByParent(parentId);
+        List<DsjTreeFiletype> parents = workResourceLibraryService.getFileTreeByParent(parentId,null,null);
+        res.setItem(parents);
+        return res;
+    }
+    @GetMapping("/getFiletypeList")
+    @ResponseBody
+    public RequsetData<PageInfo<Map<String, Object>>> getFiletypeList(@RequestParam(required=false) String typename,@RequestParam(required=false) String parentId,@RequestParam("pageindex") int pageIndex, @RequestParam("pagesize") int pageSize) {
+        RequsetData<PageInfo<Map<String, Object>>> res = new RequsetData<>();
+        PageInfo<Map<String, Object>> list = workResourceLibraryService.selectFiletypeList(typename,parentId,pageIndex, pageSize);
+        res.setItem(list);
+        return res;
+    }
+    @ResponseBody
+    @GetMapping("/getFiletype")
+    public RequsetData<DjWorkresourcelibrarytype> getFiletype(@RequestParam(required = false) String typeid) {
+        RequsetData<DjWorkresourcelibrarytype> result = new RequsetData<>();
+
+        DjWorkresourcelibrarytype filetype = workResourceLibraryService.getFiletype(typeid);
+        if (filetype!=null) {
+            result.setSuccess(true);
+            result.setItem(filetype);
+        } else {
+            result.setSuccess(false);
+            result.setMsg("查找不到记录!");
+        }
+        return result;
+    }
+    @ResponseBody
+    @GetMapping("/deleteFiletype")
+    public RequsetData<Integer> deleteFiletype(@RequestParam("typeid") String typeid) {
+
+        RequsetData<Integer> result = new RequsetData<>();
+        int row = workResourceLibraryService.deleteFiletype(typeid);
+        result.setItem(row);
+        if (row == 0) {
+            result.setSuccess(false);
+            result.setMsg("删除失败!");
+        } else {
+            result.setMsg("删除成功!");
+        }
+        return result;
+    }
+    @ResponseBody
+    @PostMapping("/saveFiletype")
+    public RequsetData<String> saveFiletype(@RequestBody DjWorkresourcelibrarytype model) {
+
+        RequsetData<String> result = new RequsetData<>();
+        result = workResourceLibraryService.saveFiletype(model);
+
+        return result;
+    }
+    @RequestMapping({"/showDoc/{fileId}"})
+    @ResponseBody
+    public String showDoc(HttpServletResponse response, @PathVariable("fileId") String fileId) {
+        response.setContentType("application/pdf");
+        //response.setContentType("text/html");
+        DjWorkresourcelibrary file = workResourceLibraryService.getFileInfo(fileId);
+        if (file != null) {
+            try {
+                /**
+                 切换为读取hapoo的文件
+                 Path pFileName= Paths.get(appConfig.fileMgrUrl,file.getFileurl()+file.getExtendedname());
+                 if (Files.exists(pFileName)) {
+                 InputStream doc =Files.newInputStream(pFileName);
+                 OutputStream os = response.getOutputStream();
+                 word2PdfUtil.doc2pdf(doc,os);
+                 }*/
+                /*
+                Path pFileName = Paths.get(appConfig.fileMgrUrl, file.getFileurl() + file.getExtendedname());
+                if (Files.exists(pFileName)) {
+                    InputStream doc = Files.newInputStream(pFileName);
+                    OutputStream os = response.getOutputStream();
+                    word2PdfUtil.doc2pdf(doc, os);
+                }*/
+                Path pFileName = Paths.get(appConfig.fileMgrUrl, file.getFileurl() + file.getExtendedname());
+                if (Files.exists(pFileName)) {
+                    OutputStream os = response.getOutputStream();
+                    Files.copy(pFileName, os);
+                }
+
+            } catch (Exception ex) {
+                fileId = ex.getMessage();
+                logger.info("showPDS失败:" + ex.getMessage());
+            }
+        }
+        return fileId;
+    }
+
+    @ResponseBody
+    @PostMapping("/postFile")
+    public RequsetData<Object> PostFile(@RequestParam("file") MultipartFile file, @RequestParam("fileId") String fileId) {
+        RequsetData<Object> res = new RequsetData<>();
+
+        //byte[] byteArr = null;
+        try {
+            //byteArr = file.getBytes();
+            String fileName=file.getOriginalFilename();
+
+            String fileExt=fileName.substring(fileName.lastIndexOf(".")).toLowerCase();
+
+            if(!appConfig.safeExts.contains(fileExt)){
+                res.setSuccess(false);
+                res.setMsg("上传失败:只能是pdf文件!");
+                return res;
+            }
+
+            Path pFileName = Paths.get(appConfig.fileMgrUrl, fileId+".pdf");
+            if(Files.exists(pFileName)){
+                Files.delete(pFileName);
+            }
+            //Files.copy(pFileName,);
+            file.transferTo(pFileName);
+            res.setMsg("上传成功!");
+        } catch (IOException e) {
+
+            res.setSuccess(false);
+            res.setMsg("上传失败:"+e.getMessage());
+        }
+
+        return res;
+    }
+
+    @RequestMapping({"/downDoc/{fileId}"})
+    @ResponseBody
+    public String downDoc(HttpServletResponse response, HttpServletRequest request, @PathVariable("fileId") String fileId) {
+
+        DjWorkresourcelibrary file = workResourceLibraryService.getFileInfo(fileId);
+        if (file != null) {
+            Path pFileName = Paths.get(appConfig.fileMgrUrl, file.getFileurl() + file.getExtendedname());
+            try {
+                if (Files.exists(pFileName)) {
+                    response.setContentType("application/force-download");// 设置强制下载不打开
+                    response.setContentType("multipart/form-data;charset=UTF-8");
+
+                    String fileName = file.getFilename() + file.getExtendedname();
+                    String downloadFileName;
+                    String agent = request.getHeader("USER-AGENT");
+                    if (agent != null && agent.toLowerCase().indexOf("firefox") > 0) {
+                        downloadFileName = "=?UTF-8?B?" + (new String(Base64.getEncoder().encodeToString(fileName.getBytes("UTF-8")))) + "?=";
+                    } else {
+                        downloadFileName = URLEncoder.encode(fileName, "UTF-8");
+                    }
+
+                    response.addHeader("Content-Disposition",
+                            "attachment;fileName=" + downloadFileName);// 设置文件名
+
+
+                    OutputStream os = response.getOutputStream();
+                    Files.copy(pFileName, os);
+                }
+
+            } catch (Exception ex) {
+                fileId = ex.getMessage();
+                logger.info("downDoc:" + ex.getMessage());
+            }
+        }
+        return fileId;
+    }
+
+
+    /**
+     * @Description //TODO 查询cf_file表附件
+     * @Date 17:32 2019/7/31
+     * @Param [fileRefID, fileTypeId, pageIndex, pageSize]
+     **/
+    @GetMapping("/getFileList")
+    @ResponseBody
+    public RequsetData<PageInfo<Map<String, Object>>> GetFileList(@RequestParam("filerefid") String fileRefID, @RequestParam(required = false) Integer fileTypeId, @RequestParam("pageindex") int pageIndex, @RequestParam("pagesize") int pageSize) {
+        RequsetData<PageInfo<Map<String, Object>>> res = new RequsetData<>();
+
+        res.setItem(workResourceLibraryService.getFileList(fileRefID, fileTypeId, pageIndex, pageSize));
+
+        return res;
+    }
+
+    @GetMapping("/selectAllFile")
+    @ResponseBody
+    public RequsetData<List<Map<String, Object>>> selectAllFile() {
+        RequsetData<List<Map<String, Object>>> res = new RequsetData<>();
+
+        res.setItem(workResourceLibraryService.selectAllFile());
+
+        return res;
+    }
+
+
+
+}

+ 30 - 0
src/main/java/com/ghsc/partybuild/mapper/DjWorkresourcelibraryMapper.java

@@ -0,0 +1,30 @@
+package com.ghsc.partybuild.mapper;
+
+import com.ghsc.partybuild.model.DjWorkresourcelibrary;
+import com.ghsc.partybuild.model.DjWorkresourcelibraryExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface DjWorkresourcelibraryMapper {
+    long countByExample(DjWorkresourcelibraryExample example);
+
+    int deleteByExample(DjWorkresourcelibraryExample example);
+
+    int deleteByPrimaryKey(String fileid);
+
+    int insert(DjWorkresourcelibrary record);
+
+    int insertSelective(DjWorkresourcelibrary record);
+
+    List<DjWorkresourcelibrary> selectByExample(DjWorkresourcelibraryExample example);
+
+    DjWorkresourcelibrary selectByPrimaryKey(String fileid);
+
+    int updateByExampleSelective(@Param("record") DjWorkresourcelibrary record, @Param("example") DjWorkresourcelibraryExample example);
+
+    int updateByExample(@Param("record") DjWorkresourcelibrary record, @Param("example") DjWorkresourcelibraryExample example);
+
+    int updateByPrimaryKeySelective(DjWorkresourcelibrary record);
+
+    int updateByPrimaryKey(DjWorkresourcelibrary record);
+}

+ 30 - 0
src/main/java/com/ghsc/partybuild/mapper/DjWorkresourcelibrarytypeMapper.java

@@ -0,0 +1,30 @@
+package com.ghsc.partybuild.mapper;
+
+import com.ghsc.partybuild.model.DjWorkresourcelibrarytype;
+import com.ghsc.partybuild.model.DjWorkresourcelibrarytypeExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface DjWorkresourcelibrarytypeMapper {
+    long countByExample(DjWorkresourcelibrarytypeExample example);
+
+    int deleteByExample(DjWorkresourcelibrarytypeExample example);
+
+    int deleteByPrimaryKey(String filetypeid);
+
+    int insert(DjWorkresourcelibrarytype record);
+
+    int insertSelective(DjWorkresourcelibrarytype record);
+
+    List<DjWorkresourcelibrarytype> selectByExample(DjWorkresourcelibrarytypeExample example);
+
+    DjWorkresourcelibrarytype selectByPrimaryKey(String filetypeid);
+
+    int updateByExampleSelective(@Param("record") DjWorkresourcelibrarytype record, @Param("example") DjWorkresourcelibrarytypeExample example);
+
+    int updateByExample(@Param("record") DjWorkresourcelibrarytype record, @Param("example") DjWorkresourcelibrarytypeExample example);
+
+    int updateByPrimaryKeySelective(DjWorkresourcelibrarytype record);
+
+    int updateByPrimaryKey(DjWorkresourcelibrarytype record);
+}

+ 85 - 0
src/main/java/com/ghsc/partybuild/model/DjWorkresourcelibrary.java

@@ -0,0 +1,85 @@
+package com.ghsc.partybuild.model;
+
+import java.util.Date;
+
+public class DjWorkresourcelibrary {
+    private String fileid;
+
+    private String filename;
+
+    private String fileurl;
+
+    private String extendedname;
+
+    private Date createdatetime;
+
+    private String filetypeid;
+
+    private String filecode;
+
+    private Integer filecode2;
+
+    public String getFileid() {
+        return fileid;
+    }
+
+    public void setFileid(String fileid) {
+        this.fileid = fileid == null ? null : fileid.trim();
+    }
+
+    public String getFilename() {
+        return filename;
+    }
+
+    public void setFilename(String filename) {
+        this.filename = filename == null ? null : filename.trim();
+    }
+
+    public String getFileurl() {
+        return fileurl;
+    }
+
+    public void setFileurl(String fileurl) {
+        this.fileurl = fileurl == null ? null : fileurl.trim();
+    }
+
+    public String getExtendedname() {
+        return extendedname;
+    }
+
+    public void setExtendedname(String extendedname) {
+        this.extendedname = extendedname == null ? null : extendedname.trim();
+    }
+
+    public Date getCreatedatetime() {
+        return createdatetime;
+    }
+
+    public void setCreatedatetime(Date createdatetime) {
+        this.createdatetime = createdatetime;
+    }
+
+    public String getFiletypeid() {
+        return filetypeid;
+    }
+
+    public void setFiletypeid(String filetypeid) {
+        this.filetypeid = filetypeid == null ? null : filetypeid.trim();
+    }
+
+    public String getFilecode() {
+        return filecode;
+    }
+
+    public void setFilecode(String filecode) {
+        this.filecode = filecode == null ? null : filecode.trim();
+    }
+
+    public Integer getFilecode2() {
+        return filecode2;
+    }
+
+    public void setFilecode2(Integer filecode2) {
+        this.filecode2 = filecode2;
+    }
+}

+ 741 - 0
src/main/java/com/ghsc/partybuild/model/DjWorkresourcelibraryExample.java

@@ -0,0 +1,741 @@
+package com.ghsc.partybuild.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class DjWorkresourcelibraryExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public DjWorkresourcelibraryExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andFileidIsNull() {
+            addCriterion("FILEID is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileidIsNotNull() {
+            addCriterion("FILEID is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileidEqualTo(String value) {
+            addCriterion("FILEID =", value, "fileid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileidNotEqualTo(String value) {
+            addCriterion("FILEID <>", value, "fileid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileidGreaterThan(String value) {
+            addCriterion("FILEID >", value, "fileid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileidGreaterThanOrEqualTo(String value) {
+            addCriterion("FILEID >=", value, "fileid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileidLessThan(String value) {
+            addCriterion("FILEID <", value, "fileid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileidLessThanOrEqualTo(String value) {
+            addCriterion("FILEID <=", value, "fileid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileidLike(String value) {
+            addCriterion("FILEID like", value, "fileid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileidNotLike(String value) {
+            addCriterion("FILEID not like", value, "fileid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileidIn(List<String> values) {
+            addCriterion("FILEID in", values, "fileid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileidNotIn(List<String> values) {
+            addCriterion("FILEID not in", values, "fileid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileidBetween(String value1, String value2) {
+            addCriterion("FILEID between", value1, value2, "fileid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileidNotBetween(String value1, String value2) {
+            addCriterion("FILEID not between", value1, value2, "fileid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilenameIsNull() {
+            addCriterion("FILENAME is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilenameIsNotNull() {
+            addCriterion("FILENAME is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilenameEqualTo(String value) {
+            addCriterion("FILENAME =", value, "filename");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilenameNotEqualTo(String value) {
+            addCriterion("FILENAME <>", value, "filename");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilenameGreaterThan(String value) {
+            addCriterion("FILENAME >", value, "filename");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilenameGreaterThanOrEqualTo(String value) {
+            addCriterion("FILENAME >=", value, "filename");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilenameLessThan(String value) {
+            addCriterion("FILENAME <", value, "filename");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilenameLessThanOrEqualTo(String value) {
+            addCriterion("FILENAME <=", value, "filename");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilenameLike(String value) {
+            addCriterion("FILENAME like", value, "filename");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilenameNotLike(String value) {
+            addCriterion("FILENAME not like", value, "filename");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilenameIn(List<String> values) {
+            addCriterion("FILENAME in", values, "filename");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilenameNotIn(List<String> values) {
+            addCriterion("FILENAME not in", values, "filename");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilenameBetween(String value1, String value2) {
+            addCriterion("FILENAME between", value1, value2, "filename");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilenameNotBetween(String value1, String value2) {
+            addCriterion("FILENAME not between", value1, value2, "filename");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileurlIsNull() {
+            addCriterion("FILEURL is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileurlIsNotNull() {
+            addCriterion("FILEURL is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileurlEqualTo(String value) {
+            addCriterion("FILEURL =", value, "fileurl");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileurlNotEqualTo(String value) {
+            addCriterion("FILEURL <>", value, "fileurl");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileurlGreaterThan(String value) {
+            addCriterion("FILEURL >", value, "fileurl");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileurlGreaterThanOrEqualTo(String value) {
+            addCriterion("FILEURL >=", value, "fileurl");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileurlLessThan(String value) {
+            addCriterion("FILEURL <", value, "fileurl");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileurlLessThanOrEqualTo(String value) {
+            addCriterion("FILEURL <=", value, "fileurl");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileurlLike(String value) {
+            addCriterion("FILEURL like", value, "fileurl");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileurlNotLike(String value) {
+            addCriterion("FILEURL not like", value, "fileurl");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileurlIn(List<String> values) {
+            addCriterion("FILEURL in", values, "fileurl");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileurlNotIn(List<String> values) {
+            addCriterion("FILEURL not in", values, "fileurl");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileurlBetween(String value1, String value2) {
+            addCriterion("FILEURL between", value1, value2, "fileurl");
+            return (Criteria) this;
+        }
+
+        public Criteria andFileurlNotBetween(String value1, String value2) {
+            addCriterion("FILEURL not between", value1, value2, "fileurl");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtendednameIsNull() {
+            addCriterion("EXTENDEDNAME is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtendednameIsNotNull() {
+            addCriterion("EXTENDEDNAME is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtendednameEqualTo(String value) {
+            addCriterion("EXTENDEDNAME =", value, "extendedname");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtendednameNotEqualTo(String value) {
+            addCriterion("EXTENDEDNAME <>", value, "extendedname");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtendednameGreaterThan(String value) {
+            addCriterion("EXTENDEDNAME >", value, "extendedname");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtendednameGreaterThanOrEqualTo(String value) {
+            addCriterion("EXTENDEDNAME >=", value, "extendedname");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtendednameLessThan(String value) {
+            addCriterion("EXTENDEDNAME <", value, "extendedname");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtendednameLessThanOrEqualTo(String value) {
+            addCriterion("EXTENDEDNAME <=", value, "extendedname");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtendednameLike(String value) {
+            addCriterion("EXTENDEDNAME like", value, "extendedname");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtendednameNotLike(String value) {
+            addCriterion("EXTENDEDNAME not like", value, "extendedname");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtendednameIn(List<String> values) {
+            addCriterion("EXTENDEDNAME in", values, "extendedname");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtendednameNotIn(List<String> values) {
+            addCriterion("EXTENDEDNAME not in", values, "extendedname");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtendednameBetween(String value1, String value2) {
+            addCriterion("EXTENDEDNAME between", value1, value2, "extendedname");
+            return (Criteria) this;
+        }
+
+        public Criteria andExtendednameNotBetween(String value1, String value2) {
+            addCriterion("EXTENDEDNAME not between", value1, value2, "extendedname");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedatetimeIsNull() {
+            addCriterion("CREATEDATETIME is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedatetimeIsNotNull() {
+            addCriterion("CREATEDATETIME is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedatetimeEqualTo(Date value) {
+            addCriterion("CREATEDATETIME =", value, "createdatetime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedatetimeNotEqualTo(Date value) {
+            addCriterion("CREATEDATETIME <>", value, "createdatetime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedatetimeGreaterThan(Date value) {
+            addCriterion("CREATEDATETIME >", value, "createdatetime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedatetimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("CREATEDATETIME >=", value, "createdatetime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedatetimeLessThan(Date value) {
+            addCriterion("CREATEDATETIME <", value, "createdatetime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedatetimeLessThanOrEqualTo(Date value) {
+            addCriterion("CREATEDATETIME <=", value, "createdatetime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedatetimeIn(List<Date> values) {
+            addCriterion("CREATEDATETIME in", values, "createdatetime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedatetimeNotIn(List<Date> values) {
+            addCriterion("CREATEDATETIME not in", values, "createdatetime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedatetimeBetween(Date value1, Date value2) {
+            addCriterion("CREATEDATETIME between", value1, value2, "createdatetime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreatedatetimeNotBetween(Date value1, Date value2) {
+            addCriterion("CREATEDATETIME not between", value1, value2, "createdatetime");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidIsNull() {
+            addCriterion("FILETYPEID is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidIsNotNull() {
+            addCriterion("FILETYPEID is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidEqualTo(String value) {
+            addCriterion("FILETYPEID =", value, "filetypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidNotEqualTo(String value) {
+            addCriterion("FILETYPEID <>", value, "filetypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidGreaterThan(String value) {
+            addCriterion("FILETYPEID >", value, "filetypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidGreaterThanOrEqualTo(String value) {
+            addCriterion("FILETYPEID >=", value, "filetypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidLessThan(String value) {
+            addCriterion("FILETYPEID <", value, "filetypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidLessThanOrEqualTo(String value) {
+            addCriterion("FILETYPEID <=", value, "filetypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidLike(String value) {
+            addCriterion("FILETYPEID like", value, "filetypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidNotLike(String value) {
+            addCriterion("FILETYPEID not like", value, "filetypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidIn(List<String> values) {
+            addCriterion("FILETYPEID in", values, "filetypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidNotIn(List<String> values) {
+            addCriterion("FILETYPEID not in", values, "filetypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidBetween(String value1, String value2) {
+            addCriterion("FILETYPEID between", value1, value2, "filetypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidNotBetween(String value1, String value2) {
+            addCriterion("FILETYPEID not between", value1, value2, "filetypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecodeIsNull() {
+            addCriterion("FILECODE is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecodeIsNotNull() {
+            addCriterion("FILECODE is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecodeEqualTo(String value) {
+            addCriterion("FILECODE =", value, "filecode");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecodeNotEqualTo(String value) {
+            addCriterion("FILECODE <>", value, "filecode");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecodeGreaterThan(String value) {
+            addCriterion("FILECODE >", value, "filecode");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecodeGreaterThanOrEqualTo(String value) {
+            addCriterion("FILECODE >=", value, "filecode");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecodeLessThan(String value) {
+            addCriterion("FILECODE <", value, "filecode");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecodeLessThanOrEqualTo(String value) {
+            addCriterion("FILECODE <=", value, "filecode");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecodeLike(String value) {
+            addCriterion("FILECODE like", value, "filecode");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecodeNotLike(String value) {
+            addCriterion("FILECODE not like", value, "filecode");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecodeIn(List<String> values) {
+            addCriterion("FILECODE in", values, "filecode");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecodeNotIn(List<String> values) {
+            addCriterion("FILECODE not in", values, "filecode");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecodeBetween(String value1, String value2) {
+            addCriterion("FILECODE between", value1, value2, "filecode");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecodeNotBetween(String value1, String value2) {
+            addCriterion("FILECODE not between", value1, value2, "filecode");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecode2IsNull() {
+            addCriterion("FILECODE2 is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecode2IsNotNull() {
+            addCriterion("FILECODE2 is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecode2EqualTo(Integer value) {
+            addCriterion("FILECODE2 =", value, "filecode2");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecode2NotEqualTo(Integer value) {
+            addCriterion("FILECODE2 <>", value, "filecode2");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecode2GreaterThan(Integer value) {
+            addCriterion("FILECODE2 >", value, "filecode2");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecode2GreaterThanOrEqualTo(Integer value) {
+            addCriterion("FILECODE2 >=", value, "filecode2");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecode2LessThan(Integer value) {
+            addCriterion("FILECODE2 <", value, "filecode2");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecode2LessThanOrEqualTo(Integer value) {
+            addCriterion("FILECODE2 <=", value, "filecode2");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecode2In(List<Integer> values) {
+            addCriterion("FILECODE2 in", values, "filecode2");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecode2NotIn(List<Integer> values) {
+            addCriterion("FILECODE2 not in", values, "filecode2");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecode2Between(Integer value1, Integer value2) {
+            addCriterion("FILECODE2 between", value1, value2, "filecode2");
+            return (Criteria) this;
+        }
+
+        public Criteria andFilecode2NotBetween(Integer value1, Integer value2) {
+            addCriterion("FILECODE2 not between", value1, value2, "filecode2");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 43 - 0
src/main/java/com/ghsc/partybuild/model/DjWorkresourcelibrarytype.java

@@ -0,0 +1,43 @@
+package com.ghsc.partybuild.model;
+
+public class DjWorkresourcelibrarytype {
+    private String filetypeid;
+
+    private String parenttypeid;
+
+    private String filetypename;
+
+    private Integer treelevel;
+
+    public String getFiletypeid() {
+        return filetypeid;
+    }
+
+    public void setFiletypeid(String filetypeid) {
+        this.filetypeid = filetypeid == null ? null : filetypeid.trim();
+    }
+
+    public String getParenttypeid() {
+        return parenttypeid;
+    }
+
+    public void setParenttypeid(String parenttypeid) {
+        this.parenttypeid = parenttypeid == null ? null : parenttypeid.trim();
+    }
+
+    public String getFiletypename() {
+        return filetypename;
+    }
+
+    public void setFiletypename(String filetypename) {
+        this.filetypename = filetypename == null ? null : filetypename.trim();
+    }
+
+    public Integer getTreelevel() {
+        return treelevel;
+    }
+
+    public void setTreelevel(Integer treelevel) {
+        this.treelevel = treelevel;
+    }
+}

+ 470 - 0
src/main/java/com/ghsc/partybuild/model/DjWorkresourcelibrarytypeExample.java

@@ -0,0 +1,470 @@
+package com.ghsc.partybuild.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class DjWorkresourcelibrarytypeExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public DjWorkresourcelibrarytypeExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andFiletypeidIsNull() {
+            addCriterion("FILETYPEID is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidIsNotNull() {
+            addCriterion("FILETYPEID is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidEqualTo(String value) {
+            addCriterion("FILETYPEID =", value, "filetypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidNotEqualTo(String value) {
+            addCriterion("FILETYPEID <>", value, "filetypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidGreaterThan(String value) {
+            addCriterion("FILETYPEID >", value, "filetypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidGreaterThanOrEqualTo(String value) {
+            addCriterion("FILETYPEID >=", value, "filetypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidLessThan(String value) {
+            addCriterion("FILETYPEID <", value, "filetypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidLessThanOrEqualTo(String value) {
+            addCriterion("FILETYPEID <=", value, "filetypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidLike(String value) {
+            addCriterion("FILETYPEID like", value, "filetypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidNotLike(String value) {
+            addCriterion("FILETYPEID not like", value, "filetypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidIn(List<String> values) {
+            addCriterion("FILETYPEID in", values, "filetypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidNotIn(List<String> values) {
+            addCriterion("FILETYPEID not in", values, "filetypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidBetween(String value1, String value2) {
+            addCriterion("FILETYPEID between", value1, value2, "filetypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypeidNotBetween(String value1, String value2) {
+            addCriterion("FILETYPEID not between", value1, value2, "filetypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andParenttypeidIsNull() {
+            addCriterion("PARENTTYPEID is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andParenttypeidIsNotNull() {
+            addCriterion("PARENTTYPEID is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andParenttypeidEqualTo(String value) {
+            addCriterion("PARENTTYPEID =", value, "parenttypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andParenttypeidNotEqualTo(String value) {
+            addCriterion("PARENTTYPEID <>", value, "parenttypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andParenttypeidGreaterThan(String value) {
+            addCriterion("PARENTTYPEID >", value, "parenttypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andParenttypeidGreaterThanOrEqualTo(String value) {
+            addCriterion("PARENTTYPEID >=", value, "parenttypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andParenttypeidLessThan(String value) {
+            addCriterion("PARENTTYPEID <", value, "parenttypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andParenttypeidLessThanOrEqualTo(String value) {
+            addCriterion("PARENTTYPEID <=", value, "parenttypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andParenttypeidLike(String value) {
+            addCriterion("PARENTTYPEID like", value, "parenttypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andParenttypeidNotLike(String value) {
+            addCriterion("PARENTTYPEID not like", value, "parenttypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andParenttypeidIn(List<String> values) {
+            addCriterion("PARENTTYPEID in", values, "parenttypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andParenttypeidNotIn(List<String> values) {
+            addCriterion("PARENTTYPEID not in", values, "parenttypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andParenttypeidBetween(String value1, String value2) {
+            addCriterion("PARENTTYPEID between", value1, value2, "parenttypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andParenttypeidNotBetween(String value1, String value2) {
+            addCriterion("PARENTTYPEID not between", value1, value2, "parenttypeid");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypenameIsNull() {
+            addCriterion("FILETYPENAME is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypenameIsNotNull() {
+            addCriterion("FILETYPENAME is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypenameEqualTo(String value) {
+            addCriterion("FILETYPENAME =", value, "filetypename");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypenameNotEqualTo(String value) {
+            addCriterion("FILETYPENAME <>", value, "filetypename");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypenameGreaterThan(String value) {
+            addCriterion("FILETYPENAME >", value, "filetypename");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypenameGreaterThanOrEqualTo(String value) {
+            addCriterion("FILETYPENAME >=", value, "filetypename");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypenameLessThan(String value) {
+            addCriterion("FILETYPENAME <", value, "filetypename");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypenameLessThanOrEqualTo(String value) {
+            addCriterion("FILETYPENAME <=", value, "filetypename");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypenameLike(String value) {
+            addCriterion("FILETYPENAME like", value, "filetypename");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypenameNotLike(String value) {
+            addCriterion("FILETYPENAME not like", value, "filetypename");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypenameIn(List<String> values) {
+            addCriterion("FILETYPENAME in", values, "filetypename");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypenameNotIn(List<String> values) {
+            addCriterion("FILETYPENAME not in", values, "filetypename");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypenameBetween(String value1, String value2) {
+            addCriterion("FILETYPENAME between", value1, value2, "filetypename");
+            return (Criteria) this;
+        }
+
+        public Criteria andFiletypenameNotBetween(String value1, String value2) {
+            addCriterion("FILETYPENAME not between", value1, value2, "filetypename");
+            return (Criteria) this;
+        }
+
+        public Criteria andTreelevelIsNull() {
+            addCriterion("TREELEVEL is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTreelevelIsNotNull() {
+            addCriterion("TREELEVEL is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTreelevelEqualTo(Integer value) {
+            addCriterion("TREELEVEL =", value, "treelevel");
+            return (Criteria) this;
+        }
+
+        public Criteria andTreelevelNotEqualTo(Integer value) {
+            addCriterion("TREELEVEL <>", value, "treelevel");
+            return (Criteria) this;
+        }
+
+        public Criteria andTreelevelGreaterThan(Integer value) {
+            addCriterion("TREELEVEL >", value, "treelevel");
+            return (Criteria) this;
+        }
+
+        public Criteria andTreelevelGreaterThanOrEqualTo(Integer value) {
+            addCriterion("TREELEVEL >=", value, "treelevel");
+            return (Criteria) this;
+        }
+
+        public Criteria andTreelevelLessThan(Integer value) {
+            addCriterion("TREELEVEL <", value, "treelevel");
+            return (Criteria) this;
+        }
+
+        public Criteria andTreelevelLessThanOrEqualTo(Integer value) {
+            addCriterion("TREELEVEL <=", value, "treelevel");
+            return (Criteria) this;
+        }
+
+        public Criteria andTreelevelIn(List<Integer> values) {
+            addCriterion("TREELEVEL in", values, "treelevel");
+            return (Criteria) this;
+        }
+
+        public Criteria andTreelevelNotIn(List<Integer> values) {
+            addCriterion("TREELEVEL not in", values, "treelevel");
+            return (Criteria) this;
+        }
+
+        public Criteria andTreelevelBetween(Integer value1, Integer value2) {
+            addCriterion("TREELEVEL between", value1, value2, "treelevel");
+            return (Criteria) this;
+        }
+
+        public Criteria andTreelevelNotBetween(Integer value1, Integer value2) {
+            addCriterion("TREELEVEL not between", value1, value2, "treelevel");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 278 - 0
src/main/java/com/ghsc/partybuild/service/impl/workresourcelibrary/WorkResourceLibraryServiceImpl.java

@@ -0,0 +1,278 @@
+package com.ghsc.partybuild.service.impl.workresourcelibrary;
+
+import com.ghsc.partybuild.controller.jsonmodel.RequsetData;
+import com.ghsc.partybuild.mapper.*;
+import com.ghsc.partybuild.model.*;
+import com.ghsc.partybuild.service.DictionaryService;
+import com.ghsc.partybuild.service.workresourcelibrary.WorkResourceLibraryService;
+import com.ghsc.partybuild.util.MapUtils;
+import com.ghsc.partybuild.util.StringUtils;
+import com.ghsc.partybuild.vo.DsjTreeFiletype;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+/**
+ *
+ * @author wufs
+ * @date 2020/05/15
+ */
+@Service("WorkResourceLibraryService")
+public class WorkResourceLibraryServiceImpl implements WorkResourceLibraryService {
+
+    @Autowired
+    private DictionaryService dictionaryService;
+
+    @Autowired
+    private StringUtils stringUtils;
+
+    @Autowired
+    private DjWorkresourcelibraryMapper djWorkresourcelibraryMapper;
+
+    @Autowired
+    private DjWorkresourcelibrarytypeMapper djWorkresourcelibrarytypeMapper;
+
+    @Autowired
+    private MapUtils mapUtils;
+
+    @Autowired
+    private CfFileMapper cfFileMapper;
+
+    @Autowired
+    private CfFileCQuery cfFileCQuery;
+
+    @Override
+    public PageInfo<DjWorkresourcelibrary> getFilesByType(String fileTypeId, String fileName, int pageIndex, int pageSize) {
+
+
+
+        DjWorkresourcelibraryExample exp = new DjWorkresourcelibraryExample();
+        DjWorkresourcelibraryExample.Criteria criteria = exp.createCriteria();
+
+        if (!stringUtils.IsNullOrEmpty(fileName)){
+            criteria.andFilenameLike("%" + fileName + "%");
+        }
+        if(!stringUtils.IsNullOrEmpty(fileTypeId)) {
+            List<String> typeIds = findFileTypeAndChildren(fileTypeId);
+            criteria.andFiletypeidIn(typeIds);
+        }
+
+        exp.setOrderByClause("cast((filecode) as SIGNED INTEGER ) asc");
+
+        PageHelper.startPage(pageIndex, pageSize);
+        List<DjWorkresourcelibrary> flist = djWorkresourcelibraryMapper.selectByExample(exp);
+
+
+        PageInfo<DjWorkresourcelibrary> pList = new PageInfo(flist);
+
+
+        return pList;
+    }
+
+    @Override
+    public PageInfo<DjWorkresourcelibrary> getFilesByKey(String fileName, int pageIndex, int pageSize) {
+
+        DjWorkresourcelibraryExample exp = new DjWorkresourcelibraryExample();
+        DjWorkresourcelibraryExample.Criteria criteria = exp.createCriteria();
+
+        criteria.andFilenameLike("%"+fileName+"%");
+
+        PageHelper.startPage(pageIndex, pageSize);
+        //fileName
+
+        List<DjWorkresourcelibrary> flist = djWorkresourcelibraryMapper.selectByExample(exp);
+        PageInfo<DjWorkresourcelibrary> pList = new PageInfo(flist);
+
+        return pList;
+    }
+
+    protected List<String> findFileTypeAndChildren(String fileTypeId){
+
+        List<String> fileTypeids=new ArrayList<>();
+
+        DjWorkresourcelibrarytype filetype = djWorkresourcelibrarytypeMapper.selectByPrimaryKey(fileTypeId);
+
+        if(filetype!=null){
+            fileTypeids.add(filetype.getFiletypeid());
+            getFileTypeChildren(filetype.getFiletypeid(),fileTypeids);
+        }
+
+        return fileTypeids;
+    }
+
+    protected void getFileTypeChildren(String parentfileTypeId,List<String> ids){
+        DjWorkresourcelibrarytypeExample exp=new DjWorkresourcelibrarytypeExample();
+        exp.or().andParenttypeidEqualTo(parentfileTypeId);
+        List<DjWorkresourcelibrarytype> typeChildren=djWorkresourcelibrarytypeMapper.selectByExample(exp);
+
+        typeChildren.forEach(it->{
+            ids.add(it.getFiletypeid());
+            this.getFileTypeChildren(it.getFiletypeid(),ids);
+        });
+
+    }
+
+    @Override
+    public List<DjWorkresourcelibrarytype> getFileTypeRoot() {
+
+        DjWorkresourcelibrarytypeExample exp = new DjWorkresourcelibrarytypeExample();
+        exp.or().andParenttypeidIsNull();
+        exp.setOrderByClause("treelevel asc");
+        List<DjWorkresourcelibrarytype> filesRoot = djWorkresourcelibrarytypeMapper.selectByExample(exp);
+
+        return filesRoot;
+    }
+
+    @Override
+    public List<DjWorkresourcelibrarytype> getFileTypeByParent(String parentId) {
+        DjWorkresourcelibrarytypeExample exp = new DjWorkresourcelibrarytypeExample();
+        exp.or().andParenttypeidEqualTo(parentId);
+        exp.setOrderByClause("treelevel asc");
+        List<DjWorkresourcelibrarytype> filetypes = djWorkresourcelibrarytypeMapper.selectByExample(exp);
+        return filetypes;
+    }
+
+    @Override
+    public List<DsjTreeFiletype> getFileTreeByParent(String parentId, List<String> typeIds, List<String> passTypeIds) {
+
+        return cfFileCQuery.selectTreeFiles(parentId, null, typeIds, passTypeIds);
+    }
+    @Override
+    public PageInfo<Map<String, Object>> selectFiletypeList(String typename,String parentId ,int pageIndex, int pageSize) {
+        PageHelper.startPage(pageIndex, pageSize);
+        List<DsjTreeFiletype> list = cfFileCQuery.selectTreeFiles(parentId, typename, null, null);
+        PageInfo<Map<String, Object>> pList = new PageInfo(list);
+        return pList;
+    }
+    @Override
+    public DjWorkresourcelibrarytype getFiletype(String typeid) {
+
+        DjWorkresourcelibrarytype filetype= djWorkresourcelibrarytypeMapper.selectByPrimaryKey(typeid);
+        return  filetype;
+    }
+    @Override
+    public int deleteFiletype(String id) {
+        DjWorkresourcelibrarytypeExample exp = new DjWorkresourcelibrarytypeExample();
+        DjWorkresourcelibrarytypeExample.Criteria criteria = exp.or();
+        criteria.andParenttypeidEqualTo(id);
+        djWorkresourcelibrarytypeMapper.deleteByExample(exp);
+        return djWorkresourcelibrarytypeMapper.deleteByPrimaryKey(id);
+    }
+    @Override
+    public RequsetData<String>  saveFiletype(DjWorkresourcelibrarytype model) {
+        RequsetData<String> res = new RequsetData<String>();
+        int result = 0;
+        DjWorkresourcelibrarytype item = djWorkresourcelibrarytypeMapper.selectByPrimaryKey(model.getFiletypeid());
+        if (item==null) {
+            model.setFiletypeid(UUID.randomUUID().toString());
+            result = djWorkresourcelibrarytypeMapper.insert(model);
+        } else {
+            item.setFiletypename(model.getFiletypename());
+            item.setParenttypeid(model.getParenttypeid());
+            item.setTreelevel(model.getTreelevel());
+            result =djWorkresourcelibrarytypeMapper.updateByPrimaryKeySelective(item);
+        }
+        if (result > 0) {
+            res.setSuccess(true);
+            res.setMsg("保存成功!");
+        } else {
+            res.setSuccess(false);
+            res.setMsg("保存失败");
+        }
+        return res;
+    }
+    @Override
+    public DjWorkresourcelibrary getFileInfo(String fileId) {
+
+        return djWorkresourcelibraryMapper.selectByPrimaryKey(fileId);
+    }
+    @Override
+    public int deleteFile(String id) {
+        return djWorkresourcelibraryMapper.deleteByPrimaryKey(id);
+    }
+    @Override
+    public RequsetData<String> saveFile(DjWorkresourcelibrary model) {
+        RequsetData<String> res = new RequsetData<String>();
+        int result = 0;
+        DjWorkresourcelibrary item = djWorkresourcelibraryMapper.selectByPrimaryKey(model.getFileid());
+        if (item==null) {
+            result = djWorkresourcelibraryMapper.insert(model);
+        } else {
+            item.setFilename(model.getFilename());
+            item.setFilecode(model.getFilecode());
+            item.setFiletypeid(model.getFiletypeid());
+            item.setFilecode2(model.getFilecode2());
+            result= djWorkresourcelibraryMapper.updateByPrimaryKeySelective(item);
+        }
+        if (result > 0) {
+            res.setSuccess(true);
+            res.setMsg("保存成功!");
+        } else {
+            res.setSuccess(false);
+            res.setMsg("保存失败");
+        }
+        return res;
+    }
+
+    @Override
+    public PageInfo<Map<String, Object>> FindFilesApp(String fileName, String fileTypeId, int pageIndex, int pageSize) {
+
+
+        List<String> typeIds=new ArrayList<>();
+
+        if(!stringUtils.IsNullOrEmpty(fileTypeId)) {
+            typeIds = findFileTypeAndChildren(fileTypeId);
+
+        }
+
+        PageHelper.startPage(pageIndex, pageSize);
+        PageHelper.orderBy("TREELEVEL asc,cast(filecode2 as unsigned int) asc");
+        List<Map<String,Object>> list=cfFileCQuery.FindDSJ_File(fileName,typeIds);
+
+        PageInfo<Map<String, Object>> pList = new PageInfo(list);
+
+        return pList;
+    }
+
+    @Override
+    public PageInfo<Map<String, Object>> getFileList(String fileRefID, Integer fileTypeId, int pageIndex, int pageSize) {
+
+        //List<CfDictionary> dic_ztType=dictionaryService.getDictionaryListByDicTypeKey("FileMgrType");
+
+        PageHelper.startPage(pageIndex, pageSize);
+        //PageHelper.orderBy("to_number(filecode2) asc");
+
+        CfFileExample exp = new CfFileExample();
+        CfFileExample.Criteria cri = exp.or();
+        exp.setOrderByClause("CREATETIME");
+        if (fileTypeId != null) {
+            cri.andFiletypeEqualTo(fileTypeId);
+        }
+        cri.andFilerefidEqualTo(fileRefID);
+
+        cri.andOperatestateNotEqualTo("D");
+
+        List<CfFile> flist = cfFileMapper.selectByExample(exp);
+        List<Map<String, Object>> mList = new ArrayList<>();
+
+        for (CfFile it : flist) {
+            Map<String, Object> mit = mapUtils.objectToMap(it);
+            mList.add(mit);
+        }
+
+        PageInfo<Map<String, Object>> pList = new PageInfo(mList);
+        return pList;
+    }
+
+    @Override
+    public List<Map<String, Object>> selectAllFile() {
+        //return this.djWorkresourcelibraryMapper.selectAllFile();
+        return null;
+    }
+}

+ 123 - 0
src/main/java/com/ghsc/partybuild/service/workresourcelibrary/WorkResourceLibraryService.java

@@ -0,0 +1,123 @@
+package com.ghsc.partybuild.service.workresourcelibrary;
+
+import com.ghsc.partybuild.controller.jsonmodel.RequsetData;
+import com.ghsc.partybuild.model.DjWorkresourcelibrary;
+import com.ghsc.partybuild.model.DjWorkresourcelibrary;
+import com.ghsc.partybuild.model.DjWorkresourcelibrarytype;
+import com.ghsc.partybuild.vo.DsjTreeFiletype;
+import com.github.pagehelper.PageInfo;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ *
+ * @author wufs
+ * @date 2020/05/15
+ */
+public interface WorkResourceLibraryService {
+
+    /**
+     * 文件类型
+     * @param fileTypeId id
+     * @param fileName fn
+     * @param pageIndex pi
+     * @param pageSize ps
+     * @return list
+     */
+    PageInfo<DjWorkresourcelibrary> getFilesByType(String fileTypeId, String fileName, int pageIndex, int pageSize);
+
+    /**
+     * 获取文件
+     * @return list
+     */
+    List<Map<String, Object>> selectAllFile();
+
+    /**
+     * 获取根
+     * @return
+     */
+    List<DjWorkresourcelibrarytype> getFileTypeRoot();
+
+    /**
+     * 获取文件类型1
+     * @param parentId
+     * @return list
+     */
+    List<DjWorkresourcelibrarytype> getFileTypeByParent(String parentId);
+
+    /**
+     * 获取文件树
+     * @param parentId 父id
+     * @return 文件
+     */
+    List<DsjTreeFiletype> getFileTreeByParent(String parentId,List<String> typeIds,List<String> passTypeIds);
+
+    /**
+     * 获取文件树
+     * @param parentId 父id
+     * @return 文件
+     */
+    PageInfo<Map<String, Object>> selectFiletypeList(String typename,String parentId ,int pageIndex, int pageSize);
+    /**
+     * 获取文件类型
+     * @param typeid
+     * @return 文件类型
+     */
+    DjWorkresourcelibrarytype getFiletype(String typeid);
+
+    /**
+     * 删除文件类型
+     * @param id
+     * @return
+     */
+    int deleteFiletype(String id);
+    /**
+     * 保存文件类型
+     * @param model
+     * @return
+     */
+    RequsetData<String>  saveFiletype(DjWorkresourcelibrarytype model);
+    /**
+     * 获取文件信息
+     * @param fileId id
+     * @return m
+     */
+    DjWorkresourcelibrary getFileInfo(String fileId);
+
+    /**
+     * 查询cf_file表附件
+     * @Date 17:31 2019/7/31
+     * @param fileRefID id
+     * @param fileTypeId 1
+     * @param pageIndex 1
+     * @param pageSize 1
+     * @return 附件
+     */
+    PageInfo<Map<String, Object>> getFileList(String fileRefID, Integer fileTypeId, int pageIndex, int pageSize);
+
+    /**
+     * 查询方法
+     * @param fileName 文件名 key
+     * @param pageIndex 1
+     * @param pageSize 10
+     * @return list
+     */
+    PageInfo<DjWorkresourcelibrary> getFilesByKey(String fileName, int pageIndex, int pageSize);
+
+    /**
+     * 删除方法
+     * @param id 10
+     * @return list
+     */
+    int deleteFile(String id);
+
+    /**
+     * 保存方法
+     * @param model 10
+     * @return list
+     */
+    RequsetData<String> saveFile(DjWorkresourcelibrary model);
+
+    PageInfo<Map<String,Object>> FindFilesApp(String fileName, String fileTypeId, int pageIndex, int pageSize);
+}

+ 2 - 0
src/main/resources/generatorConfig.xml

@@ -268,6 +268,8 @@
         <table schema="" tableName="lw_leaderteam"></table>
         <table schema="" tableName="lw_leaderteam_experience"></table>
         <table schema="" tableName="TEST_ONLINETEST"></table>
+        <table schema="" tableName="dj_workresourcelibrary"></table>
+        <table schema="" tableName="dj_workresourcelibrarytype"></table>
 
         -->
     </context>

+ 258 - 0
src/main/resources/mapping/DjWorkresourcelibraryMapper.xml

@@ -0,0 +1,258 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ghsc.partybuild.mapper.DjWorkresourcelibraryMapper">
+  <resultMap id="BaseResultMap" type="com.ghsc.partybuild.model.DjWorkresourcelibrary">
+    <id column="FILEID" jdbcType="VARCHAR" property="fileid" />
+    <result column="FILENAME" jdbcType="VARCHAR" property="filename" />
+    <result column="FILEURL" jdbcType="VARCHAR" property="fileurl" />
+    <result column="EXTENDEDNAME" jdbcType="VARCHAR" property="extendedname" />
+    <result column="CREATEDATETIME" jdbcType="TIMESTAMP" property="createdatetime" />
+    <result column="FILETYPEID" jdbcType="VARCHAR" property="filetypeid" />
+    <result column="FILECODE" jdbcType="VARCHAR" property="filecode" />
+    <result column="FILECODE2" jdbcType="INTEGER" property="filecode2" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    FILEID, FILENAME, FILEURL, EXTENDEDNAME, CREATEDATETIME, FILETYPEID, FILECODE, FILECODE2
+  </sql>
+  <select id="selectByExample" parameterType="com.ghsc.partybuild.model.DjWorkresourcelibraryExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from dj_workresourcelibrary
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from dj_workresourcelibrary
+    where FILEID = #{fileid,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from dj_workresourcelibrary
+    where FILEID = #{fileid,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.ghsc.partybuild.model.DjWorkresourcelibraryExample">
+    delete from dj_workresourcelibrary
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.ghsc.partybuild.model.DjWorkresourcelibrary">
+    insert into dj_workresourcelibrary (FILEID, FILENAME, FILEURL, 
+      EXTENDEDNAME, CREATEDATETIME, FILETYPEID, 
+      FILECODE, FILECODE2)
+    values (#{fileid,jdbcType=VARCHAR}, #{filename,jdbcType=VARCHAR}, #{fileurl,jdbcType=VARCHAR}, 
+      #{extendedname,jdbcType=VARCHAR}, #{createdatetime,jdbcType=TIMESTAMP}, #{filetypeid,jdbcType=VARCHAR}, 
+      #{filecode,jdbcType=VARCHAR}, #{filecode2,jdbcType=INTEGER})
+  </insert>
+  <insert id="insertSelective" parameterType="com.ghsc.partybuild.model.DjWorkresourcelibrary">
+    insert into dj_workresourcelibrary
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="fileid != null">
+        FILEID,
+      </if>
+      <if test="filename != null">
+        FILENAME,
+      </if>
+      <if test="fileurl != null">
+        FILEURL,
+      </if>
+      <if test="extendedname != null">
+        EXTENDEDNAME,
+      </if>
+      <if test="createdatetime != null">
+        CREATEDATETIME,
+      </if>
+      <if test="filetypeid != null">
+        FILETYPEID,
+      </if>
+      <if test="filecode != null">
+        FILECODE,
+      </if>
+      <if test="filecode2 != null">
+        FILECODE2,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="fileid != null">
+        #{fileid,jdbcType=VARCHAR},
+      </if>
+      <if test="filename != null">
+        #{filename,jdbcType=VARCHAR},
+      </if>
+      <if test="fileurl != null">
+        #{fileurl,jdbcType=VARCHAR},
+      </if>
+      <if test="extendedname != null">
+        #{extendedname,jdbcType=VARCHAR},
+      </if>
+      <if test="createdatetime != null">
+        #{createdatetime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="filetypeid != null">
+        #{filetypeid,jdbcType=VARCHAR},
+      </if>
+      <if test="filecode != null">
+        #{filecode,jdbcType=VARCHAR},
+      </if>
+      <if test="filecode2 != null">
+        #{filecode2,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.ghsc.partybuild.model.DjWorkresourcelibraryExample" resultType="java.lang.Long">
+    select count(*) from dj_workresourcelibrary
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update dj_workresourcelibrary
+    <set>
+      <if test="record.fileid != null">
+        FILEID = #{record.fileid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.filename != null">
+        FILENAME = #{record.filename,jdbcType=VARCHAR},
+      </if>
+      <if test="record.fileurl != null">
+        FILEURL = #{record.fileurl,jdbcType=VARCHAR},
+      </if>
+      <if test="record.extendedname != null">
+        EXTENDEDNAME = #{record.extendedname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createdatetime != null">
+        CREATEDATETIME = #{record.createdatetime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.filetypeid != null">
+        FILETYPEID = #{record.filetypeid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.filecode != null">
+        FILECODE = #{record.filecode,jdbcType=VARCHAR},
+      </if>
+      <if test="record.filecode2 != null">
+        FILECODE2 = #{record.filecode2,jdbcType=INTEGER},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update dj_workresourcelibrary
+    set FILEID = #{record.fileid,jdbcType=VARCHAR},
+      FILENAME = #{record.filename,jdbcType=VARCHAR},
+      FILEURL = #{record.fileurl,jdbcType=VARCHAR},
+      EXTENDEDNAME = #{record.extendedname,jdbcType=VARCHAR},
+      CREATEDATETIME = #{record.createdatetime,jdbcType=TIMESTAMP},
+      FILETYPEID = #{record.filetypeid,jdbcType=VARCHAR},
+      FILECODE = #{record.filecode,jdbcType=VARCHAR},
+      FILECODE2 = #{record.filecode2,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.ghsc.partybuild.model.DjWorkresourcelibrary">
+    update dj_workresourcelibrary
+    <set>
+      <if test="filename != null">
+        FILENAME = #{filename,jdbcType=VARCHAR},
+      </if>
+      <if test="fileurl != null">
+        FILEURL = #{fileurl,jdbcType=VARCHAR},
+      </if>
+      <if test="extendedname != null">
+        EXTENDEDNAME = #{extendedname,jdbcType=VARCHAR},
+      </if>
+      <if test="createdatetime != null">
+        CREATEDATETIME = #{createdatetime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="filetypeid != null">
+        FILETYPEID = #{filetypeid,jdbcType=VARCHAR},
+      </if>
+      <if test="filecode != null">
+        FILECODE = #{filecode,jdbcType=VARCHAR},
+      </if>
+      <if test="filecode2 != null">
+        FILECODE2 = #{filecode2,jdbcType=INTEGER},
+      </if>
+    </set>
+    where FILEID = #{fileid,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.ghsc.partybuild.model.DjWorkresourcelibrary">
+    update dj_workresourcelibrary
+    set FILENAME = #{filename,jdbcType=VARCHAR},
+      FILEURL = #{fileurl,jdbcType=VARCHAR},
+      EXTENDEDNAME = #{extendedname,jdbcType=VARCHAR},
+      CREATEDATETIME = #{createdatetime,jdbcType=TIMESTAMP},
+      FILETYPEID = #{filetypeid,jdbcType=VARCHAR},
+      FILECODE = #{filecode,jdbcType=VARCHAR},
+      FILECODE2 = #{filecode2,jdbcType=INTEGER}
+    where FILEID = #{fileid,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 196 - 0
src/main/resources/mapping/DjWorkresourcelibrarytypeMapper.xml

@@ -0,0 +1,196 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ghsc.partybuild.mapper.DjWorkresourcelibrarytypeMapper">
+  <resultMap id="BaseResultMap" type="com.ghsc.partybuild.model.DjWorkresourcelibrarytype">
+    <id column="FILETYPEID" jdbcType="VARCHAR" property="filetypeid" />
+    <result column="PARENTTYPEID" jdbcType="VARCHAR" property="parenttypeid" />
+    <result column="FILETYPENAME" jdbcType="VARCHAR" property="filetypename" />
+    <result column="TREELEVEL" jdbcType="INTEGER" property="treelevel" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    FILETYPEID, PARENTTYPEID, FILETYPENAME, TREELEVEL
+  </sql>
+  <select id="selectByExample" parameterType="com.ghsc.partybuild.model.DjWorkresourcelibrarytypeExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from dj_workresourcelibrarytype
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from dj_workresourcelibrarytype
+    where FILETYPEID = #{filetypeid,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from dj_workresourcelibrarytype
+    where FILETYPEID = #{filetypeid,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.ghsc.partybuild.model.DjWorkresourcelibrarytypeExample">
+    delete from dj_workresourcelibrarytype
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.ghsc.partybuild.model.DjWorkresourcelibrarytype">
+    insert into dj_workresourcelibrarytype (FILETYPEID, PARENTTYPEID, FILETYPENAME, 
+      TREELEVEL)
+    values (#{filetypeid,jdbcType=VARCHAR}, #{parenttypeid,jdbcType=VARCHAR}, #{filetypename,jdbcType=VARCHAR}, 
+      #{treelevel,jdbcType=INTEGER})
+  </insert>
+  <insert id="insertSelective" parameterType="com.ghsc.partybuild.model.DjWorkresourcelibrarytype">
+    insert into dj_workresourcelibrarytype
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="filetypeid != null">
+        FILETYPEID,
+      </if>
+      <if test="parenttypeid != null">
+        PARENTTYPEID,
+      </if>
+      <if test="filetypename != null">
+        FILETYPENAME,
+      </if>
+      <if test="treelevel != null">
+        TREELEVEL,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="filetypeid != null">
+        #{filetypeid,jdbcType=VARCHAR},
+      </if>
+      <if test="parenttypeid != null">
+        #{parenttypeid,jdbcType=VARCHAR},
+      </if>
+      <if test="filetypename != null">
+        #{filetypename,jdbcType=VARCHAR},
+      </if>
+      <if test="treelevel != null">
+        #{treelevel,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.ghsc.partybuild.model.DjWorkresourcelibrarytypeExample" resultType="java.lang.Long">
+    select count(*) from dj_workresourcelibrarytype
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update dj_workresourcelibrarytype
+    <set>
+      <if test="record.filetypeid != null">
+        FILETYPEID = #{record.filetypeid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.parenttypeid != null">
+        PARENTTYPEID = #{record.parenttypeid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.filetypename != null">
+        FILETYPENAME = #{record.filetypename,jdbcType=VARCHAR},
+      </if>
+      <if test="record.treelevel != null">
+        TREELEVEL = #{record.treelevel,jdbcType=INTEGER},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update dj_workresourcelibrarytype
+    set FILETYPEID = #{record.filetypeid,jdbcType=VARCHAR},
+      PARENTTYPEID = #{record.parenttypeid,jdbcType=VARCHAR},
+      FILETYPENAME = #{record.filetypename,jdbcType=VARCHAR},
+      TREELEVEL = #{record.treelevel,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.ghsc.partybuild.model.DjWorkresourcelibrarytype">
+    update dj_workresourcelibrarytype
+    <set>
+      <if test="parenttypeid != null">
+        PARENTTYPEID = #{parenttypeid,jdbcType=VARCHAR},
+      </if>
+      <if test="filetypename != null">
+        FILETYPENAME = #{filetypename,jdbcType=VARCHAR},
+      </if>
+      <if test="treelevel != null">
+        TREELEVEL = #{treelevel,jdbcType=INTEGER},
+      </if>
+    </set>
+    where FILETYPEID = #{filetypeid,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.ghsc.partybuild.model.DjWorkresourcelibrarytype">
+    update dj_workresourcelibrarytype
+    set PARENTTYPEID = #{parenttypeid,jdbcType=VARCHAR},
+      FILETYPENAME = #{filetypename,jdbcType=VARCHAR},
+      TREELEVEL = #{treelevel,jdbcType=INTEGER}
+    where FILETYPEID = #{filetypeid,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 20 - 0
src/main/resources/static/app/main/app.js

@@ -428,6 +428,26 @@
                     return $ocLazyLoad.load(['../main/filemanage/filetype/manage.js?' + window.sysVersion]);
                 }]
             }
+        }).state("home.workResourceLibraryList", {
+            url: "workResourceLibraryList?fileName",
+            templateUrl: "../main/partyUser/workResourceLibrary/fileTreeList.html?" + window.sysVersion,
+            controller: "workResourceLibraryListCtrl",
+            resolve: {
+                load: ['$ocLazyLoad', function ($ocLazyLoad) {
+                    $ocLazyLoad.load(['../main/partyUser/workResourceLibrary/fileTreeList.css?' + window.sysVersion, '../main/filemanage/doc-show.css?' + window.sysVersion]);
+                    return $ocLazyLoad.load(['../main/partyUser/workResourceLibrary/fileTabList.js?' + window.sysVersion]);
+                }]
+            }
+        }).state("home.workResourceLibraryFileFrame", {
+            url: "fileFrame?keyWords",
+            templateUrl: "../main/partyUser/workResourceLibrary/fileFrame.html?" + window.sysVersion,
+            controller: "workResourceLibraryFileFrameCtrl",
+            resolve: {
+                load: ['$ocLazyLoad', function ($ocLazyLoad) {
+
+                    return $ocLazyLoad.load(['../main/partyUser/workResourceLibrary/fileFrame.js?' + window.sysVersion]);
+                }]
+            }
         }).state("home.dyUserAdd", {
             url: "dyUserAdd?userId",
             templateUrl: "partyUser/edit.html?" + window.sysVersion,

+ 10 - 0
src/main/resources/static/app/main/partyUser/workResourceLibrary/fileEdit.css

@@ -0,0 +1,10 @@
+textarea {
+    resize: none; /*textarea不可拉伸*/
+    width: 100%;
+    height: 100%;
+    padding: 0;
+}
+.foot-btn{
+    text-align: right;
+    padding-right: 35px;
+}

+ 109 - 0
src/main/resources/static/app/main/partyUser/workResourceLibrary/fileEdit.html

@@ -0,0 +1,109 @@
+
+<div id="dicmodal" class="modal" tabindex="-1" role="dialog">
+    <div class="modal-dialog">
+        <div class="card">
+            <div class="header">
+                <button type="button" class="close" ng-click="$hide()">&times;</button>
+                <h4 class="modal-title">{{params.title}}</h4>
+            </div>
+            <div activate-input class="body">
+                <form class="form-horizontal" role="form" id="dicform"
+                      name="dicform" ng-submit="submit(dicform.$valid)" novalidate>
+                    <div class="row clearfix">
+                        <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 form-control-label">
+                            <label>所在目录</label>
+                        </div>
+                        <div class="col-lg-8 col-md-8 col-sm-8 col-xs-8">
+                            <div class="form-group">
+                                <div class="form-line">
+                                   {{content.filetypename}}
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="row clearfix">
+                        <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 form-control-label">
+                            <label>编号</label>
+                        </div>
+                        <div class="col-lg-8 col-md-8 col-sm-8 col-xs-8">
+                            <div class="form-group">
+                                <div class="form-line"
+                                     ng-class="{ 'focused error' : dicform.filecode.$invalid &&  dicform.$submitted}">
+                                    <input type="text" name="filecode" ng-model="content.filecode" maxlength="100"
+                                           class="form-control"
+                                           ng-required="true"/>
+                                </div>
+                                <label ng-show="dicform.filecode.$invalid &&  dicform.$submitted"
+                                       class="error">必填.</label>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="row clearfix">
+                        <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 form-control-label">
+                            <label>文件名称</label>
+                        </div>
+                        <div class="col-lg-8 col-md-8 col-sm-8 col-xs-8">
+                            <div class="form-group">
+                                <div class="form-line"
+                                     ng-class="{ 'focused error' : dicform.filename.$invalid &&  dicform.$submitted}">
+                                    <input name="filename" ng-model="content.filename" type="text" class="form-control"
+                                           ng-required="true" />
+                                </div>
+                                <label ng-show="dicform.filename.$invalid &&  dicform.$submitted"
+                                       class="error">必填.</label>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="row clearfix">
+                        <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 form-control-label">
+                            <label>排序</label>
+                        </div>
+                        <div class="col-lg-8 col-md-8 col-sm-8 col-xs-8">
+                            <div class="form-group">
+                                <div class="form-line"
+                                     ng-class="{ 'focused error' : dicform.filecode2.$invalid &&  dicform.$submitted}">
+                                    <input type="number" name="filecode2" ng-model="content.filecode2" maxlength="100"
+                                           class="form-control"
+                                           ng-required="true"/>
+                                </div>
+                                <label ng-show="dicform.filecode2.$invalid &&  dicform.$submitted"
+                                       class="error">必填.</label>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="row clearfix">
+                        <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 form-control-label">
+                            <label>文件</label>
+                        </div>
+                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6">
+                            <!--singlefile glyphicon  glyphicon-upload data-id="content.fileid" data-fileid="fid" data-readonly="false" data-typeparams="{types:['pdf'],errormsg:'只允许上传pdf'}"></singlefile-->
+                            <input size="60" class="file" type="file" ngf-select ng-model="content.file" name="file"
+                                   ngf-max-size="20MB" ng-change="valiFileType()">
+                        </div>
+                        <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2">
+                            <a class="btn glyphicon glyphicon-upload" ng-hide="updata.updated" ng-click="upfile()"></a>
+                        </div>
+                    </div>
+                    <div class="row clearfix">
+                        <div class="col-lg-7 col-md-7 col-sm-7 col-xs-7">
+
+                            <div ng-show="updata.isuping" class="progress">
+                                <div class="progress-bar" role="progressbar" aria-valuenow="{{updata.progressPer}}"
+                                     aria-valuemin="0" aria-valuemax="100" ng-style="{width:updata.progressPer+'%'}"
+                                     style="min-width: 2em;">
+                                    {{updata.progressPer}}%
+                                </div>
+                            </div>
+
+                        </div>
+                        <div class="col-lg-5 col-md-5 col-sm-5 col-xs-5 foot-btn">
+                            <button type="button" class="btn btn-default" ng-click="$hide()">取消</button>
+                            <button type="submit" class="btn btn-primary" form="dicform">保存</button>
+                        </div>
+
+                    </div>
+                </form>
+            </div>
+        </div>
+    </div>
+</div>

+ 5 - 0
src/main/resources/static/app/main/partyUser/workResourceLibrary/fileFrame.html

@@ -0,0 +1,5 @@
+<div class="card">
+    <titlemenu></titlemenu>
+    <iframe id="mainIframe" name="mainIframe" ng-src="{{someUrl}}" frameborder="0" scrolling="auto"
+    style="width: 100%;min-height: 800px;"></iframe>
+</div>

+ 12 - 0
src/main/resources/static/app/main/partyUser/workResourceLibrary/fileFrame.js

@@ -0,0 +1,12 @@
+(function ($ang) {
+    'use strict';
+    $ang.module('gtPartyApp').controller('workResourceLibraryFileFrameCtrl', function ($scope, $http, $alert, $modal, AuthUser, $state, $loading, $window, $timeout, $stateParams, $bsRouterState,$sce) {
+        $stateParams = $bsRouterState.$params($scope);
+        $scope.keyWords = $stateParams.keyWords;
+
+        $scope.url = "http://10.160.8.64:8080/es/search.do?keyWords=" + decodeURI($scope.keyWords);
+        //$scope.url = "http://www.baidu.com?keyWords=" + decodeURI($scope.keyWords);
+
+        $scope.someUrl = $sce.trustAsResourceUrl($scope.url);
+    });
+})(angular);

+ 87 - 0
src/main/resources/static/app/main/partyUser/workResourceLibrary/fileTabList.html

@@ -0,0 +1,87 @@
+<titlemenu></titlemenu>
+<div class="dj-list">
+    <div class="dj-list-body">
+        <div class="dj-list-content content1">
+            <div class="card">
+                <div activate-input class="key-header" style="padding-top: 20px;">
+                    <div class="row clearfix">
+                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 form-inline">
+                            <input size="80" ng-model="selectData.fileName" class="form-control key-input" type="text"
+                                   placeholder="  输入关键字查找">
+                            <a class="btn btn-default1" ng-click="searchFile()">
+                                搜索
+                            </a>
+
+                        </div>
+                    </div>
+                </div>
+                <div class="key-body">
+                    <ul class="nav nav-tabs tab-col-deep-orange" style="font-size: 16px;margin-top: 10px;" role="tablist">
+                        <li ng-repeat="nav in navList" ng-class="{active:isSelected(nav.filetypeid)}">
+                            <a ng-click="selectTab(nav.filetypeid)" data-toggle="tab">
+                                {{nav.filetypename}}
+                            </a>
+                        </li>
+                    </ul>
+                    <div class="panel tab-body1">
+                        <div class="row clearfix">
+                            <div class="col-md-3 col-lg-3 col-xs-12 col-sm-12">
+                                <div class="card" style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);">
+                                    <div class="header">
+                                        <div class="title">分类</div>
+                                    </div>
+                                    <div class="body">
+                                        <ul class="list-group">
+                                            <a ng-click="selectTree(it.filetypeid)" class="list-group-item"
+                                               ng-class="{'tree-active':isTreeSelect(it.filetypeid)}" ng-repeat="it in treeList">
+                                                {{it.filetypename}}
+                                            </a>
+                                        </ul>
+                                    </div>
+                                </div>
+                            </div>
+                            <div class="col-lg-9 col-md-9 col-sm-12 col-xs-12">
+                                <div class="table-responsive list-table-panel">
+                                    <table class="table table-bordered table-striped table-hover js-basic-example dataTable table-text-clip">
+                                        <thead>
+                                        <tr>
+                                            <th class="col-md-2">制度编号</th>
+                                            <th class="col-md-8">文件名称</th>
+                                            <th class="col-md-2">操作</th>
+                                        </tr>
+                                        </thead>
+                                        <tbody>
+                                        <tr ng-repeat="f in fileList">
+                                            <td class="text-center">{{f.filecode}}</td>
+                                            <td title="{{ f.filename}}">{{ f.filename}}</td>
+                                            <td class="text-center">
+                                                <button class="btn td-btn bg-light-green waves-effect" title="查看"
+                                                        data-placement="center" data-animation="am-fade-and-scale"
+                                                        ng-click="viewFile(f.fileid,f.filename)">
+                                                    查看
+                                                </button>
+
+                                                <button class="btn td-btn bg-pink waves-effect" title="下载"
+                                                        ng-click="downloadFile(f.fileid)">
+                                                    下载
+                                                </button>
+                                            </td>
+                                        </tr>
+                                        <tr ng-if="fileList.length<=0">
+                                            <td colspan="5" style="text-align:center">暂无数据</td>
+                                        </tr>
+                                        </tbody>
+                                    </table>
+                                </div>
+                                <!--参数含义:page-Index:当前页面,page-Size:每页显示多少数据,total-Length:数据总长度-->
+                                <pagination ng-if="fileList.length>0" data-pageindex="selectData.pageindex"
+                                            data-pagesize="selectData.pagesize" data-ptotal="selectData.ptotal"></pagination>
+                            </div>
+                        </div>
+                    </div>
+
+                </div>
+            </div>
+        </div>
+    </div>
+</div>

+ 695 - 0
src/main/resources/static/app/main/partyUser/workResourceLibrary/fileTabList.js

@@ -0,0 +1,695 @@
+(function ($ang) {
+    'use strict';
+    $ang.module('gtPartyApp').controller('workResourceLibraryListCtrl', function ($scope, $http, $alert, $modal, AuthUser, $state, $loading, $window,$stateParams, $timeout,$bsRouterState) {
+        $scope.navList = [];
+        $scope.selectTabId = '';
+        $scope.fileList = [];
+        $scope.treeList = [];
+
+        $stateParams = $bsRouterState.$params($scope);
+
+        $scope.selectData = {
+            fileName : '',
+            filetypeid: '',
+            pageindex: 1,
+            pagesize: 10,
+            ptotal: 0
+        };
+
+        $scope.selectData.fileName = $stateParams.fileName;
+
+        $scope.GetNavData = function () {
+            $http({
+                method: 'get',
+                url: '../../api/workresourcelibrary/GetFileTypeRoot'
+            }).then(function (result) {
+                $scope.navList = result.data.item;
+                $ang.forEach($scope.navList,function (value) {
+                    //默认显示下拉按钮,等点击事件后再给真实数字
+                    //value.childCount=1;
+                    value.expand=false;
+                    value.name=value.filetypename;
+                    value.id=value.filetypeid;
+
+                });
+                //添加
+                if ($scope.selectData.fileName != null){
+                    $scope.FindWord();
+                }else{
+                    $scope.clickTreeChild($scope.navList[0]);
+                }
+                $scope.selectTabId = $scope.navList[0].filetypeid;
+
+                //$scope.GetTreeData($scope.navList[0].filetypeid);
+            }, function (resp) {
+
+            });
+        };
+
+        $scope.loadTreeChild=function (item) {
+            $http({
+                method: 'get',
+                url: '../../api/workresourcelibrary/GetFileTypesByParent',
+                params: {
+                    parentid: item.id
+                }
+            }).then(function (result) {
+                item.children=result.data.item;
+                //item.childCount=item.children?item.children.length:0;
+
+                $ang.forEach(item.children,function (value) {
+                    //value.childCount=0;
+                    value.expand=false;
+                    value.name=value.filetypename;
+                    value.id=value.filetypeid;
+                });
+                //如果有子节点有下一层,把类型选择默认选下一层第一个节点。
+                /*
+                if(item.childCount>0){
+                    $scope.selectData.filetypeid=item.children[0].id;
+                    $scope.loadData();
+                }*/
+
+            });
+        };
+
+        $scope.clickTreeChild=function(item){
+
+            // if(item==null){
+            //     $scope.selectData.pageindex = 1;
+            //     $scope.selectData.filetypeid=null;
+            //     $scope.selectData.filetypename=null;
+            //     $scope.loadData();
+            //     return false;
+            // }
+            $scope.currentFileType = item;
+            $scope.selectData.pageindex = 1;
+            $scope.selectData.filetypeid=item.id;
+            $scope.selectData.filetypename=item.name;
+
+            $scope.selectData.fileName = '';
+
+            if(!item.children){
+                $scope.loadTreeChild(item);
+            }
+            if(item.childcount>0){
+                item.expand=!item.expand;
+            }
+            $scope.loadData();
+        };
+
+        $scope.searchFile = function (){
+            $scope.selectData.pageindex = 1;
+            $scope.FindWord();
+        }
+
+        $scope.FindWord = function () {
+
+            if ($scope.selectData.fileName.length > 0) {
+                //$window.open('http://10.160.8.64:8080/es/search.do?keyWords=' + decodeURI($scope.selectKey));
+                //$bsRouterState.go('home.fileFrame', {keyWords: $scope.selectKey});
+                $http({
+                    method: 'get',
+                    url: '../../api/workresourcelibrary/GetFilesByKey',
+                    params: $scope.selectData
+                }).then(function (req) {
+                    //$loading.hide();
+                    $scope.fileList = req.data.item.list;
+                    $scope.selectData.ptotal = req.data.item.total;
+                    $scope.selectData.filetypeid = '';
+                }, function (resp) {
+                    //$loading.hide();
+                });
+            } else {
+                $alert({title: '提示:', content: '请输入关键字!', placement: 'top', type: 'info', show: true, duration: 3});
+            }
+
+        }
+
+
+        $scope.GetTreeData = function (id) {
+            $scope.treeList.splice(0, $scope.treeList.length);
+
+            $http({
+                method: 'get',
+                url: '../../api/workresourcelibrary/GetFileTypesByParent',
+                params: {
+                    parentid: id
+                }
+            }).then(function (result) {
+
+                /*
+                $timeout(function () {
+                    $ang.forEach(result.data.item, function (it) {
+                    $scope.treeList.push(it);
+                });
+                }, 1000);*/
+                $scope.selectData.filetypeid = result.data.item[0].filetypeid;
+                $scope.selectData.pageindex = 1;
+                $scope.loadData();
+
+            }, function (resp) {
+
+            });
+
+        }
+
+        $scope.loadData = function () {
+            if (!$scope.selectData.filetypeid) {
+                return;
+            }
+            //$loading.show();
+            $http({
+                method: 'get',
+                url: '../../api/workresourcelibrary/GetFilesByType',
+                params: $scope.selectData
+            }).then(function (req) {
+                //$loading.hide();
+                $scope.fileList = req.data.item.list;
+                $scope.selectData.ptotal = req.data.item.total;
+            }, function (resp) {
+                //$loading.hide();
+            });
+        };
+
+        //监视页数变化
+        $scope.$watch("selectData.pageindex", function (newVal, oldVal) {
+            if ($scope.selectData.ptotal > 0) {
+                if ($scope.selectData.fileName != null && $scope.selectData.fileName != ''){
+                    $scope.FindWord();
+                }else {
+                    $scope.loadData();
+                }
+            }
+        });
+
+
+        $scope.GetNavData();
+
+        $scope.selectTab = function (id) {
+            $scope.selectTabId = id;
+            $scope.GetTreeData(id);
+        };
+
+        $scope.selectTree = function (id) {
+
+            $scope.selectData.filetypeid = id;
+            $scope.selectData.pageindex = 1;
+            $scope.loadData();
+        };
+
+        $scope.isSelected = function (id) {
+            return $scope.selectTabId == id;
+        };
+
+        $scope.isTreeSelect = function (id) {
+            return $scope.selectData.filetypeid == id;
+        };
+        
+
+
+        var fileViewModal = $modal({
+            scope: $scope,
+            title: '文件展现',
+            templateUrl: 'filemanage/doc-show.html?' + window.sysVersion,
+            controller: 'fileViewCtrl',
+            show: false,
+            animation: 'am-fade-and-slide-top'
+        });
+
+
+        $scope.viewFile = function (fileid, filename) {
+            //window.open('../../api/home/downloadFile/' + fileid,"_blank");
+            $scope.viewFileId = fileid;
+            $scope.viewFileName = filename;
+            //$scope.isrc = '/api/workresourcelibrary/showDoc/' + $scope.viewFileId;
+            fileViewModal.$promise.then(fileViewModal.show);
+        };
+
+        $scope.downloadFile = function (fileid) {
+            $window.open('../../api/workresourcelibrary/downDoc/' + fileid);
+        };
+
+        var savemodalCtrl = function ($scope, $http,Upload,$alert) {
+            $scope.params = workModal.params;
+            $scope.content = workModal.params.content;
+            $scope.isDetail=true;
+            $scope.fid=null;
+            $scope.updata={
+                isuping:false,
+                progressPer:0,
+                updated:false
+            };
+
+            $scope.valiFileType=function(){
+
+                if($scope.content.file!= null){
+                    var filename=$scope.content.file.name;
+                    var loc = filename.lastIndexOf('.');
+                    var filetype = filename.substring(loc + 1, filename.length).toLowerCase();
+                    if(filetype!='pdf'){
+                        $alert({
+                            title: '消息',
+                            content: "只允许上传pdf",
+                            placement: 'top',
+                            type: 'info',
+                            show: true,
+                            duration: 3,
+                            container: '#dicmodal'
+                        });
+
+                        $scope.content.file=null;
+                    }
+                } else{
+                    $scope.updata.updated=false;
+                }
+
+            };
+
+            $scope.upfile=function(){
+                $scope.updata.isuping=true;
+                Upload.upload({
+                    url: '../../api/workresourcelibrary/postFile',
+                    data: {file: $scope.content.file, 'fileId': $scope.content.fileid}
+                }).then(function (resp) {
+                    if (resp.data.success) {
+                        $alert({
+                            title: '消息',
+                            content: resp.data.msg,
+                            placement: 'top',
+                            type: 'info',
+                            show: true,
+                            duration: 3
+                        });
+                        //fileObject.loadItems(fileObject.fileoption);
+                        //$scope.updata.progressPer=100;
+                        $scope.updata.isuping=false;
+                        $scope.updata.updated=true;
+
+                    } else {
+                        $scope.updata.progressPer=0;
+                        $alert({
+                            title: '消息',
+                            content: resp.data.msg,
+                            placement: 'top',
+                            type: 'info',
+                            show: true,
+                            duration: 3
+                        });
+
+                    }
+                    //console.log('Success ' + resp.config.data.file.name + 'uploaded. Response: ' + resp.data);
+                }, function (resp) {
+                    $scope.updata.updated=false;
+                    $alert({title: '错误', content: "上传服务器错误!", placement: 'center', type: 'info', show: true, duration: 3});
+                    //$scope.updata.progressPer=0;
+
+                }, function (evt) {
+                    $scope.updata.progressPer = parseInt(100.0 * evt.loaded / evt.total);
+                    //console.log('progress: ' + progressPercentage + '% ' + evt.config.data.file.name);
+                });
+            };
+
+            $scope.submit = function (isflag) {
+                if (isflag) {
+                    if(!$scope.updata.updated){
+                        $alert({
+                            title: '提示:',
+                            content: '请上传文件',
+                            placement: 'top',
+                            type: 'info',
+                            show: true,
+                            duration: 3
+                        });
+                        return;
+                    }
+                    $loading.show();
+                    $http({
+                        method: "post",
+                        url: "../../api/workresourcelibrary/saveFile",
+                        data: $scope.content
+                    }).then(function (result) {
+                        $loading.hide();
+                        $alert({
+                            title: '成功:',
+                            content: result.data.msg,
+                            placement: 'top',
+                            type: 'info',
+                            show: true,
+                            duration: 3
+                        });
+                        //重新刷新列表
+                        $scope.loadData();
+                        $scope.$hide();
+
+                    }), function (resp) {
+                        $alert({
+                            title: '错误:',
+                            content: '服务器错误',
+                            placement: 'top',
+                            type: 'info',
+                            show: true,
+                            duration: 3
+                        });
+                    }
+                }
+            }
+        };
+        savemodalCtrl.$inject = ['$scope', '$http','Upload','$alert'];
+
+        //新增或编辑字典 模态框
+        var workModal = $modal({
+            resolve: {
+                load: ['$ocLazyLoad', function ($ocLazyLoad) {
+                    return [$ocLazyLoad.load('../main/partyUser/workResourceLibrary/fileEdit.css')];
+                }]
+            },
+            scope: $scope,
+            controller: savemodalCtrl,
+            templateUrl: '../main/partyUser/workResourceLibrary/fileEdit.html',
+            show: false,
+            animation: 'am-fade-and-slide-top'
+        });
+
+        $scope.addFile = function () {
+            workModal.content = {};
+            workModal.params = {
+                title: "新增工作资源库",
+                dicTypeKeyDisabled: false,
+                dicTypeDisabled: true,
+                content: {dictype: 2,filetypeid:$scope.selectData.filetypeid}
+            };
+            $scope.getFileById(null);
+        };
+
+        //打开字典编辑模态框
+        $scope.editFile = function (id) {
+            workModal.params = {
+                title: "工作资源库编辑",
+                dicTypeKeyDisabled: true,
+                dicTypeDisabled: false,
+                content: {dictype: 2,filetypeid:$scope.selectData.filetypeid}
+            };
+            $scope.getFileById(id);
+            $loading.show();
+        };
+
+        $scope.importFile = function () {
+            console.log("importFile");
+        }
+
+        $scope.exportFile = function () {
+            console.log("exportFile");
+        }
+
+        $scope.getFileById = function (id) {
+            $http.get("../../api/workresourcelibrary/getFile", {params: {'fileId': id}}).then(function (result) {
+                $loading.hide();
+                workModal.params.content = result.data.item;
+                workModal.params.content.filetypeid=$scope.selectData.filetypeid;
+                workModal.params.content.filetypename=$scope.selectData.filetypename;
+                workModal.$promise.then(workModal.show);
+            }, function () {
+                $alert({title: '错误:', content: '服务器错误', placement: 'top', type: 'info', show: true, duration: 3});
+            });
+        };
+
+        $scope.deleteFile = function (id) {
+            if (confirm("是否确定删除?")) {
+                $http({
+                    url: "../../api/workresourcelibrary/deleteFile",
+                    method: 'GET',
+                    params: {fileId: id}
+                }).then(function (result) {
+                    $scope.showMsg("消息", result.data.msg);
+                    if (result.data.success) {
+                        $scope.loadData();
+                    }
+                });
+            }
+        };
+
+        var fileTypeModalController = function ($scope, $http) {
+
+            $scope.edit = {
+                filetypeparentname: "",
+                filetypeparentid: "",
+                treecurrentfiletypeid :'',
+                treefiletypeparentname :'',
+                treefiletypeparentid :''
+            };
+            $scope.title = "模板分类信息";
+            $scope.fileTypeModel = angular.copy($scope.currentFileType);
+            $scope.edit.filetypeparentid = $scope.fileTypeModel.parenttypeid;
+            $scope.selectfileTypeParent = function () {
+                if ($scope.selectParentShow) {
+                    myselectModal.$promise.then(myselectModal.show);
+                }
+
+            };
+
+            //获取原父级菜单
+            $scope.getParentName = function () {
+                if ($scope.fileTypeModel.parenttypeid == null || $scope.fileTypeModel.parenttypeid == "") {
+                    $scope.edit.filetypeparentname = "模板分类";
+
+                } else {
+                    $http.get("../../api/workresourcelibrary/getFiletype", {params: {'typeid': $scope.fileTypeModel.parenttypeid}}).then(function (result) {
+                        $scope.edit.filetypeparentname = result.data.item.filetypename;
+
+                    }, function () {
+                        console.log("无匹配项");
+                    });
+                }
+            };
+            $scope.getParentName();
+
+
+            //加载子菜单
+            $scope.loadTreeChildFileType = function (item) {
+                $scope.searchParam = "";//查询条件清空
+                if (!item.isExpand)//如果该节点未展开
+                {
+                    item.isExpand = true;
+                    $scope.getFileTypeByParentID(item);
+                } else {
+                    item.isExpand = false;
+                }
+            };
+            //根据当前项的menuID找到其所有的子菜单
+            $scope.getFileTypeByParentID = function (item) {
+                $http.get("../../api/filemgr/getFiletypeList", {
+                    params: {
+                        'parentId': item.filetypeid,
+                        pageindex: 1,
+                        pagesize: 999
+                    }
+                }).then(function (result) {
+                    item.childMenus = result.data.item.list;
+
+                }, function (reason) {
+                    console.log("无匹配项");
+                });
+            };
+            $scope.selectTreeFileTypeItem = function (item) {
+                if ($scope.curMenuID != item.filetypeid) {
+                    if (item.parentmoduleid != null) {
+                        $alert({
+                            title: '提示:',
+                            content: "只能选择一级模块",
+                            placement: 'top',
+                            type: 'info',
+                            show: true,
+                            duration: 3,
+                            container: "#selectParentMenu"
+                        });
+                        return;
+                    }
+                    $scope.edit.treefiletypeid = item.filetypeid;
+                    $scope.edit.treefiletypeparentname = item.filetypename;
+                    $scope.edit.treefiletypeparentid = item.filetypeid;
+                }
+            };
+
+            //加载所有的父菜单记录
+            var selecModalController = function ($scope, $http) {
+
+                //加载所有的父菜单记录
+                $scope.getMenus = function () {
+                    $.ajax({
+                        url: "../../api/workresourcelibrary/getFiletypeList",
+                        data: {
+                            pageindex: 1,
+                            pagesize: 999
+                        },
+                        type: 'get',
+                        contentType: 'application/json',
+                        success: function (res) {
+                            $scope.$apply(function () {
+                                $scope.selectMenus = res.item.list;
+                            })
+                        },
+                        error: function (res) {
+                            console.log(res);
+                        }
+                    });
+                };
+                //加载子菜单
+                $scope.loadChild = function (item) {
+
+                    if (!item.isExpand)//如果该节点未展开
+                    {
+                        item.isExpand = true;
+                        $scope.getMenuByPID(item);
+                    } else {
+                        item.isExpand = false;
+                    }
+                };
+                //根据当前项的menuID找到其所有的子菜单
+                $scope.getMenuByPID = function (item) {
+                    $http.get("../../api/workresourcelibrary/getFiletypeList", {
+                        params: {
+                            'parentId': item.filetypeid,
+                            pageindex: 1,
+                            pagesize: 999
+                        }
+                    }).then(function (result) {
+                        item.childs = result.data.item.list;
+
+                    }, function (result) {
+                        console.log("无匹配项");
+                    });
+                };
+                $scope.getMenus();
+
+                $scope.changeChoose = function (item) {
+                    if ($scope.curMenuID != item.filetypeid) {
+                        if (item.parentmoduleid != null) {
+                            $alert({
+                                title: '提示:',
+                                content: "只能选择一级模块",
+                                placement: 'top',
+                                type: 'info',
+                                show: true,
+                                duration: 3,
+                                container: "#selectfileTypeParentMenu"
+                            });
+                            return;
+                        }
+                        $scope.curMenuID = item.filetypeid;
+                        $scope.Finalfiletypeparentname = item.filetypename;
+                        $scope.Finalfiletypeparentid = item.filetypeid;
+                    }
+                };
+
+                $scope.choose = function () {
+                    if ($scope.Finalfiletypeparentid != null) {
+                        $scope.edit.filetypeparentname = $scope.Finalfiletypeparentname;
+                        $scope.edit.parenttypeid = $scope.Finalfiletypeparentid;
+                        myselectModal.$promise.then(myselectModal.hide);
+                    } else {
+                        $alert({
+                            title: '提示:',
+                            content: "未选择有效的父级模块",
+                            placement: 'top',
+                            type: 'info',
+                            show: true,
+                            duration: 3,
+                            container: "#selectfileTypeParentMenu"
+                        });
+
+                    }
+
+                };
+
+
+            };
+            selecModalController.$inject = ['$scope', '$http'];
+            var myselectModal = $modal({
+                scope: $scope,
+                title: '选择父模块',
+                resolve: {
+                    load: ['$ocLazyLoad', function ($ocLazyLoad) {
+                        $ocLazyLoad.load('partyUser/workResourceLibrary/filetype/select.css');
+                        return true;
+                    }]
+                },
+                templateUrl: 'partyUser/workResourceLibrary/filetype/selectParent.html',
+                controller: selecModalController,
+                show: false,
+                animation: 'am-fade-and-slide-top'
+            });
+            //保存菜单项
+            $scope.saveFileType = function () {
+                $scope.fileTypeModel.parenttypeid = $scope.edit.parenttypeid;
+                $.ajax({
+                    url: "../../api/workresourcelibrary/saveFiletype",
+                    data: JSON.stringify($scope.fileTypeModel),
+                    type: 'post',
+                    contentType: 'application/json',
+                    success: function (res) {
+                        $scope.$apply(function () {
+                            $scope.getMenuList();
+                            fileTypeModal.$promise.then(fileTypeModal.hide);
+                            $scope.showalert(res.msg);
+                        })
+                    },
+                    error: function (res) {
+                        console.log(res);
+                    }
+                });
+            }
+        };
+        fileTypeModalController.$inject = ['$scope', '$http'];
+
+        var fileTypeModal = $modal({
+            scope: $scope,
+            title: '模板分类信息',
+            templateUrl: 'partyUser/workResourceLibrary/filetype/edit.html',
+            controller: fileTypeModalController,
+            show: false,
+            animation: 'am-fade-and-slide-top'
+        });
+        
+        $scope.selectParentShow = true;
+        
+        $scope.editFileType = function () {
+            fileTypeModal.$promise.then(fileTypeModal.show);
+        };
+
+        $scope.addFileType = function () {
+            $scope.selectParentShow = true;
+            $scope.currentFileType = {
+                menuid: null,
+                parenttypeid: "",
+                menuorder: "",
+                menuname: "",
+                menudesc: "",
+            };
+            fileTypeModal.$promise.then(fileTypeModal.show);
+        };
+
+        $scope.deleteFileType = function () {
+            if (!confirm("确认删除?")) {
+                return;
+            }
+            $http.get("../../api/workresourcelibrary/deleteFiletype",
+                {params: {'typeid': $scope.currentFileType.filetypeid}}).then(function (result) {
+                // $scope.getMenuList();
+                $scope.showalert(result.data.msg);
+            }, function () {
+                console.log("无匹配项");
+            });
+        };
+
+        //提示函数
+        $scope.showalert = function (data) {
+            $alert({title: '提示:', content: data, placement: 'top', type: 'info', show: true, duration: 3});
+        };
+
+    }).controller('fileViewCtrl', function ($scope, $http) {
+        $scope.title = $scope.$parent.$parent.viewFileName;
+        $scope.fileId = $scope.$parent.$parent.viewFileId;
+        $scope.isrc = '/api/workresourcelibrary/showDoc/' + $scope.fileId;
+    });
+})(angular);

+ 60 - 0
src/main/resources/static/app/main/partyUser/workResourceLibrary/fileTreeList.css

@@ -0,0 +1,60 @@
+.tree-body {
+    padding: 0px !important;
+}
+
+.tree-body ul {
+    list-style: none;
+    padding: 0px 15px;
+    margin: 0px;
+    /*border-left: 1px solid #f5f5f5;
+    border-right: 1px solid #f5f5f5;*/
+}
+
+.tree-body .treeitem {
+    padding-left: 30px;
+    width: 95%;
+    cursor: pointer;
+}
+
+.tree-body .menu {
+    position: relative;
+    overflow-y: auto;
+    overflow-x:hidden;
+    padding: 0;
+    height: calc(100vh - 280px);
+}
+
+.tree-body .row {
+    border-bottom: 1px solid #f5f5f5;
+    padding: 6px 0px 6px 0px;
+    cursor: pointer;
+}
+
+.tree-body .row .material-icons {
+    position: relative;
+    float: left;
+    top: -2px;
+}
+
+.tree-body .icon-name-spac {
+    padding-left: 24px;
+    display: flex;
+}
+
+.key-header  .btn{
+    font-size: 16px;
+}
+
+.key-input{
+    height: 36px !important;
+}
+
+.bg-light-first {
+    background-color: #c45046 !important;
+    color: #fff;
+}
+
+.bg-light-second {
+    background-color: #992D2C !important;
+    color: #fff;
+}

+ 127 - 0
src/main/resources/static/app/main/partyUser/workResourceLibrary/fileTreeList.html

@@ -0,0 +1,127 @@
+<titlemenu></titlemenu>
+<div class="dj-list">
+    <div class="dj-list-body">
+        <div class="dj-list-content">
+            <div class="card">
+                <div activate-input class="key-header" style="padding-top: 20px;">
+                    <div class="row clearfix">
+                        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 form-inline">
+                            <input size="80" ng-model="selectData.fileName" class="form-control key-input" type="text"
+                                   placeholder="  输入关键字查找">
+                            <a class="btn btn-default1" ng-click="searchFile()">
+                                搜索
+                            </a>
+                        </div>
+                    </div>
+                </div>
+                <div class="key-body">
+                    <div class="panel tab-body1">
+                        <div class="row clearfix">
+                            <div class="col-md-3 col-lg-3 col-xs-12 col-sm-12">
+                                <div class="card" style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);">
+                                    <div class="header">
+<!--                                        <div class="title" style="font-weight: bold;font-size: 16px;"> <i class="material-icons" style="float: left;margin-right: 7px;font-size: 20px;">folder</i>模板分类</div>-->
+                                        <div class="title" style="font-weight: bold;font-size: 16px;">
+                                            <span style="margin-left:10px;cursor:pointer;" ng-class="selectData.filetypeid==null?'party_active':'' "
+                                                  ng-click="clickTreeChild(null)">模板分类</span>
+                                                <i class="glyphicon glyphicon-remove-circle pull-right"
+                                                   style="padding: 4px;"
+                                                   role-permission-code="workResourceLibraryList.btnDeleteType"
+                                                   title="删除题库" ng-click="deleteFileType()"></i>
+                                                <i class="glyphicon glyphicon-edit pull-right" style="padding: 4px;"
+                                                   role-permission-code="workResourceLibraryList.btnEditType"
+                                                   title="修改题库" ng-click="editFileType()"></i>
+                                                <i class="glyphicon glyphicon-plus-sign pull-right" style="padding: 4px;"
+                                                   role-permission-code="workResourceLibraryList.btnAddType"
+                                                   title="新增题库" ng-click="addFileType()"></i>
+                                            </div>
+                                    </div>
+                                    <div class="body tree-body">
+                                        <div class="menu">
+                                            <script type="text/ng-template" id="nodes.html">
+                                                <li class="row">
+                                                    <div ng-click="clickTreeChild(tree)" ng-class="selectData.filetypeid==tree.id?'party_active':'' ">
+                                                        <i ng-if="tree.childcount>0" class="material-icons">{{tree.expand ? 'expand_more' :
+                                                            'chevron_right'}}</i>
+                                                        <span class="icon-name" ng-class="tree.childcount>0?'':'icon-name-spac'">{{tree.name}}</span>
+                                                    </div>
+                                                    <div ng-hide="!tree.expand">
+                                                        <div class="treeitem"
+                                                             ng-repeat="tree in tree.children" ng-include="'nodes.html'"></div>
+                                                    </div>
+                                                </li>
+                                            </script>
+                                            <ul class="list-group" ng-repeat="tree in navList" ng-include="'nodes.html'">
+                                            </ul>
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                            <div class="col-lg-9 col-md-9 col-sm-12 col-xs-12">
+                                <div class="table-responsive list-table-panel">
+                                    <div class="search-btn" style="margin-bottom: 40px;">
+                                        <div style="float: right">
+                                            <button role-permission-code="workResourceLibraryList.btnAdd" class="btn btn-default1"
+                                                    ng-click="addFile()">新增
+                                            </button>
+                                            <button role-permission-code="workResourceLibraryList.btnImport" class="btn btn-default1"
+                                                    ng-click="importFile()">导入
+                                            </button>
+                                            <button role-permission-code="workResourceLibraryList.btnExport" class="btn btn-default1"
+                                                    ng-click="exportFile()">导出
+                                            </button>
+                                        </div>
+                                    </div>
+                                    <table class="table table-bordered table-striped table-hover js-basic-example dataTable table-text-clip">
+                                        <thead>
+                                        <tr>
+                                            <th class="col-md-1">制度编号</th>
+                                            <th class="col-md-7">文件名称</th>
+                                            <th class="col-md-2">排序</th>
+                                            <th class="col-md-2">操作</th>
+                                        </tr>
+                                        </thead>
+                                        <tbody>
+                                        <tr ng-repeat="f in fileList">
+                                            <td class="text-center">{{f.filecode}}</td>
+                                            <td class="td_long_content" title="{{ f.filename}}"><a href="javascript:void(0)" ng-click="viewFile(f.fileid,f.filename)">{{ f.filename}}</a></td>
+                                            <td class="text-center">{{f.filecode2}}</td>
+                                            <td class="text-center">
+                                                <button class="btn td-btn bg-light-first waves-effect" title="查看"
+                                                        data-placement="center" data-animation="am-fade-and-scale"
+                                                        ng-click="viewFile(f.fileid,f.filename)">
+                                                    查看
+                                                </button>
+                                                <button class="btn td-btn bg-pink waves-effect" title="修改" role-permission-code="workResourceLibraryList.btnEdit"
+                                                        ng-click="editFile(f.fileid)">
+                                                    修改
+                                                </button>
+                                                <button class="btn td-btn bg-pink waves-effect" title="删除" role-permission-code="workResourceLibraryList.btnDelete"
+                                                        ng-click="deleteFile(f.fileid)">
+                                                    删除
+                                                </button>
+                                                <button class="btn td-btn bg-light-second waves-effect" title="下载" role-permission-code="workResourceLibraryList.btnDown"
+                                                        ng-click="downloadFile(f.fileid)">
+                                                    下载
+                                                </button>
+                                            </td>
+                                        </tr>
+                                        <tr ng-if="fileList.length<=0">
+                                            <td colspan="5" style="text-align:center">暂无数据</td>
+                                        </tr>
+                                        </tbody>
+                                    </table>
+                                </div>
+                                <!--参数含义:page-Index:当前页面,page-Size:每页显示多少数据,total-Length:数据总长度-->
+                                <pagination ng-if="fileList.length>0" data-pageindex="selectData.pageindex"
+                                            data-pagesize="selectData.pagesize" data-ptotal="selectData.ptotal"></pagination>
+                            </div>
+                        </div>
+                    </div>
+
+                </div>
+            </div>
+
+        </div>
+    </div>
+</div>

+ 77 - 0
src/main/resources/static/app/main/partyUser/workResourceLibrary/filetype/edit.html

@@ -0,0 +1,77 @@
+<div class="modal" tabindex="-1" role="dialog" style="min-height:500px;">
+    <div class="modal-dialog" role="document" style="width:70%">
+
+        <div class="card">
+            <div class="header">
+                <button type="button" class="close" ng-click="$hide()">&times;</button>
+                <h3 class="modal-title">{{title}}</h3>
+            </div>
+            <div activate-input class="body">
+                <form class="form-horizontal" ng-submit="saveFileType()" role="form"
+                      name="editFileTypeForm" ng-controller="workResourceLibraryListCtrl" novalidate>
+                    <div class="row clearfix">
+                        <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 form-control-label">
+                            <label><span style="color:red">*</span>父级目录</label>
+                        </div>
+                        <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
+                            <div class="form-group">
+                                <div class="input-group" style="margin-bottom: 0px;">
+                                    <div class="form-line"
+                                         ng-class="{ 'focused error' : editFileTypeForm.filetypeparentname.$invalid &&  editFileTypeForm.$submitted}">
+                                        <input name="filetypeparentname" type="text" ng-model="edit.filetypeparentname"
+                                               class="form-control" ng-required="true" ng-disabled="true"/>
+                                    </div>
+                                    <span class="input-group-addon" ng-click="selectfileTypeParent()">
+                                            <i class="material-icons">search</i>
+                                    </span>
+                                </div>
+                                <label ng-show="editFileTypeForm.filetypeparentname.$invalid &&  editFileTypeForm.$submitted"
+                                       class="error">必填.</label>
+
+                            </div>
+                        </div>
+                        <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 form-control-label">
+                            <label>排序</label>
+                        </div>
+                        <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
+                            <div class="form-group">
+                                <div class="form-line"
+                                     ng-class="{ 'focused error' : editFileTypeForm.treelevel.$invalid &&  editFileTypeForm.$submitted}">
+                                    <input name="treelevel" type="number" ng-model="fileTypeModel.treelevel" class="form-control"
+                                           ng-required="true" value={{fileTypeModel.treelevel}}/>
+                                </div>
+                                <label ng-show="editFileTypeForm.treelevel.$invalid &&  editFileTypeForm.$submitted"
+                                       class="error">必填.</label>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="row clearfix">
+                        <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2 form-control-label">
+                            <label>目录名称</label>
+                        </div>
+                        <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3">
+                            <div class="form-group">
+                                <div class="form-line"
+                                     ng-class="{ 'focused error' : editFileTypeForm.filetypename.$invalid &&  editFileTypeForm.$submitted}">
+                                    <input name="filetypename" type="text" ng-model="fileTypeModel.filetypename" class="form-control"
+                                           ng-required="true" value={{fileTypeModel.filetypename}}
+                                           ng-disabled="fileTypeModel.filetypename=='菜单管理'"/>
+                                </div>
+                                <label ng-show="editFileTypeForm.filetypename.$invalid &&  editFileTypeForm.$submitted"
+                                       class="error">必填.</label>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="form_foot" style="text-align:center">
+                        <button id="submit" class="btn btn-danger" style="padding:4px 20px 4px 20px" type="submit"
+                                ng-disabled="editFileTypeForm.$invalid">提交
+                        </button>
+                        <button id="cancel" type="button" class="btn btn-default" style="padding:4px 20px 4px 20px"
+                                ng-click="$hide()">取消
+                        </button>
+                    </div>
+                </form>
+            </div>
+        </div>
+    </div>
+</div>

+ 121 - 0
src/main/resources/static/app/main/partyUser/workResourceLibrary/filetype/manage.html

@@ -0,0 +1,121 @@
+<style>
+    li ~ span {
+        padding-left: 4px;
+        padding-right: -4px;
+    }
+
+    .panel-body li:hover {
+        background-color: #F5F5F5;
+    }
+
+    .treeitem > li > span:nth-child(1) {
+        padding-left: 16px;
+        padding-right: -16px;
+    }
+
+    .treeitem .treeitem li > span:nth-child(1) {
+        padding-left: 32px;
+        padding-right: -32px;
+    }
+
+    .treeitem .treeitem .treeitem li > span:nth-child(1) {
+        padding-left: 48px;
+        padding-right: -48px;
+    }
+</style>
+<titlemenu></titlemenu>
+<div class="dj-list" style="padding-top: 5px;">
+    <div class="dj-list-body">
+        <div class="dj-list-content content1">
+            <div class="card">
+                <div activate-input class="header search-header">
+                    <div class="search-param-panel">
+                        <div class="search-input">
+                            <div class="row clearfix form-inline">
+                                <div class="col-lg3 col-md-3 dj-label">
+                                    <label>目录名称</label>
+                                </div>
+                                <div class="col-lg3 col-md-3">
+                                    <div class="form-group">
+                                        <div class="form-line">
+                                            <input type="text" class="form-control" ng-model="typename" ng-keypress="($event.which === 13)?searchMenu():0"
+                                                   name="typename"/>
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="search-btn" style="margin-right: 20px;">
+                            <div style="min-width: 13em">
+                                <button  class="btn btn-default1"
+                                        type="submit"
+                                        ng-click="searchMenu()">查询
+                                </button>
+                                <button  class="btn btn-default1 btn-reset"
+                                        ng-click="reset()">重置
+                                </button>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="search-btn" style="margin-right: 20px;">
+                        <div style="float: right">
+                            <button role-permission-code="filetypeMgr.btnAdd" class="btn btn-default1"
+                                    ng-click="addMenu()">新增
+                            </button>
+                        </div>
+                    </div>
+                </div>
+                <div class="body">
+                    <div class="list-table-panel">
+                        <script type="text/ng-template" id="nodes.html">
+                            <li class="row" style="border-bottom:1px solid #f5f5f5; padding:6px 0px 6px 14px">
+                                <span style="width:70%;display: inline-block;">
+                                    <div ng-click="loadChildMenu(menu)">
+                                        <i ng-if="menu.childcount>0" class="material-icons" style="position: relative;top:7px;">{{menu.isExpand ? 'expand_more' : 'chevron_right'}}</i>
+                                        <span class="icon-name">{{menu.filetypename}}</span>
+                                    </div>
+                                </span>
+                                <span style="width:10%;display:inline-block;">{{menu.treelevel}}</span>
+                                <span style="width:15%;display:inline-block; text-align: center">
+                                    <button role-permission-code="filetypeMgr.btnAdd"
+                                            class="btn td-btn bg-light-green waves-effect" ng-click="editModal(menu)"
+                                            title="修改">
+                                         修改
+                                    </button>
+                                    <button role-permission-code="filetypeMgr.btnDelete"
+                                            class="btn td-btn bg-pink waves-effect" ng-click="delete(menu)" title="删除">
+                                         删除
+                                    </button>
+                                 </span>
+                            </li>
+                            <div ng-hide="!menu.isExpand">
+                                <div class="treeitem" ng-repeat="menu in menu.childMenus" ng-include="'nodes.html'"
+                                     style="cursor: pointer;"></div>
+                            </div>
+                        </script>
+                        <table class="table table-bordered table-striped table-hover js-basic-example dataTable"
+                               style="margin-bottom: 0px;">
+                            <thead>
+                            <tr>
+                                <th  width="70%">目录名称</th>
+                                <th width="10%">排序</th>
+                                <th width="20%">操作</th>
+                            </tr>
+                            <tr ng-if="menuLists.length<=0">
+                                <td colspan="7" style="text-align:center">暂无数据</td>
+                            </tr>
+                            </thead>
+                        </table>
+                        <ul style="list-style:none;padding:0px 15px; margin:0px;border-left:1px solid #f5f5f5;border-right: 1px solid #f5f5f5 "
+                            ng-repeat="menu in menuLists"
+                            ng-include="'nodes.html'">
+                        </ul>
+
+                        <pagination ng-if="menuLists.length>0"  data-pageindex="selectdata.pageindex"
+                                    data-pagesize="selectdata.pagesize" data-ptotal="selectdata.total"></pagination>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>

+ 303 - 0
src/main/resources/static/app/main/partyUser/workResourceLibrary/filetype/manage.js

@@ -0,0 +1,303 @@
+(function ($ang) {
+    'use strict';
+    $ang.module('gtPartyApp').controller('filetypeMgrCtrl', function ($scope, $http, $alert, $modal, AuthUser, $state, $loading, $window, $timeout, $stateParams, $bsRouterState,$sce) {
+
+        $scope.title = '制度目录管理';
+
+        $state.params = $bsRouterState.$params($scope);
+
+        //分页设置
+        $scope.selectdata = {pageindex: 1, pagesize: 10, ptotal: 0};
+        $scope.hasPermission = {
+            show: true
+        };
+        //当前用户获取
+        $scope.user = AuthUser.getUser();
+        //选择的菜单名称
+        $scope.modulename = '';
+        //所有的菜单记录
+        $scope.menuLists = [];
+        $scope.curMenuID = "";
+
+        $scope.selectdata = {
+            pageindex: 1, pagesize: 10, total: 0
+        };
+        //加载所有的父菜单记录
+        $scope.getMenuList = function () {
+            $loading.show();
+            $http.get("../../api/filemgr/getFiletypeList", {
+                params: {
+                    'typename': $scope.typename,
+                    'pageindex': $scope.selectdata.pageindex,
+                    'pagesize': $scope.selectdata.pagesize
+                }
+            }).then(function (value) {
+                $scope.menuLists = value.data.item.list;
+                $scope.selectdata.total = value.data.item.total;
+                $loading.hide();
+            }, function (reason) {
+                $loading.hide();
+                console.log(reason);
+            });
+
+        };
+
+        //查询对应菜单数据
+        $scope.searchMenu = function () {
+            $scope.getMenuList();
+        };
+        //加载子菜单
+        $scope.loadChildMenu = function (item) {
+            $scope.searchParam = "";//查询条件清空
+            if (!item.isExpand)//如果该节点未展开
+            {
+                item.isExpand = true;
+                $scope.getMenuByParentID(item);
+            } else {
+                item.isExpand = false;
+            }
+        };
+        //根据当前项的menuID找到其所有的子菜单
+        $scope.getMenuByParentID = function (item) {
+            $http.get("../../api/filemgr/getFiletypeList", {
+                params: {
+                    'parentId': item.filetypeid,
+                    pageindex: 1,
+                    pagesize: 999
+                }
+            }).then(function (result) {
+                item.childMenus = result.data.item.list;
+
+            }, function (reason) {
+                console.log("无匹配项");
+            });
+        };
+
+        $scope.getMenuList();
+
+        //监视页数变化
+        $scope.$watch("selectdata.pageindex", function (newVal, oldVal) {
+            $scope.getMenuList();
+        });
+
+        //删除选中菜单项
+        $scope.delete = function (item) {
+            if (!confirm("确认删除?")) {
+                return;
+            }
+            $http.get("../../api/filemgr/deleteFiletype", {params: {'typeid': item.filetypeid}}).then(function (result) {
+                $scope.getMenuList();
+                $scope.showalert(result.data.msg);
+            }, function () {
+                console.log("无匹配项");
+            });
+
+        };
+
+        var MyModalController = function ($scope, $http) {
+
+            $scope.edit = {
+                menuParentName: "",
+                menuParentId: ""
+            };
+            $scope.title = "制度目录信息";
+            $scope.menu = $scope.data;
+            $scope.edit.menuParentId = $scope.menu.parentmenuid;
+            $scope.selectParent = function () {
+                if ($scope.hasPermission.show) {
+                    myselectModal.$promise.then(myselectModal.show);
+                }
+
+            };
+
+            //获取原父级菜单
+            $scope.getParentName = function () {
+                if ($scope.menu.parenttypeid == null || $scope.menu.parenttypeid == "") {
+                    $scope.edit.menuParentName = "顶层模块";
+
+                } else {
+                    $http.get("../../api/filemgr/getFiletype", {params: {'typeid': $scope.menu.parenttypeid}}).then(function (result) {
+                        $scope.edit.menuParentName = result.data.item.filetypename;
+
+                    }, function () {
+                        console.log("无匹配项");
+                    });
+                }
+            };
+            $scope.getParentName();
+
+            //加载所有的父菜单记录
+            var selecModalController = function ($scope, $http) {
+
+                //加载所有的父菜单记录
+                $scope.getMenus = function () {
+                    $.ajax({
+                        url: "../../api/filemgr/getFiletypeList",
+                        data: {
+                            pageindex: 1,
+                            pagesize: 999
+                        },
+                        type: 'get',
+                        contentType: 'application/json',
+                        success: function (res) {
+                            $scope.$apply(function () {
+                                $scope.selectMenus = res.item.list;
+                            })
+                        },
+                        error: function (res) {
+                            console.log(res);
+                        }
+                    });
+                };
+                //加载子菜单
+                $scope.loadChild = function (item) {
+
+                    if (!item.isExpand)//如果该节点未展开
+                    {
+                        item.isExpand = true;
+                        $scope.getMenuByPID(item);
+                    } else {
+                        item.isExpand = false;
+                    }
+                };
+                //根据当前项的menuID找到其所有的子菜单
+                $scope.getMenuByPID = function (item) {
+                    $http.get("../../api/filemgr/getFiletypeList", {
+                        params: {
+                            'parentId': item.filetypeid,
+                            pageindex: 1,
+                            pagesize: 999
+                        }
+                    }).then(function (result) {
+                        item.childs = result.data.item.list;
+
+                    }, function (result) {
+                        console.log("无匹配项");
+                    });
+                };
+                $scope.getMenus();
+
+                $scope.changeChoose = function (item) {
+                    if ($scope.curMenuID != item.filetypeid) {
+                        if (item.parentmoduleid != null) {
+                            $alert({
+                                title: '提示:',
+                                content: "只能选择一级模块",
+                                placement: 'top',
+                                type: 'info',
+                                show: true,
+                                duration: 3,
+                                container: "#selectParentMenu"
+                            });
+                            return;
+                        }
+                        $scope.curMenuID = item.filetypeid;
+                        $scope.FinalmenuParentName = item.filetypename;
+                        $scope.FinalmenuParentId = item.filetypeid;
+                    }
+                };
+
+                $scope.choose = function () {
+                    if ($scope.FinalmenuParentId != null) {
+                        $scope.edit.menuParentName = $scope.FinalmenuParentName;
+                        $scope.edit.parenttypeid = $scope.FinalmenuParentId;
+                        myselectModal.$promise.then(myselectModal.hide);
+                    } else {
+                        $alert({
+                            title: '提示:',
+                            content: "未选择有效的父级模块",
+                            placement: 'top',
+                            type: 'info',
+                            show: true,
+                            duration: 3,
+                            container: "#selectParentMenu"
+                        });
+
+                    }
+
+                };
+
+
+            };
+            selecModalController.$inject = ['$scope', '$http'];
+            var myselectModal = $modal({
+                scope: $scope,
+                title: '选择父模块',
+                resolve: {
+                    load: ['$ocLazyLoad', function ($ocLazyLoad) {
+                        $ocLazyLoad.load('filemanage/filetype/select.css');
+                        return true;
+                    }]
+                },
+                templateUrl: 'filemanage/filetype/selectParent.html',
+                controller: selecModalController,
+                show: false,
+                animation: 'am-fade-and-slide-top'
+            });
+            //保存菜单项
+            $scope.saveMenu = function () {
+                $scope.menu.parenttypeid = $scope.edit.parenttypeid;
+                $.ajax({
+                    url: "../../api/filemgr/saveFiletype",
+                    data: JSON.stringify($scope.menu),
+                    type: 'post',
+                    contentType: 'application/json',
+                    success: function (res) {
+                        $scope.$apply(function () {
+                            $scope.getMenuList();
+                            myModal.$promise.then(myModal.hide);
+                            $scope.showalert(res.msg);
+                        })
+                    },
+                    error: function (res) {
+                        console.log(res);
+                    }
+                });
+            }
+
+
+        };
+        MyModalController.$inject = ['$scope', '$http'];
+
+        var myModal = $modal({
+            scope: $scope,
+            title: '制度目录信息',
+            templateUrl: 'filemanage/filetype/edit.html',
+            controller: MyModalController,
+            show: false,
+            animation: 'am-fade-and-slide-top'
+        });
+
+        $scope.editModal = function (menu) {
+
+            $scope.data = angular.copy(menu);
+            myModal.$promise.then(myModal.show);
+        };
+        //新增菜单项
+        $scope.addMenu = function () {
+            $scope.hasPermission.show = true;
+            $scope.newMenu = {
+                menuid: null,
+                parentmenuid: "",
+                menuorder: "",
+                menuname: "",
+                menudesc: "",
+            };
+            $scope.editModal($scope.newMenu);
+            myModal.$promise.then(myModal.show);
+        };
+
+
+        //提示函数
+        $scope.showalert = function (data) {
+            $alert({title: '提示:', content: data, placement: 'top', type: 'info', show: true, duration: 3});
+        };
+
+        $scope.reset = function () {
+            //选择的菜单名称
+            $scope.MenuName = '';
+            //选择的菜单编号
+            $scope.MenuNo = '';
+        }
+    });
+})(angular);

+ 7 - 0
src/main/resources/static/app/main/partyUser/workResourceLibrary/filetype/select.css

@@ -0,0 +1,7 @@
+.treeitem {
+    padding-left: 15px;
+}
+
+.treeitem .treeitem {
+    padding-left: 28px;
+}

+ 42 - 0
src/main/resources/static/app/main/partyUser/workResourceLibrary/filetype/selectParent.html

@@ -0,0 +1,42 @@
+<div class="modal" tabindex="-1" role="dialog" id="selectParentMenu">
+    <div class="modal-dialog">
+        <div class="modal-content">
+            <div class="panel-heading modal-header">
+                <button type="button" class="close" ng-click="$hide()">&times;</button>
+                <h4 class="modal-title">选择父级模块</h4>
+            </div>
+            <div class="panel-body modal-body">
+                <script type="text/ng-template" id="treeFiletypeItem.html">
+                    <span>
+                        <a ng-if="item.childcount>0" class="glyphicon {{item.isExpand ? 'glyphicon-chevron-down' : 'glyphicon-chevron-right'}}"
+                           ng-click="loadTreeChildFileType(item)"></a>
+                        <span class="ModulesSpan" ng-class="depSelected:item.filetypeid==edit.treefiletypeid?'party_active':'' "
+                              style="cursor: pointer;" ng-click="selectTreeFileTypeItem(item)">{{item.filetypename}}</span>
+                    </span>
+                    <div ng-hide="!item.isExpand">
+                        <div class="treeitem" ng-repeat="item in item.childs" ng-include="'treeFiletypeItem.html'"
+                             style="cursor: pointer; margin-top:2px"></div>
+                    </div>
+                </script>
+                <div class="panel panel-info">
+                    <div class="panel-heading">
+                        <div style="display:inline-block;">
+                            <label>所选择的父目录为:</label>
+                            <span>{{edit.treefiletypeparentname}}</span>
+                        </div>
+                    </div>
+                    <div class="panel-body">
+                        <ul style="list-style:none;padding:0px 15px; margin-top:5px" ng-repeat="item in selectMenus"
+                            ng-include="'treeFiletypeItem.html'"></ul>
+                    </div>
+                </div>
+            </div>
+
+            <div class="modal-footer">
+                <button type="button" class="btn btn-primary" ng-click="$hide()">取消</button>
+                <button type="submit" class="btn btn-success" ng-click="choose()" ng-disabled="chooseOne.hasName">添加
+                </button>
+            </div>
+        </div>
+    </div>
+</div>