新增 遥控地锁接口

This commit is contained in:
Lemon
2023-08-04 09:57:48 +08:00
parent e8e3b2b23c
commit 6c940bdd41
2 changed files with 25 additions and 1 deletions

View File

@@ -7,10 +7,12 @@ import com.jsowell.common.core.page.PageResponse;
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.response.RestApiResponse;
import com.jsowell.pile.domain.ykcCommond.RemoteControlGroundLockCommand;
import com.jsowell.pile.dto.QueryConnectorListDTO;
import com.jsowell.pile.dto.QueryStationDTO;
import com.jsowell.pile.service.IPileConnectorInfoService;
import com.jsowell.pile.service.IPileStationInfoService;
import com.jsowell.pile.service.YKCPushCommandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -29,7 +31,8 @@ import javax.servlet.http.HttpServletRequest;
@RequestMapping("/uniapp/pile")
public class PileController extends BaseController {
@Autowired
private YKCPushCommandService ykcPushCommandService;
@Autowired
private IPileStationInfoService pileStationInfoService;
@@ -106,4 +109,23 @@ public class PileController extends BaseController {
return response;
}
/**
* 远程遥控地锁指令
* @param command
* @return
*/
@PostMapping("/remoteGroundLock")
public RestApiResponse<?> remoteGroundLock(@RequestBody RemoteControlGroundLockCommand command) {
logger.info("遥控地锁指令 params:{}", JSONObject.toJSONString(command));
RestApiResponse<?> response = null;
try {
ykcPushCommandService.pushRemoteControlGroundLock(command);
} catch (Exception e) {
logger.error("遥控地锁指令 error, ", e);
response = new RestApiResponse<>(e);
}
logger.info("遥控地锁指令 result:{}", response);
return response;
}
}