Browse Source

Merge branch 'develop' of http://39.106.8.246:3003/BDTP/digital-delivery

zhaoyk 2 years ago
parent
commit
9342556725

+ 2 - 2
adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/controller/DataMigrationController.java

@@ -182,12 +182,12 @@ public class DataMigrationController {
             buff.flush();
             buff.close();
         } catch (Exception e) {
-            log.error("导出文件文件出错:{}",e);
+            log.error(String.format("导出文件文件出错:{}",e));
         } finally {try {
             buff.close();
             outStr.close();
         } catch (Exception e) {
-            log.error("关闭流对象出错 e:{}",e);
+            log.error(String.format("关闭流对象出错 e:{}",e));
         }
         }
     }

+ 19 - 3
adm-business/adm-middleware/src/main/java/com/persagy/proxy/migration/service/Impl/DefineInfoMigration.java

@@ -155,27 +155,37 @@ public class DefineInfoMigration extends MigrationAbstractServiceImpl<ObjectInfo
             sqls.append("'").append(infoDefine.getProjectId()).append("',");
             sqls.append("'").append(infoDefine.getCategory()).append("',");
             sqls.append("'").append(infoDefine.getFirstTag()).append("',");
-            sqls.append("'").append(infoDefine.getSecondTag()).append("',");
+            if (infoDefine.getSecondTag() == null) {
+                infoDefine.getSecondTag();
+            } else {
+                sqls.append("'").append(infoDefine.getSecondTag()).append("',");
+            }
+
             sqls.append("'").append(infoDefine.getPriority()).append("',");
             sqls.append("'").append(infoDefine.getInputMode()).append("',");
+
             if (infoDefine.getUnit() == null) {
                 sqls.append(infoDefine.getUnit()).append(",");
             } else {
                 sqls.append("'").append(infoDefine.getUnit()).append("',");
             }
+
             sqls.append("'").append(infoDefine.getDataType()).append("',");
             sqls.append(infoDefine.getIsMultiple()?1:0).append(",");
             sqls.append(infoDefine.getIsRegion()?1:0).append(",");
+
             if (infoDefine.getFormater() == null) {
                 sqls.append(infoDefine.getFormater()).append(",");
             } else {
                 sqls.append("'").append(infoDefine.getFormater()).append("',");
             }
+
             if (infoDefine.getDataSource() == null) {
                 sqls.append(infoDefine.getDataSource()).append(",");
             } else {
                 sqls.append("'").append(infoDefine.getDataSource()).append("',");
             }
