|
@@ -4,6 +4,7 @@ package com.usky.agbox.controller.web;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.usky.agbox.service.job.patrolAgbox;
|
|
|
import com.usky.common.core.bean.ApiResult;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -16,13 +17,17 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
@RestController
|
|
|
@RequestMapping("/patrolAgbox")
|
|
|
public class patrolAgboxController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private patrolAgbox agBox;
|
|
|
+
|
|
|
/**
|
|
|
* 获取事件编码信息
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping("/getEventCode")
|
|
|
public ApiResult<JSONObject> getEventCode(){
|
|
|
- return ApiResult.success(patrolAgbox.getEventCode());
|
|
|
+ return ApiResult.success(agBox.getEventCode());
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -31,7 +36,7 @@ public class patrolAgboxController {
|
|
|
*/
|
|
|
@PostMapping("/getDeviceList")
|
|
|
public ApiResult<JSONObject> getDeviceList(){
|
|
|
- return ApiResult.success(patrolAgbox.getDeviceList());
|
|
|
+ return ApiResult.success(agBox.getDeviceList());
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -40,7 +45,7 @@ public class patrolAgboxController {
|
|
|
*/
|
|
|
@PostMapping("/addEvent")
|
|
|
public ApiResult<JSONObject> addEvent(@RequestBody String requestBody){
|
|
|
- return ApiResult.success(patrolAgbox.addEvent(requestBody));
|
|
|
+ return ApiResult.success(agBox.addEvent(requestBody));
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -49,7 +54,7 @@ public class patrolAgboxController {
|
|
|
*/
|
|
|
@PostMapping("/updateHeart")
|
|
|
public ApiResult<JSONObject> updateHeart(@RequestBody String requestBody){
|
|
|
- return ApiResult.success(patrolAgbox.updateHeart(requestBody));
|
|
|
+ return ApiResult.success(agBox.updateHeart(requestBody));
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -58,6 +63,6 @@ public class patrolAgboxController {
|
|
|
*/
|
|
|
@PostMapping("/getEvent")
|
|
|
public ApiResult<JSONObject> getEvent(@RequestBody String requestBody){
|
|
|
- return ApiResult.success(patrolAgbox.getEvent(requestBody));
|
|
|
+ return ApiResult.success(agBox.getEvent(requestBody));
|
|
|
}
|
|
|
}
|