| | |
| | | @ApiOperation("实时作业效率") |
| | | @GetMapping("/workEfficiency") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type", value = "查询类型:0=入库;1=出库", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type", value = "查询类型:0=入库;1=出库,默认 0", required = true), |
| | | }) |
| | | public ApiResponse<List<WorkEfficiencyVO>> workEfficiency(@RequestParam Integer type) { |
| | | List<WorkEfficiencyVO> workEfficiencyVOList = new ArrayList<>(); |
| | | Random random = new Random(); |
| | | Integer totalWorkNum = 0; |
| | | for (int i = 8; i <= 20; i++) { |
| | | if(i%2==0){ |
| | | WorkEfficiencyVO workEfficiencyVO = new WorkEfficiencyVO(); |
| | | workEfficiencyVO.setWorkNum(200+random.nextInt(100)); |
| | | totalWorkNum = totalWorkNum + workEfficiencyVO.getWorkNum(); |
| | | workEfficiencyVO.setTotalWorkNum(totalWorkNum); |
| | | workEfficiencyVO.setWorkTime(StringUtils.leftPad(i+"",2,"0") +":00"); |
| | | workEfficiencyVOList.add(workEfficiencyVO); |
| | | } |
| | | } |
| | | List<WorkEfficiencyVO> workEfficiencyVOList = boardService.workEfficiency(type); |
| | | return ApiResponse.success(workEfficiencyVOList); |
| | | } |
| | | |
| | |
| | | @ApiOperation("实时月台作业信息") |
| | | @GetMapping("/platformWorkData") |
| | | public ApiResponse<List<PlatformWorkDataVO>> platformWorkData() { |
| | | List<PlatformWorkDataVO> platformWorkDataVOList = new ArrayList<>(); |
| | | Random random = new Random(); |
| | | for (int i = 0; i < 3; i++) { |
| | | PlatformWorkDataVO platformDurationVO = new PlatformWorkDataVO(); |
| | | platformDurationVO.setPlatformName(i+"_月台名称"); |
| | | platformDurationVO.setCarNo("皖A8" + random.nextInt(9) + random.nextInt(9) + random.nextInt(9) + random.nextInt(9)); |
| | | platformDurationVO.setWorkType(random.nextInt(1)); |
| | | platformDurationVO.setWorkNum(100+random.nextInt(100)); |
| | | platformDurationVO.setFinishTime(Long.valueOf(System.currentTimeMillis()/1000 + 200+random.nextInt(100))); |
| | | platformDurationVO.setStatus(random.nextInt(2)); |
| | | platformWorkDataVOList.add(platformDurationVO); |
| | | } |
| | | List<PlatformWorkDataVO> platformWorkDataVOList = boardService.platformWorkData(); |
| | | return ApiResponse.success(platformWorkDataVOList); |
| | | |
| | | } |
| | | |
| | | |