+
             if (infoDefine.getRemark() == null) {
                 sqls.append(infoDefine.getRemark()).append(",");
             } else {
@@ -184,7 +194,13 @@ public class DefineInfoMigration extends MigrationAbstractServiceImpl<ObjectInfo
             sqls.append(infoDefine.getSubFlag()?1:0).append(",");
             sqls.append(infoDefine.getWeakPoint()?1:0).append(",");
             sqls.append(infoDefine.getShowOrder()).append(",");
-            sqls.append("'").append(infoDefine.getVersion()).append("',");
+
+            if (infoDefine.getVersion() == null) {
+                infoDefine.getVersion();
+            } else {
+                sqls.append("'").append(infoDefine.getVersion()).append("',");
+            }
+
             sqls.append(infoDefine.getSourceFrom()).append(",");
             sqls.append("'").append(infoDefine.getCreator()).append("',");
             sqls.append("'").append(infoDefine.getCreationTime()).append("',");
@@ -197,7 +213,7 @@ public class DefineInfoMigration extends MigrationAbstractServiceImpl<ObjectInfo
             if (infoDefine.getModifiedTime() == null) {
                 sqls.append(infoDefine.getModifiedTime()).append(",");
             } else {
-                sqls.append("'").append(infoDefine.getModifiedTime()).append(",");
+                sqls.append("'").append(infoDefine.getModifiedTime()).append("',");
             }
             sqls.append(infoDefine.getValid());
             sqls.append(")\n ,");

+ 1 - 0
adm-business/adm-server/src/main/java/com/persagy/adm/server/auth/service/impl/AdmAuthServiceImpl.java

@@ -4,6 +4,7 @@ import cn.hutool.core.util.StrUtil;
 import com.persagy.adm.server.algorithm.service.AdmProjectUserService;
 import com.persagy.adm.server.auth.service.AdmAuthService;
 import com.persagy.dmp.auth.client.BossAuthFacade;
+import com.persagy.dmp.auth.config.AuthFeignInterceptor;
 import com.persagy.dmp.auth.domain.BossAuthMenu;
 import com.persagy.dmp.auth.domain.BossAuthUser;
 import com.persagy.dmp.auth.domain.Project;

+ 15 - 18
adm-business/adm-server/src/main/java/com/persagy/bdtp/adm/controller/AdmFileController.java

@@ -5,9 +5,9 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.persagy.bdtp.adm.common.AdmResult;
 import com.persagy.bdtp.adm.dao.AdmFileMapper;
+import com.persagy.bdtp.adm.entity.AdmCad;
 import com.persagy.bdtp.adm.entity.CadFileQueryParam;
-import com.persagy.bdtp.adm.entity.db.AdmFile;
-import com.persagy.bdtp.adm.service.IAdmFileService;
+import com.persagy.bdtp.adm.service.IAdmCadService;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -15,10 +15,7 @@ import org.springframework.web.bind.annotation.*;
 import java.util.List;
 
 /**
- * <p>
- * 文件附件 前端控制器
- * </p>
- *
+ * ADM文件服务
  * @author yanguofeng
  * @since 2022-01-10
  */
@@ -27,7 +24,7 @@ import java.util.List;
 public class AdmFileController {
 
     @Autowired
-    IAdmFileService iAdmFileService;
+    IAdmCadService iAdmCadService;
     @Autowired
     AdmFileMapper admFileMapper;
 
@@ -36,22 +33,22 @@ public class AdmFileController {
      */
 
     @PostMapping("/queryCadFiles")
-    public AdmResult<List<AdmFile>> queryCadFiles(@RequestBody CadFileQueryParam queryParam){
-        Wrapper<AdmFile> eq = new LambdaQueryWrapper<AdmFile>()
-                .eq(StringUtils.isNotBlank(queryParam.getProjectId()), AdmFile::getProjectId, queryParam.getProjectId())
-                .eq(StringUtils.isNotBlank(queryParam.getBuildingId()),AdmFile::getBuildingId,queryParam.getBuildingId())
-                .eq(StringUtils.isNotBlank(queryParam.getFloorId()),AdmFile::getFloorId,queryParam.getFloorId())
-                .eq(StringUtils.isNotBlank(queryParam.getFileId()),AdmFile::getFileId,queryParam.getFileId())
-                .eq(StringUtils.isNotBlank(queryParam.getBizType()),AdmFile::getBizType,queryParam.getBizType());
-        return AdmResult.success(iAdmFileService.list(eq));
+    public AdmResult<List<AdmCad>> queryCadFiles(@RequestBody CadFileQueryParam queryParam){
+        Wrapper<AdmCad> eq = new LambdaQueryWrapper<AdmCad>()
+                .eq(StringUtils.isNotBlank(queryParam.getProjectId()), AdmCad::getProjectId, queryParam.getProjectId())
+                .eq(StringUtils.isNotBlank(queryParam.getBuildingId()),AdmCad::getBuildingId,queryParam.getBuildingId())
+                .eq(StringUtils.isNotBlank(queryParam.getFloorId()),AdmCad::getFloorId,queryParam.getFloorId())
+                .eq(StringUtils.isNotBlank(queryParam.getFileKey()),AdmCad::getFileKey,queryParam.getFileKey())
+                .eq(StringUtils.isNotBlank(queryParam.getMajorCode()),AdmCad::getMajorCode,queryParam.getMajorCode());
+        return AdmResult.success(iAdmCadService.list(eq));
     }
 
     /**
      * 保存CAD文件信息
      */
     @PostMapping("/saveCadFileInfo")
-    public AdmResult<Void> saveCadFileInfo(@RequestBody List<AdmFile> admFiles){
-        iAdmFileService.saveOrUpdateBatch(admFiles);
+    public AdmResult<Void> saveCadFileInfo(@RequestBody List<AdmCad> admFiles){
+        iAdmCadService.saveOrUpdateBatch(admFiles);
         return AdmResult.success(null);
     }
 
@@ -61,7 +58,7 @@ public class AdmFileController {
      */
     @PostMapping("/delete")
     public AdmResult<Void> delete(@RequestParam("id") String id){
-        iAdmFileService.removeById(id);
+        iAdmCadService.removeById(id);
         return AdmResult.success(null);
     }
 }

+ 16 - 0
adm-business/adm-server/src/main/java/com/persagy/bdtp/adm/dao/AdmCadMapper.java

@@ -0,0 +1,16 @@
+package com.persagy.bdtp.adm.dao;
+
+import com.persagy.bdtp.adm.entity.AdmCad;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * CAD图纸信息表 Mapper 接口
+ * </p>
+ *
+ * @author yanguofeng
+ * @since 2022-01-12
+ */
+public interface AdmCadMapper extends BaseMapper<AdmCad> {
+
+}

+ 72 - 0
adm-business/adm-server/src/main/java/com/persagy/bdtp/adm/entity/AdmCad.java

@@ -0,0 +1,72 @@
+package com.persagy.bdtp.adm.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+import com.persagy.bdtp.adm.entity.db.BaseAdmDataEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * CAD图纸信息表
+ * </p>
+ *
+ * @author yanguofeng
+ * @since 2022-01-12
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class AdmCad extends BaseAdmDataEntity implements Serializable {
+
+    /**
+     * 存储系统的key
+     */
+    @TableField("file_key")
+    private String fileKey;
+
+    /**
+     * 文件名称
+     */
+    @TableField("file_name")
+    private String fileName;
+
+    /**
+     * 所属专业编码 土建精装-CF|空调-AC|给排水-WS|消防-FF
+     */
+    @TableField("major_code")
+    private String majorCode;
+
+    /**
+     * 所属专业名称
+     */
+    @TableField("major_name")
+    private String majorName;
+
+    /**
+     * 核查状态 0-未完成 1-已完成
+     */
+    @TableField("check_status")
+    private Boolean checkStatus;
+
+    /**
+     * 楼层ID
+     */
+    @TableField("floor_id")
+    private String floorId;
+
+    /**
+     * 建筑ID
+     */
+    @TableField("building_id")
+    private String buildingId;
+
+    /**
+     * 项目ID
+     */
+    @TableField("project_id")
+    private String projectId;
+
+
+}

+ 14 - 2
adm-business/adm-server/src/main/java/com/persagy/bdtp/adm/entity/CadFileQueryParam.java

@@ -7,12 +7,24 @@ import lombok.Data;
  */
 @Data
 public class CadFileQueryParam {
+    /**
+     * 项目ID
+     */
     private String projectId;
+    /**
+     * 建筑ID
+     */
     private String buildingId;
+    /**
+     * 楼层ID
+     */
     private String floorId;
-    private String fileId;
+    /**
+     * CAD图纸文件的key
+     */
+    private String fileKey;
     /**
      * 土建精装-CF,空调-AC,给排水-WS,消防-FF
      */
-    private String bizType;
+    private String majorCode;
 }

+ 16 - 0
adm-business/adm-server/src/main/java/com/persagy/bdtp/adm/service/IAdmCadService.java

@@ -0,0 +1,16 @@
+package com.persagy.bdtp.adm.service;
+
+import com.persagy.bdtp.adm.entity.AdmCad;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * CAD图纸信息表 服务类
+ * </p>
+ *
+ * @author yanguofeng
+ * @since 2022-01-12
+ */
+public interface IAdmCadService extends IService<AdmCad> {
+
+}

+ 20 - 0
adm-business/adm-server/src/main/java/com/persagy/bdtp/adm/service/impl/AdmCadServiceImpl.java

@@ -0,0 +1,20 @@
+package com.persagy.bdtp.adm.service.impl;
+
+import com.persagy.bdtp.adm.entity.AdmCad;
+import com.persagy.bdtp.adm.dao.AdmCadMapper;
+import com.persagy.bdtp.adm.service.IAdmCadService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * CAD图纸信息表 服务实现类
+ * </p>
+ *
+ * @author yanguofeng
+ * @since 2022-01-12
+ */
+@Service
+public class AdmCadServiceImpl extends ServiceImpl<AdmCadMapper, AdmCad> implements IAdmCadService {
+
+}

+ 1 - 1
adm-business/adm-server/src/main/resources/application-dev.yml

@@ -8,7 +8,7 @@ spring:
           driver-class-name: com.mysql.cj.jdbc.Driver
           username: root
           password: persagy@2021
-          url: jdbc:mysql://192.168.100.91:9934/adm-sever?allowMultiQueries=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai
+          url: jdbc:mysql://192.168.100.91:9934/adm-server?allowMultiQueries=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai
 #          username: root
 #          password: Bdtp@1qaz@WSX
 #          url: jdbc:mysql://cd-cdb-nboe1rje.sql.tencentcdb.com:61955/adm-poc?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=Asia/Shanghai

+ 5 - 0
adm-business/adm-server/src/main/resources/mapper/AdmCadMapper.xml

@@ -0,0 +1,5 @@
+<?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.persagy.bdtp.adm.dao.AdmCadMapper">
+
+</mapper>