| | |
| | | public R statis(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam Map<String, Object> param) { |
| | | Page<LocDetl> stockStatis = locDetlService.getStockStatis(toPage(curr, limit, param, LocDetl.class)); |
| | | for (LocDetl locDetl : stockStatis.getRecords()) { |
| | | Mat mat = matService.selectByMatnr(locDetl.getMatnr()); |
| | | // Page<LocDetl> stockStatis = locDetlService.getStockStatis(toPage(curr, limit, param, LocDetl.class)); |
| | | // for (LocDetl locDetl : stockStatis.getRecords()) { |
| | | // Mat mat = matService.selectByMatnr(locDetl.getMatnr()); |
| | | // if (mat != null) { |
| | | // locDetl.sync(mat); |
| | | // } |
| | | // } |
| | | // return R.ok().add(stockStatis); |
| | | |
| | | Page<LocDetlAll> stockStatis = locDetlService.getStockStatisAll(toPage(curr, limit, param, LocDetlAll.class)); |
| | | for (LocDetlAll locDetlAll : stockStatis.getRecords()) { |
| | | Mat mat = matService.selectByMatnr(locDetlAll.getMatnr()); |
| | | if (mat != null) { |
| | | locDetl.sync(mat); |
| | | locDetlAll.sync(mat); |
| | | } |
| | | } |
| | | return R.ok().add(stockStatis); |
| | |
| | | */ |
| | | @RequestMapping("/locDetl/count") |
| | | public R getAllCount(){ |
| | | Integer sum = locDetlService.sum(); |
| | | Double sum = locDetlService.sumAll(); |
| | | return R.ok(sum); |
| | | } |
| | | |