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:
@@ -232,11 +232,23 @@ public class PileService {
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取枪口详情信息
|
||||
* 仅小程序扫码调用
|
||||
* @param pileConnectorCode
|
||||
* @return
|
||||
* @throws ExecutionException
|
||||
* @throws InterruptedException
|
||||
*/
|
||||
public PileConnectorVO getConnectorDetail(String pileConnectorCode) throws ExecutionException, InterruptedException {
|
||||
PileConnectorDetailVO pileConnectorDetailVO = queryPileConnectorDetail(pileConnectorCode);
|
||||
if (pileConnectorDetailVO == null) {
|
||||
return null;
|
||||
}
|
||||
// 枪口状态不为2:占用(未充电)
|
||||
if (StringUtils.equals("2", pileConnectorDetailVO.getConnectorStatus())) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_PILE_CONNECTOR_STATUS_ERROR);
|
||||
}
|
||||
String pileSn = pileConnectorDetailVO.getPileSn();
|
||||
PileConnectorVO resultVO = getPileDetailByPileSn(pileSn);
|
||||
List<ConnectorInfoVO> connectorInfoList = resultVO.getConnectorInfoList();
|
||||
|
||||
Reference in New Issue
Block a user