Commit 8b594bf0 by 龙于生

修改招聘h5接口

parent 9589ce2c
......@@ -31,23 +31,23 @@ public class ZpglH5Controller {
@RequestMapping("/add_interview_application")
@ApiOperation(value = "添加面试申请", httpMethod = "POST", notes = "添加面试申请")
@Log(title = "addInterviewApplication", businessType = BusinessType.INSERT_UPDATE)
public Result<Object> addInterviewApplication(@Validated @RequestBody InterviewApplicationDto interviewApplicationDto) {
System.out.println(interviewApplicationDto);
public Result<Object> addInterviewApplication(@Validated @RequestBody InterviewApplicationDto dto) {
System.out.println(dto);
ZpglRcxx zpglRcxx = new ZpglRcxx();
//复制到 ZpglRcxx 实体对象
BeanUtils.copyProperties(interviewApplicationDto,zpglRcxx);
BeanUtils.copyProperties(dto,zpglRcxx);
zpglRcxx.insertOrUpdate();
//添加紧急联系人
if(interviewApplicationDto.getZpglRcxxLxxxb() != null){
ZpglRcxxLxxxb zpglRcxxLxxxb = interviewApplicationDto.getZpglRcxxLxxxb();
if(dto.getZpglRcxxLxxxb() != null){
ZpglRcxxLxxxb zpglRcxxLxxxb = dto.getZpglRcxxLxxxb();
zpglRcxxLxxxb.setZpglRcxxId(zpglRcxx.getId());
zpglRcxxLxxxb.insertOrUpdate();
}
//新增/修改工作经验
if(interviewApplicationDto.getZpglRcxxExperience().size()>0){
List<ZpglRcxxExperience> experiences = interviewApplicationDto.getZpglRcxxExperience();
if(dto.getZpglRcxxExperience() !=null && dto.getZpglRcxxExperience().size()>0){
List<ZpglRcxxExperience> experiences = dto.getZpglRcxxExperience();
for(ZpglRcxxExperience experience : experiences){
if(experience.getCompany() != null){
experience.setZpglRcxxId(zpglRcxx.getId());
......@@ -57,8 +57,8 @@ public class ZpglH5Controller {
}
//新增/修改教育经历
if(interviewApplicationDto.getZpglRcxxStudy().size()>0){
List<ZpglRcxxStudy> zpglRcxxStudys = interviewApplicationDto.getZpglRcxxStudy();
if(dto.getZpglRcxxStudy() !=null && dto.getZpglRcxxStudy().size()>0){
List<ZpglRcxxStudy> zpglRcxxStudys = dto.getZpglRcxxStudy();
for(ZpglRcxxStudy study : zpglRcxxStudys){
if(study.getSchoolName() != null){
study.setZpglRcxxId(zpglRcxx.getId());
......@@ -67,8 +67,8 @@ public class ZpglH5Controller {
}
}
//新增/修改家庭资料
if(interviewApplicationDto.getZpglRcxxJtzls().size()>0){
List<ZpglRcxxJtzl> zpglRcxxJtzls = interviewApplicationDto.getZpglRcxxJtzls();
if(dto.getZpglRcxxJtzls() !=null && dto.getZpglRcxxJtzls().size()>0){
List<ZpglRcxxJtzl> zpglRcxxJtzls = dto.getZpglRcxxJtzls();
for(ZpglRcxxJtzl jtzl : zpglRcxxJtzls){
if(jtzl.getName() != null){
jtzl.setZpglRcxxId(zpglRcxx.getId());
......@@ -110,24 +110,30 @@ public class ZpglH5Controller {
List<ZpglRcxxLxxxb> zpglRcxxLxxxbs = ZpglRcxxLxxxb.builder().build().selectList(new QueryWrapper<ZpglRcxxLxxxb>()
.lambda().select(ZpglRcxxLxxxb::getId,ZpglRcxxLxxxb::getLinkName,ZpglRcxxLxxxb::getLinkMobile)
.eq(ZpglRcxxLxxxb::getZpglRcxxId, zpglRcxx.getId()));
if(zpglRcxxLxxxbs.size()>0)
dto.setZpglRcxxLxxxb(zpglRcxxLxxxbs.get(0));
//工作经验
List<ZpglRcxxExperience> experiences = ZpglRcxxExperience.builder().build()
.selectList(new QueryWrapper<ZpglRcxxExperience>()
.lambda().eq(ZpglRcxxExperience::getZpglRcxxId, zpglRcxx.getId()));
if (experiences.size()>0)
dto.setZpglRcxxExperience(experiences);
//教育经历
List<ZpglRcxxStudy> study = ZpglRcxxStudy.builder().build()
.selectList(new QueryWrapper<ZpglRcxxStudy>()
.lambda().eq(ZpglRcxxStudy::getZpglRcxxId, zpglRcxx.getId()));
if (study.size()>0)
dto.setZpglRcxxStudy(study);
//家庭资料
List<ZpglRcxxJtzl> jtzl = ZpglRcxxJtzl.builder().build()
.selectList(new QueryWrapper<ZpglRcxxJtzl>()
.lambda().eq(ZpglRcxxJtzl::getZpglRcxxId, zpglRcxx.getId()));
if (jtzl.size()>0)
dto.setZpglRcxxJtzls(jtzl);
return ResultUtil.data(dto,"查询成功");
......
......@@ -131,6 +131,13 @@ public class InterviewApplicationDto implements Serializable {
*/
@ApiModelProperty(value = "详细地址")
private String address;
/**
* 现居住地详址
*/
@ApiModelProperty(value = "现居住地详址")
private String grAddress;
/**
* 是否结婚:0否,1是
*/
......
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