CommandCenterController.java 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. package com.sooka.sponest.data.commandcenter.controller;
  2. import com.ruoyi.common.core.web.controller.BaseController;
  3. import com.ruoyi.common.core.web.domain.AjaxResult;
  4. import com.ruoyi.common.core.web.page.TableDataInfo;
  5. import com.ruoyi.common.security.utils.DictUtils;
  6. import com.sooka.sponest.data.commandcenter.domian.CommandCenterBO;
  7. import com.sooka.sponest.data.commandcenter.domian.ProjectBody;
  8. import com.sooka.sponest.data.commandcenter.service.ICommandCenterService;
  9. import com.sooka.sponest.data.digitalagriculture.domain.bo.AgricultureViewBO;
  10. import com.sooka.sponest.data.generalbusiness.domain.CenterdataTForestImportarea;
  11. import io.swagger.annotations.Api;
  12. import io.swagger.annotations.ApiImplicitParam;
  13. import io.swagger.annotations.ApiImplicitParams;
  14. import io.swagger.annotations.ApiOperation;
  15. import org.springframework.beans.factory.annotation.Autowired;
  16. import org.springframework.web.bind.annotation.*;
  17. import java.util.HashMap;
  18. import java.util.List;
  19. import java.util.Map;
  20. /**
  21. * 市指挥中心
  22. *
  23. * @author hanfucheng
  24. * @date 2023/4/25 9:31
  25. */
  26. @Api(tags = "市领导页面")
  27. @RestController
  28. @RequestMapping("commandCenter")
  29. public class CommandCenterController extends BaseController {
  30. @Autowired
  31. private ICommandCenterService commandCenterService;
  32. /**
  33. * 四长概况
  34. *
  35. * @param commandCenterBO
  36. * @return
  37. */
  38. @ApiOperation(value = "四长概况", notes = "四长概况")
  39. @GetMapping("/fourLengthOverview")
  40. @ApiImplicitParams(value = {
  41. @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
  42. @ApiImplicitParam(name = "timeTag", value = "日期标记", dataType = "String", required = false),
  43. @ApiImplicitParam(name = "keyWord", value = "关键字", dataType = "String", required = false),
  44. })
  45. public AjaxResult fourLengthOverview(CommandCenterBO commandCenterBO) {
  46. return AjaxResult.success(commandCenterService.fourLengthOverview(commandCenterBO));
  47. }
  48. /**
  49. * 四长概况点击事件
  50. *
  51. * @author hanfucheng
  52. * @date 2023/4/27 16:05
  53. */
  54. @ApiOperation(value = "四长概况click", notes = "四长概况click")
  55. @GetMapping("/fourLengthOverviewOther")
  56. @ApiImplicitParams(value = {
  57. @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
  58. @ApiImplicitParam(name = "timeTag", value = "日期标记", dataType = "String", required = false),
  59. @ApiImplicitParam(name = "keyWord", value = "关键字", dataType = "String", required = false),
  60. })
  61. public AjaxResult fourLengthOverviewOther(CommandCenterBO commandCenterBO) {
  62. Map<String, Object> resultMap = new HashMap<>();
  63. resultMap.put("structure", commandCenterService.getOverview(commandCenterBO));
  64. resultMap.put("plan", commandCenterService.planDegree(commandCenterBO));
  65. resultMap.put("task", commandCenterService.taskDegree(commandCenterBO));
  66. return AjaxResult.success(resultMap);
  67. }
  68. /**
  69. * 四长总数
  70. *
  71. * @author hanfucheng
  72. * @date 2023/7/26 15:38
  73. */
  74. @ApiOperation(value = "四长总数", notes = "四长总数")
  75. @GetMapping("/fourLengNum")
  76. @ApiImplicitParams(value = {
  77. @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
  78. })
  79. public AjaxResult fourLengNum(CommandCenterBO commandCenterBO) {
  80. return AjaxResult.success(commandCenterService.fourLengNum(commandCenterBO));
  81. }
  82. /**
  83. * 四长巡视距离
  84. *
  85. * @author hanfucheng
  86. * @date 2023/7/26 15:42
  87. */
  88. @ApiOperation(value = "四长巡视距离", notes = "四长巡视距离")
  89. @GetMapping("/patrolDistance")
  90. @ApiImplicitParams(value = {
  91. @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
  92. })
  93. public AjaxResult patrolDistance(CommandCenterBO commandCenterBO) {
  94. return AjaxResult.success(commandCenterService.patrolDistance(commandCenterBO));
  95. }
  96. /**
  97. * 重点工程
  98. *
  99. * @param commandCenterBO
  100. * @return
  101. */
  102. @ApiOperation(value = "重点工程", notes = "重点工程")
  103. @GetMapping("/getKeyProjects")
  104. @ApiImplicitParams(value = {
  105. @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
  106. @ApiImplicitParam(name = "timeTag", value = "日期标记", dataType = "String", required = false),
  107. @ApiImplicitParam(name = "keyWord", value = "关键字", dataType = "String", required = false),
  108. })
  109. public AjaxResult getKeyProjects(CommandCenterBO commandCenterBO) {
  110. return AjaxResult.success(commandCenterService.getKeyProjects(commandCenterBO));
  111. }
  112. @ApiOperation(value = "重点工程", notes = "重点工程")
  113. @GetMapping("/getKeyProjectsListOne")
  114. @ApiImplicitParams(value = {
  115. @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
  116. @ApiImplicitParam(name = "timeTag", value = "日期标记", dataType = "String", required = false),
  117. @ApiImplicitParam(name = "keyWord", value = "关键字", dataType = "String", required = false),
  118. })
  119. public TableDataInfo getKeyProjectsListOne(CommandCenterBO commandCenterBO) {
  120. startPage();
  121. List<ProjectBody> keyProjects = commandCenterService.getKeyProjects(commandCenterBO);
  122. return getDataTable(keyProjects);
  123. }
  124. @PostMapping(value = "/getKeyProjectsListOne")
  125. public TableDataInfo getKeyProjectsListOnePost(@RequestBody CommandCenterBO commandCenterBO){
  126. return getKeyProjectsListOne(commandCenterBO);
  127. }
  128. /**
  129. * 重点区域
  130. * @param commandCenterBO
  131. * @return
  132. */
  133. @ApiOperation(value = "重点区域", notes = "重点区域")
  134. @GetMapping("/getImportAreaList")
  135. @ApiImplicitParams(value = {
  136. @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
  137. @ApiImplicitParam(name = "timeTag", value = "日期标记", dataType = "String", required = false),
  138. @ApiImplicitParam(name = "keyWord", value = "关键字", dataType = "String", required = false),
  139. })
  140. public AjaxResult getImportAreaList(CommandCenterBO commandCenterBO) {
  141. return AjaxResult.success(commandCenterService.getImportAreaList(commandCenterBO));
  142. }
  143. /**
  144. * 重点区域
  145. * @param CenterdataTForestImportarea
  146. * @return
  147. */
  148. @ApiOperation(value = "重点区域", notes = "重点区域")
  149. @GetMapping("/getImportAreaListByParams")
  150. public AjaxResult getImportAreaListByParams(CenterdataTForestImportarea importarea) {
  151. startPage();
  152. List<CenterdataTForestImportarea> result = commandCenterService.getImportAreaListByParams(importarea);
  153. Map<String, Object> areaTypeList = DictUtils.getDictCacheToMap("area_type");
  154. Map<String, Object> projectLevelLists = DictUtils.getDictCacheToMap("centerdata_project_level");
  155. for (CenterdataTForestImportarea hashMap : result) {
  156. hashMap.setProjectTypeLabel(String.valueOf(areaTypeList.get(hashMap.getProjectType())));
  157. hashMap.setProjectLevelLabel(String.valueOf(projectLevelLists.get(hashMap.getProjectLevel())));
  158. }
  159. return AjaxResult.success(result);
  160. }
  161. @ApiOperation(value = "重点区域", notes = "重点区域")
  162. @GetMapping("/getImportAreaListOne")
  163. @ApiImplicitParams(value = {
  164. @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
  165. @ApiImplicitParam(name = "timeTag", value = "日期标记", dataType = "String", required = false),
  166. @ApiImplicitParam(name = "keyWord", value = "关键字", dataType = "String", required = false),
  167. })
  168. public TableDataInfo getImportAreaListOne(CommandCenterBO commandCenterBO) {
  169. startPage();
  170. List<Map<String, Object>> importAreas = commandCenterService.getImportAreaListPage(commandCenterBO);
  171. return getDataTable(importAreas);
  172. }
  173. /**
  174. * 一网通办
  175. *
  176. * @param commandCenterBO
  177. * @return
  178. */
  179. @ApiOperation(value = "一网通办", notes = "一网通办")
  180. @GetMapping("/allAtOnce")
  181. @ApiImplicitParams(value = {
  182. @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
  183. @ApiImplicitParam(name = "timeTag", value = "日期标记", dataType = "String", required = false),
  184. @ApiImplicitParam(name = "keyWord", value = "关键字", dataType = "String", required = false),
  185. })
  186. public AjaxResult allAtOnce(CommandCenterBO commandCenterBO) {
  187. return AjaxResult.success(commandCenterService.allAtOnce(commandCenterBO));
  188. }
  189. @ApiOperation(value = "机器人", notes = "机器人")
  190. @GetMapping("/searchAllYouWant")
  191. @ApiImplicitParams(value = {
  192. @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
  193. @ApiImplicitParam(name = "timeTag", value = "日期标记", dataType = "String", required = false),
  194. @ApiImplicitParam(name = "keyWord", value = "关键字", dataType = "String", required = false),
  195. })
  196. public AjaxResult searchAllYouWant(CommandCenterBO commandCenterBO) {
  197. return AjaxResult.success(commandCenterService.searchAllYouWant(commandCenterBO));
  198. }
  199. /**
  200. * 四长网格树状结构
  201. *
  202. * @author hanfucheng
  203. * @date 2023/5/6 9:11
  204. */
  205. @ApiOperation(value = "四长网格树状结构", notes = "四长网格树状结构")
  206. @GetMapping("/fourLengthOverTree")
  207. @ApiImplicitParams(value = {
  208. @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
  209. @ApiImplicitParam(name = "timeTag", value = "日期标记", dataType = "String", required = false),
  210. @ApiImplicitParam(name = "keyWord", value = "关键字", dataType = "String", required = false),
  211. })
  212. public AjaxResult fourLengthOverTree(CommandCenterBO commandCenterBO) {
  213. return AjaxResult.success(commandCenterService.fourLengthOverTree(commandCenterBO));
  214. }
  215. /**
  216. * 手机端四长列表
  217. *
  218. * @author hanfucheng
  219. * @date 2023/5/15 11:12
  220. */
  221. @ApiOperation(value = "手机端四长列表", notes = "手机端四长列表")
  222. @GetMapping("/fourLengthOver")
  223. @ApiImplicitParams(value = {
  224. @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
  225. @ApiImplicitParam(name = "timeTag", value = "日期标记", dataType = "String", required = false),
  226. @ApiImplicitParam(name = "keyWord", value = "关键字", dataType = "String", required = false),
  227. })
  228. public AjaxResult fourLengthOver(CommandCenterBO commandCenterBO) {
  229. return AjaxResult.success(commandCenterService.fourLengthOver(commandCenterBO));
  230. }
  231. /**
  232. * 资源列表
  233. *
  234. * @author hanfucheng
  235. * @date 2023/6/6 15:03
  236. */
  237. @ApiOperation(value = "资源列表", notes = "资源列表")
  238. @GetMapping("/resourceList")
  239. @ApiImplicitParams(value = {
  240. @ApiImplicitParam(name = "longitude", value = "经度", dataType = "String", required = false),
  241. @ApiImplicitParam(name = "latitude", value = "纬度", dataType = "String", required = false),
  242. @ApiImplicitParam(name = "type", value = "类型", dataType = "String", required = false),
  243. @ApiImplicitParam(name = "assort", value = "分类(1.生鲜乳收购站 2.饲料企业 3.屠宰企业)", dataType = "String", required = false),
  244. @ApiImplicitParam(name = "del", value = "删除标识", dataType = "String", required = false),
  245. @ApiImplicitParam(name = "radius", value = "距离", dataType = "String", required = false),
  246. @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
  247. @ApiImplicitParam(name = "name", value = "名称", dataType = "String", required = false),
  248. @ApiImplicitParam(name = "resourceType", value = "资源类型", dataType = "String", required = false),
  249. @ApiImplicitParam(name = "firehydrantType", value = "消火栓类型", dataType = "String", required = false),
  250. })
  251. public AjaxResult resourceList(AgricultureViewBO agricultureViewBO) {
  252. return AjaxResult.success(commandCenterService.resourceList(agricultureViewBO));
  253. }
  254. /**
  255. * 资源落点
  256. *
  257. * @author hanfucheng
  258. * @date 2023/6/6 14:16
  259. */
  260. @ApiOperation(value = "资源落点", notes = "资源落点")
  261. @GetMapping("/resourcePoint")
  262. @ApiImplicitParams(value = {
  263. @ApiImplicitParam(name = "longitude", value = "经度", dataType = "String", required = false),
  264. @ApiImplicitParam(name = "latitude", value = "纬度", dataType = "String", required = false),
  265. @ApiImplicitParam(name = "type", value = "类型", dataType = "String", required = false),
  266. @ApiImplicitParam(name = "assort", value = "分类(1.生鲜乳收购站 2.饲料企业 3.屠宰企业)", dataType = "String", required = false),
  267. @ApiImplicitParam(name = "del", value = "删除标识", dataType = "String", required = false),
  268. @ApiImplicitParam(name = "radius", value = "距离", dataType = "String", required = false),
  269. @ApiImplicitParam(name = "deptId", value = "部门id", dataType = "String", required = true),
  270. @ApiImplicitParam(name = "name", value = "名称", dataType = "String", required = false),
  271. @ApiImplicitParam(name = "resourceType", value = "资源类型", dataType = "String", required = false),
  272. @ApiImplicitParam(name = "firehydrantType", value = "消火栓类型", dataType = "String", required = false),
  273. })
  274. public AjaxResult resourcePoint(AgricultureViewBO agricultureViewBO) {
  275. List list = commandCenterService.resourcePoint(agricultureViewBO);
  276. return AjaxResult.success(list);
  277. }
  278. }