#更新
This commit is contained in:
@@ -15,7 +15,9 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.maibu.core.business.DevicePlan;
|
||||
import com.maibu.core.business.RegionConsecutiveTaskRecord;
|
||||
import com.maibu.core.business.dto.ConsecutiveTaskDTO;
|
||||
import com.maibu.core.business.dto.ConsecutiveTaskQueryDTO;
|
||||
import com.maibu.core.business.dto.DeviceTaskCommandDTO;
|
||||
import com.maibu.core.controller.BaseController;
|
||||
import com.maibu.core.domain.AjaxResult;
|
||||
@@ -106,7 +108,7 @@ public class DeviceTaskController extends BaseController {
|
||||
}
|
||||
|
||||
@PostMapping("/createDeviceTask")
|
||||
public AjaxResult createDeviceTask(@RequestBody DeviceTaskCommandDTO dto) {
|
||||
public AjaxResult createDeviceTask(@RequestBody DeviceTaskCommandDTO dto) throws Exception {
|
||||
String deviceId = dto.getDeviceId();
|
||||
Long siteId = dto.getSiteId();
|
||||
Long orgId = dto.getOrgId();
|
||||
@@ -135,7 +137,7 @@ public class DeviceTaskController extends BaseController {
|
||||
}
|
||||
|
||||
@PostMapping("/createRegionDefaultTask")
|
||||
public AjaxResult createRegionDeviceTask(@RequestBody DeviceTaskCommandDTO dto) {
|
||||
public AjaxResult createRegionDeviceTask(@RequestBody DeviceTaskCommandDTO dto) throws Exception {
|
||||
String deviceId = dto.getDeviceId();
|
||||
Long siteId = dto.getSiteId();
|
||||
Long orgId = dto.getOrgId();
|
||||
@@ -177,7 +179,7 @@ public class DeviceTaskController extends BaseController {
|
||||
}
|
||||
|
||||
@PostMapping("/pauseTask")
|
||||
public AjaxResult pauseTask(@RequestBody DeviceTaskCommandDTO dto) {
|
||||
public AjaxResult pauseTask(@RequestBody DeviceTaskCommandDTO dto) throws MqttException {
|
||||
String deviceId = dto.getDeviceId();
|
||||
if (StringUtils.isEmpty(deviceId) && dto.getTaskId() == null) {
|
||||
return AjaxResult.error("deviceId或taskId为空!");
|
||||
@@ -186,7 +188,7 @@ public class DeviceTaskController extends BaseController {
|
||||
}
|
||||
|
||||
@PostMapping("/recoveryTask")
|
||||
public AjaxResult recoveryTask(@RequestBody DeviceTaskCommandDTO dto) throws InterruptedException {
|
||||
public AjaxResult recoveryTask(@RequestBody DeviceTaskCommandDTO dto) throws InterruptedException, MqttException {
|
||||
String deviceId = dto.getDeviceId();
|
||||
if (StringUtils.isEmpty(deviceId) && dto.getTaskId() == null) {
|
||||
return AjaxResult.error("deviceId或taskId为空!");
|
||||
@@ -195,7 +197,7 @@ public class DeviceTaskController extends BaseController {
|
||||
}
|
||||
|
||||
@PostMapping("/backToRestPoint")
|
||||
public AjaxResult backToRestPoint(@RequestBody DeviceTaskCommandDTO dto) {
|
||||
public AjaxResult backToRestPoint(@RequestBody DeviceTaskCommandDTO dto) throws Exception {
|
||||
String deviceId = dto.getDeviceId();
|
||||
Long siteId = dto.getSiteId();
|
||||
Long orgId = dto.getOrgId();
|
||||
@@ -223,8 +225,8 @@ public class DeviceTaskController extends BaseController {
|
||||
return AjaxResult.success(deviceTaskService.backToRestPoint(dto, getLoginUser().getUsername()));
|
||||
}
|
||||
|
||||
@PostMapping("/createConsecutiveTasks")
|
||||
public AjaxResult createConsecutiveTasks(@RequestBody ConsecutiveTaskDTO dto) {
|
||||
@PostMapping("/createConsecutiveTask")
|
||||
public AjaxResult createConsecutiveTasks(@RequestBody ConsecutiveTaskDTO dto) throws Exception {
|
||||
String deviceId = dto.getDeviceId();
|
||||
Long siteId = dto.getSiteId();
|
||||
Long orgId = dto.getOrgId();
|
||||
@@ -278,4 +280,11 @@ public class DeviceTaskController extends BaseController {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@PostMapping("/getConsecutiveTask")
|
||||
public TableDataInfo getConsecutiveTask(@RequestBody ConsecutiveTaskQueryDTO dto) {
|
||||
startPage();
|
||||
List<RegionConsecutiveTaskRecord> list = deviceTaskService.getRegionConsecutiveTaskRecords(dto);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user