Browse Source

添加查询居民分类配置show的并warn等于1的

master
zxc 4 years ago
parent
commit
d9f35290c6
  1. 54
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerCategoryShowAndWarnListResultDTO.java
  2. 9
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/OperCustomizeOpenFeignClient.java
  3. 5
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/fallback/OperCustomizeOpenFeignClientFallback.java
  4. 11
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java
  5. 9
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcResiCategoryStatsConfigDao.java
  6. 10
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcResiCategoryStatsConfigService.java
  7. 22
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcResiCategoryStatsConfigServiceImpl.java
  8. 21
      epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcResiCategoryStatsConfigDao.xml

54
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;
}

9
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<List<IcResiCategoryWarnConfigDTO>> resiCategoryWarnList(@RequestParam String customerId);
/**
* @Description 获取客户下人员分类配置显示的预警配置的
* @param customerId
* @author zxc
* @date 2022/1/18 10:07 上午
*/
@PostMapping("/oper/customize/resicategorystatsconfig/getcustomercategoryshowandwarnlist")
Result<List<CustomerCategoryShowAndWarnListResultDTO>> getCustomerCategoryShowAndWarnList(@RequestParam("customerId")String customerId);
@PostMapping("/oper/customize/resicategorystatsconfig/resicategorywarninfobyid")
Result<IcResiCategoryWarnConfigDTO> resiCategoryWarnInfoById(@RequestBody IcResiCategoryWarnConfigDTO dto);

5
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/fallback/OperCustomizeOpenFeignClientFallback.java

@ -95,6 +95,11 @@ public class OperCustomizeOpenFeignClientFallback implements OperCustomizeOpenFe
return ModuleUtils.feignConError(ServiceConstant.OPER_CUSTOMIZE_SERVER, "resiCategoryWarnList",customerId);
}
@Override
public Result<List<CustomerCategoryShowAndWarnListResultDTO>> getCustomerCategoryShowAndWarnList(String customerId) {
return ModuleUtils.feignConError(ServiceConstant.OPER_CUSTOMIZE_SERVER, "getCustomerCategoryShowAndWarnList",customerId);
}
@Override
public Result<IcResiCategoryWarnConfigDTO> resiCategoryWarnInfoById(IcResiCategoryWarnConfigDTO dto) {
return ModuleUtils.feignConError(ServiceConstant.OPER_CUSTOMIZE_SERVER, "resiCategoryWarnInfoById",dto);

11
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<IcResiCategoryWarnConfigDTO>().ok(ConvertUtils.sourceToTarget(icResiCategoryWarnConfigDao.selectById(dto.getId()),IcResiCategoryWarnConfigDTO.class));
}
/**
* @Description 获取客户下人员分类配置显示的预警配置的
* @param customerId
* @author zxc
* @date 2022/1/18 10:07 上午
*/
@PostMapping("getcustomercategoryshowandwarnlist")
public Result<List<CustomerCategoryShowAndWarnListResultDTO>> getCustomerCategoryShowAndWarnList(@RequestParam("customerId")String customerId){
return new Result<List<CustomerCategoryShowAndWarnListResultDTO>>().ok(icResiCategoryStatsConfigService.getCustomerCategoryShowAndWarnList(customerId));
}
}

9
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<IcResiCategoryStat
List<IcResiCategoryStatsConfigResultDTO> 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<CustomerCategoryShowAndWarnListResultDTO> getCustomerCategoryShowAndWarnList(@Param("customerId")String customerId);
}

10
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<IcResiCate
* @Date 2021/11/5 15:43
*/
List<IcResiCategoryStatsConfigDTO> getCategoryList(IcResiCategoryStatsConfigDTO dto);
/**
* @Description 获取客户下人员分类配置显示的预警配置的
* @param customerId
* @author zxc
* @date 2022/1/18 10:07 上午
*/
List<CustomerCategoryShowAndWarnListResultDTO> getCustomerCategoryShowAndWarnList(String customerId);
}

22
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<IcResi
return ConvertUtils.sourceToTarget(list, IcResiCategoryStatsConfigDTO.class);
}
/**
* @Description 获取客户下人员分类配置显示的预警配置的
* @param customerId
* @author zxc
* @date 2022/1/18 10:07 上午
*/
@Override
public List<CustomerCategoryShowAndWarnListResultDTO> getCustomerCategoryShowAndWarnList(String customerId) {
List<CustomerCategoryShowAndWarnListResultDTO> result = baseDao.getCustomerCategoryShowAndWarnList(customerId);
if (CollectionUtils.isNotEmpty(result)){
return result;
}
return new ArrayList<>();
}
}

21
epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcResiCategoryStatsConfigDao.xml

@ -71,5 +71,26 @@
and a.id = #{id}
</select>
<!-- 获取客户下人员分类配置显示的,预警配置的 -->
<select id="getCustomerCategoryShowAndWarnList" resultType="com.epmet.dto.result.CustomerCategoryShowAndWarnListResultDTO">
SELECT
sc.ID AS statsConfigId,
sc.COLUMN_NAME,
sc.LABEL,
sc.MANAGEMENT_ICON,
sc.DATA_ICON,
sc.HOUSE_SHOW_ICON,
wc.ID AS warnConfigId,
wc.LEVEL_1 AS level1,
wc.LEVEL_2 AS level2,
wc.LEVEL_3 AS level3
FROM ic_resi_category_stats_config sc
INNER JOIN ic_resi_category_warn_config wc ON (wc.CUSTOMER_ID = sc.CUSTOMER_ID AND wc.COLUMN_NAME = sc.COLUMN_NAME AND wc.WARN = 1)
WHERE sc.DEL_FLAG = '0'
AND sc.`STATUS` = 'show'
AND sc.CUSTOMER_ID = #{customerId}
ORDER BY sc.SORT
</select>
</mapper>
Loading…
Cancel
Save