Commit fa921ab6 authored by huyuchen's avatar huyuchen

划转修改

parent 1dba38d2
......@@ -143,6 +143,13 @@ public class TEmployeeProject extends BaseEntity {
@TableField(exist = false)
private Integer isLeaveEmployee;
/**
* 已产生未结算费用 0:划转 1:不划转
*/
@Schema(description ="已产生未结算费用(0:划转 1:不划转)")
@TableField(exist = false)
private String unsettleDeal;
/**
* 员工编码
*/
......
......@@ -39,6 +39,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.SocialDaprUtils;
import com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.validation.BindingResult;
......@@ -63,6 +64,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
private final TEmployeeLogServiceImpl tEmployeeLogService;
@Autowired
private final SocialDaprUtils socialDaprUtils;
public static final Pattern PATTERN = Pattern.compile("^[-\\+]?[\\d]*$");
......@@ -114,7 +116,6 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
// 记录变更日志
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", updateTEmployeeProject.getId(), tEmployeeProjectOld, updateTEmployeeProject);
UpdateSocialFoundVo updateSocialFoundVo = new UpdateSocialFoundVo();
updateSocialFoundVo.setEmpIdcard(updateTEmployeeProject.getEmpIdcard());
updateSocialFoundVo.setSettleDomainCode(updateTEmployeeProject.getDeptNo());
......@@ -122,14 +123,16 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
updateSocialFoundVo.setSettleDomainName(updateTEmployeeProject.getDeptName());
updateSocialFoundVo.setUnitId(updateTEmployeeProject.getUnitId());
updateSocialFoundVo.setUnitName(updateTEmployeeProject.getUnitName());
updateSocialFoundVo.setSocialCreateMonth(tEmpChangeInfo.getChangeStartMonth());
socialDaprUtils.updatePaymentSocialAndFound(updateSocialFoundVo);
socialDaprUtils.updateForSocialAndFound(updateSocialFoundVo);
if (!CommonConstants.ZERO_STRING.equals(updateTEmployeeProject.getSocialStatus())) {
if (CommonConstants.ONE_STRING.equals(tEmpChangeInfo.getUnsettleDeal())) {
updateSocialFoundVo.setSocialCreateMonth(tEmpChangeInfo.getChangeStartMonth().replace("-",""));
socialDaprUtils.updatePaymentSocialAndFound(updateSocialFoundVo);
socialDaprUtils.updateForSocialAndFound(updateSocialFoundVo);
}
if (CommonConstants.ZERO_INT != updateTEmployeeProject.getSocialStatus()) {
updateSocialFoundVo.setFlag(CommonConstants.ZERO_STRING);
socialDaprUtils.updateSocialAndFoundInfo(updateSocialFoundVo);
}
if (!CommonConstants.ZERO_STRING.equals(updateTEmployeeProject.getFundStatus())) {
if (CommonConstants.ZERO_INT != updateTEmployeeProject.getFundStatus()) {
updateSocialFoundVo.setFlag(CommonConstants.ONE_STRING);
socialDaprUtils.updateSocialAndFoundInfo(updateSocialFoundVo);
}
......@@ -221,6 +224,7 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
updateTEmployeePro.setUnitName(tCustomerInfo.getCustomerName());
}
updateTEmployeePro.setChangeStartMonth(excel.getChangeStartMonth());
updateTEmployeePro.setUnsettleDeal(excel.getUnsettleDeal());
updateList.add(updateTEmployeePro);
// 记录变更日志
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[1], "", tEmployeeProjectOld.getId(), tEmployeeProjectOld, updateTEmployeePro);
......@@ -246,14 +250,16 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
updateSocialFoundVo.setUnitId(tEmployeeProject.getUnitId());
updateSocialFoundVo.setUnitName(tEmployeeProject.getUnitName());
updateSocialFoundVo.setSettleDomainName(tEmployeeProject.getDeptName());
updateSocialFoundVo.setSocialCreateMonth(tEmployeeProject.getChangeStartMonth());
socialDaprUtils.updatePaymentSocialAndFound(updateSocialFoundVo);
socialDaprUtils.updateForSocialAndFound(updateSocialFoundVo);
if (!CommonConstants.ZERO_STRING.equals(tEmployeeProject.getSocialStatus())) {
if (CommonConstants.IS_CHANGE.equals(tEmployeeProject.getUnsettleDeal())) {
updateSocialFoundVo.setSocialCreateMonth(tEmployeeProject.getChangeStartMonth());
socialDaprUtils.updatePaymentSocialAndFound(updateSocialFoundVo);
socialDaprUtils.updateForSocialAndFound(updateSocialFoundVo);
}
if (CommonConstants.ZERO_INT != tEmployeeProject.getSocialStatus()) {
updateSocialFoundVo.setFlag(CommonConstants.ZERO_STRING);
socialDaprUtils.updateSocialAndFoundInfo(updateSocialFoundVo);
}
if (!CommonConstants.ZERO_STRING.equals(tEmployeeProject.getFundStatus())) {
if (CommonConstants.ZERO_INT != tEmployeeProject.getFundStatus()) {
updateSocialFoundVo.setFlag(CommonConstants.ONE_STRING);
socialDaprUtils.updateSocialAndFoundInfo(updateSocialFoundVo);
}
......
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