|
|
@ -13,56 +13,16 @@ import org.springframework.web.bind.annotation.PostMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.ResponseBody; |
|
|
|
|
|
|
|
@Tag(name = "设备控制", description = "") |
|
|
|
@Tag(name = "设备扩展控制", description = "") |
|
|
|
@Slf4j |
|
|
|
@Controller |
|
|
|
@RequestMapping(value = "/api/v1/app/deviceCtrl/") |
|
|
|
@RequestMapping(value = "/api/v1/app/deviceExCtrl/") |
|
|
|
@ResponseBody |
|
|
|
public class DeviceCtrlControler { |
|
|
|
|
|
|
|
@Resource |
|
|
|
AppDeviceMainFlowCtrlService appDeviceMainFlowCtrlService; |
|
|
|
public class DeviceExCtrlController { |
|
|
|
|
|
|
|
@Resource |
|
|
|
AppDeviceInitCtrlService appDeviceInitCtrlService; |
|
|
|
|
|
|
|
|
|
|
|
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
|
|
// EXT FUNC |
|
|
|
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
|
|
|
|
|
|
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
|
|
|
* 设备控制 |
|
|
|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ |
|
|
|
@Operation(description = "开始工作") |
|
|
|
@PostMapping("/startWork") |
|
|
|
public ApiRet<Void> startWork() throws AppException { |
|
|
|
appDeviceMainFlowCtrlService.startWork(); |
|
|
|
return ApiRet.success(); |
|
|
|
} |
|
|
|
|
|
|
|
@Operation(description = "停止工作") |
|
|
|
@PostMapping("/stopWork") |
|
|
|
public ApiRet<Void> stopWork() throws AppException { |
|
|
|
appDeviceMainFlowCtrlService.stopWork(); |
|
|
|
return ApiRet.success(); |
|
|
|
} |
|
|
|
|
|
|
|
@Operation(description = "暂停工作") |
|
|
|
@PostMapping("/pauseWork") |
|
|
|
public ApiRet<Void> pauseWork() throws AppException { |
|
|
|
appDeviceMainFlowCtrlService.pauseWork(); |
|
|
|
return ApiRet.success(); |
|
|
|
} |
|
|
|
|
|
|
|
@Operation(description = "继续工作") |
|
|
|
@PostMapping("/continueWork") |
|
|
|
public ApiRet<Void> continueWork() throws AppException { |
|
|
|
appDeviceMainFlowCtrlService.continueWork(); |
|
|
|
return ApiRet.success(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Operation(description = "失能设备") |
|
|
|
@PostMapping("/disableDevice") |
|
|
|
public ApiRet<Void> disableDevice() throws AppException { |
|
|
|