Commit f2f1e3d4 authored by huyuchen's avatar huyuchen

导出优化

parent 30cd0fed
...@@ -3069,64 +3069,62 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -3069,64 +3069,62 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
// 含有社保,则计算收入 // 含有社保,则计算收入
if (Common.isNotNull(settleDomain.getManageServerItem()) && ((settleDomain.getManageServerItem().contains(CommonConstants.ONE_STRING) if (Common.isNotNull(settleDomain.getManageServerItem()) && ((settleDomain.getManageServerItem().contains(CommonConstants.ONE_STRING)
&& CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getManageServerItem().contains(CommonConstants.TWO_STRING) && CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getManageServerItem().contains(CommonConstants.TWO_STRING)
&& CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) { && CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())
//预估模式 && CommonConstants.TWO_STRING.equals(settleDomain.getMrSettleType())) {
if (CommonConstants.TWO_STRING.equals(settleDomain.getMrSettleType())) { //实缴模式
BigDecimal gMoney; BigDecimal gMoney;
if (CommonConstants.TWO_STRING.equals(settleDomain.getManagementType())) { if (CommonConstants.TWO_STRING.equals(settleDomain.getManagementType())) {
gMoney = settleDomain.getManagementFee(); gMoney = settleDomain.getManagementFee();
} else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) { } else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) {
gMoney = settleDomain.getManagementFee(); gMoney = settleDomain.getManagementFee();
} else {
isSum = 1;
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(),
settleDomain.getManagementFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
} else { } else {
isSum = 1; gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(),
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) { settleDomain.getManagementFee().divide(new BigDecimal("100"),
gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(), CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
settleDomain.getManagementFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
} else {
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,
settleDomain.getManagementFee().toString(), settleDomain.getManagementType(),
gMoney, socialFundFlag, redisKey);
} }
} }
if (!exitFlag || isSum == 1) {
isIncomeFlag = true;
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.ONE_STRING,
settleDomain.getManagementFee().toString(), settleDomain.getManagementType(),
gMoney, socialFundFlag, redisKey);
}
} }
if (Common.isNotNull(settleDomain.getRiskServerItem()) && ((settleDomain.getRiskServerItem().contains(CommonConstants.ONE_STRING) if (Common.isNotNull(settleDomain.getRiskServerItem()) && ((settleDomain.getRiskServerItem().contains(CommonConstants.ONE_STRING)
&& CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getRiskServerItem().contains(CommonConstants.TWO_STRING) && CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getRiskServerItem().contains(CommonConstants.TWO_STRING)
&& CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) { && CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())
//预估模式 && CommonConstants.TWO_STRING.equals(settleDomain.getMrSettleType())
if (CommonConstants.TWO_STRING.equals(settleDomain.getMrSettleType()) && && CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) { //实缴模式
BigDecimal money; BigDecimal money;
if (CommonConstants.TWO_STRING.equals(settleDomain.getRiskFundType())) { if (CommonConstants.TWO_STRING.equals(settleDomain.getRiskFundType())) {
money = settleDomain.getRiskFundFee(); money = settleDomain.getRiskFundFee();
} else if (CommonConstants.THREE_STRING.equals(settleDomain.getRiskFundType())) { } else if (CommonConstants.THREE_STRING.equals(settleDomain.getRiskFundType())) {
money = settleDomain.getRiskFundFee(); money = settleDomain.getRiskFundFee();
} else {
isSum = 2;
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
money = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(),
settleDomain.getRiskFundFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
} else { } else {
isSum = 2; money = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(),
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) { settleDomain.getRiskFundFee().divide(new BigDecimal("100"),
money = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(), CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
settleDomain.getRiskFundFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
} else {
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,
settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(),
money, socialFundFlag, redisKey);
} }
} }
if (!exitFlag || isSum == 2) {
isIncomeFlag = true;
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.TWO_STRING,
settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(),
money, socialFundFlag, redisKey);
}
} }
if (!isIncomeFlag) { if (!isIncomeFlag) {
baseMapper.updateBySocialIncomeFlag(paymentInfo.getId()); baseMapper.updateBySocialIncomeFlag(paymentInfo.getId());
......
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