Browse Source

新增 dev-1.3 分支
新增提供管理后台 获取4dkk场景码用于统计

wuweihao 4 years ago
parent
commit
56714c16c8

+ 3 - 0
cms_pano_fcb/gis_mapper/src/main/java/com/gis/mapper/SceneMapper.java

@@ -101,4 +101,7 @@ public interface SceneMapper extends IBaseMapper<SceneEntity, String> {
 
     @Select("select id, house_id, scene_code,hengda_id,room_id, type, is_delete,status,create_time,update_time  from tb_scene where is_delete = 0 and status >= 3 and type = 'house'")
     List<SceneEntity> findByRoodData();
+
+    @Select("select scene_code, by_type from tb_scene where is_delete = 0 and type = #{type} and house_id = #{houseId}")
+    List<SceneEntity> getVrSceneCodeAndType(String houseId, String type);
 }

+ 2 - 0
cms_pano_fcb/gis_service/src/main/java/com/gis/service/HouseService.java

@@ -14,4 +14,6 @@ public interface HouseService  {
     Result editHouse(EditHouseDto param);
 
     Result statistics(String houseId);
+
+    Result getVrSceneCodeAndType(String houseId);
 }

+ 17 - 0
cms_pano_fcb/gis_service/src/main/java/com/gis/service/impl/HouseServiceImpl.java

@@ -120,6 +120,23 @@ public class HouseServiceImpl implements HouseService {
         return Result.success(result);
     }
 
+    @Override
+    public Result getVrSceneCodeAndType(String houseId) {
+        String type = "house";
+        List<SceneEntity> list = entityMapper.getVrSceneCodeAndType(houseId, type);
+        HashMap<String, Object> resultMap = new HashMap<>();
+        for (SceneEntity entity : list) {
+            String byType = entity.getByType();
+            if ("garden".equals(byType)) {
+                resultMap.put(entity.getSceneCode(), "sales");
+            } else {
+                resultMap.put(entity.getSceneCode(), "room");
+            }
+        }
+        log.info("返回场景码数量:{}, 返回结果:{}", resultMap.size(), resultMap);
+        return Result.success(resultMap);
+    }
+
     /**
      * 查询VR项目状态
      * @param houseId

+ 12 - 0
cms_pano_fcb/gis_web/src/main/java/com/gis/web/controller/HouseController.java

@@ -88,6 +88,18 @@ public class HouseController extends BaseController {
         return sceneService.getVrSceneCode(houseId, "3", "house");
     }
 
+    /**
+     * 2021-07-15 新增
+     * @param houseId
+     * @return
+     */
+    @WebControllerLog(description = "VR项目-获取4dkk场景码列表用于统计")
+    @ApiOperation(value = "获取4dkk场景码列表用于统计", position = 3, notes = "返回数据sceneCode, type: 样板间(room)、售楼处(sales) 恒大管理后台")
+    @GetMapping("getVrSceneCodeAndType/{houseId}")
+    public Result getVrSceneCodeAndType(@PathVariable String houseId) {
+        return houseService.getVrSceneCodeAndType(houseId);
+    }
+
 
 
 

+ 7 - 2
cms_pano_fcb/remark.md

@@ -365,6 +365,11 @@ sit:
                 4.2.2 使用CommentController.updateRoom方法执行脚本数据
                 4.2.3 浏览器输入: vr-web01.fcb.com.cn/fcb/pano/common/updateRoom
                 4.2.4 查看控制台日志 
+
+
                 
-                
-                      
+====================== 2021-07-15   1.3新需求开发 ======================      
+ # 需求: 
+    1. 根据houseId查询场景码给管理后台, 返回参数sceneCode, type: 样板间、售楼处          
+            样板间:room   type:house && byType=0
+            售楼处:sales  type:house && byType=garden