Kaynağa Gözat

删除iot物联网相关代码

donglang 4 ay önce
ebeveyn
işleme
a7c315cfbe
80 değiştirilmiş dosya ile 6 ekleme ve 4897 silme
  1. 0 67
      iot-platform-manager/src/main/java/com/platform/api/config/VehicleDataQueue.java
  2. 0 66
      iot-platform-manager/src/main/java/com/platform/api/controller/TransferController.java
  3. 2 2
      iot-platform-manager/src/main/java/com/platform/api/controller/WeighbridgeController.java
  4. 0 206
      iot-platform-manager/src/main/java/com/platform/api/manager/TransferVehicleManage.java
  5. 2 2
      iot-platform-manager/src/main/java/com/platform/api/manager/WeighbridgeRecordManage.java
  6. 0 1
      iot-platform-manager/src/main/java/com/platform/api/request/LicensePlateValidateRequest.java
  7. 0 53
      iot-platform-manager/src/main/java/com/platform/api/request/VehicleDataRequest.java
  8. 0 110
      iot-platform-manager/src/main/java/com/platform/api/request/VehicleDataSaveRequest.java
  9. 0 90
      iot-platform-manager/src/main/java/com/platform/api/request/VehicleDataVO.java
  10. 1 1
      iot-platform-manager/src/main/java/com/platform/api/response/LicensePlateValidateResponse.java
  11. 0 120
      iot-platform-manager/src/main/java/com/platform/api/response/VehicleDataResp.java
  12. 0 12
      iot-platform-manager/src/main/java/com/platform/constant/demo.java
  13. 0 96
      iot-platform-manager/src/main/java/com/platform/controller/IotDeviceController.java
  14. 0 57
      iot-platform-manager/src/main/java/com/platform/controller/IotDeviceGroupController.java
  15. 0 76
      iot-platform-manager/src/main/java/com/platform/controller/IotModController.java
  16. 0 67
      iot-platform-manager/src/main/java/com/platform/controller/IotModGroupController.java
  17. 0 31
      iot-platform-manager/src/main/java/com/platform/dto/DeviceExcelTemplateDTO.java
  18. 0 186
      iot-platform-manager/src/main/java/com/platform/entity/IotDevice.java
  19. 0 50
      iot-platform-manager/src/main/java/com/platform/entity/IotDeviceError.java
  20. 0 101
      iot-platform-manager/src/main/java/com/platform/entity/IotDeviceGroup.java
  21. 0 145
      iot-platform-manager/src/main/java/com/platform/entity/IotMod.java
  22. 0 44
      iot-platform-manager/src/main/java/com/platform/entity/IotModError.java
  23. 0 95
      iot-platform-manager/src/main/java/com/platform/entity/IotModGroup.java
  24. 0 80
      iot-platform-manager/src/main/java/com/platform/entity/SaasEquipmentManage.java
  25. 0 56
      iot-platform-manager/src/main/java/com/platform/entity/TimeSeriesDatabaseMapping.java
  26. 1 1
      iot-platform-manager/src/main/java/com/platform/entity/ValidateLicensePlate.java
  27. 0 156
      iot-platform-manager/src/main/java/com/platform/entity/VehicleData.java
  28. 0 96
      iot-platform-manager/src/main/java/com/platform/entity/VehicleTimeSeriesData.java
  29. 0 12
      iot-platform-manager/src/main/java/com/platform/enums/demo.java
  30. 0 86
      iot-platform-manager/src/main/java/com/platform/manage/IotDeviceGroupManage.java
  31. 0 194
      iot-platform-manager/src/main/java/com/platform/manage/IotDeviceManage.java
  32. 0 92
      iot-platform-manager/src/main/java/com/platform/manage/IotModGroupManage.java
  33. 0 147
      iot-platform-manager/src/main/java/com/platform/manage/IotModManage.java
  34. 0 16
      iot-platform-manager/src/main/java/com/platform/mapper/IotDeviceErrorMapper.java
  35. 0 16
      iot-platform-manager/src/main/java/com/platform/mapper/IotDeviceGroupMapper.java
  36. 0 13
      iot-platform-manager/src/main/java/com/platform/mapper/IotDeviceMapper.java
  37. 0 15
      iot-platform-manager/src/main/java/com/platform/mapper/IotModErrorMapper.java
  38. 0 16
      iot-platform-manager/src/main/java/com/platform/mapper/IotModGroupMapper.java
  39. 0 16
      iot-platform-manager/src/main/java/com/platform/mapper/IotModMapper.java
  40. 0 16
      iot-platform-manager/src/main/java/com/platform/mapper/SaasEquipmentManageMapper.java
  41. 0 168
      iot-platform-manager/src/main/java/com/platform/mapper/TaosMapper.java
  42. 0 16
      iot-platform-manager/src/main/java/com/platform/mapper/TimeSeriesDatabaseMappingMapper.java
  43. 0 22
      iot-platform-manager/src/main/java/com/platform/mapper/VehicleDataMapper.java
  44. 0 25
      iot-platform-manager/src/main/java/com/platform/request/device/IotDeviceDetailRequest.java
  45. 0 40
      iot-platform-manager/src/main/java/com/platform/request/device/IotDeviceRequest.java
  46. 0 61
      iot-platform-manager/src/main/java/com/platform/request/device/IotDeviceSaveRequest.java
  47. 0 18
      iot-platform-manager/src/main/java/com/platform/request/deviceGroup/IotDeviceGroupRequest.java
  48. 0 25
      iot-platform-manager/src/main/java/com/platform/request/deviceGroup/IotDeviceGroupSaveRequest.java
  49. 0 24
      iot-platform-manager/src/main/java/com/platform/request/mod/IotModDetailReq.java
  50. 0 44
      iot-platform-manager/src/main/java/com/platform/request/mod/IotModRequest.java
  51. 0 46
      iot-platform-manager/src/main/java/com/platform/request/mod/IotModSaveRequest.java
  52. 0 17
      iot-platform-manager/src/main/java/com/platform/request/modGroup/IotModGroupDetailReq.java
  53. 0 23
      iot-platform-manager/src/main/java/com/platform/request/modGroup/IotModGroupRequest.java
  54. 0 30
      iot-platform-manager/src/main/java/com/platform/request/modGroup/IotModGroupSaveRequest.java
  55. 0 114
      iot-platform-manager/src/main/java/com/platform/response/device/IotDeviceResp.java
  56. 0 55
      iot-platform-manager/src/main/java/com/platform/response/deviceGroup/IotDeviceGroupPageResp.java
  57. 0 90
      iot-platform-manager/src/main/java/com/platform/response/mod/IotModResp.java
  58. 0 64
      iot-platform-manager/src/main/java/com/platform/response/modGroup/IotModGroupPageResp.java
  59. 0 15
      iot-platform-manager/src/main/java/com/platform/service/IotDeviceErrorService.java
  60. 0 54
      iot-platform-manager/src/main/java/com/platform/service/IotDeviceGroupService.java
  61. 0 20
      iot-platform-manager/src/main/java/com/platform/service/IotDeviceService.java
  62. 0 15
      iot-platform-manager/src/main/java/com/platform/service/IotModErrorService.java
  63. 0 22
      iot-platform-manager/src/main/java/com/platform/service/IotModGroupService.java
  64. 0 26
      iot-platform-manager/src/main/java/com/platform/service/IotModService.java
  65. 0 15
      iot-platform-manager/src/main/java/com/platform/service/SaasEquipmentManageService.java
  66. 0 136
      iot-platform-manager/src/main/java/com/platform/service/TaosService.java
  67. 0 15
      iot-platform-manager/src/main/java/com/platform/service/TimeSeriesDatabaseMappingService.java
  68. 0 17
      iot-platform-manager/src/main/java/com/platform/service/VehicleDataService.java
  69. 0 18
      iot-platform-manager/src/main/java/com/platform/service/impl/IotDeviceErrorServiceImpl.java
  70. 0 67
      iot-platform-manager/src/main/java/com/platform/service/impl/IotDeviceGroupServiceImpl.java
  71. 0 40
      iot-platform-manager/src/main/java/com/platform/service/impl/IotDeviceServiceImpl.java
  72. 0 18
      iot-platform-manager/src/main/java/com/platform/service/impl/IotModErrorServiceImpl.java
  73. 0 28
      iot-platform-manager/src/main/java/com/platform/service/impl/IotModGroupServiceImpl.java
  74. 0 27
      iot-platform-manager/src/main/java/com/platform/service/impl/IotModServiceImpl.java
  75. 0 20
      iot-platform-manager/src/main/java/com/platform/service/impl/SaasEquipmentManageServiceImpl.java
  76. 0 143
      iot-platform-manager/src/main/java/com/platform/service/impl/TaosServiceImpl.java
  77. 0 18
      iot-platform-manager/src/main/java/com/platform/service/impl/TimeSeriesDatabaseMappingServiceImpl.java
  78. 0 24
      iot-platform-manager/src/main/java/com/platform/service/impl/VehicleDataServiceImpl.java
  79. 0 347
      iot-platform-manager/src/main/resources/mapper/TaosMapper.xml
  80. 0 224
      sql/2025/11/create_cxf.sql

+ 0 - 67
iot-platform-manager/src/main/java/com/platform/api/config/VehicleDataQueue.java

@@ -1,67 +0,0 @@
-package com.platform.api.config;
-
-
-/**
- * Author: donglang
- * Time: 2025-10-13
- * Des:
- * Version: 1.0
- */
-
-import com.platform.api.request.VehicleDataSaveRequest;
-import org.springframework.stereotype.Component;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Queue;
-import java.util.concurrent.ConcurrentLinkedQueue;
-
-/**
- * 车辆数据缓存队列(线程安全,用于暂存待批量保存的数据)
- */
-@Component
-public class VehicleDataQueue {
-
-    // 暂存单条数据队列
-    private final Queue<VehicleDataSaveRequest> dataQueue = new ConcurrentLinkedQueue<>();
-
-    // 批量阈值(达到10条触发保存)
-    private static final int BATCH_SIZE = 10;
-
-    /**
-     * 添加单条数据到队列
-     */
-    public void add(VehicleDataSaveRequest request) {
-        dataQueue.add(request);
-    }
-
-    /**
-     * 检查是否达到批量阈值,若达到则取出所有数据
-     * @return 待批量保存的数据列表(可能为空)
-     */
-    public List<VehicleDataSaveRequest> takeBatchIfReached() {
-        List<VehicleDataSaveRequest> batchList = new ArrayList<>();
-        // 若队列数据量 >= 10,取出10条(或全部,根据需求)
-        if (dataQueue.size() >= BATCH_SIZE) {
-            for (int i = 0; i < BATCH_SIZE; i++) {
-                VehicleDataSaveRequest request = dataQueue.poll();
-                if (request != null) {
-                    batchList.add(request);
-                }
-            }
-        }
-        return batchList;
-    }
-
-    /**
-     * 取出队列中所有数据
-     */
-    public List<VehicleDataSaveRequest> takeAll() {
-        List<VehicleDataSaveRequest> allData = new ArrayList<>();
-        VehicleDataSaveRequest request;
-        while ((request = dataQueue.poll()) != null) {
-            allData.add(request);
-        }
-        return allData;
-    }
-}

+ 0 - 66
iot-platform-manager/src/main/java/com/platform/api/controller/TransferController.java

@@ -1,66 +0,0 @@
-package com.platform.api.controller;
-
-import ch.qos.logback.classic.Logger;
-import com.platform.api.manager.TransferVehicleManage;
-import com.platform.api.request.VehicleDataRequest;
-import com.platform.api.request.VehicleDataSaveRequest;
-import com.platform.api.response.VehicleDataResp;
-import com.platform.exception.BaseResult;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import jakarta.annotation.Resource;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.util.List;
-
-/**
- * Author: donglang
- * Time: 2025-10-13
- * Des: 开物云4.0对外接口(传输Feign客户端)
- * Version: 1.0
- */
-@Tag(name = "数据传输接口", description = "车辆数据采集和查询相关接口")
-@RestController
-@FeignClient(name = "platform-transfer-api", url = "${platform.transfer.api.url}")
-@Slf4j
-public class TransferController {
-
-    @Resource
-    private TransferVehicleManage transferVehicleManage;
-
-    /**
-     * 保存车辆数据
-     */
-    @Operation(summary = "保存车辆数据", description = "保存车辆实时采集的数据")
-    @PostMapping("/api/transfer/saveVehicleData")
-    public BaseResult<Boolean> saveVehicleData(@RequestBody @Validated VehicleDataSaveRequest request) {
-        log.info("保存车辆数据入口");
-        request.setwOrderNo(request.getWayOrderNo());
-        transferVehicleManage.saveVehicleData(request);
-        return BaseResult.success(true);
-    }
-
-    /**
-     * 查询车辆数据
-     */
-    @Operation(summary = "查询车辆数据列表", description = "分页查询车辆历史数据")
-    @PostMapping("/api/transfer/queryVehicleDataList")
-    public BaseResult<List<VehicleDataResp>> queryVehicleDataList(@RequestBody VehicleDataRequest request) {
-        return BaseResult.success(transferVehicleManage.queryVehicleDataList(request));
-    }
-
-    /**
-     * 通过车牌查询实时经纬度
-     */
-    @Operation(summary = "查询实时位置", description = "根据车牌号查询车辆的实时经纬度")
-    @PostMapping("/api/transfer/queryRealTimeLocation")
-    public BaseResult<VehicleDataResp> queryRealTimeLocation(@RequestBody VehicleDataRequest request) {
-        return BaseResult.success(transferVehicleManage.queryRealTimeLocation(request));
-    }
-}

+ 2 - 2
iot-platform-manager/src/main/java/com/platform/api/controller/WeighbridgeController.java

@@ -2,8 +2,8 @@ package com.platform.api.controller;
 
 import com.platform.api.request.LicensePlateValidateRequest;
 import com.platform.api.request.WeighbridgePushRequest;
-import com.platform.manage.WeighbridgeRecordManage;
-import com.platform.response.LicensePlateValidateResponse;
+import com.platform.api.manager.WeighbridgeRecordManage;
+import com.platform.api.response.LicensePlateValidateResponse;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.Parameter;
 import io.swagger.v3.oas.annotations.tags.Tag;

+ 0 - 206
iot-platform-manager/src/main/java/com/platform/api/manager/TransferVehicleManage.java

@@ -1,206 +0,0 @@
-package com.platform.api.manager;
-
-
-import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
-import com.baomidou.mybatisplus.core.toolkit.StringUtils;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.platform.api.config.VehicleDataQueue;
-import com.platform.api.request.VehicleDataRequest;
-import com.platform.api.request.VehicleDataSaveRequest;
-import com.platform.api.response.VehicleDataResp;
-import com.platform.entity.VehicleData;
-import com.platform.entity.VehicleTimeSeriesData;
-import com.platform.enums.ErrorCodeEnum;
-import com.platform.exception.IotException;
-import com.platform.service.TaosService;
-import com.platform.service.VehicleDataService;
-import jakarta.annotation.Resource;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.BeansException;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ApplicationContextAware;
-import org.springframework.lang.Nullable;
-import org.springframework.scheduling.annotation.Scheduled;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.Collections;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * Author: donglang
- * Time: 2025-10-13
- * Des:
- * Version: 1.0
- */
-
-@Service
-@Slf4j
-public class TransferVehicleManage {
-
-    @Resource
-    private TaosService taosService;
-
-    @Resource
-    private VehicleDataService vehicleDataService;
-
-    /**
-     * 队列
-     */
-    @Resource
-    private VehicleDataQueue vehicleDataQueue;
-
-//    private ApplicationContext applicationContext;
-
-//    @Override
-//    public void setApplicationContext(@Nullable ApplicationContext applicationContext) throws BeansException {
-//        this.applicationContext = applicationContext;
-//    }
-
-    /**
-     * 接收单条数据,暂存到队列
-     */
-    public void saveVehicleData(VehicleDataSaveRequest request) {
-        // 1. 暂存数据到队列
-        vehicleDataQueue.add(request);
-
-        // 2. 检查是否达到批量阈值,若达到则批量保存
-        log.info("检查是否达到批量阈值");
-        List<VehicleDataSaveRequest> vehicleDataList = vehicleDataQueue.takeBatchIfReached();
-        if (CollectionUtils.isEmpty(vehicleDataList)) {
-            return;
-        }
-        batchSaveVehicle(vehicleDataList);
-    }
-
-    /**
-     * 插入车辆数据
-     */
-    public void batchSaveVehicle(List<VehicleDataSaveRequest> vehicleDataList) {
-        //mock数据
-//        vehicleDataList.stream().forEach(vehicle -> {
-//            vehicle.getVehicleDataVO().setCarNo("16939110775088937");
-//            vehicle.setwOrderNo("W1709780533650");
-//        });
-        List<VehicleData> newVehicles = checkVehicle(vehicleDataList);
-        // 批量保存到关系库
-        if (CollectionUtils.isNotEmpty(newVehicles)) {
-            log.info("批量保存关系数据库");
-            vehicleDataService.saveBatch(newVehicles);
-        }
-
-        // 批量保存到时序数据库
-        taosService.batchInsertVehicleData(vehicleDataList);
-    }
-
-
-    /**
-     * 关系库插入
-     */
-    @Transactional(rollbackFor = Exception.class)
-    public void saveBatchVehicle(List<VehicleData> newVehicles) {
-        if (CollectionUtils.isNotEmpty(newVehicles)) {
-            vehicleDataService.saveBatch(newVehicles);
-        }
-    }
-
-    /**
-     * 校验关系数据库中是否存在车辆
-     */
-    private List<VehicleData> checkVehicle(List<VehicleDataSaveRequest> vehicleDataList) {
-        //提取所有车辆id
-        List<String> carNoList = vehicleDataList.stream()
-                .map(ve -> ve.getVehicleDataVO().getCarNo())
-                .distinct()
-                .collect(Collectors.toList());
-
-        // 2. 批量查询已存在的车辆id
-        log.info("查询关系数据库中已存在的车牌");
-        List<String> existCarNos = vehicleDataService.list(Wrappers.<VehicleData>lambdaQuery()
-                        .in(VehicleData::getCarNo, carNoList))
-                .stream()
-                .map(VehicleData::getCarNo)
-                .collect(Collectors.toList());
-        log.info("查询关系数据库中已存在的车牌,结果:{}", existCarNos);
-
-        // 3. 筛选出需要新增的车辆
-        return vehicleDataList.stream()
-                .filter(ve -> !existCarNos.contains(ve.getVehicleDataVO().getCarNo()))
-                .map(ve -> VehicleData.toVehicleData(ve.getVehicleDataVO()))
-                .collect(Collectors.toList());
-    }
-
-    /**
-     * 定时兜底任务:每10分钟执行一次,防止数据长期凑不满10条
-     */
-    @Scheduled(fixedRate = 6 * 1000)
-    public void scheduledBatchSave() {
-        List<VehicleDataSaveRequest> remainingData = vehicleDataQueue.takeAll();
-        if (!remainingData.isEmpty()) {
-            batchSaveVehicle(remainingData);
-        }
-    }
-
-
-    /**
-     * 接收单条数据,暂存到队列
-     */
-    public List<VehicleDataResp> queryVehicleDataList(VehicleDataRequest request) {
-        //mock数据
-       // request.setwOrderNo("W1709780533650");
-        request.setwOrderNo(request.getOrderNo());
-        if (request == null || (StringUtils.isEmpty(request.getCarNo()) && StringUtils.isEmpty(request.getwOrderNo()))) {
-            throw new IotException(ErrorCodeEnum.ILLEGAL_PARAM, "接口参数为null!");
-        }
-
-        List<VehicleTimeSeriesData> timeSeriesData;
-        //通过运单号查询车辆信息
-        if (StringUtils.isNotEmpty(request.getwOrderNo())) {
-            timeSeriesData = taosService.selectByWOrderNo(request);
-            log.info("按运单号查询, 运单号:{}, 时间范围:{}~{}, 结果条数:{}", request.getwOrderNo(), request.getStartTime(),
-                    request.getEndTime(), timeSeriesData.size());
-        } else {
-            //通过车牌查询车辆信息
-            String subTableName = "vehicle_data_" + request.getCarNo().trim();
-            timeSeriesData = taosService.selectByCarNo(subTableName, request);
-            log.info("按车牌查询, 运单号:{}, 时间范围:{}~{}, 结果条数:{}", request.getCarNo(), request.getStartTime(),
-                    request.getEndTime(), timeSeriesData.size());
-        }
-
-        //参数转换
-        return timeSeriesData.stream().map(VehicleDataResp::toIotPageResp)
-                .collect(Collectors.toList());
-
-    }
-
-
-    /**
-     * 通过车牌查询实时经纬度
-     */
-    public VehicleDataResp queryRealTimeLocation(VehicleDataRequest request) {
-        //mock数据
-      //  request.setCarNo("16939110775088937");
-        if (request == null || (StringUtils.isEmpty(request.getCarNo()))) {
-            throw new IotException(ErrorCodeEnum.ILLEGAL_PARAM, "车牌carNo不能为空!");
-        }
-        VehicleTimeSeriesData realTimeLocation = null;
-
-        try {
-            // 查询车辆id关系数据中是否存在
-            VehicleData vehicleData = vehicleDataService.getOne(Wrappers.<VehicleData>lambdaQuery().eq(VehicleData::getCarNo, request.getCarNo()).last("limit 1"));
-            if (vehicleData == null) {
-                log.info("子表 {} 不存在,返回空结果", "vehicle_data_" + request.getCarNo().trim());
-                return new VehicleDataResp();
-            }
-
-            String subTableName = "vehicle_data_" + request.getCarNo().trim();
-            realTimeLocation = taosService.selectRealTimeLocation(subTableName, request.getCarNo());
-        } catch (Exception e) {
-            log.error("查询车辆实时经纬度异常", e);
-        }
-
-        //参数转换
-        return VehicleDataResp.toIotPageResp(realTimeLocation);
-    }
-}

