| | |
| | | package com.whyc.service; |
| | | |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.ProjectArchiveManageMapper; |
| | | import com.whyc.mapper.ProjectManageMapper; |
| | |
| | | projectArchiveManageMapper.delDocumentation(pam); |
| | | File file = new File(pam.getProFilePath()); |
| | | if (file.exists()){ |
| | | File absoluteFile = file.getAbsoluteFile(); |
| | | String name = absoluteFile.getName(); |
| | | file.delete(); |
| | | HashMap<Object, Object> map = new HashMap<>(); |
| | | map.put("删除的文件名", name); |
| | | map.put("删除的文件路径", pam.getProFilePath()); |
| | | response.setData(map); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | |
| | | /** |
| | | * 项目归档管理-条件查询 |
| | | * |
| | | * @param pageNum |
| | | * @param pageSize |
| | | * @param projectManage |
| | | * @return |
| | | */ |
| | | public Response searchArchiveByCondition(ProjectManage projectManage) { |
| | | Response<Object> response = new Response<>(); |
| | | public Response<PageInfo<ProjectManage>> searchArchiveByCondition(int pageNum, int pageSize, ProjectManage projectManage) { |
| | | |
| | | try { |
| | | List<ProjectManage> lists = projectManageMapper.searchArchiveByCondition(projectManage); |
| | | PageHelper.startPage(pageNum, pageSize); |
| | | List<ProjectManage> lists = projectManageMapper.searchArchiveByCondition(projectManage); |
| | | PageInfo<ProjectManage> projectManagePageInfo = new PageInfo<>(lists); |
| | | return new Response<PageInfo<ProjectManage>>().set(1, projectManagePageInfo); |
| | | |
| | | response.setMsg(1,"查询成功"); |
| | | response.setData(lists); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return response.setMsg(0,"查询失败"); |
| | | } |
| | | return response; |
| | | } |
| | | |
| | | /** |