#
luxiaotao1123
2020-11-17 93fc9c4b4f0e9bb25b5f2965511237faaf206e7c
src/main/java/com/zy/asrs/controller/MonitorController.java
@@ -45,6 +45,18 @@
    }
    /**
     * 获取其他信息
     */
    @GetMapping("/other")
    public R monitorOther() {
        return R.ok(
//                Cools.add("year", calendar.get(Calendar.YEAR))
        );
    }
    /**
     * 入库报表 -- 折线图
     */
    @GetMapping("/pakin/rep")
@@ -88,12 +100,22 @@
            pie.add(map3);
        }
        // 总库位数
        Integer total = (int) Arith.add(0, locUseRate.getFqty(), locUseRate.getOqty(), locUseRate.getUqty(), locUseRate.getXqty());
        // 使用中
        Integer used = locUseRate.getFqty() + locUseRate.getUqty();
        // 库位使用率
        double usedDivides = Arith.divides(3, used, total);
        double usedPr = Arith.multiplys(1, usedDivides, 100);
        return R.ok(
                Cools.add("pie", pie)
                .add("stockCunt", locUseRate.getFqty())
                .add("emptyCount", locUseRate.getOqty())
                .add("noneCount", locUseRate.getXqty())
                .add("total", total)
                .add("used", used)
                .add("usedPr", usedPr)
        );
    }