| | |
| | | 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) |
| | | ); |
| | | } |
| | | |
| | |
| | | method: 'GET', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | console.log(res.data); |
| | | pieChartOption.series[0].data = res.data.pie; |
| | | pieCharts.setOption(pieChartOption); |
| | | |