whycrzg
2021-03-31 eb54ef147728526158e8c7be5e05c62215464c56
src/main/java/com/whyc/controller/ProjectManageController.java
@@ -1,5 +1,6 @@
package com.whyc.controller;
import com.github.pagehelper.PageInfo;
import com.whyc.config.MyProps;
import com.whyc.dto.Response;
import com.whyc.pojo.ProjectArchiveManage;
@@ -40,26 +41,10 @@
    private ProjectArchiveManageService archiveManageService;
    @GetMapping("all")
    @ApiOperation(value = "项目过程管理-查询所有")
    public Response<List<ProjectManage>> searchAll() {
        return service.searchAll();
    }
    @GetMapping("byCondition")
    @ApiOperation(notes = "项目过程管理",value = "项目过程管理-条件查询")
    public Response<List<ProjectManage>> searchByCondition(@ApiParam(value = "申报日期 格式 2021/01/28",required = true) @RequestParam Date proCreatedate,
                                                           @ApiParam(value = "项目类型",required = true)@RequestParam String proSort,
                                                           @ApiParam(value = "项目状态",required = true)@RequestParam int proState,
                                                           @ApiParam(value = "项目编号",required = true)@RequestParam String proNum) {
        ProjectManage projectManage = new ProjectManage();
        projectManage.setProCreatedate(proCreatedate);
        projectManage.setProSort(proSort);
        projectManage.setProState(proState);
        projectManage.setProNum(proNum);
        return service.searchByCondition(projectManage);
    @PostMapping("progressByCondition")
    @ApiOperation(notes = "项目过程管理", value = "项目过程管理-查询分页-根据筛选条件")
    public Response<PageInfo<ProjectManage>> searchByCondition(@RequestParam int pageNum, @RequestParam int pageSize, @RequestBody ProjectManage projectManage) {
        return service.searchByCondition(pageNum, pageSize, projectManage);
    }
    @PostMapping("add")
@@ -220,30 +205,6 @@
        return result.setMsg(0,"文件不存在");
    }
    @DeleteMapping("/delDoc")
    @ApiOperation(notes = "", value = "文档材料删除")
    public Response delDocment(@RequestParam String filePath) {
        Response<Object> response = new Response<>();
        File file = new File(filePath);
        try {
            if (file.exists()) {
                File absoluteFile = file.getAbsoluteFile();
                String name = absoluteFile.getName();
                file.delete();
                HashMap<Object, Object> map = new HashMap<>();
                map.put("删除的文件名", name);
                map.put("删除的文件路径", filePath);
                response.setData(map);
                response.setMsg(1, "删除成功");
            } else {
                response.setMsg(0, "文件不存在");
            }
        } catch (Exception e) {
            e.printStackTrace();
            return response.setMsg(0, "删除失败");
        }
        return response;
    }
    @GetMapping("managesState")
@@ -287,8 +248,8 @@
    }
    @Delete("delDoc")
    @ApiOperation(notes = "项目过程管理-项目管理-己确认阶段",value = "文档材料删除")
    @DeleteMapping("delDoc")
    @ApiOperation(notes = "项目过程管理-项目管理",value = "文档材料删除")
    public  Response delDocumentation(@ApiParam(value = "项目编号", required = true) @RequestParam String proNum,
                                      @ApiParam(value = "项目名称代码", required = true) @RequestParam String proNameCode,
                                      @ApiParam(value = "文档路径", required = true) @RequestParam String proFilePath){
@@ -305,20 +266,12 @@
        return archiveManageService.searchArchiveAll();
    }
    @GetMapping("archiveByCondition")
    @ApiOperation(value = "项目归档管理-条件查询")
    public Response searchArchiveByCondition(@ApiParam(value = "开始日期 格式 2021/03/27",required = true) @RequestParam Date proExecutionDate,
                                             @ApiParam(value = "归档日期 格式 2021/03/27",required = true)@RequestParam Date proArchiveDate,
                                             @ApiParam(value = "项目类型",required = true)@RequestParam String proSort,
                                             @ApiParam(value = "项目编号",required = true)@RequestParam String proNum) {
        ProjectManage pm = new ProjectManage();
        pm.setProExecutionDate(proExecutionDate);
        pm.setProArchiveDate(proArchiveDate);
        pm.setProSort(proSort);
        pm.setProNum(proNum);
    @PostMapping("archiveByCondition")
    @ApiOperation(value = "项目归档管理-查询分页-根据筛选条件")
    public Response<PageInfo<ProjectManage>> searchArchiveByCondition(@RequestParam int pageNum, @RequestParam int pageSize, @RequestBody ProjectManage projectManage) {
        return archiveManageService.searchArchiveByCondition(pm);
        return archiveManageService.searchArchiveByCondition(pageNum,pageSize,projectManage);
    }
    @GetMapping("archiveProjectInfo")