自动化立体仓库 - WMS系统
zjj
2023-06-17 61d28206585b8746a9f1982cfe1dfc5deabde91a
src/main/java/com/zy/asrs/controller/LocDetlController.java
@@ -242,11 +242,20 @@
    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);
@@ -281,7 +290,7 @@
     */
    @RequestMapping("/locDetl/count")
    public R getAllCount(){
        Integer sum = locDetlService.sum();
        Double sum = locDetlService.sumAll();
        return R.ok(sum);
    }