李春阳 преди 1 година
родител
ревизия
3dbce0b6d8

+ 18 - 0
simulation-resource-server/src/main/java/com/css/simulation/resource/server/app/impl/SimulationProjectServiceImpl.java

@@ -148,6 +148,9 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
     @Resource
     private SceneAccidentMapper sceneAccidentMapper;
 
+    @Resource
+    private SimulationProjectService simulationProjectService;
+
     // * -------------------------------- Comment --------------------------------
 
     private final String[] dateFmtArr = new String[]{"yyyyMMdd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd"};
@@ -5420,6 +5423,21 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
                 }
                 in.close();
             }
+            ResponseBodyVO<ProjectReportForReferenceVO> projectReportForReferenceVOResponseBodyVO = simulationProjectService.getProjectReportForAllReferenceScene(param);
+            if (projectReportForReferenceVOResponseBodyVO != null) {
+                String path = "场景评价报告.json";
+                FileWriter writer = new FileWriter(path);
+                String json = JsonUtil.beanToJson(projectReportForReferenceVOResponseBodyVO);
+                writer.write(json);
+                writer.close();
+                ZipEntry entry = new ZipEntry(path);
+                zos.putNextEntry(entry);
+                BufferedInputStream in = new BufferedInputStream(Files.newInputStream(Paths.get(path)));
+                while ((len = in.read(buffer)) != -1) {
+                    zos.write(buffer, 0, len);
+                }
+                in.close();
+            }
             zos.close();
         } catch (Exception ex) {
             log.error("下载失败", ex);