diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/processor/MaskProcessor.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/processor/MaskProcessor.java index a3169a2ec6..0ebc34c00c 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/processor/MaskProcessor.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/processor/MaskProcessor.java @@ -15,7 +15,6 @@ import java.lang.reflect.Field; import java.util.Arrays; import java.util.List; import java.util.Map; -import java.util.regex.Pattern; /** * desc:脱敏处理器 @@ -83,6 +82,9 @@ public class MaskProcessor { String maskResult = maskString((String) value, fieldsMaskType.get(index)); entry.setValue(maskResult); } + } else if (value instanceof List) { + // 列表 + ((List)value).forEach(e -> mask(e)); } } } @@ -155,10 +157,12 @@ public class MaskProcessor { // 2个字以上的,首位字母明文,中间* // 中文不能用\\w,要用[\u4e00-\u9fa5] if (length == 2) { - return originString.replaceAll("^([\\u4e00-\\u9fa5]).*$", "$1*"); +// return originString.replaceAll("^([\\u4e00-\\u9fa5]).*$", "$1*"); + return originString.substring(0).concat("*"); } else { String maskStr = StrUtil.repeat("*", length - 2); - return originString.replaceAll("^([\\u4e00-\\u9fa5]).*([\\u4e00-\\u9fa5])$", "$1" + maskStr + "$2"); +// return originString.replaceAll("^([\\u4e00-\\u9fa5]).*([\\u4e00-\\u9fa5])$", "$1" + maskStr + "$2"); + return originString.charAt(0) + maskStr + originString.charAt(originString.length() - 1); } } @@ -168,7 +172,7 @@ public class MaskProcessor { * @param originString * @return */ - private String maskIdCard(String originString) { + public static String maskIdCard(String originString) { IdCardRegexUtils regexUtil = IdCardRegexUtils.parse(originString); if (regexUtil == null) { @@ -216,7 +220,9 @@ public class MaskProcessor { public static void main(String[] args) { String[] idc = {"idCard"}; String[] idct = {MaskResponse.MASK_TYPE_ID_CARD}; - String r = new MaskProcessor(idc, idct).maskString("333333333333333333", MaskResponse.MASK_TYPE_ID_CARD); + String r = new MaskProcessor(idc, idct).maskString("王五(372284152412022222)", MaskResponse.MASK_TYPE_ID_CARD); System.out.println(r); + String s = MaskProcessor.maskIdCard("372284152412022222"); + System.out.println(s); } } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/CoverageController.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/CoverageController.java index 7a451a9f94..7815998386 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/CoverageController.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/CoverageController.java @@ -1,6 +1,7 @@ package com.epmet.dataaggre.controller; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.annotation.MaskResponse; import com.epmet.commons.tools.dto.result.ZhzlCategorySelectDTO; import com.epmet.commons.tools.enums.ZhzlResiCategoryEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; @@ -74,6 +75,7 @@ public class CoverageController { * @author zxc * @date 2022/7/26 16:29 */ + @MaskResponse(fieldNames = {"mobile","idCard"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE,MaskResponse.MASK_TYPE_ID_CARD}) @PostMapping("search") public Result coverageHomeSearch(@RequestBody CoverageHomeSearchFormDTO formDTO, @LoginUser TokenDto tokenDto){ formDTO.setCustomerId(tokenDto.getCustomerId()); diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/CoverageServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/CoverageServiceImpl.java index ff931888c3..f4553cd9b8 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/CoverageServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/CoverageServiceImpl.java @@ -9,6 +9,7 @@ import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.processor.MaskProcessor; import com.epmet.commons.tools.redis.common.CustomerIcHouseRedis; import com.epmet.commons.tools.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; @@ -670,7 +671,7 @@ public class CoverageServiceImpl implements CoverageService { return new CoverageAnalisisDataListResultDTO( re.getId(), categoryKey, isPage ? categoryDict.getCategoryName() : null, placeType, - re.getName().concat(StrConstant.BRACKET_LEFT).concat(re.getIdCard()).concat(StrConstant.BRACKET_RIGNT), + re.getName().concat(StrConstant.BRACKET_LEFT).concat(MaskProcessor.maskIdCard(re.getIdCard())).concat(StrConstant.BRACKET_RIGNT), coordinates[1], coordinates[0]); }).collect(Collectors.toList()); @@ -684,7 +685,7 @@ public class CoverageServiceImpl implements CoverageService { return new CoverageAnalisisDataListResultDTO( re.getId(), categoryKey, isPage ? categoryDict.getCategoryName() : null, placeType, - re.getName().concat(StrConstant.BRACKET_LEFT).concat(re.getIdNum()).concat(StrConstant.BRACKET_RIGNT), + re.getName().concat(StrConstant.BRACKET_LEFT).concat(MaskProcessor.maskIdCard(re.getIdNum())).concat(StrConstant.BRACKET_RIGNT), coordinates[1], coordinates[0]); }).collect(Collectors.toList()); @@ -1276,4 +1277,4 @@ public class CoverageServiceImpl implements CoverageService { } return resultList; } -} \ No newline at end of file +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovMenuController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovMenuController.java index cc94cd91f0..69de505fed 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovMenuController.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovMenuController.java @@ -59,6 +59,22 @@ public class GovMenuController { return new Result(); } + /** + * 疯狂家按钮,我要写个接口批量赠.... + * @param formList + * @param tokenDto + * @return + */ + @PostMapping("batch-save") + public Result save(@RequestBody List formList, @LoginUser TokenDto tokenDto){ + //效验数据 + ValidatorUtils.validateEntity(formList, AddGroup.class, DefaultGroup.class); + for(GovMenuDTO dto:formList){ + govMenuService.save(dto,tokenDto); + } + return new Result(); + } + @PutMapping public Result update(@RequestBody GovMenuDTO dto, @LoginUser TokenDto tokenDto){ //效验数据 @@ -106,6 +122,7 @@ public class GovMenuController { /** * 导航 + * +数字社区-系统管理-角色管理配置角色权限,也会调用此接口 * @param tokenDto token * @return List */ diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java index a413c9dfdc..3f7dfdcbc4 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java @@ -234,13 +234,22 @@ public class GovMenuServiceImpl extends BaseServiceImpl navDigitalCommunity(TokenDto tokenDto, String tableName) { tableName = getTableName(tableName); - List menuList = baseDao.getCustomerMenuList(tokenDto.getCustomerId(), MenuTypeEnum.MENU.value(), HttpContextUtils.getLanguage(),tableName); + List menuList=new ArrayList<>(); + if("gov_menu".equals(tableName)){ + // 管理平台菜单返回所有的 + menuList = baseDao.getCustomerMenuList(tokenDto.getCustomerId(),null, HttpContextUtils.getLanguage(),tableName); + }else{ + //数据分析还是沿用原来的 + menuList = baseDao.getCustomerMenuList(tokenDto.getCustomerId(), MenuTypeEnum.MENU.value(), HttpContextUtils.getLanguage(),tableName); + } Result isRootManager = epmetUserOpenFeignClient.getIsRootManager(tokenDto.getUserId()); if (!isRootManager.success()){ throw new EpmetException("getIsRootManager method is failure"); @@ -249,6 +258,11 @@ public class GovMenuServiceImpl extends BaseServiceImpl govMenuDTOS = ConvertUtils.sourceToTarget(menuList, GovMenuDTO.class); return TreeUtils.buildTree(govMenuDTOS); } + /*for(GovMenuEntity m:menuList){ + if("ic_resi_add".equals(m.getPermissions())){ + logger.info("1、菜单返回了新增居民"); + } + }*/ disposeGovMenu(menuList,tokenDto.getUserId()); Map> groupByStatus = menuList.stream().collect(Collectors.groupingBy(GovMenuEntity::getRoleStatus)); List dtoList = ConvertUtils.sourceToTarget(CollectionUtils.isEmpty(groupByStatus.get(true)) ? new ArrayList<>() : groupByStatus.get(true), GovMenuDTO.class); @@ -284,11 +298,17 @@ public class GovMenuServiceImpl extends BaseServiceImpl(); return; } + // logger.info("==roleIdList="+ JSON.toJSONString(roleIdList)); List menuIdsList = govRoleMenuDao.getMenuIdsList(roleIdList); if (CollectionUtils.isEmpty(menuIdsList)){ menuList = new ArrayList<>(); return; } + /*for(String mid:menuIdsList){ + if("1581827798717898754".equals(mid)){ + logger.info("2、角色也有此菜单"); + } + }*/ for (String id : menuIdsList) { for (GovMenuEntity m : menuList) { if (m.getId().equals(id)){ diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovMenuDao.xml b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovMenuDao.xml index 6bc815e44d..7a005b3c02 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovMenuDao.xml +++ b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/GovMenuDao.xml @@ -47,9 +47,16 @@ select t1.*, lang.field_value name from gov_menu t1 - INNER join gov_language lang on lang.table_name=#{tableName} and lang.field_name='name' and lang.table_id=t1.id and lang.language=#{language} - RIGHT JOIN gov_customer_menu m ON t1.id = m.TABLE_ID - where t1.del_flag = 0 AND m.del_flag = 0 + INNER join gov_language lang + on (lang.table_name=#{tableName} + and lang.field_name='name' + and lang.table_id=t1.id + and lang.language=#{language} + ) + RIGHT JOIN gov_customer_menu m + ON t1.id = m.TABLE_ID + where t1.del_flag = 0 + AND m.del_flag = 0 and t1.type = #{type} diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index c7bd63814f..5761c7bb7e 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -5,6 +5,7 @@ import com.alibaba.excel.ExcelWriter; import com.alibaba.excel.write.metadata.WriteSheet; import com.alibaba.fastjson.JSON; import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.annotation.MaskResponse; import com.epmet.commons.tools.annotation.RequirePermission; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.constant.NumConstant; @@ -304,6 +305,7 @@ public class IcEventController { * @Author sun * @Description 事件管理-详情 **/ + @MaskResponse(fieldNames = { "idCard"}, fieldsMaskType = {MaskResponse.MASK_TYPE_ID_CARD }) @PostMapping("detail") public Result detail(@LoginUser TokenDto tokenDto, @RequestBody IcEventListFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); diff --git a/epmet-module/oper-access/oper-access-server/src/main/java/com/epmet/controller/OperMenuController.java b/epmet-module/oper-access/oper-access-server/src/main/java/com/epmet/controller/OperMenuController.java index c04455b92e..b9146e88ad 100644 --- a/epmet-module/oper-access/oper-access-server/src/main/java/com/epmet/controller/OperMenuController.java +++ b/epmet-module/oper-access/oper-access-server/src/main/java/com/epmet/controller/OperMenuController.java @@ -1,11 +1,9 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; -import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.exception.ErrorCode; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; -import com.epmet.commons.tools.utils.EpmetRequestHolder; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; diff --git a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberDTO.java b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberDTO.java index 9832a35e5e..74c7166a2c 100644 --- a/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberDTO.java +++ b/epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partymember/IcPartyMemberDTO.java @@ -63,7 +63,8 @@ public class IcPartyMemberDTO implements Serializable { */ @NotBlank(message = "当前网格id不能为空",groups ={AddGroup.class, UpdateGroup.class}) private String mobile; - + private String showMobile; + private String showIdCard; /** * 身份证号 */ diff --git a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberController.java b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberController.java index fbddc60fb1..7628cfbb82 100644 --- a/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberController.java +++ b/epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partymember/controller/IcPartyMemberController.java @@ -30,7 +30,6 @@ import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.constants.ImportTaskConstants; import com.epmet.dto.form.IcPartyMemberFormDTO; import com.epmet.dto.form.IcPartyMemberListFormDTO; -import com.epmet.dto.form.ReadIcMessageFormDTO; import com.epmet.dto.result.ImportTaskCommonResultDTO; import com.epmet.dto.result.PartyMemberAgeResultDTO; import com.epmet.dto.result.PartyMemberEducationResultDTO; @@ -90,9 +89,14 @@ public class IcPartyMemberController implements ResultDataResolver { return new Result>().ok(page); } + @MaskResponse(fieldNames = { "showMobile", "showIdCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD }) @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) public Result get(@LoginUser TokenDto tokenDto, @PathVariable("id") String id){ IcPartyMemberDTO data = icPartyMemberService.get(tokenDto, id); + if(null!=data){ + data.setShowMobile(data.getMobile()); + data.setShowIdCard(data.getIdCard()); + } return new Result().ok(data); } @NoRepeatSubmit diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatDTO.java index 66c9828dfd..1e8da051b1 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcNatDTO.java @@ -61,6 +61,15 @@ public class IcNatDTO implements Serializable { */ private String idCard; + /** + * 脱敏详情用 + */ + private String showMobile; + /** + * 脱敏详情用 + */ + private String showIdCard; + /** * 检测时间,精确到分钟 */ diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java index 9d2ab97099..e88ef1deb7 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcTripReportRecordDTO.java @@ -81,6 +81,11 @@ public class IcTripReportRecordDTO implements Serializable { */ private String realMobile; + /** + * 脱敏 + */ + private String showMobile; + /** * 身份证号 */ @@ -93,6 +98,11 @@ public class IcTripReportRecordDTO implements Serializable { */ private String realIdCard; + /** + * 脱敏 + */ + private String showIdCard; + /** * 用户id */ diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcVaccineDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcVaccineDTO.java index 115eeb2154..b9dca879b0 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcVaccineDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcVaccineDTO.java @@ -36,12 +36,12 @@ public class IcVaccineDTO implements Serializable { * 手机号 */ private String mobile; - + private String showMobile; /** * 身份证号 */ private String idCard; - + private String showIdCard; /** * 是否客户下居民(0:否 1:是) */ diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EpidemicPreventionResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EpidemicPreventionResultDTO.java index 4946982090..f65d4f32cc 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EpidemicPreventionResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/EpidemicPreventionResultDTO.java @@ -38,6 +38,15 @@ public class EpidemicPreventionResultDTO implements Serializable { */ private String idCard; + /** + * 脱敏详情用 + */ + private String showMobile; + /** + * 脱敏详情用 + */ + private String showIdCard; + private String birthDay; /** diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java index 7099e1650b..c48363e679 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VaccinationListResultDTO.java @@ -42,7 +42,10 @@ public class VaccinationListResultDTO implements Serializable { * 真实手机号 */ private String realMobile; - + /** + * 脱敏详情用 + */ + private String showMobile; /** * 身份证 */ @@ -52,6 +55,10 @@ public class VaccinationListResultDTO implements Serializable { * 真实的身份证 */ private String realIdCard; + /** + * 脱敏详情用 + */ + private String showIdCard; private String sex; diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java index 695a739b89..b841e4b6af 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicPreventionController.java @@ -91,6 +91,7 @@ public class IcEpidemicPreventionController{ * @Author zhaoqifeng * @Date 2022/3/29 16:13 */ + @MaskResponse(fieldNames = { "showMobile", "showIdCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD }) @PostMapping("detail") public Result detail(@LoginUser TokenDto tokenDto, @RequestBody EpidemicPreventionFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java index 289bcc5505..f04dbe7ada 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcEpidemicSpecialAttentionController.java @@ -88,6 +88,7 @@ public class IcEpidemicSpecialAttentionController { * @author zxc * @date 2022/4/27 15:47 */ + @MaskResponse(fieldNames = { "showMobile", "showIdCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD }) @PostMapping("detail") public Result detail(@RequestBody AttentionDetailFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO,VaccinationListFormDTO.VaccinationListForm.class); diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatController.java index 00fa15ae2e..2ea3ea881b 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcNatController.java @@ -125,6 +125,7 @@ public class IcNatController implements ResultDataResolver { * @Author sun * @Description 【核酸】核酸检测信息详情 **/ + @MaskResponse(fieldNames = { "showMobile", "showIdCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD }) @NoRepeatSubmit @PostMapping("detail") public Result detail(@RequestBody MyNatListFormDTO formDTO) { 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 701968bcf0..429585d104 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 @@ -426,6 +426,7 @@ public class IcResiUserController implements ResultDataResolver { * @author yinzuomei * @date 2021/10/28 10:29 上午 */ + @MaskResponse(fieldNames = {"MOBILE","ID_CARD"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD}) @PostMapping("detail") public Result queryIcResiDetail(@LoginUser TokenDto tokenDto, @RequestBody IcResiDetailFormDTO pageFormDTO) { //pageFormDTO.setCustomerId("45687aa479955f9d06204d415238f7cc"); @@ -773,6 +774,7 @@ public class IcResiUserController implements ResultDataResolver { * @author zxc * @date 2021/11/3 9:21 上午 */ + @MaskResponse(fieldNames = {"mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE}) @PostMapping("persondata") public Result personData(@LoginUser TokenDto tokenDto, @RequestBody PersonDataFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); @@ -802,6 +804,7 @@ public class IcResiUserController implements ResultDataResolver { * @param tokenDto * @return 根据分类搜索 */ + @MaskResponse(fieldNames = {"mobile","idCard"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD}) @PostMapping("searchbycategory") public Result> search(@RequestBody SearchByNameFormDTO formDTO, @LoginUser TokenDto tokenDto) { formDTO.setCustomerId(tokenDto.getCustomerId()); @@ -914,7 +917,7 @@ public class IcResiUserController implements ResultDataResolver { * @Date 2021/12/10 17:54 */ @PostMapping("partymemberagelist") - @MaskResponse(fieldNames = {"mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE}) + @MaskResponse(fieldNames = {"name","mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_CHINESE_NAME,MaskResponse.MASK_TYPE_MOBILE}) public Result> partyMemberAgelist(@RequestBody PartyMemberListFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); return new Result>().ok(icResiUserService.getPartyMemberAgeList(formDTO)); @@ -993,7 +996,7 @@ public class IcResiUserController implements ResultDataResolver { * @Date 2021/12/10 17:58 */ @PostMapping("partymembereducationlist") - @MaskResponse(fieldNames = {"mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE}) + @MaskResponse(fieldNames = {"name","mobile"}, fieldsMaskType = {MaskResponse.MASK_TYPE_CHINESE_NAME,MaskResponse.MASK_TYPE_MOBILE}) public Result> partyMemberEducationlist(@RequestBody PartyMemberListFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); return new Result>().ok(icResiUserService.getPartyMemberEducationList(formDTO)); @@ -1061,6 +1064,7 @@ public class IcResiUserController implements ResultDataResolver { * @param resiUserId * @return */ + @MaskResponse(fieldNames = {"mobile","idCard"}, fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE,MaskResponse.MASK_TYPE_ID_CARD}) @PostMapping("resi-brief/{resi-user-id}") public Result getResiBrief(@PathVariable("resi-user-id") String resiUserId, @LoginUser TokenDto loginUser) { String customerId = loginUser.getCustomerId(); @@ -1435,6 +1439,7 @@ public class IcResiUserController implements ResultDataResolver { * @Author sun * @Description 【人房概览】居民统计数点击查询列表 **/ + @MaskResponse(fieldNames = {"mobile", "idCard"},fieldsMaskType = {MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD}) @PostMapping("icuserstatislist") public Result> icUserStatisList(@LoginUser TokenDto tokenDto, @RequestBody UserChartFormDTO formDTO) { formDTO.setCustomerId(tokenDto.getCustomerId()); diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java index aea630040c..02bc139e51 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcTripReportRecordController.java @@ -88,6 +88,7 @@ public class IcTripReportRecordController implements ResultDataResolver { * @param formDTO * @return */ + @MaskResponse(fieldNames = { "showMobile", "showIdCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD }) @PostMapping("detail") public Result detail(@LoginUser TokenDto tokenDto,@RequestBody IcTripReportRecordDTO formDTO){ ValidatorUtils.validateEntity(formDTO,IcTripReportRecordDTO.DetailViewGroup.class); diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVaccineController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVaccineController.java index bb34afd612..8c742919a7 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVaccineController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVaccineController.java @@ -231,6 +231,7 @@ public class IcVaccineController implements ResultDataResolver { * @Author sun * @Description 疫苗接种情况-列表点击查询详情 **/ + @MaskResponse(fieldNames = { "showMobile", "showIdCard" }, fieldsMaskType = { MaskResponse.MASK_TYPE_MOBILE, MaskResponse.MASK_TYPE_ID_CARD }) @NoRepeatSubmit @PostMapping("detail") public Result detail(@RequestBody IcVaccineFormDTO formDTO) { diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java index ab52942896..0a76221ff0 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcEpidemicSpecialAttentionServiceImpl.java @@ -578,7 +578,12 @@ public class IcEpidemicSpecialAttentionServiceImpl extends BaseServiceImpl imp return resultDTO; } resultDTO = ConvertUtils.sourceToTarget(entity, IcNatDTO.class); - + resultDTO.setShowIdCard(resultDTO.getIdCard()); + resultDTO.setShowMobile(resultDTO.getMobile()); //2.查询对应的通知记录信息 IcNoticeDTO dto = icNoticeService.getNotice(entity.getCustomerId(), entity.getIdCard()); if (null != dto) { 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 4b7a485d71..1cbea0526e 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 @@ -1776,8 +1776,10 @@ public class IcResiUserServiceImpl extends BaseServiceImpl list = baseDao.getEpidemicPreventionList(formDTO); - if (CollectionUtils.isNotEmpty(list)) { + if (CollectionUtils.isNotEmpty(list) && null != list.get(NumConstant.ZERO)) { result = list.get(NumConstant.ZERO); + result.setShowIdCard(result.getIdCard()); + result.setShowMobile(result.getMobile()); //查询网格名称 GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(result.getGridId()); if (null != gridInfo) { diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java index a758fdba92..bd920882f0 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcTripReportRecordServiceImpl.java @@ -464,6 +464,11 @@ public class IcTripReportRecordServiceImpl extends BaseServiceImpl