From 2632dd99ca9f42087dcccdb7c170f7b52c436086 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 17 Jan 2022 15:45:11 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E4=BA=BA=E5=91=98=E8=B0=83=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entity/epmetuser/IcResiUserEntity.java | 5 + .../epmet/feign/GovOrgOpenFeignClient.java | 7 + .../GovOrgOpenFeignClientFallback.java | 12 +- .../controller/CustomerAgencyController.java | 10 + .../epmet/service/CustomerAgencyService.java | 7 + .../impl/CustomerAgencyServiceImpl.java | 32 +++ .../feign/OperCustomizeOpenFeignClient.java | 7 + .../OperCustomizeOpenFeignClientFallback.java | 5 + .../IcResiCategoryWarnConfigController.java | 9 + .../IcResiCategoryWarnConfigService.java | 6 + .../IcResiCategoryWarnConfigServiceImpl.java | 14 ++ .../java/com/epmet/dto/IcResiUserDTO.java | 5 + .../epmet/dto/IcUserChangeDetailedDTO.java | 2 +- .../com/epmet/dto/IcUserChangeRecordDTO.java | 4 +- .../IcUserTransferRecordController.java | 23 ++ .../java/com/epmet/dao/IcResiUserDao.java | 2 + .../com/epmet/entity/IcResiUserEntity.java | 5 + .../entity/IcUserChangeDetailedEntity.java | 2 +- .../entity/IcUserChangeRecordEntity.java | 4 +- .../service/IcUserTransferRecordService.java | 7 + .../impl/IcUserTransferRecordServiceImpl.java | 229 ++++++++++++++++++ .../main/resources/mapper/IcResiUserDao.xml | 28 +++ 22 files changed, 418 insertions(+), 7 deletions(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/IcResiUserEntity.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/IcResiUserEntity.java index e40441101d..657b37bb14 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/IcResiUserEntity.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/entity/epmetuser/IcResiUserEntity.java @@ -440,6 +440,11 @@ public class IcResiUserEntity extends BaseEpmetEntity { */ private String jtxxRemakes; + /** + * 用户状态【0:正常 1:转出】 + */ + private String status; + /** * 预留字段1 */ diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java index 9bd7bfb642..497cae9547 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java @@ -576,4 +576,11 @@ public interface GovOrgOpenFeignClient { */ @PostMapping("/gov/org/customeragency/configcustomerareacode") Result configCustomerAreaCode(@RequestBody CustomerAreaCodeFormDTO formDTO); + + /** + * @Author sun + * @Description 查询组织、网格、小区、楼栋、单元、房屋信息 + **/ + @PostMapping(value = "/gov/org/customeragency/icresiuserorgmsg") + Result icResiUserOrgMsg(@RequestBody IcResiUserOrgMsgFormDTO formDTO); } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java index c3ddd39202..d4330f90d0 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java @@ -362,11 +362,21 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient { /** * 运营端-客户管理,修改客户信息,调用gov-org服务,修改组织区划开关,修改根组织areaCode入参。 * - * @param areaCodeFormDTO + * @param formDTO * @return */ @Override public Result configCustomerAreaCode(CustomerAreaCodeFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "configCustomerAreaCode", formDTO); } + + /** + * @Author sun + * @Description 查询组织、网格、小区、楼栋、单元、房屋信息 + **/ + @Override + public Result icResiUserOrgMsg(IcResiUserOrgMsgFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "icResiUserOrgMsg", formDTO); + } + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java index d826060c2d..db2a0eec32 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java @@ -395,4 +395,14 @@ public class CustomerAgencyController { customerAgencyService.configCustomerAreaCode(formDTO); return new Result(); } + + /** + * @Author sun + * @Description 查询组织、网格、小区、楼栋、单元、房屋信息 + **/ + @PostMapping(value = "icresiuserorgmsg") + Result icResiUserOrgMsg(@RequestBody IcResiUserOrgMsgFormDTO formDTO) { + return new Result().ok(customerAgencyService.icResiUserOrgMsg(formDTO)); + } + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java index 3e7406594e..3e4f44cd36 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java @@ -276,4 +276,11 @@ public interface CustomerAgencyService extends BaseService * @return */ void configCustomerAreaCode(CustomerAreaCodeFormDTO formDTO); + + /** + * @Author sun + * @Description 查询组织、网格、小区、楼栋、单元、房屋信息 + **/ + IcResiUserOrgMsgResultDTO icResiUserOrgMsg(IcResiUserOrgMsgFormDTO formDTO); + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java index 0cb99364a8..372aafa390 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java @@ -98,6 +98,14 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl> listOptionsByItemConditions(@RequestBody IcFormOptionsQueryFormDTO input); + /** + * @author sun + * @Description 获取客户居民类别预警配置表数据 + */ + @PostMapping("/oper/customize/icresicategorywarnconfig/categorywarnconfiglist/{customerId}") + Result> categoryWarnConfigList(@PathVariable String customerId); + } 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 da282124bb..9e4b5eca25 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 @@ -109,4 +109,9 @@ public class OperCustomizeOpenFeignClientFallback implements OperCustomizeOpenFe public Result> listOptionsByItemConditions(IcFormOptionsQueryFormDTO input) { return ModuleUtils.feignConError(ServiceConstant.OPER_CUSTOMIZE_SERVER, "listOptionsByItemConditions", input); } + + @Override + public Result> categoryWarnConfigList(String customerId) { + return ModuleUtils.feignConError(ServiceConstant.OPER_CUSTOMIZE_SERVER, "categoryWarnConfigList", customerId); + } } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcResiCategoryWarnConfigController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcResiCategoryWarnConfigController.java index 5e1ac6667b..004912ec40 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcResiCategoryWarnConfigController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcResiCategoryWarnConfigController.java @@ -91,4 +91,13 @@ public class IcResiCategoryWarnConfigController { ExcelUtils.exportExcelToTarget(response, null, list, IcResiCategoryWarnConfigExcel.class); } + /** + * @author sun + * @Description 获取客户居民类别预警配置表数据 + */ + @PostMapping("categorywarnconfiglist/{customerId}") + Result> categoryWarnConfigList(@PathVariable String customerId) { + return new Result>().ok(icResiCategoryWarnConfigService.categoryWarnConfigList(customerId)); + } + } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcResiCategoryWarnConfigService.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcResiCategoryWarnConfigService.java index bef9c7360f..adc78df071 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcResiCategoryWarnConfigService.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcResiCategoryWarnConfigService.java @@ -92,4 +92,10 @@ public interface IcResiCategoryWarnConfigService extends BaseService categoryWarnConfigList(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/IcResiCategoryWarnConfigServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcResiCategoryWarnConfigServiceImpl.java index 3235b04f0d..9559cf07f0 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcResiCategoryWarnConfigServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcResiCategoryWarnConfigServiceImpl.java @@ -17,6 +17,7 @@ package com.epmet.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; @@ -101,4 +102,17 @@ public class IcResiCategoryWarnConfigServiceImpl extends BaseServiceImpl categoryWarnConfigList(String customerId) { + LambdaQueryWrapper wrapperWarn = new LambdaQueryWrapper<>(); + wrapperWarn.eq(IcResiCategoryWarnConfigEntity::getCustomerId, customerId); + wrapperWarn.orderByAsc(IcResiCategoryWarnConfigEntity::getSort); + List entityList = baseDao.selectList(wrapperWarn); + return ConvertUtils.sourceToTarget(entityList, IcResiCategoryWarnConfigDTO.class); + } + } \ No newline at end of file diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserDTO.java index 62fa0e45cf..72769ea31e 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcResiUserDTO.java @@ -448,6 +448,11 @@ public class IcResiUserDTO implements Serializable { */ private String jtxxRemakes; + /** + * 用户状态【0:正常 1:转出】 + */ + private String status; + /** * 删除标识 0.未删除 1.已删除 */ diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcUserChangeDetailedDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcUserChangeDetailedDTO.java index 2c5203eddd..2220f907f5 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcUserChangeDetailedDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcUserChangeDetailedDTO.java @@ -45,7 +45,7 @@ public class IcUserChangeDetailedDTO implements Serializable { private String customerId; /** - * 字段名【18类对应的ic_resi_user表字段名】 + * 变更记录表主键【ic_user_change_record.id】 */ private String icUserChangeRecordId; diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcUserChangeRecordDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcUserChangeRecordDTO.java index e9f4e3ff91..5e4818d8f8 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcUserChangeRecordDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcUserChangeRecordDTO.java @@ -69,12 +69,12 @@ public class IcUserChangeRecordDTO implements Serializable { private String icUserName; /** - * 操作类型【add:新增 category:类别变动 transfer】 + * 操作类型【add:新增 category:类别 transfer:调动】 */ private String type; /** - * 操作类型名称【add:新增 category:类别变动 transfer:迁出】 + * 操作类型名称【add:新增 category:类别 transfer:调动】 */ private String typeName; diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcUserTransferRecordController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcUserTransferRecordController.java index ead153c8cf..bb45818970 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcUserTransferRecordController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcUserTransferRecordController.java @@ -17,8 +17,16 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.form.IcResiUserTransferFormDTO; import com.epmet.service.IcUserTransferRecordService; import org.springframework.beans.factory.annotation.Autowired; +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; @@ -37,4 +45,19 @@ public class IcUserTransferRecordController { private IcUserTransferRecordService icUserTransferRecordService; + /** + * @Author sun + * @Description 【基础信息】人员调动 + **/ + @NoRepeatSubmit + @PostMapping("add") + public Result add(@LoginUser TokenDto tokenDto, @RequestBody IcResiUserTransferFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, IcResiUserTransferFormDTO.TransferAdd.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setStaffId(tokenDto.getUserId()); + icUserTransferRecordService.add(formDTO); + return new Result(); + } + + } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java index 3a9cffbf7e..db5f3aa613 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java @@ -229,4 +229,6 @@ public interface IcResiUserDao extends BaseDao { @Param("code") String code); List listIcResiInfosByUserIds(@Param("userIds") List userIds); + + Map getCategoryListMap(@Param("icUserId") String icUserId); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java index f647871525..4a25a479af 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcResiUserEntity.java @@ -440,6 +440,11 @@ public class IcResiUserEntity extends BaseEpmetEntity { */ private String jtxxRemakes; + /** + * 用户状态【0:正常 1:转出】 + */ + private String status; + /** * 预留字段1 */ diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcUserChangeDetailedEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcUserChangeDetailedEntity.java index e230fbfd2a..35608feae9 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcUserChangeDetailedEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcUserChangeDetailedEntity.java @@ -42,7 +42,7 @@ public class IcUserChangeDetailedEntity extends BaseEpmetEntity { private String customerId; /** - * 字段名【18类对应的ic_resi_user表字段名】 + * 变更记录表主键【ic_user_change_record.id】 */ private String icUserChangeRecordId; diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcUserChangeRecordEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcUserChangeRecordEntity.java index eaf7226588..82b964d104 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcUserChangeRecordEntity.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcUserChangeRecordEntity.java @@ -68,12 +68,12 @@ public class IcUserChangeRecordEntity extends BaseEpmetEntity { private String icUserName; /** - * 操作类型【add:新增 category:类别变动 transfer】 + * 操作类型【add:新增 category:类别 transfer:调动】 */ private String type; /** - * 操作类型名称【add:新增 category:类别变动 transfer:迁出】 + * 操作类型名称【add:新增 category:类别 transfer:调动】 */ private String typeName; diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcUserTransferRecordService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcUserTransferRecordService.java index 5ce1565dcf..4d1d25f952 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcUserTransferRecordService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcUserTransferRecordService.java @@ -18,6 +18,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.form.IcResiUserTransferFormDTO; import com.epmet.entity.IcUserTransferRecordEntity; /** @@ -28,4 +29,10 @@ import com.epmet.entity.IcUserTransferRecordEntity; */ public interface IcUserTransferRecordService extends BaseService { + /** + * @Author sun + * @Description 【基础信息】人员调动 + **/ + void add(IcResiUserTransferFormDTO formDTO); + } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserTransferRecordServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserTransferRecordServiceImpl.java index 4e06314238..2f7dafb468 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserTransferRecordServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserTransferRecordServiceImpl.java @@ -18,11 +18,35 @@ package com.epmet.service.impl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.commons.tools.utils.Result; +import com.epmet.dao.IcResiUserDao; import com.epmet.dao.IcUserTransferRecordDao; +import com.epmet.dto.IcResiCategoryWarnConfigDTO; +import com.epmet.dto.IcResiUserDTO; +import com.epmet.dto.form.IcResiUserOrgMsgFormDTO; +import com.epmet.dto.form.IcResiUserTransferFormDTO; +import com.epmet.dto.result.IcResiUserOrgMsgResultDTO; +import com.epmet.entity.IcResiUserEntity; +import com.epmet.entity.IcUserChangeDetailedEntity; +import com.epmet.entity.IcUserChangeRecordEntity; import com.epmet.entity.IcUserTransferRecordEntity; +import com.epmet.feign.GovOrgOpenFeignClient; +import com.epmet.feign.OperCustomizeOpenFeignClient; +import com.epmet.service.IcUserChangeDetailedService; +import com.epmet.service.IcUserChangeRecordService; import com.epmet.service.IcUserTransferRecordService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + /** * 居民调动记录表 * @@ -31,6 +55,211 @@ import org.springframework.stereotype.Service; */ @Service public class IcUserTransferRecordServiceImpl extends BaseServiceImpl implements IcUserTransferRecordService { + private Logger log = LoggerFactory.getLogger(IcUserTransferRecordServiceImpl.class); + @Autowired + private IcResiUserDao icResiUserDao; + @Autowired + private GovOrgOpenFeignClient govOrgOpenFeignClient; + @Autowired + private IcUserChangeRecordService icUserChangeRecordService; + @Autowired + private OperCustomizeOpenFeignClient operCustomizeOpenFeignClient; + @Autowired + private IcUserChangeDetailedService icUserChangeDetailedService; + + /** + * @Author sun + * @Description 【基础信息】人员调动 + **/ + @Override + public void add(IcResiUserTransferFormDTO formDTO) { + //1.判断被调动人员是否有效 + IcResiUserDTO resiUserDTO = icResiUserDao.selectIdByIdCard(formDTO.getCustomerId(), null, formDTO.getIcUserId()); + if (null == resiUserDTO) { + throw new RenException("9000", "人员调动失败,被调动人不存在!"); + } + + //2.查询人员调动前的组织、网格、小区、楼栋、单元、房屋信息 + IcResiUserOrgMsgFormDTO orgMsgFormDTO1 = new IcResiUserOrgMsgFormDTO(); + orgMsgFormDTO1.setCustomerId(resiUserDTO.getCustomerId()); + orgMsgFormDTO1.setAgencyId(resiUserDTO.getAgencyId()); + orgMsgFormDTO1.setGridId(resiUserDTO.getGridId()); + orgMsgFormDTO1.setNeighborHoodId(resiUserDTO.getVillageId()); + orgMsgFormDTO1.setBuildingId(resiUserDTO.getBuildId()); + orgMsgFormDTO1.setBuildingUnitId(resiUserDTO.getUnitId()); + orgMsgFormDTO1.setHouseId(resiUserDTO.getHomeId()); + Result result1 = govOrgOpenFeignClient.icResiUserOrgMsg(orgMsgFormDTO1); + if (!result1.success() || null == result1.getData().getAgencyDTO() || null == result1.getData().getGridDTO() || null == result1.getData().getNeighborHoodDTO() + || null == result1.getData().getBuildingDTO() || null == result1.getData().getBuildingUnitDTO() || null == result1.getData().getHouseDTO()) { + log.warn("查找被调动人调动前的组织、网格、小区、楼栋、单元、房屋信息失败"); + throw new RenException("9000", "获取被调动人基础信息失败"); + } + + //3.查询人员调动后的组织、网格、小区、楼栋、单元、房屋信息 + IcResiUserOrgMsgFormDTO orgMsgFormDTO2 = new IcResiUserOrgMsgFormDTO(); + orgMsgFormDTO2.setCustomerId(formDTO.getCustomerId()); + orgMsgFormDTO2.setAgencyId(formDTO.getNewAgencyId()); + orgMsgFormDTO2.setGridId(formDTO.getNewGridId()); + orgMsgFormDTO2.setNeighborHoodId(formDTO.getNewNeighborHoodId()); + orgMsgFormDTO2.setBuildingId(formDTO.getNewBuildingId()); + orgMsgFormDTO2.setBuildingUnitId(formDTO.getNewBuildingUnitId()); + orgMsgFormDTO2.setHouseId(formDTO.getNewHouseId()); + Result result2 = govOrgOpenFeignClient.icResiUserOrgMsg(orgMsgFormDTO2); + if (!result2.success() || null == result2.getData().getAgencyDTO() || null == result2.getData().getGridDTO() || null == result2.getData().getNeighborHoodDTO() + || null == result2.getData().getBuildingDTO() || null == result2.getData().getBuildingUnitDTO() || null == result2.getData().getHouseDTO()) { + log.warn("查找被调动人调动后的组织、网格、小区、楼栋、单元、房屋信息失败"); + throw new RenException("9000", "获取被调动人基础信息失败"); + } + + //4.修改被调动人所属各维度信息或人员状态信息 + IcResiUserEntity userEntity = new IcResiUserEntity(); + userEntity.setId(formDTO.getIcUserId()); + if ("out".equals(formDTO.getType())) { + //4-1.转到客户外修改基础信息表人员信息状态 + userEntity.setStatus("1"); + } else { + //4-2.客户内部流转修改所属各维度信息 + userEntity.setAgencyId(formDTO.getNewAgencyId()); + userEntity.setGridId(formDTO.getNewGridId()); + userEntity.setVillageId(formDTO.getNewNeighborHoodId()); + userEntity.setBuildId(formDTO.getNewBuildingId()); + userEntity.setUnitId(formDTO.getNewBuildingUnitId()); + userEntity.setHomeId(formDTO.getNewHouseId()); + } + icResiUserDao.updateById(userEntity); + + //5.生成调动记录 + CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId()); + IcUserTransferRecordEntity recordEntity = saveTransferRecord(staffInfoCache, formDTO, resiUserDTO, result1.getData(), result2.getData()); + insert(recordEntity); + + //6.生成调动前后的变更记录、变更明细 + //6-1.变更记录 + IcUserChangeRecordEntity changeRecordEntity = new IcUserChangeRecordEntity(); + changeRecordEntity.setIcUserTransferRecordId(recordEntity.getId()); + if ("in".equals(formDTO.getType())) { + changeRecordEntity.setCustomerId(resiUserDTO.getCustomerId()); + } + changeRecordEntity.setOperatorId(formDTO.getStaffId()); + changeRecordEntity.setIcUserId(formDTO.getIcUserId()); + changeRecordEntity.setOperatorName(staffInfoCache.getRealName()); + changeRecordEntity.setIcUserName(resiUserDTO.getName()); + changeRecordEntity.setType("transfer"); + changeRecordEntity.setTypeName("调动"); + StringBuffer beforeName = new StringBuffer(); + beforeName.append(result1.getData().getAgencyDTO().getOrganizationName()).append("-").append(result1.getData().getGridDTO().getGridName()).append("-") + .append(result1.getData().getNeighborHoodDTO().getNeighborHoodName()).append("-").append(result1.getData().getBuildingDTO().getBuildingName()).append("-") + .append(result1.getData().getBuildingUnitDTO().getUnitName()).append("-").append(result1.getData().getHouseDTO().getHouseName()); + changeRecordEntity.setBeforeChangeName(beforeName.toString()); + StringBuffer afterName = new StringBuffer(); + afterName.append(result2.getData().getAgencyDTO().getOrganizationName()).append("-").append(result2.getData().getGridDTO().getGridName()).append("-") + .append(result2.getData().getNeighborHoodDTO().getNeighborHoodName()).append("-").append(result2.getData().getBuildingDTO().getBuildingName()).append("-") + .append(result2.getData().getBuildingUnitDTO().getUnitName()).append("-").append(result2.getData().getHouseDTO().getHouseName()); + changeRecordEntity.setAfterChangeName(afterName.toString()); + changeRecordEntity.setChangeTime(formDTO.getTransferTime()); + changeRecordEntity.setRemark(formDTO.getRemark()); + icUserChangeRecordService.insert(changeRecordEntity); + //6-2.变更明细【类别明细迁出组织的-1,迁入组织的1】 + Result> resultList = operCustomizeOpenFeignClient.categoryWarnConfigList(formDTO.getCustomerId()); + if (!resultList.success()) { + throw new RuntimeException("人员调动,获取客户居民类别预警配置表数据失败"); + } + Map map = icResiUserDao.getCategoryListMap(formDTO.getIcUserId()); + List changeDetailedEntityList = saveChangeDetailed(resultList.getData(), map, changeRecordEntity.getId(), formDTO, resiUserDTO); + icUserChangeDetailedService.insertBatch(changeDetailedEntityList); + + } + + /** + * @Author sun + * @Description 调动记录 + **/ + private IcUserTransferRecordEntity saveTransferRecord(CustomerStaffInfoCacheResult staffInfoCache, IcResiUserTransferFormDTO formDTO, IcResiUserDTO resiUserDTO, IcResiUserOrgMsgResultDTO result1, IcResiUserOrgMsgResultDTO result2) { + IcUserTransferRecordEntity recordEntity = new IcUserTransferRecordEntity(); + recordEntity.setIcUserId(formDTO.getIcUserId()); + recordEntity.setOperatorId(formDTO.getStaffId()); + recordEntity.setIcUserName(resiUserDTO.getName()); + recordEntity.setOperatorName(null == staffInfoCache ? "" : staffInfoCache.getRealName()); + recordEntity.setOldCustomerId(formDTO.getCustomerId()); + if ("in".equals(formDTO.getType())) { + recordEntity.setNewCustomerId(resiUserDTO.getCustomerId()); + } + recordEntity.setOldAgencyId(resiUserDTO.getAgencyId()); + recordEntity.setNewAgencyId(formDTO.getNewAgencyId()); + recordEntity.setOldAgencyName(result1.getAgencyDTO().getOrganizationName()); + recordEntity.setNewAgencyName(result2.getAgencyDTO().getOrganizationName()); + recordEntity.setOldGridId(resiUserDTO.getGridId()); + recordEntity.setNewGridId(formDTO.getNewGridId()); + recordEntity.setOldGridName(result1.getGridDTO().getGridName()); + recordEntity.setNewGridName(result2.getGridDTO().getGridName()); + recordEntity.setOldNeighborHoodId(resiUserDTO.getVillageId()); + recordEntity.setNewNeighborHoodId(formDTO.getNewNeighborHoodId()); + recordEntity.setOldNeighborHoodName(result1.getNeighborHoodDTO().getNeighborHoodName()); + recordEntity.setNewNeighborHoodName(result2.getNeighborHoodDTO().getNeighborHoodName()); + recordEntity.setOldBuildingId(resiUserDTO.getBuildId()); + recordEntity.setNewBuildingId(formDTO.getNewBuildingId()); + recordEntity.setOldBuildingName(result1.getBuildingDTO().getBuildingName()); + recordEntity.setNewBuildingName(result2.getBuildingDTO().getBuildingName()); + recordEntity.setOldBuildingUnitId(resiUserDTO.getUnitId()); + recordEntity.setNewBuildingUnitId(formDTO.getNewBuildingUnitId()); + recordEntity.setOldBuildingUnitName(result1.getBuildingUnitDTO().getUnitName()); + recordEntity.setNewBuildingUnitName(result2.getBuildingUnitDTO().getUnitName()); + recordEntity.setOldHouseId(resiUserDTO.getHomeId()); + recordEntity.setNewHouseId(formDTO.getNewHouseId()); + recordEntity.setOldHouseName(result1.getHouseDTO().getHouseName()); + recordEntity.setNewHouseName(result2.getHouseDTO().getHouseName()); + recordEntity.setTransferTime(formDTO.getTransferTime()); + recordEntity.setRemark(formDTO.getRemark()); + return recordEntity; + } + /** + * @Author sun + * @Description 变更明细 + **/ + private List saveChangeDetailed(List configList, Map map, String icUserChangeRecordId, IcResiUserTransferFormDTO formDTO, IcResiUserDTO resiUserDTO) { + List list = new ArrayList<>(); + IcUserChangeDetailedEntity outEntity = null; + IcUserChangeDetailedEntity inEntity = null; + for (IcResiCategoryWarnConfigDTO cf : configList) { + if ("1".equals(map.get(cf.getColumnName()))) { + //迁出 + outEntity = new IcUserChangeDetailedEntity(); + outEntity.setCustomerId(formDTO.getCustomerId()); + outEntity.setIcUserChangeRecordId(icUserChangeRecordId); + outEntity.setAgencyId(resiUserDTO.getAgencyId()); + outEntity.setGridId(resiUserDTO.getGridId()); + outEntity.setNeighborHoodId(resiUserDTO.getVillageId()); + outEntity.setBuildingId(resiUserDTO.getBuildId()); + outEntity.setBuildingUnitId(resiUserDTO.getUnitId()); + outEntity.setHouseId(resiUserDTO.getHomeId()); + outEntity.setIcUserId(formDTO.getIcUserId()); + outEntity.setType("out"); + outEntity.setTypeName("迁出"); + outEntity.setFieldName(cf.getColumnName()); + outEntity.setValue(-1); + list.add(outEntity); + //迁入 + if ("in".equals(formDTO.getType())) { + inEntity = new IcUserChangeDetailedEntity(); + inEntity.setCustomerId(formDTO.getCustomerId()); + inEntity.setIcUserChangeRecordId(icUserChangeRecordId); + inEntity.setAgencyId(formDTO.getNewAgencyId()); + inEntity.setGridId(formDTO.getNewGridId()); + inEntity.setNeighborHoodId(formDTO.getNewNeighborHoodId()); + inEntity.setBuildingId(formDTO.getNewBuildingId()); + inEntity.setBuildingUnitId(formDTO.getNewBuildingUnitId()); + inEntity.setHouseId(formDTO.getNewHouseId()); + inEntity.setIcUserId(formDTO.getIcUserId()); + inEntity.setType("in"); + inEntity.setTypeName("迁入"); + inEntity.setFieldName(cf.getColumnName()); + inEntity.setValue(1); + list.add(inEntity); + } + } + } + return list; + } } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 9d07548103..ba5276177a 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -513,4 +513,32 @@ #{userId} + + + From ab11db590d96db31ae872844a8efe4526857f960 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 17 Jan 2022 16:00:32 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E9=A2=84=E8=AD=A6pie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/PersonWarnLeftPieDTO.java | 26 +++++++++ .../result/PersonWarnLeftPieResultDTO.java | 48 +++++++++++++++++ .../controller/IcStatsResiWarnController.java | 14 +++++ .../com/epmet/dao/IcStatsResiWarnDao.java | 10 ++++ .../epmet/service/IcStatsResiWarnService.java | 10 ++++ .../impl/IcStatsResiWarnServiceImpl.java | 53 ++++++++++++++++++- .../resources/mapper/IcStatsResiWarnDao.xml | 16 ++++++ 7 files changed, 176 insertions(+), 1 deletion(-) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/PersonWarnLeftPieDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PersonWarnLeftPieResultDTO.java diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/PersonWarnLeftPieDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/PersonWarnLeftPieDTO.java new file mode 100644 index 0000000000..d6feeb3c18 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/PersonWarnLeftPieDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto; + +import com.epmet.commons.tools.constant.NumConstant; +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/1/17 3:27 下午 + * @DESC + */ +@Data +public class PersonWarnLeftPieDTO implements Serializable { + + private static final long serialVersionUID = 337571869959815613L; + + private Integer count; + + private String configId; + + public PersonWarnLeftPieDTO() { + this.count = NumConstant.ZERO; + this.configId = ""; + } +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PersonWarnLeftPieResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PersonWarnLeftPieResultDTO.java new file mode 100644 index 0000000000..44d714a318 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PersonWarnLeftPieResultDTO.java @@ -0,0 +1,48 @@ +package com.epmet.dto.result; + +import com.epmet.commons.tools.constant.NumConstant; +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2022/1/17 2:33 下午 + * @DESC + */ +@Data +public class PersonWarnLeftPieResultDTO implements Serializable { + + private static final long serialVersionUID = -111604873581992490L; + + private Integer total; + + private List list; + + public PersonWarnLeftPieResultDTO() { + this.total = NumConstant.ZERO; + this.list = new ArrayList<>(); + } + + @Data + public static class PersonWarnLeftPie{ + + @JsonIgnore + private String configId; + + private String typeName; + + private String typeCode; + + private Integer typeCount; + + public PersonWarnLeftPie() { + this.typeName = ""; + this.typeCode = ""; + this.typeCount = NumConstant.ZERO; + } + } +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcStatsResiWarnController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcStatsResiWarnController.java index f0b9860e45..5b681b639b 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcStatsResiWarnController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcStatsResiWarnController.java @@ -17,7 +17,9 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -26,6 +28,7 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IcStatsResiWarnDTO; +import com.epmet.dto.result.PersonWarnLeftPieResultDTO; import com.epmet.excel.IcStatsResiWarnExcel; import com.epmet.service.IcStatsResiWarnService; import org.springframework.beans.factory.annotation.Autowired; @@ -91,4 +94,15 @@ public class IcStatsResiWarnController { ExcelUtils.exportExcelToTarget(response, null, list, IcStatsResiWarnExcel.class); } + /** + * @Description 【社区查询】人员预警饼图 + * @param tokenDto + * @author zxc + * @date 2022/1/17 2:39 下午 + */ + @PostMapping("personwarn/leftpie") + public Result personWarnLeftPie(@LoginUser TokenDto tokenDto){ + return new Result().ok(icStatsResiWarnService.personWarnLeftPie(tokenDto)); + } + } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcStatsResiWarnDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcStatsResiWarnDao.java index ef9fac802c..aeb0c2ca82 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcStatsResiWarnDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcStatsResiWarnDao.java @@ -19,6 +19,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.IcResiCategoryStatsConfigDTO; +import com.epmet.dto.PersonWarnLeftPieDTO; import com.epmet.entity.IcStatsResiWarnEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -58,4 +59,13 @@ public interface IcStatsResiWarnDao extends BaseDao { @Param("columnName") String columnName, @Param("icStatsResiWarn") IcStatsResiWarnEntity icStatsResiWarn); + /** + * @Description 查询分类下的人数 + * @param configIds + * @param agencyId + * @author zxc + * @date 2022/1/17 3:30 下午 + */ + List selectCategoryCount(@Param("configIds") List configIds,@Param("agencyId")String agencyId); + } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcStatsResiWarnService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcStatsResiWarnService.java index 6a0592adbe..b63f35a59e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcStatsResiWarnService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcStatsResiWarnService.java @@ -19,7 +19,9 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcStatsResiWarnDTO; +import com.epmet.dto.result.PersonWarnLeftPieResultDTO; import com.epmet.entity.IcStatsResiWarnEntity; import java.util.List; @@ -92,4 +94,12 @@ public interface IcStatsResiWarnService extends BaseService implements IcStatsResiWarnService { @Autowired - private IcStatsResiWarnRedis icStatsResiWarnRedis; + private OperCustomizeOpenFeignClient operCustomizeOpenFeignClient; @Override public PageData page(Map params) { @@ -101,4 +113,43 @@ public class IcStatsResiWarnServiceImpl extends BaseServiceImpl> listResult = operCustomizeOpenFeignClient.resiCategoryWarnList(tokenDto.getCustomerId()); + if (!listResult.success()){ + throw new EpmetException("查询设置预警的分类失败..."); + } + PersonWarnLeftPieResultDTO result = new PersonWarnLeftPieResultDTO(); + if (CollectionUtils.isEmpty(listResult.getData())){ + return result; + } + List configList = listResult.getData(); + List list = new ArrayList<>(); + configList.forEach(c -> { + PersonWarnLeftPieResultDTO.PersonWarnLeftPie p = new PersonWarnLeftPieResultDTO.PersonWarnLeftPie(); + p.setTypeName(c.getLabel()); + p.setTypeCode(c.getColumnName()); + p.setConfigId(c.getId()); + list.add(p); + }); + List dtos = baseDao.selectCategoryCount(configList.stream().map(m -> m.getId()).collect(Collectors.toList()), staffInfo.getAgencyId()); + if (CollectionUtils.isNotEmpty(dtos)){ + list.forEach(l -> dtos.stream().filter(d -> d.getConfigId().equals(l.getConfigId())).forEach(d -> l.setTypeCount(d.getCount()))); + } + result.setTotal(list.stream().collect(Collectors.summingInt(PersonWarnLeftPieResultDTO.PersonWarnLeftPie::getTypeCount))); + result.setList(list); + return result; + } + } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcStatsResiWarnDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcStatsResiWarnDao.xml index 4a4a2a6cc3..683938f80e 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcStatsResiWarnDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcStatsResiWarnDao.xml @@ -131,4 +131,20 @@ and AGENCY_ID = #{icStatsResiWarn.agencyId} and GRID_ID =#{icStatsResiWarn.gridId} and VILLAGE_ID=#{icStatsResiWarn.neighborHoodId} and BUILD_ID=#{icStatsResiWarn.buildingId} group by AGENCY_ID,GRID_ID,VILLAGE_ID,BUILD_ID + + + \ No newline at end of file From 84fa402af1b948e3c0fdf73752823a409302c173 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 17 Jan 2022 16:25:34 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E6=BC=8F=E6=8F=90=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/IcResiUserOrgMsgFormDTO.java | 44 ++++++++++++ .../dto/result/IcResiUserOrgMsgResultDTO.java | 60 ++++++++++++++++ .../dto/form/IcResiUserTransferFormDTO.java | 69 +++++++++++++++++++ 3 files changed, 173 insertions(+) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcResiUserOrgMsgFormDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcResiUserOrgMsgResultDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserTransferFormDTO.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcResiUserOrgMsgFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcResiUserOrgMsgFormDTO.java new file mode 100644 index 0000000000..28338a15a4 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/IcResiUserOrgMsgFormDTO.java @@ -0,0 +1,44 @@ +package com.epmet.dto.form; + + +import lombok.Data; + +import java.io.Serializable; + +/** + * 查询组织、网格、小区、楼栋、单元、房屋信息 + */ +@Data +public class IcResiUserOrgMsgFormDTO implements Serializable { + + /** + * 客户ID + */ + private String customerId; + /** + * 组织Id + */ + private String agencyId; + /** + * 网格Id + */ + private String gridId; + /** + * 小区Id + */ + private String neighborHoodId; + /** + * 楼宇Id + */ + private String buildingId; + /** + * 单元Id + */ + private String buildingUnitId; + /** + * 房屋Id + */ + private String houseId; + + +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcResiUserOrgMsgResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcResiUserOrgMsgResultDTO.java new file mode 100644 index 0000000000..cefb9eed05 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/IcResiUserOrgMsgResultDTO.java @@ -0,0 +1,60 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.result; + +import com.epmet.dto.*; +import lombok.Data; + +import java.io.Serializable; + + +/** + * 查询组织、网格、小区、楼栋、单元、房屋信息 + * + * @author sun + */ +@Data +public class IcResiUserOrgMsgResultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 组织信息 + */ + private CustomerAgencyDTO agencyDTO; + /** + * 组织信息 + */ + private CustomerGridDTO gridDTO; + /** + * 组织信息 + */ + private IcNeighborHoodDTO neighborHoodDTO; + /** + * 组织信息 + */ + private IcBuildingDTO buildingDTO; + /** + * 组织信息 + */ + private IcBuildingUnitDTO buildingUnitDTO; + /** + * 组织信息 + */ + private IcHouseDTO houseDTO; +} \ No newline at end of file diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserTransferFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserTransferFormDTO.java new file mode 100644 index 0000000000..9245fa0a51 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserTransferFormDTO.java @@ -0,0 +1,69 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.Date; + +/** + * @Description 【基础信息】人员调动 + * @Author sun + */ +@Data +public class IcResiUserTransferFormDTO implements Serializable { + private static final long serialVersionUID = 9156247659994638103L; + public interface TransferAdd extends CustomerClientShowGroup {} + + /** + * 被调动人ID + */ + @NotBlank(message = "被调动人Id不能为空" , groups = TransferAdd.class) + private String icUserId; + /** + * 操作类型【客户外out,客户内in】 + */ + @NotBlank(message = "操作类型不能为空" , groups = TransferAdd.class) + private String type; + /** + * 调动到的组织Id + */ + private String newAgencyId; + /** + * 调动到的网格Id + */ + private String newGridId; + /** + * 调动到的小区ID + */ + private String newNeighborHoodId; + /** + * 调动到的楼宇Id + */ + private String newBuildingId; + /** + * 调动到的单元Id + */ + private String newBuildingUnitId; + /** + * 调动到的房屋Id + */ + private String newHouseId; + /** + * 调动时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @NotNull(message = "调动时间不能为空" , groups = TransferAdd.class) + private Date transferTime; + /** + * 备注 + */ + private String remark; + + //token中信息 + private String customerId; + private String staffId; +} From 1e3a21386755f518035b3cd1c17c69e337760d8c Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Mon, 17 Jan 2022 17:19:16 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E4=BA=BA=E5=91=98=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=B0=83=E6=95=B4=E5=88=A4=E6=96=AD=E8=BA=AB?= =?UTF-8?q?=E4=BB=BD=E8=AF=81=E5=8F=B7=E5=94=AF=E4=B8=80=EF=BC=8C=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=8F=98=E6=9B=B4=E8=AE=B0=E5=BD=95=E3=80=81=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=E6=98=8E=E7=BB=86=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/IcResiUserServiceImpl.java | 84 ++++++++++++++++--- 1 file changed, 74 insertions(+), 10 deletions(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java index cfa57f050e..93d7eaefca 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java @@ -54,9 +54,13 @@ import com.epmet.dto.form.*; import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; import com.epmet.dto.result.*; import com.epmet.entity.IcResiUserEntity; +import com.epmet.entity.IcUserChangeDetailedEntity; +import com.epmet.entity.IcUserChangeRecordEntity; import com.epmet.excel.support.ExportResiUserItemDTO; import com.epmet.feign.*; import com.epmet.service.IcResiUserService; +import com.epmet.service.IcUserChangeDetailedService; +import com.epmet.service.IcUserChangeRecordService; import com.epmet.service.UserService; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; @@ -106,6 +110,10 @@ public class IcResiUserServiceImpl extends BaseServiceImpl getWrapper(Map params){ String id = (String)params.get(FieldConstant.ID_HUMP); @@ -162,9 +170,12 @@ public class IcResiUserServiceImpl extends BaseServiceImpl { + String name = ""; + LinkedHashMap map = new LinkedHashMap<>(); + for (IcResiUserFormDTO d : formDTO) { if ("ic_resi_user".equals(d.getTableName())) { - LinkedHashMap map = d.getList().get(0); + map = d.getList().get(0); + name = map.get("NAME"); map.put("id", resiUserId); map.put("customer_id", tokenDto.getCustomerId()); map.put("created_by", tokenDto.getUserId()); @@ -195,26 +206,79 @@ public class IcResiUserServiceImpl extends BaseServiceImpl { if (!"ic_resi_user".equals(d.getTableName())) { - for (LinkedHashMap map : d.getList()) { - map.put("id", UUID.randomUUID().toString().replaceAll("-", "")); - map.put("ic_resi_user", resiUserId); - map.put("customer_id", tokenDto.getCustomerId()); - map.put("created_by", tokenDto.getUserId()); - map.put("updated_by", tokenDto.getUserId()); + for (LinkedHashMap hash : d.getList()) { + hash.put("id", UUID.randomUUID().toString().replaceAll("-", "")); + hash.put("ic_resi_user", resiUserId); + hash.put("customer_id", tokenDto.getCustomerId()); + hash.put("created_by", tokenDto.getUserId()); + hash.put("updated_by", tokenDto.getUserId()); //字表新增数据 - baseDao.add(d.getTableName(), map); + baseDao.add(d.getTableName(), hash); } } }); + //3.变更记录表和变更记录明细表新增数据 + CustomerStaffInfoCacheResult staffInfoCache = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); + //3-1.变更记录表 + IcUserChangeRecordEntity changeRecordEntity = new IcUserChangeRecordEntity(); + changeRecordEntity.setCustomerId(tokenDto.getCustomerId()); + changeRecordEntity.setOperatorId(tokenDto.getUserId()); + changeRecordEntity.setIcUserId(resiUserId); + changeRecordEntity.setOperatorName(staffInfoCache.getRealName()); + changeRecordEntity.setIcUserName(name); + changeRecordEntity.setType("add"); + changeRecordEntity.setTypeName("新增"); + changeRecordEntity.setBeforeChangeName("-"); + changeRecordEntity.setAfterChangeName("-"); + changeRecordEntity.setChangeTime(new java.util.Date()); + icUserChangeRecordService.insert(changeRecordEntity); + //3-2.变更明细表 + List changeDetailedEntityList = saveChangeRecord(tokenDto, map, resiUserId, changeRecordEntity.getId()); + icUserChangeDetailedService.insertBatch(changeDetailedEntityList); + return resiUserId; } + /** + * @Author sun + * @Description 变更明细表 + **/ + private List saveChangeRecord(TokenDto tokenDto, LinkedHashMap map, String icUserId, String icUserChangeRecordId) { + List list = new ArrayList<>(); + Result> resultList = operCustomizeOpenFeignClient.categoryWarnConfigList(tokenDto.getCustomerId()); + if (!resultList.success()) { + throw new RuntimeException("人员新增,获取客户居民类别预警配置表数据失败"); + } + IcUserChangeDetailedEntity outEntity = null; + for (IcResiCategoryWarnConfigDTO cf : resultList.getData()) { + if (map.containsKey(cf.getColumnName()) && "1".equals(map.get(cf.getColumnName()))) { + //新增 + outEntity = new IcUserChangeDetailedEntity(); + outEntity.setCustomerId(tokenDto.getCustomerId()); + outEntity.setIcUserChangeRecordId(icUserChangeRecordId); + outEntity.setAgencyId(map.get("AGENCY_ID")); + outEntity.setGridId(map.get("GRID_ID")); + outEntity.setNeighborHoodId(map.get("VILLAGE_ID")); + outEntity.setBuildingId(map.get("BUILD_ID")); + outEntity.setBuildingUnitId(map.get("UNIT_ID")); + outEntity.setHouseId(map.get("HOME_ID")); + outEntity.setIcUserId(icUserId); + outEntity.setType("add"); + outEntity.setTypeName("新增"); + outEntity.setFieldName(cf.getColumnName()); + outEntity.setValue(1); + list.add(outEntity); + } + } + return list; + } + /** * @Author sun * @Description 党建互联平台--修改居民信息 From ca3f532dbd4ec50740bf4d30cad03e8f0d268780 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 18 Jan 2022 09:25:17 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E3=80=90=E5=9F=BA=E7=A1=80=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E3=80=91=E5=8F=98=E6=9B=B4=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/IcResiUserChangeRecordFormDTO.java | 32 +++++++++++++++++++ .../result/IcUserChangeRecordResultDTO.java | 20 ++++++++++++ .../IcUserChangeRecordController.java | 16 ++++++++++ .../com/epmet/dao/IcUserChangeRecordDao.java | 11 ++++++- .../service/IcUserChangeRecordService.java | 7 ++++ .../impl/IcUserChangeRecordServiceImpl.java | 22 +++++++++++++ .../mapper/IcUserChangeRecordDao.xml | 22 +++++++++++++ 7 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserChangeRecordFormDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcUserChangeRecordResultDTO.java diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserChangeRecordFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserChangeRecordFormDTO.java new file mode 100644 index 0000000000..9d8167fd86 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserChangeRecordFormDTO.java @@ -0,0 +1,32 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 【基础信息】变更记录 + * @Author sun + */ +@Data +public class IcResiUserChangeRecordFormDTO implements Serializable { + private static final long serialVersionUID = 9156247659994638103L; + public interface ChangeRecord extends CustomerClientShowGroup {} + + /** + * 字段对应表名 + */ + @NotBlank(message = "人员Id不能为空" , groups = ChangeRecord.class) + private String icUserId; + + /** + * 页码 + */ + private Integer pageNo = 1; + /** + * 每页显示数量 + */ + private Integer pageSize = 20; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcUserChangeRecordResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcUserChangeRecordResultDTO.java new file mode 100644 index 0000000000..872c619cea --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/IcUserChangeRecordResultDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.result; + +import com.epmet.dto.IcUserChangeRecordDTO; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description 【基础信息】变更记录 + * @Author sun + */ +@Data +public class IcUserChangeRecordResultDTO implements Serializable { + private static final long serialVersionUID = 1L; + //集合总条数 + private Integer total = 0; + //变更记录 + private List list; +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcUserChangeRecordController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcUserChangeRecordController.java index 6da9c5b6cf..fc11027e8f 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcUserChangeRecordController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcUserChangeRecordController.java @@ -17,8 +17,15 @@ package com.epmet.controller; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.form.IcResiUserChangeRecordFormDTO; +import com.epmet.dto.form.IcResiUserTransferFormDTO; +import com.epmet.dto.result.IcUserChangeRecordResultDTO; import com.epmet.service.IcUserChangeRecordService; import org.springframework.beans.factory.annotation.Autowired; +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; @@ -36,5 +43,14 @@ public class IcUserChangeRecordController { @Autowired private IcUserChangeRecordService icUserChangeRecordService; + /** + * @Author sun + * @Description 【基础信息】变更记录 + **/ + @PostMapping("list") + public Result list(@RequestBody IcResiUserChangeRecordFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, IcResiUserTransferFormDTO.TransferAdd.class); + return new Result().ok(icUserChangeRecordService.list(formDTO)); + } } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcUserChangeRecordDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcUserChangeRecordDao.java index f552d6798a..d0079ab6eb 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcUserChangeRecordDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcUserChangeRecordDao.java @@ -18,8 +18,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.IcUserChangeRecordDTO; import com.epmet.entity.IcUserChangeRecordEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 居民变更记录表 @@ -29,5 +33,10 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcUserChangeRecordDao extends BaseDao { - + + /** + * @Author sun + * @Description 查询居民变更记录 + **/ + List getList(@Param("icUserId") String icUserId); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcUserChangeRecordService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcUserChangeRecordService.java index 61ba776f9e..8032331a16 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcUserChangeRecordService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcUserChangeRecordService.java @@ -18,6 +18,8 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.form.IcResiUserChangeRecordFormDTO; +import com.epmet.dto.result.IcUserChangeRecordResultDTO; import com.epmet.entity.IcUserChangeRecordEntity; /** @@ -28,4 +30,9 @@ import com.epmet.entity.IcUserChangeRecordEntity; */ public interface IcUserChangeRecordService extends BaseService { + /** + * @Author sun + * @Description 【基础信息】变更记录 + **/ + IcUserChangeRecordResultDTO list(IcResiUserChangeRecordFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java index 92589c9bfc..4b61577545 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java @@ -19,9 +19,15 @@ package com.epmet.service.impl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.dao.IcUserChangeRecordDao; +import com.epmet.dto.IcUserChangeRecordDTO; +import com.epmet.dto.form.IcResiUserChangeRecordFormDTO; +import com.epmet.dto.result.IcUserChangeRecordResultDTO; import com.epmet.entity.IcUserChangeRecordEntity; import com.epmet.service.IcUserChangeRecordService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; /** * 居民变更记录表 @@ -32,5 +38,21 @@ import org.springframework.stereotype.Service; @Service public class IcUserChangeRecordServiceImpl extends BaseServiceImpl implements IcUserChangeRecordService { + /** + * @Author sun + * @Description 【基础信息】变更记录 + **/ + @Override + public IcUserChangeRecordResultDTO list(IcResiUserChangeRecordFormDTO formDTO) { + IcUserChangeRecordResultDTO resultDTO = new IcUserChangeRecordResultDTO(); + PageInfo result = + PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.getList(formDTO.getIcUserId())); + if (CollectionUtils.isEmpty(result.getList())) { + return resultDTO; + } + resultDTO.setTotal((int) result.getTotal()); + resultDTO.setList(result.getList()); + return resultDTO; + } } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcUserChangeRecordDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcUserChangeRecordDao.xml index 6632dd653c..7c606296e0 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcUserChangeRecordDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcUserChangeRecordDao.xml @@ -3,5 +3,27 @@ + \ No newline at end of file From 65b1bce49b1f18a67b8f770ddbd6d62b6d230ce0 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 18 Jan 2022 09:58:44 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E4=BA=BA=E5=91=98=E9=A2=84=E8=AD=A6?= =?UTF-8?q?=E5=8F=B3=E4=BE=A7=E5=88=97=E8=A1=A8=E5=B0=8F=E6=9E=B6=E5=AD=90?= =?UTF-8?q?=20=E4=BA=BA=E5=91=98=E7=B1=BB=E5=88=AB=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=E5=B8=B8=E7=94=A8=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/AddOftenUseFunctionFormDTO.java | 6 +- .../PackageAddOftenUseFunctionFormDTO.java | 27 ++++++++ .../IcOftenUseFunctionController.java | 3 + .../form/EditIndividualCategoryFormDTO.java | 6 +- .../PackageEditIndividualCategoryFormDTO.java | 27 ++++++++ .../IcIndividualCategoryManageController.java | 3 + .../dto/form/PersonWarnRightListFormDTO.java | 25 +++++++ .../result/PersonWarnRightListResultDTO.java | 68 +++++++++++++++++++ .../controller/IcResiUserController.java | 13 ++++ .../com/epmet/service/IcResiUserService.java | 10 +++ .../service/impl/IcResiUserServiceImpl.java | 12 ++++ 11 files changed, 192 insertions(+), 8 deletions(-) create mode 100644 epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/PackageAddOftenUseFunctionFormDTO.java create mode 100644 epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/PackageEditIndividualCategoryFormDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PersonWarnRightListFormDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PersonWarnRightListResultDTO.java diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/AddOftenUseFunctionFormDTO.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/AddOftenUseFunctionFormDTO.java index f03b2a2cf0..d4e5f13356 100644 --- a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/AddOftenUseFunctionFormDTO.java +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/AddOftenUseFunctionFormDTO.java @@ -16,11 +16,9 @@ public class AddOftenUseFunctionFormDTO implements Serializable { private static final long serialVersionUID = -8044386389656626183L; - public interface AddOftenUseFunctionForm{} - - @NotBlank(message = "menuId不能为空", groups = AddOftenUseFunctionForm.class) + @NotBlank(message = "menuId不能为空",groups = PackageAddOftenUseFunctionFormDTO.PackageAddOftenUseFunctionForm.class) private String menuId; - @NotNull(message = "sort不能为空", groups = AddOftenUseFunctionForm.class) + @NotNull(message = "sort不能为空",groups = PackageAddOftenUseFunctionFormDTO.PackageAddOftenUseFunctionForm.class) private Integer sort; } diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/PackageAddOftenUseFunctionFormDTO.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/PackageAddOftenUseFunctionFormDTO.java new file mode 100644 index 0000000000..f34c326b3d --- /dev/null +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/PackageAddOftenUseFunctionFormDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.form; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.validation.Valid; +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2022/1/17 5:20 下午 + * @DESC + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class PackageAddOftenUseFunctionFormDTO implements Serializable { + + public interface PackageAddOftenUseFunctionForm{} + + @Valid + public List list; + +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/IcOftenUseFunctionController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/IcOftenUseFunctionController.java index 07f036e90a..6d89deab21 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/IcOftenUseFunctionController.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/IcOftenUseFunctionController.java @@ -9,6 +9,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IcOftenUseFunctionDTO; import com.epmet.dto.form.AddOftenUseFunctionFormDTO; +import com.epmet.dto.form.PackageAddOftenUseFunctionFormDTO; import com.epmet.dto.result.OftenUseFunctionListResultDTO; import com.epmet.service.IcOftenUseFunctionService; import org.springframework.beans.factory.annotation.Autowired; @@ -49,6 +50,8 @@ public class IcOftenUseFunctionController { */ @PostMapping("addoftenusefunction") public Result addOftenUseFunction(@RequestBody List formDTOS, @LoginUser TokenDto tokenDto){ + PackageAddOftenUseFunctionFormDTO fo = new PackageAddOftenUseFunctionFormDTO(formDTOS); + ValidatorUtils.validateEntity(fo, PackageAddOftenUseFunctionFormDTO.PackageAddOftenUseFunctionForm.class); icOftenUseFunctionService.addOftenUseFunction(formDTOS, tokenDto); return new Result(); } diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/EditIndividualCategoryFormDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/EditIndividualCategoryFormDTO.java index b41d1d04df..95cd149d83 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/EditIndividualCategoryFormDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/EditIndividualCategoryFormDTO.java @@ -16,11 +16,9 @@ public class EditIndividualCategoryFormDTO implements Serializable { private static final long serialVersionUID = -3492393795553841513L; - public interface EditIndividualCategoryForm{} - - @NotBlank(message = "columnId不能为空",groups = EditIndividualCategoryForm.class) + @NotBlank(message = "columnId不能为空",groups = PackageEditIndividualCategoryFormDTO.PackageEditIndividualCategoryForm.class) private String columnId; - @NotNull(message = "sort不能为空",groups = EditIndividualCategoryForm.class) + @NotNull(message = "sort不能为空",groups = PackageEditIndividualCategoryFormDTO.PackageEditIndividualCategoryForm.class) private Integer sort; } diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/PackageEditIndividualCategoryFormDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/PackageEditIndividualCategoryFormDTO.java new file mode 100644 index 0000000000..862c6fe88e --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/PackageEditIndividualCategoryFormDTO.java @@ -0,0 +1,27 @@ +package com.epmet.dto.form; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.validation.Valid; +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2022/1/17 5:49 下午 + * @DESC + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class PackageEditIndividualCategoryFormDTO implements Serializable { + + private static final long serialVersionUID = -6112833952805305270L; + + public interface PackageEditIndividualCategoryForm{} + + @Valid + private List list; +} diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcIndividualCategoryManageController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcIndividualCategoryManageController.java index cd3122cd47..5a902c2c99 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcIndividualCategoryManageController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcIndividualCategoryManageController.java @@ -9,6 +9,7 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IcIndividualCategoryManageDTO; import com.epmet.dto.form.EditIndividualCategoryFormDTO; +import com.epmet.dto.form.PackageEditIndividualCategoryFormDTO; import com.epmet.dto.result.IndividualCategoryListResultDTO; import com.epmet.service.IcIndividualCategoryManageService; import org.springframework.beans.factory.annotation.Autowired; @@ -49,6 +50,8 @@ public class IcIndividualCategoryManageController { */ @PostMapping("editindividualcategory") public Result editIndividualCategory(@RequestBody List formDTOS,@LoginUser TokenDto tokenDto){ + PackageEditIndividualCategoryFormDTO formDTO = new PackageEditIndividualCategoryFormDTO(formDTOS); + ValidatorUtils.validateEntity(formDTO,PackageEditIndividualCategoryFormDTO.PackageEditIndividualCategoryForm.class); icIndividualCategoryManageService.editIndividualCategory(formDTOS,tokenDto); return new Result(); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PersonWarnRightListFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PersonWarnRightListFormDTO.java new file mode 100644 index 0000000000..977390e31a --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/PersonWarnRightListFormDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/1/17 4:13 下午 + * @DESC + */ +@Data +public class PersonWarnRightListFormDTO implements Serializable { + + private static final long serialVersionUID = -3561699479212127370L; + + public interface PersonWarnRightListForm{} + + @NotNull(message = "pageNo不能为空",groups = PersonWarnRightListForm.class) + private Integer pageNo; + + @NotNull(message = "pageSize不能为空",groups = PersonWarnRightListForm.class) + private Integer pageSize; +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PersonWarnRightListResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PersonWarnRightListResultDTO.java new file mode 100644 index 0000000000..031f0e6c3d --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/PersonWarnRightListResultDTO.java @@ -0,0 +1,68 @@ +package com.epmet.dto.result; + +import com.epmet.commons.tools.constant.NumConstant; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2022/1/17 4:16 下午 + * @DESC + */ +@Data +public class PersonWarnRightListResultDTO implements Serializable { + + private static final long serialVersionUID = -9181230625228226662L; + + private Integer total; + + private List list; + + public PersonWarnRightListResultDTO() { + this.total = NumConstant.ZERO; + this.list = new ArrayList<>(); + } + + @Data + public static class PersonWarnRightList{ + + /** + * 类型 + */ + private List type; + + /** + * 所属网格 + */ + private String gridName; + + /** + * 姓名 + */ + private String name; + + /** + * 所属家庭 + */ + private String family; + + /** + * 电话 + */ + private String mobile; + + private String userId; + + public PersonWarnRightList() { + this.type = new ArrayList<>(); + this.gridName = ""; + this.name = ""; + this.family = ""; + this.mobile = ""; + this.userId = ""; + } + } +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java index dd6cf7ef7e..0c573c1049 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java @@ -668,4 +668,17 @@ public class IcResiUserController { PageData> r = icResiUserService.pageResiMap(input); return new Result>>().ok(r); } + + /** + * @Description 【社区查询】人员预警右侧列表 + * @param formDTO + * @param tokenDto + * @author zxc + * @date 2022/1/17 4:25 下午 + */ + @PostMapping("personwarn/rightlist") + public Result personWarnRightList(@RequestBody PersonWarnRightListFormDTO formDTO,@LoginUser TokenDto tokenDto){ + ValidatorUtils.validateEntity(formDTO, PersonWarnRightListFormDTO.PersonWarnRightListForm.class); + return new Result().ok(icResiUserService.personWarnRightList(formDTO,tokenDto)); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java index 16d2aaf0d9..dc2c2a76d5 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiUserService.java @@ -199,4 +199,14 @@ public interface IcResiUserService extends BaseService { * @return */ IcResiUserDTO get(String icResiUserId); + + /** + * @Description 【社区查询】人员预警右侧列表 + * @param formDTO + * @param tokenDto + * @author zxc + * @date 2022/1/17 4:25 下午 + */ + PersonWarnRightListResultDTO personWarnRightList(PersonWarnRightListFormDTO formDTO, TokenDto tokenDto); + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java index 93d7eaefca..217283da6a 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java @@ -1006,6 +1006,18 @@ public class IcResiUserServiceImpl extends BaseServiceImpl Date: Tue, 18 Jan 2022 10:27:38 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=B1=85=E6=B0=91=E5=88=86=E7=B1=BB=E9=85=8D=E7=BD=AEshow?= =?UTF-8?q?=E7=9A=84=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