| | |
| | | ArrayList<Integer> data2 = new ArrayList<>(); |
| | | ArrayList<Double> data3 = new ArrayList<>(); |
| | | ArrayList<Double> data4 = new ArrayList<>(); |
| | | ArrayList<Double> data5 = new ArrayList<>(); |
| | | List<String> categories = new ArrayList<>(); |
| | | |
| | | final int n = 12; |
| | |
| | | int outV = 0; |
| | | double inC = 0; |
| | | double outC = 0; |
| | | double outD = 0; |
| | | for (WorkChartAxis w : listChart) { |
| | | if (w.getYmd() != null && key.equals(w.getYmd().trim())) { |
| | | inV = w.getInqty(); |
| | | outV = w.getOutqty(); |
| | | inC = w.getCubeInqty(); |
| | | outC = w.getCubeOutqty(); |
| | | outD = w.getOutTeu(); |
| | | break; |
| | | } |
| | | } |
| | |
| | | data2.add(outV); |
| | | data3.add(inC); |
| | | data4.add(outC); |
| | | data5.add(outD); |
| | | calendar.add(Calendar.HOUR_OF_DAY, 1); |
| | | } |
| | | |
| | |
| | | if (data3.size() >0) { |
| | | AxisBean cubeInqty = new AxisBean(); |
| | | cubeInqty.setName("入库体积"); |
| | | Integer[] array3 = new Integer[data3.size()]; |
| | | Double [] array3 = new Double[data3.size()]; |
| | | cubeInqty.setData(data3.toArray(array3)); |
| | | list.add(cubeInqty); |
| | | } |
| | | |
| | | if (data3.size() >0) { |
| | | if (data4.size() >0) { |
| | | AxisBean cubeOutqty = new AxisBean(); |
| | | cubeOutqty.setName("出库体积"); |
| | | Integer[] array4 = new Integer[data4.size()]; |
| | | Double[] array4 = new Double[data4.size()]; |
| | | cubeOutqty.setData(data4.toArray(array4)); |
| | | list.add(cubeOutqty); |
| | | } |
| | | |
| | | if (data5.size() >0) { |
| | | AxisBean cubeOutqty = new AxisBean(); |
| | | cubeOutqty.setName("出库TEU"); |
| | | Double[] array5 = new Double[data4.size()]; |
| | | cubeOutqty.setData(data5.toArray(array5)); |
| | | list.add(cubeOutqty); |
| | | } |
| | | |
| | | |
| | | map.put("categories", categories); |
| | | map.put("rows", list); |
| | | return R.ok(map); |