| | |
| | | BaseParam baseParam = buildParam(map, BaseParam.class); |
| | | PageParam<StockStatistic, BaseParam> pageParam = new PageParam<>(baseParam, StockStatistic.class); |
| | | QueryWrapper<StockStatistic> wrapper = pageParam.buildWrapper(true); |
| | | wrapper.select("id, day_time, COUNT( barcode ) `count`, SUM( anfme ) anfme, COUNT(IF (task_type = 1, 0, NULL)) in_anfme_count, COUNT(IF ( task_type = 101, 0, NULL)) out_anfme_count, SUM(CASE WHEN task_type = 1 THEN)"); |
| | | wrapper.select("id, day_time, COUNT( barcode ) `count`, " + |
| | | "SUM( anfme ) anfme," + |
| | | "COUNT(IF (task_type = 1, 0, NULL)) in_anfme_count, " + |
| | | "COUNT(IF ( task_type = 101, 0, NULL)) out_anfme_count, " + |
| | | "SUM( CASE WHEN task_type = 1 THEN anfme ELSE 0 END ) in_anfme," + |
| | | "SUM( CASE WHEN task_type = 101 THEN anfme ELSE 0 END ) out_anfme"); |
| | | wrapper.groupBy("barcode, day_time"); |
| | | return R.ok().add(stockStatisticService.page(pageParam, wrapper)); |
| | | } |