Commit 3806e44c authored by hongguangwu's avatar hongguangwu

MVP1.7.18-优化

parent 552ed67a
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @Author fxj
......@@ -38,4 +42,19 @@ public class UpdateEmpVo implements Serializable {
**/
private String createName;
private String createBy;
@Schema(description = "是否大专及以上(0否1是)")
private Integer isCollege;
@Schema(description = "最高学历(字典值)")
private String hignEducation;
@Schema(description = "学校")
private String school;
@Schema(description = "专业")
private String major;
@Schema(description = "毕业时间")
private Date gradutionDate;
}
......@@ -1597,7 +1597,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
sf.setEmpIdcard(insert.getEmpIdcard());
sf.setSettleDomain(insert.getSettleDomain());
if (!("合同未到期重新签订").equals(insert.getSituation())&&!("正常续签").equals(insert.getSituation())
&&!("离职再入职").equals(insert.getSituation()) &&!("商务合同更改").equals(insert.getSituation())) {
&&!("离职再入职").equals(insert.getSituation()) &&!("商务合同更改").equals(insert.getSituation())
&&!("正常签订").equals(insert.getSituation())) {
R<Integer> socialFundR = HttpDaprUtil.invokeMethodPost(socialProperties.getAppUrl(), socialProperties.getAppId()
, "/tsocialfundinfo/inner/selectSocialFoundByContract", sf, Integer.class, SecurityConstants.FROM_IN);
if (socialFundR != null && socialFundR.getData() != null && socialFundR.getData() > 0) {
......
......@@ -301,21 +301,7 @@ public class ArchivesDaprUtil {
* @Param type 0 审核通过 1 审核不通过
* @return
**/
public R<Boolean> updateEmpInfo(String empIdCard,String contactAddress, String projectNo, String contractId,String type,String remarkTemp, YifuUser user){
if (Common.isEmpty(empIdCard)
|| Common.isEmpty(projectNo)
|| Common.isEmpty(type)){
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
UpdateEmpVo vo = new UpdateEmpVo();
vo.setEmpIdCard(empIdCard);
vo.setProjectNo(projectNo);
vo.setContractId(contractId);
vo.setRemarkTemp(remarkTemp);
vo.setType(type);
vo.setCreateBy(user.getId());
vo.setCreateName(user.getNickname());
vo.setContactAddress(contactAddress);
public R<Boolean> updateEmpInfo(UpdateEmpVo vo) {
R<Boolean> res = HttpDaprUtil.invokeMethodPost(
daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId()
,"/temployeeinfo/inner/updateEmpInfo" , JSON.toJSONString(vo), Boolean.class, SecurityConstants.FROM_IN);
......
......@@ -3721,6 +3721,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 是否自动化办理,true:推送到社保士兵
boolean isAuto;
AutoFlagVo autoFlagVo;
// 同步更新档案等信息
UpdateEmpVo updateEmpVo;
for (TDispatchInfo dis : dispatchs) {
autoFlagVo = autoFlagMap.get(dis.getId());
if (autoFlagVo == null) {
......@@ -4056,11 +4058,30 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 派增审核通过 要更新 人员档案 项目档案 合同的状态信息
if (CommonConstants.dingleDigitStrArray[0].equals(dis.getType())) {
R<Boolean> res = null;
updateEmpVo = new UpdateEmpVo();
updateEmpVo.setEmpIdCard(dis.getEmpIdcard());
updateEmpVo.setProjectNo(dis.getSettleDomainCode());
updateEmpVo.setContractId(dis.getContractId());
updateEmpVo.setRemarkTemp(remarkTemp);
updateEmpVo.setCreateBy(user.getId());
updateEmpVo.setCreateName(user.getNickname());
if (CommonConstants.ZERO_INT == flag && !isSSC) {
res = archivesDaprUtil.updateEmpInfo(dis.getEmpIdcard(), dis.getContactAddress(), dis.getSettleDomainCode(), dis.getContractId(), CommonConstants.ZERO_STRING, remarkTemp, user);
// 审核通过同步到档案
updateEmpVo.setIsCollege(getIsCollege(dis.getEducationName()));
updateEmpVo.setHignEducation(getHignEducationValue(dis.getEducationName()));
updateEmpVo.setSchool(dis.getSchoolName());
updateEmpVo.setMajor(dis.getMajor());
updateEmpVo.setGradutionDate(dis.getGraduationTime());
updateEmpVo.setContactAddress(dis.getContactAddress());
updateEmpVo.setType(CommonConstants.ZERO_STRING);
res = archivesDaprUtil.updateEmpInfo(updateEmpVo);
}
if (CommonConstants.ONE_INT == flag) {
res = archivesDaprUtil.updateEmpInfo(dis.getEmpIdcard(), null, dis.getSettleDomainCode(), dis.getContractId(), CommonConstants.ONE_STRING, remarkTemp, user);
updateEmpVo.setType(CommonConstants.ONE_STRING);
res = archivesDaprUtil.updateEmpInfo(updateEmpVo);
}
if ((Common.isEmpty(res) || CommonConstants.SUCCESS != res.getCode()) && !isSSC) {
ServiceUtil.runTimeExceptionDiy("更新人员档案、项目档案、合同状态异常:" + (Common.isNotNull(res) ? res.getMsg() : CommonConstants.EMPTY_STRING));
......@@ -4213,6 +4234,45 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return errorList;
}
private String getHignEducationValue(String educationName) {
String educationNameValue;
if (educationName.equals("文盲")) {
educationNameValue = "1";
}else if (educationName.equals("小学")) {
educationNameValue = "2";
}else if (educationName.equals("初中")) {
educationNameValue = "3";
}else if (educationName.equals("高中")) {
educationNameValue = "4";
}else if (educationName.equals("大专")) {
educationNameValue = "5";
}else if (educationName.equals("本科")) {
educationNameValue = "6";
}else if (educationName.equals("硕士")) {
educationNameValue = "7";
}else if (educationName.equals("博士")) {
educationNameValue = "8";
}else if (educationName.equals("技工")) {
educationNameValue = "9";
}else if (educationName.equals("职高")) {
educationNameValue = "10";
}else if (educationName.equals("中专")) {
educationNameValue = "11";
}else {
educationNameValue = null;
}
return educationNameValue;
}
// 获取是否大专及以上
private Integer getIsCollege(String educationName) {
Integer isCollegeValue = CommonConstants.ZERO_INT;
if (educationName.equals("大专") || educationName.equals("本科") || educationName.equals("硕士") || educationName.equals("博士")) {
isCollegeValue = CommonConstants.ONE_INT;
}
return isCollegeValue;
}
// type 1社保,2医保
private Map<String, AutoFlagVo> getAutoFlagMap(List<String> idsList) {
Map<String, AutoFlagVo> autoFlagMap = new HashMap<>();
......
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