From d9f35290c6f0c680091964ab5d278cb8cfbd6dfc Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 18 Jan 2022 10:27:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9F=A5=E8=AF=A2=E5=B1=85?= =?UTF-8?q?=E6=B0=91=E5=88=86=E7=B1=BB=E9=85=8D=E7=BD=AEshow=E7=9A=84?= =?UTF-8?q?=E5=B9=B6warn=E7=AD=89=E4=BA=8E1=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...tomerCategoryShowAndWarnListResultDTO.java | 54 +++++++++++++++++++ .../feign/OperCustomizeOpenFeignClient.java | 9 ++++ .../OperCustomizeOpenFeignClientFallback.java | 7 ++- .../ResiCategoryStatsConfigController.java | 11 ++++ .../dao/IcResiCategoryStatsConfigDao.java | 9 ++++ .../IcResiCategoryStatsConfigService.java | 10 ++++ .../IcResiCategoryStatsConfigServiceImpl.java | 22 ++++++-- .../mapper/IcResiCategoryStatsConfigDao.xml | 21 ++++++++ 8 files changed, 138 insertions(+), 5 deletions(-) create mode 100644 epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerCategoryShowAndWarnListResultDTO.java diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerCategoryShowAndWarnListResultDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerCategoryShowAndWarnListResultDTO.java new file mode 100644 index 0000000000..237966afc3 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerCategoryShowAndWarnListResultDTO.java @@ -0,0 +1,54 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/1/18 10:04 上午 + * @DESC + */ +@Data +public class CustomerCategoryShowAndWarnListResultDTO implements Serializable { + + /** + * 居民类别配置表ID + */ + private String statsConfigId; + + /** + * 居民类别预警配置表ID + */ + private String warnConfigId; + + /** + * 字段名 + */ + private String columnName; + + /** + * 标签 + */ + private String label; + + /** + * 管理平台分类图标 + */ + private String managementIcon; + + /** + * 数据平台分类图标 + */ + private String dataIcon; + + /** + * 房屋显示分类图标 + */ + private String houseShowIcon; + + private Integer level1; + private Integer level2; + private Integer level3; + +} diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/OperCustomizeOpenFeignClient.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/OperCustomizeOpenFeignClient.java index 4a404fdb34..8cdf6e39de 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/OperCustomizeOpenFeignClient.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/OperCustomizeOpenFeignClient.java @@ -109,6 +109,15 @@ public interface OperCustomizeOpenFeignClient { @PostMapping("/oper/customize/resicategorystatsconfig/resicategorywarnlist") Result> resiCategoryWarnList(@RequestParam String customerId); + /** + * @Description 获取客户下人员分类配置显示的,预警配置的 + * @param customerId + * @author zxc + * @date 2022/1/18 10:07 上午 + */ + @PostMapping("/oper/customize/resicategorystatsconfig/getcustomercategoryshowandwarnlist") + Result> getCustomerCategoryShowAndWarnList(@RequestParam("customerId")String customerId); + @PostMapping("/oper/customize/resicategorystatsconfig/resicategorywarninfobyid") Result resiCategoryWarnInfoById(@RequestBody IcResiCategoryWarnConfigDTO dto); diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/fallback/OperCustomizeOpenFeignClientFallback.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/fallback/OperCustomizeOpenFeignClientFallback.java index 9e4b5eca25..fde2def25e 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/fallback/OperCustomizeOpenFeignClientFallback.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/fallback/OperCustomizeOpenFeignClientFallback.java @@ -95,7 +95,12 @@ public class OperCustomizeOpenFeignClientFallback implements OperCustomizeOpenFe return ModuleUtils.feignConError(ServiceConstant.OPER_CUSTOMIZE_SERVER, "resiCategoryWarnList",customerId); } - @Override + @Override + public Result> getCustomerCategoryShowAndWarnList(String customerId) { + return ModuleUtils.feignConError(ServiceConstant.OPER_CUSTOMIZE_SERVER, "getCustomerCategoryShowAndWarnList",customerId); + } + + @Override public Result resiCategoryWarnInfoById(IcResiCategoryWarnConfigDTO dto) { return ModuleUtils.feignConError(ServiceConstant.OPER_CUSTOMIZE_SERVER, "resiCategoryWarnInfoById",dto); } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java index 99b6299afa..f43e75bf97 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java @@ -34,6 +34,7 @@ import com.epmet.dto.IcResiCategoryWarnConfigDTO; import com.epmet.dto.form.IcResiCategoryStatsConfigFormDTO; import com.epmet.dto.form.IcResiCategoryStatsConfigSortFormDTO; import com.epmet.dto.form.ResiCategoryStatsConfigListFormDTO; +import com.epmet.dto.result.CustomerCategoryShowAndWarnListResultDTO; import com.epmet.dto.result.IcResiCategoryStatsConfigResultDTO; import com.epmet.entity.IcResiCategoryStatsConfigEntity; import com.epmet.entity.IcResiCategoryWarnConfigEntity; @@ -164,5 +165,15 @@ public class ResiCategoryStatsConfigController { return new Result().ok(ConvertUtils.sourceToTarget(icResiCategoryWarnConfigDao.selectById(dto.getId()),IcResiCategoryWarnConfigDTO.class)); } + /** + * @Description 获取客户下人员分类配置显示的,预警配置的 + * @param customerId + * @author zxc + * @date 2022/1/18 10:07 上午 + */ + @PostMapping("getcustomercategoryshowandwarnlist") + public Result> getCustomerCategoryShowAndWarnList(@RequestParam("customerId")String customerId){ + return new Result>().ok(icResiCategoryStatsConfigService.getCustomerCategoryShowAndWarnList(customerId)); + } } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcResiCategoryStatsConfigDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcResiCategoryStatsConfigDao.java index 95fd7c9222..3ba17512ec 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcResiCategoryStatsConfigDao.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcResiCategoryStatsConfigDao.java @@ -18,6 +18,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.CustomerCategoryShowAndWarnListResultDTO; import com.epmet.dto.result.IcResiCategoryStatsConfigResultDTO; import com.epmet.entity.IcResiCategoryStatsConfigEntity; import org.apache.ibatis.annotations.Mapper; @@ -43,4 +44,12 @@ public interface IcResiCategoryStatsConfigDao extends BaseDao listInfo(@Param("customerId") String customerId, @Param("isWarn") Integer isWarn, @Param("level") Integer level); IcResiCategoryStatsConfigResultDTO info(@Param("id") String id,@Param("customerId") String customerId); + + /** + * @Description 获取客户下人员分类配置显示的,预警配置的 + * @param customerId + * @author zxc + * @date 2022/1/18 10:09 上午 + */ + List getCustomerCategoryShowAndWarnList(@Param("customerId")String customerId); } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcResiCategoryStatsConfigService.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcResiCategoryStatsConfigService.java index aa99453387..f9092491aa 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcResiCategoryStatsConfigService.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcResiCategoryStatsConfigService.java @@ -20,6 +20,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.IcResiCategoryStatsConfigDTO; +import com.epmet.dto.result.CustomerCategoryShowAndWarnListResultDTO; import com.epmet.entity.IcResiCategoryStatsConfigEntity; import java.util.List; @@ -101,4 +102,13 @@ public interface IcResiCategoryStatsConfigService extends BaseService getCategoryList(IcResiCategoryStatsConfigDTO dto); + + /** + * @Description 获取客户下人员分类配置显示的,预警配置的 + * @param customerId + * @author zxc + * @date 2022/1/18 10:07 上午 + */ + List getCustomerCategoryShowAndWarnList(String customerId); + } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcResiCategoryStatsConfigServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcResiCategoryStatsConfigServiceImpl.java index d0183a03f9..d5bfdbd521 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcResiCategoryStatsConfigServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcResiCategoryStatsConfigServiceImpl.java @@ -26,18 +26,17 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.IcResiCategoryStatsConfigDao; import com.epmet.dto.IcResiCategoryStatsConfigDTO; +import com.epmet.dto.result.CustomerCategoryShowAndWarnListResultDTO; import com.epmet.entity.IcResiCategoryStatsConfigEntity; import com.epmet.redis.IcResiCategoryStatsConfigRedis; import com.epmet.service.IcResiCategoryStatsConfigService; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Map; +import java.util.*; /** * 居民类别配置表 @@ -123,4 +122,19 @@ public class IcResiCategoryStatsConfigServiceImpl extends BaseServiceImpl getCustomerCategoryShowAndWarnList(String customerId) { + List result = baseDao.getCustomerCategoryShowAndWarnList(customerId); + if (CollectionUtils.isNotEmpty(result)){ + return result; + } + return new ArrayList<>(); + } + } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcResiCategoryStatsConfigDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcResiCategoryStatsConfigDao.xml index f3afd11c49..2493d1a14c 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcResiCategoryStatsConfigDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcResiCategoryStatsConfigDao.xml @@ -71,5 +71,26 @@ and a.id = #{id} + + + \ No newline at end of file