mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 03:25:12 +08:00
新增 遥控地锁接口
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user