Commit b244adf3 authored by fangxinjiang's avatar fangxinjiang

派单调整

parent eef55806
...@@ -285,15 +285,16 @@ public class TEmployeeProject extends BaseEntity { ...@@ -285,15 +285,16 @@ public class TEmployeeProject extends BaseEntity {
private Integer insuranceStatus; private Integer insuranceStatus;
/** /**
* 社保状态(字典) * 社保状态(字典): 0 无社保 1 处理中 2.部分购买 3.正常 4.已派减
*/ */
@Schema(description = "社保状态(字典)") @Schema(description = "社保状态(字典): 0 无社保 1 处理中 2.部分购买 3.正常 4.已派减")
private Integer socialStatus; private Integer socialStatus;
/** /**
* 公积金状态(字典) * 公积金状态(字典)
*/ */
@Schema(description = "公积金状态(字典)") @Schema(description = "公积金状态(字典): 0 无公积金 1 处理中 2.部分购买 3.正常 4.已派减")
private Integer fundStatus; private Integer fundStatus;
/** /**
......
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @Author fxj
* @Date 2022/8/5
* @Description
* @Version 1.0
*/
@Data
public class UpProjectSocialFundVo implements Serializable {
// 社保状态
String socialStatus;
// 公积金状态
String fundStatus;
// 项目编码
String departNo;
// 身份证
String empIdCard;
}
...@@ -24,6 +24,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject; ...@@ -24,6 +24,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService; import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpDispatchAddVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmpDispatchAddVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.UpdateEmpVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
...@@ -291,4 +293,16 @@ public class TEmployeeProjectController { ...@@ -291,4 +293,16 @@ public class TEmployeeProjectController {
public TEmployeeProject getByEmpIdAndDeptId(@RequestBody TEmployeeProject employeeProject) { public TEmployeeProject getByEmpIdAndDeptId(@RequestBody TEmployeeProject employeeProject) {
return tEmployeeProjectService.getByEmpIdAndDeptId(employeeProject.getEmpId(), employeeProject.getDeptId()); return tEmployeeProjectService.getByEmpIdAndDeptId(employeeProject.getEmpId(), employeeProject.getDeptId());
} }
/**
* @Description: 更新社保公积金状态
* @Author: fxj
* @Date: 2022/08/01 18:52
**/
@Operation(summary = "更新社保公积金状态", description = "更新社保公积金状态")
@Inner
@PostMapping("/inner/updateProjectSocialFund")
public Boolean updateProjectSocialFund(@RequestBody UpProjectSocialFundVo vo) {
return tEmployeeProjectService.updateProjectSocialFund(vo);
}
} }
...@@ -97,6 +97,8 @@ public interface TEmployeeContractInfoService extends IService<TEmployeeContract ...@@ -97,6 +97,8 @@ public interface TEmployeeContractInfoService extends IService<TEmployeeContract
String getCode(boolean isNew); String getCode(boolean isNew);
boolean updateInUseStatusById(String empId, String deptId, String ContractId);
/** /**
* @param tEmployeeContractInfo * @param tEmployeeContractInfo
* @Description: 审核 * @Description: 审核
......
...@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo; ...@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject; import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeXProjectVO; import com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeXProjectVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.UpProjectSocialFundVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage; import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
...@@ -190,4 +191,6 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> { ...@@ -190,4 +191,6 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
//获取员工编码 //获取员工编码
String getEmpNo(String deptNo); String getEmpNo(String deptNo);
Boolean updateProjectSocialFund(UpProjectSocialFundVo vo);
} }
...@@ -405,7 +405,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -405,7 +405,10 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
employeeInfo.setContractStatus(CommonConstants.ONE_INT); employeeInfo.setContractStatus(CommonConstants.ONE_INT);
} }
} }
@Override
public boolean updateInUseStatusById(String empId,String deptId,String ContractId){
return baseMapper.updateInUseStatusById(empId, deptId, ContractId, CommonConstants.ONE_STRING) >0;
}
@Override @Override
public R<String> auditContract(TEmployeeContractInfo tEmployeeContractInfo) { public R<String> auditContract(TEmployeeContractInfo tEmployeeContractInfo) {
if (tEmployeeContractInfo != null) { if (tEmployeeContractInfo != null) {
......
...@@ -2094,9 +2094,11 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2094,9 +2094,11 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
@Override @Override
public Boolean updateEmpInfo(UpdateEmpVo vo) { public Boolean updateEmpInfo(UpdateEmpVo vo) {
if (Common.isNotNull(vo)){ if (Common.isNotNull(vo)){
TEmployeeInfo employeeInfo;
TEmployeeProject p = null;
if (Common.isNotNull(vo.getEmpIdCard())){ if (Common.isNotNull(vo.getEmpIdCard())){
if (CommonConstants.ZERO_STRING.equals(vo.getType())){ if (CommonConstants.ZERO_STRING.equals(vo.getType())){
TEmployeeInfo employeeInfo = baseMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda() employeeInfo = baseMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getDeleteFlag,CommonConstants.ZERO_STRING) .eq(TEmployeeInfo::getDeleteFlag,CommonConstants.ZERO_STRING)
.eq(TEmployeeInfo::getEmpIdcard,vo.getEmpIdCard()) .eq(TEmployeeInfo::getEmpIdcard,vo.getEmpIdCard())
.eq(TEmployeeInfo::getStatus,CommonConstants.ZERO_INT) .eq(TEmployeeInfo::getStatus,CommonConstants.ZERO_INT)
...@@ -2107,7 +2109,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2107,7 +2109,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
} }
if (Common.isNotNull(vo.getProjectNo())){ if (Common.isNotNull(vo.getProjectNo())){
TEmployeeProject p = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda() p = tEmployeeProjectService.getOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.ZERO_INT) .eq(TEmployeeProject::getDeleteFlag,CommonConstants.ZERO_INT)
.eq(TEmployeeProject::getEmpIdcard,vo.getEmpIdCard()) .eq(TEmployeeProject::getEmpIdcard,vo.getEmpIdCard())
.eq(TEmployeeProject::getDeptNo,vo.getProjectNo()) .eq(TEmployeeProject::getDeptNo,vo.getProjectNo())
...@@ -2134,6 +2136,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T ...@@ -2134,6 +2136,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
c.setAuditStatus(CommonConstants.THREE_INT); c.setAuditStatus(CommonConstants.THREE_INT);
c.setInUse(CommonConstants.ONE_STRING); c.setInUse(CommonConstants.ONE_STRING);
} }
contractServicer.updateInUseStatusById(c.getEmpId(),c.getDeptNo(),c.getSettleDomain());
contractServicer.updateById(c); contractServicer.updateById(c);
} }
......
...@@ -1407,4 +1407,56 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -1407,4 +1407,56 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
} }
return false; return false;
} }
/**
* @Description: 更新社保公积金状态 : 0 无社保|无公积金 1 处理中 2.部分购买 3.正常 4.已派减
* 派增:
* 1、派单处社保或公积金状态为待审核、待办理、办理中,项目档案处社保或公积金状态为处理中1;
* 2、派单处社保或公积金状态为审核不通过或办理失败,项目档案处社保状态为无社保,公积金状态为无公积金0;
* 3、派单处社保状态为部分办理失败,项目档案处社保状态为部分购买 2
* 4、派单处社保或公积金状态为办理成功,项目档案处社保或公积金状态为正常 3
* 派减:
* 1、派减状态为待审核、待办理、审核不通过、办理失败,项目档案处社保或公积金状态不变;
* 2、派减状态为办理成功,项目档案处社保或公积金状态变为已派减 4
* 人员档案处社保或公积金状态根据身份证+项目进行整合:
* 社保状态优先级:正常>部分购买>处理中>已派减>无社保
* 公积金状态优先级:正常>处理中>已派减>无公积金
* @Author: fxj
* @Date: 2022/08/01 18:52
**/
@Override
public Boolean updateProjectSocialFund(UpProjectSocialFundVo vo) {
if (Common.isEmpty(vo) || Common.isEmpty(vo.getEmpIdCard()) || Common.isEmpty(vo.getDepartNo())){
return false;
}
TEmployeeInfo employee = tEmployeeInfoMapper.selectOne(Wrappers.<TEmployeeInfo>query().lambda()
.eq(TEmployeeInfo::getEmpIdcard,vo.getEmpIdCard())
.eq(TEmployeeInfo::getDeleteFlag,CommonConstants.ZERO_STRING).last(CommonConstants.LAST_ONE_SQL));
// : 0 无社保|无公积金 1 处理中 2.部分购买 3.正常 4.已派减
if (Common.isNotNull(employee)){
if (Common.isNotNull(vo.getSocialStatus())){
employee.setSocialStatus(Integer.parseInt(vo.getSocialStatus()));
}
if (Common.isNotNull(vo.getFundStatus())){
employee.setFundStatus(Integer.parseInt(vo.getFundStatus()));
}
tEmployeeInfoMapper.updateById(employee);
}
TEmployeeProject project = baseMapper.selectOne(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getDeptNo,vo.getDepartNo())
.eq(TEmployeeProject::getEmpIdcard,vo.getEmpIdCard())
.eq(TEmployeeProject::getDeleteFlag,CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
// : 0 无社保|无公积金 1 处理中 2.部分购买 3.正常 4.已派减
if (Common.isNotNull(project)){
if (Common.isNotNull(vo.getSocialStatus())){
project.setSocialStatus(Integer.parseInt(vo.getSocialStatus()));
}
if (Common.isNotNull(vo.getFundStatus())){
project.setFundStatus(Integer.parseInt(vo.getFundStatus()));
}
baseMapper.updateById(project);
}
return true;
}
} }
...@@ -205,4 +205,27 @@ public class ArchivesDaprUtil { ...@@ -205,4 +205,27 @@ public class ArchivesDaprUtil {
} }
return res; return res;
} }
/**
* @Author fxj
* @Description 更新项目档案和人员档案的社保公积金状态
* @Date 19:30 2022/8/1
* @Param type 0 审核通过 1 审核不通过
* @return
**/
public R<Boolean> updateProjectSocialFund(UpProjectSocialFundVo vo){
if (Common.isEmpty(vo.getEmpIdCard())
|| (Common.isEmpty(vo.getSocialStatus())
&& Common.isEmpty(vo.getFundStatus()))
|| Common.isEmpty(vo.getDepartNo())){
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
R<Boolean> res = HttpDaprUtil.invokeMethodPost(
daprArchivesProperties.getAppUrl(),daprArchivesProperties.getAppId()
,"/temployeeproject/inner/updateProjectSocialFund" , JSON.toJSONString(vo), Boolean.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("更新人员档案、项目档案社保公积金状态信息失败!");
}
return res;
}
} }
...@@ -217,7 +217,7 @@ ...@@ -217,7 +217,7 @@
</sql> </sql>
<sql id="tDispatchInfo_where"> <sql id="tDispatchInfo_where">
<if test="tDispatchInfo != null"> <if test="tDispatchInfo != null">
<if test="tDispatchInfo.idList != null"> <if test="tDispatchInfo.idList != null and tDispatchInfo.idList.size >0">
AND a.ID in AND a.ID in
<foreach item="idStr" index="index" collection="tDispatchInfo.idList" open="(" separator="," close=")"> <foreach item="idStr" index="index" collection="tDispatchInfo.idList" open="(" separator="," close=")">
#{idStr} #{idStr}
...@@ -662,7 +662,7 @@ ...@@ -662,7 +662,7 @@
left join t_social_info b on a.SOCIAL_ID = b.id left join t_social_info b on a.SOCIAL_ID = b.id
<where> <where>
1=1 and b.DELETE_FLAG = 0 1=1 and b.DELETE_FLAG = 0
<if test="idsStr != null"> <if test="idsStr != null and idsStr.size > 0">
AND a.ID in AND a.ID in
<foreach item="items" index="index" collection="idsStr" open="(" separator="," close=")"> <foreach item="items" index="index" collection="idsStr" open="(" separator="," close=")">
#{items} #{items}
...@@ -764,7 +764,7 @@ ...@@ -764,7 +764,7 @@
left join t_provident_fund c on a.FUND_ID = c.id left join t_provident_fund c on a.FUND_ID = c.id
<where> <where>
1=1 and a.DELETE_FLAG = 0 1=1 and a.DELETE_FLAG = 0
<if test="idsStr != null"> <if test="idsStr != null and idsStr.size > 0">
AND a.ID in AND a.ID in
<foreach item="items" index="index" collection="idsStr" open="(" separator="," close=")"> <foreach item="items" index="index" collection="idsStr" open="(" separator="," close=")">
#{items} #{items}
......
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