Browse Source

修改配置文件,

zhujinghui 4 năm trước cách đây
mục cha
commit
b149df7843

+ 19 - 9
fcb-project-manager-core/src/main/java/fcb/project/manager/base/service/impl/TmEstateServiceImpl.java

@@ -110,6 +110,7 @@ public class TmEstateServiceImpl extends ServiceImpl<TmEstateDao, TmEstate> impl
             item.put(excelUtil.getColeNames().get(index++), house.getSaleVideos() != null ? house.getSaleVideos().toString() : "0");
             item.put(excelUtil.getColeNames().get(index++), house.getHouseVideos() != null ? house.getHouseVideos().toString() : "0");
             item.put(excelUtil.getColeNames().get(index++), house.getPoints() != null ? house.getPoints().toString() : "0");
+            item.put(excelUtil.getColeNames().get(index++), house.getCreateByName());
             item.put(excelUtil.getColeNames().get(index++), house.getCreateTime().format(df));
             item.put(excelUtil.getColeNames().get(index++), house.getUpdateTime().format(df));
             item.put(excelUtil.getColeNames().get(index++), HouseStatus.get(house.getStatus()).getDesc());
@@ -131,7 +132,9 @@ public class TmEstateServiceImpl extends ServiceImpl<TmEstateDao, TmEstate> impl
         }
 
         excelUtil.writeExcel(dataList, excelUtil.getColeNames().size(), fcbConfig.getExcelLocalPath() + fileName, dateStr);
-        return fcbConfig.getOuterSceneVrHost() + "excel/" + dateStr + ".xls";
+        String url = fcbConfig.getOuterSceneVrHost() + "excel/" + dateStr + ".xls";
+        log.info("导出路径-{}", url);
+        return url;
     }
 
 
@@ -206,15 +209,22 @@ public class TmEstateServiceImpl extends ServiceImpl<TmEstateDao, TmEstate> impl
                         if (scene.get("videos") != null) {
                             String videoStr = scene.get("videos").toString();
                             log.info("videos-{}", videoStr);
-                            Optional<Map.Entry<String, Object>> existData = panoSceneWithTypesMap.entrySet().stream().filter(m ->
-                                    "sales".equals(m.getValue()) && scene.get("num").toString().equals(m.getKey())).findAny();
-                            if (existData.isPresent()) {
-                                salesVideos++;
+                            JSONObject scenejson = new JSONObject();
+                            if(videoStr != null) {
+                                scenejson = JSONObject.parseObject(videoStr);
                             }
-                            existData = panoSceneWithTypesMap.entrySet().stream().filter(m ->
-                                    "room".equals(m.getValue()) && scene.get("num").toString().equals(m.getKey())).findAny();
-                            if (existData.isPresent()) {
-                                houseVideos++;
+                            Object data = scenejson.get("data");
+                            if (data != null && data instanceof JSONArray && ((JSONArray) data).size() != 0) {
+                                Optional<Map.Entry<String, Object>> existData = panoSceneWithTypesMap.entrySet().stream().filter(m ->
+                                        "sales".equals(m.getValue()) && scene.get("num").toString().equals(m.getKey())).findAny();
+                                if (existData.isPresent()) {
+                                    salesVideos++;
+                                }
+                                existData = panoSceneWithTypesMap.entrySet().stream().filter(m ->
+                                        "room".equals(m.getValue()) && scene.get("num").toString().equals(m.getKey())).findAny();
+                                if (existData.isPresent()) {
+                                    houseVideos++;
+                                }
                             }
                         }
                     }

+ 5 - 3
fcb-project-manager-core/src/main/java/fcb/project/manager/core/controller/HouseManagerController.java

@@ -248,15 +248,17 @@ public class HouseManagerController extends BaseController{
         }
 
         excelUtil.writeExcel(dataList, excelUtil.getColeNames().size(), excelLocalPath + fileName, dateStr);
-        return Result.success((Object) (outerSceneVrHost + "excel/" + dateStr + ".xls"));
+        String url = outerSceneVrHost + "excel/" + dateStr + ".xls";
+        log.info("导出路径-{}", url);
+        return Result.success((Object) url);
     }
 
 
     @GetMapping("/exportProjectList")
     @ApiOperation(value = "vr项目导出")
-    public ViewResult<String> exportProjectList(QueryHouseParam queryHouseParam) throws Exception{
+    public Result exportProjectList(QueryHouseParam queryHouseParam) throws Exception{
         String url = tmEstateService.exportProjectList(queryHouseParam, getContextUserInfo(), getToken());
-        return ViewResult.success(url);
+        return Result.success((Object) url);
     }