| | |
| | | if (bl) { |
| | | ArrayList<String> list = pm.getFileList(); |
| | | if (null != list) { |
| | | Date proUploadDate = new Date(); |
| | | for (int i = 0; i < list.size(); i++) { |
| | | ProjectArchiveManage pam = new ProjectArchiveManage(); |
| | | pam.setProNum(pm.getProNum()); |
| | |
| | | int rexIdex = split[1].lastIndexOf("."); |
| | | pam.setProDocumentName(split[1].substring(0, rexIdex)); |
| | | pam.setProDocumentFormat(split[1].substring(rexIdex + 1)); |
| | | pam.setProUploadDate(new Date()); |
| | | pam.setProUploadDate(proUploadDate); |
| | | projectArchiveManageMapper.insert(pam); |
| | | } |
| | | } |
| | |
| | | */ |
| | | public Response updateProjectProgress(ProjectManage progress) { |
| | | Response<Object> response = new Response<>(); |
| | | boolean b = projectManageMapper.updateProjectProgress(progress) > 0; |
| | | if (b) { |
| | | TransactionStatus transactionStatus = dataSourceTransactionManager.getTransaction(transactionDefinition); |
| | | progress.setProArchiveDate(new Date()); |
| | | boolean bl = projectManageMapper.updateProjectProgress(progress) > 0; |
| | | if (bl) { |
| | | bl = projectArchiveManageMapper.updateProjectProgress(progress) > 0; |
| | | } |
| | | if (bl) { |
| | | dataSourceTransactionManager.commit(transactionStatus); |
| | | response.setMsg(1, "更新成功"); |
| | | } else { |
| | | dataSourceTransactionManager.rollback(transactionStatus); |
| | | response.setMsg(0, "更新失败"); |
| | | } |
| | | return response; |