| | |
| | | StatisticsEventsVO.GridMemberVO a = null; |
| | | for (int i = 0; i < 4; i++) { |
| | | a = new StatisticsEventsVO.GridMemberVO(); |
| | | a.setRatio(new BigDecimal("0.20").setScale(2, RoundingMode.HALF_UP)); |
| | | a.setRatio(new BigDecimal("0.20").setScale(4, RoundingMode.HALF_UP)); |
| | | a.setName("团结屯"); |
| | | a.setCount(10); |
| | | gridMemberVOS.add(a); |
| | |
| | | StatisticsEventsVO.IndexSignsVO indexSignsVO = new StatisticsEventsVO.IndexSignsVO(); |
| | | indexSignsVO.setEvent(1); |
| | | indexSignsVO.setGridMember(20); |
| | | indexSignsVO.setCompletePercentage(new BigDecimal("0.60").setScale(2, RoundingMode.HALF_UP)); |
| | | indexSignsVO.setCompletePercentage(new BigDecimal("0.60").setScale(4, RoundingMode.HALF_UP)); |
| | | indexSignsVO.setEquipment(30); |
| | | indexSignsVO.setAccuracy(new BigDecimal("0.80").setScale(2, RoundingMode.HALF_UP)); |
| | | indexSignsVO.setAccuracy(new BigDecimal("0.80").setScale(4, RoundingMode.HALF_UP)); |
| | | indexSignsVO.setTrigger(10); |
| | | indexSignsVO.setLot(30); |
| | | indexSignsVO.setLotOnline(10); |
| | |
| | | @GetMapping("/team_index") |
| | | public CommonResult<List<TeamIndex>> teamIndex(@Validated CockpitVO params) { |
| | | checkApiUtil.cockpit(params); |
| | | LambdaQueryWrapper<TeamConstruction> queryWrapper = new LambdaQueryWrapper<TeamConstruction>().eq(TeamConstruction::getStatus, 1).eq(TeamConstruction::getIsDelete, 0); |
| | | List<TeamConstruction> list = teamConstructionService.list(queryWrapper); |
| | | List<TeamIndex> teamIndexList = BeanUtil.copyToList(list, TeamIndex.class); |
| | | |
| | | // LambdaQueryWrapper<TeamConstruction> queryWrapper = new LambdaQueryWrapper<TeamConstruction>().eq(TeamConstruction::getStatus, 1).eq(TeamConstruction::getIsDelete, 0); |
| | | // List<TeamConstruction> list = teamConstructionService.list(queryWrapper); |
| | | // List<TeamIndex> teamIndexList = BeanUtil.copyToList(list, TeamIndex.class); |
| | | // teamIndexList.forEach(o -> { |
| | | // o.setStepTimely(0.0); |
| | | // o.setStepDelayed(0.0); |
| | | // o.setStepOvertime(0.0); |
| | | // o.setHandleTimely(0.0); |
| | | // o.setHandleDelayed(0.0); |
| | | // o.setHandleOvertime(0.0); |
| | | // o.setNoHandle(0.0); |
| | | // }); |
| | | List<TeamIndex> teamIndexList = teamConstructionService.teamIndex(params.getBeginTime(), params.getEndTime()); |
| | | teamIndexList.forEach(o -> { |
| | | o.setStepTimely(0.6); |
| | | o.setStepDelayed(0.3); |
| | | o.setStepOvertime(0.1); |
| | | o.setHandleTimely(0.6); |
| | | o.setHandleDelayed(0.2); |
| | | o.setHandleOvertime(0.1); |
| | | o.setNoHandle(0.1); |
| | | |
| | | o.setAllocation(20 * ((double) o.getPunctualityCount() / (double) o.getAllCount()) |
| | | + 18 * ((double) o.getOverCount() / (double) o.getAllCount()) |
| | | + 15 * ((double) o.getNoHandleCount() / (double) o.getAllCount())); |
| | | o.setHandle(20 * ((double) o.getPunctualityCount() / (double) o.getAllCount()) |
| | | + 5 * ((double) o.getOverCount() / (double) o.getAllCount()) |
| | | - 2 * ((double) o.getNoHandleCount() / (double) o.getAllCount())); |
| | | |
| | | o.setOnline(0.0); |
| | | o.setDuration(0.0); |
| | | o.setDistance(0.0); |
| | | }); |
| | | return CommonResult.success(teamIndexList); |
| | | } |
| | | } |
| | | |
| | | |