123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297 |
- package com.sooka.sponest.data.commandcenter.controller;
- import com.ruoyi.common.core.web.controller.BaseController;
- import com.ruoyi.common.core.web.domain.AjaxResult;
- import com.ruoyi.common.core.web.page.TableDataInfo;
- import com.ruoyi.common.security.utils.DictUtils;
- import com.sooka.sponest.data.commandcenter.domian.CommandCenterBO;
- import com.sooka.sponest.data.commandcenter.domian.ProjectBody;
- import com.sooka.sponest.data.commandcenter.service.ICommandCenterService;
- import com.sooka.sponest.data.digitalagriculture.domain.bo.AgricultureViewBO;
- import com.sooka.sponest.data.generalbusiness.domain.CenterdataTForestImportarea;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiImplicitParam;
- import io.swagger.annotations.ApiImplicitParams;
- import io.swagger.annotations.ApiOperation;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- import java.util.HashMap;
- import java.util.List;
- import java.util.Map;
- /**
- * 市指挥中心
- *
- * @author hanfucheng
- * @date 2023/4/25 9:31
- */
- @Api(tags = "市领导页面")
- @RestController
- @RequestMapping("commandCenter")
- public class CommandCenterController extends BaseController {
- @Autowired
- private ICommandCenterService commandCenterService;
- /**
- * 四长概况
- *
- * @param commandCenterBO
- * @return
- */
- @ApiOperation(value = "四长概况", notes = "四长概况")
- @GetMapping("/fourLengthOverview")
- @ApiImplicitParams(value = {
- @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
- @ApiImplicitParam(name = "timeTag", value = "日期标记", dataType = "String", required = false),
- @ApiImplicitParam(name = "keyWord", value = "关键字", dataType = "String", required = false),
- })
- public AjaxResult fourLengthOverview(CommandCenterBO commandCenterBO) {
- return AjaxResult.success(commandCenterService.fourLengthOverview(commandCenterBO));
- }
- /**
- * 四长概况点击事件
- *
- * @author hanfucheng
- * @date 2023/4/27 16:05
- */
- @ApiOperation(value = "四长概况click", notes = "四长概况click")
- @GetMapping("/fourLengthOverviewOther")
- @ApiImplicitParams(value = {
- @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
- @ApiImplicitParam(name = "timeTag", value = "日期标记", dataType = "String", required = false),
- @ApiImplicitParam(name = "keyWord", value = "关键字", dataType = "String", required = false),
- })
- public AjaxResult fourLengthOverviewOther(CommandCenterBO commandCenterBO) {
- Map<String, Object> resultMap = new HashMap<>();
- resultMap.put("structure", commandCenterService.getOverview(commandCenterBO));
- resultMap.put("plan", commandCenterService.planDegree(commandCenterBO));
- resultMap.put("task", commandCenterService.taskDegree(commandCenterBO));
- return AjaxResult.success(resultMap);
- }
- /**
- * 四长总数
- *
- * @author hanfucheng
- * @date 2023/7/26 15:38
- */
- @ApiOperation(value = "四长总数", notes = "四长总数")
- @GetMapping("/fourLengNum")
- @ApiImplicitParams(value = {
- @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
- })
- public AjaxResult fourLengNum(CommandCenterBO commandCenterBO) {
- return AjaxResult.success(commandCenterService.fourLengNum(commandCenterBO));
- }
- /**
- * 四长巡视距离
- *
- * @author hanfucheng
- * @date 2023/7/26 15:42
- */
- @ApiOperation(value = "四长巡视距离", notes = "四长巡视距离")
- @GetMapping("/patrolDistance")
- @ApiImplicitParams(value = {
- @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
- })
- public AjaxResult patrolDistance(CommandCenterBO commandCenterBO) {
- return AjaxResult.success(commandCenterService.patrolDistance(commandCenterBO));
- }
- /**
- * 重点工程
- *
- * @param commandCenterBO
- * @return
- */
- @ApiOperation(value = "重点工程", notes = "重点工程")
- @GetMapping("/getKeyProjects")
- @ApiImplicitParams(value = {
- @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
- @ApiImplicitParam(name = "timeTag", value = "日期标记", dataType = "String", required = false),
- @ApiImplicitParam(name = "keyWord", value = "关键字", dataType = "String", required = false),
- })
- public AjaxResult getKeyProjects(CommandCenterBO commandCenterBO) {
- return AjaxResult.success(commandCenterService.getKeyProjects(commandCenterBO));
- }
- @ApiOperation(value = "重点工程", notes = "重点工程")
- @GetMapping("/getKeyProjectsListOne")
- @ApiImplicitParams(value = {
- @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
- @ApiImplicitParam(name = "timeTag", value = "日期标记", dataType = "String", required = false),
- @ApiImplicitParam(name = "keyWord", value = "关键字", dataType = "String", required = false),
- })
- public TableDataInfo getKeyProjectsListOne(CommandCenterBO commandCenterBO) {
- startPage();
- List<ProjectBody> keyProjects = commandCenterService.getKeyProjects(commandCenterBO);
- return getDataTable(keyProjects);
- }
- @PostMapping(value = "/getKeyProjectsListOne")
- public TableDataInfo getKeyProjectsListOnePost(@RequestBody CommandCenterBO commandCenterBO){
- return getKeyProjectsListOne(commandCenterBO);
- }
- /**
- * 重点区域
- * @param commandCenterBO
- * @return
- */
- @ApiOperation(value = "重点区域", notes = "重点区域")
- @GetMapping("/getImportAreaList")
- @ApiImplicitParams(value = {
- @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
- @ApiImplicitParam(name = "timeTag", value = "日期标记", dataType = "String", required = false),
- @ApiImplicitParam(name = "keyWord", value = "关键字", dataType = "String", required = false),
- })
- public AjaxResult getImportAreaList(CommandCenterBO commandCenterBO) {
- return AjaxResult.success(commandCenterService.getImportAreaList(commandCenterBO));
- }
- /**
- * 重点区域
- * @param CenterdataTForestImportarea
- * @return
- */
- @ApiOperation(value = "重点区域", notes = "重点区域")
- @GetMapping("/getImportAreaListByParams")
- public AjaxResult getImportAreaListByParams(CenterdataTForestImportarea importarea) {
- startPage();
- List<CenterdataTForestImportarea> result = commandCenterService.getImportAreaListByParams(importarea);
- Map<String, Object> areaTypeList = DictUtils.getDictCacheToMap("area_type");
- Map<String, Object> projectLevelLists = DictUtils.getDictCacheToMap("centerdata_project_level");
- for (CenterdataTForestImportarea hashMap : result) {
- hashMap.setProjectTypeLabel(String.valueOf(areaTypeList.get(hashMap.getProjectType())));
- hashMap.setProjectLevelLabel(String.valueOf(projectLevelLists.get(hashMap.getProjectLevel())));
- }
- return AjaxResult.success(result);
- }
- @ApiOperation(value = "重点区域", notes = "重点区域")
- @GetMapping("/getImportAreaListOne")
- @ApiImplicitParams(value = {
- @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
- @ApiImplicitParam(name = "timeTag", value = "日期标记", dataType = "String", required = false),
- @ApiImplicitParam(name = "keyWord", value = "关键字", dataType = "String", required = false),
- })
- public TableDataInfo getImportAreaListOne(CommandCenterBO commandCenterBO) {
- startPage();
- List<Map<String, Object>> importAreas = commandCenterService.getImportAreaListPage(commandCenterBO);
- return getDataTable(importAreas);
- }
- /**
- * 一网通办
- *
- * @param commandCenterBO
- * @return
- */
- @ApiOperation(value = "一网通办", notes = "一网通办")
- @GetMapping("/allAtOnce")
- @ApiImplicitParams(value = {
- @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
- @ApiImplicitParam(name = "timeTag", value = "日期标记", dataType = "String", required = false),
- @ApiImplicitParam(name = "keyWord", value = "关键字", dataType = "String", required = false),
- })
- public AjaxResult allAtOnce(CommandCenterBO commandCenterBO) {
- return AjaxResult.success(commandCenterService.allAtOnce(commandCenterBO));
- }
- @ApiOperation(value = "机器人", notes = "机器人")
- @GetMapping("/searchAllYouWant")
- @ApiImplicitParams(value = {
- @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
- @ApiImplicitParam(name = "timeTag", value = "日期标记", dataType = "String", required = false),
- @ApiImplicitParam(name = "keyWord", value = "关键字", dataType = "String", required = false),
- })
- public AjaxResult searchAllYouWant(CommandCenterBO commandCenterBO) {
- return AjaxResult.success(commandCenterService.searchAllYouWant(commandCenterBO));
- }
- /**
- * 四长网格树状结构
- *
- * @author hanfucheng
- * @date 2023/5/6 9:11
- */
- @ApiOperation(value = "四长网格树状结构", notes = "四长网格树状结构")
- @GetMapping("/fourLengthOverTree")
- @ApiImplicitParams(value = {
- @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
- @ApiImplicitParam(name = "timeTag", value = "日期标记", dataType = "String", required = false),
- @ApiImplicitParam(name = "keyWord", value = "关键字", dataType = "String", required = false),
- })
- public AjaxResult fourLengthOverTree(CommandCenterBO commandCenterBO) {
- return AjaxResult.success(commandCenterService.fourLengthOverTree(commandCenterBO));
- }
- /**
- * 手机端四长列表
- *
- * @author hanfucheng
- * @date 2023/5/15 11:12
- */
- @ApiOperation(value = "手机端四长列表", notes = "手机端四长列表")
- @GetMapping("/fourLengthOver")
- @ApiImplicitParams(value = {
- @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
- @ApiImplicitParam(name = "timeTag", value = "日期标记", dataType = "String", required = false),
- @ApiImplicitParam(name = "keyWord", value = "关键字", dataType = "String", required = false),
- })
- public AjaxResult fourLengthOver(CommandCenterBO commandCenterBO) {
- return AjaxResult.success(commandCenterService.fourLengthOver(commandCenterBO));
- }
- /**
- * 资源列表
- *
- * @author hanfucheng
- * @date 2023/6/6 15:03
- */
- @ApiOperation(value = "资源列表", notes = "资源列表")
- @GetMapping("/resourceList")
- @ApiImplicitParams(value = {
- @ApiImplicitParam(name = "longitude", value = "经度", dataType = "String", required = false),
- @ApiImplicitParam(name = "latitude", value = "纬度", dataType = "String", required = false),
- @ApiImplicitParam(name = "type", value = "类型", dataType = "String", required = false),
- @ApiImplicitParam(name = "assort", value = "分类(1.生鲜乳收购站 2.饲料企业 3.屠宰企业)", dataType = "String", required = false),
- @ApiImplicitParam(name = "del", value = "删除标识", dataType = "String", required = false),
- @ApiImplicitParam(name = "radius", value = "距离", dataType = "String", required = false),
- @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
- @ApiImplicitParam(name = "name", value = "名称", dataType = "String", required = false),
- @ApiImplicitParam(name = "resourceType", value = "资源类型", dataType = "String", required = false),
- @ApiImplicitParam(name = "firehydrantType", value = "消火栓类型", dataType = "String", required = false),
- })
- public AjaxResult resourceList(AgricultureViewBO agricultureViewBO) {
- return AjaxResult.success(commandCenterService.resourceList(agricultureViewBO));
- }
- /**
- * 资源落点
- *
- * @author hanfucheng
- * @date 2023/6/6 14:16
- */
- @ApiOperation(value = "资源落点", notes = "资源落点")
- @GetMapping("/resourcePoint")
- @ApiImplicitParams(value = {
- @ApiImplicitParam(name = "longitude", value = "经度", dataType = "String", required = false),
- @ApiImplicitParam(name = "latitude", value = "纬度", dataType = "String", required = false),
- @ApiImplicitParam(name = "type", value = "类型", dataType = "String", required = false),
- @ApiImplicitParam(name = "assort", value = "分类(1.生鲜乳收购站 2.饲料企业 3.屠宰企业)", dataType = "String", required = false),
- @ApiImplicitParam(name = "del", value = "删除标识", dataType = "String", required = false),
- @ApiImplicitParam(name = "radius", value = "距离", dataType = "String", required = false),
- @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
- @ApiImplicitParam(name = "name", value = "名称", dataType = "String", required = false),
- @ApiImplicitParam(name = "resourceType", value = "资源类型", dataType = "String", required = false),
- @ApiImplicitParam(name = "firehydrantType", value = "消火栓类型", dataType = "String", required = false),
- })
- public AjaxResult resourcePoint(AgricultureViewBO agricultureViewBO) {
- List list = commandCenterService.resourcePoint(agricultureViewBO);
- return AjaxResult.success(list);
- }
- }
|