Commit 1339f2c5 by 284718418@qq.com

招聘管理

parent 6422bffd
...@@ -257,6 +257,21 @@ public class ZpglRcxx extends Model<ZpglRcxx> { ...@@ -257,6 +257,21 @@ public class ZpglRcxx extends Model<ZpglRcxx> {
*/ */
@ApiModelProperty(value = "最近工作单位") @ApiModelProperty(value = "最近工作单位")
private String company; private String company;
/**
* 最近职位
*/
@ApiModelProperty(value = "最近职位")
private String zjzw;
/**
* 参加工作时间
*/
@ApiModelProperty(value = "参加工作时间")
private Date workBeginYear;
/** /**
* 标签 * 标签
*/ */
......
...@@ -4,6 +4,7 @@ import cn.timer.api.aspect.lang.annotation.Log; ...@@ -4,6 +4,7 @@ import cn.timer.api.aspect.lang.annotation.Log;
import cn.timer.api.aspect.lang.enums.BusinessType; import cn.timer.api.aspect.lang.enums.BusinessType;
import cn.timer.api.bean.zpgl.*; import cn.timer.api.bean.zpgl.*;
import cn.timer.api.dto.zpgl.InterviewApplicationDto; import cn.timer.api.dto.zpgl.InterviewApplicationDto;
import cn.timer.api.utils.DateFormatUtils;
import cn.timer.api.utils.Result; import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil; import cn.timer.api.utils.ResultUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...@@ -11,10 +12,12 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; ...@@ -11,10 +12,12 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.util.StringUtils;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.transaction.Transactional; import javax.transaction.Transactional;
import java.util.Date;
import java.util.List; import java.util.List;
@Api(tags = "招聘管理") @Api(tags = "招聘管理")
...@@ -36,6 +39,10 @@ public class ZpglH5Controller { ...@@ -36,6 +39,10 @@ public class ZpglH5Controller {
ZpglRcxx zpglRcxx = new ZpglRcxx(); ZpglRcxx zpglRcxx = new ZpglRcxx();
//复制到 ZpglRcxx 实体对象 //复制到 ZpglRcxx 实体对象
BeanUtils.copyProperties(dto,zpglRcxx); BeanUtils.copyProperties(dto,zpglRcxx);
// 计算工作年限
if(!StringUtils.isEmpty(zpglRcxx.getWorkBeginYear())){
zpglRcxx.setWorkyears(DateFormatUtils.yearCompare(zpglRcxx.getWorkBeginYear(),new Date()));
}
zpglRcxx.insertOrUpdate(); zpglRcxx.insertOrUpdate();
//添加紧急联系人 //添加紧急联系人
......
...@@ -34,8 +34,8 @@ public class ZpglSendMessageThread implements Runnable { ...@@ -34,8 +34,8 @@ public class ZpglSendMessageThread implements Runnable {
zpglRcxxOffer.getGangwei(), zpglRcxxOffer.getGangwei(),
DateFormatUtils.tranDate(zpglRcxxOffer.getRzTime(), DateFormatUtils.YYYYMMDD), DateFormatUtils.tranDate(zpglRcxxOffer.getRzTime(), DateFormatUtils.YYYYMMDD),
zpglRcxxOffer.getLinkName(), zpglRcxxOffer.getLinkName(),
StringUtils.isEmpty(zpglRcxxOffer.getLinkEmail()) ? "" : zpglRcxxOffer.getLinkEmail(), StringUtils.isEmpty(zpglRcxxOffer.getLinkPhone()) ? "" : zpglRcxxOffer.getLinkPhone(),
StringUtils.isEmpty(zpglRcxxOffer.getLinkPhone()) ? "" : zpglRcxxOffer.getLinkPhone()}), StringUtils.isEmpty(zpglRcxxOffer.getLinkEmail()) ? "" : zpglRcxxOffer.getLinkEmail()}),
zpglRcxxOffer.getTitle(), zpglRcxxOffer.getTitle(),
new String[]{zpglRcxxOffer.getReceiverEmail()}); new String[]{zpglRcxxOffer.getReceiverEmail()});
SendMessage sendMessage = SendMessage.builder().build(); SendMessage sendMessage = SendMessage.builder().build();
......
...@@ -131,6 +131,7 @@ public class ZpglServiceImpl implements ZpglService { ...@@ -131,6 +131,7 @@ public class ZpglServiceImpl implements ZpglService {
userBean.getQyzxEmpLogin().getUsername()}); userBean.getQyzxEmpLogin().getUsername()});
//发送offer //发送offer
ZpglRcxxOffer zpglRcxxOffer = this.insertZpglRcxxOffer(userBean,zpglRcxxDto); ZpglRcxxOffer zpglRcxxOffer = this.insertZpglRcxxOffer(userBean,zpglRcxxDto);
zpglRcxxOffer.setReceiverEmail(zpglRcxxEntity.getMail());
Thread pthread=new Thread(new ZpglSendMessageThread(mailSender, zpglRcxxOffer)); Thread pthread=new Thread(new ZpglSendMessageThread(mailSender, zpglRcxxOffer));
pthread.start(); pthread.start();
break; break;
......
...@@ -16,6 +16,7 @@ import javax.persistence.GeneratedValue; ...@@ -16,6 +16,7 @@ import javax.persistence.GeneratedValue;
import javax.persistence.Id; import javax.persistence.Id;
import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotEmpty;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
import java.util.List; import java.util.List;
@Data @Data
...@@ -178,6 +179,30 @@ public class InterviewApplicationDto implements Serializable { ...@@ -178,6 +179,30 @@ public class InterviewApplicationDto implements Serializable {
private String medicalDetail; private String medicalDetail;
/** /**
* 最近工作单位
*/
@ApiModelProperty(value = "最近工作单位")
private String company;
/**
* 毕业院校
*/
@ApiModelProperty(value = "毕业院校")
private String universitie;
/**
* 最近职位
*/
@ApiModelProperty(value = "最近职位")
private String zjzw;
/**
* 参加工作时间
*/
@ApiModelProperty(value = "参加工作时间")
private Date workBeginYear;
/**
* 待遇要求(税前)单位元/月 * 待遇要求(税前)单位元/月
*/ */
@ApiModelProperty(value = "待遇要求(税前)单位元/月") @ApiModelProperty(value = "待遇要求(税前)单位元/月")
......
...@@ -512,8 +512,25 @@ public class DateFormatUtils { ...@@ -512,8 +512,25 @@ public class DateFormatUtils {
return resultString.toString(); return resultString.toString();
} }
/**
* 计算2个日期之间相差的 年
* @param fromDate
* @param toDate
* @return
*/
public static int yearCompare(Date fromDate,Date toDate){
Calendar from = Calendar.getInstance();
from.setTime(fromDate);
Calendar to = Calendar.getInstance();
to.setTime(toDate);
int fromYear = from.get(Calendar.YEAR);
int toYear = to.get(Calendar.YEAR);
int year = toYear - fromYear;
return year;
}
public static void main(String[] args) throws ParseException { public static void main(String[] args) throws ParseException {
System.out.println(tranDate(new Date(),YYYYMMDD)); System.out.println(yearCompare(getDateByString("2000-1-1 00:00:00"),new Date()));
} }
} }
\ No newline at end of file
...@@ -49,6 +49,8 @@ ...@@ -49,6 +49,8 @@
<result property="highesteducation" column="highesteducation"/> <result property="highesteducation" column="highesteducation"/>
<result property="universitie" column="universitie"/> <result property="universitie" column="universitie"/>
<result property="company" column="company"/> <result property="company" column="company"/>
<result property="zjzw" column="zjzw"/>
<result property="workBeginYear" column="work_begin_year"/>
<result property="label" column="label"/> <result property="label" column="label"/>
<result property="status" column="status"/> <result property="status" column="status"/>
<result property="zpglFailId" column="zpgl_fail_id"/> <result property="zpglFailId" column="zpgl_fail_id"/>
......
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