| | |
| | | import com.ruoyi.common.enums.QAProduceReportStatusEnum; |
| | | import com.ruoyi.common.enums.QaReportFileEnum; |
| | | import com.ruoyi.common.enums.QaReportTypeEnum; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.AuditStatusDTO; |
| | | import com.ruoyi.system.dto.TQaProduceReportDTO; |
| | |
| | | @PostMapping(value = "/api/t-qa-produce-report/update") |
| | | public R<Boolean> update(@RequestBody String param) { |
| | | TQaProduceReportDTO dto = JSON.parseObject(param,TQaProduceReportDTO.class); |
| | | |
| | | if (SecurityUtils.isAdmin(SecurityUtils.getUserId())){ |
| | | dto.setStatus(null); |
| | | } |
| | | |
| | | qaProduceReportService.updateById(dto); |
| | | qaReportFileService.remove(Wrappers.lambdaQuery(TQaReportFile.class) |
| | | .eq(TQaReportFile::getReportId, dto.getId())); |
| | | // 添加检测报告文件 |
| | | List<TQaReportFile> qaReportFiles = dto.getQaReportFiles(); |
| | | if (qaReportFiles != null) { |
| | | for (TQaReportFile qaReportFile : qaReportFiles) { |
| | | qaReportFile.setReportId(dto.getId()); |
| | | switch (QaReportFileEnum.fromCode(qaReportFile.getReportType())) { |
| | |
| | | } |
| | | } |
| | | qaReportFileService.saveBatch(qaReportFiles); |
| | | } |
| | | |
| | | |
| | | if(dto.getStatus() != -1){ |
| | | if(dto.getStatus() != null && dto.getStatus() != -1){ |
| | | // 查询项目组 |
| | | TProjectTeam projectTeam = projectTeamService.getById(dto.getTeamId()); |
| | | // MESSAGE 添加消息 20251208 将qa报告审核转到审批人 |