新增 根据站点id查询地锁信息接口

This commit is contained in:
Lemon
2023-08-05 13:15:02 +08:00
parent daba8e7a98
commit 385c2c9781
4 changed files with 138 additions and 8 deletions

View File

@@ -10,16 +10,16 @@ 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.IPileBasicInfoService;
import com.jsowell.pile.service.IPileConnectorInfoService;
import com.jsowell.pile.service.IPileStationInfoService;
import com.jsowell.pile.service.YKCPushCommandService;
import com.jsowell.pile.vo.uniapp.GroundLockInfoVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* 充电桩相关接口
@@ -40,6 +40,8 @@ public class PileController extends BaseController {
@Autowired
private IPileConnectorInfoService pileConnectorInfoService;
@Autowired
private IPileBasicInfoService pileBasicInfoService;
/**
@@ -128,4 +130,24 @@ public class PileController extends BaseController {
return response;
}
/**
* 获取地锁列表信息
* @param stationId
* @return
*/
@GetMapping("/getGroundLockInfo/{stationId}")
public RestApiResponse<?> getGroundLockInfo(@PathVariable("stationId") String stationId) {
logger.info("获取地锁列表信息 params:{}", stationId);
RestApiResponse<?> response = null;
try {
List<GroundLockInfoVO> list = pileBasicInfoService.getGroundLockInfo(stationId);
response = new RestApiResponse<>(list);
} catch (Exception e) {
logger.error("获取地锁列表信息 error, ", e);
response = new RestApiResponse<>(e);
}
logger.info("获取地锁列表信息 result:{}", response);
return response;
}
}