mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
发送遥控地锁指令
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
package com.jsowell.web.controller.pile;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.core.domain.AjaxResult;
|
||||
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.common.util.id.IdUtils;
|
||||
import com.jsowell.pile.domain.ykcCommond.RemoteControlGroundLockCommand;
|
||||
import com.jsowell.pile.dto.GenerateOrderDTO;
|
||||
import com.jsowell.pile.dto.QueryPileDTO;
|
||||
import com.jsowell.pile.dto.UpdateFirmwareDTO;
|
||||
import com.jsowell.pile.service.PileRemoteService;
|
||||
import com.jsowell.service.OrderService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -25,14 +26,11 @@ import java.math.BigDecimal;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pile/remote")
|
||||
public class PileRemoteController {
|
||||
public class PileRemoteController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private PileRemoteService pileRemoteService;
|
||||
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
|
||||
/**
|
||||
* 获取实时上传数据
|
||||
* http://localhost:8080/pile/remote/getRealTimeMonitorData
|
||||
@@ -139,4 +137,24 @@ public class PileRemoteController {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 遥控地锁
|
||||
* http://localhost:8080/pile/remote/remoteControlGroundLock
|
||||
*/
|
||||
@PostMapping("remoteControlGroundLock")
|
||||
public AjaxResult remoteControlGroundLock(@RequestBody RemoteControlGroundLockCommand command) {
|
||||
AjaxResult result;
|
||||
try {
|
||||
pileRemoteService.remoteControlGroundLock(command);
|
||||
result = AjaxResult.success();
|
||||
} catch (BusinessException e) {
|
||||
logger.error("遥控地锁error", e);
|
||||
result = AjaxResult.error(e.getMessage());
|
||||
} catch (Exception e) {
|
||||
logger.error("遥控地锁error", e);
|
||||
result = AjaxResult.error(e.getMessage());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user