|
@@ -1859,5 +1859,24 @@ public class TEquipmentController {
|
|
|
return R.ok();
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ @ApiOperation(value = "远程开启触摸屏")
|
|
|
+ @GetMapping("/openScreen")
|
|
|
+ public ResponseModel<?> openScreen(String equipmentId) {
|
|
|
+ // 检查设备ID是否为空
|
|
|
+ if (StringUtils.isEmpty(equipmentId)) {
|
|
|
+ return R.fail(A0001);
|
|
|
+ }
|
|
|
+ // 根据设备ID查询设备信息
|
|
|
+ TEquipment equipment = tEquipmentService.getById(equipmentId);
|
|
|
+ if (equipment == null) {
|
|
|
+ return R.fail(A0001, "该设备不存在");
|
|
|
+ }
|
|
|
+ // 远程开启触摸屏
|
|
|
+ String clientId = equipment.getClientId();
|
|
|
+ tEquipmentService.sentMessage(clientId, PushUtils.buildJson("restartAndroid", "restartAndroid").toString());
|
|
|
+ return R.ok();
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|