+ 2 - 2
iot-platform-manager/src/main/java/com/platform/manage/WeighbridgeRecordManage.java → iot-platform-manager/src/main/java/com/platform/api/manager/WeighbridgeRecordManage.java

@@ -1,4 +1,4 @@
-package com.platform.manage;
+package com.platform.api.manager;
 
 import com.platform.api.request.LicensePlateValidateRequest;
 import com.platform.api.request.WeighbridgePushRequest;
@@ -6,7 +6,7 @@ import com.platform.entity.ValidateLicensePlate;
 import com.platform.entity.WeighbridgeRecord;
 import com.platform.enums.ErrorCodeEnum;
 import com.platform.exception.IotException;
-import com.platform.response.LicensePlateValidateResponse;
+import com.platform.api.response.LicensePlateValidateResponse;
 import com.platform.service.ValidateLicensePlateService;
 import com.platform.service.WeighbridgeRecordService;
 import com.platform.utils.FileUtils;

+ 0 - 1
iot-platform-manager/src/main/java/com/platform/api/request/LicensePlateValidateRequest.java

@@ -1,6 +1,5 @@
 package com.platform.api.request;
 
-import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.v3.oas.annotations.media.Schema;
 import jakarta.validation.constraints.NotBlank;
 import jakarta.validation.constraints.NotNull;

+ 0 - 53
iot-platform-manager/src/main/java/com/platform/api/request/VehicleDataRequest.java

@@ -1,53 +0,0 @@
-package com.platform.api.request;
-
-import lombok.Data;
-
-import java.time.LocalDateTime;
-
-/**
- * @Author: donglang
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-@Data
-public class VehicleDataRequest{
-
-    /**
-     * 运单号
-     */
-    private String wOrderNo;
-    /**
-     * 订单号
-     */
-    private String orderNo;
-
-    /**
-     * 车牌id
-     */
-    private String carNo;
-
-    /**
-     * 开始时间
-     */
-    private LocalDateTime startTime;
-
-    /**
-     * 结束时间
-     */
-    private LocalDateTime endTime;
-
-
-    //需要保留,勿删
-    public void setwOrderNo(String wOrderNo) {
-        this.wOrderNo = wOrderNo;
-    }
-
-    public String getwOrderNo() {
-        return wOrderNo;
-    }
-
-
-
-}

+ 0 - 110
iot-platform-manager/src/main/java/com/platform/api/request/VehicleDataSaveRequest.java

@@ -1,110 +0,0 @@
-package com.platform.api.request;
-
-import com.platform.request.PageRequest;
-import jakarta.validation.constraints.NotBlank;
-import jakarta.validation.constraints.NotNull;
-import lombok.Data;
-
-import java.sql.Timestamp;
-
-/**
- * @Author: donglang
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-
-@Data
-public class VehicleDataSaveRequest extends PageRequest {
-
-    // 超级表MEASUREMENTS字段
-    /**
-     * 时间戳
-     */
-    @NotNull(message = "数据时间戳ts不能为空")
-    private Timestamp ts = new Timestamp(System.currentTimeMillis());
-
-    /**
-     * 经度
-     */
-    @NotBlank(message = "经度longitude不能为空")
-    private String longitude;
-
-    /**
-     * 纬度
-     */
-    @NotBlank(message = "纬度latitude不能为空")
-    private String latitude;
-
-    /**
-     * 车速(km/h)
-     */
-    @NotNull
-    private Float speed;
-
-    /**
-     * 行驶方向(角度)
-     */
-    private Float direction;
-
-    /**
-     * 燃油液位(%)
-     */
-    private Float fuelLevel;
-
-    /**
-     * 里程数(km)
-     */
-    private String mileage;
-
-    /**
-     * 发动机温度(℃)
-     */
-    private Float engineTemp;
-
-    /**
-     * 电池电压(V)
-     */
-    private Float batteryVoltage;
-
-    /**
-     * 车辆状态
-     */
-
-    private String status;
-
-    /**
-     * 运单号
-     */
-
-    private String wOrderNo;
-
-    /**
-     * 运单号
-     */
-
-    private String wayOrderNo;
-
-    /**
-     * 报警代码
-     */
-    private String alarmCode;
-
-
-    /**
-     * 车辆信息
-     */
-    private VehicleDataVO vehicleDataVO;
-
-
-    //需要保留,勿删
-    public void setwOrderNo(String wOrderNo) {
-        this.wOrderNo = wOrderNo;
-    }
-
-    public String getwOrderNo() {
-        return wOrderNo;
-    }
-
-}

+ 0 - 90
iot-platform-manager/src/main/java/com/platform/api/request/VehicleDataVO.java

@@ -1,90 +0,0 @@
-package com.platform.api.request;
-
-
-import com.baomidou.mybatisplus.annotation.TableField;
-import jakarta.validation.constraints.NotBlank;
-import jakarta.validation.constraints.Pattern;
-import lombok.Data;
-
-/**
- * Author: donglang
- * Time: 2025-10-13
- * Des: 车辆实体表
- * Version: 1.0
- */
-@Data
-public class VehicleDataVO {
-
-    /**
-     * 车辆id
-     */
-    @NotBlank(message = "车辆car_no不能为空")
-    @Pattern(regexp = "^\\d+$", message = "车辆car_no只能包含数字")
-    private String carNo;
-
-    /**
-     * 车队id
-     */
-    @TableField("fleet_id")
-    private String fleetId;
-
-    /**
-     * 车队名称
-     */
-    @TableField("fleet_name")
-    private String fleetName;
-
-    /**
-     * 设备唯一id
-     */
-    @TableField("device_id")
-    private String deviceId;
-
-    /**
-     * 设备名称
-     */
-    @TableField("device_name")
-    private String deviceName;
-
-    /**
-     * 区域ID
-     */
-    @TableField("group_id")
-    private String groupId;
-
-    /**
-     * 区域名称
-     */
-    @TableField("group_name")
-    private String groupName;
-
-    /**
-     * 业务ID
-     */
-    @TableField("biz_id")
-    private String bizId;
-
-    /**
-     * 业务名称
-     */
-    @TableField("biz_name")
-    private String bizName;
-
-    /**
-     * 项目ID
-     */
-    @TableField("project_id")
-    private String projectId;
-
-    /**
-     * 项目名称
-     */
-    @TableField("project_name")
-    private String projectName;
-
-    /**
-     * 租户id
-     */
-    @TableField("tenant_id")
-    private String tenantId;
-}

+ 1 - 1
iot-platform-manager/src/main/java/com/platform/response/LicensePlateValidateResponse.java → iot-platform-manager/src/main/java/com/platform/api/response/LicensePlateValidateResponse.java

@@ -1,4 +1,4 @@
-package com.platform.response;
+package com.platform.api.response;
 
 
 import lombok.Data;

+ 0 - 120
iot-platform-manager/src/main/java/com/platform/api/response/VehicleDataResp.java

@@ -1,120 +0,0 @@
-package com.platform.api.response;
-
-import com.platform.entity.VehicleTimeSeriesData;
-import lombok.Data;
-
-import java.sql.Timestamp;
-
-/**
- * @Author: donglang
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-
-@Data
-public class VehicleDataResp {
-
-    /**
-     * 时间戳
-     */
-    private Timestamp ts;
-
-    /**
-     * 经度
-     */
-    private String longitude;
-
-    /**
-     * 纬度
-     */
-    private String latitude;
-
-    /**
-     * 车速(km/h)
-     */
-    private Float speed;
-
-    /**
-     * 行驶方向(角度)
-     */
-    private Float direction;
-
-    /**
-     * 燃油液位(%)
-     */
-    private Float fuelLevel;
-
-    /**
-     * 里程数(km)
-     */
-    private String mileage;
-
-    /**
-     * 发动机温度(℃)
-     */
-    private Float engineTemp;
-
-    /**
-     * 电池电压(V)
-     */
-    private Float batteryVoltage;
-
-    /**
-     * 车辆状态
-     */
-    private String status;
-
-    /**
-     * 运单号
-     */
-    private String wOrderNo;
-
-    /**
-     * 报警代码
-     */
-    private String alarmCode;
-
-    /**
-     * 车牌id
-     */
-    private String carNo;
-
-    //需要保留,勿删
-    public void setwOrderNo(String wOrderNo) {
-        this.wOrderNo = wOrderNo;
-    }
-
-    public String getwOrderNo() {
-        return wOrderNo;
-    }
-
-
-
-    private static VehicleDataResp getInstance(){
-        return new VehicleDataResp();
-    }
-
-    public static VehicleDataResp toIotPageResp(VehicleTimeSeriesData seriesData){
-        if (seriesData == null) {
-            return VehicleDataResp.getInstance();
-        }
-        VehicleDataResp devicePageResp = VehicleDataResp.getInstance();
-        devicePageResp.setTs(seriesData.getTs());
-        devicePageResp.setLongitude(seriesData.getLongitude());
-        devicePageResp.setLatitude(seriesData.getLatitude());
-        devicePageResp.setSpeed(seriesData.getSpeed());
-        devicePageResp.setDirection(seriesData.getDirection());
-        devicePageResp.setFuelLevel(seriesData.getFuelLevel());
-        devicePageResp.setMileage(seriesData.getMileage());
-        devicePageResp.setEngineTemp(seriesData.getEngineTemp());
-        devicePageResp.setBatteryVoltage(seriesData.getBatteryVoltage());
-        devicePageResp.setStatus(seriesData.getStatus());
-        devicePageResp.setwOrderNo(seriesData.getwOrderNo());
-        devicePageResp.setAlarmCode(seriesData.getAlarmCode());
-        devicePageResp.setCarNo(seriesData.getCarNo());
-        return devicePageResp;
-    }
-}
-

+ 0 - 12
iot-platform-manager/src/main/java/com/platform/constant/demo.java

@@ -1,12 +0,0 @@
-package com.platform.constant;
-
-
-/**
- * Author: donglang
- * Time: 2025-10-09
- * Des:
- * Version: 1.0
- */
-
-public class demo {
-}

+ 0 - 96
iot-platform-manager/src/main/java/com/platform/controller/IotDeviceController.java

@@ -1,96 +0,0 @@
-package com.platform.controller;
-
-import com.platform.exception.BaseResult;
-import com.platform.exception.PageResult;
-import com.platform.manage.IotDeviceManage;
-import com.platform.request.device.IotDeviceDetailRequest;
-import com.platform.request.device.IotDeviceRequest;
-import com.platform.request.device.IotDeviceSaveRequest;
-import com.platform.response.device.IotDeviceResp;
-import com.platform.result.HttpResult;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import jakarta.servlet.http.HttpServletResponse;
-import lombok.RequiredArgsConstructor;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-
-/**
- * 物联网设备管理控制器
- * @author PC
- */
-@Tag(name = "设备管理", description = "物联网设备管理相关接口")
-@RestController
-@RequestMapping("/iot/device")
-@RequiredArgsConstructor
-public class IotDeviceController {
-
-    private final IotDeviceManage iotDeviceManage;
-
-    /**
-     * 分页查询物联设备
-     */
-    @Operation(summary = "分页查询设备列表", description = "根据条件分页查询物联网设备列表")
-    @PostMapping("/pageDeviceList")
-    public PageResult<IotDeviceResp> pageDeviceList(@RequestBody IotDeviceRequest request) {
-        return iotDeviceManage.pageDeviceList(request);
-    }
-
-    /**
-     * 添加物联网设备
-     */
-    @Operation(summary = "添加设备", description = "添加新的物联网设备")
-    @PostMapping("/addDevice")
-    public BaseResult<Boolean> addDevice(@RequestBody IotDeviceSaveRequest request) {
-        return BaseResult.success(iotDeviceManage.addDevice(request));
-    }
-
-    /**
-     * 修改物联网设备
-     */
-    @Operation(summary = "修改设备", description = "修改已存在的物联网设备信息")
-    @PostMapping("/updateDevice")
-    public BaseResult<Boolean> updateDevice(@RequestBody IotDeviceSaveRequest request) {
-        return BaseResult.success(iotDeviceManage.updateDevice(request));
-    }
-
-    /**
-     * 删除物联网设备
-     */
-    @Operation(summary = "删除设备", description = "根据设备ID删除物联网设备")
-    @Parameter(name = "id", description = "设备ID", required = true)
-    @GetMapping("/delDevice")
-    public BaseResult<Boolean> deleteDevice(String id) {
-        return BaseResult.success(iotDeviceManage.deleteDevice(id));
-    }
-
-    /**
-     * 物联设备详情查询
-     */
-    @Operation(summary = "查询设备详情", description = "根据设备ID查询设备详细信息")
-    @PostMapping("/getDeviceDetail")
-    public BaseResult<IotDeviceResp> getDeviceDetail(@RequestBody IotDeviceDetailRequest req) {
-        return BaseResult.success(iotDeviceManage.getDeviceDetail(req));
-    }
-
-    /**
-     * 下载设备导入模板
-     */
-    @Operation(summary = "下载导入模板", description = "下载设备批量导入的Excel模板文件")
-    @PostMapping("/exportTemplate")
-    public HttpResult<Void> exportTemplate(HttpServletResponse response) {
-        return HttpResult.success(iotDeviceManage.exportTemplate(response));
-    }
-
-    /**
-     * 批量导入设备
-     */
-    @Operation(summary = "批量导入设备", description = "通过Excel文件批量导入设备信息")
-    @Parameter(name = "file", description = "Excel文件", required = true)
-    @PostMapping("/importExcel")
-    public HttpResult<Void> importExcel(@RequestParam("file") MultipartFile file) {
-        return HttpResult.success(iotDeviceManage.importExcel(file));
-    }
-    //todo cxf 备黑白名单,设备动态  查询saas_equipment_manage表,还需要查询时序表
-}

+ 0 - 57
iot-platform-manager/src/main/java/com/platform/controller/IotDeviceGroupController.java

@@ -1,57 +0,0 @@
-package com.platform.controller;
-
-import com.platform.exception.BaseResult;
-import com.platform.manage.IotDeviceGroupManage;
-import com.platform.request.deviceGroup.IotDeviceGroupRequest;
-import com.platform.request.deviceGroup.IotDeviceGroupSaveRequest;
-import com.platform.response.deviceGroup.IotDeviceGroupPageResp;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import lombok.RequiredArgsConstructor;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.List;
-
-/**
- * 物联网设备管理控制器
- * @author PC
- */
-@Tag(name = "设备分组管理", description = "物联网设备分组管理相关接口")
-@RestController
-@RequestMapping("/iot/device/group")
-@RequiredArgsConstructor
-@Validated
-public class IotDeviceGroupController {
-
-    private final IotDeviceGroupManage iotDeviceGroupManage;
-
-    /**
-     * 查询物联设备
-     */
-    @Operation(summary = "查询设备分组列表", description = "根据条件查询设备分组列表")
-    @PostMapping("/pageGroupDevice")
-    public BaseResult<List<IotDeviceGroupPageResp>> pageGroupDevice(@RequestBody IotDeviceGroupRequest request) {
-        return BaseResult.success(iotDeviceGroupManage.queryGroupDevice(request));
-    }
-
-    /**
-     * 添加物联设备
-     */
-    @Operation(summary = "添加设备分组", description = "添加新的设备分组")
-    @PostMapping("/addDeviceGroup")
-    public BaseResult<Boolean> addDeviceGroup(@RequestBody @Validated IotDeviceGroupSaveRequest request) {
-        return BaseResult.success(iotDeviceGroupManage.addDeviceGroup(request));
-    }
-
-    /**
-     * 删除物联设备
-     */
-    @Operation(summary = "删除设备分组", description = "根据分组ID删除设备分组")
-    @Parameter(name = "id", description = "分组ID", required = true)
-    @GetMapping("/delDeviceGroup")
-    public BaseResult<Boolean> delDeviceGroup(Long id) {
-        return BaseResult.success(iotDeviceGroupManage.delDeviceGroup(id));
-    }
-}

+ 0 - 76
iot-platform-manager/src/main/java/com/platform/controller/IotModController.java

