| | |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.enums.FeasibilityReportFileEnum; |
| | | import com.ruoyi.common.enums.ProjectApprovalReportStatusEnum; |
| | | import com.ruoyi.common.enums.StudyReportTypeEnum; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.AuditStatusDTO; |
| | | import com.ruoyi.system.dto.TProjectApprovalReportDTO; |
| | |
| | | return R.fail("项目组已封存,无法创建项目课题方案"); |
| | | } |
| | | // 生成可研、可行、工艺开发工具、验证发布报告编号 |
| | | String reportCode = projectTeam.getTeamName() + "-" + StudyReportTypeEnum.VERIFICATION_RELEASE.getCode(); |
| | | // 查询上个项目课题方案的序号 |
| | | long count = projectApprovalReportService.count(Wrappers.lambdaQuery(TProjectApprovalReport.class) |
| | | .like(TProjectApprovalReport::getReportCode, reportCode)); |
| | | reportCode = reportCode + "-" + String.format("%03d", count+1); |
| | | dto.setReportCode(reportCode); |
| | | // String reportCode = projectTeam.getTeamName() + "-" + StudyReportTypeEnum.VERIFICATION_RELEASE.getCode(); |
| | | // // 查询上个项目课题方案的序号 |
| | | // long count = projectApprovalReportService.count(Wrappers.lambdaQuery(TProjectApprovalReport.class) |
| | | // .like(TProjectApprovalReport::getReportCode, reportCode)); |
| | | // reportCode = reportCode + "-" + String.format("%03d", count+1); |
| | | // dto.setReportCode(reportCode); |
| | | |
| | | projectApprovalReportService.save(dto); |
| | | // 添加检测报告文件 |
| | |
| | | feasibilityReportFile.setReportId(dto.getId()); |
| | | feasibilityReportFile.setReportType(FeasibilityReportFileEnum.PROJECT_PROPOSAL.getCode()); |
| | | } |
| | | feasibilityReportFileService.saveBatch(feasibilityReportFiles); |
| | | } |
| | | feasibilityReportFileService.saveBatch(feasibilityReportFiles); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | feasibilityReportFile.setReportId(dto.getId()); |
| | | feasibilityReportFile.setReportType(FeasibilityReportFileEnum.PROJECT_PROPOSAL.getCode()); |
| | | } |
| | | feasibilityReportFileService.saveBatch(feasibilityReportFiles); |
| | | } |
| | | feasibilityReportFileService.saveBatch(feasibilityReportFiles); |
| | | return R.ok(); |
| | | } |
| | | |