From e3e5626e206bf7bce73f7a441a8bb4024456207a Mon Sep 17 00:00:00 2001
From: zhanghao <774378400@qq.com>
Date: Tue, 3 Feb 2026 14:52:09 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A4=84=E7=90=86=E4=BB=A3=E7=A0=81?=
=?UTF-8?q?=E5=86=B2=E7=AA=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
cmvr-iot-admin/pom.xml | 11 ----
.../AeIndicatorController.java} | 17 +++---
cmvr-iot-evaluate/pom.xml | 29 ----------
.../cmvr/evaluate/mapper/IndicatorMapper.java | 13 -----
.../evaluate/service/IndicatorService.java | 19 -------
.../com/cmvr/evaluate/vo/IndicatorVO.java | 55 -------------------
.../src/test/java/com/cmvr/AppTest.java | 38 -------------
.../evaluation/mapper/AeIndicatorMapper.java | 10 ++++
.../model/domain/AeIndicatorEntity.java | 5 +-
.../domain/dto/AeIndicatorCreateDTO.java | 4 +-
.../domain/dto/AeIndicatorUpdateDTO.java | 4 +-
.../service/AeIndicatorService.java | 20 +++++++
.../service/impl/AeIndicatorServiceImpl.java | 51 ++++++++---------
cmvr-iot-vi/pom.xml | 9 ---
pom.xml | 1 +
15 files changed, 72 insertions(+), 214 deletions(-)
rename cmvr-iot-admin/src/main/java/com/cmvr/web/controller/{evaluate/IndicatorController.java => evaluation/AeIndicatorController.java} (71%)
delete mode 100644 cmvr-iot-evaluate/pom.xml
delete mode 100644 cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/mapper/IndicatorMapper.java
delete mode 100644 cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/service/IndicatorService.java
delete mode 100644 cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/vo/IndicatorVO.java
delete mode 100644 cmvr-iot-evaluate/src/test/java/com/cmvr/AppTest.java
create mode 100644 cmvr-iot-evaluation/src/main/java/com/cmvr/evaluation/mapper/AeIndicatorMapper.java
rename cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/entity/IndicatorEntity.java => cmvr-iot-evaluation/src/main/java/com/cmvr/evaluation/model/domain/AeIndicatorEntity.java (88%)
rename cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/dto/IndicatorCreateDTO.java => cmvr-iot-evaluation/src/main/java/com/cmvr/evaluation/model/domain/dto/AeIndicatorCreateDTO.java (93%)
rename cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/dto/IndicatorUpdateDTO.java => cmvr-iot-evaluation/src/main/java/com/cmvr/evaluation/model/domain/dto/AeIndicatorUpdateDTO.java (93%)
create mode 100644 cmvr-iot-evaluation/src/main/java/com/cmvr/evaluation/service/AeIndicatorService.java
rename cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/service/impl/IndicatorServiceImpl.java => cmvr-iot-evaluation/src/main/java/com/cmvr/evaluation/service/impl/AeIndicatorServiceImpl.java (76%)
diff --git a/cmvr-iot-admin/pom.xml b/cmvr-iot-admin/pom.xml
index 30054a1..540366b 100644
--- a/cmvr-iot-admin/pom.xml
+++ b/cmvr-iot-admin/pom.xml
@@ -71,17 +71,6 @@
com.cmvr
cmvr-iot-ti
-
-
-
- com.cmvr
- cmvr-iot-evaluate
-
-
- org.springframework.boot
- spring-boot
-
-
dev
diff --git a/cmvr-iot-admin/src/main/java/com/cmvr/web/controller/evaluate/IndicatorController.java b/cmvr-iot-admin/src/main/java/com/cmvr/web/controller/evaluation/AeIndicatorController.java
similarity index 71%
rename from cmvr-iot-admin/src/main/java/com/cmvr/web/controller/evaluate/IndicatorController.java
rename to cmvr-iot-admin/src/main/java/com/cmvr/web/controller/evaluation/AeIndicatorController.java
index b385874..2920b3e 100644
--- a/cmvr-iot-admin/src/main/java/com/cmvr/web/controller/evaluate/IndicatorController.java
+++ b/cmvr-iot-admin/src/main/java/com/cmvr/web/controller/evaluation/AeIndicatorController.java
@@ -1,10 +1,11 @@
-package com.cmvr.web.controller.evaluate;
+package com.cmvr.web.controller.evaluation;
import com.cmvr.common.core.controller.BaseController;
import com.cmvr.common.core.domain.AjaxResult;
-import com.cmvr.evaluate.dto.IndicatorCreateDTO;
-import com.cmvr.evaluate.dto.IndicatorUpdateDTO;
-import com.cmvr.evaluate.service.IndicatorService;
+
+import com.cmvr.evaluation.model.domain.dto.AeIndicatorCreateDTO;
+import com.cmvr.evaluation.model.domain.dto.AeIndicatorUpdateDTO;
+import com.cmvr.evaluation.service.AeIndicatorService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
@@ -16,9 +17,9 @@ import javax.validation.Valid;
@RestController
@RequestMapping("/evaluate/indicator")
@RequiredArgsConstructor
-public class IndicatorController extends BaseController {
+public class AeIndicatorController extends BaseController {
- private final IndicatorService indicatorService;
+ private final AeIndicatorService indicatorService;
@ApiOperation("根据父id查询指标")
@GetMapping("/getIndicatorByParentId")
@@ -31,7 +32,7 @@ public class IndicatorController extends BaseController {
@ApiOperation("新增指标")
@PostMapping("/indicator/insert")
- public AjaxResult insertIndicator(@Valid @RequestBody IndicatorCreateDTO createDTO) {
+ public AjaxResult insertIndicator(@Valid @RequestBody AeIndicatorCreateDTO createDTO) {
return success(indicatorService.saveIndicator(createDTO));
}
@@ -46,7 +47,7 @@ public class IndicatorController extends BaseController {
@ApiOperation("修改指标")
@PutMapping
- public AjaxResult updateIndicator(@Valid @RequestBody IndicatorUpdateDTO updateDTO) {
+ public AjaxResult updateIndicator(@Valid @RequestBody AeIndicatorUpdateDTO updateDTO) {
return toAjax(indicatorService.updateIndicator(updateDTO));
}
}
diff --git a/cmvr-iot-evaluate/pom.xml b/cmvr-iot-evaluate/pom.xml
deleted file mode 100644
index 8d68de9..0000000
--- a/cmvr-iot-evaluate/pom.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
- 4.0.0
-
- com.cmvr
- cmvr-iot
- 3.8.9
-
-
- cmvr-iot-evaluate
-
-
- 评价管理模块
-
-
-
-
-
- com.cmvr
- cmvr-iot-common
-
-
-
-
- com.cmvr
- cmvr-iot-test
-
-
-
diff --git a/cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/mapper/IndicatorMapper.java b/cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/mapper/IndicatorMapper.java
deleted file mode 100644
index fc335f0..0000000
--- a/cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/mapper/IndicatorMapper.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.cmvr.evaluate.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.cmvr.evaluate.entity.IndicatorEntity;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-@Mapper
-public interface IndicatorMapper extends BaseMapper {
-
-}
diff --git a/cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/service/IndicatorService.java b/cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/service/IndicatorService.java
deleted file mode 100644
index 564609b..0000000
--- a/cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/service/IndicatorService.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.cmvr.evaluate.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.cmvr.evaluate.dto.IndicatorCreateDTO;
-import com.cmvr.evaluate.dto.IndicatorUpdateDTO;
-import com.cmvr.evaluate.entity.IndicatorEntity;
-
-import java.util.List;
-
-public interface IndicatorService extends IService {
-
- boolean saveIndicator(IndicatorCreateDTO dto);
-
- List selectIndicatorByParentId(Long parentId, Integer type);
-
- boolean removeIndicator(Long id);
-
- boolean updateIndicator(IndicatorUpdateDTO dto);
-}
diff --git a/cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/vo/IndicatorVO.java b/cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/vo/IndicatorVO.java
deleted file mode 100644
index 170f27a..0000000
--- a/cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/vo/IndicatorVO.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package com.cmvr.evaluate.vo;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.math.BigDecimal;
-import java.util.Date;
-
-@Data
-@ApiModel("指标库VO")
-public class IndicatorVO {
-
- @ApiModelProperty("指标库-指标主键ID")
- private Long id;
-
- @ApiModelProperty("父级指标ID,一级指标为0")
- private Long parentId;
-
- @ApiModelProperty("指标层级 1-一级 2-二级 3-三级")
- private Integer level;
-
- @ApiModelProperty("指标名称")
- private String name;
-
- @ApiModelProperty("比较数值1")
- private BigDecimal compareNum1;
-
- @ApiModelProperty("比较符号(=、>、<、>=、<=等)")
- private String symbol;
-
- @ApiModelProperty("比较数值2")
- private BigDecimal compareNum2;
-
- @ApiModelProperty("指标分数/满分")
- private BigDecimal score;
-
- @ApiModelProperty("指标权重")
- private BigDecimal weight;
-
- @ApiModelProperty("备注")
- private String remark;
-
- @ApiModelProperty("同层级排序")
- private Integer sort;
-
- @ApiModelProperty("创建时间")
- private Date createTime;
-
- @ApiModelProperty("创建人")
- private String createBy;
-
- @ApiModelProperty("类型 0-语音 1-触控")
- private Integer type;
-}
diff --git a/cmvr-iot-evaluate/src/test/java/com/cmvr/AppTest.java b/cmvr-iot-evaluate/src/test/java/com/cmvr/AppTest.java
deleted file mode 100644
index 4963177..0000000
--- a/cmvr-iot-evaluate/src/test/java/com/cmvr/AppTest.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package com.cmvr;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-/**
- * Unit test for simple App.
- */
-public class AppTest
- extends TestCase
-{
- /**
- * Create the test case
- *
- * @param testName name of the test case
- */
- public AppTest( String testName )
- {
- super( testName );
- }
-
- /**
- * @return the suite of tests being tested
- */
- public static Test suite()
- {
- return new TestSuite( AppTest.class );
- }
-
- /**
- * Rigourous Test :-)
- */
- public void testApp()
- {
- assertTrue( true );
- }
-}
diff --git a/cmvr-iot-evaluation/src/main/java/com/cmvr/evaluation/mapper/AeIndicatorMapper.java b/cmvr-iot-evaluation/src/main/java/com/cmvr/evaluation/mapper/AeIndicatorMapper.java
new file mode 100644
index 0000000..6c27bdc
--- /dev/null
+++ b/cmvr-iot-evaluation/src/main/java/com/cmvr/evaluation/mapper/AeIndicatorMapper.java
@@ -0,0 +1,10 @@
+package com.cmvr.evaluation.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.cmvr.evaluation.model.domain.AeIndicatorEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface AeIndicatorMapper extends BaseMapper {
+
+}
diff --git a/cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/entity/IndicatorEntity.java b/cmvr-iot-evaluation/src/main/java/com/cmvr/evaluation/model/domain/AeIndicatorEntity.java
similarity index 88%
rename from cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/entity/IndicatorEntity.java
rename to cmvr-iot-evaluation/src/main/java/com/cmvr/evaluation/model/domain/AeIndicatorEntity.java
index 9ab7fd5..7b1df23 100644
--- a/cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/entity/IndicatorEntity.java
+++ b/cmvr-iot-evaluation/src/main/java/com/cmvr/evaluation/model/domain/AeIndicatorEntity.java
@@ -1,4 +1,4 @@
-package com.cmvr.evaluate.entity;
+package com.cmvr.evaluation.model.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
@@ -9,14 +9,13 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
-import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("evaluate_indicator")
@ApiModel("评价管理--指标库")
-public class IndicatorEntity extends BaseEntity {
+public class AeIndicatorEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty("指标主键ID")
diff --git a/cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/dto/IndicatorCreateDTO.java b/cmvr-iot-evaluation/src/main/java/com/cmvr/evaluation/model/domain/dto/AeIndicatorCreateDTO.java
similarity index 93%
rename from cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/dto/IndicatorCreateDTO.java
rename to cmvr-iot-evaluation/src/main/java/com/cmvr/evaluation/model/domain/dto/AeIndicatorCreateDTO.java
index acae2ee..377ea27 100644
--- a/cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/dto/IndicatorCreateDTO.java
+++ b/cmvr-iot-evaluation/src/main/java/com/cmvr/evaluation/model/domain/dto/AeIndicatorCreateDTO.java
@@ -1,4 +1,4 @@
-package com.cmvr.evaluate.dto;
+package com.cmvr.evaluation.model.domain.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -12,7 +12,7 @@ import java.math.BigDecimal;
@Data
@ApiModel("新增指标DTO")
-public class IndicatorCreateDTO {
+public class AeIndicatorCreateDTO {
@ApiModelProperty(value = "父级指标ID,一级指标为0", required = true)
@NotNull(message = "父级指标ID不能为空")
diff --git a/cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/dto/IndicatorUpdateDTO.java b/cmvr-iot-evaluation/src/main/java/com/cmvr/evaluation/model/domain/dto/AeIndicatorUpdateDTO.java
similarity index 93%
rename from cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/dto/IndicatorUpdateDTO.java
rename to cmvr-iot-evaluation/src/main/java/com/cmvr/evaluation/model/domain/dto/AeIndicatorUpdateDTO.java
index 4e1bea7..84025ac 100644
--- a/cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/dto/IndicatorUpdateDTO.java
+++ b/cmvr-iot-evaluation/src/main/java/com/cmvr/evaluation/model/domain/dto/AeIndicatorUpdateDTO.java
@@ -1,4 +1,4 @@
-package com.cmvr.evaluate.dto;
+package com.cmvr.evaluation.model.domain.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -12,7 +12,7 @@ import java.math.BigDecimal;
@Data
@ApiModel("修改指标DTO")
-public class IndicatorUpdateDTO {
+public class AeIndicatorUpdateDTO {
@ApiModelProperty(value = "指标主键ID", required = true)
@NotNull(message = "指标ID不能为空")
private Long id;
diff --git a/cmvr-iot-evaluation/src/main/java/com/cmvr/evaluation/service/AeIndicatorService.java b/cmvr-iot-evaluation/src/main/java/com/cmvr/evaluation/service/AeIndicatorService.java
new file mode 100644
index 0000000..4cf0f41
--- /dev/null
+++ b/cmvr-iot-evaluation/src/main/java/com/cmvr/evaluation/service/AeIndicatorService.java
@@ -0,0 +1,20 @@
+package com.cmvr.evaluation.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.cmvr.evaluation.model.domain.AeIndicatorEntity;
+import com.cmvr.evaluation.model.domain.dto.AeIndicatorCreateDTO;
+import com.cmvr.evaluation.model.domain.dto.AeIndicatorUpdateDTO;
+
+
+import java.util.List;
+
+public interface AeIndicatorService extends IService {
+
+ boolean saveIndicator(AeIndicatorCreateDTO dto);
+
+ List selectIndicatorByParentId(Long parentId, Integer type);
+
+ boolean removeIndicator(Long id);
+
+ boolean updateIndicator(AeIndicatorUpdateDTO dto);
+}
diff --git a/cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/service/impl/IndicatorServiceImpl.java b/cmvr-iot-evaluation/src/main/java/com/cmvr/evaluation/service/impl/AeIndicatorServiceImpl.java
similarity index 76%
rename from cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/service/impl/IndicatorServiceImpl.java
rename to cmvr-iot-evaluation/src/main/java/com/cmvr/evaluation/service/impl/AeIndicatorServiceImpl.java
index 539b1d9..06e17dd 100644
--- a/cmvr-iot-evaluate/src/main/java/com/cmvr/evaluate/service/impl/IndicatorServiceImpl.java
+++ b/cmvr-iot-evaluation/src/main/java/com/cmvr/evaluation/service/impl/AeIndicatorServiceImpl.java
@@ -1,12 +1,13 @@
-package com.cmvr.evaluate.service.impl;
+package com.cmvr.evaluation.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.cmvr.evaluate.dto.IndicatorCreateDTO;
-import com.cmvr.evaluate.dto.IndicatorUpdateDTO;
-import com.cmvr.evaluate.entity.IndicatorEntity;
-import com.cmvr.evaluate.mapper.IndicatorMapper;
-import com.cmvr.evaluate.service.IndicatorService;
+
+import com.cmvr.evaluation.mapper.AeIndicatorMapper;
+import com.cmvr.evaluation.model.domain.AeIndicatorEntity;
+import com.cmvr.evaluation.model.domain.dto.AeIndicatorCreateDTO;
+import com.cmvr.evaluation.model.domain.dto.AeIndicatorUpdateDTO;
+import com.cmvr.evaluation.service.AeIndicatorService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -18,12 +19,12 @@ import java.util.List;
@Slf4j
@Service
-public class IndicatorServiceImpl extends ServiceImpl implements IndicatorService {
+public class AeIndicatorServiceImpl extends ServiceImpl implements AeIndicatorService {
@Override
- public boolean saveIndicator(IndicatorCreateDTO createDTO) {
+ public boolean saveIndicator(AeIndicatorCreateDTO createDTO) {
// 1. DTO 转 Entity
- IndicatorEntity entity = CreateDTOConvertToEntity(createDTO);
+ AeIndicatorEntity entity = CreateDTOConvertToEntity(createDTO);
// 3. 调用MyBatis-Plus父类方法完成新增,返回执行结果
boolean saveResult = this.save(entity);
// 4. 日志记录:新增结果(成功/失败)
@@ -37,14 +38,14 @@ public class IndicatorServiceImpl extends ServiceImpl selectIndicatorByParentId(Long parentId, Integer type) {
+ public List selectIndicatorByParentId(Long parentId, Integer type) {
log.info("评价管理---指标库---开始按父id查询指标,查询父id:{}", parentId == null ? "所有数据" : parentId);
- LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
- queryWrapper.eq(parentId != null, IndicatorEntity::getParentId, parentId)
- .eq(type != null, IndicatorEntity::getType, type)
- .orderByAsc(IndicatorEntity::getSort);
- List list = this.list(queryWrapper);
+ LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
+ queryWrapper.eq(parentId != null, AeIndicatorEntity::getParentId, parentId)
+ .eq(type != null, AeIndicatorEntity::getType, type)
+ .orderByAsc(AeIndicatorEntity::getSort);
+ List list = this.list(queryWrapper);
// 3. 日志记录:查询结果
log.info("评价管理---指标库---按父id查询指标完成,查询id:{},返回数量:{}",
parentId == null ? "所有数据" : parentId, list.size());
@@ -82,14 +83,14 @@ public class IndicatorServiceImpl extends ServiceImpl childrenIds) {
// ① 查询当前parentId的直接子指标ID
- LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper()
- .select(IndicatorEntity::getId) // 仅查ID字段,减少数据传输
- .eq(IndicatorEntity::getParentId, parentId);
+ LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper()
+ .select(AeIndicatorEntity::getId) // 仅查ID字段,减少数据传输
+ .eq(AeIndicatorEntity::getParentId, parentId);
// 核心修正:使用MP双参数listObjs,直接Object转Long,无多余参数
List directChildIds = this.listObjs(
@@ -131,12 +132,12 @@ public class IndicatorServiceImpl extends ServiceImplcom.cmvr
cmvr-iot-test
-
- org.projectlombok
- lombok
- provided
-
-
- com.cmvr
- cmvr-iot-common
-
diff --git a/pom.xml b/pom.xml
index c818a8a..b5b4ba2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -344,6 +344,7 @@
cmvr-iot-api
cmvr-iot-vi
cmvr-iot-ti
+ cmvr-iot-evaluation
pom