@@ -1,76 +0,0 @@
-package com.platform.controller;
-
-import com.platform.exception.BaseResult;
-import com.platform.exception.PageResult;
-import com.platform.manage.IotModManage;
-import com.platform.request.mod.IotModDetailReq;
-import com.platform.request.mod.IotModRequest;
-import com.platform.request.mod.IotModSaveRequest;
-import com.platform.response.mod.IotModResp;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import lombok.RequiredArgsConstructor;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-/**
- * @Author: donglang
- * @CreateTime: 2025-10-09
- * @Description: 物联模型Controller
- * @Version: 1.0
- */
-@Tag(name = "物联模型管理", description = "物联网模型定义和管理相关接口")
-@RestController
-@RequestMapping("/iot/mod")
-@RequiredArgsConstructor
-public class IotModController {
-
-    private final IotModManage iotModManage;
-
-    /**
-     * 分页查询物理模型
-     */
-    @Operation(summary = "分页查询模型列表", description = "根据条件分页查询物联模型列表")
-    @PostMapping("/pageModList")
-    public BaseResult<PageResult<IotModResp>> pageModList(@RequestBody IotModRequest request) {
-        return BaseResult.success(iotModManage.pageModList(request));
-    }
-
-    /**
-     * 添加物理模型
-     */
-    @Operation(summary = "添加模型", description = "添加新的物联模型")
-    @PostMapping("/addMod")
-    public BaseResult<Boolean> addMod(@RequestBody IotModSaveRequest request) {
-        return BaseResult.success(iotModManage.addMod(request));
-    }
-
-    /**
-     * 修改物理模型
-     */
-    @Operation(summary = "修改模型", description = "修改已存在的物联模型信息")
-    @PostMapping("/updateMod")
-    public BaseResult<Boolean> updateMod(@RequestBody IotModSaveRequest request) {
-        return BaseResult.success(iotModManage.updateMod(request));
-    }
-
-    /**
-     * 删除物理模型
-     */
-    @Operation(summary = "删除模型", description = "根据模型ID删除物联模型")
-    @Parameter(name = "id", description = "模型ID", required = true)
-    @GetMapping("/deleteMod")
-    public BaseResult<Boolean> deleteMod(Long id) {
-        return BaseResult.success(iotModManage.deleteMod(id));
-    }
-
-    /**
-     * 物理模型详情查询
-     */
-    @Operation(summary = "查询模型详情", description = "根据模型ID查询模型详细信息")
-    @PostMapping("/getModDetail")
-    public BaseResult<IotModResp> getModDetail(@RequestBody @Validated IotModDetailReq req) {
-        return BaseResult.success(iotModManage.getModDetail(req));
-    }
-}

+ 0 - 67
iot-platform-manager/src/main/java/com/platform/controller/IotModGroupController.java

@@ -1,67 +0,0 @@
-package com.platform.controller;
-
-import com.platform.exception.BaseResult;
-import com.platform.exception.PageResult;
-import com.platform.manage.IotModGroupManage;
-import com.platform.request.modGroup.IotModGroupRequest;
-import com.platform.request.modGroup.IotModGroupSaveRequest;
-import com.platform.response.modGroup.IotModGroupPageResp;
-import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.tags.Tag;
-import lombok.RequiredArgsConstructor;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.*;
-
-/**
- * 物联模型分组控制器
- * Author: donglang
- * Time: 2025-10-09
- * Description: 物联模型分组Controller - 提供物联模型分组的增删查功能
- * Version: 1.0
- */
-@Tag(name = "模型分组管理", description = "物联网模型分组管理相关接口,包括模型分组的查询、添加和删除操作")
-@RestController
-@RequestMapping("/iot/mod/group")
-@RequiredArgsConstructor
-public class IotModGroupController {
-
-    private final IotModGroupManage iotModGroupManage;
-
-    /**
-     * 分页查询物理模型分组
-     */
-    @Operation(
-        summary = "分页查询模型分组列表", 
-        description = "根据条件分页查询物联模型分组列表,支持按分组名称模糊查询"
-    )
-    @PostMapping("/pageModGroupList")
-    public BaseResult<PageResult<IotModGroupPageResp>> pageModList(@RequestBody IotModGroupRequest request) {
-        return BaseResult.success(iotModGroupManage.pageModGroupList(request));
-    }
-
-    /**
-     * 添加物理模型分组
-     */
-    @Operation(
-        summary = "添加模型分组", 
-        description = "添加新的物联模型分组,分组名称不能重复"
-    )
-    @PostMapping("/addModGroup")
-    public BaseResult<Boolean> addModGroup(@RequestBody @Validated IotModGroupSaveRequest request) {
-        return BaseResult.success(iotModGroupManage.addModGroup(request));
-    }
-
-    /**
-     * 删除物理模型分组
-     */
-    @Operation(
-        summary = "删除模型分组", 
-        description = "根据分组ID删除物联模型分组,删除前请确保该分组下没有关联的模型"
-    )
-    @Parameter(name = "id", description = "模型分组ID", required = true, example = "1")
-    @GetMapping("/deleteModGroup")
-    public BaseResult<Boolean> deleteModGroup(Long id) {
-        return BaseResult.success(iotModGroupManage.deleteModGroup(id));
-    }
-}

+ 0 - 31
iot-platform-manager/src/main/java/com/platform/dto/DeviceExcelTemplateDTO.java

@@ -1,31 +0,0 @@
-package com.platform.dto;
-
-import com.alibaba.excel.annotation.ExcelProperty;
-import lombok.Data;
-
-@Data
-public class DeviceExcelTemplateDTO {
-    
-    @ExcelProperty("物理模型名称")
-    private String modName;
-    
-    @ExcelProperty("设备名称")
-    private String deviceName;
-    
-    @ExcelProperty("设备类别")
-    private String deviceType;
-
-    @ExcelProperty("品牌")
-    private String brand;
-
-    @ExcelProperty("型号")
-    private String model;
-
-    @ExcelProperty("SN号")
-    private String sn;
-
-    @ExcelProperty("备注")
-    private String description;
-    
-    // 可以根据实际需求添加更多字段
-}

+ 0 - 186
iot-platform-manager/src/main/java/com/platform/entity/IotDevice.java

@@ -1,186 +0,0 @@
-package com.platform.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.platform.request.device.IotDeviceSaveRequest;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-import java.util.UUID;
-
-/**
- * 设备表实体类
- * @author cxf
- */
-@Data
-@TableName("iot_device")
-public class IotDevice {
-
-    /**
-     * 主键ID
-     */
-    @TableId(value = "id", type = IdType.AUTO)
-    private Long id;
-
-    /**
-     * 租户id
-     */
-    @TableField("tenant_id")
-    private String tenantId;
-
-    /**
-     * 所属客户id
-     */
-    @TableField("company_id")
-    private Long companyId;
-
-    /**
-     * 唯一标识[暂时保留]
-     */
-    @TableField("guid")
-    private String guid;
-
-    /**
-     * 设备分组码值
-     */
-    @TableField("device_group_code")
-    private String deviceGroupCode;
-
-    /**
-     * 设备编号
-     */
-    @TableField("device_code")
-    private String deviceCode;
-
-    /**
-     * sn通常是:IMEI
-     */
-    @TableField("sn")
-    private String sn;
-
-    /**
-     * 物联网模型码值
-     */
-    @TableField("mod_code")
-    private String modCode;
-
-    /**
-     * 设备名称[旧系统的title]
-     */
-    @TableField("device_name")
-    private String deviceName;
-
-    /**
-     * 设备品牌名称
-     */
-    @TableField("brand")
-    private String brand;
-
-    /**
-     * 型号
-     */
-    @TableField("model_code")
-    private String modelCode;
-
-    /**
-     * 最后一次设备更新信息值[旧系统的desc]
-     */
-    @TableField("description")
-    private String description;
-
-    /**
-     * 备注
-     */
-    @TableField("remarks")
-    private String remarks;
-
-    /**
-     * 1在线2离线3异常
-     */
-    @TableField("status")
-    private Integer status;
-
-    /**
-     * 经度[lng]
-     */
-    @TableField("longitude")
-    private String longitude;
-
-    /**
-     * 纬度[lat]
-     */
-    @TableField("latitude")
-    private String latitude;
-
-    /**
-     * 高度
-     */
-    @TableField("high")
-    private String high;
-
-    /**
-     * 创建时间
-     */
-    @TableField(value = "create_time")
-    private LocalDateTime createTime;
-
-    /**
-     * 更新时间
-     */
-    @TableField(value = "update_time")
-    private LocalDateTime updateTime;
-
-    /**
-     * 创建人
-     */
-    @TableField("create_user")
-    private String createUser;
-
-    /**
-     * 更新人
-     */
-    @TableField("update_user")
-    private String updateUser;
-
-    /**
-     * 0-未删除,1-删除
-     */
-    @TableField("del_flag")
-    private Integer delFlag;
-
-    /**
-     * 设备类别
-     */
-    @TableField("eg_id")
-    private Long egId;
-
-    public static IotDevice getInstance() {
-        return new IotDevice();
-    }
-
-    public static IotDevice toIotDevice(IotDeviceSaveRequest request) {
-        if (request == null) {
-            return new IotDevice();
-        }
-        IotDevice iotDevice = IotDevice.getInstance();
-        iotDevice.setTenantId(null);
-        iotDevice.setCompanyId(null);
-        iotDevice.setGuid(null);
-        iotDevice.setDeviceCode(UUID.randomUUID().toString());
-        iotDevice.setSn(request.getSn());
-        iotDevice.setModCode(request.getModCode());
-        iotDevice.setDeviceName(request.getDeviceName());
-        iotDevice.setBrand(request.getBrand());
-        iotDevice.setModelCode(request.getModelCode());
-        iotDevice.setDescription(null);
-        iotDevice.setRemarks(request.getRemarks());
-        iotDevice.setStatus(null);
-        iotDevice.setLongitude(null);
-        iotDevice.setLatitude(null);
-        iotDevice.setHigh(null);
-        iotDevice.setEgId(null);
-        return iotDevice;
-    }
-}

+ 0 - 50
iot-platform-manager/src/main/java/com/platform/entity/IotDeviceError.java

@@ -1,50 +0,0 @@
-package com.platform.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import lombok.Data;
-import java.time.LocalDateTime;
-
-/**
- * 设备异常记录表实体类
- * @author PC
- */
-@Data
-@TableName("iot_device_error")
-public class IotDeviceError {
-
-    /**
-     * 主键ID
-     */
-    @TableId(value = "id", type = IdType.AUTO)
-    private Long id;
-
-    /**
-     * 设备编号
-     */
-    @TableField("device_code")
-    private String deviceCode;
-
-    /**
-     * 唯一标识[暂时保留]
-     */
-    @TableField("guid")
-    private String guid;
-
-    /**
-     * 设备异常原因
-     */
-    @TableField("error_reason")
-    private String errorReason;
-
-    /**
-     * 创建时间
-     */
-    @TableField(value = "create_time")
-    private LocalDateTime createTime;
-
-    /**
-     * 更新时间
-     */
-    @TableField(value = "update_time")
-    private LocalDateTime updateTime;
-}

+ 0 - 101
iot-platform-manager/src/main/java/com/platform/entity/IotDeviceGroup.java

@@ -1,101 +0,0 @@
-package com.platform.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.platform.request.deviceGroup.IotDeviceGroupSaveRequest;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-import java.util.UUID;
-
-/**
- * 设备分组表实体类
- * @author PC
- */
-@Data
-@TableName("iot_device_group")
-public class IotDeviceGroup {
-
-    /**
-     * 主键ID
-     */
-    @TableId(value = "id", type = IdType.AUTO)
-    private Long id;
-
-    /**
-     * 设备分组码值
-     */
-    @TableField("device_group_code")
-    private String deviceGroupCode;
-
-    /**
-     * 租户id
-     */
-    @TableField("tenant_id")
-    private String tenantId;
-
-    /**
-     * 所属客户id
-     */
-    @TableField("company_id")
-    private Long companyId;
-
-    /**
-     * 设备分组名称
-     */
-    @TableField("title")
-    private String title;
-
-    /**
-     * [有点晕?]1-12(车辆、装载机、矿卡、人员、水表、电表、边坡监控、视频监控、皮带称重、环境监测、无人地磅、排放监测)
-     */
-    @TableField("large_type")
-    private Integer largeType;
-
-    /**
-     * 0-未删除,1-删除
-     */
-    @TableField("del_flag")
-    private Integer delFlag;
-
-    /**
-     * 创建时间
-     */
-    @TableField(value = "create_time")
-    private LocalDateTime createTime;
-
-    /**
-     * 更新时间
-     */
-    @TableField(value = "update_time")
-    private LocalDateTime updateTime;
-
-    /**
-     * 创建人
-     */
-    @TableField("create_user")
-    private String createUser;
-
-    /**
-     * 更新人
-     */
-    @TableField("update_user")
-    private String updateUser;
-
-    public static IotDeviceGroup getInstance() {
-        return new IotDeviceGroup();
-    }
-
-    public static IotDeviceGroup toIotDeviceGroup(IotDeviceGroupSaveRequest request) {
-        if (request == null) {
-            return new IotDeviceGroup();
-        }
-        IotDeviceGroup instance = IotDeviceGroup.getInstance();
-        instance.setDeviceGroupCode(UUID.randomUUID().toString());
-        instance.setTitle(request.getTitle());
-        instance.setLargeType(request.getLargeType());
-        return instance;
-    }
-}

+ 0 - 145
iot-platform-manager/src/main/java/com/platform/entity/IotMod.java

@@ -1,145 +0,0 @@
-package com.platform.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.platform.request.mod.IotModSaveRequest;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-import java.util.UUID;
-
-/**
- * 物模型lot表实体类
- * @author PC
- */
-@Data
-@TableName("iot_mod")
-public class IotMod {
-
-    /**
-     * 主键ID
-     */
-    @TableId(value = "id", type = IdType.AUTO)
-    private Long id;
-
-    /**
-     * 租户id
-     */
-    @TableField("tenant_id")
-    private String tenantId;
-
-    /**
-     * 物理模型码值
-     */
-    @TableField("mod_code")
-    private String modCode;
-
-    /**
-     * 所属客户id
-     */
-    @TableField("company_id")
-    private Long companyId;
-
-    /**
-     * 物模型分组码值
-     */
-    @TableField("mode_group_code")
-    private String modeGroupCode;
-
-    /**
-     * 唯一标识
-     */
-    @TableField("guid")
-    private String guid;
-
-    /**
-     * 物模型名称
-     */
-    @TableField("name")
-    private String name;
-
-    /**
-     * 最后一次更新值[原来字段 desc]
-     */
-    @TableField("description")
-    private String description;
-
-    /**
-     * 备注
-     */
-    @TableField("remarks")
-    private String remarks;
-
-    /**
-     * 包含JSON
-     */
-    @TableField("tsl_json")
-    private String tslJson;
-
-    /**
-     * 版本[原来字段 tsl_ver]
-     */
-    @TableField("version")
-    private Integer version;
-
-    /**
-     * 设备数
-     */
-    @TableField("num")
-    private Integer num;
-
-    /**
-     * 0-未删除,1-删除
-     */
-    @TableField("del_flag")
-    private Integer delFlag;
-
-    /**
-     * 创建人
-     */
-    @TableField("create_user")
-    private String createUser;
-
-    /**
-     * 更新人
-     */
-    @TableField("update_user")
-    private String updateUser;
-
-    /**
-     * 创建时间
-     */
-    @TableField(value = "create_time")
-    private LocalDateTime createTime;
-
-    /**
-     * 更新时间
-     */
-    @TableField(value = "update_time")
-    private LocalDateTime updateTime;
-
-    private static IotMod getInstance(){
-        return new IotMod();
-    }
-
-
-    public static IotMod requestToIotMod(IotModSaveRequest request){
-        if (request == null) {
-            return new IotMod();
-        }
-        IotMod iotMod = IotMod.getInstance();
-        iotMod.setTenantId(null);
-        iotMod.setModCode(UUID.randomUUID().toString());
-        iotMod.setCompanyId(request.getCompanyId());
-        iotMod.setModeGroupCode(request.getModeGroupCode());
-        iotMod.setGuid(null);
-        iotMod.setName(request.getName());
-        iotMod.setDescription(null);
-        iotMod.setRemarks(request.getRemarks());
-        iotMod.setTslJson(request.getTslJson());
-
-        return iotMod;
-    }
-}

+ 0 - 44
iot-platform-manager/src/main/java/com/platform/entity/IotModError.java

@@ -1,44 +0,0 @@
-package com.platform.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import lombok.Data;
-import java.time.LocalDateTime;
-
-/**
- * 物理模型设备异常记录表实体类
- * @author PC
- */
-@Data
-@TableName("iot_mod_error")
-public class IotModError {
-
-    /**
-     * 主键ID
-     */
-    @TableId(value = "id", type = IdType.AUTO)
-    private Long id;
-
-    /**
-     * 物理模型编号
-     */
-    @TableField("mod_code")
-    private String modCode;
-
-    /**
-     * 设备异常原因
-     */
-    @TableField("error_reason")
-    private String errorReason;
-
-    /**
-     * 创建时间
-     */
-    @TableField(value = "create_time")
-    private LocalDateTime createTime;
-
-    /**
-     * 更新时间
-     */
-    @TableField(value = "update_time")
-    private LocalDateTime updateTime;
-}

+ 0 - 95
iot-platform-manager/src/main/java/com/platform/entity/IotModGroup.java

@@ -1,95 +0,0 @@
-package com.platform.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.platform.request.modGroup.IotModGroupSaveRequest;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-import java.util.UUID;
-
-/**
- * 物理模型分组表实体类
- *
- * @author PC
- */
-@Data
-@TableName("iot_mod_group")
-public class IotModGroup {
-
-    /**
-     * 主键ID
-     */
-    @TableId(value = "id", type = IdType.AUTO)
-    private Long id;
-
-    /**
-     * 所属客户id
-     */
-    @TableField("company_id")
-    private Long companyId;
-
-    /**
-     * 租户id
-     */
-    @TableField("tenant_id")
-    private String tenantId;
-
-    /**
-     * 物理模型分组码值唯一标识
-     */
-    @TableField("mode_group_code")
-    private String modeGroupCode;
-
-    /**
-     * 物模型分组名称
-     */
-    @TableField("name")
-    private String name;
-
-    /**
-     * 创建时间
-     */
-    @TableField(value = "create_time")
-    private LocalDateTime createTime;
-
-    /**
-     * 更新时间
-     */
-    @TableField(value = "update_time")
-    private LocalDateTime updateTime;
-
-    /**
-     * 0-未删除,1-删除
-     */
-    @TableField("del_flag")
-    private Integer delFlag;
-
-    /**
-     * 创建人
-     */
-    @TableField("create_user")
-    private String createUser;
-
-    /**
-     * 修改人
-     */
-    @TableField("update_user")
-    private String updateUser;
-
-    private static IotModGroup getInstance() {
-        return new IotModGroup();
-    }
-
-
-    public static IotModGroup requestToIotModGroup(IotModGroupSaveRequest request) {
-        if (request == null) {
-            return new IotModGroup();
-        }
-        IotModGroup iotModGroup = IotModGroup.getInstance();
-        iotModGroup.setCompanyId(null);
-        iotModGroup.setTenantId(null);
-        iotModGroup.setModeGroupCode(UUID.randomUUID().toString());
-        iotModGroup.setName(request.getName());
-        return iotModGroup;
-    }
-}

+ 0 - 80
iot-platform-manager/src/main/java/com/platform/entity/SaasEquipmentManage.java

@@ -1,80 +0,0 @@
-package com.platform.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import lombok.Data;
-import java.math.BigDecimal;
-import java.time.LocalDateTime;
-
-/**
- * 设备基础管理表(关联物联网ID) 实体类
- */
-@Data
-@TableName("saas_equipment_manage")
-public class SaasEquipmentManage {
-
-    /**
-     * 主键ID
-     */
-    @TableId(value = "id", type = IdType.AUTO)
-    private Long id;
-
-    /**
-     * 设备名称
-     */
-    @TableField("device_name")
-    private String deviceName;
-
-    /**
-     * 设备类型
-     */
-    @TableField("equipment_type")
-    private String equipmentType;
-
-    /**
-     * 能源形式
-     */
-    @TableField("energy_type")
-    private Integer energyType;
-
-    /**
-     * 设备GUID
-     */
-    @TableField("equipment_guid")
-    private String equipmentGuid;
-
-    /**
-     * 物联网模型GUID
-     */
-    @TableField("mod_guid")
-    private String modGuid;
-
-    /**
-     * 购买时间
-     */
-    @TableField("pay_time")
-    private LocalDateTime payTime;
-
-    /**
-     * 折旧年限
-     */
-    @TableField("depreciation_period")
-    private Integer depreciationPeriod;
-
-    /**
-     * 折旧总值
-     */
-    @TableField("total_depreciation_value")
-    private BigDecimal totalDepreciationValue;
-
-    /**
-     * 创建时间
-     */
-    @TableField(value = "create_time")
-    private LocalDateTime createTime;
-
-    /**
-     * 更新时间
-     */
-    @TableField(value = "update_time")
-    private LocalDateTime updateTime;
-}

+ 0 - 56
iot-platform-manager/src/main/java/com/platform/entity/TimeSeriesDatabaseMapping.java

@@ -1,56 +0,0 @@
-package com.platform.entity;
-
-import com.baomidou.mybatisplus.annotation.*;
-import lombok.Data;
-import java.time.LocalDateTime;
-
-/**
- * 时序数据库和关系型数据库映射表实体类
- * @author PC
- */
-@Data
-@TableName("time_Series_database_mapping")
-public class TimeSeriesDatabaseMapping {
-
-    /**
-     * 主键ID
-     */
-    @TableId(value = "id", type = IdType.AUTO)
-    private Long id;
-
-    /**
-     * 租户id
-     */
-    @TableField("tenant_id")
-    private String tenantId;
-
-    /**
-     * 时序数据库子表名称
-     */
-    @TableField("time_Series_table_name")
-    private String timeSeriesTableName;
-
-    /**
-     * 时序数据库超级表名称
-     */
-    @TableField("time_Series_super_name")
-    private String timeSeriesSuperName;
-
-    /**
-     * guid
-     */
-    @TableField("guid")
-    private String guid;
-
-    /**
-     * 创建时间
-     */
-    @TableField(value = "create_time")
-    private LocalDateTime createTime;
-
-    /**
-     * 更新时间
-     */
-    @TableField(value = "update_time")
-    private LocalDateTime updateTime;
-}

+ 1 - 1
iot-platform-manager/src/main/java/com/platform/entity/ValidateLicensePlate.java

@@ -6,7 +6,7 @@ import lombok.Data;
 import java.time.LocalDateTime;
 
 /**
- * 地磅过磅记录表实体类
+ * 车牌识别表实体类
  *
  * @author cxf
  */

+ 0 - 156
iot-platform-manager/src/main/java/com/platform/entity/VehicleData.java

@@ -1,156 +0,0 @@
-package com.platform.entity;
-
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.platform.api.request.VehicleDataVO;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-
-/**
- * Author: donglang
- * Time: 2025-10-13
- * Des: 车辆实体表
- * Version: 1.0
- */
-@Data
-@TableName("vehicle_data")
-public class VehicleData {
-
-    /**
-     * 主键ID
-     */
-    @TableId(value = "id", type = IdType.AUTO)
-    private Long id;
-
-    /**
-     * 车牌
-     */
-    @TableField("car_no")
-    private String carNo;
-
-    /**
-     * 车队id
-     */
-    @TableField("fleet_id")
-    private String fleetId;
-
-    /**
-     * 车队名称
-     */
-    @TableField("fleet_name")
-    private String fleetName;
-
-    /**
-     * 设备唯一id
-     */
-    @TableField("device_id")
-    private String deviceId;
-
-    /**
-     * 设备名称
-     */
-    @TableField("device_name")
-    private String deviceName;
-
-    /**
-     * 区域ID
-     */
-    @TableField("group_id")
-    private String groupId;
-
-    /**
-     * 区域名称
-     */
-    @TableField("group_name")
-    private String groupName;
-
-    /**
-     * 业务ID
-     */
-    @TableField("biz_id")
-    private String bizId;
-
-    /**
-     * 业务名称
-     */
-    @TableField("biz_name")
-    private String bizName;
-
-    /**
-     * 项目ID
-     */
-    @TableField("project_id")
-    private String projectId;
-
-    /**
-     * 项目名称
-     */
-    @TableField("project_name")
-    private String projectName;
-
-    /**
-     * 删除标识(0-未删除,1-删除)
-     */
-    @TableField("del_flag")
-    private Integer delFlag;
-
-    /**
-     * 创建时间
-     */
-    @TableField(value = "create_time")
-    private LocalDateTime createTime;
-
-    /**
-     * 更新时间
-     */
-    @TableField(value = "update_time")
-    private LocalDateTime updateTime;
-
-    /**
-     * 创建人
-     */
-    @TableField(value = "create_user")
-    private String createUser;
-
-    /**
-     * 更新人
-     */
-    @TableField(value = "update_user")
-    private String updateUser;
-
-    /**
-     * 租户id
-     */
-    @TableField("tenant_id")
-    private String tenantId;
-
-    private static VehicleData getInstance(){
-        return new VehicleData();
-    }
-
-
-    public static VehicleData toVehicleData(VehicleDataVO vo){
-        if (vo == null) {
-            return new VehicleData();
-        }
-        VehicleData vehicleData = VehicleData.getInstance();
-        vehicleData.setCarNo(vo.getCarNo());
-        vehicleData.setFleetId(vo.getFleetId());
-        vehicleData.setFleetName(vo.getFleetName());
-        vehicleData.setDeviceId(vo.getDeviceId());
-        vehicleData.setDeviceName(vo.getDeviceName());
-        vehicleData.setGroupId(vo.getGroupId());
-        vehicleData.setGroupName(vo.getGroupName());
-        vehicleData.setBizId(vo.getBizId());
-        vehicleData.setBizName(vo.getBizName());
-        vehicleData.setProjectId(vo.getProjectId());
-        vehicleData.setProjectName(vo.getProjectName());
-        vehicleData.setTenantId(null);
-
-        return vehicleData;
-    }
-}

+ 0 - 96
iot-platform-manager/src/main/java/com/platform/entity/VehicleTimeSeriesData.java

@@ -1,96 +0,0 @@
-package com.platform.entity;
-
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.sql.Timestamp;
-
-/**
- * Author: donglang
- * Time: 2025-10-13
- * Des: 车辆时序数据实体
- * Version: 1.0
- */
-@Data
-@TableName("vehicle_data")
-public class VehicleTimeSeriesData {
-
-    /**
-     * 车牌
-     */
-    private String carNo;
-
-    /**
-     * 时间戳
-     */
-    private Timestamp ts;
-
-    /**
-     * 经度
-     */
-    private String longitude;
-
-    /**
-     * 纬度
-     */
-    private String latitude;
-
-    /**
-     * 车速(km/h)
-     */
-    private Float speed;
-
-    /**
-     * 行驶方向(角度)
-     */
-    private Float direction;
-
-    /**
-     * 燃油液位(%)
-     */
-    private Float fuelLevel;
-
-    /**
-     * 里程数(km)
-     */
-    private String mileage;
-
-    /**
-     * 发动机温度(℃)
-     */
-    private Float engineTemp;
-
-    /**
-     * 电池电压(V)
-     */
-    private Float batteryVoltage;
-
-    /**
-     * 车辆状态
-     */
-    private String status;
-
-    /**
-     * 运单号
-     */
-    private String wOrderNo;
-
-    /**
-     * 报警代码
-     */
-    private String alarmCode;
-
-    //需要保留,勿删
-    public void setwOrderNo(String wOrderNo) {
-        this.wOrderNo = wOrderNo;
-    }
-
-    public String getwOrderNo() {
-        return wOrderNo;
-    }
-
-
-
-
-}

+ 0 - 12
iot-platform-manager/src/main/java/com/platform/enums/demo.java

@@ -1,12 +0,0 @@
-package com.platform.enums;
-
-
-/**
- * Author: donglang
- * Time: 2025-10-09
- * Des:
- * Version: 1.0
- */
-
-public class demo {
-}

+ 0 - 86
iot-platform-manager/src/main/java/com/platform/manage/IotDeviceGroupManage.java

@@ -1,86 +0,0 @@
-package com.platform.manage;
-
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.platform.entity.IotDeviceGroup;
-import com.platform.enums.ErrorCodeEnum;
-import com.platform.exception.IotException;
-import com.platform.request.deviceGroup.IotDeviceGroupRequest;
-import com.platform.request.deviceGroup.IotDeviceGroupSaveRequest;
-import com.platform.response.deviceGroup.IotDeviceGroupPageResp;
-import com.platform.service.IotDeviceGroupService;
-import lombok.RequiredArgsConstructor;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Objects;
-
-
-/**
- * @author PC
- */
-@Service
-@RequiredArgsConstructor
-public class IotDeviceGroupManage {
-
-    private final IotDeviceGroupService iotDeviceGroupService;
-
-
-    /**
-     * 查询设备分组
-     * @param request
-     * @return
-     */
-    public List<IotDeviceGroupPageResp> queryGroupDevice(IotDeviceGroupRequest request) {
-        LambdaQueryWrapper<IotDeviceGroup> queryWrapper = Wrappers.<IotDeviceGroup>lambdaQuery()
-                .eq(StringUtils.isNotBlank(request.getTitle()), IotDeviceGroup::getTitle, request.getTitle())
-                .eq(IotDeviceGroup::getDelFlag, 0);
-        List<IotDeviceGroup> deviceGroupList = iotDeviceGroupService.list(queryWrapper);
-
-        //若为null,返回空分页结果
-        if (CollectionUtils.isEmpty(deviceGroupList)) {
-            return Collections.emptyList();
-        }
-        List<IotDeviceGroupPageResp> deviceGroupPageRespList = new ArrayList<>();
-
-        for (IotDeviceGroup iotDeviceGroup : deviceGroupList) {
-            IotDeviceGroupPageResp devicePageResp = IotDeviceGroupPageResp.toDevicePageResp(iotDeviceGroup);
-            deviceGroupPageRespList.add(devicePageResp);
-        }
-        return deviceGroupPageRespList;
-    }
-
-    /**
-     * 新增设备分组
-     * @param request
-     * @return
-     */
-    public Boolean addDeviceGroup(IotDeviceGroupSaveRequest request) {
-        IotDeviceGroup deviceGroupName = iotDeviceGroupService.getOneByTitle(request.getTitle());
-        if (Objects.nonNull(deviceGroupName)){
-            throw new IotException(ErrorCodeEnum.DATA_SAVE_FAIL, "设备分组名称已存在");
-        }
-        IotDeviceGroup iotDeviceGroup = IotDeviceGroup.toIotDeviceGroup(request);
-        return iotDeviceGroupService.addDeviceGroup(iotDeviceGroup);
-    }
-
-
-    /**
-     * 删除设备分组
-     * @param id
-     * @return
-     */
-    public Boolean delDeviceGroup(Long id) {
-        if (id == null){
-            throw new IotException(ErrorCodeEnum.DATA_DELETE_FAIL,"设备分组删除不能为空");
-        }
-        return iotDeviceGroupService.removeById(id);
-    }
-
-
-
-}

+ 0 - 194
iot-platform-manager/src/main/java/com/platform/manage/IotDeviceManage.java

@@ -1,194 +0,0 @@
-package com.platform.manage;
-
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.platform.dto.DeviceExcelTemplateDTO;
-import com.platform.entity.IotDevice;
-import com.platform.entity.IotDeviceGroup;
-import com.platform.entity.IotMod;
-import com.platform.enums.ErrorCodeEnum;
-import com.platform.exception.IotException;
-import com.platform.exception.PageResult;
-import com.platform.request.device.IotDeviceDetailRequest;
-import com.platform.request.device.IotDeviceRequest;
-import com.platform.request.device.IotDeviceSaveRequest;
-import com.platform.response.device.IotDeviceResp;
-import com.platform.service.IotDeviceGroupService;
-import com.platform.service.IotDeviceService;
-import com.platform.service.IotModService;
-import com.platform.utils.EasyExcelUtil;
-import jakarta.servlet.http.HttpServletResponse;
-import lombok.RequiredArgsConstructor;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.stereotype.Service;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
-
-
-/**
- * @author PC
- */
-@Service
-@RequiredArgsConstructor
-public class IotDeviceManage {
-
-
-    private final IotDeviceService iotDeviceService;
-
-    private final IotDeviceGroupService iotDeviceGroupService;
-
-    private final IotModService iotModService;
-
-
-    /**
-     * 设备分页查询
-     *
-     * @param request
-     * @return
-     */
-    public PageResult<IotDeviceResp> pageDeviceList(IotDeviceRequest request) {
-        IPage<IotDevice> page = new Page<>(request.getPageNum(), request.getPageSize());
-        LambdaQueryWrapper<IotDevice> queryWrapper = Wrappers.<IotDevice>lambdaQuery()
-                .in(CollectionUtils.isNotEmpty(request.getDeviceGroupCodes()), IotDevice::getDeviceGroupCode, request.getDeviceGroupCodes())
-                .eq(StringUtils.isNotBlank(request.getDeviceCode()), IotDevice::getDeviceGroupCode, request.getDeviceGroupCodes())
-                .eq(IotDevice::getDelFlag, 0);
-
-        //物模型名称模糊查询
-        if (StringUtils.isNotBlank(request.getModName())) {
-            LambdaQueryWrapper<IotMod> modQueryWrapper = Wrappers.<IotMod>lambdaQuery()
-                    .like(IotMod::getName, request.getModName())
-                    .eq(IotMod::getDelFlag, 0L);
-            List<IotMod> modList = iotModService.list(modQueryWrapper);
-            List<String> modCodeList = modList.stream().map(IotMod::getModCode).toList();
-            queryWrapper.in(IotDevice::getModCode, modCodeList);
-        }
-        List<IotDevice> deviceList = iotDeviceService.list(page, queryWrapper);
-
-        //若为null,返回空分页结果
-        if (CollectionUtils.isEmpty(deviceList)) {
-            return PageResult.empty(request.getPageNum(), request.getPageSize());
-        }
-
-        List<IotDeviceResp> deviceRespList = new ArrayList<>();
-        for (IotDevice device : deviceList) {
-            IotDeviceResp deviceResp = IotDeviceResp.toIotPageResp(device);
-            //设备分组名称
-            IotDeviceGroup deviceGroup = iotDeviceGroupService.getOne(Wrappers.<IotDeviceGroup>lambdaQuery()
-                    .eq(IotDeviceGroup::getDeviceGroupCode, device.getDeviceGroupCode()));
-            deviceResp.setDeviceGroupName(deviceGroup.getTitle());
-            //物模型名称
-            IotMod iotMod = iotModService.getOne(Wrappers.<IotMod>lambdaQuery()
-                    .eq(IotMod::getModCode, device.getModCode()));
-            deviceResp.setModName(iotMod.getName());
-            deviceRespList.add(deviceResp);
-        }
-        return PageResult.of(deviceRespList.size(), request.getPageNum(), request.getPageSize(), deviceRespList);
-    }
-
-
-    /**
-     * 添加设备
-     *
-     * @param request
-     * @return
-     */
-    public Boolean addDevice(IotDeviceSaveRequest request) {
-        IotDevice oneByName = iotDeviceService.getOneByName(request.getDeviceName());
-        if (Objects.nonNull(oneByName)) {
-            throw new IotException(ErrorCodeEnum.DATA_SAVE_FAIL, "设备名称已存在");
-        }
-        IotDevice iotDevice = IotDevice.toIotDevice(request);
-        return iotDeviceService.save(iotDevice);
-    }
-
-
-    /**
-     * 更新设备
-     * @param request
-     * @return
-     */
-    public Boolean updateDevice(IotDeviceSaveRequest request) {
-        if (request.getId() == null) {
-            throw new IotException(ErrorCodeEnum.DATA_DELETE_FAIL, "设备主键id不能为null");
-        }
-        IotDevice iotDevice = IotDevice.toIotDevice(request);
-        iotDevice.setId(request.getId());
-        return iotDeviceService.updateById(iotDevice);
-    }
-
-
-    /**
-     * 删除
-     * @param id
-     * @return
-     */
-    public Boolean deleteDevice(String id) {
-        if (id == null) {
-            throw new IotException(ErrorCodeEnum.DATA_DELETE_FAIL, "设备主键id不能为null");
-        }
-        return iotDeviceService.deleteDevice(id);
-    }
-
-    /**
-     * 设备详情
-     * @param request
-     * @return
-     */
-    public IotDeviceResp getDeviceDetail(IotDeviceDetailRequest request) {
-        IotDevice iotDevice = iotDeviceService.getById(request.getId());
-        IotDeviceResp deviceResp = IotDeviceResp.toIotPageResp(iotDevice);
-        //设备分组名称
-        IotDeviceGroup deviceGroup = iotDeviceGroupService.getOne(Wrappers.<IotDeviceGroup>lambdaQuery()
-                .eq(IotDeviceGroup::getDeviceGroupCode, iotDevice.getDeviceGroupCode()));
-        deviceResp.setDeviceGroupName(deviceGroup.getTitle());
-        //物模型名称
-        IotMod iotMod = iotModService.getOne(Wrappers.<IotMod>lambdaQuery()
-                .eq(IotMod::getModCode, iotDevice.getModCode()));
-        deviceResp.setModName(iotMod.getName());
-
-        return deviceResp;
-
-    }
-
-
-    /**
-     * 导出
-     * @param response
-     * @return
-     */
-    public Void exportTemplate(HttpServletResponse response) {
-        try {
-            EasyExcelUtil.exportTemplate("设备导入模板", DeviceExcelTemplateDTO.class, response);
-        } catch (Exception e) {
-            throw new IotException(ErrorCodeEnum.DATA_EXPORT, "设备导入模板异常");
-        }
-        return null;
-    }
-
-
-    /**
-     * 导入
-     * @param file
-     * @return
-     */
-    public Void importExcel(MultipartFile file) {
-        if (file.isEmpty()) {
-            throw new IotException(ErrorCodeEnum.DATA_IMPORT, "文件不能为空");
-        }
-        try {
-            InputStream inputStream = file.getInputStream();
-            List<IotDeviceResp> deviceDetailReqs = EasyExcelUtil.importExcel(inputStream, IotDeviceResp.class);
-            //todo cxf 导入设备
-        } catch (Exception e) {
-            throw new IotException(ErrorCodeEnum.DATA_IMPORT, "设备导入异常");
-        }
-        return null;
-    }
-}

+ 0 - 92
iot-platform-manager/src/main/java/com/platform/manage/IotModGroupManage.java

@@ -1,92 +0,0 @@
-package com.platform.manage;
-
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
-import com.baomidou.mybatisplus.core.toolkit.StringUtils;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.platform.entity.IotModGroup;
-import com.platform.enums.ErrorCodeEnum;
-import com.platform.exception.IotException;
-import com.platform.exception.PageResult;
-import com.platform.request.modGroup.IotModGroupRequest;
-import com.platform.request.modGroup.IotModGroupSaveRequest;
-import com.platform.response.modGroup.IotModGroupPageResp;
-import com.platform.service.IotModGroupService;
-import lombok.RequiredArgsConstructor;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-/**
- * @Author: donglang
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-@Service
-@RequiredArgsConstructor
-public class IotModGroupManage {
-
-    private final IotModGroupService iotModGroupService;
-
-
-    /**
-     * 分页查询
-     *
-     * @param request
-     * @return
-     */
-    public PageResult<IotModGroupPageResp> pageModGroupList(IotModGroupRequest request) {
-        IPage<IotModGroup> page = new Page<>(request.getPageNum(), request.getPageSize());
-        LambdaQueryWrapper<IotModGroup> queryWrapper = Wrappers.<IotModGroup>lambdaQuery()
-                .eq(StringUtils.isNotBlank(request.getName()), IotModGroup::getName, request.getName());
-        List<IotModGroup> modGroupList = iotModGroupService.list(page, queryWrapper);
-
-        //若为null,返回空分页结果
-        if (CollectionUtils.isEmpty(modGroupList)) {
-            return PageResult.empty(request.getPageNum(), request.getPageSize());
-        }
-
-        List<IotModGroupPageResp> modGroupPageRespList = new ArrayList<>();
-        for (IotModGroup iotModGroup : modGroupList) {
-            IotModGroupPageResp iotPageResp = IotModGroupPageResp.toIotPageResp(iotModGroup);
-            modGroupPageRespList.add(iotPageResp);
-        }
-        return PageResult.of(modGroupPageRespList.size(), request.getPageNum(), request.getPageSize(), modGroupPageRespList);
-    }
-
-    /**
-     * 新增
-     *
-     * @param request
-     * @return
-     */
-    public Boolean addModGroup(IotModGroupSaveRequest request) {
-        IotModGroup oneByName = iotModGroupService.getOneByName(request.getName());
-        if (oneByName != null) {
-            throw new IotException(ErrorCodeEnum.DATA_SAVE_FAIL, "物理模型分组名称已存在");
-        }
-        IotModGroup iotModGroup = IotModGroup.requestToIotModGroup(request);
-        return iotModGroupService.save(iotModGroup);
-
-    }
-
-    /**
-     * 删除
-     *
-     * @param id
-     * @return
-     */
-    public Boolean deleteModGroup(Long id) {
-        if (id == null) {
-            throw new IotException(ErrorCodeEnum.DATA_DELETE_FAIL, "物模型分组主键id不能为null");
-        }
-        return iotModGroupService.removeById(id);
-    }
-
-}

+ 0 - 147
iot-platform-manager/src/main/java/com/platform/manage/IotModManage.java

@@ -1,147 +0,0 @@
-package com.platform.manage;
-
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.platform.entity.IotDevice;
-import com.platform.entity.IotMod;
-import com.platform.entity.IotModGroup;
-import com.platform.enums.ErrorCodeEnum;
-import com.platform.exception.IotException;
-import com.platform.exception.PageResult;
-import com.platform.request.mod.IotModDetailReq;
-import com.platform.request.mod.IotModRequest;
-import com.platform.request.mod.IotModSaveRequest;
-import com.platform.response.mod.IotModResp;
-import com.platform.service.IotDeviceService;
-import com.platform.service.IotModGroupService;
-import com.platform.service.IotModService;
-import lombok.RequiredArgsConstructor;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.List;
-
-
-/**
- * @Author: donglang
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-@Service
-@RequiredArgsConstructor
-public class IotModManage {
-
-    private final IotModService iotModService;
-
-    private final IotModGroupService iotModGroupService;
-
-    private final IotDeviceService iotDeviceService;
-
-
-    /**
-     * 分页查询
-     *
-     * @param request
-     * @return
-     */
-    public PageResult<IotModResp> pageModList(IotModRequest request) {
-        IPage<IotMod> page = new Page<>(request.getPageNum(), request.getPageSize());
-        LambdaQueryWrapper<IotMod> queryWrapper = Wrappers.<IotMod>lambdaQuery()
-                .in(CollectionUtils.isNotEmpty(request.getModeGroupCodes()), IotMod::getModeGroupCode, request.getModeGroupCodes())
-                .eq(StringUtils.isNotBlank(request.getModCode()), IotMod::getGuid, request.getModCode())
-                .eq(StringUtils.isNotBlank(request.getName()), IotMod::getName, request.getName());
-        List<IotMod> modList = iotModService.list(page, queryWrapper);
-
-        //若为null,返回空分页结果
-        if (CollectionUtils.isEmpty(modList)) {
-            return PageResult.empty(request.getPageNum(), request.getPageSize());
-        }
-
-        List<IotModResp> modPageRespList = new ArrayList<>();
-        for (IotMod item : modList) {
-            IotModResp iotPageResp = IotModResp.toIotPageResp(item);
-            //理模型分组名称
-            IotModGroup iotModGroup = iotModGroupService.getOne(Wrappers.<IotModGroup>lambdaQuery()
-                    .eq(IotModGroup::getModeGroupCode, item.getModeGroupCode()));
-            iotPageResp.setModeGroupName(iotModGroup.getName());
-
-            //设备数
-            List<IotDevice> list = iotDeviceService.list(Wrappers.<IotDevice>lambdaQuery().eq(IotDevice::getModCode, item.getModeGroupCode()));
-            iotPageResp.setNum(list.size());
-
-            modPageRespList.add(iotPageResp);
-        }
-        return PageResult.of(modPageRespList.size(), request.getPageNum(), request.getPageSize(), modPageRespList);
-
-    }
-
-    /**
-     * 新增
-     *
-     * @param request
-     * @return
-     */
-    public Boolean addMod(IotModSaveRequest request) {
-        IotMod oneByName = iotModService.getOneByName(request.getName());
-        if (oneByName != null) {
-            throw new IotException(ErrorCodeEnum.DATA_SAVE_FAIL, "物理模型名称已存在");
-        }
-        IotMod iotMod = IotMod.requestToIotMod(request);
-        return iotModService.save(iotMod);
-    }
-
-    /**
-     * 更新
-     *
-     * @param request
-     * @return
-     */
-    public Boolean updateMod(IotModSaveRequest request) {
-        if (request.getId() == null) {
-            throw new IotException(ErrorCodeEnum.DATA_DELETE_FAIL, "物理模型主键id不能为null");
-        }
-        IotMod iotMod = IotMod.requestToIotMod(request);
-        iotMod.setId(request.getId());
-        return iotModService.updateById(iotMod);
-    }
-
-    /**
-     * 删除
-     *
-     * @param id
-     * @return
-     */
-    public Boolean deleteMod(Long id) {
-        if (id == null) {
-            throw new IotException(ErrorCodeEnum.DATA_DELETE_FAIL, "物理模型主键id不能为null");
-        }
-        return iotModService.removeById(id);
-
-    }
-
-    /**
-     * 详情
-     *
-     * @param req
-     * @return
-     */
-    public IotModResp getModDetail(IotModDetailReq req) {
-        IotMod iotMod = iotModService.getById(req.getId());
-        IotModResp iotPageResp = IotModResp.toIotPageResp(iotMod);
-
-        //查询物理模型分组名称
-        IotModGroup iotModGroup = iotModGroupService.getOne(Wrappers.<IotModGroup>lambdaQuery()
-                .eq(IotModGroup::getModeGroupCode, iotMod.getModeGroupCode()));
-        iotPageResp.setModeGroupName(iotModGroup.getName());
-
-        return iotPageResp;
-    }
-
-
-}

+ 0 - 16
iot-platform-manager/src/main/java/com/platform/mapper/IotDeviceErrorMapper.java

@@ -1,16 +0,0 @@
-package com.platform.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.platform.entity.IotDeviceError;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * @Author: chenxiaofei
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-@Mapper
-public interface IotDeviceErrorMapper extends BaseMapper<IotDeviceError> {
-}

+ 0 - 16
iot-platform-manager/src/main/java/com/platform/mapper/IotDeviceGroupMapper.java

@@ -1,16 +0,0 @@
-package com.platform.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.platform.entity.IotDeviceGroup;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * @Author: chenxiaofei
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-@Mapper
-public interface IotDeviceGroupMapper extends BaseMapper<IotDeviceGroup> {
-}

+ 0 - 13
iot-platform-manager/src/main/java/com/platform/mapper/IotDeviceMapper.java

@@ -1,13 +0,0 @@
-package com.platform.mapper;
-
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.platform.entity.IotDevice;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * @author PC
- */
-@Mapper
-public interface IotDeviceMapper extends BaseMapper<IotDevice> {
-}

+ 0 - 15
iot-platform-manager/src/main/java/com/platform/mapper/IotModErrorMapper.java

@@ -1,15 +0,0 @@
-package com.platform.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.platform.entity.IotModError;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * @Author: chenxiaofei
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-@Mapper
-public interface IotModErrorMapper extends BaseMapper<IotModError> {
-}

+ 0 - 16
iot-platform-manager/src/main/java/com/platform/mapper/IotModGroupMapper.java

@@ -1,16 +0,0 @@
-package com.platform.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.platform.entity.IotModGroup;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * @Author: chenxiaofei
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-@Mapper
-public interface IotModGroupMapper extends BaseMapper<IotModGroup> {
-}

+ 0 - 16
iot-platform-manager/src/main/java/com/platform/mapper/IotModMapper.java

@@ -1,16 +0,0 @@
-package com.platform.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.platform.entity.IotMod;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * @Author: 马超伟
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-@Mapper
-public interface IotModMapper extends BaseMapper<IotMod> {
-}

+ 0 - 16
iot-platform-manager/src/main/java/com/platform/mapper/SaasEquipmentManageMapper.java

@@ -1,16 +0,0 @@
-package com.platform.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.platform.entity.SaasEquipmentManage;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * @Author: 马超伟
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-@Mapper
-public interface SaasEquipmentManageMapper extends BaseMapper<SaasEquipmentManage> {
-}

+ 0 - 168
iot-platform-manager/src/main/java/com/platform/mapper/TaosMapper.java

@@ -1,168 +0,0 @@
-package com.platform.mapper;
-
-import com.baomidou.dynamic.datasource.annotation.DS;
-import com.platform.api.request.VehicleDataSaveRequest;
-import com.platform.entity.VehicleTimeSeriesData;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.time.LocalDateTime;
-import java.util.List;
-
-/**
- * @Author: donglang
- * @CreateTime: 2025-10-09
- * @Description: taosMapper
- * @Version: 1.0
- */
-
-@Mapper
-@DS("td")
-public interface TaosMapper {
-
-
-    /**
-     * 插入车辆数据超级表
-     * @return 插入成功的行数
-     */
-    int createVehicleDataTable();
-
-    /**
-     * 插入车辆数据到时序子表
-     * 子表名规则:vehicle_${tenantId}_${deviceId}(基于租户ID+设备ID,确保唯一)
-     * @param vehicleDataList 车辆数据实体
-     * @return 插入成功的行数
-     */
-    int batchInsertVehicleData(List<VehicleDataSaveRequest> vehicleDataList);
-
-
-    /**
-     * 批量删除时序库数据
-     * @param uniqueKeys 唯一标识列表(carNo_ts)
-     */
-    void batchDelete(@Param("uniqueKeys") List<String> uniqueKeys);
-
-
-
-    /**
-     * 通过运单号查询时序数据
-
-     * @param wOrderNo 车辆数据实体
-     * @return 返回的车辆数据
-     */
-    List<VehicleTimeSeriesData> selectByWOrderNo(@Param("wOrderNo") String wOrderNo,
-                                                 @Param("startTime") LocalDateTime startTime,
-                                                 @Param("endTime") LocalDateTime endTime);
-
-    /**
-     * 通过车牌查询时序数据
-
-     * @param carNo 车辆数据实体
-     * @return 返回的车辆数据
-     */
-    List<VehicleTimeSeriesData> selectByCarNo(@Param("subTableName") String subTableName,
-                                              @Param("carNo") String carNo,
-                                              @Param("startTime") LocalDateTime startTime,
-                                              @Param("endTime") LocalDateTime endTime);
-
-    /**
-     * 通过车牌查询时序数据
-
-     * @param carNo 车辆数据实体
-     * @return 返回的车辆数据
-     */
-    VehicleTimeSeriesData selectRealTimeLocation(@Param("subTableName") String subTableName,
-                                                 @Param("carNo") String carNo);
-
-
-    /**
-     * 创建水表子表
-     * @param code 产品编码
-     * @param deviceId 设备id
-     * @return
-     */
-    int createWaterMeterSubTable(@Param("code") String code, @Param("deviceId") String deviceId);
-
-
-    /**
-     * 创建电表子表
-     * @param code 产品编码
-     * @param deviceId 设备id
-     * @return
-     */
-    int createElectricMeterSubTable(@Param("code") String code, @Param("deviceId") String deviceId);
-
-    /**
-     * 创建边坡检测子表
-     * @param code 产品编码
-     * @param deviceId 设备id
-     * @return
-     */
-    int createSlopeMonitorSubTable(@Param("code") String code, @Param("deviceId") String deviceId);
-
-    /**
-     * 创建视频监控子表
-     * @param code 产品编码
-     * @param deviceId 设备id
-     * @return
-     */
-    int createDeviceMonitorSubTable(@Param("code") String code, @Param("deviceId") String deviceId);
-
-    /**
-     * 创建矿卡子表
-     * @param code 产品编码
-     * @param deviceId 设备id
-     * @return
-     */
-    int createMineTruckMonitorSubTable(@Param("code") String code, @Param("deviceId") String deviceId);
-
-    /**
-     * 创建皮带称重数据子表
-     * @param code 产品编码
-     * @param deviceId 设备id
-     * @return
-     */
-    int createBeltScaleDataSubTable(@Param("code") String code, @Param("deviceId") String deviceId);
-
-    /**
-     * 创建环境检查子表
-     * @param code 产品编码
-     * @param deviceId 设备id
-     * @return
-     */
-    int createEnvironmentCheckSubTable(@Param("code") String code, @Param("deviceId") String deviceId);
-
-    /**
-     * 创建无人地磅子表
-     * @param code 产品编码
-     * @param deviceId 设备id
-     * @return
-     */
-    int createWeighbridgeDataSubTable(@Param("code") String code, @Param("deviceId") String deviceId);
-
-    /**
-     * 创建排放检测数据子表
-     * @param code 产品编码
-     * @param deviceId 设备id
-     * @return
-     */
-    int createEmissionDataSubTable(@Param("code") String code, @Param("deviceId") String deviceId);
-
-    /**
-     * 创建车辆数据子表
-     * @param code 产品编码
-     * @param deviceId 设备id
-     * @return
-     */
-    int createVehicleDataSubTable(@Param("code") String code, @Param("deviceId") String deviceId);
-
-    /**
-     * 创建装载机械数据子表
-     * @param code 产品编码
-     * @param deviceId 设备id
-     * @return
-     */
-    int createLoadingEquipmentDataSubTable(@Param("code") String code, @Param("deviceId") String deviceId);
-
-
-}

+ 0 - 16
iot-platform-manager/src/main/java/com/platform/mapper/TimeSeriesDatabaseMappingMapper.java

@@ -1,16 +0,0 @@
-package com.platform.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.platform.entity.TimeSeriesDatabaseMapping;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * @Author: chenxiaofei
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-@Mapper
-public interface TimeSeriesDatabaseMappingMapper extends BaseMapper<TimeSeriesDatabaseMapping> {
-}

+ 0 - 22
iot-platform-manager/src/main/java/com/platform/mapper/VehicleDataMapper.java

@@ -1,22 +0,0 @@
-package com.platform.mapper;
-
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.platform.entity.VehicleData;
-import org.apache.ibatis.annotations.Mapper;
-
-/**
- * Author: donglang
- * Time: 2025-10-13
- * Des: 车辆mapper
- * Version: 1.0
- */
-
-@Mapper
-public interface VehicleDataMapper extends BaseMapper<VehicleData> {
-
-
-
-
-
-}

+ 0 - 25
iot-platform-manager/src/main/java/com/platform/request/device/IotDeviceDetailRequest.java

@@ -1,25 +0,0 @@
-package com.platform.request.device;
-
-import com.platform.request.PageRequest;
-import jakarta.validation.constraints.NotBlank;
-import lombok.Data;
-
-/**
- * @Author: 马超伟
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-
-@Data
-public class IotDeviceDetailRequest extends PageRequest {
-
-    /**
-     * 设备分组码值
-     */
-    @NotBlank(message = "设备主键id不能为null")
-    private Long id;
-
-
-}

+ 0 - 40
iot-platform-manager/src/main/java/com/platform/request/device/IotDeviceRequest.java

@@ -1,40 +0,0 @@
-package com.platform.request.device;
-
-import com.platform.request.PageRequest;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.util.List;
-
-/**
- * 设备查询请求参数
- * @author cxf
- */
-@Schema(description = "设备查询请求参数")
-@Data
-public class IotDeviceRequest extends PageRequest {
-
-    /**
-     * 设备分组码值
-     */
-    private List<String> deviceGroupCodes;
-
-    /**
-     * 设备编号
-     */
-    private String deviceCode;
-
-    /**
-     * 物模型名称
-     */
-    private String modName;
-
-    /**
-     * 所属客户id
-     */
-    private Long companyId;
-
-
-
-
-}

+ 0 - 61
iot-platform-manager/src/main/java/com/platform/request/device/IotDeviceSaveRequest.java

