chendayu преди 2 години
родител
ревизия
4cb5df0d26
променени са 1 файла, в които са добавени 4 реда и са изтрити 3 реда
  1. 4 3
      RMS/src/main/java/cn/cslg/report/service/business/ReportService.java

+ 4 - 3
RMS/src/main/java/cn/cslg/report/service/business/ReportService.java

@@ -132,14 +132,15 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
      */
     @Transactional(rollbackFor = Exception.class)
     public Integer addReport(ReportDTO reportDto, List<MultipartFile> files) throws IOException {
+        //若是侵权和回避报告,并且没有选择审核,则直接将这两个报告状态置为2(处理中)
         if (reportDto.getType().equals(4) || reportDto.getType().equals(5)) {
-            reportDto.setStatus(2);
+            if (reportDto.getStatus() != null && reportDto.getStatus() != 0) {
+                reportDto.setStatus(2);
+            }
         }
         //新增报告
         Report report = this.loadReport(reportDto);
         report.insert();
-        //添加事件
-        // 添加后续事项
         if (files != null && files.size() != 0) {
             //将文档上传并返回文件入库的Id
             List<Integer> fileIds = reportFileService.uploadFiles(files);