优化月核定流量列表接口
parent
0704035698
commit
029d92fc07
|
|
@ -149,10 +149,11 @@ public class StWaterRController {
|
|||
wrapper.orderBy(true, ObjectUtils.isEmpty(stWaterR.getIsAsc()) ? false : stWaterR.getIsAsc(), stWaterR.getOrderField());
|
||||
}
|
||||
list = service.list(wrapper);
|
||||
if(CollectionUtils.isNotEmpty(list)){
|
||||
ResMonthEcoFlow monthFlow = resMonthEcoFlowService.getOne(new QueryWrapper<ResMonthEcoFlow>().eq("month", Integer.valueOf(DateUtil.getYM().substring(4))));
|
||||
BigDecimal value = monthFlow.getValue();
|
||||
List<ResMonthEcoFlow> resMonthEcoFlows = resMonthEcoFlowService.list();
|
||||
if(CollectionUtils.isNotEmpty(list) && CollectionUtils.isNotEmpty(resMonthEcoFlows)){
|
||||
Map<Integer, BigDecimal> resMonthEcoFlowMap = resMonthEcoFlows.stream().collect(Collectors.toMap(ResMonthEcoFlow::getMonth, ResMonthEcoFlow::getValue));
|
||||
list.stream().forEach(w -> {
|
||||
BigDecimal value = resMonthEcoFlowMap.get(w.getTm().getMonth());
|
||||
w.setApprovalV(value);
|
||||
w.setIsStandard(w.getQ().compareTo(value) >= 0 ? true : false);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue