面试记录
This commit is contained in:
parent
e30287d0d5
commit
5f36e35e43
|
@ -1,11 +1,15 @@
|
|||
package com.yzdx.AiInterviewer.controller.VxController;
|
||||
|
||||
import com.yzdx.AiInterviewer.comment.R;
|
||||
import com.yzdx.AiInterviewer.entity.VxEntityDto.VxInterviewRecordDto;
|
||||
import com.yzdx.AiInterviewer.service.VxService.VxCarouselChartService;
|
||||
import com.yzdx.AiInterviewer.service.VxService.VxInterviewApplicationService;
|
||||
import com.yzdx.AiInterviewer.service.VxService.VxInterviewRecordService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/vx_interview")
|
||||
public class VxInterviewController {
|
||||
|
@ -14,6 +18,8 @@ public class VxInterviewController {
|
|||
private VxCarouselChartService vxCarouselChartService;
|
||||
@Autowired
|
||||
private VxInterviewApplicationService vxInterviewApplicationService;
|
||||
@Autowired
|
||||
private VxInterviewRecordService vxInterviewRecordService;
|
||||
|
||||
@GetMapping("/getCarouselChart")
|
||||
public R getCarouselChart(){
|
||||
|
@ -31,5 +37,15 @@ public class VxInterviewController {
|
|||
}
|
||||
return R.success("申请成功");
|
||||
}
|
||||
@GetMapping("getInterviewRecord")
|
||||
public R getInterviewRecordList(Integer userId,Integer noticeId){
|
||||
List<VxInterviewRecordDto> list=vxInterviewRecordService.getInterviewRecordList(userId,noticeId);
|
||||
return R.success(list);
|
||||
}
|
||||
@GetMapping("/searchInterviewRecord")
|
||||
public R searchInterviewRecordList(String searchCompany,Integer noticeId){
|
||||
List<VxInterviewRecordDto> list=vxInterviewRecordService.searchInterviewRecordList(searchCompany,noticeId);
|
||||
return R.success(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
package com.yzdx.AiInterviewer.entity.VxEntityDto;
|
||||
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxInterviewRecord;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
public class VxInterviewRecordDto extends VxInterviewRecord {
|
||||
@ApiModelProperty("公司名称")
|
||||
private String companyName;
|
||||
@ApiModelProperty("公司logo")
|
||||
private String companyLogoUrl;
|
||||
@ApiModelProperty("面试公司id")
|
||||
private String interviewCompanyId;
|
||||
@ApiModelProperty("面试时间")
|
||||
private String interviewTime;
|
||||
@ApiModelProperty("岗位")
|
||||
private String job;
|
||||
@ApiModelProperty("面试结果")
|
||||
private Integer result;
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package com.yzdx.AiInterviewer.entity.vxEntity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel("面试记录类")
|
||||
@TableName("interview_record")
|
||||
public class VxInterviewRecord {
|
||||
@ApiModelProperty("面试记录id")
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer id;
|
||||
@ApiModelProperty("公司编码")
|
||||
private String companyEncoding;
|
||||
@ApiModelProperty("面试评语")
|
||||
private String comments;
|
||||
@ApiModelProperty("面试记录状态")
|
||||
private Integer status;
|
||||
@ApiModelProperty("面试者id")
|
||||
private Integer interviewer;
|
||||
@ApiModelProperty("创建时间")
|
||||
private String createTime;
|
||||
@ApiModelProperty("更新时间")
|
||||
private String updateTime;
|
||||
@ApiModelProperty("创建人id")
|
||||
private Integer createUser;
|
||||
@ApiModelProperty("更新人id ")
|
||||
private Integer updateUser;
|
||||
@ApiModelProperty("面试通知id")
|
||||
private Integer noticeId;
|
||||
}
|
|
@ -5,5 +5,5 @@ import com.yzdx.AiInterviewer.entity.vxEntity.VxInterviewNotice;
|
|||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface InterviewNoticeMapper extends BaseMapper<VxInterviewNotice> {
|
||||
public interface VxInterviewNoticeMapper extends BaseMapper<VxInterviewNotice> {
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package com.yzdx.AiInterviewer.mapper.VxMapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxInterviewRecord;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface VxInterviewRecordMapper extends BaseMapper<VxInterviewRecord> {
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.yzdx.AiInterviewer.service.VxService;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.yzdx.AiInterviewer.entity.VxEntityDto.VxInterviewRecordDto;
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxInterviewRecord;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface VxInterviewRecordService extends IService<VxInterviewRecord> {
|
||||
List<VxInterviewRecordDto> getInterviewRecordList(Integer userId,Integer noticeId);
|
||||
|
||||
List<VxInterviewRecordDto> searchInterviewRecordList(String searchCompany,Integer noticeId);
|
||||
}
|
|
@ -2,10 +2,10 @@ package com.yzdx.AiInterviewer.service.VxService.impl;
|
|||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxInterviewNotice;
|
||||
import com.yzdx.AiInterviewer.mapper.VxMapper.InterviewNoticeMapper;
|
||||
import com.yzdx.AiInterviewer.mapper.VxMapper.VxInterviewNoticeMapper;
|
||||
import com.yzdx.AiInterviewer.service.VxService.InterviewNoticeService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class VxInterviewNoticeImpl extends ServiceImpl<InterviewNoticeMapper, VxInterviewNotice> implements InterviewNoticeService {
|
||||
public class VxInterviewNoticeImpl extends ServiceImpl<VxInterviewNoticeMapper, VxInterviewNotice> implements InterviewNoticeService {
|
||||
}
|
||||
|
|
|
@ -0,0 +1,113 @@
|
|||
package com.yzdx.AiInterviewer.service.VxService.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yzdx.AiInterviewer.entity.Company;
|
||||
import com.yzdx.AiInterviewer.entity.JobEntity;
|
||||
import com.yzdx.AiInterviewer.entity.VxEntityDto.VxInterviewRecordDto;
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxInterviewNotice;
|
||||
import com.yzdx.AiInterviewer.entity.vxEntity.VxInterviewRecord;
|
||||
import com.yzdx.AiInterviewer.mapper.CompanyMapper;
|
||||
import com.yzdx.AiInterviewer.mapper.InterviewNoticeMapper;
|
||||
import com.yzdx.AiInterviewer.mapper.JobMapper;
|
||||
import com.yzdx.AiInterviewer.mapper.VxMapper.VxInterviewNoticeMapper;
|
||||
import com.yzdx.AiInterviewer.mapper.VxMapper.VxInterviewRecordMapper;
|
||||
import com.yzdx.AiInterviewer.service.VxService.VxInterviewRecordService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.xml.ws.Action;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
@Service
|
||||
public class VxInterviewRecordServiceImpl extends ServiceImpl<VxInterviewRecordMapper, VxInterviewRecord> implements VxInterviewRecordService {
|
||||
@Autowired
|
||||
private VxInterviewRecordMapper vxInterviewRecordMapper;
|
||||
@Autowired
|
||||
private VxInterviewNoticeMapper vxInterviewNoticeMapper;
|
||||
@Autowired
|
||||
private JobMapper jobMapper;
|
||||
@Autowired
|
||||
private CompanyMapper companyMapper;
|
||||
@Override
|
||||
public List<VxInterviewRecordDto> getInterviewRecordList(Integer userId,Integer noticeId) {
|
||||
LambdaQueryWrapper<VxInterviewRecord> queryWrapper=new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(VxInterviewRecord::getCreateUser,userId);
|
||||
List<VxInterviewRecord> vxInterviewRecords = vxInterviewRecordMapper.selectList(queryWrapper);
|
||||
List<VxInterviewRecordDto> vxInterviewRecordDtos=vxInterviewRecords.stream().map(item->{
|
||||
//根据面试通知id查找面试通知表中的jod_id
|
||||
LambdaQueryWrapper<VxInterviewNotice> queryWrapper1=new LambdaQueryWrapper<>();
|
||||
queryWrapper1.eq(VxInterviewNotice::getId,noticeId);
|
||||
VxInterviewNotice vxInterviewNotice = vxInterviewNoticeMapper.selectOne(queryWrapper1);
|
||||
Integer jobId = vxInterviewNotice.getJobId();
|
||||
//根据岗位id查岗位名称
|
||||
LambdaQueryWrapper<JobEntity> queryWrapper2=new LambdaQueryWrapper<>();
|
||||
queryWrapper2.eq(JobEntity::getId,jobId);
|
||||
JobEntity jobEntity = jobMapper.selectOne(queryWrapper2);
|
||||
String jobName = jobEntity.getJobName();
|
||||
VxInterviewRecordDto vxInterviewRecordDto=new VxInterviewRecordDto();
|
||||
|
||||
BeanUtils.copyProperties(item,vxInterviewRecordDto);
|
||||
|
||||
//获取岗位名称
|
||||
vxInterviewRecordDto.setJob(jobName);
|
||||
//获取面试时间
|
||||
vxInterviewRecordDto.setInterviewTime(vxInterviewRecordDto.getCreateTime());
|
||||
//获取面试公司id
|
||||
LambdaQueryWrapper<Company> companyLambdaQueryWrapper=new LambdaQueryWrapper<>();
|
||||
companyLambdaQueryWrapper.eq(Company::getEncoding,vxInterviewRecordDto.getInterviewCompanyId());
|
||||
Company company = companyMapper.selectOne(companyLambdaQueryWrapper);
|
||||
vxInterviewRecordDto.setInterviewCompanyId(company.getEncoding());
|
||||
//获取公司名称
|
||||
vxInterviewRecordDto.setCompanyName(company.getCompanyName());
|
||||
//获取公司logo
|
||||
vxInterviewRecordDto.setCompanyLogoUrl(company.getCompanyLogo());
|
||||
//获取面试结果
|
||||
vxInterviewRecordDto.setResult(vxInterviewRecordDto.getResult());
|
||||
return vxInterviewRecordDto;
|
||||
}).collect(Collectors.toList());
|
||||
return vxInterviewRecordDtos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<VxInterviewRecordDto> searchInterviewRecordList(String searchCompany,Integer noticeId) {
|
||||
LambdaQueryWrapper<VxInterviewRecord> queryWrapper=new LambdaQueryWrapper<>();
|
||||
queryWrapper.like(VxInterviewRecord::getCompanyEncoding,searchCompany);
|
||||
List<VxInterviewRecord> vxInterviewRecords = vxInterviewRecordMapper.selectList(queryWrapper);
|
||||
List<VxInterviewRecordDto> vxInterviewRecordDtos=vxInterviewRecords.stream().map(item->{
|
||||
//根据面试通知id查找面试通知表中的jod_id
|
||||
LambdaQueryWrapper<VxInterviewNotice> queryWrapper1=new LambdaQueryWrapper<>();
|
||||
queryWrapper1.eq(VxInterviewNotice::getId,noticeId);
|
||||
VxInterviewNotice vxInterviewNotice = vxInterviewNoticeMapper.selectOne(queryWrapper1);
|
||||
Integer jobId = vxInterviewNotice.getJobId();
|
||||
//根据岗位id查岗位名称
|
||||
LambdaQueryWrapper<JobEntity> queryWrapper2=new LambdaQueryWrapper<>();
|
||||
queryWrapper2.eq(JobEntity::getId,jobId);
|
||||
JobEntity jobEntity = jobMapper.selectOne(queryWrapper2);
|
||||
String jobName = jobEntity.getJobName();
|
||||
VxInterviewRecordDto vxInterviewRecordDto=new VxInterviewRecordDto();
|
||||
|
||||
BeanUtils.copyProperties(item,vxInterviewRecordDto);
|
||||
|
||||
//获取岗位名称
|
||||
vxInterviewRecordDto.setJob(jobName);
|
||||
//获取面试时间
|
||||
vxInterviewRecordDto.setInterviewTime(vxInterviewRecordDto.getCreateTime());
|
||||
//获取面试公司id
|
||||
LambdaQueryWrapper<Company> companyLambdaQueryWrapper=new LambdaQueryWrapper<>();
|
||||
companyLambdaQueryWrapper.eq(Company::getEncoding,vxInterviewRecordDto.getInterviewCompanyId());
|
||||
Company company = companyMapper.selectOne(companyLambdaQueryWrapper);
|
||||
vxInterviewRecordDto.setInterviewCompanyId(company.getEncoding());
|
||||
//获取公司名称
|
||||
vxInterviewRecordDto.setCompanyName(company.getCompanyName());
|
||||
//获取公司logo
|
||||
vxInterviewRecordDto.setCompanyLogoUrl(company.getCompanyLogo());
|
||||
//获取面试结果
|
||||
vxInterviewRecordDto.setResult(vxInterviewRecordDto.getResult());
|
||||
return vxInterviewRecordDto;
|
||||
}).collect(Collectors.toList());
|
||||
return vxInterviewRecordDtos;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue