فهرست منبع

* cad功能对接

chen.cheng 4 ماه پیش
والد
کامیت
759bbe4618
35فایلهای تغییر یافته به همراه842 افزوده شده و 28 حذف شده
  1. 15 0
      bd-park/park-backend/park-application/src/main/java/com/huashe/park/application/web/controller/cons/ConsUnitInfoController.java
  2. 55 0
      bd-park/park-backend/park-application/src/main/java/com/huashe/park/application/web/controller/system/SysCustConfigController.java
  3. 3 0
      bd-park/park-backend/park-application/src/main/resources/application.yml
  4. 5 1
      bd-park/park-backend/park-collect/src/main/java/com/huashe/park/collect/event/MachineRealtimeEventListener.java
  5. 4 0
      bd-park/park-backend/park-common/pom.xml
  6. 2 0
      bd-park/park-backend/park-common/src/main/java/com/huashe/park/common/DateTimeUtil.java
  7. 21 0
      bd-park/park-backend/park-common/src/main/java/com/huashe/park/common/excel/CsvAlias.java
  8. 12 0
      bd-park/park-backend/park-core/pom.xml
  9. 4 0
      bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/mapper/MachineProcessResultMapper.java
  10. 2 0
      bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/mapper/PileMachineInfoMapper.java
  11. 18 0
      bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/mapper/SysCustConfigMapper.java
  12. 4 0
      bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/service/IConsUnitInfoService.java
  13. 3 0
      bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/service/IMachineProcessResultService.java
  14. 2 0
      bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/service/IPileMachineInfoService.java
  15. 21 0
      bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/service/ISysCustConfigService.java
  16. 175 4
      bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/service/impl/ConsUnitInfoServiceImpl.java
  17. 30 2
      bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/service/impl/MachineProcessResultServiceImpl.java
  18. 5 0
      bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/service/impl/PileMachineInfoServiceImpl.java
  19. 80 0
      bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/service/impl/SysCustConfigServiceImpl.java
  20. 4 3
      bd-park/park-backend/park-core/src/main/resources/mapper/cons/ConsPileHoleInfoMapper.xml
  21. 11 0
      bd-park/park-backend/park-core/src/main/resources/mapper/cons/MachineProcessResultMapper.xml
  22. 14 3
      bd-park/park-backend/park-core/src/main/resources/mapper/cons/PileHoleIndexRealtimeMapper.xml
  23. 9 1
      bd-park/park-backend/park-core/src/main/resources/mapper/cons/PileMachineInfoMapper.xml
  24. 47 0
      bd-park/park-backend/park-core/src/main/resources/mapper/sys/SysCustConfigMapper.xml
  25. 4 0
      bd-park/park-backend/park-domain/pom.xml
  26. 24 0
      bd-park/park-backend/park-domain/src/main/java/com/huashe/park/domain/dto/cons/CADJson.java
  27. 35 0
      bd-park/park-backend/park-domain/src/main/java/com/huashe/park/domain/dto/cons/ConsUnitResult.java
  28. 71 0
      bd-park/park-backend/park-domain/src/main/java/com/huashe/park/domain/dto/cons/ResultCADCsv.java
  29. 2 0
      bd-park/park-backend/park-domain/src/main/java/com/huashe/park/domain/entity/ConsUnitInfo.java
  30. 99 0
      bd-park/park-backend/park-domain/src/main/java/com/huashe/park/domain/entity/CustSysConfig.java
  31. 4 0
      bd-park/park-backend/park-domain/src/main/java/com/huashe/park/domain/entity/PileHoleIndexRealtime.java
  32. 15 0
      bd-park/park-backend/park-infrastructure/src/main/java/com/huashe/park/infrastructure/cfg/forest/CADForestCfg.java
  33. 8 0
      bd-park/park-backend/park-infrastructure/src/main/java/com/huashe/park/infrastructure/cfg/forest/CustomForestCfg.java
  34. 20 0
      bd-park/park-backend/park-infrastructure/src/main/java/com/huashe/park/infrastructure/uwb/CADService.java
  35. 14 14
      common-application/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/MimeTypeUtils.java

+ 15 - 0
bd-park/park-backend/park-application/src/main/java/com/huashe/park/application/web/controller/cons/ConsUnitInfoController.java

@@ -22,12 +22,14 @@ import com.huashe.park.common.i18n.MessageUtils;
 import com.huashe.park.core.service.IConsUnitInfoService;
 import com.huashe.park.domain.dto.cons.ConsUnitMachine;
 import com.huashe.park.domain.entity.ConsUnitInfo;
+import com.huashe.park.infrastructure.cfg.forest.CADForestCfg;
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.StringMatchUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.system.service.ISysConfigService;
 
 /**
  * 施工单元Controller
@@ -41,6 +43,12 @@ public class ConsUnitInfoController extends BaseController {
     @Autowired
     private IConsUnitInfoService consUnitInfoService;
 
+    @Autowired
+    private ISysConfigService configService;
+
+    @Autowired
+    private CADForestCfg cadForestCfg;
+
     /**
      * 查询施工单元列表
      */
@@ -67,9 +75,16 @@ public class ConsUnitInfoController extends BaseController {
         if (StringUtils.isEmpty(consUnitInfo.getFileId())) {
             throw new ServiceException(MessageUtils.message("common.not.null", "file id"));
         }
+        String s = configService.selectConfigByKey(cadForestCfg.getCadBizParam());
         consUnitInfoService.importConsUnitHole(consUnitInfo);
     }
 
+    @Log(title = "施工单元", businessType = BusinessType.EXPORT)
+    @PostMapping("/export/cad")
+    public void exportCad(HttpServletResponse response, ConsUnitInfo consUnitInfo) {
+        consUnitInfoService.exportConsUnitHole(consUnitInfo, response);
+    }
+
     /**
      * 获取施工单元详细信息
      */

+ 55 - 0
bd-park/park-backend/park-application/src/main/java/com/huashe/park/application/web/controller/system/SysCustConfigController.java