@@ -1,61 +0,0 @@
-package com.platform.request.device;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-/**
- * 设备保存请求参数
- * @author cxf
- */
-@Schema(description = "设备保存请求参数")
-@Data
-public class IotDeviceSaveRequest {
-
-    /**
-     * 主键id
-     */
-    @Schema(description = "设备ID,新增时为空,修改时必填", example = "1")
-    private Long id;
-
-    /**
-     * 物联网模型码值
-     */
-    @Schema(description = "物联网模型码值", requiredMode = Schema.RequiredMode.REQUIRED, example = "MOD001")
-    private String modCode;
-
-    /**
-     * 设备名称[旧系统的title]
-     */
-    @Schema(description = "设备名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "智能温度传感器")
-    private String deviceName;
-
-    /**
-     * 设备分组码值
-     */
-    @Schema(description = "设备分组码值", example = "GROUP001")
-    private String deviceGroupCode;
-
-    /**
-     * 设备品牌名称
-     */
-    @Schema(description = "设备品牌名称", example = "华为")
-    private String brand;
-
-    /**
-     * 型号
-     */
-    @Schema(description = "设备型号", example = "TEMP-SENSOR-V1")
-    private String modelCode;
-
-    /**
-     * sn通常是:IMEI
-     */
-    @Schema(description = "设备序列号(通常是IMEI)", requiredMode = Schema.RequiredMode.REQUIRED, example = "123456789012345")
-    private String sn;
-
-    /**
-     * 备注
-     */
-    @Schema(description = "备注信息", example = "安装在会议室")
-    private String remarks;
-}

+ 0 - 18
iot-platform-manager/src/main/java/com/platform/request/deviceGroup/IotDeviceGroupRequest.java

@@ -1,18 +0,0 @@
-package com.platform.request.deviceGroup;
-
-import com.platform.request.PageRequest;
-import lombok.Data;
-
-/**
- * 设备分组查询模型
- * @author cxf
- */
-@Data
-public class IotDeviceGroupRequest extends PageRequest {
-
-    /**
-     * 设备分组名称
-     */
-    private String title;
-
-}

+ 0 - 25
iot-platform-manager/src/main/java/com/platform/request/deviceGroup/IotDeviceGroupSaveRequest.java

@@ -1,25 +0,0 @@
-package com.platform.request.deviceGroup;
-
-import jakarta.validation.constraints.NotBlank;
-import lombok.Data;
-
-/**
- * 设备分组保存模型
- * @author cxf
- */
-@Data
-public class IotDeviceGroupSaveRequest {
-
-    /**
-     * 设备分组名称
-     */
-    @NotBlank
-    private String title;
-
-    /**
-     * 设备所属类别
-     */
-    @NotBlank
-    private Integer largeType;
-
-}

+ 0 - 24
iot-platform-manager/src/main/java/com/platform/request/mod/IotModDetailReq.java

@@ -1,24 +0,0 @@
-package com.platform.request.mod;
-
-
-import jakarta.validation.constraints.NotBlank;
-import lombok.Data;
-
-/**
- * @Author: donglang
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-@Data
-public class IotModDetailReq {
-
-    /**
-     * 物理模型主键id
-     */
-    @NotBlank(message= "商品名称不能为空")
-    private Long id;
-
-    
-}

+ 0 - 44
iot-platform-manager/src/main/java/com/platform/request/mod/IotModRequest.java

@@ -1,44 +0,0 @@
-package com.platform.request.mod;
-
-
-import com.platform.request.PageRequest;
-import lombok.Data;
-
-import java.util.List;
-
-/**
- * @Author: donglang
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-@Data
-public class IotModRequest extends PageRequest {
-
-    /**
-     * 物模型分组码值
-     */
-    private List<String> modeGroupCodes;
-
-    /**
-     * 物理模型码值
-     */
-    private String modCode;
-
-    /**
-     * 物模型名称
-     */
-    private String name;
-
-    /**
-     * 所属客户id
-     */
-    private Long companyId;
-
-
-
-
-
-
-}

+ 0 - 46
iot-platform-manager/src/main/java/com/platform/request/mod/IotModSaveRequest.java

@@ -1,46 +0,0 @@
-package com.platform.request.mod;
-
-
-import lombok.Data;
-
-/**
- * @Author: donglang
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-@Data
-public class IotModSaveRequest {
-
-    /**
-     * 物理模型码值
-     */
-    private Long id;
-
-    /**
-     * 所属客户id
-     */
-    private Long companyId;
-
-    /**
-     * 物模型名称
-     */
-    private String name;
-
-    /**
-     * 物模型分组码值
-     */
-    private String modeGroupCode;
-
-    /**
-     * 包含JSON
-     */
-    private String tslJson;
-
-    /**
-     * 备注
-     */
-    private String remarks;
-
-}

+ 0 - 17
iot-platform-manager/src/main/java/com/platform/request/modGroup/IotModGroupDetailReq.java

@@ -1,17 +0,0 @@
-package com.platform.request.modGroup;
-
-
-import lombok.Data;
-
-/**
- * @Author: donglang
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-@Data
-public class IotModGroupDetailReq {
-
-    
-}

+ 0 - 23
iot-platform-manager/src/main/java/com/platform/request/modGroup/IotModGroupRequest.java

@@ -1,23 +0,0 @@
-package com.platform.request.modGroup;
-
-import com.platform.request.PageRequest;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-/**
- * 物联模型分组查询请求参数
- * @Author: donglang
- * @CreateTime: 2025-10-09
- * @Description: 物联模型分组查询请求
- * @Version: 1.0
- */
-@Schema(description = "物联模型分组查询请求参数")
-@Data
-public class IotModGroupRequest extends PageRequest {
-
-    /**
-     * 物模型分组名称
-     */
-    @Schema(description = "物模型分组名称(模糊查询)", example = "温度传感器")
-    private String name;
-}

+ 0 - 30
iot-platform-manager/src/main/java/com/platform/request/modGroup/IotModGroupSaveRequest.java

@@ -1,30 +0,0 @@
-package com.platform.request.modGroup;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import jakarta.validation.constraints.NotBlank;
-import lombok.Data;
-
-/**
- * 物联模型分组保存请求参数
- * @Author: donglang
- * @CreateTime: 2025-10-09
- * @Description: 物联模型分组保存请求
- * @Version: 1.0
- */
-@Schema(description = "物联模型分组保存请求参数")
-@Data
-public class IotModGroupSaveRequest {
-
-    /**
-     * 物模型分组名称
-     */
-    @Schema(description = "物模型分组名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "温度传感器分组")
-    @NotBlank(message = "物模型分组名称不能为null")
-    private String name;
-
-    /**
-     * 创建人
-     */
-    @Schema(description = "创建人", example = "admin")
-    private String createUser;
-}

+ 0 - 114
iot-platform-manager/src/main/java/com/platform/response/device/IotDeviceResp.java

@@ -1,114 +0,0 @@
-package com.platform.response.device;
-
-import com.platform.entity.IotDevice;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-import java.time.LocalDateTime;
-
-/**
- * 设备查询响应参数
- * @author cxf
- */
-@Schema(description = "设备查询响应参数")
-@Data
-public class IotDeviceResp {
-
-    /**
-     * 主键id
-     */
-    @Schema(description = "设备ID", example = "1")
-    private Long id;
-
-    /**
-     * 物联网模型码值
-     */
-    private String deviceCode;
-
-    /**
-     * 设备名称[旧系统的title]
-     */
-    @Schema(description = "设备名称", example = "智能温度传感器")
-    private String deviceName;
-
-    /**
-     * 设备分组码值
-     */
-    @Schema(description = "设备分组码值", example = "GROUP001")
-    private String deviceGroupCode;
-
-    /**
-     * 设备分组名称
-     */
-    private String deviceGroupName;
-
-    /**
-     * 物联网模型码值
-     */
-    private String modCode;
-
-    /**
-     * 物联网模型名称
-     */
-    private String modName;
-
-    /**
-     * 设备品牌名称
-     */
-    @Schema(description = "设备品牌名称", example = "华为")
-    private String brand;
-
-    /**
-     * 型号
-     */
-    @Schema(description = "设备型号", example = "TEMP-SENSOR-V1")
-    private String modelCode;
-
-    /**
-     * sn通常是:IMEI
-     */
-    @Schema(description = "设备序列号", example = "123456789012345")
-    private String sn;
-
-    /**
-     * 备注
-     */
-    @Schema(description = "备注信息", example = "安装在会议室")
-    private String remarks;
-
-    /**
-     * 创建时间
-     * 设备类别
-     */
-    @Schema(description = "创建时间", example = "2024-01-01T10:00:00")
-    private LocalDateTime createTime;
-    private Long egId;
-
-
-    private static IotDeviceResp getInstance(){
-        return new IotDeviceResp();
-    }
-
-    /**
-     * 更新时间
-     */
-    @Schema(description = "更新时间", example = "2024-01-01T10:00:00")
-    private LocalDateTime updateTime;
-    public static IotDeviceResp toIotPageResp(IotDevice iotDevice){
-        if (iotDevice == null) {
-            return new IotDeviceResp();
-        }
-        IotDeviceResp devicePageResp = IotDeviceResp.getInstance();
-        devicePageResp.setId(iotDevice.getId());
-        devicePageResp.setDeviceCode(iotDevice.getDeviceCode());
-        devicePageResp.setDeviceName(iotDevice.getDeviceName());
-        devicePageResp.setDeviceGroupCode(iotDevice.getDeviceGroupCode());
-        devicePageResp.setModCode(iotDevice.getModCode());
-        devicePageResp.setBrand(iotDevice.getBrand());
-        devicePageResp.setModelCode(iotDevice.getModelCode());
-        devicePageResp.setSn(iotDevice.getSn());
-        devicePageResp.setRemarks(iotDevice.getRemarks());
-
-        return devicePageResp;
-    }
-}

+ 0 - 55
iot-platform-manager/src/main/java/com/platform/response/deviceGroup/IotDeviceGroupPageResp.java

@@ -1,55 +0,0 @@
-package com.platform.response.deviceGroup;
-
-import com.platform.entity.IotDeviceGroup;
-import lombok.Data;
-
-import java.io.Serial;
-import java.io.Serializable;
-
-/**
- * @Author: 马超伟
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-
-@Data
-public class IotDeviceGroupPageResp implements Serializable {
-
-    @Serial
-    private static final long serialVersionUID = 4129323442919345144L;
-
-    /**
-     * 主键ID
-     */
-    private Long id;
-
-    /**
-     * 设备分组码值
-     */
-    private String deviceGroupCode;
-
-    /**
-     * 设备分组名称
-     */
-    private String title;
-
-    private static IotDeviceGroupPageResp getInstance() {
-        return new IotDeviceGroupPageResp();
-    }
-
-
-    public static IotDeviceGroupPageResp toDevicePageResp(IotDeviceGroup deviceGroup) {
-        if (deviceGroup == null) {
-            return new IotDeviceGroupPageResp();
-        }
-        IotDeviceGroupPageResp deviceGroupPageResp = IotDeviceGroupPageResp.getInstance();
-        deviceGroupPageResp.setId(deviceGroup.getId());
-        deviceGroupPageResp.setDeviceGroupCode(deviceGroup.getDeviceGroupCode());
-        deviceGroupPageResp.setTitle(deviceGroup.getTitle());
-        return deviceGroupPageResp;
-
-    }
-
-}

+ 0 - 90
iot-platform-manager/src/main/java/com/platform/response/mod/IotModResp.java

@@ -1,90 +0,0 @@
-package com.platform.response.mod;
-
-
-import com.platform.entity.IotMod;
-import lombok.Data;
-
-/**
- * Author: donglang
- * Time: 2025-10-09
- * Des: 物理模型详情模型
- * Version: 1.0
- */
-
-@Data
-public class IotModResp {
-
-    /**
-     * 主键ID
-     */
-    private Long id;
-
-    /**
-     * 租户id
-     */
-    private String tenantId;
-
-    /**
-     * 所属客户id
-     */
-    private Long companyId;
-
-    /**
-     * 物模型分组码值
-     */
-    private String modeGroupCode;
-
-    /**
-     * 物模型分组名称
-     */
-    private String modeGroupName;
-
-    /**
-     * 物理模型码值
-     */
-    private String modCode;
-
-    /**
-     * 物模型名称
-     */
-    private String name;
-
-    /**
-     * 备注
-     */
-    private String remarks;
-
-    /**
-     * 包含JSON
-     */
-    private String tslJson;
-
-    /**
-     * 设备数 (统计关联的设备数量,iot_mod表里num字段无效)
-     */
-    private Integer num;
-
-
-    private static IotModResp getInstance(){
-        return new IotModResp();
-    }
-
-
-    public static IotModResp toIotPageResp(IotMod iotMod){
-        if (iotMod == null) {
-            return new IotModResp();
-        }
-        IotModResp iotModPageResp = IotModResp.getInstance();
-        iotModPageResp.setId(iotMod.getId());
-        iotModPageResp.setTenantId(iotMod.getTenantId());
-        iotModPageResp.setCompanyId(iotMod.getCompanyId());
-        iotModPageResp.setModeGroupCode(iotMod.getModeGroupCode());
-        iotModPageResp.setModCode(iotMod.getModCode());
-        iotModPageResp.setName(iotMod.getName());
-        iotModPageResp.setRemarks(iotMod.getRemarks());
-        iotModPageResp.setTslJson(iotMod.getTslJson());
-
-        return iotModPageResp;
-    }
-
-}

+ 0 - 64
iot-platform-manager/src/main/java/com/platform/response/modGroup/IotModGroupPageResp.java

@@ -1,64 +0,0 @@
-package com.platform.response.modGroup;
-
-import com.platform.entity.IotModGroup;
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-
-/**
- * 物联模型分组响应参数
- * Author: donglang
- * Time: 2025-10-09
- * Des: 物理模型详情模型
- * Version: 1.0
- */
-@Schema(description = "物联模型分组响应参数")
-@Data
-public class IotModGroupPageResp {
-
-    /**
-     * 主键ID
-     */
-    @Schema(description = "分组ID", example = "1")
-    private Long id;
-
-    /**
-     * 所属客户id
-     */
-    @Schema(description = "所属客户ID", example = "1001")
-    private Long companyId;
-
-    /**
-     * 租户id
-     */
-    @Schema(description = "租户ID", example = "tenant001")
-    private String tenantId;
-
-    /**
-     * 物理模型分组码值唯一标识
-     */
-    @Schema(description = "模型分组码值", example = "MOD_GROUP_001")
-    private String modeGroupCode;
-
-    /**
-     * 物模型分组名称
-     */
-    @Schema(description = "模型分组名称", example = "温度传感器分组")
-    private String name;
-
-    private static IotModGroupPageResp getInstance() {
-        return new IotModGroupPageResp();
-    }
-
-    public static IotModGroupPageResp toIotPageResp(IotModGroup iotModGroup) {
-        if (iotModGroup == null) {
-            return new IotModGroupPageResp();
-        }
-        IotModGroupPageResp iotModDetailResp = IotModGroupPageResp.getInstance();
-        iotModDetailResp.setId(iotModGroup.getId());
-        iotModDetailResp.setCompanyId(iotModGroup.getCompanyId());
-        iotModDetailResp.setTenantId(null);
-        iotModDetailResp.setModeGroupCode(iotModGroup.getModeGroupCode());
-        iotModDetailResp.setName(iotModGroup.getName());
-        return iotModDetailResp;
-    }
-}

+ 0 - 15
iot-platform-manager/src/main/java/com/platform/service/IotDeviceErrorService.java

@@ -1,15 +0,0 @@
-package com.platform.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.platform.entity.IotDeviceError;
-
-/**
- * @Author: chenxiafei
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-
-public interface IotDeviceErrorService extends IService<IotDeviceError> {
-}

+ 0 - 54
iot-platform-manager/src/main/java/com/platform/service/IotDeviceGroupService.java

@@ -1,54 +0,0 @@
-package com.platform.service;
-
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.platform.entity.IotDeviceGroup;
-
-/**
- * @Author: chenxiaofei
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-
-public interface IotDeviceGroupService extends IService<IotDeviceGroup> {
-    IotDeviceGroup getOneByTitle(String title);
-
-    /**
-     *  添加物联设备分组
-     * @param iotDeviceGroup 设备分组信息
-     * @return 结果
-     */
-    Boolean addDeviceGroup(IotDeviceGroup iotDeviceGroup);
-
-    /**
-     *  修改物联设备分组
-     * @param iotDeviceGroup 设备分组信息
-     * @return 修改结果
-     */
-    Boolean updateDeviceGroup(IotDeviceGroup iotDeviceGroup);
-
-    /**
-     * 删除设备分组
-     * @param deviceGroupCode 设备分组码值
-     * @return 删除结果
-     */
-    Boolean delDeviceGroup(String deviceGroupCode);
-
-    /**
-     *  设备分组详情查询
-     * @param iotDeviceGroup 设备分组信息
-     * @return  设备分组详情
-     */
-    IotDeviceGroup getDeviceGroupDetail(IotDeviceGroup iotDeviceGroup);
-
-    /**
-     * 分页查询设备分组
-     * @param current 当前页
-     * @param pageSize 每页数量
-     * @param iotDeviceGroup 设备分组信息
-     * @return 分页结果
-     */
-    Page pageGroupDevice(Integer current ,Integer pageSize,IotDeviceGroup iotDeviceGroup);
-}

+ 0 - 20
iot-platform-manager/src/main/java/com/platform/service/IotDeviceService.java

@@ -1,20 +0,0 @@
-package com.platform.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.platform.entity.IotDevice;
-
-/**
- * @Author: chenxiaofei
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-
-public interface IotDeviceService extends IService<IotDevice> {
-    IotDevice getOneByName(String deviceName);
-
-    Boolean deleteDevice(String guid);
-
-    IotDevice getOneByGuid(String guid);
-}

+ 0 - 15
iot-platform-manager/src/main/java/com/platform/service/IotModErrorService.java

@@ -1,15 +0,0 @@
-package com.platform.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.platform.entity.IotModError;
-
-/**
- * @Author: chenxiaofei
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-
-public interface IotModErrorService extends IService<IotModError> {
-}

+ 0 - 22
iot-platform-manager/src/main/java/com/platform/service/IotModGroupService.java

@@ -1,22 +0,0 @@
-package com.platform.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.platform.entity.IotModGroup;
-
-/**
- * @Author: chenxiaofei
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-
-public interface IotModGroupService extends IService<IotModGroup> {
-    /**
-     * 根据姓名查询
-     * @param modGroupName
-     * @return
-     */
-    IotModGroup getOneByName(String modGroupName);
-    
-}

+ 0 - 26
iot-platform-manager/src/main/java/com/platform/service/IotModService.java

@@ -1,26 +0,0 @@
-package com.platform.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.platform.entity.IotMod;
-
-/**
- * @Author: chenxiaofei
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-public interface IotModService extends IService<IotMod> {
-
-    /**
-     * 根据姓名查询
-     * @param modName
-     * @return
-     */
-    IotMod getOneByName(String modName);
-
-
-
-
-
-}

+ 0 - 15
iot-platform-manager/src/main/java/com/platform/service/SaasEquipmentManageService.java

@@ -1,15 +0,0 @@
-package com.platform.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.platform.entity.SaasEquipmentManage;
-
-/**
- * @Author: 马超伟
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-
-public interface SaasEquipmentManageService extends IService<SaasEquipmentManage> {
-}

+ 0 - 136
iot-platform-manager/src/main/java/com/platform/service/TaosService.java

@@ -1,136 +0,0 @@
-package com.platform.service;
-
-import com.platform.api.request.VehicleDataRequest;
-import com.platform.api.request.VehicleDataSaveRequest;
-import com.platform.entity.VehicleTimeSeriesData;
-
-import java.util.List;
-
-/**
- * @Author: donglang
- * @CreateTime: 2025-10-09
- * @Description: TaosSerivce
- * @Version: 1.0
- */
-
-public interface TaosService {
-
-    /**
-     * 插入车辆数据到时序子表
-     * @param vehicleDataList
-     * @return
-     */
-    List<String> batchInsertVehicleData(List<VehicleDataSaveRequest> vehicleDataList);
-
-    /**
-     * 插入车辆数据到时序子表
-     * @param uniqueKeys
-     * @return
-     */
-    void batchDelete(List<String> uniqueKeys);
-
-    /**
-     * 通过运单号查询时序数据
-     * @param request
-     * @return
-     */
-    List<VehicleTimeSeriesData> selectByWOrderNo(VehicleDataRequest request);
-
-
-    /**
-     * 通过车牌查询时序数据
-     * @param request
-     * @return
-     */
-    List<VehicleTimeSeriesData> selectByCarNo(String subTableName, VehicleDataRequest request);
-
-    /**
-     * 通过车牌查询时序数据
-
-     * @param carNo 车辆数据实体
-     * @return 返回的车辆数据
-     */
-    VehicleTimeSeriesData selectRealTimeLocation(String subTableName, String carNo);
-
-
-
-
-
-    /**
-     * 创建水表子表
-     * @param code
-     * @param deviceId
-     */
-    void createWaterMeterSubTable(String code, String deviceId);
-
-    /**
-     * 创建水表子表
-     * @param code
-     * @param deviceId
-     */
-    void createElectricMeterSubTable(String code, String deviceId);
-
-    /**
-     * 创建边坡检测子表
-     * @param code
-     * @param deviceId
-     */
-    void createSlopeMonitorSubTable(String code, String deviceId);
-
-    /**
-     * 创建视频监控子表
-     * @param code
-     * @param deviceId
-     */
-    void createDeviceMonitorSubTable(String code, String deviceId);
-
-    /**
-     * 创建矿卡子表
-     * @param code
-     * @param deviceId
-     */
-    void createMineTruckMonitorSubTable(String code, String deviceId);
-
-    /**
-     * 创建皮带称重数据子表
-     * @param code
-     * @param deviceId
-     */
-    void createBeltScaleDataSubTable(String code, String deviceId);
-
-    /**
-     * 创建环境检查子表
-     * @param code
-     * @param deviceId
-     */
-    void createEnvironmentCheckSubTable(String code, String deviceId);
-
-    /**
-     * 创建无人地磅子表
-     * @param code
-     * @param deviceId
-     */
-    void createWeighbridgeDataSubTable(String code, String deviceId);
-
-    /**
-     * 创建排放检测数据子表
-     * @param code
-     * @param deviceId
-     */
-    void createEmissionDataSubTable(String code, String deviceId);
-
-    /**
-     * 创建车辆数据子表
-     * @param code
-     * @param deviceId
-     */
-    void createVehicleDataSubTable(String code, String deviceId);
-
-    /**
-     * 创建装载机械数据子表
-     * @param code
-     * @param deviceId
-     */
-    void createLoadingEquipmentDataSubTable(String code, String deviceId);
-
-}

+ 0 - 15
iot-platform-manager/src/main/java/com/platform/service/TimeSeriesDatabaseMappingService.java

@@ -1,15 +0,0 @@
-package com.platform.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.platform.entity.TimeSeriesDatabaseMapping;
-
-/**
- * @Author: chenxiaofei
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-
-public interface TimeSeriesDatabaseMappingService extends IService<TimeSeriesDatabaseMapping> {
-}

+ 0 - 17
iot-platform-manager/src/main/java/com/platform/service/VehicleDataService.java

@@ -1,17 +0,0 @@
-package com.platform.service;
-
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.platform.entity.VehicleData;
-
-/**
- * Author: donglang
- * Time: 2025-10-13
- * Des: 车辆业务service
- * Version: 1.0
- */
-
-public interface VehicleDataService extends IService<VehicleData> {
-
-
-}

+ 0 - 18
iot-platform-manager/src/main/java/com/platform/service/impl/IotDeviceErrorServiceImpl.java

