wuweihao 3 سال پیش
والد
کامیت
660f350f6c

+ 2 - 2
cms_pano_fcb/gis_application/src/main/resources/application-sit.properties

@@ -80,8 +80,8 @@ oss.file.path=${project.name}/
 oss.domain=https://oss-xiaoan.oss-cn-shenzhen.aliyuncs.com/
 
 swagger.package=com.gis.web.controller
-swagger.title=fcb_local-sit
-swagger.description=fcb_local-sit
+swagger.title=fcb_age-sit
+swagger.description=${swagger.title}
 swagger.version=1.0
 
 

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

@@ -41,6 +41,9 @@ public interface SecondHandMapper extends IBaseMapper<SecondHandEntity, String>
     @Select("select * from tb_second_hand where is_delete = 0 and status = #{status} and house_id = #{houseId}")
     List<SecondHandEntity> findByHouseIdAndStatus(String houseId, String status);
 
+    @Select("select * from tb_second_hand where is_delete = 0 and status >= #{status} and house_id = #{houseId}")
+    List<SecondHandEntity> findByHouseIdAndGtStatus(String houseId, Integer status);
+
     @SelectProvider(type = SecondHandProvider.class, method = "search")
     List<SecondHandEntity> search(SecondHandPageDto param);
 

+ 5 - 0
cms_pano_fcb/gis_service/src/main/java/com/gis/service/SecondHandService.java

@@ -25,6 +25,7 @@ public interface SecondHandService extends IBaseService<SecondHandEntity, String
 
     Result findBySceneCode(String sceneCode);
 
+
     Result updateInitIcon(String id, String icon);
 
     Result setSort(Map<String, String> param);
@@ -50,4 +51,8 @@ public interface SecondHandService extends IBaseService<SecondHandEntity, String
     Result findVrModel(SceneRroPageDto param);
 
     Result saveVrModel(VrModelDto param);
+
+    Result houseCanEdit(String houseId);
+
+    Result findByHouseId(String houseId, Integer status);
 }

+ 22 - 3
cms_pano_fcb/gis_service/src/main/java/com/gis/service/impl/SecondHandServiceImpl.java

@@ -33,6 +33,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.web.multipart.MultipartFile;
 
+import javax.servlet.http.HttpServletRequest;
 import javax.transaction.Transactional;
 import javax.validation.constraints.NotBlank;
 import java.util.*;
@@ -76,6 +77,9 @@ public class SecondHandServiceImpl extends IBaseServiceImpl<SecondHandEntity, St
     @Autowired
     AsyncTask asyncTask;
 
