|
@ -2,16 +2,26 @@ package com.epmet.dataaggre.service.epmetuser.impl; |
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
|
|
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
|
|
|
|
|
import com.epmet.commons.rocketmq.constants.TopicConstants; |
|
|
|
|
|
import com.epmet.commons.rocketmq.messages.CheckMQMsg; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
import com.epmet.commons.tools.dto.form.IdAndNameDTO; |
|
|
import com.epmet.commons.tools.dto.form.IdAndNameDTO; |
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
import com.epmet.commons.tools.enums.OrgTypeEnum; |
|
|
import com.epmet.commons.tools.enums.OrgTypeEnum; |
|
|
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
|
|
import com.epmet.commons.tools.redis.common.CustomerIcHouseRedis; |
|
|
|
|
|
import com.epmet.commons.tools.redis.common.CustomerResiUserRedis; |
|
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
|
|
|
import com.epmet.commons.tools.redis.common.bean.HouseInfoCache; |
|
|
|
|
|
import com.epmet.commons.tools.redis.common.bean.IcResiUserInfoCache; |
|
|
|
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
import com.epmet.commons.tools.utils.DateUtils; |
|
|
import com.epmet.commons.tools.utils.DateUtils; |
|
|
|
|
|
import com.epmet.commons.tools.utils.IpUtils; |
|
|
import com.epmet.constant.BadgeConstant; |
|
|
import com.epmet.constant.BadgeConstant; |
|
|
|
|
|
import com.epmet.constant.NeighborhoodConstant; |
|
|
import com.epmet.constant.OrgInfoConstant; |
|
|
import com.epmet.constant.OrgInfoConstant; |
|
|
import com.epmet.dataaggre.constant.DataSourceConstant; |
|
|
import com.epmet.dataaggre.constant.DataSourceConstant; |
|
|
import com.epmet.dataaggre.dao.epmetuser.*; |
|
|
import com.epmet.dataaggre.dao.epmetuser.*; |
|
@ -42,7 +52,11 @@ import com.epmet.dataaggre.service.govproject.GovProjectService; |
|
|
import com.epmet.dataaggre.service.opercustomize.CustomerFootBarService; |
|
|
import com.epmet.dataaggre.service.opercustomize.CustomerFootBarService; |
|
|
import com.epmet.dto.IcResiUserDTO; |
|
|
import com.epmet.dto.IcResiUserDTO; |
|
|
import com.epmet.dto.UserBaseInfoDTO; |
|
|
import com.epmet.dto.UserBaseInfoDTO; |
|
|
|
|
|
import com.epmet.dto.form.DetailByTypeFormDTO; |
|
|
|
|
|
import com.epmet.dto.form.SystemMsgFormDTO; |
|
|
|
|
|
import com.epmet.dto.result.DetailByTypeResultDTO; |
|
|
import com.epmet.dto.result.StaffRoleResultDTO; |
|
|
import com.epmet.dto.result.StaffRoleResultDTO; |
|
|
|
|
|
import com.epmet.feign.EpmetMessageOpenFeignClient; |
|
|
import com.github.pagehelper.PageHelper; |
|
|
import com.github.pagehelper.PageHelper; |
|
|
import com.github.pagehelper.PageInfo; |
|
|
import com.github.pagehelper.PageInfo; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
@ -51,8 +65,11 @@ import org.apache.commons.collections4.MapUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
import org.springframework.web.context.request.RequestContextHolder; |
|
|
|
|
|
import org.springframework.web.context.request.ServletRequestAttributes; |
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
import javax.annotation.Resource; |
|
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
import java.text.NumberFormat; |
|
|
import java.text.NumberFormat; |
|
|
import java.util.*; |
|
|
import java.util.*; |
|
|
import java.util.stream.Collectors; |
|
|
import java.util.stream.Collectors; |
|
@ -98,6 +115,8 @@ public class EpmetUserServiceImpl implements EpmetUserService { |
|
|
private IcPointVaccinesInoculationDao pointVaccinesInoculationDao; |
|
|
private IcPointVaccinesInoculationDao pointVaccinesInoculationDao; |
|
|
@Resource |
|
|
@Resource |
|
|
private IcPointNucleicMonitoringDao pointNucleicMonitoringDao; |
|
|
private IcPointNucleicMonitoringDao pointNucleicMonitoringDao; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @Description 根据UserIds查询 |
|
|
* @Description 根据UserIds查询 |
|
@ -971,4 +990,45 @@ public class EpmetUserServiceImpl implements EpmetUserService { |
|
|
query.like(StringUtils.isNotBlank(search), IcPointNucleicMonitoringEntity::getName, search); |
|
|
query.like(StringUtils.isNotBlank(search), IcPointNucleicMonitoringEntity::getName, search); |
|
|
return pointNucleicMonitoringDao.selectList(query); |
|
|
return pointNucleicMonitoringDao.selectList(query); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public DetailByTypeResultDTO detailByType(DetailByTypeFormDTO formDTO, TokenDto tokenDto) { |
|
|
|
|
|
DetailByTypeResultDTO result = new DetailByTypeResultDTO(); |
|
|
|
|
|
String customerId = tokenDto.getCustomerId(); |
|
|
|
|
|
String userId = tokenDto.getUserId(); |
|
|
|
|
|
CheckMQMsg msg = new CheckMQMsg(); |
|
|
|
|
|
if (formDTO.getType().equals(NeighborhoodConstant.HOUSE)){ |
|
|
|
|
|
HouseInfoCache houseInfo = CustomerIcHouseRedis.getHouseInfo(customerId, formDTO.getId()); |
|
|
|
|
|
if (null == houseInfo){ |
|
|
|
|
|
throw new EpmetException("查询房屋信息失败:"+formDTO.getId()); |
|
|
|
|
|
} |
|
|
|
|
|
result.setMobile(houseInfo.getOwnerPhone()); |
|
|
|
|
|
result.setIdCard(houseInfo.getOwnerIdCard()); |
|
|
|
|
|
msg.setContent("查看"+houseInfo.getAllName()+"房屋的敏感信息"); |
|
|
|
|
|
msg.setType("checkHouse"); |
|
|
|
|
|
msg.setTypeDisplay("查看"+houseInfo.getAllName()+"房屋的敏感信息"); |
|
|
|
|
|
}else if (formDTO.getType().equals(NeighborhoodConstant.IC_RESI_USER)){ |
|
|
|
|
|
IcResiUserInfoCache icResiUserInfo = CustomerResiUserRedis.getIcResiUserInfo(formDTO.getId()); |
|
|
|
|
|
if (null == icResiUserInfo){ |
|
|
|
|
|
throw new EpmetException("查询icResiUser失败:"+formDTO.getId()); |
|
|
|
|
|
} |
|
|
|
|
|
result.setIdCard(icResiUserInfo.getIdCard()); |
|
|
|
|
|
result.setMobile(icResiUserInfo.getMobile()); |
|
|
|
|
|
msg.setContent("查看"+icResiUserInfo.getName()+"的敏感信息"); |
|
|
|
|
|
msg.setType("checkIcResiUser"); |
|
|
|
|
|
msg.setTypeDisplay("查看"+icResiUserInfo.getName()+"的敏感信息"); |
|
|
|
|
|
} |
|
|
|
|
|
// 发送mq消息
|
|
|
|
|
|
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); |
|
|
|
|
|
msg.setOperateTime(new Date()); |
|
|
|
|
|
msg.setUserId(userId); |
|
|
|
|
|
msg.setFromApp(tokenDto.getApp()); |
|
|
|
|
|
msg.setIp(IpUtils.getIpAddr(request)); |
|
|
|
|
|
msg.setFromClient(tokenDto.getClient()); |
|
|
|
|
|
SystemMsgFormDTO form = new SystemMsgFormDTO(); |
|
|
|
|
|
form.setMessageType(TopicConstants.CHECK_OR_EXPORT); |
|
|
|
|
|
form.setContent(msg); |
|
|
|
|
|
epmetMessageOpenFeignClient.sendSystemMsgByMQ(form); |
|
|
|
|
|
return result; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|