|
|
|
@ -8,6 +8,7 @@ import com.shxy.xymanager_common.bean.ServiceStatus;
|
|
|
|
|
import com.shxy.xymanager_common.entity.RequestResults;
|
|
|
|
|
import com.shxy.xymanager_common.model.*;
|
|
|
|
|
import com.shxy.xymanager_common.vo.*;
|
|
|
|
|
import com.shxy.xymanager_framework.timeTask.StoreCameraScheduleTask;
|
|
|
|
|
import com.shxy.xymanager_service.service.TermSetService;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
@ -21,6 +22,8 @@ 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;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Api(value = "装置cma控制", tags = "装置cma控制")
|
|
|
|
|
@RestController
|
|
|
|
@ -29,6 +32,8 @@ public class TermSetController extends BaseController {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
TermSetService termSetService;
|
|
|
|
|
@Resource
|
|
|
|
|
StoreCameraScheduleTask cameraScheduleTask;
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "声光报警", notes = "声光报警", httpMethod = "POST")
|
|
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
|
|
|
|
@ -74,7 +79,7 @@ public class TermSetController extends BaseController {
|
|
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "请求成功"), @ApiResponse(code = 400, message = "请求参数没填好"), @ApiResponse(code = 404, message = "请求路径没有或页面跳转路径不对")})
|
|
|
|
|
@RequestMapping("/setTermCamera")
|
|
|
|
|
@Log(title = "设备控制接口", type = "查询")
|
|
|
|
|
public ResponseReult<CmaRequestModel> setTermCamera(@RequestBody @Validated TermCtrlVo vo) throws Exception{
|
|
|
|
|
public ResponseReult<CmaRequestModel> setTermCamera(@RequestBody @Validated TermCtrlVo vo) throws Exception {
|
|
|
|
|
ServiceBody<CmaRequestModel> serviceBody = termSetService.setTermCamera(vo);
|
|
|
|
|
if (serviceBody.getCode() == ServiceStatus.SUCCESS) {
|
|
|
|
|
return ResponseReult.success(serviceBody.getData());
|
|
|
|
@ -96,4 +101,9 @@ public class TermSetController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/refreshAllCameraSchedule")
|
|
|
|
|
public ResponseReult<String> refreshAllCameraSchedule() {
|
|
|
|
|
cameraScheduleTask.search();
|
|
|
|
|
return ResponseReult.success("OK");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|