|
@@ -359,7 +359,7 @@ public class PostServiceImpl implements PostService {
|
|
|
var secondLevelData = pcProfessionMapper.selectByExample(professionExp);
|
|
|
for (PcProfession curParentProfession : secondLevelData) {
|
|
|
professionExp = new PcProfessionExample();
|
|
|
- professionExp.or().andParentProfessionIDEqualTo(curParentProfession.getProfessionID()).andStatusEqualTo(1);
|
|
|
+ professionExp.or().andParentProfessionIDEqualTo(curParentProfession.getProfessionID()).andStatusEqualTo(1).andProfessionNameIsNotNull();
|
|
|
var thirdLevelData = pcProfessionMapper.selectByExample(professionExp);
|
|
|
for (PcProfession curItem : thirdLevelData) {
|
|
|
SysDictionaryItem item = new SysDictionaryItem();
|
|
@@ -429,7 +429,7 @@ public class PostServiceImpl implements PostService {
|
|
|
if (stringUtils.IsNullOrEmpty(item.professionName))
|
|
|
errorInfo += "请填写岗位名称!";
|
|
|
else {
|
|
|
- item.professionID = thirdLevelProfessionList.stream().filter(it -> it.getName().equals(item.getProfessionName().trim()))
|
|
|
+ item.professionID = thirdLevelProfessionList.stream().filter(it -> it.getName() != null && it.getName().equals(item.getProfessionName().trim()))
|
|
|
.findFirst().orElse(new SysDictionaryItem()).getCode();
|
|
|
if (item.professionID == null || item.professionID == "") {
|
|
|
// 如果岗位不存在,则在“其他”下添加一个
|
|
@@ -453,7 +453,7 @@ public class PostServiceImpl implements PostService {
|
|
|
if (stringUtils.IsNullOrEmpty(item.getWorkCategoryName())) {
|
|
|
errorInfo += "请填写工种名称";
|
|
|
} else {
|
|
|
- item.workCode = WorkCategoryList.stream().filter(it -> it.getName().equals(item.getWorkCategoryName().trim()))
|
|
|
+ item.workCode = WorkCategoryList.stream().filter(it -> it.getName() != null && it.getName().equals(item.getWorkCategoryName().trim()))
|
|
|
.findFirst().orElse(new SysDictionaryItem()).getCode();
|
|
|
if (item.workCode == null || item.workCode == "") {
|
|
|
errorInfo += "工种不存在!";
|
|
@@ -471,7 +471,7 @@ public class PostServiceImpl implements PostService {
|
|
|
errorInfo += "请填写工作地点!";
|
|
|
|
|
|
if (!stringUtils.IsNullOrEmpty(item.getWorkYearName())) {
|
|
|
- item.workYear = dicWorkYearDataList.stream().filter(it -> it.getName().equals(item.getWorkYearName().trim()))
|
|
|
+ item.workYear = dicWorkYearDataList.stream().filter(it -> it.getName() != null && it.getName().equals(item.getWorkYearName().trim()))
|
|
|
.findFirst().orElse(new SysDictionaryItem()).getValue();
|
|
|
if (item.workYear == null)
|
|
|
errorInfo += "工作年限不存在!";
|
|
@@ -481,7 +481,7 @@ public class PostServiceImpl implements PostService {
|
|
|
else if (item.isTrailName.trim().equals("否")) item.isTrail = false;
|
|
|
|
|
|
if (!stringUtils.IsNullOrEmpty(item.cultureLevelName)) {
|
|
|
- item.cultureRank = dicCultureDataList.stream().filter(it -> it.getName().equals(item.cultureLevelName.trim()))
|
|
|
+ item.cultureRank = dicCultureDataList.stream().filter(it -> it.getName() != null && it.getName().equals(item.cultureLevelName.trim()))
|
|
|
.findFirst().orElse(new SysDictionaryItem()).getValue();
|
|
|
if (item.cultureRank == null || item.cultureRank == 0)
|
|
|
errorInfo += "输入的学历要求不存在!";
|