| | |
| | | public Response add(ProjectManage pm) { |
| | | Response response = new Response<>(); |
| | | pm.setProNameCode(new SimpleDateFormat("yyyyMMddHHmmss").format(new Date())); |
| | | pm.setProProgress(1);//立项 |
| | | Integer num = projectManageMapper.checkUniqueId(pm); |
| | | if (num > 0) { |
| | | return response.setMsg(0, "添加失败,pro_name_code重复"); |
| | |
| | | ProjectManage pm = projectManageMapper.searchManageStateByCondition(projectManage); |
| | | List<ProjectArchiveManage> pams = projectArchiveManageMapper.searchByConditionDocumentPath(projectManage); |
| | | HashMap<Object, Object> map = new HashMap<>(); |
| | | map.put("项目管理", pm); |
| | | map.put("pm", pm); |
| | | ArrayList<Object> list = new ArrayList<>(); |
| | | if (null != pams) { |
| | | for (int i = 0; i < pams.size(); i++) { |
| | | ProjectArchiveManage pam = pams.get(i); |
| | | HashMap<Object, Object> mapDoc = new HashMap<>(); |
| | | mapDoc.put("文件名", pam.getProDocumentName()); |
| | | mapDoc.put("文件路径", pam.getProFilePath()); |
| | | mapDoc.put("fileName", pam.getProDocumentName()); |
| | | mapDoc.put("url", pam.getProFilePath()); |
| | | list.add(mapDoc); |
| | | } |
| | | } |
| | | map.put("文档材料", list); |
| | | map.put("mapDoc", list); |
| | | response.setCode(1); |
| | | response.setMsg(1, "查询成功"); |
| | | response.setData(map); |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 项目进度管理 |
| | | * 项目进度(1-6 立项、审批、研究、结题、验收、归档) |
| | | * @param progress |
| | | * @return |
| | | */ |
| | | public Response updateProjectProgress(ProjectManage progress) { |
| | | Response<Object> response = new Response<>(); |
| | | boolean b = projectManageMapper.updateProjectProgress(progress) > 0; |
| | | if (b) { |
| | | response.setMsg(1, "更新成功"); |
| | | } else { |
| | | response.setMsg(0, "更新失败"); |
| | | } |
| | | return response; |
| | | } |
| | | } |