Commit a0ef436b authored by fangxinjiang's avatar fangxinjiang

拒绝入职优化-fxj

parent 70f77079
...@@ -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);
......
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