Commit ffc27e4c authored by huyuchen's avatar huyuchen

优化修改

parent cc7fc847
...@@ -61,7 +61,6 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TPaymentInfoService; ...@@ -61,7 +61,6 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TPaymentInfoService;
import com.yifu.cloud.plus.v1.yifu.social.util.DoJointSocialTask; import com.yifu.cloud.plus.v1.yifu.social.util.DoJointSocialTask;
import com.yifu.cloud.plus.v1.yifu.social.vo.*; import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -2553,18 +2552,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2553,18 +2552,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
String key = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_PUSH; String key = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_PUSH;
redisUtil.set(key, user.getId(), 36000L); redisUtil.set(key, user.getId(), 36000L);
try {
//手动推送未推送的社保公积金明细数据 //手动推送未推送的社保公积金明细数据
createPaymentSocialInfoReal(user,searchVo); createPaymentSocialInfoReal(user, searchVo);
createPaymentFundInfoReal(user,searchVo); createPaymentFundInfoReal(user, searchVo);
//推送社保公积金收入数据 //推送社保公积金收入数据
createPaymentInfoIncomeReal(user,searchVo); createPaymentInfoIncomeReal(user, searchVo);
createPaymentFundIncomeReal(user,searchVo); createPaymentFundIncomeReal(user, searchVo);
redisUtil.remove(key); redisUtil.remove(key);
} catch (Exception e) {
log.error("社保缴费库:" + e);
redisUtil.remove(key);
}
} }
@Override @Override
...@@ -2746,370 +2741,381 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2746,370 +2741,381 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
public void initEkpPushSocialParam(List<TPaymentInfo> unPushInfo) { public void initEkpPushSocialParam(List<TPaymentInfo> unPushInfo) {
List<TSettleDomainSelectVo> settleDomainR; //获取所有的项目编码
R<TSettleDomainListVo> listVo; List<String> deptNoList = unPushInfo.stream().map(TPaymentInfo::getSettleDomainCode).collect(Collectors.toList());
//获取对应项目信息
Map<String, TSettleDomain> data = new HashMap<>();
TSettleDomain settleDomain;
try {
R<TSettleDomainListVo> infoByCodes = archivesDaprUtil.getSettleInfoByCodes(deptNoList);
if (null != infoByCodes && Common.isNotNull(infoByCodes.getData()) && Common.isNotNull(infoByCodes.getData().getMapVO())) {
data = infoByCodes.getData().getMapVO();
}
for (TPaymentInfo library : unPushInfo) { for (TPaymentInfo library : unPushInfo) {
//获取项目信息 //获取项目信息
TSettleDomain settleDomain = new TSettleDomain(); if (Common.isNotNull(data)) {
listVo = archivesDaprUtil.selectSettleDomainSelectVoById(library.getSettleDomainId()); settleDomain = data.get(library.getSettleDomainCode());
if (Common.isNotNull(listVo)) { } else {
TSettleDomainListVo tSettleDomainListVo = listVo.getData(); settleDomain = new TSettleDomain();
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) { }
settleDomainR = tSettleDomainListVo.getListSelectVO();
for (TSettleDomainSelectVo vo : settleDomainR) { EkpPushSocialParam socialParam = new EkpPushSocialParam();
BeanUtils.copyProperties(vo, settleDomain); //员工姓名
} socialParam.setFd_3adfe8c79989d4(library.getEmpName());
//员工身份证
socialParam.setFd_3adfe8c7e4cf7a(library.getEmpIdcard());
//单位养老金额
socialParam.setFd_3af9ec80a9de7a(CommonConstants.EMPTY_STRING);
//单位医疗金额
socialParam.setFd_3af9eba5899c90(CommonConstants.EMPTY_STRING);
//单位工伤金额
socialParam.setFd_3af9eba684f592(CommonConstants.EMPTY_STRING);
//单位失业金额
socialParam.setFd_3af9eba5f6e19e(CommonConstants.EMPTY_STRING);
//单位生育金额
socialParam.setFd_3af9eba71c0138(CommonConstants.EMPTY_STRING);
//单位大病金额
socialParam.setFd_3af9eba863c0ee(CommonConstants.EMPTY_STRING);
//预估个人养老
socialParam.setFd_3af9ebbd791662(CommonConstants.EMPTY_STRING);
//预估个人医疗
socialParam.setFd_3af9ebbdd9797e(CommonConstants.EMPTY_STRING);
//预估单位合计
socialParam.setFd_3adfeb4e8064a8(CommonConstants.EMPTY_STRING);
//个人社保合计
socialParam.setFd_3adfeb52a4d2e2(CommonConstants.EMPTY_STRING);
//预估个人大病救助
socialParam.setFd_3af9ebbf3e8be2(CommonConstants.EMPTY_STRING);
//预估个人失业
socialParam.setFd_3af9ebbe29ce1c(CommonConstants.EMPTY_STRING);
//结算状态
// hgw2022-9-30 12:03:05根据倩倩的需求,改为默认空,未结算
socialParam.setFd_3add9ea428879a(CommonConstants.SALARY_UNFLAG);
//社保缴纳月份
if (Common.isNotNull(library.getSocialPayMonth())) {
socialParam.setFd_3adfe8cf632700(dateStringInsert(library.getSocialPayMonth()));
} else {
socialParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING);
} }
//社保生成月份
if (Common.isNotNull(library.getSocialCreateMonth())) {
socialParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getSocialCreateMonth()));
} else {
socialParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
}
//订单类型
socialParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_THR);
//是否有预估
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getSocialType()) &&
CommonConstants.ONE_STRING.equals(settleDomain.getSocialType())) {
socialParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
} else {
socialParam.setFd_3add9de0be85e4(CommonConstants.IS_FALSE);
}
//与工资合并结算
socialParam.setFd_3add9e1a670144(CommonConstants.IS_FALSE);
//项目编码
socialParam.setFd_3adfe8c70d3fd4(library.getSettleDomainCode());
//项目名称
socialParam.setFd_3adfe8c8468e54(library.getSettleDomainName());
//单号
socialParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getCustomerNo())) {
socialParam.setFd_3adfe8c73cb5a4(settleDomain.getCustomerNo());
} else {
socialParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
}
//是否为BPO业务
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getBpoFlag())) {
socialParam.setFd_3b178dfcf9e3e6(settleDomain.getBpoFlag());
} else {
socialParam.setFd_3b178dfcf9e3e6(CommonConstants.EMPTY_STRING);
}
//客户名称
if (Common.isNotNull(library.getUnitName())) {
socialParam.setFd_3adfe8c81a0e42(library.getUnitName());
} else {
socialParam.setFd_3adfe8c81a0e42(CommonConstants.EMPTY_STRING);
}
//社保户
if (Common.isNotNull(library.getSocialHousehold())) {
socialParam.setFd_3aeafa25916e82(library.getSocialHousehold());
} else {
socialParam.setFd_3aeafa25916e82(CommonConstants.EMPTY_STRING);
}
//结算月份
socialParam.setFd_3adfe8cff746bc(CommonConstants.EMPTY_STRING);
//单位差异
socialParam.setFd_3adfeb53c70f72(CommonConstants.EMPTY_STRING);
//个人差异
socialParam.setFd_3adfeb5413fb44(CommonConstants.EMPTY_STRING);
//应收
socialParam.setFd_3adfeb7b624f06(CommonConstants.EMPTY_STRING);
//收款状态
socialParam.setFd_3add9eaeed2560(CommonConstants.EMPTY_STRING);
//结算单号
socialParam.setFd_3adfeb830523b6(CommonConstants.EMPTY_STRING);
//收款单号
socialParam.setFd_3adfeb8489e6c2(CommonConstants.EMPTY_STRING);
//应支出
socialParam.setFd_3adfeb7bd97464(CommonConstants.EMPTY_STRING);
//支出结算状态
socialParam.setFd_3add9edfbc6f7e(CommonConstants.EMPTY_STRING);
//付款状态
socialParam.setFd_3add9eed23894a(CommonConstants.EMPTY_STRING);
//支出缴纳单号
socialParam.setFd_3adfeb83a704c8(CommonConstants.EMPTY_STRING);
//实缴单位生育
if (Common.isNotNull(library.getUnitBirthMoney())) {
socialParam.setFd_3af9ee3afb34c2(library.getUnitBirthMoney().toString());
} else {
socialParam.setFd_3af9ee3afb34c2(CommonConstants.EMPTY_STRING);
}
//付款单号
socialParam.setFd_3adfeb84175f28(CommonConstants.EMPTY_STRING);
//实缴个人合计
if (Common.isNotNull(library.getSocialSecurityPersonalSum())) {
socialParam.setFd_3af9ee3cb6d4fa(library.getSocialSecurityPersonalSum().toString());
} else {
socialParam.setFd_3af9ee3cb6d4fa(CommonConstants.EMPTY_STRING);
}
//预估合计
socialParam.setFd_3af9ed7e813b86(CommonConstants.EMPTY_STRING);
//实缴单位合计
if (Common.isNotNull(library.getUnitSocialSum())) {
socialParam.setFd_3af9ee3c0bf286(library.getUnitSocialSum().toString());
} else {
socialParam.setFd_3af9ee3c0bf286(CommonConstants.EMPTY_STRING);
}
//实缴个人补缴利息
if (Common.isNotNull(library.getPersonalAccrual())) {
socialParam.setFd_3af9ee3d634946(library.getPersonalAccrual().toString());
} else {
socialParam.setFd_3af9ee3d634946(CommonConstants.EMPTY_STRING);
}
//实缴单位医疗
if (Common.isNotNull(library.getUnitMedicalMoney())) {
socialParam.setFd_3af9ee39dea6a8(library.getUnitMedicalMoney().toString());
} else {
socialParam.setFd_3af9ee39dea6a8(CommonConstants.EMPTY_STRING);
}
//预估个人补缴利息
socialParam.setFd_3af9ebbecc4aa8(CommonConstants.EMPTY_STRING);
//预估单位补缴利息
socialParam.setFd_3af9eba7c3da5e(CommonConstants.EMPTY_STRING);
//实缴单位养老
if (Common.isNotNull(library.getUnitPensionMoney())) {
socialParam.setFd_3af9ee3938170a(library.getUnitPensionMoney().toString());
} else {
socialParam.setFd_3af9ee3938170a(CommonConstants.EMPTY_STRING);
}
//实缴个人失业
if (Common.isNotNull(library.getPersonalUnemploymentMoney())) {
socialParam.setFd_3af9ee3db44d96(library.getPersonalUnemploymentMoney().toString());
} else {
socialParam.setFd_3af9ee3db44d96(CommonConstants.EMPTY_STRING);
}
//实缴单位补缴利息
if (Common.isNotNull(library.getCompanyAccrual())) {
socialParam.setFd_3af9ee3b5ddae8(library.getCompanyAccrual().toString());
} else {
socialParam.setFd_3af9ee3b5ddae8(CommonConstants.EMPTY_STRING);
}
//实缴单位大病救助
if (Common.isNotNull(library.getUnitBigmailmentMoney())) {
socialParam.setFd_3af9ee3ba76f54(library.getUnitBigmailmentMoney().toString());
} else {
socialParam.setFd_3af9ee3ba76f54(CommonConstants.EMPTY_STRING);
}
//实缴单位工伤
if (Common.isNotNull(library.getUnitInjuryMoney())) {
socialParam.setFd_3af9ee3aa9c84a(library.getUnitInjuryMoney().toString());
} else {
socialParam.setFd_3af9ee3aa9c84a(CommonConstants.EMPTY_STRING);
}
//实缴合计
if (Common.isNotNull(library.getSocialSum())) {
socialParam.setFd_3af9ee3c6bfc74(library.getSocialSum().toString());
} else {
socialParam.setFd_3af9ee3c6bfc74(CommonConstants.EMPTY_STRING);
}
//实缴个人医疗
if (Common.isNotNull(library.getPersonalMedicalMoney())) {
socialParam.setFd_3af9ee3e066d48(library.getPersonalMedicalMoney().toString());
} else {
socialParam.setFd_3af9ee3e066d48(CommonConstants.EMPTY_STRING);
}
//实缴单位失业
if (Common.isNotNull(library.getUnitUnemploymentMoney())) {
socialParam.setFd_3af9ee3a46b7e6(library.getUnitUnemploymentMoney().toString());
} else {
socialParam.setFd_3af9ee3a46b7e6(CommonConstants.EMPTY_STRING);
}
//实缴个人养老
if (Common.isNotNull(library.getPersonalPensionMoney())) {
socialParam.setFd_3af9ee3e513962(library.getPersonalPensionMoney().toString());
} else {
socialParam.setFd_3af9ee3e513962(CommonConstants.EMPTY_STRING);
}
//实缴个人大病救助
if (Common.isNotNull(library.getPersonalBigmailmentMoney())) {
socialParam.setFd_3af9ee3d0ba3b6(library.getPersonalBigmailmentMoney().toString());
} else {
socialParam.setFd_3af9ee3d0ba3b6(CommonConstants.EMPTY_STRING);
}
//创建人姓名
if (Common.isNotNull(library.getCreateName())) {
socialParam.setFd_3b438e33f37378(library.getCreateName());
} else {
socialParam.setFd_3b438e33f37378(CommonConstants.EMPTY_STRING);
}
//我司到款单位
socialParam.setFd_3b01953871b8be(CommonConstants.EMPTY_STRING);
//社保id
socialParam.setFd_3b0afbe1f94a08(library.getId());
// 薪酬申请编号
socialParam.setFd_3b3cab77923f44(CommonConstants.EMPTY_STRING);
doJointSocialTask.asynchronousEkpPaymentSocial(socialParam, library);
} }
EkpPushSocialParam socialParam = new EkpPushSocialParam(); }catch (Exception e) {
//员工姓名 log.error("生成社保明细异常",e);
socialParam.setFd_3adfe8c79989d4(library.getEmpName());
//员工身份证
socialParam.setFd_3adfe8c7e4cf7a(library.getEmpIdcard());
//单位养老金额
socialParam.setFd_3af9ec80a9de7a(CommonConstants.EMPTY_STRING);
//单位医疗金额
socialParam.setFd_3af9eba5899c90(CommonConstants.EMPTY_STRING);
//单位工伤金额
socialParam.setFd_3af9eba684f592(CommonConstants.EMPTY_STRING);
//单位失业金额
socialParam.setFd_3af9eba5f6e19e(CommonConstants.EMPTY_STRING);
//单位生育金额
socialParam.setFd_3af9eba71c0138(CommonConstants.EMPTY_STRING);
//单位大病金额
socialParam.setFd_3af9eba863c0ee(CommonConstants.EMPTY_STRING);
//预估个人养老
socialParam.setFd_3af9ebbd791662(CommonConstants.EMPTY_STRING);
//预估个人医疗
socialParam.setFd_3af9ebbdd9797e(CommonConstants.EMPTY_STRING);
//预估单位合计
socialParam.setFd_3adfeb4e8064a8(CommonConstants.EMPTY_STRING);
//个人社保合计
socialParam.setFd_3adfeb52a4d2e2(CommonConstants.EMPTY_STRING);
//预估个人大病救助
socialParam.setFd_3af9ebbf3e8be2(CommonConstants.EMPTY_STRING);
//预估个人失业
socialParam.setFd_3af9ebbe29ce1c(CommonConstants.EMPTY_STRING);
//结算状态
// hgw2022-9-30 12:03:05根据倩倩的需求,改为默认空,未结算
socialParam.setFd_3add9ea428879a(CommonConstants.SALARY_UNFLAG);
//社保缴纳月份
if (Common.isNotNull(library.getSocialPayMonth())) {
socialParam.setFd_3adfe8cf632700(dateStringInsert(library.getSocialPayMonth()));
} else {
socialParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING);
}
//社保生成月份
if (Common.isNotNull(library.getSocialCreateMonth())) {
socialParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getSocialCreateMonth()));
} else {
socialParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
}
//订单类型
socialParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_THR);
//是否有预估
if (Common.isNotNull(settleDomain.getSocialType()) &&
CommonConstants.ONE_STRING.equals(settleDomain.getSocialType())) {
socialParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
} else {
socialParam.setFd_3add9de0be85e4(CommonConstants.IS_FALSE);
}
//与工资合并结算
socialParam.setFd_3add9e1a670144(CommonConstants.IS_FALSE);
//项目编码
socialParam.setFd_3adfe8c70d3fd4(library.getSettleDomainCode());
//项目名称
socialParam.setFd_3adfe8c8468e54(library.getSettleDomainName());
//单号
socialParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码
if (Common.isNotNull(settleDomain.getCustomerNo())) {
socialParam.setFd_3adfe8c73cb5a4(settleDomain.getCustomerNo());
} else {
socialParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
}
//是否为BPO业务
if (Common.isNotNull(settleDomain.getBpoFlag())) {
socialParam.setFd_3b178dfcf9e3e6(settleDomain.getBpoFlag());
} else {
socialParam.setFd_3b178dfcf9e3e6(CommonConstants.EMPTY_STRING);
}
//客户名称
if (Common.isNotNull(library.getUnitName())) {
socialParam.setFd_3adfe8c81a0e42(library.getUnitName());
} else {
socialParam.setFd_3adfe8c81a0e42(CommonConstants.EMPTY_STRING);
}
//社保户
if (Common.isNotNull(library.getSocialHousehold())) {
socialParam.setFd_3aeafa25916e82(library.getSocialHousehold());
} else {
socialParam.setFd_3aeafa25916e82(CommonConstants.EMPTY_STRING);
}
//结算月份
socialParam.setFd_3adfe8cff746bc(CommonConstants.EMPTY_STRING);
//单位差异
socialParam.setFd_3adfeb53c70f72(CommonConstants.EMPTY_STRING);
//个人差异
socialParam.setFd_3adfeb5413fb44(CommonConstants.EMPTY_STRING);
//应收
socialParam.setFd_3adfeb7b624f06(CommonConstants.EMPTY_STRING);
//收款状态
socialParam.setFd_3add9eaeed2560(CommonConstants.EMPTY_STRING);
//结算单号
socialParam.setFd_3adfeb830523b6(CommonConstants.EMPTY_STRING);
//收款单号
socialParam.setFd_3adfeb8489e6c2(CommonConstants.EMPTY_STRING);
//应支出
socialParam.setFd_3adfeb7bd97464(CommonConstants.EMPTY_STRING);
//支出结算状态
socialParam.setFd_3add9edfbc6f7e(CommonConstants.EMPTY_STRING);
//付款状态
socialParam.setFd_3add9eed23894a(CommonConstants.EMPTY_STRING);
//支出缴纳单号
socialParam.setFd_3adfeb83a704c8(CommonConstants.EMPTY_STRING);
//实缴单位生育
if (Common.isNotNull(library.getUnitBirthMoney())) {
socialParam.setFd_3af9ee3afb34c2(library.getUnitBirthMoney().toString());
} else {
socialParam.setFd_3af9ee3afb34c2(CommonConstants.EMPTY_STRING);
}
//付款单号
socialParam.setFd_3adfeb84175f28(CommonConstants.EMPTY_STRING);
//实缴个人合计
if (Common.isNotNull(library.getSocialSecurityPersonalSum())) {
socialParam.setFd_3af9ee3cb6d4fa(library.getSocialSecurityPersonalSum().toString());
} else {
socialParam.setFd_3af9ee3cb6d4fa(CommonConstants.EMPTY_STRING);
}
//预估合计
socialParam.setFd_3af9ed7e813b86(CommonConstants.EMPTY_STRING);
//实缴单位合计
if (Common.isNotNull(library.getUnitSocialSum())) {
socialParam.setFd_3af9ee3c0bf286(library.getUnitSocialSum().toString());
} else {
socialParam.setFd_3af9ee3c0bf286(CommonConstants.EMPTY_STRING);
}
//实缴个人补缴利息
if (Common.isNotNull(library.getPersonalAccrual())) {
socialParam.setFd_3af9ee3d634946(library.getPersonalAccrual().toString());
} else {
socialParam.setFd_3af9ee3d634946(CommonConstants.EMPTY_STRING);
}
//实缴单位医疗
if (Common.isNotNull(library.getUnitMedicalMoney())) {
socialParam.setFd_3af9ee39dea6a8(library.getUnitMedicalMoney().toString());
} else {
socialParam.setFd_3af9ee39dea6a8(CommonConstants.EMPTY_STRING);
}
//预估个人补缴利息
socialParam.setFd_3af9ebbecc4aa8(CommonConstants.EMPTY_STRING);
//预估单位补缴利息
socialParam.setFd_3af9eba7c3da5e(CommonConstants.EMPTY_STRING);
//实缴单位养老
if (Common.isNotNull(library.getUnitPensionMoney())) {
socialParam.setFd_3af9ee3938170a(library.getUnitPensionMoney().toString());
} else {
socialParam.setFd_3af9ee3938170a(CommonConstants.EMPTY_STRING);
}
//实缴个人失业
if (Common.isNotNull(library.getPersonalUnemploymentMoney())) {
socialParam.setFd_3af9ee3db44d96(library.getPersonalUnemploymentMoney().toString());
} else {
socialParam.setFd_3af9ee3db44d96(CommonConstants.EMPTY_STRING);
}
//实缴单位补缴利息
if (Common.isNotNull(library.getCompanyAccrual())) {
socialParam.setFd_3af9ee3b5ddae8(library.getCompanyAccrual().toString());
} else {
socialParam.setFd_3af9ee3b5ddae8(CommonConstants.EMPTY_STRING);
}
//实缴单位大病救助
if (Common.isNotNull(library.getUnitBigmailmentMoney())) {
socialParam.setFd_3af9ee3ba76f54(library.getUnitBigmailmentMoney().toString());
} else {
socialParam.setFd_3af9ee3ba76f54(CommonConstants.EMPTY_STRING);
}
//实缴单位工伤
if (Common.isNotNull(library.getUnitInjuryMoney())) {
socialParam.setFd_3af9ee3aa9c84a(library.getUnitInjuryMoney().toString());
} else {
socialParam.setFd_3af9ee3aa9c84a(CommonConstants.EMPTY_STRING);
}
//实缴合计
if (Common.isNotNull(library.getSocialSum())) {
socialParam.setFd_3af9ee3c6bfc74(library.getSocialSum().toString());
} else {
socialParam.setFd_3af9ee3c6bfc74(CommonConstants.EMPTY_STRING);
}
//实缴个人医疗
if (Common.isNotNull(library.getPersonalMedicalMoney())) {
socialParam.setFd_3af9ee3e066d48(library.getPersonalMedicalMoney().toString());
} else {
socialParam.setFd_3af9ee3e066d48(CommonConstants.EMPTY_STRING);
}
//实缴单位失业
if (Common.isNotNull(library.getUnitUnemploymentMoney())) {
socialParam.setFd_3af9ee3a46b7e6(library.getUnitUnemploymentMoney().toString());
} else {
socialParam.setFd_3af9ee3a46b7e6(CommonConstants.EMPTY_STRING);
}
//实缴个人养老
if (Common.isNotNull(library.getPersonalPensionMoney())) {
socialParam.setFd_3af9ee3e513962(library.getPersonalPensionMoney().toString());
} else {
socialParam.setFd_3af9ee3e513962(CommonConstants.EMPTY_STRING);
}
//实缴个人大病救助
if (Common.isNotNull(library.getPersonalBigmailmentMoney())) {
socialParam.setFd_3af9ee3d0ba3b6(library.getPersonalBigmailmentMoney().toString());
} else {
socialParam.setFd_3af9ee3d0ba3b6(CommonConstants.EMPTY_STRING);
}
//创建人姓名
if (Common.isNotNull(library.getCreateName())) {
socialParam.setFd_3b438e33f37378(library.getCreateName());
} else {
socialParam.setFd_3b438e33f37378(CommonConstants.EMPTY_STRING);
}
//我司到款单位
socialParam.setFd_3b01953871b8be(CommonConstants.EMPTY_STRING);
//社保id
socialParam.setFd_3b0afbe1f94a08(library.getId());
// 薪酬申请编号
socialParam.setFd_3b3cab77923f44(CommonConstants.EMPTY_STRING);
doJointSocialTask.asynchronousEkpPaymentSocial(socialParam, library);
} }
} }
public void initEkpPushFundParam(List<TPaymentInfo> unPushInfo) { public void initEkpPushFundParam(List<TPaymentInfo> unPushInfo) {
List<TSettleDomainSelectVo> settleDomainR; //获取所有的项目编码
R<TSettleDomainListVo> listVo; List<String> deptNoList = unPushInfo.stream().map(TPaymentInfo::getSettleDomainCode).collect(Collectors.toList());
for (TPaymentInfo library : unPushInfo) { //获取对应项目信息
//获取项目信息 Map<String, TSettleDomain> data = new HashMap<>();
TSettleDomain settleDomain = new TSettleDomain(); TSettleDomain settleDomain;
listVo = archivesDaprUtil.selectSettleDomainSelectVoById(library.getSettleDomainId()); try {
if (Common.isNotNull(listVo)) { R<TSettleDomainListVo> infoByCodes = archivesDaprUtil.getSettleInfoByCodes(deptNoList);
TSettleDomainListVo tSettleDomainListVo = listVo.getData(); if (null != infoByCodes && Common.isNotNull(infoByCodes.getData()) && Common.isNotNull(infoByCodes.getData().getMapVO())) {
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) { data = infoByCodes.getData().getMapVO();
settleDomainR = tSettleDomainListVo.getListSelectVO();
for (TSettleDomainSelectVo vo : settleDomainR) {
BeanUtils.copyProperties(vo, settleDomain);
}
}
}
EkpPushFundParam fundParam = new EkpPushFundParam();
//员工姓名
fundParam.setFd_3adfe8c79989d4(library.getEmpName());
//员工身份证
fundParam.setFd_3adfe8c7e4cf7a(library.getEmpIdcard());
//预估单位代缴
fundParam.setFd_3adfeb4e8064a8(CommonConstants.EMPTY_STRING);
//预估个人代缴
fundParam.setFd_3adfeb52a4d2e2(CommonConstants.EMPTY_STRING);
//缴纳月份
if (Common.isNotNull(library.getProvidentPayMonth())) {
fundParam.setFd_3adfe8cf632700(dateStringInsert(library.getProvidentPayMonth()));
} else {
fundParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING);
}
//生成月份
if (Common.isNotNull(library.getProvidentCreateMonth())) {
fundParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getProvidentCreateMonth()));
} else {
fundParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
}
//结算状态
// hgw2022-9-30 12:03:48根绝倩倩需求变更
fundParam.setFd_3add9ea428879a(CommonConstants.SALARY_UNFLAG);
//订单类型
fundParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_THR);
//是否有预估
if (Common.isNotNull(settleDomain.getFundType()) &&
CommonConstants.ONE_STRING.equals(settleDomain.getFundType())) {
fundParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
} else {
fundParam.setFd_3add9de0be85e4(CommonConstants.IS_FALSE);
}
//与工资合并结算
fundParam.setFd_3add9e1a670144(CommonConstants.IS_FALSE);
//项目编码
fundParam.setFd_3adfe8c70d3fd4(library.getSettleDomainCode());
//项目名称
fundParam.setFd_3adfe8c8468e54(library.getSettleDomainName());
//单号
fundParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码
if (Common.isNotNull(settleDomain.getCustomerNo())) {
fundParam.setFd_3adfe8c73cb5a4(settleDomain.getCustomerNo());
} else {
fundParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
}
//是否为BPO业务
if (Common.isNotNull(settleDomain.getBpoFlag())) {
fundParam.setFd_3b178ea361cabe(settleDomain.getBpoFlag());
} else {
fundParam.setFd_3b178ea361cabe(CommonConstants.EMPTY_STRING);
}
//单位代缴
if (Common.isNotNull(library.getUnitProvidentSum())) {
fundParam.setFd_3adfeb52fbe966(library.getUnitProvidentSum().toString());
} else {
fundParam.setFd_3adfeb52fbe966(CommonConstants.EMPTY_STRING);
}
//个人代缴
if (Common.isNotNull(library.getPersonalProvidentSum())) {
fundParam.setFd_3adfeb5366dd82(library.getPersonalProvidentSum().toString());
} else {
fundParam.setFd_3adfeb5366dd82(CommonConstants.EMPTY_STRING);
}
//客户名称
fundParam.setFd_3adfe8c81a0e42(library.getUnitName());
//公积金账户
if (Common.isNotNull(library.getProvidentHousehold())) {
fundParam.setFd_3aeafa8cc144bc(library.getProvidentHousehold());
} else {
fundParam.setFd_3aeafa8cc144bc(CommonConstants.EMPTY_STRING);
} }
//结算月份 for (TPaymentInfo library : unPushInfo) {
fundParam.setFd_3adfe8cff746bc(CommonConstants.EMPTY_STRING); //获取项目信息
//单位差异 if (Common.isNotNull(data)) {
fundParam.setFd_3adfeb53c70f72(CommonConstants.EMPTY_STRING); settleDomain = data.get(library.getSettleDomainCode());
//个人差异 } else {
fundParam.setFd_3adfeb5413fb44(CommonConstants.EMPTY_STRING); settleDomain = new TSettleDomain();
//应收 }
fundParam.setFd_3adfeb7b624f06(CommonConstants.EMPTY_STRING); EkpPushFundParam fundParam = new EkpPushFundParam();
//收款状态 //员工姓名
fundParam.setFd_3add9eaeed2560(CommonConstants.EMPTY_STRING); fundParam.setFd_3adfe8c79989d4(library.getEmpName());
//结算单号 //员工身份证
fundParam.setFd_3adfeb830523b6(CommonConstants.EMPTY_STRING); fundParam.setFd_3adfe8c7e4cf7a(library.getEmpIdcard());
//收款单号 //预估单位代缴
fundParam.setFd_3adfeb8489e6c2(CommonConstants.EMPTY_STRING); fundParam.setFd_3adfeb4e8064a8(CommonConstants.EMPTY_STRING);
//应支出 //预估个人代缴
fundParam.setFd_3adfeb7bd97464(CommonConstants.EMPTY_STRING); fundParam.setFd_3adfeb52a4d2e2(CommonConstants.EMPTY_STRING);
//支出结算状态 //缴纳月份
fundParam.setFd_3add9edfbc6f7e(CommonConstants.EMPTY_STRING); if (Common.isNotNull(library.getProvidentPayMonth())) {
//付款状态 fundParam.setFd_3adfe8cf632700(dateStringInsert(library.getProvidentPayMonth()));
fundParam.setFd_3add9eed23894a(CommonConstants.EMPTY_STRING); } else {
//支出缴纳单号 fundParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING);
fundParam.setFd_3adfeb83a704c8(CommonConstants.EMPTY_STRING); }
//付款单号 //生成月份
fundParam.setFd_3adfeb84175f28(CommonConstants.EMPTY_STRING); if (Common.isNotNull(library.getProvidentCreateMonth())) {
//我司到款单位 fundParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getProvidentCreateMonth()));
fundParam.setFd_3b019a2e9bfdd6(CommonConstants.EMPTY_STRING); } else {
//公积金id fundParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
fundParam.setFd_3b0afbaf10df2c(library.getId()); }
// 薪酬申请编号 //结算状态
fundParam.setFd_3b3cabde83d1d0(CommonConstants.EMPTY_STRING); // hgw2022-9-30 12:03:48根绝倩倩需求变更
//创建人姓名 fundParam.setFd_3add9ea428879a(CommonConstants.SALARY_UNFLAG);
if (Common.isNotNull(library.getCreateName())) { //订单类型
fundParam.setFd_3b43922217c6f8(library.getCreateName()); fundParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_THR);
} else { //是否有预估
fundParam.setFd_3b43922217c6f8(CommonConstants.EMPTY_STRING); if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getFundType()) &&
CommonConstants.ONE_STRING.equals(settleDomain.getFundType())) {
fundParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
} else {
fundParam.setFd_3add9de0be85e4(CommonConstants.IS_FALSE);
}
//与工资合并结算
fundParam.setFd_3add9e1a670144(CommonConstants.IS_FALSE);
//项目编码
fundParam.setFd_3adfe8c70d3fd4(library.getSettleDomainCode());
//项目名称
fundParam.setFd_3adfe8c8468e54(library.getSettleDomainName());
//单号
fundParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getCustomerNo())) {
fundParam.setFd_3adfe8c73cb5a4(settleDomain.getCustomerNo());
} else {
fundParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
}
//是否为BPO业务
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getBpoFlag())) {
fundParam.setFd_3b178ea361cabe(settleDomain.getBpoFlag());
} else {
fundParam.setFd_3b178ea361cabe(CommonConstants.EMPTY_STRING);
}
//单位代缴
if (Common.isNotNull(library.getUnitProvidentSum())) {
fundParam.setFd_3adfeb52fbe966(library.getUnitProvidentSum().toString());
} else {
fundParam.setFd_3adfeb52fbe966(CommonConstants.EMPTY_STRING);
}
//个人代缴
if (Common.isNotNull(library.getPersonalProvidentSum())) {
fundParam.setFd_3adfeb5366dd82(library.getPersonalProvidentSum().toString());
} else {
fundParam.setFd_3adfeb5366dd82(CommonConstants.EMPTY_STRING);
}
//客户名称
fundParam.setFd_3adfe8c81a0e42(library.getUnitName());
//公积金账户
if (Common.isNotNull(library.getProvidentHousehold())) {
fundParam.setFd_3aeafa8cc144bc(library.getProvidentHousehold());
} else {
fundParam.setFd_3aeafa8cc144bc(CommonConstants.EMPTY_STRING);
}
//结算月份
fundParam.setFd_3adfe8cff746bc(CommonConstants.EMPTY_STRING);
//单位差异
fundParam.setFd_3adfeb53c70f72(CommonConstants.EMPTY_STRING);
//个人差异
fundParam.setFd_3adfeb5413fb44(CommonConstants.EMPTY_STRING);
//应收
fundParam.setFd_3adfeb7b624f06(CommonConstants.EMPTY_STRING);
//收款状态
fundParam.setFd_3add9eaeed2560(CommonConstants.EMPTY_STRING);
//结算单号
fundParam.setFd_3adfeb830523b6(CommonConstants.EMPTY_STRING);
//收款单号
fundParam.setFd_3adfeb8489e6c2(CommonConstants.EMPTY_STRING);
//应支出
fundParam.setFd_3adfeb7bd97464(CommonConstants.EMPTY_STRING);
//支出结算状态
fundParam.setFd_3add9edfbc6f7e(CommonConstants.EMPTY_STRING);
//付款状态
fundParam.setFd_3add9eed23894a(CommonConstants.EMPTY_STRING);
//支出缴纳单号
fundParam.setFd_3adfeb83a704c8(CommonConstants.EMPTY_STRING);
//付款单号
fundParam.setFd_3adfeb84175f28(CommonConstants.EMPTY_STRING);
//我司到款单位
fundParam.setFd_3b019a2e9bfdd6(CommonConstants.EMPTY_STRING);
//公积金id
fundParam.setFd_3b0afbaf10df2c(library.getId());
// 薪酬申请编号
fundParam.setFd_3b3cabde83d1d0(CommonConstants.EMPTY_STRING);
//创建人姓名
if (Common.isNotNull(library.getCreateName())) {
fundParam.setFd_3b43922217c6f8(library.getCreateName());
} else {
fundParam.setFd_3b43922217c6f8(CommonConstants.EMPTY_STRING);
}
doJointSocialTask.asynchronousEkpPaymentFund(fundParam, library);
} }
doJointSocialTask.asynchronousEkpPaymentFund(fundParam, library); }catch (Exception e) {
log.error("生成公积金明细异常",e);
} }
} }
...@@ -3156,123 +3162,128 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -3156,123 +3162,128 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
public void createIncomeInfo(List<TPaymentInfo> updateList, String socialFundFlag) { public void createIncomeInfo(List<TPaymentInfo> updateList, String socialFundFlag) {
List<TIncomeDetail> exitIncome; List<TIncomeDetail> exitIncome;
for (TPaymentInfo paymentInfo : updateList) { //获取所有的项目编码
boolean exitFlag = false; List<String> deptNoList = updateList.stream().map(TPaymentInfo::getSettleDomainCode).collect(Collectors.toList());
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) { //获取对应项目信息
exitIncome = detailMapper.selectList(Wrappers.<TIncomeDetail>query().lambda() Map<String, TSettleDomain> data = new HashMap<>();
.eq(TIncomeDetail::getEmpIdcard, paymentInfo.getEmpIdcard()) TSettleDomain settleDomain;
.eq(TIncomeDetail::getPayMonth, paymentInfo.getSocialPayMonth()) try {
.eq(TIncomeDetail::getDeptId, paymentInfo.getSettleDomainId()) R<TSettleDomainListVo> infoByCodes = archivesDaprUtil.getSettleInfoByCodes(deptNoList);
.eq(TIncomeDetail::getSourceType, CommonConstants.ONE_STRING)); if (null != infoByCodes && Common.isNotNull(infoByCodes.getData()) && Common.isNotNull(infoByCodes.getData().getMapVO())) {
} else { data = infoByCodes.getData().getMapVO();
exitIncome = detailMapper.selectList(Wrappers.<TIncomeDetail>query().lambda() }
.eq(TIncomeDetail::getEmpIdcard, paymentInfo.getEmpIdcard()) for (TPaymentInfo paymentInfo : updateList) {
.eq(TIncomeDetail::getPayMonth, paymentInfo.getProvidentPayMonth()) boolean exitFlag = false;
.eq(TIncomeDetail::getDeptId, paymentInfo.getSettleDomainId()) if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
.eq(TIncomeDetail::getSourceType, CommonConstants.TWO_STRING)); exitIncome = detailMapper.selectList(Wrappers.<TIncomeDetail>query().lambda()
} .eq(TIncomeDetail::getEmpIdcard, paymentInfo.getEmpIdcard())
if (Common.isNotNull(exitIncome)) { .eq(TIncomeDetail::getPayMonth, paymentInfo.getSocialPayMonth())
BigDecimal sumMoney = BigDecimal.ZERO; .eq(TIncomeDetail::getDeptId, paymentInfo.getSettleDomainId())
for (TIncomeDetail income : exitIncome) { .eq(TIncomeDetail::getSourceType, CommonConstants.ONE_STRING));
sumMoney = BigDecimalUtils.safeAdd(income.getMoney(), sumMoney); } else {
if (paymentInfo.getId().equals(income.getSourceId())) { exitIncome = detailMapper.selectList(Wrappers.<TIncomeDetail>query().lambda()
exitFlag = true; .eq(TIncomeDetail::getEmpIdcard, paymentInfo.getEmpIdcard())
} .eq(TIncomeDetail::getPayMonth, paymentInfo.getProvidentPayMonth())
} .eq(TIncomeDetail::getDeptId, paymentInfo.getSettleDomainId())
if (exitFlag) { .eq(TIncomeDetail::getSourceType, CommonConstants.TWO_STRING));
baseMapper.updateBySocialIncomeFlag(paymentInfo.getId()); }
continue; if (Common.isNotNull(exitIncome)) {
} BigDecimal sumMoney = BigDecimal.ZERO;
if (sumMoney.compareTo(BigDecimal.ZERO) > 0) { for (TIncomeDetail income : exitIncome) {
exitFlag = true; sumMoney = BigDecimalUtils.safeAdd(income.getMoney(), sumMoney);
} if (paymentInfo.getId().equals(income.getSourceId())) {
} exitFlag = true;
}
//获取项目信息 }
TSettleDomain settleDomain = new TSettleDomain(); if (exitFlag) {
List<TSettleDomainSelectVo> settleDomainR; baseMapper.updateBySocialIncomeFlag(paymentInfo.getId());
R<TSettleDomainListVo> listVo; continue;
listVo = archivesDaprUtil.selectSettleDomainSelectVoById(paymentInfo.getSettleDomainId()); }
if (Common.isNotNull(listVo)) { if (sumMoney.compareTo(BigDecimal.ZERO) > 0) {
TSettleDomainListVo tSettleDomainListVo = listVo.getData(); exitFlag = true;
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) { }
settleDomainR = tSettleDomainListVo.getListSelectVO(); }
for (TSettleDomainSelectVo vo : settleDomainR) {
BeanUtils.copyProperties(vo, settleDomain); //获取项目信息
} if (Common.isNotNull(data)) {
} settleDomain = data.get(paymentInfo.getSettleDomainCode());
} } else {
settleDomain = new TSettleDomain();
int isSum = 0; }
if (Common.isNotNull(settleDomain)) {
boolean isIncomeFlag = false; int isSum = 0;
// 含有社保,则计算收入 if (Common.isNotNull(settleDomain)) {
if (Common.isNotNull(settleDomain.getManageServerItem()) && ((settleDomain.getManageServerItem().contains(CommonConstants.ONE_STRING) boolean isIncomeFlag = false;
&& CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getManageServerItem().contains(CommonConstants.TWO_STRING) // 含有社保,则计算收入
&& CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) { if (Common.isNotNull(settleDomain.getManageServerItem()) && ((settleDomain.getManageServerItem().contains(CommonConstants.ONE_STRING)
//预估模式 && CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getManageServerItem().contains(CommonConstants.TWO_STRING)
if (CommonConstants.TWO_STRING.equals(settleDomain.getMrSettleType())) { && CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) {
BigDecimal gMoney; //预估模式
if (CommonConstants.TWO_STRING.equals(settleDomain.getManagementType())) { if (CommonConstants.TWO_STRING.equals(settleDomain.getMrSettleType())) {
gMoney = settleDomain.getManagementFee(); BigDecimal gMoney;
} else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) { if (CommonConstants.TWO_STRING.equals(settleDomain.getManagementType())) {
gMoney = settleDomain.getManagementFee(); gMoney = settleDomain.getManagementFee();
} else { } else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) {
isSum = 1; gMoney = settleDomain.getManagementFee();
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) { } else {
gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(), isSum = 1;
settleDomain.getManagementFee().divide(new BigDecimal("100"), if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
CommonConstants.FIVE_INT, RoundingMode.HALF_UP)); gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(),
} else { settleDomain.getManagementFee().divide(new BigDecimal("100"),
gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(), CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
settleDomain.getManagementFee().divide(new BigDecimal("100"), } else {
CommonConstants.FIVE_INT, RoundingMode.HALF_UP)); gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(),
} settleDomain.getManagementFee().divide(new BigDecimal("100"),
} CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
if (!exitFlag || isSum == 1) { }
isIncomeFlag = true; }
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.ONE_STRING, if (!exitFlag || isSum == 1) {
settleDomain.getManagementFee().toString(), settleDomain.getManagementType(), isIncomeFlag = true;
gMoney, socialFundFlag); createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.ONE_STRING,
} settleDomain.getManagementFee().toString(), settleDomain.getManagementType(),
} gMoney, socialFundFlag);
} }
if (Common.isNotNull(settleDomain.getRiskServerItem()) && ((settleDomain.getRiskServerItem().contains(CommonConstants.ONE_STRING) }
&& CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getRiskServerItem().contains(CommonConstants.TWO_STRING) }
&& CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) { if (Common.isNotNull(settleDomain.getRiskServerItem()) && ((settleDomain.getRiskServerItem().contains(CommonConstants.ONE_STRING)
//预估模式 && CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getRiskServerItem().contains(CommonConstants.TWO_STRING)
if (CommonConstants.TWO_STRING.equals(settleDomain.getMrSettleType()) && && CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) { //预估模式
BigDecimal money; if (CommonConstants.TWO_STRING.equals(settleDomain.getMrSettleType()) &&
if (CommonConstants.TWO_STRING.equals(settleDomain.getRiskFundType())) { CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
money = settleDomain.getRiskFundFee(); BigDecimal money;
} else if (CommonConstants.THREE_STRING.equals(settleDomain.getRiskFundType())) { if (CommonConstants.TWO_STRING.equals(settleDomain.getRiskFundType())) {
money = settleDomain.getRiskFundFee(); money = settleDomain.getRiskFundFee();
} else { } else if (CommonConstants.THREE_STRING.equals(settleDomain.getRiskFundType())) {
isSum = 2; money = settleDomain.getRiskFundFee();
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) { } else {
money = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(), isSum = 2;
settleDomain.getRiskFundFee().divide(new BigDecimal("100"), if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
CommonConstants.FIVE_INT, RoundingMode.HALF_UP)); money = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(),
} else { settleDomain.getRiskFundFee().divide(new BigDecimal("100"),
money = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(), CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
settleDomain.getRiskFundFee().divide(new BigDecimal("100"), } else {
CommonConstants.FIVE_INT, RoundingMode.HALF_UP)); money = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(),
} settleDomain.getRiskFundFee().divide(new BigDecimal("100"),
} CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
if (!exitFlag || isSum == 2) { }
isIncomeFlag = true; }
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.TWO_STRING, if (!exitFlag || isSum == 2) {
settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(), isIncomeFlag = true;
money, socialFundFlag); createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.TWO_STRING,
} settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(),
} money, socialFundFlag);
} }
if (!isIncomeFlag) { }
baseMapper.updateBySocialIncomeFlag(paymentInfo.getId()); }
} if (!isIncomeFlag) {
} baseMapper.updateBySocialIncomeFlag(paymentInfo.getId());
} }
}
}
}catch (Exception e) {
log.error("生成社保收入异常",e);
}
} }
public void createIncomeInsurance(TPaymentInfo library, TSettleDomain settleDomain, String feeType, public void createIncomeInsurance(TPaymentInfo library, TSettleDomain settleDomain, String feeType,
......
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