Commit 05079e7d by 284718418@qq.com

1.修改BUG

parent 721e9535
......@@ -44,6 +44,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpEntity;
......@@ -310,6 +311,8 @@ public class ZpglController {
ygglMainEmp.setZzTime(ClockInTool.strToDateLong(zztime));
}
// 人才信息同步至员工档案
this.copyToYgglMainEmp(zpglRcxx,ygglMainEmp);
ygglMainEmp.insert();
......@@ -329,7 +332,7 @@ public class ZpglController {
* 添加面试流程记录
* 维护微信公众平台表
*/
zpglService.updateZpglOther(userBean, zpglRcxxDto, ygglMainEmp.getEmpNum());
zpglService.updateZpglOther(userBean, zpglRcxxDto, ygglMainEmp.getId());
try {
realtimeupdate.AttendanceTask(userBean.getOrgCode(), ygglMainEmp.getEmpNum(), 2, null);
} catch (ParseException e) {
......@@ -602,12 +605,12 @@ public class ZpglController {
if (APPLY_STATUS == status.intValue()) {
interviewNotice.setContentNotice(ZpglMessageTemplate.TO_APPLY);
interviewNotice.setContentStr(ZpglMessageTemplate.print(ZpglMessageTemplate.THANKS, new String[]{zpglRcxx.getName(),interviewNotice.getZpglZwxxName()}));
interviewNotice.setUrl(h5Url + "?mobile=" + zpglRcxx.getMobile() + "&orgId=" + userBean.getOrgCode() + "#/basicInfo");
interviewNotice.setUrl(h5Url + "?zpglRcxxId="+zpglRcxx.getId()+"&mobile=" + zpglRcxx.getMobile() + "&orgId=" + userBean.getOrgCode() + "#/basicInfo");
// 发送FPA测评消息
} else {
interviewNotice.setContentNotice(ZpglMessageTemplate.TO_CEPIN);
interviewNotice.setContentStr(ZpglMessageTemplate.print(ZpglMessageTemplate.THANKS, new String[]{zpglRcxx.getName(),interviewNotice.getZpglZwxxName()}));
interviewNotice.setUrl(h5Url + "/?zpglRcxxId=" + zpglRcxx.getId() + "#/cpxt");
interviewNotice.setUrl(h5Url + "/?zpglRcxxId=" + zpglRcxx.getId()+ "&orgId=" + userBean.getOrgCode() + "#/cpxt");
}
log.info("TO_INTERVIEWEE sendApplyOrCePin MessageQueue info:{}", zpglWxgzptService.sendApplyOrCePin(interviewNotice));
return ResultUtil.success();
......@@ -708,4 +711,62 @@ public class ZpglController {
return ZpglRcxx.builder().build().selectCount(queryWrapper.lambda().eq(ZpglRcxx::getStatus, status));
}
/**
* 人才信息同步至员工档案
* @param source
* @param target
*/
private void copyToYgglMainEmp(ZpglRcxx source,YgglMainEmp target){
if(!StringUtils.isEmpty(source.getMail())){
target.setWorkEmail(source.getMail());
}
if(!StringUtils.isEmpty(source.getDatebirth())){
target.setBirthday(source.getDatebirth());
}
if(!StringUtils.isEmpty(source.getBmgwId())){
target.setBmgwId(source.getBmgwId());
}
if(!StringUtils.isEmpty(source.getProvinceId())){
target.setProvinceId(source.getProvinceId());
}
if(!StringUtils.isEmpty(source.getProvince())){
target.setProvince(source.getProvince());
}
if(!StringUtils.isEmpty(source.getDistrictId())){
target.setDistrictId(source.getDistrictId());
}
if(!StringUtils.isEmpty(source.getDistrict())){
target.setDistrict(source.getDistrict());
}
if(!StringUtils.isEmpty(source.getCityId())){
target.setCityId(source.getCityId());
}
if(!StringUtils.isEmpty(source.getCity())){
target.setCityId(source.getCity());
}
if(!StringUtils.isEmpty(source.getAddress())){
}
if(!StringUtils.isEmpty(source.getHighesteducation())){
target.setEdu(Integer.parseInt(source.getHighesteducation()));
}
if(!StringUtils.isEmpty(source.getSex())){
target.setSex(source.getSex());
}
if(!StringUtils.isEmpty(source.getZpglCompanyId())){
target.setZpglCompanyId(source.getZpglCompanyId());
}
if(!StringUtils.isEmpty(source.getZpglZjId())){
target.setZpglZjId(source.getZpglZjId());
}
if(!StringUtils.isEmpty(source.getZpglGzddId())){
target.setZpglGzddId(source.getZpglGzddId());
}
if(!StringUtils.isEmpty(source.getWeixin())){
target.setWechat(source.getWeixin());
}
}
}
......@@ -62,5 +62,5 @@ public interface ZpglService {
* @param zpglRcxxDto
* @return
*/
boolean updateZpglOther(UserBean userBean, ZpglRcxxDto zpglRcxxDto,Integer userId);
boolean updateZpglOther(UserBean userBean, ZpglRcxxDto zpglRcxxDto,Integer ygglMainEmpId);
}
......@@ -343,7 +343,7 @@ public class ZpglServiceImpl implements ZpglService {
}
@Override
public boolean updateZpglOther(UserBean userBean, ZpglRcxxDto zpglRcxxDto,Integer userId) {
public boolean updateZpglOther(UserBean userBean, ZpglRcxxDto zpglRcxxDto,Integer ygglMainEmpId) {
// 招聘-变更人才信息状态
// 添加面试流程记录
this.updateZpglRcxx(userBean,zpglRcxxDto);
......@@ -358,18 +358,19 @@ public class ZpglServiceImpl implements ZpglService {
if(!StringUtils.isEmpty(zpglRcxx) && !StringUtils.isEmpty(zpglRcxx.getMobile())){
ZpglWxgzptEmpRcxx zpglWxgzptEmpRcxx = ZpglWxgzptEmpRcxx.builder().build().selectOne(
new QueryWrapper<ZpglWxgzptEmpRcxx>().select("id","zpgl_rcxx_id").lambda().eq(ZpglWxgzptEmpRcxx::getMobile,zpglRcxx.getMobile())
.eq(ZpglWxgzptEmpRcxx::getDeleteFlag,0)
);
if(!StringUtils.isEmpty(zpglWxgzptEmpRcxx) && (StringUtils.isEmpty(zpglWxgzptEmpRcxx.getZpglRcxxId()) || zpglWxgzptEmpRcxx.getZpglRcxxId() <= 0)){
zpglWxgzptEmpRcxx.setOrgCode(userBean.getOrgCode());
zpglWxgzptEmpRcxx.setZpglRcxxId(zpglRcxx.getId());
zpglWxgzptEmpRcxx.setYgglMainEmpId(userId);
zpglWxgzptEmpRcxx.setYgglMainEmpId(ygglMainEmpId);
zpglWxgzptEmpRcxx.updateById();
}
if(StringUtils.isEmpty(zpglWxgzptEmpRcxx)){
zpglWxgzptEmpRcxx = new ZpglWxgzptEmpRcxx();
zpglWxgzptEmpRcxx.setOrgCode(userBean.getOrgCode());
zpglWxgzptEmpRcxx.setZpglRcxxId(zpglRcxx.getId());
zpglWxgzptEmpRcxx.setYgglMainEmpId(userId);
zpglWxgzptEmpRcxx.setYgglMainEmpId(ygglMainEmpId);
zpglWxgzptEmpRcxx.setMobile(zpglRcxx.getMobile());
zpglWxgzptEmpRcxx.insert();
}
......
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