@@ -0,0 +1,55 @@
+package com.huashe.park.application.web.controller.system;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.huashe.common.domain.AjaxResult;
+import com.huashe.park.core.service.ISysCustConfigService;
+import com.huashe.park.domain.entity.CustSysConfig;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.enums.BusinessType;
+
+/**
+ * 参数配置 信息操作处理
+ *
+ * @author ruoyi
+ */
+@RestController
+@RequestMapping("/system/config/cust")
+public class SysCustConfigController extends BaseController {
+
+    @Autowired
+    private ISysCustConfigService sysCustConfigService;
+
+    /**
+     * 根据参数编号获取详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:config:query')")
+    @GetMapping(value = "/{configId}")
+    public AjaxResult getInfo(@PathVariable Long configId) {
+        return success(sysCustConfigService.selectConfigById(configId));
+    }
+
+    /**
+     * 修改参数配置
+     */
+    @PreAuthorize("@ss.hasPermi('system:config:edit')")
+    @Log(title = "参数管理", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Validated @RequestBody CustSysConfig config) {
+        if (!sysCustConfigService.checkConfigKeyUnique(config)) {
+            return error("修改参数'" + config.getConfigName() + "'失败,参数键名已存在");
+        }
+        config.setUpdateBy(getUsername());
+        return toAjax(sysCustConfigService.updateConfig(config));
+    }
+
+}

+ 3 - 0
bd-park/park-backend/park-application/src/main/resources/application.yml

@@ -97,6 +97,9 @@ forest:
       uwb-usr: admin
       uwb-pwd: admin123
       uwb-host: http://172.192.13.80:2223
+    cad:
+      cad-biz-param: cad.biz.param
+      cad-server: http://127.0.0.1:18080
 # token配置
 token:
   # 令牌自定义标识

+ 5 - 1
bd-park/park-backend/park-collect/src/main/java/com/huashe/park/collect/event/MachineRealtimeEventListener.java

