chendayu 2 years ago
parent
commit
6c47b868df

+ 9 - 0
RMS/src/main/java/cn/cslg/report/controller/ReportController.java

@@ -9,6 +9,7 @@ import cn.cslg.report.common.model.vo.ReportVO;
 import cn.cslg.report.common.utils.Response;
 import cn.cslg.report.common.utils.StringUtils;
 import cn.cslg.report.common.utils.auth.checkAuth;
+import cn.cslg.report.entity.Report;
 import cn.cslg.report.entity.ReportReferences;
 import cn.cslg.report.service.business.*;
 import com.alibaba.fastjson.JSONObject;
@@ -177,4 +178,12 @@ public class ReportController {
     public Integer queryReportNumOfTotal(Integer tenantId) throws IOException {
         return reportService.getReportNumOfTotal(tenantId);
     }
+
+    @Operation(summary = "根据报告ids获得报告列表")
+    @PostMapping(value = "/getReportsByIds")
+    public String getReportsByIds(@RequestBody List<Integer> reportIds) {
+        List<Report> reports = reportService.getReportsByReportIds(reportIds);
+        return Response.success(reports);
+    }
+
 }

+ 6 - 0
RMS/src/main/java/cn/cslg/report/service/business/ReportService.java

@@ -914,4 +914,10 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
             return 0;
         }
     }
+
+    public List<Report> getReportsByReportIds(List<Integer> reportIds) {
+        List<Report> reports = this.list(new LambdaQueryWrapper<Report>().in(Report::getId, reportIds));
+        return reports;
+    }
+
 }