@@ -1,18 +0,0 @@
-package com.platform.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.platform.entity.IotDeviceError;
-import com.platform.mapper.IotDeviceErrorMapper;
-import com.platform.service.IotDeviceErrorService;
-import org.springframework.stereotype.Service;
-
-/**
- * @Author: chenxiaofei
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-@Service
-public class IotDeviceErrorServiceImpl extends ServiceImpl<IotDeviceErrorMapper, IotDeviceError> implements IotDeviceErrorService {
-}

+ 0 - 67
iot-platform-manager/src/main/java/com/platform/service/impl/IotDeviceGroupServiceImpl.java

@@ -1,67 +0,0 @@
-package com.platform.service.impl;
-
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.platform.entity.IotDeviceGroup;
-import com.platform.mapper.IotDeviceGroupMapper;
-import com.platform.service.IotDeviceGroupService;
-import org.springframework.stereotype.Service;
-
-/**
- * @Author: chenxiaofei
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-@Service
-public class IotDeviceGroupServiceImpl extends ServiceImpl<IotDeviceGroupMapper, IotDeviceGroup> implements IotDeviceGroupService {
-    @Override
-    public IotDeviceGroup getOneByTitle(String title) {
-        return getOne( Wrappers.<IotDeviceGroup>lambdaQuery()
-                .eq(IotDeviceGroup::getTitle,title)
-                .eq(IotDeviceGroup::getDelFlag,0)
-                .last("limit 1"));
-    }
-
-    @Override
-    public Boolean addDeviceGroup(IotDeviceGroup iotDeviceGroup) {
-        return save(iotDeviceGroup);
-    }
-
-    @Override
-    public Boolean updateDeviceGroup(IotDeviceGroup iotDeviceGroup) {
-
-        return update(iotDeviceGroup,Wrappers.<IotDeviceGroup>lambdaUpdate()
-                .eq(IotDeviceGroup::getDeviceGroupCode,iotDeviceGroup.getDeviceGroupCode())
-                .eq(IotDeviceGroup::getDelFlag,0));
-    }
-
-    @Override
-    public Boolean delDeviceGroup(String deviceGroupCode) {
-        IotDeviceGroup iotDeviceGroup = new IotDeviceGroup();
-        iotDeviceGroup.setDelFlag(1);
-        return update(iotDeviceGroup,Wrappers.<IotDeviceGroup>lambdaUpdate()
-                .eq(IotDeviceGroup::getDeviceGroupCode,deviceGroupCode));
-    }
-
-    @Override
-    public IotDeviceGroup getDeviceGroupDetail(IotDeviceGroup iotDeviceGroup) {
-        return getOne(Wrappers.<IotDeviceGroup>lambdaQuery()
-                .eq(IotDeviceGroup::getDeviceGroupCode,iotDeviceGroup.getDeviceGroupCode())
-                .eq(IotDeviceGroup::getDelFlag,0)
-                .last("limit 1"));
-    }
-
-    @Override
-    public Page pageGroupDevice(Integer current, Integer pageSize, IotDeviceGroup iotDeviceGroup) {
-        Page<IotDeviceGroup> page = new Page<>(current, pageSize);
-        return page(page,Wrappers.<IotDeviceGroup>lambdaQuery()
-                .eq(IotDeviceGroup::getDelFlag,0)
-                .orderByDesc(IotDeviceGroup::getCreateTime)
-                .orderByDesc(IotDeviceGroup::getId));
-    }
-
-
-}

+ 0 - 40
iot-platform-manager/src/main/java/com/platform/service/impl/IotDeviceServiceImpl.java

@@ -1,40 +0,0 @@
-package com.platform.service.impl;
-
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.platform.entity.IotDevice;
-import com.platform.mapper.IotDeviceMapper;
-import com.platform.service.IotDeviceService;
-import org.springframework.stereotype.Service;
-
-/**
- * @Author: chenxiaofei
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-@Service
-public class IotDeviceServiceImpl extends ServiceImpl<IotDeviceMapper, IotDevice> implements IotDeviceService {
-    @Override
-    public IotDevice getOneByName(String deviceName) {
-        return getOne(Wrappers.<IotDevice>lambdaQuery()
-                .eq(IotDevice::getDeviceName,deviceName)
-                .last("limit 1"));
-    }
-
-    @Override
-    public Boolean deleteDevice(String guid) {
-        IotDevice iotDevice = new IotDevice();
-        iotDevice.setDelFlag(1);
-        return update(iotDevice,Wrappers.<IotDevice>lambdaQuery()
-                .eq(IotDevice::getGuid, guid));
-    }
-
-    @Override
-    public IotDevice getOneByGuid(String guid) {
-        return getOne(Wrappers.<IotDevice>lambdaQuery()
-                .eq(IotDevice::getGuid,guid)
-                .last("limit 1"));
-    }
-}

+ 0 - 18
iot-platform-manager/src/main/java/com/platform/service/impl/IotModErrorServiceImpl.java

@@ -1,18 +0,0 @@
-package com.platform.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.platform.entity.IotModError;
-import com.platform.mapper.IotModErrorMapper;
-import com.platform.service.IotModErrorService;
-import org.springframework.stereotype.Service;
-
-/**
- * @Author: chenxiaofei
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-@Service
-public class IotModErrorServiceImpl extends ServiceImpl<IotModErrorMapper, IotModError> implements IotModErrorService {
-}

+ 0 - 28
iot-platform-manager/src/main/java/com/platform/service/impl/IotModGroupServiceImpl.java

@@ -1,28 +0,0 @@
-package com.platform.service.impl;
-
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.platform.entity.IotModGroup;
-import com.platform.mapper.IotModGroupMapper;
-import com.platform.service.IotModGroupService;
-import org.springframework.stereotype.Service;
-
-/**
- * @Author: 马超伟
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-@Service
-public class IotModGroupServiceImpl extends ServiceImpl<IotModGroupMapper, IotModGroup> implements IotModGroupService {
-
-
-    @Override
-    public IotModGroup getOneByName(String modGroupName) {
-        return getOne(Wrappers.<IotModGroup>lambdaQuery()
-                .eq(IotModGroup::getName, modGroupName)
-                .last("limit 1"));
-
-    }
-}

+ 0 - 27
iot-platform-manager/src/main/java/com/platform/service/impl/IotModServiceImpl.java

@@ -1,27 +0,0 @@
-package com.platform.service.impl;
-
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.platform.entity.IotMod;
-import com.platform.mapper.IotModMapper;
-import com.platform.service.IotModService;
-import org.springframework.stereotype.Service;
-
-/**
- * @Author: cehnxiaofei
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-@Service
-public class IotModServiceImpl extends ServiceImpl<IotModMapper, IotMod> implements IotModService {
-
-
-    @Override
-    public IotMod getOneByName(String modName) {
-        return getOne(Wrappers.<IotMod>lambdaQuery()
-                .eq(IotMod::getName, modName)
-                .last("limit 1"));
-    }
-}

+ 0 - 20
iot-platform-manager/src/main/java/com/platform/service/impl/SaasEquipmentManageServiceImpl.java

@@ -1,20 +0,0 @@
-package com.platform.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-
-/**
- * @Author: 马超伟
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-
-import com.platform.mapper.SaasEquipmentManageMapper;
-import com.platform.entity.SaasEquipmentManage;
-import com.platform.service.SaasEquipmentManageService;
-import org.springframework.stereotype.Service;
-
-@Service
-public class SaasEquipmentManageServiceImpl extends ServiceImpl<SaasEquipmentManageMapper, SaasEquipmentManage> implements SaasEquipmentManageService {
-}

+ 0 - 143
iot-platform-manager/src/main/java/com/platform/service/impl/TaosServiceImpl.java

@@ -1,143 +0,0 @@
-package com.platform.service.impl;
-
-
-import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
-import com.platform.api.request.VehicleDataRequest;
-import com.platform.api.request.VehicleDataSaveRequest;
-import com.platform.entity.VehicleTimeSeriesData;
-import com.platform.mapper.TaosMapper;
-import com.platform.service.TaosService;
-import jakarta.annotation.Resource;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * @Author: donglang
- * @CreateTime: 2025-10-09
- * @Description: TaosServiceImpl
- * @Version: 1.0
- */
-
-@Service
-@Slf4j
-public class TaosServiceImpl implements TaosService {
-
-    @Resource
-    private TaosMapper taosMapper;
-
-
-    /**
-     * 插入车辆数据到时序子表
-     * @param vehicleDataList
-     * @return
-     */
-    @Override
-    public List<String> batchInsertVehicleData(List<VehicleDataSaveRequest> vehicleDataList) {
-        try {
-            log.info("开始创建表");
-            taosMapper.createVehicleDataTable();
-            log.info("创建表成功, 开始插入数据");
-            taosMapper.batchInsertVehicleData(vehicleDataList);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return new ArrayList<>();
-    }
-
-    /**
-     * 通过唯一标识批量删除
-     * @param uniqueKeys
-     */
-    @Override
-    public void batchDelete(List<String> uniqueKeys) {
-        if (CollectionUtils.isNotEmpty(uniqueKeys)) {
-            taosMapper.batchDelete(uniqueKeys);
-        }
-    }
-
-    /**
-     * 通过运单号查询时序数据
-     */
-    @Override
-    public List<VehicleTimeSeriesData> selectByWOrderNo(VehicleDataRequest request) {
-        return taosMapper.selectByWOrderNo(request.getwOrderNo(), request.getStartTime(), request.getEndTime());
-    }
-
-    /**
-     * 通过车牌查询时序数据
-     */
-    @Override
-    public List<VehicleTimeSeriesData> selectByCarNo(String subTableName, VehicleDataRequest request) {
-        return taosMapper.selectByCarNo(subTableName, request.getCarNo(), request.getStartTime(), request.getEndTime());
-    }
-
-    /**
-     * 通过车牌查询时序数据
-     */
-    @Override
-    public VehicleTimeSeriesData selectRealTimeLocation(String subTableName, String carNo) {
-        return taosMapper.selectRealTimeLocation(subTableName, carNo);
-    }
-
-
-    @Override
-    public void createWaterMeterSubTable(String code, String deviceId) {
-        taosMapper.createWaterMeterSubTable(code, deviceId);
-    }
-
-    @Override
-    public void createElectricMeterSubTable(String code, String deviceId) {
-        taosMapper.createElectricMeterSubTable(code, deviceId);
-    }
-
-    @Override
-    public void createSlopeMonitorSubTable(String code, String deviceId) {
-        taosMapper.createSlopeMonitorSubTable(code, deviceId);
-    }
-
-    @Override
-    public void createDeviceMonitorSubTable(String code, String deviceId) {
-        taosMapper.createDeviceMonitorSubTable(code, deviceId);
-    }
-
-    @Override
-    public void createMineTruckMonitorSubTable(String code, String deviceId) {
-        taosMapper.createMineTruckMonitorSubTable(code, deviceId);
-    }
-
-    @Override
-    public void createBeltScaleDataSubTable(String code, String deviceId) {
-        taosMapper.createBeltScaleDataSubTable(code, deviceId);
-    }
-
-    @Override
-    public void createEnvironmentCheckSubTable(String code, String deviceId) {
-        taosMapper.createEnvironmentCheckSubTable(code, deviceId);
-    }
-
-    @Override
-    public void createWeighbridgeDataSubTable(String code, String deviceId) {
-        taosMapper.createWeighbridgeDataSubTable(code, deviceId);
-    }
-
-    @Override
-    public void createEmissionDataSubTable(String code, String deviceId) {
-        taosMapper.createEmissionDataSubTable(code, deviceId);
-    }
-
-    @Override
-    public void createVehicleDataSubTable(String code, String deviceId) {
-        taosMapper.createVehicleDataSubTable(code, deviceId);
-    }
-
-    @Override
-    public void createLoadingEquipmentDataSubTable(String code, String deviceId) {
-        taosMapper.createLoadingEquipmentDataSubTable(code, deviceId);
-    }
-
-}

+ 0 - 18
iot-platform-manager/src/main/java/com/platform/service/impl/TimeSeriesDatabaseMappingServiceImpl.java

@@ -1,18 +0,0 @@
-package com.platform.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.platform.entity.TimeSeriesDatabaseMapping;
-import com.platform.mapper.TimeSeriesDatabaseMappingMapper;
-import com.platform.service.TimeSeriesDatabaseMappingService;
-import org.springframework.stereotype.Service;
-
-/**
- * @Author: 马超伟
- * @CreateTime: 2025-10-09
- * @Description:
- * @Version: 1.0
- */
-
-@Service
-public class TimeSeriesDatabaseMappingServiceImpl extends ServiceImpl<TimeSeriesDatabaseMappingMapper, TimeSeriesDatabaseMapping> implements TimeSeriesDatabaseMappingService {
-}

+ 0 - 24
iot-platform-manager/src/main/java/com/platform/service/impl/VehicleDataServiceImpl.java

@@ -1,24 +0,0 @@
-package com.platform.service.impl;
-
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.platform.entity.VehicleData;
-import com.platform.mapper.VehicleDataMapper;
-import com.platform.service.VehicleDataService;
-import org.springframework.stereotype.Service;
-
-/**
- * Author: donglang
- * Time: 2025-10-13
- * Des: 车辆业务实现类
- * Version: 1.0
- */
-
-@Service
-public class VehicleDataServiceImpl extends ServiceImpl<VehicleDataMapper, VehicleData> implements VehicleDataService {
-
-
-
-
-
-}

+ 0 - 347
iot-platform-manager/src/main/resources/mapper/TaosMapper.xml

@@ -1,347 +0,0 @@
-<?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.platform.mapper.TaosMapper">
-
-
-    <!-- 创建车辆数超级表-->
-    <update id="createVehicleDataTable">
-        CREATE  STABLE IF NOT EXISTS vehicle_data (
-            ts TIMESTAMP ,
-            longitude NCHAR(100) ,
-            latitude NCHAR(100) ,
-            speed FLOAT,
-            direction FLOAT,
-            fuel_level FLOAT,
-            mileage NCHAR(100),
-            engine_temp FLOAT,
-            battery_voltage FLOAT,
-            status NCHAR(50),
-            alarm_code NCHAR(100) ,
-            w_order_no NCHAR(50)
-        ) TAGS (
-            car_no NCHAR(20)
-        )
-    </update>
-
-
-
-    <!-- 创建车辆数据子表-->
-    <update id="createVehicleDataSubTable">
-        CREATE TABLE IF NOT EXISTS vehicle_data_${carNo} USING vehicle_data
-            TAGS (#{car_no})
-    </update>
-
-    <!-- 批量插入车辆数据时序数据库子表 -->
-    <insert id="batchInsertVehicleData">
-        INSERT INTO
-        <foreach collection="list" item="request" separator=",">
-            vehicle_data_${request.vehicleDataVO.carNo}
-            USING vehicle_data
-            TAGS (#{request.vehicleDataVO.carNo})
-            VALUES (
-            #{request.ts},
-            #{request.longitude},
-            #{request.latitude},
-            #{request.speed},
-            #{request.direction},
-            #{request.fuelLevel},
-            #{request.mileage},
-            #{request.engineTemp},
-            #{request.batteryVoltage},
-            #{request.status},
-            #{request.alarmCode},
-            #{request.wOrderNo}
-            )
-        </foreach>
-    </insert>
-
-
-    <!-- 批量删除时序库数据:根据唯一标识(carNo+ts) -->
-    <delete id="batchDelete">
-        <foreach collection="uniqueKeys" item="key" separator=";">
-            <bind name="carNo" value='key.split("_")[0]' />
-            <bind name="ts" value='key.split("_")[1]' />
-            DELETE FROM vehicle_data_${carNo}
-            WHERE ts = #{ts}
-        </foreach>
-    </delete>
-
-
-
-
-    <!-- 通过运单号查询时序数据(聚合超级表下所有子表) -->
-    <select id="selectByWOrderNo" resultType="com.platform.entity.VehicleTimeSeriesData">
-        SELECT
-        ts,
-        longitude,
-        latitude,
-        speed,
-        direction,
-        fuel_level,
-        mileage,
-        status,
-        alarm_code,
-        w_order_no,
-        car_no
-        FROM vehicle_data
-        WHERE
-            w_order_no = #{wOrderNo}
-            <if test="startTime != null">
-                <![CDATA[ AND ts >= #{startTime} ]]>
-            </if>
-            <if test="endTime != null">
-                <![CDATA[ AND ts <= #{endTime} ]]>
-            </if>
-        ORDER BY ts DESC
-    </select>
-
-
-    <!-- 通过车牌查询时序数据(聚合超级表下所有子表) -->
-    <select id="selectByCarNo" resultType="com.platform.entity.VehicleTimeSeriesData">
-        SELECT
-            ts,
-            longitude,
-            latitude,
-            speed,
-            direction,
-            fuel_level,
-            mileage,
-            status,
-            alarm_code,
-            w_order_no,
-            '${carNo}' AS carNo
-        FROM  ${subTableName}
-        WHERE 1=1
-            <if test="startTime != null">
-                <![CDATA[ AND ts >= #{startTime} ]]>
-            </if>
-            <if test="endTime != null">
-                <![CDATA[ AND ts <= #{endTime} ]]>
-            </if>
-        ORDER BY ts DESC
-    </select>
-
-
-    <!-- 查询最新经纬度:取子表中时间戳最大的一条数据 -->
-    <select id="selectRealTimeLocation" resultType="com.platform.entity.VehicleTimeSeriesData">
-        SELECT
-            longitude,
-            latitude,
-            ts,
-            speed,
-            '${carNo}' AS carNo
-        FROM ${subTableName}
-        ORDER BY ts DESC
-            LIMIT 1
-    </select>
-
-
-
-    <!-- 创建水表子表-->
-    <update id="createWaterMeterSubTable">
-        CREATE TABLE IF NOT EXISTS water_meter_${code}_${deviceId} USING water_meter
-            TAGS (
-                     #{deviceId},
-                     #{deviceName},
-                     #{groupId},
-                     #{groupName},
-                     #{bizId},
-                     #{bizName},
-                     #{projectId},
-                     #{projectName},
-                     #{location},
-                     #{longitude},
-                     #{latitude},
-                     #{tenantId}
-        )
-    </update>
-
-    <!-- 创建电表子表-->
-    <update id="createElectricMeterSubTable">
-        CREATE TABLE IF NOT EXISTS electric_meter_${code}_${deviceId} USING electric_meter
-            TAGS (
-                     #{deviceId},
-                     #{deviceName},
-                     #{groupId},
-                     #{groupName},
-                     #{bizId},
-                     #{bizName},
-                     #{projectId},
-                     #{projectName},
-                     #{location},
-                     #{longitude},
-                     #{latitude},
-                     #{tenantId}
-        )
-    </update>
-
-
-    <!-- 创建边坡检测子表-->
-    <update id="createSlopeMonitorSubTable">
-        CREATE TABLE IF NOT EXISTS slope_monitor_${code}_${deviceId} USING slope_monitor
-            TAGS (
-                     #{deviceId},
-                     #{deviceName},
-                     #{groupId},
-                     #{groupName},
-                     #{bizId},
-                     #{bizName},
-                     #{projectId},
-                     #{projectName},
-                     #{location},
-                     #{longitude},
-                     #{latitude},
-                     #{tenantId}
-        )
-    </update>
-
-    <!-- 创建视频监控子表-->
-    <update id="createDeviceMonitorSubTable">
-        CREATE TABLE IF NOT EXISTS device_monitor_${code}_${deviceId} USING device_monitor
-            TAGS (
-                     #{deviceId},
-                     #{deviceName},
-                     #{groupId},
-                     #{groupName},
-                     #{bizId},
-                     #{bizName},
-                     #{projectId},
-                     #{projectName},
-                     #{location},
-                     #{longitude},
-                     #{latitude},
-                     #{tenantId}
-        )
-    </update>
-
-
-    <!-- 创建矿卡子表-->
-    <update id="createMineTruckMonitorSubTable">
-        CREATE TABLE IF NOT EXISTS device_monitor_${code}_${deviceId} USING mine_truck
-            TAGS (
-                     #{truckId},
-                     #{truckModel},
-                     #{teamId},
-                     #{miningArea},
-                     #{driverId},
-                     #{maxLoad},
-                     #{deviceId},
-                     #{deviceName},
-                     #{groupId},
-                     #{groupName},
-                     #{bizId},
-                     #{bizName},
-                     #{projectId},
-                     #{projectName},
-                     #{location},
-                     #{tenantId}
-        )
-    </update>
-
-
-    <!-- 创建皮带称重数据子表-->
-    <update id="createBeltScaleDataSubTable">
-        CREATE TABLE IF NOT EXISTS belt_scale_data_${code}_${deviceId} USING belt_scale_data
-            TAGS (
-                     #{materialType},
-                     #{deviceId},
-                     #{deviceName},
-                     #{groupId},
-                     #{groupName},
-                     #{bizId},
-                     #{bizName},
-                     #{projectId},
-                     #{projectName},
-                     #{location},
-                     #{longitude},
-                     #{latitude},
-                     #{tenantId}
-        )
-    </update>
-
-    <!-- 创建环境检查子表-->
-    <update id="createEnvironmentCheckSubTable">
-        CREATE TABLE IF NOT EXISTS environment_check_${code}_${deviceId} USING environment_check
-            TAGS (
-                     #{deviceId},
-                     #{deviceName},
-                     #{groupId},
-                     #{groupName},
-                     #{bizId},
-                     #{bizName},
-                     #{projectId},
-                     #{projectName},
-                     #{location},
-                     #{longitude},
-                     #{latitude},
-                     #{tenantId}
-        )
-    </update>
-
-    <!-- 创建无人地磅子表-->
-    <update id="createWeighbridgeDataSubTable">
-        CREATE TABLE IF NOT EXISTS weighbridge_data_${code}_${deviceId} USING weighbridge_data
-            TAGS (
-                     #{deviceId},
-                     #{deviceName},
-                     #{groupId},
-                     #{groupName},
-                     #{bizId},
-                     #{bizName},
-                     #{projectId},
-                     #{projectName},
-                     #{location},
-                     #{longitude},
-                     #{latitude},
-                     #{tenantId}
-        )
-    </update>
-
-    <!-- 创建排放检测数据子表-->
-    <update id="createEmissionDataSubTable">
-        CREATE TABLE IF NOT EXISTS emission_data_${code}_${deviceId} USING emission_data
-            TAGS (
-                     #{deviceId},
-                     #{deviceName},
-                     #{groupId},
-                     #{groupName},
-                     #{bizId},
-                     #{bizName},
-                     #{projectId},
-                     #{projectName},
-                     #{location},
-                     #{longitude},
-                     #{latitude},
-                     #{tenantId}
-        )
-    </update>
-
-
-    <!-- 创建装载机械数据子表-->
-    <update id="createLoadingEquipmentDataSubTable">
-        CREATE TABLE IF NOT EXISTS loading_equipment_data_${code}_${deviceId} USING loading_equipment_data
-            TAGS (
-                     #{deviceId},
-                     #{deviceName},
-                     #{groupId},
-                     #{groupName},
-                     #{bizId},
-                     #{bizName},
-                     #{projectId},
-                     #{projectName},
-                     #{location},
-                     #{longitude},
-                     #{latitude},
-                     #{tenantId}
-        )
-    </update>
-
-
-
-
-</mapper>
-
-
-

+ 0 - 224
sql/2025/11/create_cxf.sql

@@ -1,224 +0,0 @@
-create table iot_device
-(
-    id          bigint unsigned auto_increment primary key,
-    company_id  bigint unsigned              not null default  0  comment '所属客户id',
-    guid        varchar(255)                 not null default ''  comment '唯一标识[暂时保留]',
-    device_group_code  varchar(255)          not null default ''  comment '设备分组码值',
-    device_code varchar(255)                 not null default ''  comment '设备编号',
-    sn          varchar(255)                 not null default ''  comment 'sn通常是:IMEI',
-    mod_code    varchar(255)                 not null default ''  comment '物联网模型码值',
-    device_name varchar(255)                 not null default ''  comment '设备名称[旧系统的title]',
-    brand       varchar(255)                 not null default ''  comment '设备品牌名称',
-    model_code  varchar(255)                 not null default ''  comment '型号',
-    description varchar(1024)                not null default ''  comment '最后一次设备更新信息值[旧系统的desc]',
-    remarks     varchar(255) charset utf8mb4 not null default ''  comment '备注',
-    status      tinyint unsigned             not null default 1   comment '1在线2离线3异常',
-    longitude   varchar(40)                  not null default ''  comment '经度[lng]',
-    latitude    varchar(40)                  not null default ''  comment '纬度[lat]',
-    high        varchar(40)                  not null default ''  comment '高度',
-    create_time datetime                     not null default current_timestamp comment '创建时间',
-    update_time datetime                     not null default current_timestamp on update CURRENT_TIMESTAMP comment '更新时间',
-    create_user varchar(255)                 not null default '' comment '创建人',
-    update_user varchar(255)                 not null default '' comment '更新人',
-    del_flag    tinyint                      not null default 0 comment '0-未删除,1-删除',
-    eg_id       bigint                       not null default -1  comment '设备类别',
-    tenant_id   varchar(128)                 not null default ''  comment '租户id',
-    constraint guid unique (guid)
-) comment '设备表';
-
-
-create table iot_device_group
-(
-    id          bigint unsigned auto_increment  primary key,
-    device_group_code  varchar(255)       not null default '' comment '设备分组码值',
-    company_id   bigint                       not null default 0  comment '所属客户id',
-    title       varchar(255)                 not null default '' comment '设备分组名称',
-    large_type  tinyint unsigned             not null default 0  comment '[有点晕?]1-12(车辆、装载机、矿卡、人员、水表、电表、边坡监控、视频监控、皮带称重、环境监测、无人地磅、排放监测)',
-    del_flag    tinyint                      not null default 0  comment '0-未删除,1-删除',
-    create_time datetime                     not null default CURRENT_TIMESTAMP comment '创建时间',
-    update_time datetime                     not null default current_timestamp on update CURRENT_TIMESTAMP comment '更新时间',
-    create_user varchar(255)                 not null default '' comment '创建人',
-    update_user varchar(255)                 not null default '' comment '更新人',
-    tenant_id    varchar(255)                 not null default '' comment '租户id'
-) comment '设备分组表';
-
-
-create table iot_mod_group
-(
-    id          bigint unsigned auto_increment primary key,
-    company_id  bigint unsigned             not null default 0 comment '所属客户id',
-    mode_group_code  varchar(255)           not null default '' comment '物理模型分组码值唯一标识',
-    name        varchar(255)                not null default '' comment '物模型分组名称',
-    create_time datetime                    not null default CURRENT_TIMESTAMP comment '创建时间',
-    update_time datetime                    not null default current_timestamp on update CURRENT_TIMESTAMP,
-    del_flag    tinyint                     not null default 0 comment '0-未删除,1-删除',
-    create_user varchar(255)                not null default '' comment '创建人',
-    update_user varchar(255)                not null default '' comment '修改人',
-    tenant_id    varchar(255)                 not null default '' comment '租户id',
-    constraint name unique (mode_group_code)
-) comment '物理模型分组表';
-
-
-
-create table iot_mod
-(
-    id          bigint unsigned auto_increment primary key,
-    mod_code    varchar(255)                            not null default '' comment '物理模型码值',
-    company_id  bigint unsigned                         not null default 0  comment '所属客户id',
-    mode_group_code  varchar(255)                       not null default '' comment '物模型分组码值',
-    guid        varchar(255) collate utf8mb4_general_ci not null default '' comment '唯一标识',
-    name        varchar(255)                            not null default '' comment '物模型名称',
-    description      varchar(255)                            not null default '' comment '最后一次更新值[原来字段 desc]',
-    remarks     varchar(255)                            not null default '' comment '备注',
-    tsl_json    text                                    null                comment '包含JSON',
-    version     int unsigned                            not null default 1  comment '版本[原来字段 tsl_ver]',
-    num         int unsigned                            not null default 0  comment '设备数',
-    del_flag    tinyint                                 not null default 0  comment '0-未删除,1-删除',
-    create_user varchar(255)                            not null default '' comment '创建人',
-    update_user varchar(255)                            not null default '' comment '更新人',
-    create_time datetime                                not null default current_timestamp comment '创建时间',
-    update_time datetime                                not null default current_timestamp on update CURRENT_TIMESTAMP comment '更新时间',
-    tenant_id    varchar(255)                 not null default '' comment '租户id'
-)comment '物模型lot表' ;
-
-create table iot_device_error
-(
-    id          bigint unsigned auto_increment primary key,
-    device_code varchar(255)              not null default ''  comment '设备编号',
-    guid        varchar(255)                 not null default ''  comment '唯一标识[暂时保留]',
-    error_reason   text                      null                  comment '设备异常原因',
-    create_time datetime                     not null default current_timestamp comment '创建时间',
-    update_time datetime                     not null default current_timestamp on update CURRENT_TIMESTAMP comment '更新时间'
-)comment '设备异常记录表';
-
-create table iot_mod_error
-(
-    id       bigint unsigned auto_increment  primary key,
-    mod_code varchar(255)                    not null default ''  comment '物理模型编号',
-    error_reason   text                      null                 comment '设备异常原因',
-    create_time datetime                     not null default current_timestamp comment '创建时间',
-    update_time datetime                     not null default current_timestamp on update CURRENT_TIMESTAMP comment '更新时间'
-)comment '物理模型设备异常记录表';
-
-create table time_Series_database_mapping
-(
-    id        bigint unsigned auto_increment               primary key,
-    time_Series_table_name   varchar(255)                   not null default ''  comment '时序数据库子表名称',
-    time_Series_super_name   varchar(255)                   not null default ''  comment '时序数据库超级表名称',
-    guid                     varchar(255)                   not null default '' comment 'guid',
-    create_time              datetime                       not null default current_timestamp comment '创建时间',
-    update_time              datetime                       not null default current_timestamp on update CURRENT_TIMESTAMP comment '更新时间',
-    tenant_id                varchar(255)                  not null default '' comment '租户id'
-)comment '时序数据库和关系型数据库映射表';
-
-
-
-create table saas_equipment_manage
-(
-    id                       int unsigned auto_increment  primary key,
-    device_name              varchar(60)              not null default '' comment '设备名称',
-    equipment_type           varchar(100)             not null default '' comment '设备类型',
-    energy_type              tinyint(1)               not null default 1  comment '能源形式',
-    equipment_guid           varchar(40)              not null default '' comment '设备GUID',
-    mod_guid                 varchar(40)              not null default '' comment '物联网模型GUID',
-    pay_time                 datetime                 not null default '1000-01-01 00:00:00' comment '购买时间',
-    depreciation_period      int                      not null default -1 comment '折旧年限',
-    total_depreciation_value decimal(15, 2)           not null default 0.00 comment '折旧总值',
-    create_time              datetime                 not null default current_timestamp comment '创建时间',
-    update_time              datetime                 not null default current_timestamp on update current_timestamp comment '更新时间'
-
-)comment '设备基础管理表(关联物联网ID)';
-
-
-create table vehicle_data
-(
-    id          bigint unsigned auto_increment  primary key,
-    car_no      varchar(10)                not null default '' comment '车牌',
-    fleet_id    varchar(50)                not null default '' comment '车队id',
-    fleet_name  varchar(50)                not null default '' comment '车队名称',
-    device_id   varchar(50)                not null default '' comment '设备唯一id',
-    device_name varchar(50)                not null default '' comment '设备名称',
-    group_id    varchar(50)                not null default '' comment '区域ID',
-    group_name  varchar(50)                not null default '' comment '区域名称',
-    biz_id      varchar(50)                not null default '' comment '业务ID',
-    biz_name    varchar(50)                not null default '' comment '业务名称',
-    project_id  varchar(50)                not null default '' comment '项目ID',
-    project_name varchar(50)                not null default '' comment '项目名称',
-    del_flag    tinyint                      not null default 0  comment '0-未删除,1-删除',
-    create_time datetime                     not null default CURRENT_TIMESTAMP comment '创建时间',
-    update_time datetime                     not null default current_timestamp on update CURRENT_TIMESTAMP comment '更新时间',
-    create_user varchar(255)                 not null default '' comment '创建人',
-    update_user varchar(255)                 not null default '' comment '更新人',
-    tenant_id    varchar(255)                 not null default '' comment '租户id'
-) comment '车辆表';
-
-
-
-
-create index energy_type
-    on saas_equipment_manage (energy_type);
-
-create index guid
-    on saas_equipment_manage (mod_guid);
-
-create index type
-    on saas_equipment_manage (equipment_type);
-
-
---    create table iot_device_history
---    (
---        id          int unsigned auto_increment
---            primary key,
---        guid        varchar(255) not null default '' comment '设备guid标识',
---        sn          varchar(255) not null default '' comment '设备唯一sn码标识',
---        value       varchar(20)  not null default '' comment '某天最后一条值',
---        large_type  tinyint      not null default -1 comment '1-12(车辆、装载机、矿卡、人员、水表、电表、边坡监控、视频监控、皮带称重、环境监测、无人地磅、排放监测)',
---        unit        varchar(10)  not null default '' comment '单位',
---        create_time datetime     not null default current_timestamp comment '对应某天时间'
---    )comment '设备归档表';
---
---
---
---
---
---
---
---
---
---    create table saas_point_position_device
---    (
---        id          bigint unsigned auto_increment
---            primary key,
---        p_id        bigint                       not null default -1 comment '点位表id',
---        guid        varchar(120)                 not null default '' comment '设备id',
---        device_group_code varchar(255)        not null default '' comment '物联网设备的分组id或摄像头设备的标签id',
---        category    tinyint unsigned             not null default 2  comment '1-iot ,2-device',
---        create_time datetime                     not null default current_timestamp comment '创建时间',
---        update_time datetime                     not null default current_timestamp on update CURRENT_TIMESTAMP comment '更新时间',
---        del_flag    tinyint                      not null default 0  comment '0-未删除,1-删除',
---        status      tinyint unsigned             not null default 1 comment '1启用,2禁用',
---        constraint p_id_2
---            unique (p_id, guid, category)
---    ) comment '大屏点位设备关系表';
---
---    create index guid
---        on saas_point_position_device (guid);
---
---    create index p_id
---        on saas_point_position_device (p_id);
---
---
---
---
---
---    create index guid
---        on iot_device_history (guid);
---
---    create index guid_2
---        on iot_device_history (guid, create_time);
-
-
-
-
-
-