|
@@ -58,6 +58,9 @@ public class PostServiceImpl implements PostService {
|
|
|
@Autowired
|
|
|
private RecommendMgtCQuery recommendMgtCQuery;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private PcWorkcategoryMapper pcWorkcategoryMapper;
|
|
|
+
|
|
|
@Override
|
|
|
public PageInfo<PostVo> getList(Integer page, Integer rows, List<String> postIDList,
|
|
|
String professionName, Integer minCount, Integer maxCount,
|
|
@@ -361,19 +364,46 @@ public class PostServiceImpl implements PostService {
|
|
|
for (PcProfession curItem : thirdLevelData) {
|
|
|
SysDictionaryItem item = new SysDictionaryItem();
|
|
|
item.setCode(curItem.getProfessionID());
|
|
|
- item.setCode(curItem.getProfessionName());
|
|
|
+ item.setName(curItem.getProfessionName());
|
|
|
thirdLevelProfessionList.add(item);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ // 工种信息
|
|
|
+ List<SysDictionaryItem> WorkCategoryList = new ArrayList<>();
|
|
|
+ // 获取第一级工种
|
|
|
+ PcWorkcategoryExample workCategoryExample = new PcWorkcategoryExample();
|
|
|
+ workCategoryExample.or().andParentWorkCategoryIDEqualTo("").andStatusEqualTo(1);
|
|
|
+ List<PcWorkcategory> firstLevelWorkCategoryList = pcWorkcategoryMapper.selectByExample(workCategoryExample);
|
|
|
+ for (PcWorkcategory pcWorkcategory : firstLevelWorkCategoryList) {
|
|
|
+ // 获取第二级工种
|
|
|
+ workCategoryExample = new PcWorkcategoryExample();
|
|
|
+ workCategoryExample.or().andParentWorkCategoryIDEqualTo(pcWorkcategory.getWorkCategoryID()).andStatusEqualTo(1);
|
|
|
+ List<PcWorkcategory> secondLevelWorkCategoryList = pcWorkcategoryMapper.selectByExample(workCategoryExample);
|
|
|
+ for (PcWorkcategory workCategory : secondLevelWorkCategoryList) {
|
|
|
+ // 获取第三级工种
|
|
|
+ workCategoryExample = new PcWorkcategoryExample();
|
|
|
+ workCategoryExample.or().andParentWorkCategoryIDEqualTo(workCategory.getWorkCategoryID()).andStatusEqualTo(1);
|
|
|
+ List<PcWorkcategory> thirdLevelWorkCategoryList = pcWorkcategoryMapper.selectByExample(workCategoryExample);
|
|
|
+ for (PcWorkcategory pcWorkCategory1 : thirdLevelWorkCategoryList) {
|
|
|
+ SysDictionaryItem item = new SysDictionaryItem();
|
|
|
+ item.setCode(pcWorkCategory1.getWorkCategoryID());
|
|
|
+ item.setName(pcWorkCategory1.getWorkCategoryName());
|
|
|
+ WorkCategoryList.add(item);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
//文化程度
|
|
|
List<SysDictionaryItem> dicCultureDataList = dictionaryService.getDictionaryItemList("CultureLevel");
|
|
|
+ // 工作年限
|
|
|
List<SysDictionaryItem> dicWorkYearDataList = dictionaryService.getDictionaryItemList("WorkYearType");
|
|
|
List<PostVo> resultList = new ArrayList<>();
|
|
|
|
|
|
dataList.forEach(item -> {
|
|
|
String errorInfo = "";
|
|
|
+ item.setPostID(UUID.randomUUID().toString());
|
|
|
+ item.setRecordStatus(1);
|
|
|
if (stringUtils.IsNullOrEmpty(item.companyName))
|
|
|
errorInfo += "请填写企业名称!";
|
|
|
else {
|
|
@@ -390,6 +420,15 @@ public class PostServiceImpl implements PostService {
|
|
|
if (item.professionID == null || item.professionID == "")
|
|
|
errorInfo += "岗位不存在!";
|
|
|
}
|
|
|
+ if (stringUtils.IsNullOrEmpty(item.getWorkCategoryName())) {
|
|
|
+ errorInfo += "请填写工种名称";
|
|
|
+ } else {
|
|
|
+ item.workCode = WorkCategoryList.stream().filter(it -> it.getName().equals(item.getWorkCategoryName().trim()))
|
|
|
+ .findFirst().orElse(new SysDictionaryItem()).getCode();
|
|
|
+ if (item.workCode == null || item.workCode == "") {
|
|
|
+ errorInfo += "工种不存在!";
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
if (stringUtils.IsNullOrEmpty(String.valueOf(item.recruitCount)) || item.recruitCount == null)
|
|
|
errorInfo += "请填写招聘人数!";
|
|
@@ -401,11 +440,11 @@ public class PostServiceImpl implements PostService {
|
|
|
if (stringUtils.IsNullOrEmpty(item.jobPlace))
|
|
|
errorInfo += "请填写工作地点!";
|
|
|
|
|
|
- if (stringUtils.IsNullOrEmpty(item.workYearStr)) {
|
|
|
- item.workYear = dicWorkYearDataList.stream().filter(it -> it.getName().equals(item.workYearStr.trim()))
|
|
|
+ if (!stringUtils.IsNullOrEmpty(item.getWorkYearName())) {
|
|
|
+ item.workYear = dicWorkYearDataList.stream().filter(it -> it.getName().equals(item.getWorkYearName().trim()))
|
|
|
.findFirst().orElse(new SysDictionaryItem()).getValue();
|
|
|
- if (item.workYear == null || item.workYear == 0)
|
|
|
- errorInfo += "输入的工作年限不存在!";
|
|
|
+ if (item.workYear == null)
|
|
|
+ errorInfo += "工作年限不存在!";
|
|
|
}
|
|
|
|
|
|
if (item.isTrailName.trim().equals("是")) item.isTrail = true;
|