浏览代码

修改bug,增加漫游点处理,增加石膏线字段处理

xiewenjie 3 年之前
父节点
当前提交
4097f97652
共有 19 个文件被更改,包括 464 次插入40 次删除
  1. 1 1
      sxz-application/src/main/resources/application-dev.properties
  2. 6 6
      sxz-core/src/main/java/com/fdkk/sxz/other/mq/TopicRabbitConfig.java
  3. 67 18
      sxz-core/src/main/java/com/fdkk/sxz/webApi/controller/ImportDataController.java
  4. 3 1
      sxz-core/src/main/java/com/fdkk/sxz/webApi/controller/ManagerController.java
  5. 116 0
      sxz-core/src/main/java/com/fdkk/sxz/webApi/controller/RenovationHardfixHouseTypeController.java
  6. 18 0
      sxz-core/src/main/java/com/fdkk/sxz/webApi/mapper/IRenovationHardfixHouseTypeMapper.java
  7. 22 10
      sxz-core/src/main/java/com/fdkk/sxz/webApi/mapper/IRenovationPartsDetailMapper.java
  8. 23 0
      sxz-core/src/main/java/com/fdkk/sxz/webApi/service/IRenovationHardfixHouseTypeService.java
  9. 2 1
      sxz-core/src/main/java/com/fdkk/sxz/webApi/service/IRenovationPartsDetailService.java
  10. 52 0
      sxz-core/src/main/java/com/fdkk/sxz/webApi/service/impl/RenovationHardfixHouseTypeServiceImpl.java
  11. 3 2
      sxz-core/src/main/java/com/fdkk/sxz/webApi/service/impl/RenovationPartsDetailServiceImpl.java
  12. 24 0
      sxz-core/src/main/resources/mapper/RenovationHardfixHouseTypeMapper.xml
  13. 1 1
      sxz-generator/src/main/resources/generator.properties
  14. 79 0
      sxz-modules/src/main/java/com/fdkk/sxz/entity/RenovationHardfixHouseTypeEntity.java
  15. 3 0
      sxz-modules/src/main/java/com/fdkk/sxz/entity/RenovationPartsDetailEntity.java
  16. 3 0
      sxz-modules/src/main/java/com/fdkk/sxz/entity/SceneStyleEntity.java
  17. 34 0
      sxz-modules/src/main/java/com/fdkk/sxz/vo/request/RequestRenovationHardfixHouseType.java
  18. 4 0
      sxz-modules/src/main/java/com/fdkk/sxz/vo/request/RequestRenovationParts.java
  19. 3 0
      sxz-modules/src/main/java/com/fdkk/sxz/vo/response/ResponseRenovationPartsDetail.java

+ 1 - 1
sxz-application/src/main/resources/application-dev.properties

@@ -32,7 +32,7 @@ spring.datasource.hikari.pool-name=DatebookHikariCP
 spring.datasource.hikari.max-lifetime=1800000
 spring.datasource.hikari.connection-timeout=30000
 #rabbitmq
-spring.rabbitmq.host=127.0.0.1
+spring.rabbitmq.host=192.168.0.47
 spring.rabbitmq.port=5672
 spring.rabbitmq.username=guest
 spring.rabbitmq.password=guest

+ 6 - 6
sxz-core/src/main/java/com/fdkk/sxz/other/mq/TopicRabbitConfig.java

@@ -23,20 +23,20 @@ public class TopicRabbitConfig {
 //
 //    public final static String TOPICE = "topicExchangeCopy";
 
-    public final static String CHANGE = "topic.change";
+    public final static String CHANGE = "topic.change.dev";
     //灯光预览
-    public final static String LIGHT = "topic.light";
+    public final static String LIGHT = "topic.light.dev";
 
-    public final static String MODEL = "topic.model";
+    public final static String MODEL = "topic.model.dev";
 
     //处理
-    public final static String MVIEW = "delay.mview";
+    public final static String MVIEW = "delay.mview.dev";
 
-    public final static String TOPICE = "topicExchange";
+    public final static String TOPICE = "topicExchange.dev";
     /**
      * 延迟消息交换机
      */
-    public final static String DELAY_EXCHANGE = "delay.exchange";
+    public final static String DELAY_EXCHANGE = "delay.exchange.dev";
 
     @Bean
     public CustomExchange delayMessageExchange() {

+ 67 - 18
sxz-core/src/main/java/com/fdkk/sxz/webApi/controller/ImportDataController.java

@@ -15,6 +15,7 @@ import com.fdkk.sxz.constant.CodeConstant;
 import com.fdkk.sxz.entity.SceneLightEntity;
 import com.fdkk.sxz.entity.SceneStyleEntity;
 import com.fdkk.sxz.other.mq.TopicRabbitConfig;
+import com.fdkk.sxz.util.*;
 import com.fdkk.sxz.vo.response.ResponseRenovationBuildDetail;
 import com.fdkk.sxz.vo.response.ResponseRenovationPartsDetail;
 import com.fdkk.sxz.webApi.service.*;
@@ -33,9 +34,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
-import com.fdkk.sxz.util.*;
 
 import java.io.File;
+import java.math.BigDecimal;
 import java.net.URLDecoder;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -123,6 +124,15 @@ public class ImportDataController extends BaseController {
 
         String vrNum = styleNum;
         try {
+            String roamingPointUrl = "";
+            Boolean existRoamingPoint = uploadToOssUtil.existFileToOSS("data/data" + sceneNum + "/roamingPoint.json", "4dkankan");
+            if (existRoamingPoint) {
+                roamingPointUrl = "https://4dkk.4dage.com/data/data" + sceneNum + "/roamingPoint.json";
+
+            } else {
+                ImportDataController.log.info("roamingPoint,不存在");
+            }
+
 
             if (StringUtils.isEmpty(styleNum)) {
                 Integer num = sceneStyleService.findLastNum(sceneNum);
@@ -138,6 +148,7 @@ public class ImportDataController extends BaseController {
                 sceneStyleEntity.setSceneNum(sceneNum);
                 sceneStyleEntity.setStyleName(styleName);
                 sceneStyleEntity.setStyleNum(vrNum);
+                sceneStyleEntity.setRoamingPointUrl(roamingPointUrl);
                 //新生成的换装风格,未渲染
                 sceneStyleEntity.setStatus(2);
                 sceneStyleService.save(sceneStyleEntity);
@@ -149,6 +160,7 @@ public class ImportDataController extends BaseController {
                 if (list != null && list.size() > 0) {
                     SceneStyleEntity sceneStyleEntity = list.get(0);
                     sceneStyleEntity.setStyleName(styleName);
+                    sceneStyleEntity.setRoamingPointUrl(roamingPointUrl);
                     sceneStyleService.updateById(sceneStyleEntity);
                 }
             }
@@ -171,15 +183,16 @@ public class ImportDataController extends BaseController {
                     "vision.modeldata", filePath);
 
             if (!new File(filePath + "vision.modeldata").exists()) {
-                log.info("vision.modeldata文件不存在");
+                ImportDataController.log.info("vision.modeldata文件不存在");
                 return Result.failure(CodeConstant.FAILURE_CODE_4001, CodeConstant.FAILURE_MSG_4001);
             }
-            log.info("下载vision.modeldata完成,开始转换vision.txt");
+            ImportDataController.log.info("下载vision.modeldata完成,开始转换vision.txt");
             CreateObjUtil.convertVisionmodeldataToTxt(filePath + "vision.modeldata", filePath + "vision.txt");
 
+
             //计算translationAverage,和puckAverage并重新赋予值
             Map<String, Double> averageMap = ConvertCadKjl.getAverageValue(filePath + "vision.txt");
-            setAverageValue(filePath + "vision.txt", averageMap.get("translationAverage"), averageMap.get("puckAverage"));
+            ImportDataController.setAverageValue(filePath + "vision.txt", averageMap.get("translationAverage"), averageMap.get("puckAverage"));
 
             FileUtils.writeFile(filePath + "proLight.json", proLight);
 
@@ -224,7 +237,7 @@ public class ImportDataController extends BaseController {
                     FileUtils.writeFile(filePath + "house.json", kjlJson.toJSONString());
                     uploadToOssUtil.upload(filePath + "house.json", "data/data" + vrNum + "/house.json");
                 }
-             }
+            }
 
         } catch (Exception e) {
             e.printStackTrace();
@@ -267,7 +280,7 @@ public class ImportDataController extends BaseController {
                 filePath = filePath + File.separator;
             }
 
-            log.info("保存的类型是:" + buildType + ";位置在:" + filePath);
+            ImportDataController.log.info("保存的类型是:" + buildType + ";位置在:" + filePath);
             FileUtils.writeFile(filePath + "proLight.json", proLight);
 
             //数据上传oss,让计算服务器下载资源
@@ -356,14 +369,14 @@ public class ImportDataController extends BaseController {
                 if (list != null && list.size() > 0) {
                     sceneStyleEntity = list.get(0);
                     if ("light".equals(buildType)) {
-                        log.info("灯光预览:" + styleNum);
+                        ImportDataController.log.info("灯光预览:" + styleNum);
                         if (sceneStyleEntity.getLightStatus().intValue() == 0) {
                             return Result.failure(CodeConstant.FAILURE_CODE_4004, CodeConstant.FAILURE_MSG_4004);
                         }
                         sceneStyleEntity.setLightStatus(0);
                     }
                     if ("pano".equals(buildType)) {
-                        log.info("全景预览:" + styleNum);
+                        ImportDataController.log.info("全景预览:" + styleNum);
                         if (sceneStyleEntity.getLightStatus().intValue() == 0) {
                             return Result.failure(CodeConstant.FAILURE_CODE_4016, CodeConstant.FAILURE_MSG_4016);
                         }
@@ -408,7 +421,7 @@ public class ImportDataController extends BaseController {
                 rabbitTemplate.convertAndSend(TopicRabbitConfig.TOPICE, TopicRabbitConfig.LIGHT,
                         styleNum + ":;" + sceneNum + ":;" + type + ":;" + dateType + ":;" +
                                 ratio + ":;" + sceneLightEntity.getId().longValue() + ":;" +
-                                quality + ":;" + buildType+":;"+1);
+                                quality + ":;" + buildType + ":;" + 1);
             }
 
             FileUtils.deleteDirectory(buildPath + "Output/" + styleNum);
@@ -464,7 +477,7 @@ public class ImportDataController extends BaseController {
 
         try {
             if (StringUtils.isEmpty(num)) {
-                resultJson.put("msg","参数不能为空");
+                resultJson.put("msg", "参数不能为空");
                 return resultJson;
             }
 
@@ -489,15 +502,32 @@ public class ImportDataController extends BaseController {
                         "vision.modeldata", basePath);
 
                 if (!new File(basePath + "/vision.modeldata").exists()) {
-                    log.info("vision.modeldata文件不存在");
+                    ImportDataController.log.info("vision.modeldata文件不存在");
                 } else {
-                    log.info("下载vision.modeldata完成,开始转换vision.txt");
+                    ImportDataController.log.info("下载vision.modeldata完成,开始转换vision.txt");
                     CreateObjUtil.convertVisionmodeldataToTxt(basePath + "/vision.modeldata", basePath + "/vision.txt");
 
                     JSONObject visionJson = JSON.parseObject(FileUtils.readFile(basePath + "/vision.txt"));
                     JSONArray sweepArray = visionJson.getJSONArray("sweepLocations");
                     if (sweepArray != null && sweepArray.size() > 0) {
                         entryJson.put("noSetting", sweepArray.getJSONObject(0));
+                        //处理漫游点供前端使用
+                        JSONArray roamingPoint = new JSONArray();
+                        for (int i = 0; i < sweepArray.size(); i++) {
+                            JSONObject objectJson = sweepArray.getJSONObject(i);
+                            JSONObject newJson = new JSONObject();
+                            newJson.put("uuid", objectJson.getString("uuid"));
+                            JSONObject puck = objectJson.getJSONObject("puck");
+                            puck.put("y", puck.getDoubleValue("y") * -1);
+                            puck.remove("z");
+                            newJson.put("puck", puck);
+                            roamingPoint.add(newJson);
+                        }
+                        FileUtils.writeFile(basePath + File.separator + "roamingPoint.json", roamingPoint.toJSONString());
+
+                        //数据上传oss,让计算服务器下载资源
+                        uploadToOssUtil.upload(basePath + File.separator + "roamingPoint.json",
+                                "data/data" + num + "/roamingPoint.json");
                     }
                 }
             } else {
@@ -635,7 +665,7 @@ public class ImportDataController extends BaseController {
             return resultJson;
         } catch (Exception e) {
             e.printStackTrace();
-            resultJson.put("msg","转换失败");
+            resultJson.put("msg", "转换失败");
             return resultJson;
         }
     }
@@ -689,9 +719,9 @@ public class ImportDataController extends BaseController {
                     "vision.modeldata", path);
 
             if (!new File(path + "/vision.modeldata").exists()) {
-                log.info("vision.modeldata文件不存在");
+                ImportDataController.log.info("vision.modeldata文件不存在");
             } else {
-                log.info("下载vision.modeldata完成,开始转换vision.txt");
+                ImportDataController.log.info("下载vision.modeldata完成,开始转换vision.txt");
                 CreateObjUtil.convertVisionmodeldataToTxt(path + "/vision.modeldata", path + "/vision.txt");
             }
 
@@ -1201,7 +1231,7 @@ public class ImportDataController extends BaseController {
         JSONObject jsonObject = new JSONObject();
         jsonObject.put("obj", data);
         String result = OkHttpUtils.httpPostJson(buildUrl + "getLightInfo", jsonObject.toJSONString());
-        log.info("getLightInfo返回结果:" + result);
+        ImportDataController.log.info("getLightInfo返回结果:" + result);
         JSONObject resultJson = JSON.parseObject(result);
         if (resultJson.containsKey("state") && "done".equals(resultJson.getString("state"))) {
             return Result.success(resultJson.getString("msg"));
@@ -1230,7 +1260,7 @@ public class ImportDataController extends BaseController {
         }
 
         String filePath = buildPath + "data/data" + styleNum + File.separator + fileName;
-        log.info("保存文件路径-filePath{}:" + filePath);
+        ImportDataController.log.info("保存文件路径-filePath{}:" + filePath);
 
         FileUtils.writeFile(filePath, jsonData);
 
@@ -1239,6 +1269,25 @@ public class ImportDataController extends BaseController {
         return Result.success((Object) ("data/data" + styleNum + File.separator + fileName));
     }
 
+    @ApiOperation("测试保存Blob数据")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "data", value = "String", dataType = "String"),
+            @ApiImplicitParam(name = "file", value = "文件流", dataType = "MultipartFile")})
+    @RequestMapping(value = "/testBlob", method = RequestMethod.POST)
+    @NoAuthentication
+    public Result testBlob(String fileString, @RequestParam("file") MultipartFile file) throws Exception {
+
+        Float size = Float.parseFloat(String.valueOf(file.getSize())) / 1024;
+        BigDecimal b = new BigDecimal(size);
+        // 2表示2位 ROUND_HALF_UP表明四舍五入,
+        size = b.setScale(2, BigDecimal.ROUND_HALF_UP).floatValue();
+        ImportDataController.log.info("size{}m", size);
+
+        ImportDataController.log.info("length{}", fileString.length());
+        return Result.success("");
+    }
+
+
     public static void main(String[] args) {
         try {
             Map<String, Double> map = ConvertCadKjl.getAverageValue("G:\\javaProject\\changeing\\vision.txt");
@@ -1246,7 +1295,7 @@ public class ImportDataController extends BaseController {
             System.out.println(map.get("translationAverage"));
             System.out.println(map.get("puckAverage"));
 
-            setAverageValue("G:\\javaProject\\changeing\\vision.txt", map.get("translationAverage"), map.get("puckAverage"));
+            ImportDataController.setAverageValue("G:\\javaProject\\changeing\\vision.txt", map.get("translationAverage"), map.get("puckAverage"));
 
 
         } catch (Exception e) {

+ 3 - 1
sxz-core/src/main/java/com/fdkk/sxz/webApi/controller/ManagerController.java

@@ -391,6 +391,8 @@ public class ManagerController extends BaseController {
             @ApiImplicitParam(name = "userId", value = "用户id", dataType = "String"),
             @ApiImplicitParam(name = "userName", value = "userName", dataType = "String"),
             @ApiImplicitParam(name = "pageNum", value = "页码", dataType = "String"),
+            @ApiImplicitParam(name = "partsId", value = "分类id", dataType = "NUMBER"),
+            @ApiImplicitParam(name = "isShow", value = "是否显示 0不显示,1显示", dataType = "NUMBER"),
             @ApiImplicitParam(name = "pageSize", value = "页数", dataType = "String"),
             @ApiImplicitParam(name = "name", value = "模型名称", dataType = "String")})
     @NoAuthentication
@@ -408,7 +410,7 @@ public class ManagerController extends BaseController {
             param.setName(null);
         }
 
-        PageInfo<RenovationPartsDetailEntity> list = renovationPartsDetailService.findAllByUserId(param.getUserId(),
+        PageInfo<RenovationPartsDetailEntity> list = renovationPartsDetailService.findAllByUserId(param,
                 param.getName(), param.getPageNum(), param.getPageSize());
 
         List<ResponseRenovationPartsDetailManager> resultList = new ArrayList<>();

+ 116 - 0
sxz-core/src/main/java/com/fdkk/sxz/webApi/controller/RenovationHardfixHouseTypeController.java

@@ -0,0 +1,116 @@
+package com.fdkk.sxz.webApi.controller;
+
+import com.fdkk.sxz.annotation.auth.NoAuthentication;
+import com.fdkk.sxz.annotation.log.AroundLog;
+import com.fdkk.sxz.base.BaseController;
+import com.fdkk.sxz.base.Result;
+import com.fdkk.sxz.entity.RenovationHardfixHouseTypeEntity;
+import com.fdkk.sxz.vo.request.RequestRenovationHardfixHouseType;
+import com.fdkk.sxz.webApi.service.IRenovationHardfixHouseTypeService;
+import com.github.pagehelper.PageInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @description: 户型结构表模块相关API接口
+ * @author: Xiewj
+ * @date: 2021-11-11 11:53:29
+ **/
+@Api(tags = "户型结构表模块相关API接口 author:Xiewj")
+@RestController
+@RequestMapping("/change/hardfixHouseType")
+public class RenovationHardfixHouseTypeController extends BaseController {
+
+    @Autowired
+    private IRenovationHardfixHouseTypeService renovationHardfixHouseTypeService;
+
+
+    @ApiOperation("户型结构表分页查询 author:Xiewj")
+    @RequestMapping(value = "/findByPage", method = RequestMethod.POST)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageSize", value = "页数", dataType = "int"),
+            @ApiImplicitParam(name = "pageNum", value = "页码", dataType = "int")})
+    @NoAuthentication
+    @AroundLog(name = "分页查询户型结构表")
+    public Result findByPage(@RequestBody RequestRenovationHardfixHouseType param) {
+        PageInfo<RenovationHardfixHouseTypeEntity> pageInfo = renovationHardfixHouseTypeService.listByPage(param);
+        return Result.success(pageInfo);
+    }
+
+    @ApiOperation("户型结构表分页查询 author:Xiewj")
+    @RequestMapping(value = "/getListByGroup", method = RequestMethod.POST)
+    @NoAuthentication
+    @AroundLog(name = "分页查询户型结构表")
+    public Result getListByGroup(@RequestBody RequestRenovationHardfixHouseType param) {
+        List<RenovationHardfixHouseTypeEntity> list = renovationHardfixHouseTypeService.getList(param);
+        List<Map<String, Object>> collect = list.stream()
+                .collect(Collectors.groupingBy(RenovationHardfixHouseTypeEntity::getGroupName)).entrySet().stream().map(d -> {
+                    Map<String, Object> map = new HashMap<>();
+                    map.put("datalist", d.getValue());
+                    map.put("type", d.getKey());
+                    return map;
+                }).collect(Collectors.toList());
+
+
+        return Result.success(collect);
+    }
+
+    //@ApiOperation("添加户型结构表信息 author:Xiewj")
+    //@PostMapping(value = "/save")
+    //// @ApiImplicitParams({
+    ////             @ApiImplicitParam(name = "pageSize", value = "页数", dataType = "int"),
+    ////             @ApiImplicitParam(name = "pageNum", value = "页码", dataType = "int")})
+    //@NoAuthentication
+    //@AroundLog(name = "添加户型结构表信息")
+    //public Result save(@RequestBody RenovationHardfixHouseTypeEntity renovationHardfixHouseType) {
+    //    Boolean saveFlag = renovationHardfixHouseTypeService.save(renovationHardfixHouseType);
+    //    return Result.success(saveFlag);
+    //}
+    //
+    //
+    //@ApiOperation("修改户型结构表信息 author:Xiewj")
+    //@RequestMapping(value = "/updateById", method = RequestMethod.POST)
+    //// @ApiImplicitParams({
+    //// @ApiImplicitParam(name = "name", value = "多个以逗号分割", dataType = "String")})
+    //@NoAuthentication
+    //@AroundLog(name = "修改户型结构表信息")
+    //public Result updateById(@RequestBody RenovationHardfixHouseTypeEntity renovationHardfixHouseType) {
+    //    Boolean updateFlag = renovationHardfixHouseTypeService.updateById(renovationHardfixHouseType);
+    //    return Result.success(updateFlag);
+    //}
+    //
+    //
+    //@GetMapping(value = "/getDetail")
+    //@ApiOperation(value = "获取户型结构表详细信息 author:Xiewj", notes = "获取户型结构表详细信息")
+    //@ApiImplicitParams(
+    //        @ApiImplicitParam(name = "id", value = "主键Id", dataType = "Long", required = true)
+    //)
+    //@NoAuthentication
+    //@AroundLog(name = "获取户型结构表详细信息")
+    //public Result getDetail(@RequestParam(name = "id") Long id) {
+    //    return Result.success(renovationHardfixHouseTypeService.findById(id));
+    //}
+    //
+    //@GetMapping(value = "/delete")
+    //@ApiOperation(value = "删除户型结构表信息 author:Xiewj", notes = "删除户型结构表信息")
+    //@ApiImplicitParams(
+    //        @ApiImplicitParam(name = "id", value = "主键Id", dataType = "Long", required = true)
+    //)
+    //@AroundLog(name = "删除户型结构表详细信息")
+    //public Result delete(@RequestParam(name = "id") Long id) {
+    //    return Result.success(renovationHardfixHouseTypeService.removeById(id));
+    //}
+
+}

+ 18 - 0
sxz-core/src/main/java/com/fdkk/sxz/webApi/mapper/IRenovationHardfixHouseTypeMapper.java

@@ -0,0 +1,18 @@
+package com.fdkk.sxz.webApi.mapper;
+
+import com.fdkk.sxz.base.IBaseMapper;
+import com.fdkk.sxz.entity.RenovationHardfixHouseTypeEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Component;
+
+/**
+ * @description: 户型结构表 Model
+ * @author: Xiewj
+ * @date: 2021-11-11 11:53:29
+ */
+@Mapper
+@Component("IRenovationHardfixHouseTypeMapper")
+public interface IRenovationHardfixHouseTypeMapper extends IBaseMapper<RenovationHardfixHouseTypeEntity> {
+
+
+}

+ 22 - 10
sxz-core/src/main/java/com/fdkk/sxz/webApi/mapper/IRenovationPartsDetailMapper.java

@@ -2,6 +2,7 @@ package com.fdkk.sxz.webApi.mapper;
 
 import com.fdkk.sxz.base.IBaseMapper;
 import com.fdkk.sxz.entity.RenovationPartsDetailEntity;
+import com.fdkk.sxz.vo.request.RequestRenovationParts;
 import com.fdkk.sxz.vo.response.ResponseRenovationPartsDetail;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
@@ -19,7 +20,7 @@ public interface IRenovationPartsDetailMapper extends IBaseMapper<RenovationPart
 
     @Select("<script>" +
             "select id, key_word as keyWord, type, description, img, high_img as highImg, path, name, zh_name as zhName, parts_type_id as partsTypeId, has_toolbag as hasToolbag ,mview_path as " +
-            "mviewPath " +
+            "mviewPath , other_file_url as  otherFileUrl" +
             "from tb_renovation_parts_detail where parts_type_id = #{partsTypeId} and rec_status = 'A' and is_show = 1 and examine = 1" +
             "<if test= 'colorId != null'> " +
             " and parts_color_id = #{colorId} " +
@@ -30,11 +31,13 @@ public interface IRenovationPartsDetailMapper extends IBaseMapper<RenovationPart
             "</script>")
     List<ResponseRenovationPartsDetail> findDetailByTypeId(@Param("partsTypeId") Long partsTypeId, @Param("colorId") Long colorId, @Param("classifyId") Long classifyId);
 
-    @Select("select id, key_word as keyWord, type, description, img, high_img as highImg, path, name, zh_name as zhName, has_toolbag as hasToolbag from tb_renovation_parts_detail where name = " +
+    @Select("select id, key_word as keyWord, type, description, img, high_img as highImg, path, name, zh_name as zhName, has_toolbag as hasToolbag ,mview_path as mviewPath ,other_file_url as  " +
+            "otherFileUrl from tb_renovation_parts_detail where name = " +
             "#{name} and rec_status = 'A' and is_show = 1 and examine = 1 ")
     ResponseRenovationPartsDetail findByName(String name);
 
-    @Select("select id,parts_type_id AS partsTypeId, key_word as keyWord, type, description, img, high_img as highImg, path, name, zh_name as zhName, has_toolbag as hasToolbag from " +
+    @Select("select id,parts_type_id AS partsTypeId, key_word as keyWord, type, description, img, high_img as highImg, path, name, zh_name as zhName, has_toolbag as hasToolbag ,mview_path as " +
+            "mviewPath ,other_file_url as  otherFileUrl from " +
             "tb_renovation_parts_detail where key_word like CONCAT('%', #{keyWord}, '%') and rec_status = 'A' and is_show = 1 and examine = 1 ")
     List<ResponseRenovationPartsDetail> findByKeyWord(String keyWord);
 
@@ -43,16 +46,25 @@ public interface IRenovationPartsDetailMapper extends IBaseMapper<RenovationPart
             " a.parts_style_id AS partsStyleId, a.parts_classify_id AS partsClassifyId, " +
             " a.parts_shape_id AS partsShapeId, a.parts_brand_id AS partsBrandId, a.company_id AS companyId, a.description, a.img, " +
             " a.high_img AS highImg, a.path, a.key_word AS keyWord, a.NAME, a.zh_name AS zhName, " +
-            " a.TYPE, a.is_show AS isShow, a.examine, a.create_time AS createTime, a.has_toolbag as hasToolbag ,a.mview_path as mviewPath " +
-            " FROM tb_renovation_parts_detail a LEFT JOIN `tb_model_upload` b ON a.id = b.parts_detail_id " +
+            " a.TYPE, a.is_show AS isShow, a.examine, a.create_time AS createTime, a.has_toolbag as hasToolbag ,a.mview_path as mviewPath ,a.other_file_url as otherFileUrl " +
+            " FROM tb_renovation_parts_detail a " +
+            "LEFT JOIN `tb_model_upload` b ON a.id = b.parts_detail_id " +
+            "LEFT JOIN `tb_renovation_parts_type` c ON c.id = a.parts_type_id " +
+            "LEFT JOIN `tb_renovation_parts` d ON d.id = c.parts_id " +
             " WHERE a.rec_status = 'A' " +
-            "<if test= 'userId != null'> " +
-            " and b.user_id = #{userId} " +
+            "<if test= 'param.userId != null'> " +
+            " and b.user_id = #{param.userId} " +
             "</if> " +
-            "<if test= 'name != null'> " +
-            " and a.zh_name like concat('%', #{name}, '%') " +
+            "<if test= 'param.name != null'> " +
+            " and a.zh_name like concat('%', #{param.name}, '%') " +
+            "</if> " +
+            "<if test= 'param.isShow != null'> " +
+            " and a.is_show = #{param.isShow} " +
+            "</if> " +
+            "<if test= 'param.partsId != null'> " +
+            " and d.id  =#{param.partsId}" +
             "</if> " +
             " GROUP BY a.name ORDER BY a.create_time desc" +
             "</script>")
-    List<RenovationPartsDetailEntity> findAllByUserId(@Param("userId") Long userId, @Param("name") String name);
+    List<RenovationPartsDetailEntity> findAllByUserId(@Param("param") RequestRenovationParts param, @Param("name") String name);
 }

+ 23 - 0
sxz-core/src/main/java/com/fdkk/sxz/webApi/service/IRenovationHardfixHouseTypeService.java

@@ -0,0 +1,23 @@
+package com.fdkk.sxz.webApi.service;
+
+import com.fdkk.sxz.base.IBaseService;
+import com.fdkk.sxz.entity.RenovationHardfixHouseTypeEntity;
+import com.fdkk.sxz.vo.request.RequestRenovationHardfixHouseType;
+import com.github.pagehelper.PageInfo;
+
+import java.util.List;
+
+
+/**
+ * @description: RenovationHardfixHouseType 相关的服务接口类
+ * @author: Xiewj
+ * @date: 2021-11-11 11:53:29
+ **/
+public interface IRenovationHardfixHouseTypeService extends IBaseService<RenovationHardfixHouseTypeEntity> {
+
+
+    PageInfo<RenovationHardfixHouseTypeEntity> listByPage(RequestRenovationHardfixHouseType param);
+
+    List<RenovationHardfixHouseTypeEntity> getList(RequestRenovationHardfixHouseType param);
+
+}

+ 2 - 1
sxz-core/src/main/java/com/fdkk/sxz/webApi/service/IRenovationPartsDetailService.java

@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
 import com.fdkk.sxz.base.IBaseService;
 import com.fdkk.sxz.entity.RenovationPartsDetailEntity;
 import com.fdkk.sxz.vo.request.RequestDataBucket;
+import com.fdkk.sxz.vo.request.RequestRenovationParts;
 import com.fdkk.sxz.vo.response.ResponseRenovationPartsDetail;
 import com.github.pagehelper.PageInfo;
 
@@ -24,7 +25,7 @@ public interface IRenovationPartsDetailService extends IBaseService<RenovationPa
 
     List<ResponseRenovationPartsDetail> findByKeyWord(String keyWord);
 
-    PageInfo<RenovationPartsDetailEntity> findAllByUserId(Long userId, String name, Integer pageNum, Integer pageSize);
+    PageInfo<RenovationPartsDetailEntity> findAllByUserId(RequestRenovationParts param, String name, Integer pageNum, Integer pageSize);
 
 
     JSONArray dataPostHandler(RequestDataBucket param);

+ 52 - 0
sxz-core/src/main/java/com/fdkk/sxz/webApi/service/impl/RenovationHardfixHouseTypeServiceImpl.java

@@ -0,0 +1,52 @@
+package com.fdkk.sxz.webApi.service.impl;
+
+import cn.hutool.core.util.ObjectUtil;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.fdkk.sxz.base.impl.BaseServiceImpl;
+import com.fdkk.sxz.entity.RenovationHardfixHouseTypeEntity;
+import com.fdkk.sxz.vo.request.RequestRenovationHardfixHouseType;
+import com.fdkk.sxz.webApi.mapper.IRenovationHardfixHouseTypeMapper;
+import com.fdkk.sxz.webApi.service.IRenovationHardfixHouseTypeService;
+import com.github.pagehelper.PageInfo;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @description: RenovationHardfixHouseType 相关的服务实现类
+ * @author: Xiewj
+ * @date: 2021-11-11 11:53:29
+ **/
+@Service
+public class RenovationHardfixHouseTypeServiceImpl extends BaseServiceImpl<IRenovationHardfixHouseTypeMapper, RenovationHardfixHouseTypeEntity> implements IRenovationHardfixHouseTypeService {
+
+    @Override
+    public List<RenovationHardfixHouseTypeEntity> getList(RequestRenovationHardfixHouseType param) {
+        return super.list(getWrapper(param));
+    }
+
+    @Override
+    public PageInfo<RenovationHardfixHouseTypeEntity> listByPage(RequestRenovationHardfixHouseType param) {
+        return super.listByPage(param, getWrapper(param));
+    }
+
+    LambdaQueryWrapper getWrapper(RequestRenovationHardfixHouseType param) {
+        LambdaQueryWrapper<RenovationHardfixHouseTypeEntity> wrapper = Wrappers.lambdaQuery();
+        if (ObjectUtil.isNotNull(param.getId()) && param.getId() > 0) {
+            wrapper.eq(RenovationHardfixHouseTypeEntity::getId, param.getId());
+        }
+        if (ObjectUtil.isNotNull(param.getType()) && StrUtil.isNotEmpty(param.getType())) {
+            wrapper.eq(RenovationHardfixHouseTypeEntity::getType, param.getType());
+        }
+        if (ObjectUtil.isNotNull(param.getDescription()) && StrUtil.isNotEmpty(param.getDescription())) {
+            wrapper.eq(RenovationHardfixHouseTypeEntity::getDescription, param.getDescription());
+        }
+        if (ObjectUtil.isNotNull(param.getKeyWord()) && StrUtil.isNotEmpty(param.getKeyWord())) {
+            wrapper.eq(RenovationHardfixHouseTypeEntity::getKeyWord, param.getKeyWord());
+        }
+        return wrapper;
+    }
+
+}

+ 3 - 2
sxz-core/src/main/java/com/fdkk/sxz/webApi/service/impl/RenovationPartsDetailServiceImpl.java

@@ -14,6 +14,7 @@ import com.fdkk.sxz.entity.RenovationPartsDetailEntity;
 import com.fdkk.sxz.entity.RenovationPartsSizeEntity;
 import com.fdkk.sxz.exception.BusinessException;
 import com.fdkk.sxz.vo.request.RequestDataBucket;
+import com.fdkk.sxz.vo.request.RequestRenovationParts;
 import com.fdkk.sxz.vo.response.ResponseRenovationPartsAttaching;
 import com.fdkk.sxz.vo.response.ResponseRenovationPartsDetail;
 import com.fdkk.sxz.vo.response.ResponseRenovationPartsSize;
@@ -92,10 +93,10 @@ public class RenovationPartsDetailServiceImpl extends BaseServiceImpl<IRenovatio
     }
 
     @Override
-    public PageInfo<RenovationPartsDetailEntity> findAllByUserId(Long userId, String name, Integer pageNum, Integer pageSize) {
+    public PageInfo<RenovationPartsDetailEntity> findAllByUserId(RequestRenovationParts param, String name, Integer pageNum, Integer pageSize) {
 
         PageHelper.startPage(pageNum, pageSize);
-        List<RenovationPartsDetailEntity> list = mapper.findAllByUserId(userId, name);
+        List<RenovationPartsDetailEntity> list = mapper.findAllByUserId(param, name);
         PageInfo<RenovationPartsDetailEntity> pageInfo = new PageInfo<>(list);
         return pageInfo;
     }

+ 24 - 0
sxz-core/src/main/resources/mapper/RenovationHardfixHouseTypeMapper.xml

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.fdkk.sxz.webApi.mapper.IRenovationHardfixHouseTypeMapper">
+
+    <!-- 通用查询结果列 -->
+    <sql id="baseColumnList">
+        t
+        .
+        id
+        ,
+        t.parts_id AS partsId,
+        t.description AS description,
+        t.key_word AS keyWord,
+        t.group_name AS groupName,
+        t.type AS type,
+        t.img AS img,
+        t.groups AS groups,
+        t.name AS name
+        t.update_time AS updateTime,
+        t.rec_status AS recStatus
+    </sql>
+
+
+</mapper>

+ 1 - 1
sxz-generator/src/main/resources/generator.properties

@@ -5,7 +5,7 @@ AUTHOR=Xiewj
 #包名
 PACKAGE=user
 #表名,表名生成代码。多表采用逗号分隔
-TABLES=tb_model_handel_step
+TABLES=tb_renovation_hardfix_house_type
 #数据库连
 DBURL=jdbc:mysql://192.168.0.47:3306/change_clothes?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
 #密码

+ 79 - 0
sxz-modules/src/main/java/com/fdkk/sxz/entity/RenovationHardfixHouseTypeEntity.java

@@ -0,0 +1,79 @@
+package com.fdkk.sxz.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+/**
+ * @description: 画户型类型表 Model
+ * @author: Xiewj
+ * @date: 2021-11-11 16:39:27
+ */
+@Data
+@TableName("tb_renovation_hardfix_house_type")
+@ApiModel(value = "画户型类型表", description = "RenovationHardfixHouseTypeEntity")
+public class RenovationHardfixHouseTypeEntity extends BaseEntity {
+
+    private static final long serialVersionUID = 1636619967952L;
+
+    /**
+     * tb_renovation_parts_type表的id
+     */
+    @TableField("parts_id")
+    @ApiModelProperty(value = "tb_renovation_parts_type表的id", name = "parts_id")
+    private Long partsId;
+
+    /**
+     * 描述
+     */
+    @TableField("description")
+    @ApiModelProperty(value = "描述", name = "description")
+    private String description;
+
+    /**
+     * 关键词
+     */
+    @TableField("key_word")
+    @ApiModelProperty(value = "关键词", name = "key_word")
+    private String keyWord;
+
+    /**
+     * 类型名称
+     */
+    @TableField("group_name")
+    @ApiModelProperty(value = "类型名称", name = "group_name")
+    private String groupName;
+
+    /**
+     * 类型
+     */
+    @TableField("type")
+    @ApiModelProperty(value = "类型", name = "type")
+    private String type;
+
+    /**
+     * 图片地址
+     */
+    @TableField("img")
+    @ApiModelProperty(value = "图片地址", name = "img")
+    private String img;
+
+    /**
+     * 分组
+     */
+    @TableField("groups")
+    @ApiModelProperty(value = "分组", name = "groups")
+    private String groups;
+
+    /**
+     *
+     */
+    @TableField("name")
+    @ApiModelProperty(value = "", name = "name")
+    private String name;
+
+
+}

+ 3 - 0
sxz-modules/src/main/java/com/fdkk/sxz/entity/RenovationPartsDetailEntity.java

@@ -76,4 +76,7 @@ public class RenovationPartsDetailEntity extends BaseEntity {
     @TableField("mview_status")
     private Integer mviewStatus;
 
+    @TableField("other_file_url")
+    private String otherFileUrl;
+
 }

+ 3 - 0
sxz-modules/src/main/java/com/fdkk/sxz/entity/SceneStyleEntity.java

@@ -47,4 +47,7 @@ public class SceneStyleEntity extends BaseEntity {
 
     @TableField("is_decoration")
     private Integer isDecoration;
+
+    @TableField("roaming_point_url")
+    private String roamingPointUrl;
 }

+ 34 - 0
sxz-modules/src/main/java/com/fdkk/sxz/vo/request/RequestRenovationHardfixHouseType.java

@@ -0,0 +1,34 @@
+package com.fdkk.sxz.vo.request;
+
+import com.fdkk.sxz.base.RequestBase;
+import lombok.Data;
+
+/**
+ * @description: 户型结构表 Model
+ * @author: Xiewj
+ * @date: 2021-11-11 11:53:29
+ */
+@Data
+public class RequestRenovationHardfixHouseType extends RequestBase {
+
+    private static final long serialVersionUID = 1636602809681L;
+
+    private Long id;
+
+    private String name;
+
+    /**
+     * 描述
+     */
+    private String description;
+
+    /**
+     * 关键词
+     */
+    private String keyWord;
+
+    /**
+     * 类型
+     */
+    private String type;
+}

+ 4 - 0
sxz-modules/src/main/java/com/fdkk/sxz/vo/request/RequestRenovationParts.java

@@ -31,7 +31,11 @@ public class RequestRenovationParts extends RequestBase {
 
     private Long classifyId;
 
+    private Long partsId;
+
     private String[] types;
 
+    private Integer isShow;
+
 
 }

+ 3 - 0
sxz-modules/src/main/java/com/fdkk/sxz/vo/response/ResponseRenovationPartsDetail.java

@@ -35,4 +35,7 @@ public class ResponseRenovationPartsDetail {
     private Integer hasToolbag;
 
     private String mviewPath = "";
+
+    private String otherFileUrl = "";
+
 }