|
@@ -9,14 +9,15 @@ import com.jpsoft.employment.modules.common.dto.Sort;
|
|
|
import com.jpsoft.employment.modules.common.utils.MapUtils;
|
|
import com.jpsoft.employment.modules.common.utils.MapUtils;
|
|
|
import com.jpsoft.employment.modules.common.utils.PojoUtils;
|
|
import com.jpsoft.employment.modules.common.utils.PojoUtils;
|
|
|
import com.jpsoft.employment.modules.common.utils.StringUtils;
|
|
import com.jpsoft.employment.modules.common.utils.StringUtils;
|
|
|
-import com.jpsoft.employment.modules.job.entity.Recruitment;
|
|
|
|
|
-import com.jpsoft.employment.modules.job.service.RecruitmentService;
|
|
|
|
|
-import com.jpsoft.employment.modules.job.service.UserBrowseService;
|
|
|
|
|
-import com.jpsoft.employment.modules.job.service.UserCollectionService;
|
|
|
|
|
|
|
+import com.jpsoft.employment.modules.job.entity.*;
|
|
|
|
|
+import com.jpsoft.employment.modules.job.service.*;
|
|
|
import com.jpsoft.employment.modules.manage.entity.JobFair;
|
|
import com.jpsoft.employment.modules.manage.entity.JobFair;
|
|
|
import com.jpsoft.employment.modules.manage.entity.JobFairCompany;
|
|
import com.jpsoft.employment.modules.manage.entity.JobFairCompany;
|
|
|
|
|
+import com.jpsoft.employment.modules.manage.entity.SeatManage;
|
|
|
import com.jpsoft.employment.modules.manage.service.JobFairCompanyService;
|
|
import com.jpsoft.employment.modules.manage.service.JobFairCompanyService;
|
|
|
import com.jpsoft.employment.modules.manage.service.JobFairService;
|
|
import com.jpsoft.employment.modules.manage.service.JobFairService;
|
|
|
|
|
+import com.jpsoft.employment.modules.manage.service.SeatManageService;
|
|
|
|
|
+import com.jpsoft.employment.modules.sys.service.DataDictionaryService;
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
@@ -52,6 +53,24 @@ public class DataScreenApiController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private RecruitmentService recruitmentService;
|
|
private RecruitmentService recruitmentService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private SeatManageService seatManageService;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private WorkCategoryService workCategoryService;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private ResumeDeliverService resumeDeliverService;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private DataDictionaryService dataDictionaryService;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private ResumeService resumeService;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private JobUserService jobUserService;
|
|
|
|
|
+
|
|
|
@PostMapping("jobFairScreenData")
|
|
@PostMapping("jobFairScreenData")
|
|
|
@ApiOperation(value = "招聘会大屏")
|
|
@ApiOperation(value = "招聘会大屏")
|
|
|
@ApiImplicitParams({
|
|
@ApiImplicitParams({
|
|
@@ -70,15 +89,37 @@ public class DataScreenApiController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
List<JobFairCompany> jobFairCompanyList = jobFairCompanyService.findByFairId(jobFairId);
|
|
List<JobFairCompany> jobFairCompanyList = jobFairCompanyService.findByFairId(jobFairId);
|
|
|
|
|
+
|
|
|
|
|
+ int recruitmentNum = 0;
|
|
|
|
|
+ int recruitsNum = 0;//招聘人数
|
|
|
|
|
+ int totalNum = 0;//总入场人数
|
|
|
|
|
+ int todayNum = 0;//今日入场数
|
|
|
|
|
+ int resumeNum = 0;//简历投递数
|
|
|
|
|
+
|
|
|
|
|
+ int manNum = 0;
|
|
|
|
|
+ int womanNum = 0;
|
|
|
|
|
+ //简历投递数
|
|
|
for(JobFairCompany jobFairCompany : jobFairCompanyList){
|
|
for(JobFairCompany jobFairCompany : jobFairCompanyList){
|
|
|
String[] recruitmentIds = jobFairCompany.getRecruitmentIds().split(",");
|
|
String[] recruitmentIds = jobFairCompany.getRecruitmentIds().split(",");
|
|
|
jobFairCompany.setRecruitmentNums(recruitmentIds.length);
|
|
jobFairCompany.setRecruitmentNums(recruitmentIds.length);
|
|
|
|
|
+ recruitmentNum = recruitmentNum + recruitmentIds.length;
|
|
|
|
|
+ recruitsNum = recruitsNum + recruitmentService.findPositionNumber(jobFairCompany.getCompanyId());
|
|
|
|
|
+ manNum = manNum + recruitmentService.findSexNumber("1",jobFairCompany.getCompanyId());
|
|
|
|
|
+ womanNum = womanNum + recruitmentService.findSexNumber("0",jobFairCompany.getCompanyId());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
Map<String, Object> dataMap = new HashMap<String, Object>();
|
|
Map<String, Object> dataMap = new HashMap<String, Object>();
|
|
|
- dataMap.put("jobFair", jobFair);
|
|
|
|
|
- dataMap.put("jobFairCompanyList", jobFairCompanyList);
|
|
|
|
|
|
|
+ dataMap.put("jobFair", jobFair);//招聘会信息
|
|
|
|
|
+ dataMap.put("jobFairCompanyList", jobFairCompanyList);//招聘企业信息
|
|
|
|
|
+ dataMap.put("jobFairCompanyNum", jobFairCompanyList.size());//入场企业数
|
|
|
|
|
+ dataMap.put("recruitmentNum", recruitmentNum);//招聘岗位数
|
|
|
|
|
+ dataMap.put("recruitsNum", recruitsNum);//招聘人数
|
|
|
|
|
+ dataMap.put("totalNum", totalNum);//总入场人数
|
|
|
|
|
+ dataMap.put("todayNum", todayNum);//今日入场数
|
|
|
|
|
+ dataMap.put("resumeNum", resumeNum);//简历投递数
|
|
|
|
|
|
|
|
jobFairService.get(jobFairId);
|
|
jobFairService.get(jobFairId);
|
|
|
|
|
|
|
@@ -107,7 +148,7 @@ public class DataScreenApiController {
|
|
|
int shortageRecruitNum = 0;
|
|
int shortageRecruitNum = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
- List<Company> companyList = companyService.list();
|
|
|
|
|
|
|
+
|
|
|
List<Recruitment> recruitmentList = recruitmentService.listByApproved();
|
|
List<Recruitment> recruitmentList = recruitmentService.listByApproved();
|
|
|
|
|
|
|
|
recruitsNum = recruitmentService.findPositionNumber(null);
|
|
recruitsNum = recruitmentService.findPositionNumber(null);
|
|
@@ -116,8 +157,21 @@ public class DataScreenApiController {
|
|
|
|
|
|
|
|
womanNum = recruitmentService.findSexNumber("0",null);
|
|
womanNum = recruitmentService.findSexNumber("0",null);
|
|
|
|
|
|
|
|
|
|
+ //List<Company> companyList = companyService.list();
|
|
|
|
|
+ List<Company> companyList = companyService.findByAll();
|
|
|
|
|
+ //List<Company> companyList = new ArrayList<>();
|
|
|
|
|
+ for(Company company : companyList){
|
|
|
|
|
+ int postNum = recruitmentService.findNumber(company.getId());
|
|
|
|
|
+ int peopleNum = recruitmentService.findPositionNumber(company.getId());
|
|
|
|
|
+
|
|
|
|
|
+ company.setPostNum(postNum);
|
|
|
|
|
+ company.setPeopleNum(peopleNum);
|
|
|
|
|
+ //companyList.add(company);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
Map<String, Object> dataMap = new HashMap<String, Object>();
|
|
Map<String, Object> dataMap = new HashMap<String, Object>();
|
|
|
|
|
+ //入住企业
|
|
|
|
|
+ dataMap.put("companyList", companyList);
|
|
|
//入住企业数
|
|
//入住企业数
|
|
|
dataMap.put("companyNum", companyList.size());
|
|
dataMap.put("companyNum", companyList.size());
|
|
|
//招聘岗位数
|
|
//招聘岗位数
|
|
@@ -170,7 +224,6 @@ public class DataScreenApiController {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
messageResult.setData(PojoUtils.pageWrapper(page));
|
|
messageResult.setData(PojoUtils.pageWrapper(page));
|
|
|
messageResult.setResult(true);
|
|
messageResult.setResult(true);
|
|
|
messageResult.setCode(200);
|
|
messageResult.setCode(200);
|
|
@@ -200,7 +253,127 @@ public class DataScreenApiController {
|
|
|
searchParams.put("approveStatus","3");
|
|
searchParams.put("approveStatus","3");
|
|
|
|
|
|
|
|
Page<Recruitment> page = recruitmentService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
|
|
Page<Recruitment> page = recruitmentService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
|
|
|
|
|
+ for(Recruitment recruitment : page.getResult()){
|
|
|
|
|
+ WorkCategory workCategory = workCategoryService.get(recruitment.getPosition());
|
|
|
|
|
+ if(workCategory != null) {
|
|
|
|
|
+ recruitment.setPositionName(workCategory.getName());
|
|
|
|
|
+ }
|
|
|
|
|
+ recruitment.setWorkYearName(dataDictionaryService.getName(recruitment.getWorkYear()));
|
|
|
|
|
+ recruitment.setPositionSexN(dataDictionaryService.findNameByCatalogNameAndValue("性别",recruitment.getPositionSex()));
|
|
|
|
|
+ recruitment.setEducationName(dataDictionaryService.getName(recruitment.getEducation()));
|
|
|
|
|
+ recruitment.setWageTypeName(dataDictionaryService.getName(recruitment.getWageType()));
|
|
|
|
|
+
|
|
|
|
|
+ //recruitmentList.add(recruitment);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ messageResult.setData(PojoUtils.pageWrapper(page));
|
|
|
|
|
+ messageResult.setResult(true);
|
|
|
|
|
+ messageResult.setCode(200);
|
|
|
|
|
+ }
|
|
|
|
|
+ catch(Exception ex){
|
|
|
|
|
+ log.error(ex.getMessage());
|
|
|
|
|
+ messageResult.setResult(false);
|
|
|
|
|
+ messageResult.setMessage(ex.getMessage());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return messageResult;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
+ @PostMapping("seatData")
|
|
|
|
|
+ @ApiOperation(value = "席位")
|
|
|
|
|
+ @ApiImplicitParams({
|
|
|
|
|
+ @ApiImplicitParam(name = "seatNumber", value = "席位编号", required = true, paramType = "form")
|
|
|
|
|
+ })
|
|
|
|
|
+ public MessageResult<Map> seatData( String seatNumber){
|
|
|
|
|
+ MessageResult<Map> messageResult = new MessageResult<>();
|
|
|
|
|
+ try{
|
|
|
|
|
+ if(StringUtils.isEmpty(seatNumber)){
|
|
|
|
|
+ throw new Exception("查询错误");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ SeatManage seatManage = seatManageService.findByNum(seatNumber);
|
|
|
|
|
+
|
|
|
|
|
+ if(seatManage == null || StringUtils.isEmpty(seatManage.getCompanyId())){
|
|
|
|
|
+ throw new Exception("该席位目前未绑定企业");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ Company company = companyService.get(seatManage.getCompanyId());
|
|
|
|
|
+ if(company == null){
|
|
|
|
|
+ throw new Exception("企业有误");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //List<WorkCategory> workCategoryList = workCategoryService.findByCompany(company.getId());
|
|
|
|
|
+ List<Recruitment> recruitmentList = recruitmentService.findByCompanyId(company.getId());
|
|
|
|
|
+ //List<Recruitment> recruitmentList = new ArrayList<>();
|
|
|
|
|
+ for(Recruitment recruitment : recruitmentList){
|
|
|
|
|
+ WorkCategory workCategory = workCategoryService.get(recruitment.getPosition());
|
|
|
|
|
+ if(workCategory != null) {
|
|
|
|
|
+ recruitment.setPositionName(workCategory.getName());
|
|
|
|
|
+ }
|
|
|
|
|
+ recruitment.setWorkYearName(dataDictionaryService.getName(recruitment.getWorkYear()));
|
|
|
|
|
+ recruitment.setPositionSexN(dataDictionaryService.findNameByCatalogNameAndValue("性别",recruitment.getPositionSex()));
|
|
|
|
|
+ recruitment.setEducationName(dataDictionaryService.getName(recruitment.getEducation()));
|
|
|
|
|
+ //recruitmentList.add(recruitment);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ String scale = dataDictionaryService.getName(company.getScale());
|
|
|
|
|
+ String industry = dataDictionaryService.getName(company.getIndustry());
|
|
|
|
|
+
|
|
|
|
|
+ Map<String, Object> dataMap = new HashMap<String, Object>();
|
|
|
|
|
+ dataMap.put("company", company);
|
|
|
|
|
+ dataMap.put("companyId", company.getId());
|
|
|
|
|
+ dataMap.put("scale", scale);//规模
|
|
|
|
|
+ dataMap.put("industry", industry);//行业
|
|
|
|
|
+ dataMap.put("introduction", company.getIntroduction());//介绍
|
|
|
|
|
+ dataMap.put("videoUrl", "http://xpgj.oss-cn-shanghai.aliyuncs.com/xpgj/test/VID_20220105_144821.mp4");//视频
|
|
|
|
|
+ dataMap.put("recruitmentList", recruitmentList);
|
|
|
|
|
+
|
|
|
|
|
+ messageResult.setData(dataMap);
|
|
|
|
|
+ messageResult.setResult(true);
|
|
|
|
|
+ messageResult.setCode(200);
|
|
|
|
|
+ }
|
|
|
|
|
+ catch(Exception ex){
|
|
|
|
|
+ log.error(ex.getMessage());
|
|
|
|
|
+ messageResult.setResult(false);
|
|
|
|
|
+ messageResult.setMessage(ex.getMessage());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return messageResult;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("resumeDeliverData")
|
|
|
|
|
+ @ApiOperation(value = "简历投递记录")
|
|
|
|
|
+ @ApiImplicitParams({
|
|
|
|
|
+ @ApiImplicitParam(name = "companyId", value = "企业编号", required = true, paramType = "form")
|
|
|
|
|
+ })
|
|
|
|
|
+ public MessageResult<Map> resumeDeliverData( String companyId,
|
|
|
|
|
+ @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
|
|
|
|
|
+ @RequestParam(value="pageSize",defaultValue="10") int pageSize){
|
|
|
|
|
+ MessageResult<Map> messageResult = new MessageResult<>();
|
|
|
|
|
+ try{
|
|
|
|
|
+
|
|
|
|
|
+ List<Sort> sortList = new ArrayList<>();
|
|
|
|
|
+ sortList.add(new Sort("a.create_time","desc"));
|
|
|
|
|
+
|
|
|
|
|
+ Map<String,Object> searchParams = new HashMap<>();
|
|
|
|
|
+ searchParams.put("companyId",companyId);
|
|
|
|
|
+
|
|
|
|
|
+ Page<ResumeDeliver> page = resumeDeliverService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
|
|
|
|
|
+ String userSex = "先生";
|
|
|
|
|
+ for(ResumeDeliver rd : page.getResult()){
|
|
|
|
|
+ Recruitment recruitment = recruitmentService.get(rd.getJobRecruitmentId());
|
|
|
|
|
+ WorkCategory workCategory = workCategoryService.get(recruitment.getPosition());
|
|
|
|
|
+ if(workCategory != null) {
|
|
|
|
|
+ recruitment.setPositionName(workCategory.getName());
|
|
|
|
|
+ }
|
|
|
|
|
+ rd.setJobRecruitment(recruitment);
|
|
|
|
|
+ JobUser jobUser = jobUserService.get(rd.getJobUserId());
|
|
|
|
|
+ Resume resume = resumeService.get(rd.getJobResumeId());
|
|
|
|
|
+
|
|
|
|
|
+ rd.setJobUserSex(resume.getSex());
|
|
|
|
|
+ rd.setJobUserName(jobUser.getRealName());
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
messageResult.setData(PojoUtils.pageWrapper(page));
|
|
messageResult.setData(PojoUtils.pageWrapper(page));
|
|
|
messageResult.setResult(true);
|
|
messageResult.setResult(true);
|
|
@@ -214,4 +387,5 @@ public class DataScreenApiController {
|
|
|
|
|
|
|
|
return messageResult;
|
|
return messageResult;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
}
|
|
}
|