|
@ -207,12 +207,23 @@ public class TzcRebateApplicationServiceImpl implements TzcRebateApplicationServ |
|
|
configList.add(config); |
|
|
configList.add(config); |
|
|
} |
|
|
} |
|
|
// 建立费用
|
|
|
// 建立费用
|
|
|
Long costApplyId = tzcRebateApplication4CostService.buildCostAndActivity(rebate, argumentList, tzcRebateSubjectList, periodList, tzcRebateGoodsList, configList, rebateCenterList, levelsList); |
|
|
Long costApplyId = tzcRebateApplication4CostService.buildCostAndActivity( |
|
|
|
|
|
rebate, |
|
|
|
|
|
argumentList, |
|
|
|
|
|
tzcRebateSubjectList, |
|
|
|
|
|
periodList, |
|
|
|
|
|
tzcRebateGoodsList, |
|
|
|
|
|
configList, |
|
|
|
|
|
rebateCenterList, |
|
|
|
|
|
levelsList |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
// 绑定费用id
|
|
|
// 绑定费用id
|
|
|
tzcRebateService.update( |
|
|
tzcRebateService.update( |
|
|
new LambdaUpdateWrapper<TzcRebate>().eq(TzcRebate::getId,rebateId) |
|
|
new LambdaUpdateWrapper<TzcRebate>() |
|
|
.set(TzcRebate::getCostApplyId,costApplyId)); |
|
|
.eq(TzcRebate::getId,rebateId) |
|
|
|
|
|
.set(TzcRebate::getCostApplyId,costApplyId) |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
return rebate; |
|
|
return rebate; |
|
|
} |
|
|
} |
|
@ -287,14 +298,13 @@ public class TzcRebateApplicationServiceImpl implements TzcRebateApplicationServ |
|
|
*/ |
|
|
*/ |
|
|
public BigDecimal getMaxLevelsAmount(TzcRebateParam param){ |
|
|
public BigDecimal getMaxLevelsAmount(TzcRebateParam param){ |
|
|
int level = 0; |
|
|
int level = 0; |
|
|
String configString = ""; |
|
|
String[] configArr = null; |
|
|
for (TzcRebateLevelsConfigParam configParam : param.getConfigList()) { |
|
|
for (TzcRebateLevelsConfigParam configParam : param.getConfigList()) { |
|
|
if(configParam.getLevelNum()>level){ |
|
|
if(configParam.getLevelNum()>level){ |
|
|
level = configParam.getLevelNum(); |
|
|
level = configParam.getLevelNum(); |
|
|
configString = configParam.getLevelConfigs(); |
|
|
configArr = configParam.getLevelConfigs(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
String[] configArr = configString.split(","); |
|
|
|
|
|
BigDecimal maxAmount = BigDecimal.ZERO; |
|
|
BigDecimal maxAmount = BigDecimal.ZERO; |
|
|
for (TzcRebateLevelsParam levelsParam : param.getLevelsList()) { |
|
|
for (TzcRebateLevelsParam levelsParam : param.getLevelsList()) { |
|
|
String lvNum = levelsParam.getLevelNum()+""; |
|
|
String lvNum = levelsParam.getLevelNum()+""; |
|
@ -394,6 +404,7 @@ public class TzcRebateApplicationServiceImpl implements TzcRebateApplicationServ |
|
|
period.setSamePeriodAmount(periodParam.getSamePeriodAmount()); |
|
|
period.setSamePeriodAmount(periodParam.getSamePeriodAmount()); |
|
|
period.setCompensationFlag(periodParam.getCompensationFlag()); |
|
|
period.setCompensationFlag(periodParam.getCompensationFlag()); |
|
|
period.setRemark(periodParam.getRemark()); |
|
|
period.setRemark(periodParam.getRemark()); |
|
|
|
|
|
period.setExtRemark(periodParam.getExtRemark()); |
|
|
period.setTmpUk(periodParam.getTmpUk()); |
|
|
period.setTmpUk(periodParam.getTmpUk()); |
|
|
tzcRebatePeriodService.save(period); |
|
|
tzcRebatePeriodService.save(period); |
|
|
periodList.add(period); |
|
|
periodList.add(period); |
|
|