| | |
| | | log.info("[comb] cache: {}", param == null ? "null" : JSON.toJSONString(param)); |
| | | request.setAttribute("cache", param); |
| | | } |
| | | |
| | | if (Cools.isEmpty(param)) { |
| | | return R.error("没有入库数据"); |
| | | } |
| | | boolean boo =false; |
| | | for (MesToCombParam mesToCombParam : param) { |
| | | if (mesToCombParam.getOperateType()==2){ |
| | | int countLoc = locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet", mesToCombParam.getPalletId())); |
| | | int countWrk = wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet", mesToCombParam.getPalletId())); |
| | | int countwait = waitPakinService.selectCount(new EntityWrapper<WaitPakin>().eq("zpallet",mesToCombParam.getPalletId()).eq("io_status", "Y")); |
| | | if (countLoc > 0 || countWrk > 0 || countwait > 0) { |
| | | return R.error(mesToCombParam.getPalletId()+"-工作档/库存条码数据已存在,无法删除"); |
| | | } |
| | | waitPakinService.delete(new EntityWrapper<WaitPakin>().eq("zpallet",mesToCombParam.getPalletId())); |
| | | boo = true; |
| | | } |
| | | } |
| | | if (boo){ |
| | | return R.ok(); |
| | | } |
| | | List<MesToCombParam> errorComb = Lists.newArrayList(); |
| | | List<MesToCombParam> validComb = Lists.newArrayList(); |
| | | for (MesToCombParam mesToCombParam : param) { |
| | |
| | | List<WorkChartAxis> listChart = reportQueryMapper.getChartAxis(); |
| | | |
| | | if(listChart!=null) { |
| | | ArrayList<Integer> data1 = new ArrayList<Integer>(); |
| | | ArrayList<Integer> data2 = new ArrayList<Integer>(); |
| | | ArrayList<Number> data1 = new ArrayList<Number>(); |
| | | ArrayList<Number> data2 = new ArrayList<Number>(); |
| | | |
| | | SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | Calendar calendar = Calendar.getInstance(); |
| | |
| | | } |
| | | AxisBean inqty = new AxisBean(); |
| | | inqty.setName("入库托盘数"); |
| | | Integer[] array1 = new Integer[data1.size()]; |
| | | Number[] array1 = new Number[data1.size()]; |
| | | inqty.setData(data1.toArray(array1)); |
| | | list.add(inqty); |
| | | AxisBean outqty = new AxisBean(); |
| | | outqty.setName("出库托盘数"); |
| | | Integer[] array2 = new Integer[data2.size()]; |
| | | Number[] array2 = new Number[data2.size()]; |
| | | outqty.setData(data2.toArray(array2)); |
| | | list.add(outqty); |
| | | |
| | | AxisBean teu= new AxisBean(); |
| | | teu.setName("TEU"); |
| | | List<WorkTeuTotalAxis> workTeuTotalAxes = reportQueryMapper.getteuTotal(); |
| | | ArrayList<Integer> data3 = new ArrayList<>(); |
| | | ArrayList<Number> data3 = new ArrayList<Number>(); |
| | | for (WorkTeuTotalAxis w : workTeuTotalAxes) { |
| | | data3.add(w.getTeu_total()); |
| | | } |
| | | Integer[] array3 = new Integer[data3.size()]; |
| | | Number[] array3 = new Number[data3.size()]; |
| | | teu.setData(data3.toArray(array3)); |
| | | list.add(teu); |
| | | |
| | | AxisBean cube5 = new AxisBean(); |
| | | cube5.setName("入库体积"); |
| | | AxisBean cube15 = new AxisBean(); |
| | | cube15.setName("出库体积"); |
| | | List<WorkCubeTotalAxis> workCubeTotalAxes = reportQueryMapper.getCubeTotal(); |
| | | Map<String, WorkCubeTotalAxis> cubeMap = new HashMap<String, WorkCubeTotalAxis>(); |
| | | if (workCubeTotalAxes != null) { |
| | | for (WorkCubeTotalAxis w : workCubeTotalAxes) { |
| | | if (w.getYmd() != null) { |
| | | cubeMap.put(w.getYmd(), w); |
| | | } |
| | | } |
| | | } |
| | | ArrayList<Number> data4 = new ArrayList<Number>(); |
| | | ArrayList<Number> data5 = new ArrayList<Number>(); |
| | | SimpleDateFormat sfCube = new SimpleDateFormat("yyyy-MM-dd"); |
| | | Calendar calendarCube = Calendar.getInstance(); |
| | | calendarCube.add(Calendar.DATE, -12); |
| | | for (int i = 0; i < 12; i++) { |
| | | calendarCube.add(Calendar.DATE, 1); |
| | | String str = sfCube.format(calendarCube.getTime()); |
| | | WorkCubeTotalAxis cubeAxis = cubeMap.get(str); |
| | | data4.add(cubeAxis == null || cubeAxis.getCube5Total() == null ? 0 : cubeAxis.getCube5Total()); |
| | | data5.add(cubeAxis == null || cubeAxis.getCube15Total() == null ? 0 : cubeAxis.getCube15Total()); |
| | | } |
| | | Number[] array4 = new Number[data4.size()]; |
| | | cube5.setData(data4.toArray(array4)); |
| | | list.add(cube5); |
| | | Number[] array5 = new Number[data5.size()]; |
| | | cube15.setData(data5.toArray(array5)); |
| | | list.add(cube15); |
| | | |
| | | } |
| | | map.put("rows",list); |
| | | return R.ok(map); |
| | |
| | | |
| | | ArrayList<Integer> data1 = new ArrayList<>(); |
| | | ArrayList<Integer> data2 = new ArrayList<>(); |
| | | ArrayList<Double> data3 = new ArrayList<>(); |
| | | ArrayList<Double> data4 = new ArrayList<>(); |
| | | List<String> categories = new ArrayList<>(); |
| | | |
| | | final int n = 12; |
| | |
| | | |
| | | int inV = 0; |
| | | int outV = 0; |
| | | double inC = 0; |
| | | double outC = 0; |
| | | for (WorkChartAxis w : listChart) { |
| | | if (w.getYmd() != null && key.equals(w.getYmd().trim())) { |
| | | inV = w.getInqty(); |
| | | outV = w.getOutqty(); |
| | | inC = w.getCube_inqty(); |
| | | outC = w.getCube_outqty(); |
| | | break; |
| | | } |
| | | } |
| | |
| | | Integer[] array2 = new Integer[data2.size()]; |
| | | outqty.setData(data2.toArray(array2)); |
| | | list.add(outqty); |
| | | |
| | | AxisBean cubeInqty = new AxisBean(); |
| | | cubeInqty.setName("入库体积"); |
| | | Integer[] array3 = new Integer[data3.size()]; |
| | | cubeInqty.setData(data3.toArray(array3)); |
| | | list.add(cubeInqty); |
| | | |
| | | AxisBean cubeOutqty = new AxisBean(); |
| | | cubeOutqty.setName("出库体积"); |
| | | Integer[] array4 = new Integer[data4.size()]; |
| | | cubeOutqty.setData(data4.toArray(array4)); |
| | | list.add(cubeOutqty); |
| | | |
| | | map.put("categories", categories); |
| | | map.put("rows", list); |
| | |
| | | } |
| | | |
| | | // 总库位数 |
| | | Integer total = (int) Arith.add(0, locUseRate.getFqty(), locUseRate.getOqty(), locUseRate.getUqty(), locUseRate.getXqty()); |
| | | Integer total1 = (int) Arith.add(0, locUseRate.getFqty(), locUseRate.getOqty(), locUseRate.getUqty(), locUseRate.getXqty()); |
| | | Integer total = total1>40000?40000:total1; |
| | | // 使用中 |
| | | Integer used = locUseRate.getFqty() + locUseRate.getUqty(); |
| | | // 库位使用率 |