update 累计列表处理0
This commit is contained in:
@@ -109,7 +109,7 @@ public class IndexService {
|
||||
allProjectStatisticsSearch.setPaymentYear(year);
|
||||
List<AllProjectStatistics> list = payWorkingGroupService.cumulativeListAllProjectMoney(allProjectStatisticsSearch);
|
||||
List<LineChartListVO> lineChartListVOList = convertLineChartListVO(list);
|
||||
return lineChartListVOList;
|
||||
return cumulativeProcesZero1(lineChartListVOList);
|
||||
|
||||
}
|
||||
|
||||
@@ -125,5 +125,28 @@ public class IndexService {
|
||||
}
|
||||
return list;
|
||||
}
|
||||
/**
|
||||
* 处理堆叠中的0
|
||||
*/
|
||||
private List<LineChartListVO> cumulativeProcesZero1 (List<LineChartListVO> list){
|
||||
for (int i = 1; i < list.size(); i++) {
|
||||
LineChartListVO old = list.get(i-1);
|
||||
LineChartListVO lineChartListVO = list.get(i);
|
||||
//如果为0就保存上一个数据
|
||||
if (lineChartListVO.getAllMoney().equals("0.00")) {
|
||||
lineChartListVO.setAllMoney(old.getAllMoney());
|
||||
}
|
||||
if (lineChartListVO.getBillMoney().equals("0.00")) {
|
||||
lineChartListVO.setBillMoney(old.getBillMoney());
|
||||
}
|
||||
if (lineChartListVO.getConfirmAmount().equals("0.00")) {
|
||||
lineChartListVO.setConfirmAmount(old.getConfirmAmount());
|
||||
}
|
||||
if (lineChartListVO.getComeAllMoney().equals("0.00")) {
|
||||
lineChartListVO.setComeAllMoney(old.getComeAllMoney());
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user