扫描二维码入场逻辑
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
package com.sv.oms.controller;
|
||||
import com.enums.EnterEnum;
|
||||
import com.sv.service.oms.DeviceService;
|
||||
import com.ydd.framework.core.common.Pagination;
|
||||
import com.ydd.framework.core.common.dto.ResponseDTO;
|
||||
@@ -21,7 +22,7 @@ import javax.annotation.Resource;
|
||||
public class DeviceController extends OmsController {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(DeviceController.class);
|
||||
|
||||
|
||||
@Resource
|
||||
private DeviceService deviceService;
|
||||
|
||||
@@ -72,4 +73,26 @@ public class DeviceController extends OmsController {
|
||||
return ResponseDTO.ok("开始连接,请等待连接完成");
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新连接
|
||||
* @param deviceId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/device/admin/enter/{id}")
|
||||
public ResponseDTO adminEnter(@PathVariable("id") Integer deviceId){
|
||||
deviceService.adminOperate(deviceId,EnterEnum.ENTER);
|
||||
return ResponseDTO.ok("入场开门成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新连接
|
||||
* @param deviceId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/device/admin/out/{id}")
|
||||
public ResponseDTO adminOut(@PathVariable("id") Integer deviceId){
|
||||
deviceService.adminOperate(deviceId, EnterEnum.OUT);
|
||||
return ResponseDTO.ok("出场开门成功!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user