wxz 2 years ago
parent
commit
4a04905845
  1. 7
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/form/LogOperationListFormDTO.java
  2. 3
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/LogOperationDao.java
  3. 7
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/mq/listener/listener/AuthOperationLogListener.java
  4. 4
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/mq/listener/listener/CheckAndExportOperationLogListener.java
  5. 13
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/LogOperationServiceImpl.java
  6. 5
      epmet-admin/epmet-admin-server/src/main/resources/mapper/LogOperationDao.xml
  7. 16
      epmet-auth/src/main/java/com/epmet/controller/LoginController.java
  8. 7
      epmet-auth/src/main/java/com/epmet/service/CaptchaService.java
  9. 2
      epmet-auth/src/main/java/com/epmet/service/ThirdLoginService.java
  10. 17
      epmet-auth/src/main/java/com/epmet/service/impl/CaptchaServiceImpl.java
  11. 9
      epmet-auth/src/main/java/com/epmet/service/impl/GovLoginServiceImpl.java
  12. 13
      epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java
  13. 5
      epmet-auth/src/main/java/com/epmet/service/impl/LoginServiceImpl.java
  14. 23
      epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java
  15. 2
      epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/CheckMQMsg.java
  16. 10
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/CustomerIdConstant.java
  17. 12
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
  18. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java
  19. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml
  20. 3
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java
  21. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/NeighborHoodServiceImpl.java
  22. 2
      epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/TagCustomerDao.xml
  23. 8
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/StatsResiListFormDTO.java
  24. 8
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StatsResiWarnController.java
  25. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/DataSyncRecordDeathDao.java
  26. 7
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/DataSyncRecordDisabilityDao.java
  27. 9
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java
  28. 1
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserBadgeCertificateRecordEntity.java
  29. 6
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/DataSyncRecordDeathService.java
  30. 6
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/DataSyncRecordDisabilityService.java
  31. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/StatsResiWarnService.java
  32. 10
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncRecordDeathServiceImpl.java
  33. 43
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncRecordDisabilityServiceImpl.java
  34. 7
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java
  35. 6
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java
  36. 6
      epmet-user/epmet-user-server/src/main/resources/mapper/DataSyncRecordDeathDao.xml
  37. 6
      epmet-user/epmet-user-server/src/main/resources/mapper/DataSyncRecordDisabilityDao.xml
  38. 9
      epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

7
epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/form/LogOperationListFormDTO.java

@ -27,7 +27,12 @@ public class LogOperationListFormDTO {
*/
private String endTime;
/**
* 默认传data_tm
* 产品原本前端默认传data_tm
* 03.01烟台需求列表展示全部
* 项目流转project_changed
* 登录auth
* 积分point
* 查看脱敏信息data_tm
*/
private String category;
}

3
epmet-admin/epmet-admin-server/src/main/java/com/epmet/dao/LogOperationDao.java

@ -41,8 +41,7 @@ public interface LogOperationDao extends BaseDao<LogOperationEntity> {
@Param("endTime")String endTime,
@Param("operatorName")String operatorName,
@Param("operatorMobile")String operatorMobile,
@Param("category")String category,
@Param("agencyId")String agencyId);
@Param("category")String category);
List<Map<String,String>> getStaffId();

7
epmet-admin/epmet-admin-server/src/main/java/com/epmet/mq/listener/listener/AuthOperationLogListener.java

@ -1,6 +1,7 @@
package com.epmet.mq.listener.listener;
import com.alibaba.fastjson.JSON;
import com.epmet.auth.constants.AuthOperationConstants;
import com.epmet.auth.constants.AuthOperationEnum;
import com.epmet.commons.rocketmq.constants.MQUserPropertys;
import com.epmet.commons.rocketmq.messages.LoginMQMsg;
@ -77,7 +78,11 @@ public class AuthOperationLogListener implements MessageListenerConcurrently {
logEntity.setOperatorName(operatorInfo.getName());
logEntity.setOperatorMobile(operatorInfo.getMobile());
logEntity.setOperatingTime(msgObj.getLoginTime());
logEntity.setContent("成功登录系统");
if(AuthOperationConstants.LOGIN.equals(logEntity.getType())){
logEntity.setContent("成功登录系统");
}else{
logEntity.setContent("成功退出系统");
}
DistributedLock distributedLock = null;
RLock lock = null;

4
epmet-admin/epmet-admin-server/src/main/java/com/epmet/mq/listener/listener/CheckAndExportOperationLogListener.java

@ -1,10 +1,8 @@
package com.epmet.mq.listener.listener;
import com.alibaba.fastjson.JSON;
import com.epmet.auth.constants.AuthOperationEnum;
import com.epmet.commons.rocketmq.constants.MQUserPropertys;
import com.epmet.commons.rocketmq.messages.CheckMQMsg;
import com.epmet.commons.rocketmq.messages.LoginMQMsg;
import com.epmet.commons.tools.distributedlock.DistributedLock;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.exception.RenException;
@ -69,7 +67,7 @@ public class CheckAndExportOperationLogListener implements MessageListenerConcur
logEntity.setIp(msgObj.getIp());
logEntity.setFromApp(msgObj.getFromApp());
logEntity.setFromClient(msgObj.getFromClient());
logEntity.setTargetId("");
logEntity.setTargetId(msgObj.getTargetId());
logEntity.setCustomerId(operatorInfo.getCustomerId());
logEntity.setOperatorId(msgObj.getUserId());
logEntity.setOperatorName(operatorInfo.getName());

13
epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/LogOperationServiceImpl.java

@ -8,7 +8,6 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
@ -202,15 +201,15 @@ public class LogOperationServiceImpl implements LogOperationService, ResultDataR
@Override
public PageData<LogOperationResultDTO> page(String customerId, String startTime, String endTime, String operatorName, String operatorMobile,
Integer pageNo, Integer pageSize, String category, TokenDto tokenDto) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId());
if (null == staffInfo){
throw new EpmetException("未查询工作人员信息:"+tokenDto.getUserId());
}
// CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId());
// if (null == staffInfo){
// throw new EpmetException("未查询工作人员信息:"+tokenDto.getUserId());
// }
// 列表/导出查询
PageHelper.startPage(pageNo, pageSize);
List<LogOperationResultDTO> list = logOperationDao.pageList(customerId, startTime, endTime, operatorName, operatorMobile,category,staffInfo.getAgencyId());
List<LogOperationResultDTO> list = logOperationDao.pageList(customerId, startTime, endTime, operatorName, operatorMobile,category);
PageInfo<LogOperationResultDTO> pageInfo = new PageInfo<>(list);
return new PageData<>(list, pageInfo.getTotal());
return new PageData<>(list, pageInfo.getTotal(),pageSize);
}
/**

5
epmet-admin/epmet-admin-server/src/main/resources/mapper/LogOperationDao.xml

@ -64,7 +64,6 @@
WHERE
lo.del_flag = '0'
AND lo.CUSTOMER_ID = #{customerId}
AND lo.ORG_ID_PATH LIKE concat('%',#{agencyId},'%')
<if test="category != null and category != ''">
AND lo.CATEGORY = #{category}
</if>
@ -75,10 +74,10 @@
AND lo.OPERATOR_MOBILE LIKE concat('%',#{operatorMobile},'%')
</if>
<if test="startTime != null and startTime != ''">
AND DATE_FORMAT( lo.OPERATING_TIME, '%Y%m%d' ) &gt;= #{startTime}
AND DATE_FORMAT( lo.OPERATING_TIME, '%Y-%m-%d %H:%i' ) &gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
AND DATE_FORMAT( lo.OPERATING_TIME, '%Y%m%d' ) &lt;= #{endTime}
AND DATE_FORMAT( lo.OPERATING_TIME, '%Y-%m-%d %H:%i' ) &lt;= #{endTime}
</if>
ORDER BY lo.OPERATING_TIME DESC
</select>

16
epmet-auth/src/main/java/com/epmet/controller/LoginController.java

@ -29,6 +29,8 @@ import java.io.IOException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* @Description 通用登录接口
@ -73,6 +75,20 @@ public class LoginController {
}
}
/**
* 返回文字版的验证码
* 磐石大屏3.10号提出的需求
* @param uuid
* @throws IOException
*/
@PostMapping("captcha/{uuid}")
public Result captcha(@PathVariable(name = "uuid", required = true) String uuid) {
Map<String, String> map = new HashMap<>();
map.put("captcha", captchaService.getTextCaptcha(uuid));
return new Result().ok(map);
}
/**
* @param formDTO
* @return com.epmet.commons.tools.utils.Result<java.lang.String>

7
epmet-auth/src/main/java/com/epmet/service/CaptchaService.java

@ -31,4 +31,11 @@ public interface CaptchaService {
*/
boolean validate(String uuid, String code);
/**
* 返回文字版的验证码
* 磐石大屏3.10号提出的需求
* @param uuid
* @return
*/
String getTextCaptcha(String uuid);
}

2
epmet-auth/src/main/java/com/epmet/service/ThirdLoginService.java

@ -124,4 +124,6 @@ public interface ThirdLoginService {
* @return
*/
UserTokenResultDTO yanTaiSSOLogin(String authCode);
void sendLoginEvent(String userId, String appId, String fromApp, String fromClient,String messageType);
}

17
epmet-auth/src/main/java/com/epmet/service/impl/CaptchaServiceImpl.java

@ -52,4 +52,21 @@ public class CaptchaServiceImpl implements CaptchaService {
//验证码是否正确
return code.equalsIgnoreCase(captcha);
}
/**
* 返回文字版的验证码
* 磐石大屏3.10号提出的需求
*
* @param uuid
* @return
*/
@Override
public String getTextCaptcha(String uuid) {
// 生成验证码 //producer.createText();
String captcha = StringRandomUtils.getRandomStr(NumConstant.FIVE);
// logger.info("uuid:"+uuid+",生成的验证码:"+captcha);
// 保存验证码
captchaRedis.set(uuid, captcha);
return captcha;
}
}

9
epmet-auth/src/main/java/com/epmet/service/impl/GovLoginServiceImpl.java

