Merge branch 'master' of http://42.193.1.25:9521/r/sccg_server
| | |
| | | import com.ycl.vo.cockpit.CockpitVO; |
| | | import com.ycl.vo.cockpit.aiIot.AIIotVO; |
| | | 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; |
| | |
| | | @ApiOperation(value = "监测数据") |
| | | @GetMapping("/detection") |
| | | public CommonResult<AIIotVO.DetectionVO> detection(@Validated CockpitVO.Params1VO params) { |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null); |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null,null); |
| | | AIIotVO.DetectionVO detectionVO = new AIIotVO.DetectionVO(); |
| | | detectionVO.setVideo(121); |
| | | detectionVO.setIndividual(20); |
| | |
| | | |
| | | @ApiOperation(value = "实时视频监控") |
| | | @GetMapping("/video") |
| | | public CommonResult<List<AIIotVO.VideoVO>> video(@Validated CockpitVO.Params1VO params) { |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null); |
| | | @ApiImplicitParam(name = "regionId",value = "地区Id",required = true,dataType = "String") |
| | | public CommonResult<List<AIIotVO.VideoVO>> video(@Validated CockpitVO.Params1VO params, @RequestParam(required = true)String regionId) { |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null,regionId); |
| | | List<AIIotVO.VideoVO> videoVOS = new ArrayList<>(); |
| | | AIIotVO.VideoVO a = null; |
| | | for (int i = 0; i < 4; i++) { |
| | |
| | | @ApiOperation(value = "AI算法效能") |
| | | @GetMapping("/efficiency") |
| | | public CommonResult<List<AIIotVO.EfficiencyVO>> efficiency(@Validated CockpitVO.Params2VO params) { |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime()); |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime(),null); |
| | | List<AIIotVO.EfficiencyVO> efficiencyVOS = new ArrayList<>(); |
| | | AIIotVO.EfficiencyVO a = null; |
| | | for (int i = 0; i < 4; i++) { |
| | |
| | | @ApiOperation(value = "渣土联动") |
| | | @GetMapping("/slag_car") |
| | | public CommonResult<AIIotVO.SlagCarVO> slagCar(@Validated CockpitVO.Params1VO params) { |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null); |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null,null); |
| | | AIIotVO.SlagCarVO slagCarVO = new AIIotVO.SlagCarVO(); |
| | | slagCarVO.setCar(236); |
| | | slagCarVO.setTeam(20); |
| | |
| | | @ApiOperation(value = "AI事件统计") |
| | | @GetMapping("/event_statistics") |
| | | public CommonResult<List<AIIotVO.StatisticsVO>> statistics(@Validated CockpitVO.Params2VO params) { |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime()); |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime(),null); |
| | | List<AIIotVO.StatisticsVO> statisticsVOS = new ArrayList<>(); |
| | | List<AIIotVO.Statistics1VO> statistics1VOS = new ArrayList<>(); |
| | | AIIotVO.StatisticsVO a = null; |
| | |
| | | @ApiOperation(value = "执法事件统计") |
| | | @GetMapping("/statistics") |
| | | public CommonResult<Map<String, Object>> statistics(@Validated CockpitVO.Params2VO params) { |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime()); |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime(),null); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | EnforcementEventsVO.StatisticsEventVO eventVO = new EnforcementEventsVO.StatisticsEventVO(); |
| | | eventVO.setCount(10); |
| | |
| | | @ApiOperation(value = "事件类型") |
| | | @GetMapping("/type") |
| | | public CommonResult<EnforcementEventsVO.TypeAndSourceVO> type(@Validated CockpitVO.Params2VO params) { |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime()); |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime(),null); |
| | | List<EnforcementEventsVO.TypeAndSourceVO1> typeVO1s = new ArrayList<>(); |
| | | EnforcementEventsVO.TypeAndSourceVO typeVO = new EnforcementEventsVO.TypeAndSourceVO(); |
| | | EnforcementEventsVO.TypeAndSourceVO1 typeVO1 = null; |
| | |
| | | @ApiOperation(value = "视频抓拍告发点位") |
| | | @GetMapping("/video") |
| | | public CommonResult<List<EnforcementEventsVO.VideoAndAreaVO>> video(@Validated CockpitVO.Params2VO params) { |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime()); |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime(),null); |
| | | List<EnforcementEventsVO.VideoAndAreaVO> videoVOS = new ArrayList<>(); |
| | | EnforcementEventsVO.VideoAndAreaVO videoVO = null; |
| | | for (int i = 0; i < 4; i++) { |
| | | videoVO = new EnforcementEventsVO.VideoAndAreaVO(); |
| | | videoVO.setName("团结屯"); |
| | | videoVO.setCount(10); |
| | | videoVO.setRatio(new BigDecimal("0.65").setScale(2, RoundingMode.HALF_UP)); |
| | | videoVOS.add(videoVO); |
| | | } |
| | | return CommonResult.success(videoVOS); |
| | |
| | | @ApiOperation(value = "事件来源") |
| | | @GetMapping("/source") |
| | | public CommonResult<EnforcementEventsVO.TypeAndSourceVO> source(@Validated CockpitVO.Params2VO params) { |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime()); |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime(),null); |
| | | List<EnforcementEventsVO.TypeAndSourceVO1> typeVO1s = new ArrayList<>(); |
| | | EnforcementEventsVO.TypeAndSourceVO typeVO = new EnforcementEventsVO.TypeAndSourceVO(); |
| | | EnforcementEventsVO.TypeAndSourceVO1 typeVO1 = null; |
| | |
| | | @ApiOperation(value = "事件区域统计") |
| | | @GetMapping("/area") |
| | | public CommonResult<List<EnforcementEventsVO.VideoAndAreaVO>> area(@Validated CockpitVO.Params2VO params) { |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime()); |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime(),null); |
| | | List<EnforcementEventsVO.VideoAndAreaVO> videoVOS = new ArrayList<>(); |
| | | EnforcementEventsVO.VideoAndAreaVO videoVO = null; |
| | | for (int i = 0; i < 4; i++) { |
| | |
| | | @ApiOperation(value = "延误事件") |
| | | @GetMapping("/delay") |
| | | public CommonResult<List<EnforcementEventsVO.DelayVO>> delay(@Validated CockpitVO.Params2VO params) { |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime()); |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime(),null); |
| | | List<EnforcementEventsVO.DelayVO> delayVOS = new ArrayList<>(); |
| | | EnforcementEventsVO.DelayVO delayVO = null; |
| | | for (int i = 0; i < 4; i++) { |
| | |
| | | @ApiOperation(value = "事件信息") |
| | | @GetMapping("/info") |
| | | public CommonResult<EnforcementEventsVO.InfoVO> info(@Validated CockpitVO.Params2VO params) { |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime()); |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime(),null); |
| | | EnforcementEventsVO.InfoVO infoVO = new EnforcementEventsVO.InfoVO(); |
| | | EnforcementEventsVO.EventVO eventVO = new EnforcementEventsVO.EventVO(); |
| | | infoVO.setToday(5); |
| | |
| | | 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; |
| | |
| | | |
| | | @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()); |
| | | @ApiImplicitParam(name = "regionId",value = "地区Id",required = true,dataType = "String") |
| | | public CommonResult<List<StatisticsEventsVO.LawEnforcementEventVO>> detection(@Validated CockpitVO.Params2VO params, @RequestParam(required = true)String regionId) { |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), params.getBeginTime(), params.getEndTime(),regionId); |
| | | 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); |
| | | @ApiImplicitParam(name = "regionId",value = "地区Id",required = true,dataType = "String") |
| | | public CommonResult<List<StatisticsEventsVO.LotVO>> lot(@Validated CockpitVO.Params1VO params,@RequestParam(required = true)String regionId) { |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null,regionId); |
| | | 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); |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null,null); |
| | | 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); |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null,null); |
| | | 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); |
| | | checkApiUtil.cockpit(params.getAppId(), params.getAppKey(), params.getSign(), null, null,null); |
| | | StatisticsEventsVO.IndexSignsVO indexSignsVO = new StatisticsEventsVO.IndexSignsVO(); |
| | | indexSignsVO.setEvent(1); |
| | | indexSignsVO.setGridMember(20); |
| | |
| | | package com.ycl.controller.epuipment; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ycl.annotation.LogSave; |
| | | import com.ycl.api.CommonResult; |
| | |
| | | |
| | | @GetMapping("/query") |
| | | @ApiOperation("查询") |
| | | @LogSave |
| | | public CommonResult<Page<HandheldTerminalVo>> search(@RequestParam(required = false) Integer size, |
| | | @RequestParam(required = false) Integer current, |
| | | @RequestParam(required = false) Short state) { |
| | | return CommonResult.success(handheldTerminalService.search(size, current, state)); |
| | | @LogSave(operationType = "手持设备管理", contain = "查询") |
| | | public CommonResult<IPage<HandheldTerminalVo>> search(@RequestParam(required = true) Integer currentPage, |
| | | @RequestParam(required = true) Integer pageSize, |
| | | @RequestParam(required = false) Short state) { |
| | | return CommonResult.success(handheldTerminalService.search(pageSize, currentPage, state)); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ycl.annotation.LogSave; |
| | | import com.ycl.api.CommonResult; |
| | |
| | | @GetMapping("/query") |
| | | @ApiOperation("查询") |
| | | @LogSave |
| | | public CommonResult search(@RequestParam(required = false) Integer size, |
| | | @RequestParam(required = false) Integer current, |
| | | @RequestParam(required = false) Short state) { |
| | | return null; |
| | | public CommonResult<IPage<Loudspeaker>> search(@RequestParam(required = true) Integer currentPage, |
| | | @RequestParam(required = true) Integer pageSize, |
| | | @RequestParam(required = false) Short state) { |
| | | return CommonResult.success(loudspeakerService.search(pageSize, currentPage, state)); |
| | | } |
| | | |
| | | @PostMapping("/add") |
New file |
| | |
| | | package com.ycl.controller.intelligentPatrol; |
| | | |
| | | import com.ycl.controller.BaseController; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * AnalysisController |
| | | * |
| | | * @author: AI |
| | | * @date: 2022-11-01 16:43 |
| | | * @version V1.0 |
| | | **/ |
| | | @RestController |
| | | @RequestMapping("/intelligentPatrol") |
| | | @Api(tags = "智能巡查") |
| | | public class AnalysisController extends BaseController { |
| | | } |
New file |
| | |
| | | package com.ycl.controller.intelligentPatrol; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ycl.annotation.LogSave; |
| | | import com.ycl.api.CommonResult; |
| | | import com.ycl.controller.BaseController; |
| | | import com.ycl.dto.statistics.UnlawfulDto; |
| | | import com.ycl.dto.statistics.UnlawfulShopDto; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | 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 java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * StatisticsController |
| | | * |
| | | * @version V1.0 |
| | | * @author: AI |
| | | * @date: 2022-11-01 16:40 |
| | | **/ |
| | | @RestController |
| | | @RequestMapping("/intelligentPatrol/statistics") |
| | | @Api(tags = "违章-违法统计") |
| | | public class StatisticsController extends BaseController { |
| | | |
| | | List<UnlawfulDto> ls = new ArrayList<>(Arrays.asList( |
| | | new UnlawfulDto("市场监管", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0), |
| | | new UnlawfulDto("公安", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0), |
| | | new UnlawfulDto("自然资源", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0), |
| | | new UnlawfulDto("生态环境", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0), |
| | | new UnlawfulDto("地方立法", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0), |
| | | new UnlawfulDto("地震", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0), |
| | | new UnlawfulDto("教育", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0), |
| | | new UnlawfulDto("经信", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0), |
| | | new UnlawfulDto("林业", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0), |
| | | new UnlawfulDto("农村环境卫生", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0), |
| | | new UnlawfulDto("气象", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0), |
| | | new UnlawfulDto("人防", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0), |
| | | new UnlawfulDto("水行政", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0), |
| | | new UnlawfulDto("应急管理", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0), |
| | | new UnlawfulDto("其他", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0)) |
| | | ); |
| | | |
| | | @GetMapping("/unlawful/type") |
| | | @ApiOperation("按违规类型统计") |
| | | @LogSave(operationType = "按违规类型统计", contain = "查询") |
| | | public CommonResult<IPage<UnlawfulDto>> searchByType(@RequestParam(required = true) Integer currentPage, |
| | | @RequestParam(required = true) Integer pageSize, |
| | | @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime beginTime, |
| | | @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime endTime) { |
| | | IPage<UnlawfulDto> page = new Page<>(); |
| | | page.setTotal(ls.size()); |
| | | page.setRecords(ls); |
| | | return CommonResult.success(page); |
| | | } |
| | | |
| | | @GetMapping("/unlawful/point") |
| | | @ApiOperation("按点位统计") |
| | | @LogSave(operationType = "按点位统计", contain = "查询") |
| | | public CommonResult<IPage<UnlawfulDto>> searchByPoint(@RequestParam(required = true) Integer currentPage, |
| | | @RequestParam(required = true) Integer pageSize, |
| | | @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime beginTime, |
| | | @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime endTime) { |
| | | IPage<UnlawfulDto> page = new Page<>(); |
| | | page.setTotal(ls.size()); |
| | | page.setRecords(ls); |
| | | return CommonResult.success(page); |
| | | } |
| | | |
| | | @GetMapping("/unlawful/time") |
| | | @ApiOperation("按时间统计") |
| | | @LogSave(operationType = "按时间统计", contain = "查询") |
| | | public CommonResult<IPage<UnlawfulDto>> searchByTime(@RequestParam(required = true) Integer currentPage, |
| | | @RequestParam(required = true) Integer pageSize, |
| | | @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime beginTime, |
| | | @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime endTime) { |
| | | IPage<UnlawfulDto> page = new Page<>(); |
| | | page.setTotal(ls.size()); |
| | | page.setRecords(ls); |
| | | return CommonResult.success(page); |
| | | } |
| | | |
| | | @GetMapping("/unlawful/area") |
| | | @ApiOperation("按区域统计") |
| | | @LogSave(operationType = "按区域统计", contain = "查询") |
| | | public CommonResult<IPage<UnlawfulDto>> searchByArea(@RequestParam(required = true) Integer currentPage, |
| | | @RequestParam(required = true) Integer pageSize, |
| | | @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime beginTime, |
| | | @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime endTime) { |
| | | IPage<UnlawfulDto> page = new Page<>(); |
| | | page.setTotal(ls.size()); |
| | | page.setRecords(ls); |
| | | return CommonResult.success(page); |
| | | } |
| | | |
| | | @GetMapping("/unlawful/shop") |
| | | @ApiOperation("门前三包统计") |
| | | @LogSave(operationType = "门前三包统计", contain = "查询") |
| | | public CommonResult<IPage<UnlawfulShopDto>> searchByShop(@RequestParam(required = true) Integer currentPage, |
| | | @RequestParam(required = true) Integer pageSize, |
| | | @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime beginTime, |
| | | @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime endTime) { |
| | | IPage<UnlawfulShopDto> page = new Page<>(); |
| | | List<UnlawfulShopDto> ls = new ArrayList<>(); |
| | | ls.add(new UnlawfulShopDto("店铺1", 100, 10, 1, 20, 5, 20, 0.6)); |
| | | ls.add(new UnlawfulShopDto("店铺2", 100, 10, 1, 20, 5, 20, 0.6)); |
| | | ls.add(new UnlawfulShopDto("店铺3", 100, 10, 1, 20, 5, 20, 0.6)); |
| | | ls.add(new UnlawfulShopDto("店铺4", 100, 10, 1, 20, 5, 20, 0.6)); |
| | | ls.add(new UnlawfulShopDto("店铺5", 100, 10, 1, 20, 5, 20, 0.6)); |
| | | ls.add(new UnlawfulShopDto("店铺6", 100, 10, 1, 20, 5, 20, 0.6)); |
| | | ls.add(new UnlawfulShopDto("店铺7", 100, 10, 1, 20, 5, 20, 0.6)); |
| | | ls.add(new UnlawfulShopDto("店铺8", 100, 10, 1, 20, 5, 20, 0.6)); |
| | | ls.add(new UnlawfulShopDto("店铺9", 100, 10, 1, 20, 5, 20, 0.6)); |
| | | ls.add(new UnlawfulShopDto("店铺10", 100, 10, 1, 20, 5, 20, 0.6)); |
| | | ls.add(new UnlawfulShopDto("店铺11", 100, 10, 1, 20, 5, 20, 0.7)); |
| | | ls.add(new UnlawfulShopDto("店铺12", 100, 10, 1, 20, 5, 20, 0.8)); |
| | | ls.add(new UnlawfulShopDto("店铺13", 100, 10, 1, 20, 5, 20, 0.9)); |
| | | page.setTotal(ls.size()); |
| | | page.setRecords(ls); |
| | | return CommonResult.success(page); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.dto.statistics; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | |
| | | /** |
| | | * UnlawfulTypeDto 按违规类型统计 |
| | | * |
| | | * @version V1.0 |
| | | * @author: AI |
| | | * @date: 2022-11-01 17:09 |
| | | **/ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class UnlawfulDto { |
| | | |
| | | /** |
| | | * 类型名称 |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * 事件总数 |
| | | */ |
| | | private Integer count; |
| | | |
| | | /** |
| | | * 占比 |
| | | */ |
| | | private Double ratio; |
| | | |
| | | /** |
| | | * 立案 |
| | | */ |
| | | private Integer register; |
| | | |
| | | /** |
| | | * 暂不立案 |
| | | */ |
| | | private Integer notRegister; |
| | | |
| | | /** |
| | | * 结案 |
| | | */ |
| | | private Integer closing; |
| | | |
| | | /** |
| | | * 再学习 |
| | | */ |
| | | private Integer relearn; |
| | | |
| | | /** |
| | | * 已审核 |
| | | */ |
| | | private Integer checked; |
| | | |
| | | /** |
| | | * 审核率 |
| | | */ |
| | | private Double checkedRatio; |
| | | |
| | | /** |
| | | * 立案率 |
| | | */ |
| | | private Double registerRatio; |
| | | |
| | | /** |
| | | * 准确率 |
| | | */ |
| | | private Double accuracyRatio; |
| | | } |
New file |
| | |
| | | package com.ycl.dto.statistics; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | |
| | | /** |
| | | * UnlawfulShopDto 门前三包统计 |
| | | * |
| | | * @version V1.0 |
| | | * @author: AI |
| | | * @date: 2022-11-01 17:09 |
| | | **/ |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | public class UnlawfulShopDto { |
| | | |
| | | /** |
| | | * 商户名称 |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * 事件总数 |
| | | */ |
| | | private Integer count; |
| | | |
| | | /** |
| | | * 包卫生 |
| | | */ |
| | | private Integer sanitation; |
| | | |
| | | /** |
| | | * 包秩续 |
| | | */ |
| | | private Integer orderliness; |
| | | |
| | | /** |
| | | * 包设施 |
| | | */ |
| | | private Integer facility; |
| | | |
| | | /** |
| | | * 立案 |
| | | */ |
| | | private Integer register; |
| | | |
| | | /** |
| | | * 已审核 |
| | | */ |
| | | private Integer checked; |
| | | |
| | | |
| | | /** |
| | | * 立案率 |
| | | */ |
| | | private Double registerRatio; |
| | | |
| | | } |
| | |
| | | package com.ycl.mapper.equipment; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ycl.vo.equipment.HandheldTerminalVo; |
| | | import com.ycl.entity.equipment.HandheldTerminal; |
| | |
| | | */ |
| | | public interface HandheldTerminalMapper extends BaseMapper<HandheldTerminal> { |
| | | |
| | | Page<HandheldTerminalVo> search(Page<HandheldTerminalVo> page, @Param("state") Short state); |
| | | IPage<HandheldTerminalVo> search(IPage<HandheldTerminalVo> page, @Param("state") Short state); |
| | | } |
| | |
| | | package com.ycl.service.equipment; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ycl.vo.equipment.HandheldTerminalVo; |
| | | import com.ycl.entity.equipment.HandheldTerminal; |
| | |
| | | * @since 2022-10-14 |
| | | */ |
| | | public interface IHandheldTerminalService extends IService<HandheldTerminal> { |
| | | Page<HandheldTerminalVo> search(Integer size, Integer current, Short state); |
| | | IPage<HandheldTerminalVo> search(Integer size, Integer current, Short state); |
| | | } |
| | |
| | | package com.ycl.service.equipment; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ycl.entity.equipment.EquipmentBayonet; |
| | | import com.ycl.entity.equipment.Loudspeaker; |
| | |
| | | * @since 2022-10-14 |
| | | */ |
| | | public interface ILoudspeakerService extends IService<Loudspeaker> { |
| | | IPage<Loudspeaker> search(Integer pageSize, Integer currentPage, Short state); |
| | | } |
| | |
| | | package com.ycl.service.equipment.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.vo.equipment.HandheldTerminalVo; |
| | |
| | | @Service |
| | | public class HandheldTerminalServiceImpl extends ServiceImpl<HandheldTerminalMapper, HandheldTerminal> implements IHandheldTerminalService { |
| | | @Override |
| | | public Page<HandheldTerminalVo> search(Integer size, Integer current, Short state) { |
| | | Page<HandheldTerminalVo> page = new Page<>(size, current); |
| | | page = baseMapper.search(page, state); |
| | | return page; |
| | | public IPage<HandheldTerminalVo> search(Integer size, Integer current, Short state) { |
| | | Page<HandheldTerminalVo> page = new Page<>(current, size); |
| | | IPage<HandheldTerminalVo> page1 = baseMapper.search(page, state); |
| | | return page1; |
| | | } |
| | | } |
| | |
| | | package com.ycl.service.equipment.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.entity.equipment.Loudspeaker; |
| | | import com.ycl.mapper.equipment.LoudspeakerMapper; |
| | | import com.ycl.service.equipment.ILoudspeakerService; |
| | | import com.ycl.vo.equipment.HandheldTerminalVo; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Service |
| | | public class LoudspeakerServiceImpl extends ServiceImpl<LoudspeakerMapper, Loudspeaker> implements ILoudspeakerService { |
| | | @Override |
| | | public IPage<Loudspeaker> search(Integer pageSize, Integer currentPage, Short state) { |
| | | Page<Loudspeaker> page = new Page<>(currentPage, pageSize); |
| | | LambdaQueryWrapper<Loudspeaker> queryWrapper = new LambdaQueryWrapper<Loudspeaker>().eq(state != null, Loudspeaker::getState, state); |
| | | return baseMapper.selectPage(page, queryWrapper); |
| | | } |
| | | } |
| | |
| | | /** |
| | | * 驾驶舱 |
| | | * |
| | | * @param appId |
| | | * @param appKey |
| | | * @param sign |
| | | * @param name |
| | | * @param beginTime |
| | | * @param endTime |
| | | * @param appId appId |
| | | * @param appKey appKey |
| | | * @param sign sign |
| | | * @param beginTime 开始时间 |
| | | * @param endTime 结束时间 |
| | | * @param regionId 区域Id |
| | | */ |
| | | public void cockpit(String appId, String appKey, String sign, String beginTime, String endTime) { |
| | | public void cockpit(String appId, String appKey, String sign, String beginTime, String endTime, String regionId) { |
| | | apiKeyService.checkIsExist(appId, appKey, "驾驶仓"); |
| | | StringBuffer sb = new StringBuffer(); |
| | | sb.append(appId); |
| | |
| | | sb.append(beginTime); |
| | | sb.append(endTime); |
| | | } |
| | | if (!StringUtils.isBlank(regionId)) { |
| | | sb.append(regionId); |
| | | } |
| | | result = MD5Util.md5Encrypt32Lower(sb.toString()); |
| | | if (!sign.equals(result)) { |
| | | throw new ApiException(ResultCode.SIGN_ERROR); |
| | |
| | | private String name; |
| | | @ApiModelProperty(value = "次数") |
| | | private Integer count; |
| | | @ApiModelProperty(value = "数据占比") |
| | | private BigDecimal ratio; |
| | | } |
| | | |
| | | @Data |
| | |
| | | private String name; |
| | | @ApiModelProperty(value = "数量") |
| | | private Integer count; |
| | | @ApiModelProperty(value = "比例") |
| | | private BigDecimal ratio; |
| | | } |
| | | |
| | | @ApiModel(description = "执法队伍") |
| | |
| | | LEFT JOIN ums_depart p on d.parent_id = p.id |
| | | <where> |
| | | <if test="state!=null"> |
| | | ht.state = #{carNum} |
| | | ht.state = #{state} |
| | | </if> |
| | | </where> |
| | | order by ht.id desc |