Commit 3da53131 authored by hongguangwu's avatar hongguangwu

Merge remote-tracking branch 'origin/MVP1.7.21' into MVP1.7.21

parents 3190ded1 a0ef436b
...@@ -2782,7 +2782,11 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -2782,7 +2782,11 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
//获取项目信息 //获取项目信息
R<TSettleDomainSelectVo> domainR = archivesDaprUtil.getSettleDomainSelectVoById(excel.getDeptNo()); R<TSettleDomainSelectVo> domainR = archivesDaprUtil.getSettleDomainSelectVoById(excel.getDeptNo());
if (null == domainR || !CommonConstants.SUCCESS.equals(domainR.getCode())) { if (null == domainR || !CommonConstants.SUCCESS.equals(domainR.getCode())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "访问员工基础服务异常:"+((null==domainR || null==domainR.getMsg())?"":domainR.getMsg()))); String errorMsg = Optional.ofNullable(domainR)
.map(R::getMsg)
.orElse("未知错误");
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),
"访问员工基础服务异常:" + errorMsg));
continue; continue;
} }
if (null == domainR.getData()){ if (null == domainR.getData()){
...@@ -2807,19 +2811,32 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -2807,19 +2811,32 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
//获取项目配置的字典值 //获取项目配置的字典值
postConfigList = postConfigMap.get(excel.getDeptNo()); postConfigList = postConfigMap.get(excel.getDeptNo());
if (null == postConfigList){ if (null == postConfigList) {
postConfigList = new ArrayList<>(); postConfigList = new ArrayList<>();
domainDictR = archivesDaprUtil.getDictListByDeptNo(excel.getDeptNo()); domainDictR = archivesDaprUtil.getDictListByDeptNo(excel.getDeptNo());
if (Common.isNotNull(domainDictR) && Common.isNotNull(domainDictR.getData()) && Common.isNotNull(domainDictR.getData().getSysAutoDictItemList())) {
// 校验响应数据完整性
if (Common.isNotNull(domainDictR)
&& Common.isNotNull(domainDictR.getData())
&& Common.isNotNull(domainDictR.getData().getSysAutoDictItemList())) {
List<SysAutoDictItem> dictItemList = domainDictR.getData().getSysAutoDictItemList(); List<SysAutoDictItem> dictItemList = domainDictR.getData().getSysAutoDictItemList();
for(SysAutoDictItem sysAutoDictItem : dictItemList){
if("post_type".equals(sysAutoDictItem.getType())){ // 筛选并收集岗位类型标签
postConfigList.add(sysAutoDictItem.getLabel()); dictItemList.stream()
} .filter(Objects::nonNull)
} .filter(item -> "post_type".equals(item.getType()))
.map(SysAutoDictItem::getLabel)
.filter(Objects::nonNull)
.forEach(postConfigList::add);
// 仅当获取到有效数据时才缓存
if (!postConfigList.isEmpty()) {
postConfigMap.put(excel.getDeptNo(), postConfigList); postConfigMap.put(excel.getDeptNo(), postConfigList);
} }
} }
}
// 插入 // 插入
EmployeeRegistration insert = new EmployeeRegistration(); EmployeeRegistration insert = new EmployeeRegistration();
BeanUtil.copyProperties(excel, insert); BeanUtil.copyProperties(excel, insert);
......
...@@ -448,6 +448,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -448,6 +448,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (Common.isNotNull(user)) { if (Common.isNotNull(user)) {
detail.setCreateUserDeptId(user.getDeptId().toString()); detail.setCreateUserDeptId(user.getDeptId().toString());
detail.setCreateUserDeptName(user.getDeptName()); detail.setCreateUserDeptName(user.getDeptName());
detail.setCreateBy(user.getId());
detail.setCreateName(user.getNickname());
} }
//投保状态:待投保 //投保状态:待投保
detail.setBuyHandleStatus(CommonConstants.ONE_INT); detail.setBuyHandleStatus(CommonConstants.ONE_INT);
...@@ -456,7 +458,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -456,7 +458,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//保费都默认是0 //保费都默认是0
detail.setActualPremium(new BigDecimal("0.00")); detail.setActualPremium(new BigDecimal("0.00"));
detail.setEstimatePremium(new BigDecimal("0.00")); detail.setEstimatePremium(new BigDecimal("0.00"));
if (null == user){ if (autoFlag){
userTemp = sysUserMap.get(detail.getDeptNo()); userTemp = sysUserMap.get(detail.getDeptNo());
if (null != userTemp){ if (null != userTemp){
detail.setCreateBy(userTemp.getUserId()); detail.setCreateBy(userTemp.getUserId());
...@@ -465,9 +467,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -465,9 +467,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setCreateBy( "1"); detail.setCreateBy( "1");
detail.setCreateName("自动化派单" + "-" + success.getCustomerUserName()); detail.setCreateName("自动化派单" + "-" + success.getCustomerUserName());
} }
}else {
detail.setCreateBy(user.getId());
detail.setCreateName(user.getNickname());
} }
detail.setId(RandomStringUtils.randomNumeric(19)); detail.setId(RandomStringUtils.randomNumeric(19));
//是否见费出单逻辑处理:预估保费结算、购买周期计算、保单结束日期结算、参保开始日期计算、预计办理日期计算 //是否见费出单逻辑处理:预估保费结算、购买周期计算、保单结束日期结算、参保开始日期计算、预计办理日期计算
...@@ -707,10 +706,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -707,10 +706,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (Common.isNotNull(user)) { if (Common.isNotNull(user)) {
detail.setCreateUserDeptId(user.getDeptId().toString()); detail.setCreateUserDeptId(user.getDeptId().toString());
detail.setCreateUserDeptName(user.getDeptName()); detail.setCreateUserDeptName(user.getDeptName());
detail.setCreateBy(user.getId());
detail.setCreateName(user.getNickname());
} }
detail.setActualPremium(new BigDecimal("0.00")); detail.setActualPremium(new BigDecimal("0.00"));
detail.setEstimatePremium(new BigDecimal("0.00")); detail.setEstimatePremium(new BigDecimal("0.00"));
if (null == user){ if (autoFlag){
userTemp = sysUserMap.get(detail.getDeptNo()); userTemp = sysUserMap.get(detail.getDeptNo());
if (null != userTemp){ if (null != userTemp){
detail.setCreateBy(userTemp.getUserId()); detail.setCreateBy(userTemp.getUserId());
...@@ -719,9 +720,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -719,9 +720,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setCreateBy( "1"); detail.setCreateBy( "1");
detail.setCreateName("自动化派单" + "-" + success.getCustomerUserName()); detail.setCreateName("自动化派单" + "-" + success.getCustomerUserName());
} }
}else {
detail.setCreateBy(user.getId());
detail.setCreateName(user.getNickname());
} }
detailList.add(detail); detailList.add(detail);
sourceIdCardList.add(detail.getEmpIdcardNo()); sourceIdCardList.add(detail.getEmpIdcardNo());
...@@ -911,11 +909,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -911,11 +909,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (Common.isNotNull(user)) { if (Common.isNotNull(user)) {
newDetail.setCreateUserDeptId(user.getDeptId().toString()); newDetail.setCreateUserDeptId(user.getDeptId().toString());
newDetail.setCreateUserDeptName(user.getDeptName()); newDetail.setCreateUserDeptName(user.getDeptName());
newDetail.setCreateBy(user.getId());
newDetail.setCreateName(user.getNickname());
} }
newDetail.setSignFlag(CommonConstants.ZERO_INT); newDetail.setSignFlag(CommonConstants.ZERO_INT);
//创建时间是新数据插入时间 //创建时间是新数据插入时间
newDetail.setCreateTime(LocalDateTime.now()); newDetail.setCreateTime(LocalDateTime.now());
if (null == user){ if (autoFlag){
userTemp = sysUserMap.get(newDetail.getDeptNo()); userTemp = sysUserMap.get(newDetail.getDeptNo());
if (null != userTemp){ if (null != userTemp){
newDetail.setCreateBy(userTemp.getUserId()); newDetail.setCreateBy(userTemp.getUserId());
...@@ -924,9 +924,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -924,9 +924,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
newDetail.setCreateBy( "1"); newDetail.setCreateBy( "1");
newDetail.setCreateName("自动化派单" + "-" + success.getCustomerUserName()); newDetail.setCreateName("自动化派单" + "-" + success.getCustomerUserName());
} }
}else {
newDetail.setCreateBy(user.getId());
newDetail.setCreateName(user.getNickname());
} }
//替换不参与结算 //替换不参与结算
......
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