Commit b90ddfe9 authored by huyuchen's avatar huyuchen

生成收入接口修改

parent 813c5563
...@@ -3156,7 +3156,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3156,7 +3156,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
libraryFundInfoList = forecastLibraryService.list(Wrappers.<TForecastLibrary>query().lambda() libraryFundInfoList = forecastLibraryService.list(Wrappers.<TForecastLibrary>query().lambda()
.eq(TForecastLibrary::getEmpIdcard, sf.getEmpIdcard()) .eq(TForecastLibrary::getEmpIdcard, sf.getEmpIdcard())
.eq(TForecastLibrary::getDataType, CommonConstants.ONE_INT) .eq(TForecastLibrary::getDataType, CommonConstants.ONE_INT)
.eq(TForecastLibrary::getSettleDomainId,sf.getSettleDomain()) .eq(TForecastLibrary::getSettleDomainId,sf.getSettleDomainFund())
.eq(TForecastLibrary::getProvidentPayMonth, DateUtil.addMonth(1 - i))); .eq(TForecastLibrary::getProvidentPayMonth, DateUtil.addMonth(1 - i)));
if (Common.isNotNull(libraryFundInfoList)) { if (Common.isNotNull(libraryFundInfoList)) {
for (TForecastLibrary library :libraryFundInfoList) { for (TForecastLibrary library :libraryFundInfoList) {
...@@ -4047,8 +4047,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4047,8 +4047,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} }
} }
//判断是否为按人次收费
int isSum = 0;
if (Common.isNotNull(settleDomain)) { if (Common.isNotNull(settleDomain)) {
// 含有社保,则计算收入 // 含有社保,则计算收入
if (Common.isNotNull(settleDomain.getManageServerItem()) && settleDomain.getManageServerItem() if (Common.isNotNull(settleDomain.getManageServerItem()) && settleDomain.getManageServerItem()
...@@ -4057,10 +4055,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4057,10 +4055,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) { if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) {
if (CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) { if (CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) {
//预估模式只有按人次和人数收费 //预估模式只有按人次和人数收费
if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) { if (!isExist) {
isSum = 1;
}
if (!isExist || isSum == 1) {
createIncomeInsurance(library, settleDomain, CommonConstants.ONE_STRING, createIncomeInsurance(library, settleDomain, CommonConstants.ONE_STRING,
settleDomain.getManagementFee().toString(), settleDomain.getManagementType(), settleDomain.getManagementFee().toString(), settleDomain.getManagementType(),
settleDomain.getManagementFee()); settleDomain.getManagementFee());
...@@ -4072,11 +4067,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4072,11 +4067,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
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();
isSum = 2;
} else { } else {
gMoney = BigDecimalUtils.safeMultiply(library.getSumAll(),settleDomain.getManagementFee()); gMoney = BigDecimalUtils.safeMultiply(library.getSumAll(),settleDomain.getManagementFee());
} }
if (!isExist || isSum ==2) { if (!isExist) {
createIncomeInsurance(library, settleDomain, CommonConstants.ONE_STRING, createIncomeInsurance(library, settleDomain, CommonConstants.ONE_STRING,
settleDomain.getManagementFee().toString(), settleDomain.getManagementType(), gMoney); settleDomain.getManagementFee().toString(), settleDomain.getManagementType(), gMoney);
} }
...@@ -4087,10 +4081,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4087,10 +4081,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
//预估模式 //预估模式
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType()) && if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType()) &&
CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) { CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
if (CommonConstants.THREE_STRING.equals(settleDomain.getRiskFundType())) { if (!isExist) {
isSum = 3;
}
if (!isExist || isSum == 3) {
createIncomeInsurance(library, settleDomain, CommonConstants.TWO_STRING, createIncomeInsurance(library, settleDomain, CommonConstants.TWO_STRING,
settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(), settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(),
settleDomain.getRiskFundFee()); settleDomain.getRiskFundFee());
...@@ -4102,11 +4093,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4102,11 +4093,10 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
money = settleDomain.getRiskFundFee(); money = settleDomain.getRiskFundFee();
} else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) { } else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) {
money = settleDomain.getRiskFundFee(); money = settleDomain.getRiskFundFee();
isSum = 4;
} else { } else {
money = BigDecimalUtils.safeMultiply(library.getSumAll(), settleDomain.getRiskFundFee()); money = BigDecimalUtils.safeMultiply(library.getSumAll(), settleDomain.getRiskFundFee());
} }
if (!isExist || isSum == 4) { if (!isExist) {
createIncomeInsurance(library, settleDomain, CommonConstants.TWO_STRING, createIncomeInsurance(library, settleDomain, CommonConstants.TWO_STRING,
settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(), money); settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(), money);
} }
......
...@@ -326,7 +326,10 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -326,7 +326,10 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
isSaveAndUpdate = true; isSaveAndUpdate = true;
} }
} }
//办理成功生成收入
createIncomeInfo(library);
} }
if (isSaveAndUpdate) { if (isSaveAndUpdate) {
return R.ok(null, "执行成功!"); return R.ok(null, "执行成功!");
} else { } else {
...@@ -1596,7 +1599,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1596,7 +1599,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
.eq(TIncomeDetail::getEmpIdcard,library.getEmpIdcard()) .eq(TIncomeDetail::getEmpIdcard,library.getEmpIdcard())
.eq(TIncomeDetail::getDeptId,library.getSettleDomainId()) .eq(TIncomeDetail::getDeptId,library.getSettleDomainId())
.eq(TIncomeDetail::getSourceType,CommonConstants.TWO_STRING) .eq(TIncomeDetail::getSourceType,CommonConstants.TWO_STRING)
.eq(TIncomeDetail::getPayMonth,library.getSocialPayMonth())); .eq(TIncomeDetail::getPayMonth,library.getProvidentPayMonth()));
if (Common.isNotNull(updateList)) { if (Common.isNotNull(updateList)) {
for (TIncomeDetail upd : updateList) { for (TIncomeDetail upd : updateList) {
TIncomeDetail detail = new TIncomeDetail(); TIncomeDetail detail = new TIncomeDetail();
...@@ -2663,8 +2666,6 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -2663,8 +2666,6 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
} }
} }
//判断是否为按人次收费
int isSum = 0;
if (Common.isNotNull(settleDomain)) { if (Common.isNotNull(settleDomain)) {
// 含有社保,则计算收入 // 含有社保,则计算收入
if (Common.isNotNull(settleDomain.getManageServerItem()) && ((settleDomain.getManageServerItem().contains(CommonConstants.ONE_STRING) if (Common.isNotNull(settleDomain.getManageServerItem()) && ((settleDomain.getManageServerItem().contains(CommonConstants.ONE_STRING)
...@@ -2673,11 +2674,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -2673,11 +2674,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
//预估模式 //预估模式
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) { if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) {
if (CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) { if (CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) {
//预估模式只有按人次和人数收费 if (!isExist) {
if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) {
isSum = 1;
}
if (!isExist || isSum == 1) {
createIncomeInsurance(library, settleDomain, CommonConstants.ONE_STRING, createIncomeInsurance(library, settleDomain, CommonConstants.ONE_STRING,
settleDomain.getManagementFee().toString(), settleDomain.getManagementType(), settleDomain.getManagementFee().toString(), settleDomain.getManagementType(),
settleDomain.getManagementFee(), sourceType); settleDomain.getManagementFee(), sourceType);
...@@ -2689,11 +2686,10 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -2689,11 +2686,10 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
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();
isSum = 2;
} else { } else {
gMoney = BigDecimalUtils.safeMultiply(library.getSumAll(),settleDomain.getManagementFee()); gMoney = BigDecimalUtils.safeMultiply(library.getSumAll(),settleDomain.getManagementFee());
} }
if (!isExist || isSum ==2) { if (!isExist) {
createIncomeInsurance(library, settleDomain, CommonConstants.ONE_STRING, createIncomeInsurance(library, settleDomain, CommonConstants.ONE_STRING,
settleDomain.getManagementFee().toString(), settleDomain.getManagementType(), settleDomain.getManagementFee().toString(), settleDomain.getManagementType(),
gMoney, sourceType); gMoney, sourceType);
...@@ -2706,10 +2702,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -2706,10 +2702,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
//预估模式 //预估模式
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType()) && if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType()) &&
CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) { CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
if (CommonConstants.THREE_STRING.equals(settleDomain.getRiskFundType())) { if (!isExist) {
isSum = 3;
}
if (!isExist || isSum == 3) {
createIncomeInsurance(library, settleDomain, CommonConstants.TWO_STRING, createIncomeInsurance(library, settleDomain, CommonConstants.TWO_STRING,
settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(), settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(),
settleDomain.getRiskFundFee(),sourceType); settleDomain.getRiskFundFee(),sourceType);
...@@ -2721,11 +2714,10 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -2721,11 +2714,10 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
money = settleDomain.getRiskFundFee(); money = settleDomain.getRiskFundFee();
} else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) { } else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) {
money = settleDomain.getRiskFundFee(); money = settleDomain.getRiskFundFee();
isSum = 4;
} else { } else {
money = BigDecimalUtils.safeMultiply(library.getSumAll(), settleDomain.getRiskFundFee()); money = BigDecimalUtils.safeMultiply(library.getSumAll(), settleDomain.getRiskFundFee());
} }
if (!isExist || isSum == 4) { if (!isExist) {
createIncomeInsurance(library, settleDomain, CommonConstants.TWO_STRING, createIncomeInsurance(library, settleDomain, CommonConstants.TWO_STRING,
settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(), settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(),
money, sourceType); money, sourceType);
......
...@@ -2711,8 +2711,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2711,8 +2711,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
} }
//判断是否为按人次收费
int isSum = 0;
if (Common.isNotNull(settleDomain)) { if (Common.isNotNull(settleDomain)) {
// 含有社保,则计算收入 // 含有社保,则计算收入
if (Common.isNotNull(settleDomain.getManageServerItem()) && (settleDomain.getManageServerItem().contains(CommonConstants.ONE_STRING) if (Common.isNotNull(settleDomain.getManageServerItem()) && (settleDomain.getManageServerItem().contains(CommonConstants.ONE_STRING)
...@@ -2721,10 +2719,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2721,10 +2719,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) { if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType())) {
if (CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) { if (CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) {
//预估模式只有按人次和人数收费 //预估模式只有按人次和人数收费
if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) { if (!exitFlag) {
isSum = 1;
}
if (!exitFlag || isSum == 1) {
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.ONE_STRING, createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.ONE_STRING,
settleDomain.getManagementFee().toString(), settleDomain.getManagementType(), settleDomain.getManagementFee().toString(), settleDomain.getManagementType(),
settleDomain.getManagementFee(), socialFundFlag); settleDomain.getManagementFee(), socialFundFlag);
...@@ -2736,7 +2731,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2736,7 +2731,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
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();
isSum = 2;
} else { } else {
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) { if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(), settleDomain.getManagementFee()); gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(), settleDomain.getManagementFee());
...@@ -2744,7 +2738,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2744,7 +2738,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(), settleDomain.getManagementFee()); gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(), settleDomain.getManagementFee());
} }
} }
if (!exitFlag || isSum == 2) { if (!exitFlag) {
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.ONE_STRING, createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.ONE_STRING,
settleDomain.getManagementFee().toString(), settleDomain.getManagementType(), settleDomain.getManagementFee().toString(), settleDomain.getManagementType(),
gMoney, socialFundFlag); gMoney, socialFundFlag);
...@@ -2756,10 +2750,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2756,10 +2750,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
//预估模式 //预估模式
if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType()) && if (CommonConstants.ONE_STRING.equals(settleDomain.getMrSettleType()) &&
CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) { CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
if (CommonConstants.THREE_STRING.equals(settleDomain.getRiskFundType())) { if (!exitFlag) {
isSum = 3;
}
if (!exitFlag || isSum == 3) {
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.TWO_STRING, createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.TWO_STRING,
settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(), settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(),
settleDomain.getRiskFundFee(), socialFundFlag); settleDomain.getRiskFundFee(), socialFundFlag);
...@@ -2771,7 +2762,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2771,7 +2762,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
money = settleDomain.getRiskFundFee(); money = settleDomain.getRiskFundFee();
} else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) { } else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) {
money = settleDomain.getRiskFundFee(); money = settleDomain.getRiskFundFee();
isSum = 4;
} else { } else {
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) { if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
money = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(), settleDomain.getRiskFundFee()); money = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(), settleDomain.getRiskFundFee());
...@@ -2779,7 +2769,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2779,7 +2769,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
money = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(), settleDomain.getRiskFundFee()); money = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(), settleDomain.getRiskFundFee());
} }
} }
if (!exitFlag || isSum == 4) { if (!exitFlag) {
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.TWO_STRING, createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.TWO_STRING,
settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(), settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(),
money, socialFundFlag); money, socialFundFlag);
......
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