Commit a48813f6 authored by 李灿灿's avatar 李灿灿

Merge branch 'feature-licancan' into 'feature/insurance-1.3.0'

Feature licancan

See merge request !313
parents 710c3aa2 fe559342
...@@ -22,5 +22,9 @@ public class TSettleDomainListVo { ...@@ -22,5 +22,9 @@ public class TSettleDomainListVo {
* 合同主体IDS * 合同主体IDS
*/ */
private List<String> deptIds; private List<String> deptIds;
/**
* 合同主体项目编码
*/
private List<String> deptNos;
} }
...@@ -156,6 +156,7 @@ public class TSettleDomainController { ...@@ -156,6 +156,7 @@ public class TSettleDomainController {
public TSettleDomainListVo getSettleDomainIdsByUserId(@RequestBody String userId) { public TSettleDomainListVo getSettleDomainIdsByUserId(@RequestBody String userId) {
TSettleDomainListVo vo = new TSettleDomainListVo(); TSettleDomainListVo vo = new TSettleDomainListVo();
vo.setDeptIds(tSettleDomainService.getSettleDomainIdsByUserId(userId)); vo.setDeptIds(tSettleDomainService.getSettleDomainIdsByUserId(userId));
vo.setDeptNos(tSettleDomainService.getSettleDomainNosByUserId(userId));
return vo; return vo;
} }
......
...@@ -76,6 +76,11 @@ public interface TSettleDomainService extends IService<TSettleDomain> { ...@@ -76,6 +76,11 @@ public interface TSettleDomainService extends IService<TSettleDomain> {
List<String> getSettleDomainIdsByUserId(String id); List<String> getSettleDomainIdsByUserId(String id);
/**
* 获取用户所拥有的项目编码
*/
List<String> getSettleDomainNosByUserId(String id);
SetInfoVo getSetInfoByCodes(List<String> codes); SetInfoVo getSetInfoByCodes(List<String> codes);
TSettleDomainListVo getSettleInfoByCodes(List<String> codes); TSettleDomainListVo getSettleInfoByCodes(List<String> codes);
......
...@@ -117,6 +117,28 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T ...@@ -117,6 +117,28 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
return domainIds; return domainIds;
} }
/**
* 获取用户所拥有的项目编码
*
* @param userId 用户id
*/
@Override
public List<String> getSettleDomainNosByUserId(String userId) {
List<String> domainNos = new ArrayList<>();
String userKey = CacheConstants.WXHR_SETTLE_DOMAIN_NOS_BY_USERID + "_" + userId;
Object settleDomainVoR = redisUtil.get(userKey);
if (settleDomainVoR != null) {
return (List<String>) settleDomainVoR;
} else {
List<TCutsomerDataPermisson> permissonList = permissonMapper.selectAllSettleDomainPermissionByUserId(userId);
if (Common.isNotNull(permissonList)) {
domainNos = permissonList.stream().map(TCutsomerDataPermisson::getSettleDomainNo).collect(Collectors.toList());
redisUtil.set(userKey, domainNos);
}
}
return domainNos;
}
/** /**
* @param settleDomainSelectVo * @param settleDomainSelectVo
* @Author: wangan * @Author: wangan
......
...@@ -131,5 +131,9 @@ public interface CacheConstants { ...@@ -131,5 +131,9 @@ public interface CacheConstants {
* 用户登录的项目vo缓存 * 用户登录的项目vo缓存
*/ */
public static final String WXHR_SETTLE_DOMAIN_VOS_BY_USERID = ServiceNameConstants.ARCHIVES_SERVICE + "_SettleDomainVosByUserId"; public static final String WXHR_SETTLE_DOMAIN_VOS_BY_USERID = ServiceNameConstants.ARCHIVES_SERVICE + "_SettleDomainVosByUserId";
/**
* 缓存用户所拥有的项目编码
*/
public static final String WXHR_SETTLE_DOMAIN_NOS_BY_USERID = ServiceNameConstants.ARCHIVES_SERVICE + "_SettleDomainNosByUserId";
} }
...@@ -16,6 +16,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants; ...@@ -16,6 +16,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*; import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.util.equator.HrEquator;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties; import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprArchivesProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.*; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.*;
...@@ -2135,32 +2136,35 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2135,32 +2136,35 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//只有当结算id存在的时候修改数据才会推给ekp //只有当结算id存在的时候修改数据才会推给ekp
if (StringUtils.isNotBlank(detail.getDefaultSettleId())){ if (StringUtils.isNotBlank(detail.getDefaultSettleId())){
try { String differenceKey = HrEquator.comparisonValue(oldDetail, detail);
//推送修改信息 if(!Common.isEmpty(differenceKey)){
StringBuilder sb = new StringBuilder(); try {
sb.append("操作人:" + user.getNickname() + ";操作时间:" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); //推送修改信息
if (!oldDetail.getPolicyStart().toString().equals(success.getPolicyStartNew())) { StringBuilder sb = new StringBuilder();
sb.append(";变更前保单开始时间:" + oldDetail.getPolicyStart() + ";变更后保单开始时间:" + success.getPolicyStartNew()); sb.append("操作人:" + user.getNickname() + ";操作时间:" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
} if (!oldDetail.getPolicyStart().toString().equals(success.getPolicyStartNew())) {
if (!oldDetail.getPolicyEnd().toString().equals(success.getPolicyEndNew())) { sb.append(";变更前保单开始时间:" + oldDetail.getPolicyStart() + ";变更后保单开始时间:" + success.getPolicyStartNew());
sb.append(";变更前保单结束时间:" + oldDetail.getPolicyEnd() + ";变更后保单结束时间:" + success.getPolicyEndNew()); }
} if (!oldDetail.getPolicyEnd().toString().equals(success.getPolicyEndNew())) {
if (!oldDetail.getBuyType().equals(success.getBuyType())) { sb.append(";变更前保单结束时间:" + oldDetail.getPolicyEnd() + ";变更后保单结束时间:" + success.getPolicyEndNew());
sb.append(";变更前投保类型:" + getBuyType(oldDetail.getBuyType()) + ";变更后投保类型:" + getBuyType(success.getBuyType())); }
} if (!oldDetail.getBuyType().equals(success.getBuyType())) {
if (StringUtils.isNotBlank(success.getReason())){ sb.append(";变更前投保类型:" + getBuyType(oldDetail.getBuyType()) + ";变更后投保类型:" + getBuyType(success.getBuyType()));
sb.append(";变更原因:" + success.getReason()); }
if (StringUtils.isNotBlank(success.getReason())){
sb.append(";变更原因:" + success.getReason());
}
EkpUpdateParam ekpUpdateParam = new EkpUpdateParam();
ekpUpdateParam.setFd_3b5bf02d3b8fc4(success.getPolicyStartNew());
ekpUpdateParam.setFd_3b5bf02e1d47cc(success.getPolicyEndNew());
ekpUpdateParam.setFd_3b5bf02fa14596(getBuyType(success.getBuyType()));
ekpUpdateParam.setFd_3b5bf031b52314(detail.getBuyStandard());
ekpUpdateParam.setFd_3b5bf032d7a822(detail.getId() + "_" + detail.getDefaultSettleId());
ekpUpdateParam.setFd_3b5bf0b7b4c058(sb.toString());
eKPInsuranceUtil.sendUpdateToEkp(ekpUpdateParam);
}catch (Exception e){
log.error("pushEkp error updateInsuranceInsured:",e.getMessage());
} }
EkpUpdateParam ekpUpdateParam = new EkpUpdateParam();
ekpUpdateParam.setFd_3b5bf02d3b8fc4(success.getPolicyStartNew());
ekpUpdateParam.setFd_3b5bf02e1d47cc(success.getPolicyEndNew());
ekpUpdateParam.setFd_3b5bf02fa14596(getBuyType(success.getBuyType()));
ekpUpdateParam.setFd_3b5bf031b52314(detail.getBuyStandard());
ekpUpdateParam.setFd_3b5bf032d7a822(detail.getId() + "_" + detail.getDefaultSettleId());
ekpUpdateParam.setFd_3b5bf0b7b4c058(sb.toString());
eKPInsuranceUtil.sendUpdateToEkp(ekpUpdateParam);
}catch (Exception e){
log.error("pushEkp error updateInsuranceInsured:",e.getMessage());
} }
} }
} }
...@@ -2245,32 +2249,35 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2245,32 +2249,35 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//只有当结算id存在的时候修改数据才会推给ekp //只有当结算id存在的时候修改数据才会推给ekp
if(StringUtils.isNotBlank(byId.getDefaultSettleId())){ if(StringUtils.isNotBlank(byId.getDefaultSettleId())){
try { String differenceKey = HrEquator.comparisonValue(old, byId);
//推送修改信息 if(!Common.isEmpty(differenceKey)){
StringBuilder sb = new StringBuilder(); try {
sb.append("操作人:" + user.getNickname() + ";操作时间:" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); //推送修改信息
if (!old.getPolicyStart().toString().equals(param.getPolicyStart())) { StringBuilder sb = new StringBuilder();
sb.append(";变更前保单开始时间:" + old.getPolicyStart() + ";变更后保单开始时间:" + param.getPolicyStart()); sb.append("操作人:" + user.getNickname() + ";操作时间:" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
} if (!old.getPolicyStart().toString().equals(param.getPolicyStart())) {
if (!old.getPolicyEnd().toString().equals(param.getPolicyEnd())) { sb.append(";变更前保单开始时间:" + old.getPolicyStart() + ";变更后保单开始时间:" + param.getPolicyStart());
sb.append(";变更前保单结束时间:" + old.getPolicyEnd() + ";变更后保单结束时间:" + param.getPolicyEnd()); }
} if (!old.getPolicyEnd().toString().equals(param.getPolicyEnd())) {
if (!old.getBuyType().equals(param.getBuyType())) { sb.append(";变更前保单结束时间:" + old.getPolicyEnd() + ";变更后保单结束时间:" + param.getPolicyEnd());
sb.append(";变更前投保类型:" + getBuyType(old.getBuyType()) + ";变更后投保类型:" + getBuyType(param.getBuyType())); }
} if (!old.getBuyType().equals(param.getBuyType())) {
if (StringUtils.isNotBlank(param.getReason())){ sb.append(";变更前投保类型:" + getBuyType(old.getBuyType()) + ";变更后投保类型:" + getBuyType(param.getBuyType()));
sb.append(";变更原因:" + param.getReason()); }
} if (StringUtils.isNotBlank(param.getReason())){
EkpUpdateParam ekpUpdateParam = new EkpUpdateParam(); sb.append(";变更原因:" + param.getReason());
ekpUpdateParam.setFd_3b5bf02d3b8fc4(param.getPolicyStart()); }
ekpUpdateParam.setFd_3b5bf02e1d47cc(param.getPolicyEnd()); EkpUpdateParam ekpUpdateParam = new EkpUpdateParam();
ekpUpdateParam.setFd_3b5bf02fa14596(getBuyType(param.getBuyType())); ekpUpdateParam.setFd_3b5bf02d3b8fc4(param.getPolicyStart());
ekpUpdateParam.setFd_3b5bf031b52314(byId.getBuyStandard()); ekpUpdateParam.setFd_3b5bf02e1d47cc(param.getPolicyEnd());
ekpUpdateParam.setFd_3b5bf032d7a822(byId.getId() + "_" + byId.getDefaultSettleId()); ekpUpdateParam.setFd_3b5bf02fa14596(getBuyType(param.getBuyType()));
ekpUpdateParam.setFd_3b5bf0b7b4c058(sb.toString()); ekpUpdateParam.setFd_3b5bf031b52314(byId.getBuyStandard());
eKPInsuranceUtil.sendUpdateToEkp(ekpUpdateParam); ekpUpdateParam.setFd_3b5bf032d7a822(byId.getId() + "_" + byId.getDefaultSettleId());
}catch (Exception e){ ekpUpdateParam.setFd_3b5bf0b7b4c058(sb.toString());
log.error("pushEkp error updateInsuranceInsuredById:",e.getMessage()); eKPInsuranceUtil.sendUpdateToEkp(ekpUpdateParam);
}catch (Exception e){
log.error("pushEkp error updateInsuranceInsuredById:",e.getMessage());
}
} }
} }
this.updateById(byId); this.updateById(byId);
...@@ -6807,7 +6814,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -6807,7 +6814,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
try{ try{
R<TSettleDomainListVo> settleDomainList = archivesDaprUtil.getSettleDomainIdsByUserId(user.getId()); R<TSettleDomainListVo> settleDomainList = archivesDaprUtil.getSettleDomainIdsByUserId(user.getId());
if(Common.isNotNull(settleDomainList) && settleDomainList.getCode() == CommonConstants.SUCCESS){ if(Common.isNotNull(settleDomainList) && settleDomainList.getCode() == CommonConstants.SUCCESS){
deptList = settleDomainList.getData().getDeptIds(); TSettleDomainListVo data = settleDomainList.getData();
if (Optional.ofNullable(data).isPresent()){
deptList = data.getDeptNos();
}
} }
}catch (Exception e){ }catch (Exception e){
log.error("查询项目信息出错:"+e); log.error("查询项目信息出错:"+e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment