Commit b90ddfe9 authored by huyuchen's avatar huyuchen

生成收入接口修改

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