| | |
| | | JSONObject res; |
| | | List<StatDataTableVo> dataList; |
| | | Function<StatDataTableVo, ?> xfunc; |
| | | Function<StatDataTableVo, Integer> barfunc; |
| | | Function<StatDataTableVo, Integer> linefunc; |
| | | Function<StatDataTableVo, ?> barfunc; |
| | | Function<StatDataTableVo, ?> linefunc; |
| | | String barName = ""; |
| | | String lineName = ""; |
| | | if (param.getType() == 1) { |
| | |
| | | linefunc = StatDataTableVo::getCarCount; |
| | | barName = "加油数"; |
| | | lineName = "车流量"; |
| | | } else { |
| | | } else if (param.getType() == 2) { |
| | | dataList = oilRecordMapper.statFanByPosition(param); |
| | | xfunc = StatDataTableVo::getOilPosition; |
| | | barfunc = StatDataTableVo::getOilCount; |
| | | linefunc = StatDataTableVo::getOilVolume; |
| | | barName = "加油数"; |
| | | lineName = "油品销量"; |
| | | } else if (param.getType() == 3) { |
| | | dataList = oilRecordMapper.statFanByOilType(param); |
| | | xfunc = StatDataTableVo::getOilType; |
| | | barfunc = StatDataTableVo::getOilVolume; |
| | | linefunc = StatDataTableVo::getTotalAmount; |
| | | barName = "油品销量"; |
| | | lineName = "销售金额"; |
| | | } else { |
| | | dataList = oilRecordMapper.statFanByOilType(param); |
| | | xfunc = StatDataTableVo::getOilType; |
| | | barfunc = StatDataTableVo::getTotalAmount; |
| | | linefunc = StatDataTableVo::getOilVolume; |
| | | barName = "销售金额"; |
| | | lineName = "油品销量"; |
| | | } |
| | | res = dataTransLists(dataList, xfunc, barfunc, linefunc, barName, lineName); |
| | | return res; |