Commit 789fae1f by lzxry

+套餐字段

parent 1249b9f9
...@@ -54,7 +54,9 @@ public class ShareIncomeServiceImpl implements ShareIncomeService { ...@@ -54,7 +54,9 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
private AccountRepository accountRepository; private AccountRepository accountRepository;
@Autowired @Autowired
private AccountFlowRestrictService accountFlowRestrictService; private AccountFlowRestrictService accountFlowRestrictService;
@Autowired
private PackageBaseRepository packageBaseRepository;
@Override @Override
public List<Contract> shareIncomeList(User loginAccount, String startDate, String endDate, String platform, String bodyCode, String serchName) { public List<Contract> shareIncomeList(User loginAccount, String startDate, String endDate, String platform, String bodyCode, String serchName) {
...@@ -110,6 +112,8 @@ public class ShareIncomeServiceImpl implements ShareIncomeService { ...@@ -110,6 +112,8 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
List<BarrioCity> barrioCities = barrioCityRepository.findAll(); List<BarrioCity> barrioCities = barrioCityRepository.findAll();
Map<Long, BarrioCity> barrioCitiesNameMap = barrioCities.stream().collect(Collectors.toMap(BarrioCity::getId, Function.identity(), (v1, v2) -> v1)); Map<Long, BarrioCity> barrioCitiesNameMap = barrioCities.stream().collect(Collectors.toMap(BarrioCity::getId, Function.identity(), (v1, v2) -> v1));
List<PackageBase> packageBases = packageBaseRepository.findByPlatAndStatus(platform, 1);
Map<Long, PackageBase> packageBaseMap = packageBases.stream().collect(Collectors.toMap(PackageBase::getId, Function.identity(), (v1, v2) -> v1));
DateTime start = new DateTime(startDate); DateTime start = new DateTime(startDate);
DateTime end = new DateTime(endDate); DateTime end = new DateTime(endDate);
...@@ -139,6 +143,8 @@ public class ShareIncomeServiceImpl implements ShareIncomeService { ...@@ -139,6 +143,8 @@ public class ShareIncomeServiceImpl implements ShareIncomeService {
v.setMyBodyName(bodiesNameMap.get(v.getMyBodyCode())); v.setMyBodyName(bodiesNameMap.get(v.getMyBodyCode()));
if(v.getBarrioId()!=null) if(v.getBarrioId()!=null)
v.setBarrioName(barrioCitiesNameMap.get(barrioCitiesNameMap.get(v.getBarrioId()).getParentId()).getName()); v.setBarrioName(barrioCitiesNameMap.get(barrioCitiesNameMap.get(v.getBarrioId()).getParentId()).getName());
if(v.getPriceLevel()!=null)
v.setPriceLevelName(packageBaseMap.get(v.getPriceLevel()).getPackageName());
}); });
} }
logger.info("计算分摊收入耗时:{}", (System.currentTimeMillis() - start_)); logger.info("计算分摊收入耗时:{}", (System.currentTimeMillis() - start_));
......
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