@ -1,6 +1,7 @@
package com.epmet.service.impl;
import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult;
import com.epmet.auth.constants.AuthOperationConstants;
import com.epmet.common.token.constant.LoginConstant;
import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.ServiceConstant;
@ -11,10 +12,7 @@ import com.epmet.commons.tools.feign.ResultDataResolver;
import com.epmet.commons.tools.security.dto.GovTokenDto;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.security.password.PasswordUtils;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.CpUserDetailRedis;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.*;
import com.epmet.commons.tools.validator.PhoneValidatorUtils;
import com.epmet.constant.SmsTemplateConstant;
import com.epmet.dto.CustomerAgencyDTO;
@ -31,6 +29,7 @@ import com.epmet.jwt.JwtTokenUtils;
import com.epmet.redis.CaptchaRedis;
import com.epmet.service.GovLoginService;
import com.epmet.service.LoginService;
import com.epmet.service.ThirdLoginService;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -326,6 +325,8 @@ public class GovLoginServiceImpl implements GovLoginService, ResultDataResolver
throw new RenException("当前用户信息获取失败");
}
cpUserDetailRedis.logout(tokenDto.getApp() , tokenDto.getClient() , tokenDto.getUserId());
SpringContextUtils.getBean(ThirdLoginService.class).sendLoginEvent(tokenDto.getUserId(), "小程序内退出登录",
tokenDto.getApp(), tokenDto.getClient(), AuthOperationConstants.LOGOUT);
}
@Override

13
epmet-auth/src/main/java/com/epmet/service/impl/GovWebServiceImpl.java

@ -1,7 +1,9 @@
package com.epmet.service.impl;
import com.epmet.auth.constants.AuthOperationConstants;
import com.epmet.auth.dto.result.BlockChainStaffAuthResultDTO;
import com.epmet.common.token.constant.LoginConstant;
import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.exception.EpmetErrorCode;
@ -14,6 +16,7 @@ import com.epmet.commons.tools.security.password.PasswordUtils;
import com.epmet.commons.tools.utils.CpUserDetailRedis;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.SpringContextUtils;
import com.epmet.dto.form.GovWebLoginFormDTO;
import com.epmet.dto.form.GovWebOperLoginFormDTO;
import com.epmet.dto.result.GovWebOperLoginResultDTO;
@ -23,6 +26,7 @@ import com.epmet.jwt.JwtTokenProperties;
import com.epmet.jwt.JwtTokenUtils;
import com.epmet.service.CaptchaService;
import com.epmet.service.GovWebService;
import com.epmet.service.ThirdLoginService;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -103,6 +107,15 @@ public class GovWebServiceImpl implements GovWebService, ResultDataResolver {
UserTokenResultDTO userTokenResultDTO = new UserTokenResultDTO();
userTokenResultDTO.setCustomerId(formDTO.getCustomerId());
userTokenResultDTO.setToken(this.packagingUserToken(formDTO, resultDTO.getUserId()));
// 6.发送登录事件
try {
SpringContextUtils.getBean(ThirdLoginService.class).sendLoginEvent(resultDTO.getUserId(), "数字社区登录",
AppClientConstant.APP_GOV,
AppClientConstant.CLIENT_WEB,
AuthOperationConstants.LOGIN);
} catch (Exception e) {
log.error("【数字社区web端登录】发送登录事件失败,程序继续执行。错误信息");
}
return userTokenResultDTO;
}

5
epmet-auth/src/main/java/com/epmet/service/impl/LoginServiceImpl.java

@ -5,6 +5,7 @@ import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult;
import cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo;
import cn.binarywang.wx.miniapp.bean.WxMaUserInfo;
import com.alibaba.fastjson.JSON;
import com.epmet.auth.constants.AuthOperationConstants;
import com.epmet.common.token.constant.LoginConstant;
import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
@ -15,6 +16,7 @@ import com.epmet.commons.tools.security.password.PasswordUtils;
import com.epmet.commons.tools.utils.CpUserDetailRedis;
import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.SpringContextUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.UserDTO;
import com.epmet.dto.UserWechatDTO;
@ -28,6 +30,7 @@ import com.epmet.jwt.JwtTokenUtils;
import com.epmet.redis.CustomerAppWxServiceUtil;
import com.epmet.service.CaptchaService;
import com.epmet.service.LoginService;
import com.epmet.service.ThirdLoginService;
import com.epmet.utils.WxMaServiceUtils;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.error.WxErrorException;
@ -372,6 +375,8 @@ public class LoginServiceImpl implements LoginService {
if(AppClientConstant.APP_GOV.equals(tokenDto.getApp())){
CustomerStaffRedis.delStaffInfoFormCache(tokenDto.getCustomerId(),tokenDto.getUserId());
}
SpringContextUtils.getBean(ThirdLoginService.class).sendLoginEvent(tokenDto.getUserId(), "数字社区退出登录",
tokenDto.getApp(), tokenDto.getClient(), AuthOperationConstants.LOGOUT);
return new Result();
}

23
epmet-auth/src/main/java/com/epmet/service/impl/ThirdLoginServiceImpl.java

@ -24,7 +24,6 @@ import com.epmet.commons.tools.redis.common.bean.DingMiniInfoCache;
import com.epmet.commons.tools.security.dto.GovTokenDto;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.security.password.PasswordUtils;
import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.*;
import com.epmet.commons.tools.utils.api.yt.YantaiApi;
import com.epmet.commons.tools.utils.api.yt.YantaiSSOUser;
@ -36,7 +35,9 @@ import com.epmet.dto.dingres.DingUserDetailDTO;
import com.epmet.dto.dingres.V2UserGetuserinfoResDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
import com.epmet.feign.*;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.jwt.JwtTokenProperties;
import com.epmet.jwt.JwtTokenUtils;
import com.epmet.redis.CaptchaRedis;
@ -87,17 +88,11 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol
@Autowired
private EpmetMessageOpenFeignClient messageOpenFeignClient;
@Autowired
private LoginUserUtil loginUserUtil;
@Autowired
private DingTalkClientToken dingTalkClientToken;
@Autowired
private DingTalkClientUser dingTalkClientUser;
@Autowired
private EpmetUserFeignClient epmetUserFeignClient;
@Autowired
private GovWebService govWebService;
@Autowired
private ThirdOpenFeignClient thirdOpenFeignClient;
/**
* @param formDTO
@ -224,7 +219,7 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol
//7.发送登录事件
try {
sendLoginEvent(staffLatestAgencyResultDTO.getStaffId(), formDTO.getAppId(), AppClientConstant.APP_GOV, AppClientConstant.CLIENT_WXMP);
sendLoginEvent(staffLatestAgencyResultDTO.getStaffId(), formDTO.getAppId(), AppClientConstant.APP_GOV, AppClientConstant.CLIENT_WXMP, AuthOperationConstants.LOGIN);
} catch (RenException e) {
log.error(e.getInternalMsg());
} catch (Exception e) {
@ -455,7 +450,7 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol
//6.发送登录事件
try {
sendLoginEvent(customerStaff.getUserId(), formDTO.getAppId(), AppClientConstant.APP_GOV, AppClientConstant.CLIENT_WXMP);
sendLoginEvent(customerStaff.getUserId(), formDTO.getAppId(), AppClientConstant.APP_GOV, AppClientConstant.CLIENT_WXMP, AuthOperationConstants.LOGIN);
} catch (RenException e) {
log.error(e.getInternalMsg());
} catch (Exception e) {
@ -517,7 +512,7 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol
//6.发送登录事件
try {
sendLoginEvent(customerStaff.getUserId(), formDTO.getAppId(), AppClientConstant.APP_GOV, AppClientConstant.CLIENT_WXMP);
sendLoginEvent(customerStaff.getUserId(), formDTO.getAppId(), AppClientConstant.APP_GOV, AppClientConstant.CLIENT_WXMP, AuthOperationConstants.LOGIN);
} catch (RenException e) {
log.error(e.getInternalMsg());
} catch (Exception e) {
@ -842,7 +837,8 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol
* @author wxz
* @date 2021.06.08 15:27
*/
private void sendLoginEvent(String userId, String appId, String fromApp, String fromClient) {
@Override
public void sendLoginEvent(String userId, String appId, String fromApp, String fromClient,String messageType) {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
LoginMQMsg loginMQMsg = new LoginMQMsg();
@ -853,7 +849,8 @@ public class ThirdLoginServiceImpl implements ThirdLoginService, ResultDataResol
loginMQMsg.setFromApp(fromApp);
loginMQMsg.setFromClient(fromClient);
SystemMsgFormDTO form = new SystemMsgFormDTO();
form.setMessageType(AuthOperationConstants.LOGIN);
// form.setMessageType(AuthOperationConstants.LOGIN);
form.setMessageType(messageType);
form.setContent(loginMQMsg);
messageOpenFeignClient.sendSystemMsgByMQ(form);
//getResultDataOrThrowsException(result, ServiceConstant.EPMET_MESSAGE_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "调用Message服务,发送登录事件到MQ失败");

2
epmet-commons/epmet-commons-rocketmq/src/main/java/com/epmet/commons/rocketmq/messages/CheckMQMsg.java

@ -29,5 +29,5 @@ public class CheckMQMsg {
private String fromClient;
private String orgId;
private String orgIdPath;
private String targetId;
}

10
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/CustomerIdConstant.java

@ -12,4 +12,14 @@ public interface CustomerIdConstant {
* 市北生产-客户ID
*/
String SHI_BEI_CUSTOMER_ID = "b09527201c4409e19d1dbc5e3c3429a1";
/**
* 烟台生产客户id
*/
String YT_CUSTOMER_ID = "1535072605621841922";
/**
* 市北智慧社区,2月份去社区学习新开立的一个客户
*/
String SHIBEI_YANSHI="1623486671774978060";
}

12
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java

@ -1023,6 +1023,7 @@ public class EpmetUserServiceImpl implements EpmetUserService {
result.setMobile(houseInfo.getOwnerPhone());
result.setIdCard(houseInfo.getOwnerIdCard());
msg.setContent("查看"+houseInfo.getAllName()+"房屋的敏感信息");
msg.setTargetId(formDTO.getId());
}else if (formDTO.getType().equals(NeighborhoodConstant.CHECK_IC_RESI_USER)){
IcResiUserInfoCache icResiUserInfo = CustomerResiUserRedis.getIcResiUserInfo(formDTO.getId());
if (null == icResiUserInfo){
@ -1031,14 +1032,16 @@ public class EpmetUserServiceImpl implements EpmetUserService {
result.setIdCard(icResiUserInfo.getIdCard());
result.setMobile(icResiUserInfo.getMobile());
msg.setContent("查看"+icResiUserInfo.getName()+"的敏感信息");
msg.setTargetId(formDTO.getId());
}else if (formDTO.getType().equals(NeighborhoodConstant.JMFYXX)){
IcResiUserInfoCache icResiUserInfo = CustomerResiUserRedis.getIcResiUserInfo(formDTO.getId());
if (null == icResiUserInfo){
throw new EpmetException("查询icResiUser失败:"+formDTO.getId());
throw new EpmetException("居民防疫信息查询icResiUser失败:"+formDTO.getId());
}
result.setIdCard(icResiUserInfo.getIdCard());
result.setMobile(icResiUserInfo.getMobile());
msg.setContent("查看"+icResiUserInfo.getName()+"的敏感信息(居民防疫信息)");
msg.setTargetId(formDTO.getId());
}else if (formDTO.getType().equals(NeighborhoodConstant.ROUTE_FOLLOW)){
Map<String, String> info = icResiUserDao.getTripReportRecordInfo(formDTO.getId());
if (null == info){
@ -1047,6 +1050,7 @@ public class EpmetUserServiceImpl implements EpmetUserService {
result.setIdCard(info.get(NeighborhoodConstant.ID_CARD));
result.setMobile(info.get(NeighborhoodConstant.MOBILE));
msg.setContent("查看"+info.get(NeighborhoodConstant.NAME)+"的敏感信息(行程随访)");
msg.setTargetId(formDTO.getId());
}else if (formDTO.getType().equals(NeighborhoodConstant.VACCINATION_RECORD)){
Map<String, String> info = icResiUserDao.getVaccineRecordInfo(formDTO.getId());
if (null == info){
@ -1055,6 +1059,7 @@ public class EpmetUserServiceImpl implements EpmetUserService {
result.setIdCard(info.get(NeighborhoodConstant.ID_CARD));
result.setMobile(info.get(NeighborhoodConstant.MOBILE));
msg.setContent("查看"+info.get(NeighborhoodConstant.NAME)+"的敏感信息(疫苗接种记录)");
msg.setTargetId(formDTO.getId());
}else if (formDTO.getType().equals(NeighborhoodConstant.VACCINE_SPECIAL_ATTENTION)
|| formDTO.getType().equals(NeighborhoodConstant.FOCUS_GROUP_SPECIAL_ATTENTION_QUARANTINE)
|| formDTO.getType().equals(NeighborhoodConstant.FOCUS_GROUP_SPECIAL_ATTENTION_HISTORY)){
@ -1078,7 +1083,7 @@ public class EpmetUserServiceImpl implements EpmetUserService {
default:
}
msg.setContent("查看"+info.get(NeighborhoodConstant.NAME)+"的敏感信息("+cMsg+")");
msg.setTargetId(formDTO.getId());
}else if (formDTO.getType().equals(NeighborhoodConstant.NO_NAT_COMPARE)){
Map<String, String> info = icResiUserDao.getNoNatCompareInfo(formDTO.getId());
if (null == info){
@ -1087,6 +1092,7 @@ public class EpmetUserServiceImpl implements EpmetUserService {
result.setIdCard(info.get(NeighborhoodConstant.ID_CARD));
result.setMobile(info.get(NeighborhoodConstant.MOBILE));
msg.setContent("查看"+info.get(NeighborhoodConstant.NAME)+"的敏感信息(未做核酸比对)");
msg.setTargetId(formDTO.getId());
}else if (formDTO.getType().equals(NeighborhoodConstant.NAT_RECORD)){
Map<String, String> info = icResiUserDao.getNatInfo(formDTO.getId());
if (null == info){
@ -1095,6 +1101,7 @@ public class EpmetUserServiceImpl implements EpmetUserService {
result.setIdCard(info.get(NeighborhoodConstant.ID_CARD));
result.setMobile(info.get(NeighborhoodConstant.MOBILE));
msg.setContent("查看"+info.get(NeighborhoodConstant.NAME)+"的敏感信息(核酸检测信息)");
msg.setTargetId(formDTO.getId());
}else if (formDTO.getType().equals(NeighborhoodConstant.EMPLOYEE_EPIDEMIC_MANAGE_DETAIL)){
Map<String, String> info = govOrgService.getEmployeeRegisterMobileAndIdCard(formDTO.getId());
if (null == info){
@ -1103,6 +1110,7 @@ public class EpmetUserServiceImpl implements EpmetUserService {
result.setIdCard(info.get(NeighborhoodConstant.ID_CARD));
result.setMobile(info.get(NeighborhoodConstant.MOBILE));
msg.setContent("查看"+info.get(NeighborhoodConstant.NAME)+"的敏感信息(员工登记信息)");
msg.setTargetId(formDTO.getId());
}
// 发送mq消息
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();

2
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java

@ -88,7 +88,7 @@ public class IcPartyActivityController implements ResultDataResolver {
*/
@PostMapping("search")
public Result<PageData<IcPartyActivityDTO>> page(@LoginUser TokenDto tokenDto,@RequestBody PartyActivityFormDTO formDTO){
formDTO.setCustomerId(formDTO.getCustomerId());
formDTO.setCustomerId(tokenDto.getCustomerId());
PageData<IcPartyActivityDTO> page = icPartyActivityService.search(formDTO);
return new Result<PageData<IcPartyActivityDTO>>().ok(page);
}

2
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml

@ -52,7 +52,7 @@
a.ACT_ID,
a.GRID_ID,
ur.UNIT_ID,
GROUP_CONCAT( sr.SERVICE_MATTER ) AS serviceMatter,
GROUP_CONCAT( distinct sr.SERVICE_MATTER ) AS serviceMatter,
a.TITLE,
a.TARGET,
a.CONTENT,

3
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java

@ -7,6 +7,7 @@ import com.alibaba.excel.read.metadata.ReadSheet;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.epmet.commons.tools.constant.CustomerIdConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
@ -1156,7 +1157,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未查到房屋信息", "未查到房屋信息");
}
// 市北区-智慧社区: 1623486671774978060 23.2月为了方便社区的同事们演示系统,新建的一个客户id
if("1623486671774978060".equals(house.getCustomerId())){
if (CustomerIdConstant.SHIBEI_YANSHI.equals(house.getCustomerId()) || CustomerIdConstant.YT_CUSTOMER_ID.equals(house.getCustomerId())) {
return StrConstant.EPMETY_STR;
}
//url组成:小程序地址?房屋编码

5
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/NeighborHoodServiceImpl.java

@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.CustomerIdConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.enums.CollectUrlEnum;
@ -147,7 +148,7 @@ public class NeighborHoodServiceImpl extends BaseServiceImpl<IcNeighborHoodDao,I
*/
private String createNeiQrcodeUrl(IcNeighborHoodEntity entity) throws Exception {
// 市北区-智慧社区: 1623486671774978060 23.2月为了方便社区的同事们演示系统,新建的一个客户id
if ("1623486671774978060".equals(entity.getCustomerId())) {
if (CustomerIdConstant.SHIBEI_YANSHI.equals(entity.getCustomerId())||CustomerIdConstant.YT_CUSTOMER_ID.equals(entity.getCustomerId())) {
return StrConstant.EPMETY_STR;
}
if (null == entity) {
@ -349,7 +350,7 @@ public class NeighborHoodServiceImpl extends BaseServiceImpl<IcNeighborHoodDao,I
@Override
public Result createBatchNeiQrUrl(String customerId) {
// 市北区-智慧社区: 1623486671774978060 23.2月为了方便社区的同事们演示系统,新建的一个客户id
if ("1623486671774978060".equals(customerId)) {
if (CustomerIdConstant.SHIBEI_YANSHI.equals(customerId) || CustomerIdConstant.YT_CUSTOMER_ID.equals(customerId)) {
return new Result();
}
//查询该客户下没有二维码的小区

2
epmet-module/gov-voice/gov-voice-server/src/main/resources/mapper/TagCustomerDao.xml

@ -5,7 +5,7 @@
<insert id="upsertTagCount" parameterType="com.epmet.dto.form.UpdateTagFormDTO">
<selectKey keyProperty="id" order="AFTER" resultType="String">
select id from tag_customer where tag_name = #{tagName} AND CUSTOMER_ID = #{customerId}
select id from tag_customer where tag_name = #{tagName} AND CUSTOMER_ID = #{customerId} and del_flag='0'
</selectKey>
INSERT INTO tag_customer ( ID, CUSTOMER_ID, TAG_NAME, TAG_COLOR, USE_COUNT, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME )
VALUES

8
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/StatsResiListFormDTO.java

@ -21,6 +21,7 @@ import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;
/**
@ -37,8 +38,13 @@ public class StatsResiListFormDTO implements Serializable {
/**
* 组织id
*/
@NotBlank(message = "id不能为空")
// @NotBlank(message = "id不能为空")
private String id;
/**
* 目前只支持传入小区id
* levelneighborHood
*/
private List<String> idList;
@NotBlank(message = "level不能为空")
private String level;

8
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StatsResiWarnController.java

@ -19,6 +19,8 @@ package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.annotation.MaskResponse;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
@ -34,6 +36,7 @@ import com.epmet.dto.result.IcUserWarnNoticeResultDTO;
import com.epmet.dto.result.UserWarnNameListResultDTO;
import com.epmet.service.IcStatsResiWarnService;
import com.epmet.service.StatsResiWarnService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.PostMapping;
@ -67,7 +70,10 @@ public class StatsResiWarnController {
public Result<List<IcStatsResiResultDTO>> list(@LoginUser TokenDto tokenDto,@RequestBody StatsResiListFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO);
String customerId = tokenDto.getCustomerId();
List<IcStatsResiResultDTO> icStatsResiResultDTOList = statsResiWarnService.list(customerId,formDTO.getId(),formDTO.getLevel());
if (StringUtils.isBlank(formDTO.getId()) && CollectionUtils.isEmpty(formDTO.getIdList())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "id或者idList不能同时为空", "参数错误");
}
List<IcStatsResiResultDTO> icStatsResiResultDTOList = statsResiWarnService.list(customerId,formDTO.getId(),formDTO.getLevel(),formDTO.getIdList());
return new Result<List<IcStatsResiResultDTO>>().ok(icStatsResiResultDTOList);
}

2
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/DataSyncRecordDeathDao.java

@ -29,4 +29,6 @@ public interface DataSyncRecordDeathDao extends BaseDao<DataSyncRecordDeathEntit
@Param("idCard") String idCard,
@Param("name") String name,
@Param("agencyId") String agencyId);
int deleteByIcResiUserId(String icResiUserId);
}

7
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/DataSyncRecordDisabilityDao.java

@ -36,4 +36,11 @@ public interface DataSyncRecordDisabilityDao extends BaseDao<DataSyncRecordDisab
* @date 2022/10/14 13:44
*/
void batchUpdateDisability(List<DataSyncRecordDisabilityEntity> entities);
/**
* 删除居民信息时同时删除data_sync_record_disability
* @param icResiUserId
* @return
*/
int deleteByIcResiUserId(String icResiUserId);
}

9
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java

@ -19,7 +19,6 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.commons.tools.dto.result.OptionDataResultDTO;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IcResiUserConfirmDTO;
import com.epmet.dto.IcResiUserDTO;
import com.epmet.dto.IcVolunteerPolyDTO;
@ -278,8 +277,12 @@ public interface IcResiUserDao extends BaseDao<IcResiUserEntity> {
* @author LiuJanJun
* @date 2022/2/12 3:03 下午
*/
Map<String, BigDecimal> getDataAnalyseCount(@Param("customerId") String customerId, @Param("tableName") String tableName,
@Param("columnList") List<String> columnList, @Param("id") String id, @Param("level") String level);
Map<String, BigDecimal> getDataAnalyseCount(@Param("customerId") String customerId,
@Param("tableName") String tableName,
@Param("columnList") List<String> columnList,
@Param("id") String id,
@Param("level") String level,
@Param("idList")List<String> idList);
List<Map<String, String>> getIcUserList(@Param("customerId") String customerId, @Param("columns") List<String> columns);

1
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserBadgeCertificateRecordEntity.java

@ -47,6 +47,7 @@ public class UserBadgeCertificateRecordEntity extends BaseEpmetEntity {
*/
private String gridId;
/**
* 用户ID
*/

6
epmet-user/epmet-user-server/src/main/java/com/epmet/service/DataSyncRecordDeathService.java

@ -67,4 +67,10 @@ public interface DataSyncRecordDeathService extends BaseService<DataSyncRecordDe
* @param ids 要操作的记录id
*/
void batchUpdate(String userId, String customerId, List<String> ids);
/**
* 删除居民信息时同时删除data_sync_record_death
* @param icResiUserId
*/
void deleteByIcResiUserId(String icResiUserId);
}

6
epmet-user/epmet-user-server/src/main/java/com/epmet/service/DataSyncRecordDisabilityService.java

@ -107,4 +107,10 @@ public interface DataSyncRecordDisabilityService extends BaseService<DataSyncRec
* @date 2022/10/13 16:18
*/
void batchUpdate(String[] ids, TokenDto tokenDto);
/**
* 删除居民信息时同时删除data_sync_record_disability
* @param icResiUserId
*/
void deleteByIcResiUserId(String icResiUserId);
}

2
epmet-user/epmet-user-server/src/main/java/com/epmet/service/StatsResiWarnService.java

@ -58,7 +58,7 @@ public interface StatsResiWarnService{
PageData<UserWarnNameListResultDTO> allUserWarnList(StatsResiWarnFormDTO formDTO);
List<IcStatsResiResultDTO> list(String customerId,String id, String level);
List<IcStatsResiResultDTO> list(String customerId,String id, String level,List<String> idList);
List<IcStatsResiResultDTO> list2(StatsResiListFormDTO formDTO);

10
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncRecordDeathServiceImpl.java

@ -155,5 +155,13 @@ public class DataSyncRecordDeathServiceImpl extends BaseServiceImpl<DataSyncReco
}
}
/**
* 删除居民信息时同时删除data_sync_record_death
*
* @param icResiUserId
*/
@Override
public void deleteByIcResiUserId(String icResiUserId) {
baseDao.deleteByIcResiUserId(icResiUserId);
}
}

43
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/DataSyncRecordDisabilityServiceImpl.java

@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.GenderEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode;
@ -41,8 +42,10 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -97,17 +100,30 @@ public class DataSyncRecordDisabilityServiceImpl extends BaseServiceImpl<DataSyn
@Override
public DataSyncRecordDisabilityDTO get(String id) {
DataSyncRecordDisabilityEntity entity = baseDao.selectById(id);
if (null == entity) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "data_sync_record_disability记录不存在,id:" + id, "记录不存在");
}
DataSyncRecordDisabilityDTO result = ConvertUtils.sourceToTarget(entity, DataSyncRecordDisabilityDTO.class);
result.setGenderCn(GenderEnum.UN_KNOWN.getName());
if (null != result.getGender()){
result.setGenderCn(result.getGender() == NumConstant.ONE ? "男" : "女");
}
IcResiUserDTO icResiUserDTO = icResiUserService.get(entity.getIcResiUserId());
ResiInfoDTO resiInfoDTO = ConvertUtils.sourceToTarget(icResiUserDTO, ResiInfoDTO.class);
resiInfoDTO.setGenderCn(resiInfoDTO.getGender().equals(NumConstant.ONE_STR) ? "男" : "女");
resiInfoDTO.setCjzkCn(getCj(resiInfoDTO.getCjzk()));
resiInfoDTO.setCjlbCn(getCjlb(resiInfoDTO.getCjlb(),entity.getCustomerId()));
result.setResiInfo(resiInfoDTO);
if (StringUtils.isNotBlank(entity.getIcResiUserId())) {
IcResiUserDTO icResiUserDTO = icResiUserService.get(entity.getIcResiUserId());
if (null != icResiUserDTO) {
ResiInfoDTO resiInfoDTO = ConvertUtils.sourceToTarget(icResiUserDTO, ResiInfoDTO.class);
if (StringUtils.isNotBlank(resiInfoDTO.getGender())) {
resiInfoDTO.setGenderCn(resiInfoDTO.getGender().equals(NumConstant.ONE_STR) ? "男" : "女");
} else {
resiInfoDTO.setGenderCn(GenderEnum.UN_KNOWN.getName());
}
resiInfoDTO.setCjzkCn(getCj(resiInfoDTO.getCjzk()));
resiInfoDTO.setCjlbCn(getCjlb(resiInfoDTO.getCjlb(), entity.getCustomerId()));
result.setResiInfo(resiInfoDTO);
} else {
log.warn(String.format("ic_resi_user is null icResiUserId:%s", entity.getIcResiUserId()));
}
}
return result;
}
@ -145,7 +161,10 @@ public class DataSyncRecordDisabilityServiceImpl extends BaseServiceImpl<DataSyn
throw new EpmetException("operCustomizeOpenFeignClient.getOptionsMap执行失败");
}
Map<String, String> data = cjlbOptionsMap.getData();
return data.get(cjlb);
if(MapUtils.isNotEmpty(data)&&data.containsKey(cjlb)){
return data.get(cjlb);
}
return StrConstant.EPMETY_STR;
}
@Override
@ -307,4 +326,14 @@ public class DataSyncRecordDisabilityServiceImpl extends BaseServiceImpl<DataSyn
baseDao.batchUpdateDisability(entities);
}
/**
* 删除居民信息时同时删除data_sync_record_disability
*
* @param icResiUserId
*/
@Async
@Override
public void deleteByIcResiUserId(String icResiUserId) {
baseDao.deleteByIcResiUserId(icResiUserId);
}
}

7
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

@ -58,7 +58,6 @@ import com.epmet.dao.*;
import com.epmet.dto.*;
import com.epmet.dto.form.*;
import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO;
import com.epmet.dto.form.stats.UserHouseStatsQueryFormDTO;
import com.epmet.dto.result.*;
import com.epmet.dto.result.demand.IcResiDemandDictDTO;
import com.epmet.dto.result.demand.OptionDTO;
@ -74,7 +73,6 @@ import com.epmet.opendata.dto.result.ResidentByIdCardResultDTO;
import com.epmet.opendata.feign.GuardarDatosFeignClient;
import com.epmet.resi.partymember.feign.ResiPartyMemberOpenFeignClient;
import com.epmet.service.*;
import com.epmet.stats.UserHouseStatsResultDTO;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
@ -211,6 +209,11 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
icUserTransferRecordService.deleteByIcResiUserId(formDTO.getIcResiUserId(),formDTO.getCurrentStaffId());
icUserChangeRecordService.deleteByIcResiUserId(formDTO.getIcResiUserId(),formDTO.getCurrentStaffId());
icUserChangeDetailedService.deleteByIcResiUserId(formDTO.getIcResiUserId(),formDTO.getCurrentStaffId());
//如果是烟台客户,删除居民时,同时删除死亡数据data_sync_record_death、残疾记录data_sync_record_disability
if(CustomerIdConstant.YT_CUSTOMER_ID.equals(formDTO.getCustomerId())){
SpringContextUtils.getBean(DataSyncRecordDisabilityService.class).deleteByIcResiUserId(formDTO.getIcResiUserId());
SpringContextUtils.getBean(DataSyncRecordDeathService.class).deleteByIcResiUserId(formDTO.getIcResiUserId());
}
}
/**

6
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java

@ -243,7 +243,7 @@ public class StatsResiWarnServiceImpl implements StatsResiWarnService {
}
@Override
public List<IcStatsResiResultDTO> list(String customerId,String id, String level) {
public List<IcStatsResiResultDTO> list(String customerId,String id, String level,List<String> idList) {
//获取所有配置类项 getshow
IcResiCategoryStatsConfigFormDTO dto = new IcResiCategoryStatsConfigFormDTO();
dto.setStatus("show");
@ -263,7 +263,7 @@ public class StatsResiWarnServiceImpl implements StatsResiWarnService {
});
Map<String,Map<String, BigDecimal>> tableColumnCountMap = new HashMap<>();
paramMap.forEach((tableName,columnList) ->{
Map<String, BigDecimal> countMap = icResiUserDao.getDataAnalyseCount(customerId,tableName,columnList, id,level);
Map<String, BigDecimal> countMap = icResiUserDao.getDataAnalyseCount(customerId,tableName,columnList, id,level,idList);
if (countMap != null){
tableColumnCountMap.put(tableName,countMap);
}
@ -287,7 +287,7 @@ public class StatsResiWarnServiceImpl implements StatsResiWarnService {
@Override
public List<IcStatsResiResultDTO> list2(StatsResiListFormDTO formDTO) {
return list(formDTO.getCustomerId(), formDTO.getId(), formDTO.getLevel());
return list(formDTO.getCustomerId(), formDTO.getId(), formDTO.getLevel(),null);
}
/**

6
epmet-user/epmet-user-server/src/main/resources/mapper/DataSyncRecordDeathDao.xml

@ -60,4 +60,10 @@
ORDER BY
d.CREATED_TIME DESC
</select>
<delete id="deleteByIcResiUserId" parameterType="java.lang.String">
delete from data_sync_record_death
where IC_RESI_USER_ID = #{icResiUserId}
</delete>
</mapper>

6
epmet-user/epmet-user-server/src/main/resources/mapper/DataSyncRecordDisabilityDao.xml

@ -215,4 +215,10 @@
<!-- sex = values(sex),-->
<!-- class = values(class)-->
<!-- </insert>-->
<delete id="deleteByIcResiUserId" parameterType="java.lang.String">
delete from data_sync_record_disability
where IC_RESI_USER_ID = #{icResiUserId}
</delete>
</mapper>

9
epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

@ -818,7 +818,14 @@
AND GRID_ID = #{id}
</if>
<if test="level=='neighborHood'">
AND VILLAGE_ID = #{id}
<if test="id != null and id != ''">
AND VILLAGE_ID = #{id}
</if>
<if test="idList != null and idList.size() > 0">
<foreach collection="idList" item="id" open="AND (" close=")" separator=" OR ">
VILLAGE_ID = #{id}
</foreach>
</if>
</if>
<if test="level=='building'">
AND BUILD_ID = #{id}

Loading…
Cancel
Save