diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java index fb294721f8..57e1a2b236 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/StrConstant.java @@ -101,7 +101,8 @@ public interface StrConstant { String PY_ROOT_AGENCY = "53613e1c5de6ed473467f0159a10b135"; //磐石街道客户Id String PS_CUSTOMER_ID = "1580460084738760705"; - + //小寨子客户id + String XIAOZHAIZI_CUSTOMER_ID="1536638904600752130"; /** * 单位积分,积分上限,积分说明,积分事件 */ diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerStaffRedis.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerStaffRedis.java index 66abe790f3..61b5b6f250 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerStaffRedis.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerStaffRedis.java @@ -88,11 +88,12 @@ public class CustomerStaffRedis { private static CustomerStaffInfoCache reloadStaffCache(String staffId, String key) { Result staffResult = customerStaffRedis.commonAggFeignClient.getStaffInfo(staffId); if (staffResult == null || !staffResult.success()) { + log.error("/data/aggregator/epmetuser/getStaffInfo/{staffId} 异常 staffId: ",staffId); throw new RenException("获取工作人员信息失败"); } CustomerStaffInfoCache resultData = staffResult.getData(); if (resultData == null) { - log.warn("getStaffInfo staff is null,staffId:{}", staffId); + log.error("getStaffInfo staff is null,staffId:{}", staffId); return null; } diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/form/ListStaffFormDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/form/ListStaffFormDTO.java index e7569b16d1..bec51ab4db 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/form/ListStaffFormDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/form/ListStaffFormDTO.java @@ -25,4 +25,9 @@ public class ListStaffFormDTO implements Serializable { private String customerId; public interface Staff extends CustomerClientShowGroup {} + /** + * 姓名或者手机号 + * 可以不填 + */ + private String keyWord; } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/CustomerStaffDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/CustomerStaffDao.java index 2319248c83..6062e45dcb 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/CustomerStaffDao.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/epmetuser/CustomerStaffDao.java @@ -53,7 +53,9 @@ public interface CustomerStaffDao extends BaseDao { * @Description 模糊查询用户、角色信息 * @author sun */ - List selectByRealName(@Param("customerId") String customerId, @Param("realName") String realName); + List selectByRealName(@Param("customerId") String customerId, + @Param("realName") String realName, + @Param("keyWord") String keyWord); /** * @Description 分页查询排好序的工作人员Id列表 diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java index f6de7bd634..171f1a520d 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java @@ -9,7 +9,6 @@ import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.form.IdAndNameDTO; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.enums.OrgTypeEnum; -import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; @@ -56,9 +55,9 @@ import com.epmet.dataaggre.service.opercustomize.CustomerFootBarService; import com.epmet.dto.IcResiUserDTO; import com.epmet.dto.UserBaseInfoDTO; import com.epmet.dto.form.DetailByTypeFormDTO; +import com.epmet.dto.form.GetStaffExistRoleFormDTO; import com.epmet.dto.form.SystemMsgFormDTO; import com.epmet.dto.result.DetailByTypeResultDTO; -import com.epmet.dto.form.GetStaffExistRoleFormDTO; import com.epmet.dto.result.NewUserRoleResultDTO; import com.epmet.dto.result.StaffRoleResultDTO; import com.epmet.feign.EpmetMessageOpenFeignClient; @@ -538,7 +537,7 @@ public class EpmetUserServiceImpl implements EpmetUserService { @Override public List listStaff(ListStaffFormDTO formDTO) { //1.模糊查询用户、角色信息 - List resultList = customerStaffDao.selectByRealName(formDTO.getCustomerId(), formDTO.getRealName()); + List resultList = customerStaffDao.selectByRealName(formDTO.getCustomerId(), formDTO.getRealName(),formDTO.getKeyWord()); if (null == resultList || resultList.size() < NumConstant.ONE) { return new ArrayList<>(); } @@ -638,6 +637,7 @@ public class EpmetUserServiceImpl implements EpmetUserService { .eq(CustomerStaffEntity::getDelFlag,NumConstant.ZERO_STR); CustomerStaffEntity staffEntity = customerStaffDao.selectOne(queryWrapper); if (null == staffEntity) { + log.error(String.format("customer_staff is null staffId:%s",staffId)); return null; } CustomerStaffResultDTO result = ConvertUtils.sourceToTarget(staffEntity, CustomerStaffResultDTO.class); diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerStaffDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerStaffDao.xml index 2ee923a736..8bc486c5e0 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerStaffDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/epmetuser/CustomerStaffDao.xml @@ -49,7 +49,14 @@ WHERE del_flag = '0' AND customer_id = #{customerId} - AND real_name LIKE CONCAT('%', #{realName}, '%') + + AND real_name LIKE CONCAT('%', #{realName}, '%') + + + AND (REAL_NAME LIKE CONCAT('%', #{keyWord}, '%') + or MOBILE LIKE CONCAT('%', #{keyWord}, '%') + ) + @@ -76,12 +84,14 @@ where ID_CARD=#{idCard} and del_flag='0' - + update pli_change_welfare set REMOVE_DATE=#{removeDate}, REMOVE_REASON=#{removeReason}, - del_flag='1' + del_flag='1', + UPDATED_BY = #{updatedBy}, + UPDATED_TIME = #{removeDate} where del_flag='0' AND ID = #{id}