| | |
| | | @PostMapping("/arm/task/v1") |
| | | @AppAuth(memo = "分拣线上报接收") |
| | | public synchronized R TaskArmReport(@RequestHeader(required = false) String appkey, |
| | | @RequestBody TaskArmReportParam param, |
| | | HttpServletRequest request) { |
| | | @RequestBody TaskArmReportParam param, |
| | | HttpServletRequest request) { |
| | | auth(appkey, param, request); |
| | | if (Cools.isEmpty(param)) { |
| | | return R.parse(BaseRes.PARAM); |
| | |
| | | @PostMapping("/arm/task/cycle_result") |
| | | @AppAuth(memo = "单码完成") |
| | | public synchronized R TaskArmCycleResult(@RequestHeader(required = false) String appkey, |
| | | @RequestBody TaskArmCycleResultParam param, |
| | | HttpServletRequest request) { |
| | | @RequestBody TaskArmCycleResultParam param, |
| | | HttpServletRequest request) { |
| | | auth(appkey, param, request); |
| | | if (Cools.isEmpty(param)) { |
| | | return R.parse(BaseRes.PARAM); |
| | |
| | | @PostMapping("/arm/task/workspace_status") |
| | | @AppAuth(memo = "托盘完成") |
| | | public synchronized R TaskArmWorkspaceStatus(@RequestHeader(required = false) String appkey, |
| | | @RequestBody TaskArmWorkspaceStatusParam param, |
| | | HttpServletRequest request) { |
| | | @RequestBody TaskArmWorkspaceStatusParam param, |
| | | HttpServletRequest request) { |
| | | auth(appkey, param, request); |
| | | if (Cools.isEmpty(param)) { |
| | | return R.parse(BaseRes.PARAM); |
| | |
| | | @PostMapping("/arm/task/loc_status") |
| | | // @AppAuth(memo = "托盘就绪状态查询") |
| | | public synchronized R TaskArmLocStatus(@RequestHeader(required = false) String appkey, |
| | | @RequestBody ArmOKParam param, |
| | | HttpServletRequest request) { |
| | | @RequestBody ArmOKParam param, |
| | | HttpServletRequest request) { |
| | | auth(appkey, param, request); |
| | | if (Cools.isEmpty(param)) { |
| | | return R.parse(BaseRes.PARAM); |
| | |
| | | @PostMapping("/armAbnormalOperation") |
| | | // @AppAuth(memo = "异常上报") |
| | | public synchronized R ArmAbnormalOperation(@RequestHeader(required = false) String appkey, |
| | | @RequestBody TaskArmErrorParam param, |
| | | HttpServletRequest request) { |
| | | @RequestBody TaskArmErrorParam param, |
| | | HttpServletRequest request) { |
| | | auth(appkey, param, request); |
| | | if (Cools.isEmpty(param.getArm_no())) { |
| | | return R.error("机械臂编号[Arm_no]不能为空"); |
| | |
| | | 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()+"-工作档/库存条码数据已存在,无法删除"); |
| | | return R.error(mesToCombParam.getPalletId()+"-工作档/库存条码数据已存在,无法删除"); |
| | | } |
| | | waitPakinService.delete(new EntityWrapper<WaitPakin>().eq("zpallet",mesToCombParam.getPalletId())); |
| | | boo = true; |
| | |
| | | * 入出库按小时折线:横轴为「当前整点起向前共 12 小时」滚动窗口,与库表 ymd(yyyy-MM-dd HH)对齐 |
| | | */ |
| | | @GetMapping("/line/charts/hourly") |
| | | public synchronized R locIoLineChartsHourly() { |
| | | public synchronized R locIoLineChartsHourly() { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<AxisBean> list = new ArrayList<>(); |
| | | |
| | |
| | | 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); |