| | |
| | | import com.ycl.vo.cockpit.CockpitVO; |
| | | import com.ycl.vo.cockpit.statisticsEvents.StatisticsEventsVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | @ApiOperation(value = "执法事件") |
| | | @GetMapping("/law_enforcement_event") |
| | | public CommonResult<List<StatisticsEventsVO.LawEnforcementEventVO>> detection(@Validated CockpitVO.Params2VO params) { |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime()); |
| | | public CommonResult<List<StatisticsEventsVO.LawEnforcementEventVO>> detection(@Validated CockpitVO params) { |
| | | checkApiUtil.cockpit(params); |
| | | List<StatisticsEventsVO.LawEnforcementEventVO> lawEnforcementEventVOS = new ArrayList<>(); |
| | | StatisticsEventsVO.LawEnforcementEventVO a = null; |
| | | for (int i = 0; i < 4; i++) { |
| | |
| | | |
| | | @ApiOperation(value = "物联感知") |
| | | @GetMapping("/lot") |
| | | public CommonResult<List<StatisticsEventsVO.LotVO>> lot(@Validated CockpitVO.Params1VO params) { |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null); |
| | | public CommonResult<List<StatisticsEventsVO.LotVO>> lot(@Validated CockpitVO params) { |
| | | checkApiUtil.cockpit(params); |
| | | List<StatisticsEventsVO.LotVO> lotVOS = new ArrayList<>(); |
| | | StatisticsEventsVO.LotVO a = null; |
| | | for (int i = 0; i < 4; i++) { |
| | |
| | | a.setName("团结屯"); |
| | | a.setType("摄像头"); |
| | | a.setCount(10); |
| | | a.setRatio(new BigDecimal("-0.3").setScale(2, RoundingMode.HALF_UP)); |
| | | lotVOS.add(a); |
| | | } |
| | | return CommonResult.success(lotVOS); |
| | |
| | | |
| | | @ApiOperation(value = "执法队伍") |
| | | @GetMapping("/team") |
| | | public CommonResult<StatisticsEventsVO.TeamVO> team(@Validated CockpitVO.Params1VO params) { |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null); |
| | | public CommonResult<StatisticsEventsVO.TeamVO> team(@Validated CockpitVO params) { |
| | | checkApiUtil.cockpit(params); |
| | | StatisticsEventsVO.TeamVO teamVO = new StatisticsEventsVO.TeamVO(); |
| | | teamVO.setAll(30); |
| | | teamVO.setAssistant(10); |
| | |
| | | |
| | | @ApiOperation(value = "网格员") |
| | | @GetMapping("/grid_member") |
| | | public CommonResult<List<StatisticsEventsVO.GridMemberVO>> gridMember(@Validated CockpitVO.Params1VO params) { |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null); |
| | | public CommonResult<List<StatisticsEventsVO.GridMemberVO>> gridMember(@Validated CockpitVO params) { |
| | | checkApiUtil.cockpit(params); |
| | | List<StatisticsEventsVO.GridMemberVO> gridMemberVOS = new ArrayList<>(); |
| | | StatisticsEventsVO.GridMemberVO a = null; |
| | | for (int i = 0; i < 4; i++) { |
| | |
| | | |
| | | @ApiOperation(value = "指数体征") |
| | | @GetMapping("/index_signs") |
| | | public CommonResult<StatisticsEventsVO.IndexSignsVO> indexSigns(@Validated CockpitVO.Params1VO params) { |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null); |
| | | public CommonResult<StatisticsEventsVO.IndexSignsVO> indexSigns(@Validated CockpitVO params) { |
| | | checkApiUtil.cockpit(params); |
| | | StatisticsEventsVO.IndexSignsVO indexSignsVO = new StatisticsEventsVO.IndexSignsVO(); |
| | | indexSignsVO.setEvent(1); |
| | | indexSignsVO.setGridMember(20); |
| | |
| | | indexSignsVO.setEvaluationData(10); |
| | | return CommonResult.success(indexSignsVO); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "top10") |
| | | @GetMapping("/top10") |
| | | public CommonResult<List<StatisticsEventsVO.Top10VO>> top10(@Validated CockpitVO params) { |
| | | checkApiUtil.cockpit(params); |
| | | List<StatisticsEventsVO.Top10VO> ls = new ArrayList<>(); |
| | | ls.add(new StatisticsEventsVO.Top10VO("xx中队", 100.0)); |
| | | ls.add(new StatisticsEventsVO.Top10VO("xx中队", 90.0)); |
| | | ls.add(new StatisticsEventsVO.Top10VO("xx中队", 80.0)); |
| | | ls.add(new StatisticsEventsVO.Top10VO("xx中队", 70.0)); |
| | | return CommonResult.success(ls); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "AI算法") |
| | | @GetMapping("/arithmetic_event") |
| | | public CommonResult<List<StatisticsEventsVO.ArithmeticVO>> arithmeticEvent(@Validated CockpitVO params) { |
| | | checkApiUtil.cockpit(params); |
| | | List<StatisticsEventsVO.ArithmeticVO> ls = new ArrayList<>(); |
| | | ls.add(new StatisticsEventsVO.ArithmeticVO("xx中队", 10, 0.1)); |
| | | ls.add(new StatisticsEventsVO.ArithmeticVO("xx中队", 20, 0.2)); |
| | | ls.add(new StatisticsEventsVO.ArithmeticVO("xx中队", 30, 0.3)); |
| | | ls.add(new StatisticsEventsVO.ArithmeticVO("xx中队", 40, 0.4)); |
| | | return CommonResult.success(ls); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "城市体征看板") |
| | | @GetMapping("/city_panel") |
| | | public CommonResult<StatisticsEventsVO.CityPanelVo> cityPanel(@Validated CockpitVO params) { |
| | | checkApiUtil.cockpit(params); |
| | | |
| | | StatisticsEventsVO.CityPanelVo vo = new StatisticsEventsVO.CityPanelVo(92, 22, 12, 22, 34, 99, 9, 34, 6); |
| | | |
| | | return CommonResult.success(vo); |
| | | } |
| | | } |