+    @Autowired
+    HttpServletRequest httpServletRequest;
+
     @Override
     public IBaseMapper<SecondHandEntity, String> getBaseMapper() {
         return this.entityMapper;
@@ -86,7 +90,6 @@ public class SecondHandServiceImpl extends IBaseServiceImpl<SecondHandEntity, St
      *
      * @param file
      * @param houseId 房源id
-     * @param groupId 小区id
      * @return
      */
     @Override
@@ -180,8 +183,8 @@ public class SecondHandServiceImpl extends IBaseServiceImpl<SecondHandEntity, St
             entity.setSceneTitle(entity.getFileName());
 
             // todo webSite待定
-            // /hengda.html?m=场景码&prodId=房车宝楼盘ID&houseId=自己维护的楼盘ID
-            String webSite = "/hengda.html?m=" + sceneCode + "&prodId=" + hengDaId + "&houseId=" + houseId;
+            // /hengda.html?m=场景码&prodId=房车宝楼盘ID&houseId=自己维护的楼盘ID, businessType=2 (二手房)
+            String webSite = "/hengda.html?m=" + sceneCode + "&prodId=" + hengDaId + "&houseId=" + houseId + "&businessType=2";
             log.info("webSite: " + webSite);
             entity.setWebSite(webSite);
 
@@ -416,7 +419,10 @@ public class SecondHandServiceImpl extends IBaseServiceImpl<SecondHandEntity, St
 
     @Override
     public Result vrFindBySceneCode(String sceneCode) {
+
         log.info("VR模模型-根据场景码查询: " + sceneCode);
+
+
         // 此方法建议把返回值改回list值会更安全
         List<SecondHandEntity> list = entityMapper.listFindBySceneCode(sceneCode);
         log.info("使用中的VR模型数量:" + list.size());
@@ -436,6 +442,8 @@ public class SecondHandServiceImpl extends IBaseServiceImpl<SecondHandEntity, St
      */
     @Override
     public Result findVrModel(SceneRroPageDto param) {
+        String token1 = httpServletRequest.getHeader("token");
+        log.info("头部token: {}", token1);
         // TODO: 2021/1/8 0008 查找4dkk场景数据,当前区域公司下的模型
         @NotBlank(message = "token不能为空") String token = param.getToken();
         // 只获取计算成功的, 0:计算成功
@@ -549,6 +557,17 @@ public class SecondHandServiceImpl extends IBaseServiceImpl<SecondHandEntity, St
         return Result.success();
     }
 
+    @Override
+    public Result houseCanEdit(String houseId) {
+        return Result.success(canEdit(houseId));
+    }
+
+    @Override
+    public Result findByHouseId(String houseId, Integer status) {
+        List<SecondHandEntity> entities = entityMapper.findByHouseIdAndGtStatus(houseId, status);
+        return Result.success(entities);
+    }
+
 
     /**
      * 检查是否有计算中的场景

+ 19 - 0
cms_pano_fcb/gis_web/src/main/java/com/gis/web/controller/CommonController.java

@@ -17,6 +17,7 @@ import com.gis.mapper.SceneMapper;
 import com.gis.service.HouseService;
 import com.gis.service.SceneInitService;
 import com.gis.service.SceneService;
+import com.gis.service.SecondHandService;
 import com.gis.web.aop.WebControllerLog;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -68,6 +69,9 @@ public class CommonController extends BaseController {
     @Autowired
     HouseFeign houseFeign;
 
+    @Autowired
+    SecondHandService secondHandService;
+
     // uat
     private final static String fcbClientCode = "dX96cHOkZm61AiCFni5k4qOlxvj8jSF7";
     private final static String fcbDomain = "https://vr-web01-uat.fcb.com.cn";
@@ -116,6 +120,21 @@ public class CommonController extends BaseController {
         return Result.success(entity);
     }
 
+    @WebControllerLog(description = "公共模块-二手房详情")
+    @ApiOperation("二手房详情-免登录查看场景")
+    @GetMapping("secondHand/detail/{sceneCode}")
+    public Result detailSecondHand(@PathVariable String sceneCode) {
+        return secondHandService.findBySceneCode(sceneCode);
+    }
+
+    @WebControllerLog(description = "公共模块-二手房场景列表-H5")
+    @ApiOperation(value = "二手房场景列表-H5", position = 1)
+    @GetMapping("secondHand/list/{houseId}")
+    public Result secondHandList(@PathVariable String houseId) {
+        // 只获取审核通过的 3
+        return secondHandService.findByHouseId(houseId, 3);
+    }
+
 
 
 

+ 15 - 5
cms_pano_fcb/gis_web/src/main/java/com/gis/web/controller/SecondHandController.java

@@ -3,21 +3,17 @@ package com.gis.web.controller;
 import com.alibaba.fastjson.JSONObject;
 import com.gis.common.util.Result;
 import com.gis.domain.dto.*;
-import com.gis.domain.entity.SceneEntity;
 import com.gis.service.SecondHandService;
 import com.gis.web.aop.WebControllerLog;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
-import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.validation.Valid;
-import java.util.Date;
-import java.util.List;
 import java.util.Map;
 
 /**
@@ -191,8 +187,22 @@ public class SecondHandController {
     @ApiOperation(value = "fdkk-VR模模型-根据场景码查询", notes = "提供给四维看看,判断是否在720yun中使用此场景,true:有,四维看看不能删除此场景; false:可以删除")
     @GetMapping(value = "fdkk/findBySceneCode")
     public Result vrFindBySceneCode(String sceneCode) {
-
         return secondHandService.vrFindBySceneCode(sceneCode);
     }
 
+
+    /**
+     * 2021-09-14
+     * 调用四维看看(或者房车宝待定)
+     * @param houseId
+     * @return
+     */
+    @WebControllerLog(description = "二手房管理-房源是否可编辑")
+    @ApiOperation(value = "house-房源是否可编辑", notes = "true:可编辑 ; false:不可编辑")
+    @GetMapping(value = "house/canEdit/{houseId}")
+    public Result houseCanEdit(@PathVariable String houseId) {
+
+        return secondHandService.houseCanEdit(houseId);
+    }
+
 }