小程序扫二维码时判断桩、枪口状态并返回对应的信息

This commit is contained in:
Lemon
2023-09-13 14:15:19 +08:00
parent abfa21ac83
commit 53686f2b93
3 changed files with 10 additions and 1 deletions

View File

@@ -190,6 +190,13 @@ public class PileService {
return null;
}
// 判断桩是否在线
boolean onLineStatus = pileConnectorInfoService.checkPileOffLine(pileInfoVO.getPileSn());
if (!onLineStatus) {
// 离线
throw new BusinessException(ReturnCodeEnum.CODE_PILE_CONNECTOR_STATUS_ERROR);
}
// 查询站点信息
PileStationVO stationInfo = pileStationInfoService.getStationInfo(pileInfoVO.getStationId());
if (stationInfo == null || StringUtils.equals(stationInfo.getOpenFlag(), Constants.ZERO)) {