@@ -48,6 +48,9 @@ public class MachineRealtimeEventListener {
         pileHoleIndexRealtime.setHoleByteKey(consPileHoleInfo.getByteId());
         pileHoleIndexRealtime.setMachineByteKey(pileMachineInfo.getByteId());
 
+        pileHoleIndexRealtime.setConsUnitId(consPileHoleInfo.getConsUnitId());
+        pileHoleIndexRealtime.setHoleNum(consPileHoleInfo.getHoleNum());
+
         pileHoleIndexRealtime.setCurrent(event.getMessage().getCurrent());
         pileHoleIndexRealtime.setDepth(event.getMessage().getPileLength());
         pileHoleIndexRealtime.setSprayPressure(event.getMessage().getSprayPressure());
@@ -93,7 +96,8 @@ public class MachineRealtimeEventListener {
         pileHoleIndexRealtime.setMachineByteKey(pileMachineInfo.getByteId());
         pileHoleIndexRealtime.setMachineId(pileMachineInfo.getId());
         pileHoleIndexRealtime.setDepth(event.getMessage().getPileLength());
-
+        pileHoleIndexRealtime.setConsUnitId(consPileHoleInfo.getConsUnitId());
+        pileHoleIndexRealtime.setHoleNum(consPileHoleInfo.getHoleNum());
         pileHoleIndexRealtime.setSprayVolume(event.getMessage().getSprayVolume());
         pileHoleIndexRealtime.setVerticalDeviation(event.getMessage().getVerticalDeviation());
 

+ 4 - 0
bd-park/park-backend/park-common/pom.xml

@@ -140,6 +140,10 @@
             <groupId>org.projectlombok</groupId>
             <artifactId>lombok</artifactId>
         </dependency>
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-core</artifactId>
+        </dependency>
     </dependencies>
 
 </project>

+ 2 - 0
bd-park/park-backend/park-common/src/main/java/com/huashe/park/common/DateTimeUtil.java

@@ -637,6 +637,8 @@ public class DateTimeUtil {
          */
         String yyyy_MM_dd_HHmmss = "yyyy-MM-dd HH:mm:ss";
 
+        String HHmmss = "HH:mm:ss";
+
         /**
          * The constant yyyyMMddHHmmss.
          *

+ 21 - 0
bd-park/park-backend/park-common/src/main/java/com/huashe/park/common/excel/CsvAlias.java

@@ -0,0 +1,21 @@
+package com.huashe.park.common.excel;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * The interface Enable socket server. 自动注册SocketServer
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({
+    ElementType.FIELD
+})
+@Documented
+public @interface CsvAlias {
+    String alias() default "";
+
+    boolean ignore() default false;
+}

+ 12 - 0
bd-park/park-backend/park-core/pom.xml

@@ -64,6 +64,18 @@
             <artifactId>park-infrastructure</artifactId>
             <version>${park.version}</version>
         </dependency>
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-http</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-poi</artifactId>
+        </dependency>
     </dependencies>
     <build>
         <plugins>

+ 4 - 0
bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/mapper/MachineProcessResultMapper.java

@@ -2,6 +2,7 @@ package com.huashe.park.core.mapper;
 
 import java.util.List;
 
+import com.huashe.park.domain.dto.cons.ConsUnitResult;
 import com.huashe.park.domain.entity.MachineProcessResult;
 
 /**
@@ -60,4 +61,7 @@ public interface MachineProcessResultMapper {
      * @return 结果
      */
     public int deleteMachineProcessResultByIds(Long[] ids);
+
+    List<ConsUnitResult> qeyConsUnitResult(Long consUnitId);
+
 }

+ 2 - 0
bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/mapper/PileMachineInfoMapper.java

@@ -64,5 +64,7 @@ public interface PileMachineInfoMapper {
 
     HashMap<String, Integer> cntMachineOnOffline();
 
+    List<PileMachineInfo> qryUnitMachine(Long consUnitId);
     List<PileMachineInfo> selectMachineByConsUnitId(Long consUnitId);
+
 }

+ 18 - 0
bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/mapper/SysCustConfigMapper.java

@@ -0,0 +1,18 @@
+package com.huashe.park.core.mapper;
+
+import com.huashe.common.annotation.DataSource;
+import com.huashe.common.enums.DataSourceType;
+import com.huashe.park.domain.entity.CustSysConfig;
+
+@DataSource(DataSourceType.MASTER)
+public interface SysCustConfigMapper {
+
+    int updateConfig(CustSysConfig custSysConfig);
+
+    CustSysConfig selectConfigById(Long id);
+
+    CustSysConfig checkConfigKeyUnique(String configKey);
+
+    CustSysConfig selectConfig(CustSysConfig param);
+
+}

+ 4 - 0
bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/service/IConsUnitInfoService.java

@@ -5,6 +5,8 @@ import java.util.List;
 import com.huashe.park.domain.dto.cons.ConsUnitMachine;
 import com.huashe.park.domain.entity.ConsUnitInfo;
 
+import javax.servlet.http.HttpServletResponse;
+
 /**
  * 施工单元Service接口
  * 
@@ -68,6 +70,8 @@ public interface IConsUnitInfoService {
 
     void importConsUnitHole(ConsUnitInfo consUnitHole);
 
+    void exportConsUnitHole(ConsUnitInfo consUnitHole, HttpServletResponse response);
+
     List<ConsUnitInfo> machineAssignedUnit(Long machineId);
 
 }

+ 3 - 0
bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/service/IMachineProcessResultService.java

@@ -1,5 +1,6 @@
 package com.huashe.park.core.service;
 
+import com.huashe.park.domain.dto.cons.ResultCADCsv;
 import com.huashe.park.domain.entity.MachineProcessResult;
 
 import java.util.List;
@@ -58,4 +59,6 @@ public interface IMachineProcessResultService {
      * @return 结果
      */
     public int deleteMachineProcessResultById(Long id);
+
+    List<ResultCADCsv> qeyConsUnitResult(Long consUnitId);
 }

+ 2 - 0
bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/service/IPileMachineInfoService.java

@@ -65,6 +65,8 @@ public interface IPileMachineInfoService {
      */
     int deletePileMachineInfoById(Long id);
 
+    List<PileMachineInfo> qryUnitMachine(Long consUnitId);
+
     List<ConstUnitNode> qryMachineAssignedUnit(String machineId);
 
     List<ConsPileHoleInfoVO> machineUnitPileHole(MachineBiz machineBiz);

+ 21 - 0
bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/service/ISysCustConfigService.java

@@ -0,0 +1,21 @@
+package com.huashe.park.core.service;
+
+import com.huashe.park.domain.entity.CustSysConfig;
+
+/**
+ * 字典 业务层
+ * 
+ * @author ruoyi
+ */
+public interface ISysCustConfigService {
+
+    public int updateConfig(CustSysConfig config);
+
+    String selectConfigByKey(String configKey);
+
+    CustSysConfig selectConfigObjByKey(String configKey);
+
+    public CustSysConfig selectConfigById(Long configId);
+
+    public boolean checkConfigKeyUnique(CustSysConfig config);
+}

+ 175 - 4
bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/service/impl/ConsUnitInfoServiceImpl.java

@@ -1,29 +1,64 @@
 package com.huashe.park.core.service.impl;
 
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
+import java.util.Objects;
 import java.util.stream.Collectors;
 
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletResponse;
+
 import org.apache.commons.lang3.ObjectUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
 
+import com.alibaba.fastjson2.JSONArray;
 import com.huashe.common.exception.ServiceException;
 import com.huashe.park.common.EnhancedIDGenerator;
+import com.huashe.park.common.consts.enums.ConsStatus;
+import com.huashe.park.common.excel.CsvAlias;
 import com.huashe.park.common.i18n.MessageUtils;
 import com.huashe.park.core.mapper.ConsUnitInfoMapper;
 import com.huashe.park.core.service.IConsPileHoleInfoService;
 import com.huashe.park.core.service.IConsUnitInfoService;
 import com.huashe.park.core.service.IConsUnitMachineRelService;
+import com.huashe.park.core.service.IMachineProcessResultService;
+import com.huashe.park.core.service.IPileMachineInfoService;
+import com.huashe.park.core.service.IProjectInfoService;
+import com.huashe.park.core.service.ISysCustConfigService;
+import com.huashe.park.domain.dto.cons.CADJson;
 import com.huashe.park.domain.dto.cons.ConsUnitMachine;
+import com.huashe.park.domain.dto.cons.ResultCADCsv;
 import com.huashe.park.domain.entity.ConsPileHoleInfo;
 import com.huashe.park.domain.entity.ConsUnitInfo;
 import com.huashe.park.domain.entity.ConsUnitMachineRel;
+import com.huashe.park.domain.entity.CustSysConfig;
+import com.huashe.park.domain.entity.PileMachineInfo;
+import com.huashe.park.domain.entity.ProjectInfo;
+import com.huashe.park.infrastructure.cfg.forest.CADForestCfg;
 import com.huashe.park.infrastructure.excel.ExcelHandle;
 import com.ruoyi.common.config.RuoYiConfig;
+import com.ruoyi.common.utils.file.FileUtils;
+
+import cn.hutool.core.collection.ListUtil;
+import cn.hutool.core.io.FileUtil;
+import cn.hutool.core.text.csv.CsvUtil;
+import cn.hutool.core.text.csv.CsvWriteConfig;
+import cn.hutool.core.text.csv.CsvWriter;
+import cn.hutool.core.util.CharsetUtil;
+import cn.hutool.core.util.ReflectUtil;
+import cn.hutool.http.HttpRequest;
+import lombok.extern.slf4j.Slf4j;
 
 /**
  * 施工单元Service业务层处理
@@ -32,6 +67,7 @@ import com.ruoyi.common.config.RuoYiConfig;
  * @date 2025-02-14
  */
 @Service
+@Slf4j
 public class ConsUnitInfoServiceImpl implements IConsUnitInfoService {
 
     @Autowired
@@ -41,6 +77,12 @@ public class ConsUnitInfoServiceImpl implements IConsUnitInfoService {
     private IConsUnitMachineRelService consUnitMachineRelService;
 
     @Autowired
+    private IPileMachineInfoService pileMachineInfoService;
+
+    @Autowired
+    private IMachineProcessResultService machineProcessResultService;
+
+    @Autowired
     private IConsPileHoleInfoService pileHoleInfoService;
 
     @Autowired
@@ -51,6 +93,15 @@ public class ConsUnitInfoServiceImpl implements IConsUnitInfoService {
     @Autowired
     private EnhancedIDGenerator byte8Id;
 
+    @Autowired
+    private ISysCustConfigService sysCustConfigService;
+
+    @Autowired
+    private CADForestCfg cadForestCfg;
+
+    @Autowired
+    private IProjectInfoService projectInfoService;
+
     /**
      * 查询施工单元
      * 
@@ -170,14 +221,82 @@ public class ConsUnitInfoServiceImpl implements IConsUnitInfoService {
         int lastIndex = RuoYiConfig.getUploadPath().lastIndexOf("/");
         String filePath = consUnitHole.getFileId().replaceFirst(PROFILE,
             RuoYiConfig.getUploadPath().substring(0, lastIndex));
+        consUnitHole.setFileId(filePath);
         consUnitInfoMapper.updateConsUnitInfo(consUnitHole);
+        // filePath 读取成 File
+        File file = new File(filePath);
+
+        CustSysConfig custSysConfig = sysCustConfigService.selectConfigObjByKey(cadForestCfg.getCadBizParam());
+        HttpRequest form = HttpRequest.post(cadForestCfg.getCadServer() + "/upload").form("dwg_file", file)
+            .form("param", custSysConfig.getCfgJson());
+        log.info(">>>>>>>>>>>>{}", form.toString());
+        String json = form.execute().body();
+        List<CADJson> cadJsons = JSONArray.parseArray(json, CADJson.class);
         pileHoleInfoService.deleteConsPileHoleInfoByConsUnitId(consUnitHole.getId());
-        excelHandle.importExcel(filePath, ConsPileHoleInfo.class, (data) -> {
-            data.forEach((d) -> {
-                d.setConsUnitId(consUnitHole.getId());
+        List<ConsPileHoleInfo> consPileHoleInfo = new ArrayList<>(cadJsons.size());
+        cadJsons.stream().filter(Objects::nonNull).forEach(item -> {
+            consPileHoleInfo.add(new ConsPileHoleInfo() {
+                {
+                    setConsUnitId(consUnitHole.getId());
+                    setDeltaX(item.getCoordX());
+                    setDeltaY(item.getCoordY());
+                    setLng(item.getEarthCoordX());
+                    setLat(item.getEarthCoordY());
+                    setHoleNum(item.getPileNumber());
+                    setConsStatus(ConsStatus.CONS_STATUS_01.getCode());
+                    setDesDept(40L);
+                }
             });
-            pileHoleInfoService.importConsPileHole(data);
         });
+        // 将 cadJsons,分拆成 100个 List<ConsPileHoleInfo>,批量插入
+        List<List<ConsPileHoleInfo>> data = ListUtil.partition(consPileHoleInfo, 100);
+        for (List<ConsPileHoleInfo> datum : data) {
+            pileHoleInfoService.importConsPileHole(datum);
+        }
+    }
+
+    @Override
+    public void exportConsUnitHole(ConsUnitInfo consUnitHole, HttpServletResponse response) {
+        ConsUnitInfo consUnitInfo = consUnitInfoMapper.selectConsUnitInfoById(consUnitHole.getId());
+        // String filePath = consUnitHole.getFileId().replaceFirst(PROFILE,
+        // RuoYiConfig.getUploadPath().substring(0, lastIndex));
+        // consUnitHole.setFileId(filePath);
+        // consUnitInfoMapper.updateConsUnitInfo(consUnitHole);
+        // filePath 读取成 File
+        File file = new File(consUnitInfo.getFileId());
+        File csvFile = new File(
+            "E:\\opt\\project\\ruoyi\\ruoyi-backend\\upload-file-path\\upload\\2025\\03\\10\\1.csv");
+        response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
+        InputStream dwgFile = HttpRequest.post(cadForestCfg.getCadServer() + "/download").form("dwg_file", file)
+            .form("csv_file", csvFile).execute().bodyStream();
+        // 创建一个BufferedInputStream来缓冲输入流,提高读取效率
+        BufferedInputStream bis = new BufferedInputStream(dwgFile);
+        try {
+
+            FileUtils.setAttachmentResponseHeader(response, file.getName());
+            ServletOutputStream outputStream = response.getOutputStream();
+            byte[] buffer = new byte[1024]; // 定义一个缓冲区
+            int bytesRead;
+
+            // 读取数据并写入到response的输出流中
+            while ((bytesRead = bis.read(buffer)) != -1) {
+                outputStream.write(buffer, 0, bytesRead);
+            }
+            // 刷新并关闭流
+            outputStream.flush();
+        }
+        catch (IOException e) {
+            log.error("download input stream: {}", e.getMessage());
+        }
+        finally {
+            try {
+                // 确保关闭输入流
+                bis.close();
+            }
+            catch (IOException e) {
+                log.error("Error closing input stream: {}", e.getMessage());
+            }
+        }
     }
 
     @Override
@@ -217,4 +336,56 @@ public class ConsUnitInfoServiceImpl implements IConsUnitInfoService {
             consUnitMachineRelService.insertConsUnitMachineRelList(consUnitMachineRel);
         }
     }
+
+    private void generatePileHoleFile(ConsUnitInfo consUnitInfo) {
+        List<ProjectInfo> projectInfos = projectInfoService.selectProjectInfoList(new ProjectInfo());
+
+        ProjectInfo projectInfo = projectInfos.get(0);
+        CsvWriteConfig csvWriteConfig = new CsvWriteConfig();
+        Field[] fields = ReflectUtil.getFields(ConsUnitInfo.class);
+        for (Field field : fields) {
+            CsvAlias annotation = field.getAnnotation(CsvAlias.class);
+            if (annotation != null) {
+                csvWriteConfig.addHeaderAlias(field.getName(), annotation.alias());
+            }
+        }
+        CsvWriter writer = CsvUtil.getWriter(FileUtil.file("e:/testWrite.csv"), CharsetUtil.CHARSET_UTF_8, true,
+            csvWriteConfig);
+        List<String[]> header = new ArrayList<>();
+        // 按行写出
+        header.add(new String[] {
+            "Project Name :", projectInfo.getName()
+        });
+
+        List<PileMachineInfo> pileMachineInfos = pileMachineInfoService.qryUnitMachine(consUnitInfo.getId());
+        if (!CollectionUtils.isEmpty(pileMachineInfos)) {
+            List<String> machineNum = pileMachineInfos.stream().map(PileMachineInfo::getMachineNum)
+                .collect(Collectors.toList());
+            header.add(new String[] {
+                "Machine Number :", String.join("|", machineNum)
+            });
+            List<String> equipment = pileMachineInfos.stream().map(PileMachineInfo::getEquipment)
+                .collect(Collectors.toList());
+            header.add(new String[] {
+                "Equipment Number :", String.join("|", equipment)
+            });
+        }
+        else {
+            header.add(new String[] {
+                "Machine Number :", ""
+            });
+            header.add(new String[] {
+                "Equipment Number :", ""
+            });
+        }
+        header.add(new String[] {
+            "Cluster Number :", ""
+        });
+        header.add(new String[] {
+            "Operator Name :", ""
+        });
+        writer.write(header);
+        List<ResultCADCsv> resultCADCsvs = machineProcessResultService.qeyConsUnitResult(consUnitInfo.getId());
+        writer.writeBeans(resultCADCsvs);
+    }
 }

+ 30 - 2
bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/service/impl/MachineProcessResultServiceImpl.java

@@ -1,12 +1,19 @@
 package com.huashe.park.core.service.impl;
 
+import java.util.ArrayList;
 import java.util.List;
 
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.huashe.park.common.DateTimeUtil;
 import com.huashe.park.core.mapper.MachineProcessResultMapper;
 import com.huashe.park.core.service.IMachineProcessResultService;
+import com.huashe.park.domain.dto.cons.ConsUnitResult;
+import com.huashe.park.domain.dto.cons.ResultCADCsv;
 import com.huashe.park.domain.entity.MachineProcessResult;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
+
+import cn.hutool.core.bean.BeanUtil;
 
 /**
  * 桩机施工结果数据(2025-02-26版协议)Service业务层处理
@@ -84,4 +91,25 @@ public class MachineProcessResultServiceImpl implements IMachineProcessResultSer
     public int deleteMachineProcessResultById(Long id) {
         return machineProcessResultMapper.deleteMachineProcessResultById(id);
     }
+
+    @Override
+    public List<ResultCADCsv> qeyConsUnitResult(Long consUnitId) {
+        List<ConsUnitResult> consUnitResults = machineProcessResultMapper.qeyConsUnitResult(consUnitId);
+        List<ResultCADCsv> resultCADCsvs = new ArrayList<>(consUnitResults.size());
+        ResultCADCsv resultCADCsv;
+        for (ConsUnitResult consUnitResult : consUnitResults) {
+            resultCADCsv = new ResultCADCsv();
+            BeanUtil.copyProperties(consUnitResult, resultCADCsv);
+            resultCADCsv.setId(consUnitResult.getId());
+            resultCADCsv.setPileNum(consUnitResult.getHoleNum());
+            resultCADCsv.setDt(
+                DateTimeUtil.getDateFromMills(consUnitResult.getDataTime(), DateTimeUtil.DateFormatter.yyyy_MM_dd));
+            resultCADCsv.setStartingTime(
+                DateTimeUtil.getDateFromMills(consUnitResult.getDataTime(), DateTimeUtil.DateFormatter.HHmmss));
+            resultCADCsv.setDuration(consUnitResult.getEndTime() - consUnitResult.getStartTime());
+            // TODO: 评价结果转换
+            resultCADCsvs.add(resultCADCsv);
+        }
+        return resultCADCsvs;
+    }
 }

+ 5 - 0
bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/service/impl/PileMachineInfoServiceImpl.java

@@ -144,6 +144,11 @@ public class PileMachineInfoServiceImpl implements IPileMachineInfoService {
     }
 
     @Override
+    public List<PileMachineInfo> qryUnitMachine(Long consUnitId) {
+        return pileMachineInfoMapper.qryUnitMachine(consUnitId);
+    }
+
+    @Override
     public List<ConstUnitNode> qryMachineAssignedUnit(String machineId) {
         PileMachineInfo pileMachineInfo = selectPileMachineInfoByByteId(machineId);
         List<ConsUnitInfo> consUnitInfos = consUnitInfoService.machineAssignedUnit(pileMachineInfo.getId());

+ 80 - 0
bd-park/park-backend/park-core/src/main/java/com/huashe/park/core/service/impl/SysCustConfigServiceImpl.java

@@ -0,0 +1,80 @@
+package com.huashe.park.core.service.impl;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import com.huashe.common.constant.CacheConstants;
+import com.huashe.common.text.Convert;
+import com.huashe.common.utils.StringUtils;
+import com.huashe.park.core.mapper.SysCustConfigMapper;
+import com.huashe.park.core.redis.RedisProxy;
+import com.huashe.park.core.service.ISysCustConfigService;
+import com.huashe.park.domain.entity.CustSysConfig;
+
+/**
+ * 字典 业务层处理
+ * 
+ * @author ruoyi
+ */
+@Service
+public class SysCustConfigServiceImpl implements ISysCustConfigService {
+    @Autowired
+    private SysCustConfigMapper sysCustConfigMapper;
+
+    @Autowired
+    private RedisProxy redisProxy;
+
+    @Override
+    public int updateConfig(CustSysConfig config) {
+        CustSysConfig temp = sysCustConfigMapper.selectConfigById(config.getConfigId());
+        if (!StringUtils.equals(temp.getConfigKey(), config.getConfigKey())) {
+            redisProxy.deleteObject(getCacheKey(temp.getConfigKey()));
+        }
+
+        int row = sysCustConfigMapper.updateConfig(config);
+        if (row > 0) {
+            redisProxy.setCacheObject(getCacheKey(config.getConfigKey()), config.getConfigValue());
+        }
+        return row;
+    }
+
+    @Override
+    public String selectConfigByKey(String configKey) {
+        String configValue = Convert.toStr(redisProxy.getCacheObject(getCacheKey(configKey)));
+        if (StringUtils.isNotEmpty(configValue)) {
+            return configValue;
+        }
+        CustSysConfig config = new CustSysConfig();
+        config.setConfigKey(configKey);
+        CustSysConfig retConfig = sysCustConfigMapper.selectConfig(config);
+        if (StringUtils.isNotNull(retConfig)) {
+            redisProxy.setCacheObject(getCacheKey(configKey), retConfig.getConfigValue());
+            return retConfig.getConfigValue();
+        }
+        return StringUtils.EMPTY;
+    }
+
+    @Override
+    public CustSysConfig selectConfigObjByKey(String configKey) {
+
+        CustSysConfig config = new CustSysConfig();
+        config.setConfigKey(configKey);
+        return sysCustConfigMapper.selectConfig(config);
+    }
+
+    @Override
+    public CustSysConfig selectConfigById(Long configId) {
+        return sysCustConfigMapper.selectConfigById(configId);
+    }
+
+    @Override
+    public boolean checkConfigKeyUnique(CustSysConfig config) {
+        Long configId = StringUtils.isNull(config.getConfigId()) ? -1L : config.getConfigId();
+        CustSysConfig info = sysCustConfigMapper.checkConfigKeyUnique(config.getConfigKey());
+        return !StringUtils.isNotNull(info) || info.getConfigId() == configId;
+    }
+
+    private String getCacheKey(String configKey) {
+        return CacheConstants.SYS_CONFIG_KEY + configKey;
+    }
+}

+ 4 - 3
bd-park/park-backend/park-core/src/main/resources/mapper/cons/ConsPileHoleInfoMapper.xml

@@ -164,8 +164,9 @@
         create_time
         )
         values
-        <foreach collection="list" item="item" open="(" close=")" separator=",">
-            #{item.byteId},
+        <foreach collection="list" item="item" separator=",">
+            (
+             #{item.byteId},
             #{item.holeKey},
             #{item.holeNum},
             #{item.deltaX},
@@ -179,7 +180,7 @@
             #{item.diameter},
             #{item.consUnitId},
             now(),
-            now()
+            now())
         </foreach>
         on duplicate key update
         hole_num= values(hole_num),

+ 11 - 0
bd-park/park-backend/park-core/src/main/resources/mapper/cons/MachineProcessResultMapper.xml

@@ -443,4 +443,15 @@
             #{id}
         </foreach>
     </delete>
+    <select id="qeyConsUnitResult" parameterType="Long" resultType="com.huashe.park.domain.dto.cons.ConsUnitResult">
+        select cmpr.*,
+               cphir.forward_tilt_angle,
+               cphir.tilt_angle,
+               cphir.hole_num
+        from cons_machine_process_result cmpr
+                 inner join cons_pile_hole_index_realtime cphir on
+            cmpr.pile_id = cphir.hole_byte_key
+        where cphir.cons_unit_id =
+    </select>
+
 </mapper>

+ 14 - 3
bd-park/park-backend/park-core/src/main/resources/mapper/cons/PileHoleIndexRealtimeMapper.xml

@@ -24,6 +24,8 @@
         <result property="realY" column="real_y"/>
         <result property="realLat" column="real_lat"/>
         <result property="realLng" column="real_lng"/>
+        <result property="consUnitId" column="cons_unit_id"/>
+        <result property="holeNum" column="hole_num"/>
         <result property="updateTime" column="update_time"/>
         <result property="createTime" column="create_time"/>
         <result property="createBy" column="create_by"/>
@@ -33,6 +35,7 @@
     <sql id="selectPileHoleIndexRealtimeVo">
         select id,
                hole_id,
+               hole_num,
                hole_byte_key,
                machine_id,
                machine_byte_key,
@@ -53,7 +56,8 @@
                update_time,
                create_time,
                create_by,
-               update_by
+               update_by,
+               cons_unit_id
         from cons_pile_hole_index_realtime
     </sql>
 
@@ -105,6 +109,8 @@
             <if test="realY != null">real_y,</if>
             <if test="realLat != null">real_lat,</if>
             <if test="realLng != null">real_lng,</if>
+            <if test="consUnitId != null">cons_unit_id,</if>
+            <if test="holeNum != null">hole_num,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="createTime != null">create_time,</if>
             <if test="createBy != null">create_by,</if>
@@ -129,6 +135,8 @@
             <if test="realY != null">#{realY},</if>
             <if test="realLat != null">#{realLat},</if>
             <if test="realLng != null">#{realLng},</if>
+            <if test="consUnitId != null">#{consUnitId},</if>
+            <if test="holeNum != null">#{holeNum},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="createBy != null">#{createBy},</if>
@@ -157,6 +165,8 @@
             <if test="realY != null">real_y = #{realY},</if>
             <if test="realLat != null">real_lat = #{realLat},</if>
             <if test="realLng != null">real_lng = #{realLng},</if>
+            <if test="consUnitId != null">cons_unit_id = #{consUnitId},</if>
+            <if test="holeNum != null">hole_num = #{holeNum},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
@@ -182,6 +192,8 @@
             <if test="realY != null">real_y = #{realY},</if>
             <if test="realLat != null">real_lat = #{realLat},</if>
             <if test="realLng != null">real_lng = #{realLng},</if>
+            <if test="consUnitId != null">cons_unit_id = #{consUnitId},</if>
+            <if test="holeNum != null">hole_num = #{holeNum},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
@@ -214,8 +226,7 @@
     <select id="selectMachineLatestIndex" resultMap="PileHoleIndexRealtimeResult">
         SELECT *
         FROM cons_pile_hole_index_realtime
-        WHERE id = (SELECT MAX(id) FROM cons_pile_hole_index_realtime where machine_id = #{machineId})
-        limit 1
+        WHERE id = (SELECT MAX(id) FROM cons_pile_hole_index_realtime where machine_id = #{machineId}) limit 1
     </select>
 
 </mapper>

+ 9 - 1
bd-park/park-backend/park-core/src/main/resources/mapper/cons/PileMachineInfoMapper.xml

@@ -165,7 +165,15 @@
                sum(case when status = '01' then 1 else 0 end) as offline
         from cons_pile_machine_info
     </select>
-
+    <select id="qryUnitMachine" resultType="PileMachineInfo" parameterType="Long">
+        select cpmi.*
+        from cons_cons_unit_info unit
+                 inner join cons_cons_unit_machine_rel rel on
+            unit.id = rel.cons_unit_id
+                 inner join cons_pile_machine_info cpmi on
+            cpmi.id = rel.machine_id
+        where unit.id = #{consUnitId}
+    </select>
     <select id="selectMachineByConsUnitId" resultType="PileMachineInfo">
         select cpmi.*
         from cons_pile_machine_info cpmi

+ 47 - 0
bd-park/park-backend/park-core/src/main/resources/mapper/sys/SysCustConfigMapper.xml

@@ -0,0 +1,47 @@
+<?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.huashe.park.core.mapper.SysCustConfigMapper">
+
+    <sql id="sqlwhereSearch">
+        <where>
+            <if test="configId !=null">
+                and config_id = #{configId}
+            </if>
+            <if test="configKey !=null and configKey != ''">
+                and config_key = #{configKey}
+            </if>
+        </where>
+    </sql>
+
+    <select id="selectConfig" parameterType="CustSysConfig" resultType="CustSysConfig">
+        select *
+        from sys_config
+        <include refid="sqlwhereSearch"/>
+    </select>
+    <update id="updateConfig" parameterType="CustSysConfig">
+        update sys_config
+        <set>
+            <if test="configName != null and configName != ''">config_name = #{configName},</if>
+            <if test="configKey != null and configKey != ''">config_key = #{configKey},</if>
+            <if test="configValue != null and configValue != ''">config_value = #{configValue},</if>
+            <if test="configType != null and configType != ''">config_type = #{configType},</if>
+            <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="cfgJson != null">cfg_json = #{cfgJson},</if>
+            update_time = sysdate()
+        </set>
+        where config_id = #{configId}
+    </update>
+
+    <select id="selectConfigById" parameterType="Long" resultType="CustSysConfig">
+        select *
+        from sys_config where config_id = #{configId}
+    </select>
+
+    <select id="checkConfigKeyUnique" parameterType="String" resultType="CustSysConfig">
+        select * from sys_config
+        where config_key = #{configKey} limit 1
+    </select>
+</mapper> 

+ 4 - 0
bd-park/park-backend/park-domain/pom.xml

@@ -44,6 +44,10 @@
             <version>1.1.0</version>
             <scope>compile</scope>
         </dependency>
+        <dependency>
+            <groupId>com.huashe.park</groupId>
+            <artifactId>park-common</artifactId>
+        </dependency>
 
     </dependencies>
 

+ 24 - 0
bd-park/park-backend/park-domain/src/main/java/com/huashe/park/domain/dto/cons/CADJson.java

@@ -0,0 +1,24 @@
+package com.huashe.park.domain.dto.cons;
+
+import com.alibaba.fastjson2.annotation.JSONField;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+public class CADJson {
+    @JSONField(name = "CoordX")
+    private Double coordX;
+
+    @JSONField(name = "CoordY")
+    private Double coordY;
+
+    @JSONField(name = "EarthCoordX")
+    private Double earthCoordX;
+
+    @JSONField(name = "EarthCoordY")
+    private Double earthCoordY;
+
+    @JSONField(name = "PileNumber")
+    private String pileNumber;
+}

+ 35 - 0
bd-park/park-backend/park-domain/src/main/java/com/huashe/park/domain/dto/cons/ConsUnitResult.java

@@ -0,0 +1,35 @@
+package com.huashe.park.domain.dto.cons;
+
+import com.huashe.park.domain.entity.MachineProcessResult;
+
+public class ConsUnitResult extends MachineProcessResult {
+    private Double forwardTiltAngle;
+
+    private Double tiltAngle;
+
+    private String holeNum;
+
+    public Double getForwardTiltAngle() {
+        return forwardTiltAngle;
+    }
+
+    public void setForwardTiltAngle(Double forwardTiltAngle) {
+        this.forwardTiltAngle = forwardTiltAngle;
+    }
+
+    public Double getTiltAngle() {
+        return tiltAngle;
+    }
+
+    public void setTiltAngle(Double tiltAngle) {
+        this.tiltAngle = tiltAngle;
+    }
+
+    public String getHoleNum() {
+        return holeNum;
+    }
+
+    public void setHoleNum(String holeNum) {
+        this.holeNum = holeNum;
+    }
+}

+ 71 - 0
bd-park/park-backend/park-domain/src/main/java/com/huashe/park/domain/dto/cons/ResultCADCsv.java

@@ -0,0 +1,71 @@
+package com.huashe.park.domain.dto.cons;
+
+import com.huashe.park.common.excel.CsvAlias;
+
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+public class ResultCADCsv {
+    private static final long serialVersionUID = 1L;
+
+    /** 自增主键 */
+    @CsvAlias(alias = "Drain nr.")
+    private Long id;
+
+    @CsvAlias(alias = "Hole Number")
+    private String pileNum;
+
+    @CsvAlias(alias = "Date")
+    private String dt;
+
+    @CsvAlias(alias = "Starting Time")
+    private String startingTime;
+
+    @CsvAlias(alias = "Duration")
+    private Long duration;
+
+    @CsvAlias(alias = "X-coordinate")
+    private Double designX;
+
+    @CsvAlias(alias = "Y-coordinate")
+    private Double designY;
+
+    @CsvAlias(alias = "Height")
+    private Double startHeight;
+
+    /** 有效下行深度(米) */
+    @CsvAlias(alias = "Max. Depth")
+    private Double effectiveDown;
+
+    @CsvAlias(alias = "Pull Value")
+    private Double pullValue;
+
+    @CsvAlias(alias = "Actual. Depth")
+    private Double actualDepth;
+
+    @CsvAlias(alias = "Tilt X")
+    private Double forwardTiltAngle;
+
+    @CsvAlias(alias = "Tilt Y")
+    private Double tiltAngle;
+
+    @CsvAlias(alias = "Max. Press")
+    private Double avgSprayPressure;
+
+    @CsvAlias(alias = "Ending Press")
+    private Double endingPress;
+
+    @CsvAlias(alias = "Intrusion Vel.[m/s]")
+    private Double avgSpeed;
+
+    @CsvAlias(alias = "Pullout Vel.[m/s]")
+    private Double avgUpSpeed;
+
+    @CsvAlias(alias = "Result")
+    private String evaluation;
+
+    @CsvAlias(alias = "Design Depth")
+    private Double designDepth = 40D;
+}

+ 2 - 0
bd-park/park-backend/park-domain/src/main/java/com/huashe/park/domain/entity/ConsUnitInfo.java

@@ -1,5 +1,6 @@
 package com.huashe.park.domain.entity;
 
+import com.huashe.park.common.excel.CsvAlias;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
@@ -50,6 +51,7 @@ public class ConsUnitInfo extends BaseEntity {
 
     private Long projectId;
 
+    @CsvAlias(alias = "ssdd")
     private String fileId;
 
     public String getByteId() {

+ 99 - 0
bd-park/park-backend/park-domain/src/main/java/com/huashe/park/domain/entity/CustSysConfig.java

@@ -0,0 +1,99 @@
+package com.huashe.park.domain.entity;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.Size;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import com.huashe.common.annotation.Excel;
+import com.huashe.common.domain.BaseEntity;
+
+import lombok.Getter;
+
+public class CustSysConfig extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /** 参数主键 */
+    @Excel(name = "参数主键", cellType = Excel.ColumnType.NUMERIC)
+    private Long configId;
+
+    /** 参数名称 */
+    @Excel(name = "参数名称")
+    private String configName;
+
+    /** 参数键名 */
+    @Excel(name = "参数键名")
+    private String configKey;
+
+    /** 参数键值 */
+    @Excel(name = "参数键值")
+    private String configValue;
+
+    /** 系统内置(Y是 N否) */
+    @Excel(name = "系统内置", readConverterExp = "Y=是,N=否")
+    private String configType;
+
+
+    @Getter
+    private String cfgJson;
+
+    public void setCfgJson(String cfgJson) {
+        this.cfgJson = cfgJson;
+    }
+
+    public Long getConfigId() {
+        return configId;
+    }
+
+    public void setConfigId(Long configId) {
+        this.configId = configId;
+    }
+
+    @NotBlank(message = "参数名称不能为空")
+    @Size(min = 0, max = 100, message = "参数名称不能超过100个字符")
+    public String getConfigName() {
+        return configName;
+    }
+
+    public void setConfigName(String configName) {
+        this.configName = configName;
+    }
+
+    @NotBlank(message = "参数键名长度不能为空")
+    @Size(min = 0, max = 100, message = "参数键名长度不能超过100个字符")
+    public String getConfigKey() {
+        return configKey;
+    }
+
+    public void setConfigKey(String configKey) {
+        this.configKey = configKey;
+    }
+
+    @NotBlank(message = "参数键值不能为空")
+    @Size(min = 0, max = 500, message = "参数键值长度不能超过500个字符")
+    public String getConfigValue() {
+        return configValue;
+    }
+
+    public void setConfigValue(String configValue) {
+        this.configValue = configValue;
+    }
+
+    public String getConfigType() {
+        return configType;
+    }
+
+    public void setConfigType(String configType) {
+        this.configType = configType;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("configId", getConfigId())
+            .append("configName", getConfigName()).append("configKey", getConfigKey())
+            .append("configValue", getConfigValue()).append("configType", getConfigType())
+            .append("createBy", getCreateBy()).append("createTime", getCreateTime()).append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime()).append("remark", getRemark()).toString();
+    }
+}

+ 4 - 0
bd-park/park-backend/park-domain/src/main/java/com/huashe/park/domain/entity/PileHoleIndexRealtime.java

@@ -32,6 +32,10 @@ public class PileHoleIndexRealtime extends BaseEntity {
     @Excel(name = "桩点id")
     private Long holeId;
 
+    private String holeNum;
+
+    private Long consUnitId;
+
     /** 桩点编号 */
     @Excel(name = "桩点编号")
     private String holeByteKey;

+ 15 - 0
bd-park/park-backend/park-infrastructure/src/main/java/com/huashe/park/infrastructure/cfg/forest/CADForestCfg.java

@@ -0,0 +1,15 @@
+package com.huashe.park.infrastructure.cfg.forest;
+
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
+
+import lombok.Data;
+
+@Configuration
+@ConfigurationProperties(prefix = "forest.custom.cad")
+@Data
+public class CADForestCfg {
+    private String cadBizParam;
+
+    private String cadServer;
+}

+ 8 - 0
bd-park/park-backend/park-infrastructure/src/main/java/com/huashe/park/infrastructure/cfg/forest/CustomForestCfg.java

@@ -25,6 +25,9 @@ public class CustomForestCfg {
     @Autowired
     private UWBForestCfg uwbForestCfg;
 
+    @Autowired
+    private CADForestCfg cadForestCfg;
+
     @BindingVar("uwbBaseUrl")
     public String getBaseUrl(ForestMethod method) {
         return uwbForestCfg.getUwbHost();
@@ -35,4 +38,9 @@ public class CustomForestCfg {
         return holiday;
     }
 
+    @BindingVar("cadBaseUrl")
+    public String getCadBaseUrl(ForestMethod method) {
+        return cadForestCfg.getCadServer();
+    }
+
 }

+ 20 - 0
bd-park/park-backend/park-infrastructure/src/main/java/com/huashe/park/infrastructure/uwb/CADService.java

@@ -0,0 +1,20 @@
+package com.huashe.park.infrastructure.uwb;
+
+import java.io.File;
+import java.util.Map;
+
+import com.dtflys.forest.annotation.BaseRequest;
+import com.dtflys.forest.annotation.DataFile;
+import com.dtflys.forest.annotation.Post;
+import com.dtflys.forest.callback.OnProgress;
+import com.dtflys.forest.extensions.DownloadFile;
+
+@BaseRequest(baseURL = "{cadBaseUrl}")
+public interface CADService {
+    @Post(url = "/download")
+    @DownloadFile(dir = "${0}", filename = "${1}")
+    File downloadFile(String dir, String filename, @DataFile("file") File file, OnProgress onProgress);
+
+    @Post(url = "/upload")
+    Map analysisCad(@DataFile("dwg_file") File file);
+}

+ 14 - 14
common-application/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/MimeTypeUtils.java

@@ -2,11 +2,10 @@ package com.ruoyi.common.utils.file;
 
 /**
  * 媒体类型工具类
- * 
+ *
  * @author ruoyi
  */
-public class MimeTypeUtils
-{
+public class MimeTypeUtils {
     public static final String IMAGE_PNG = "image/png";
 
     public static final String IMAGE_JPG = "image/jpg";
@@ -16,15 +15,15 @@ public class MimeTypeUtils
     public static final String IMAGE_BMP = "image/bmp";
 
     public static final String IMAGE_GIF = "image/gif";
-    
-    public static final String[] IMAGE_EXTENSION = { "bmp", "gif", "jpg", "jpeg", "png" };
 
-    public static final String[] FLASH_EXTENSION = { "swf", "flv" };
+    public static final String[] IMAGE_EXTENSION = {"bmp", "gif", "jpg", "jpeg", "png"};
 
-    public static final String[] MEDIA_EXTENSION = { "swf", "flv", "mp3", "wav", "wma", "wmv", "mid", "avi", "mpg",
-            "asf", "rm", "rmvb" };
+    public static final String[] FLASH_EXTENSION = {"swf", "flv"};
 
-    public static final String[] VIDEO_EXTENSION = { "mp4", "avi", "rmvb" };
+    public static final String[] MEDIA_EXTENSION = {"swf", "flv", "mp3", "wav", "wma", "wmv", "mid", "avi", "mpg",
+            "asf", "rm", "rmvb"};
+
+    public static final String[] VIDEO_EXTENSION = {"mp4", "avi", "rmvb"};
 
     public static final String[] DEFAULT_ALLOWED_EXTENSION = {
             // 图片
@@ -36,12 +35,13 @@ public class MimeTypeUtils
             // 视频格式
             "mp4", "avi", "rmvb",
             // pdf
-            "pdf" };
+            "pdf",
+            // CAD
+            "dwg"
+    };
 
-    public static String getExtension(String prefix)
-    {
-        switch (prefix)
-        {
+    public static String getExtension(String prefix) {
+        switch (prefix) {
             case IMAGE_PNG:
                 return "png";
             case IMAGE_JPG: