update 添加判空逻辑

This commit is contained in:
Guoqs
2024-12-28 09:46:02 +08:00
parent 466462c7d3
commit 05a3e20cd2
2 changed files with 8 additions and 6 deletions

View File

@@ -25,7 +25,6 @@ import com.jsowell.pile.dto.PushStationInfoDTO;
import com.jsowell.pile.dto.ThirdPartyCommonStartChargeDTO;
import com.jsowell.pile.dto.ThirdPartyCommonStopChargeDTO;
import com.jsowell.pile.dto.lutongyunting.BindCouponDTO;
import com.jsowell.pile.dto.nanrui.PushAlarmInfoDTO;
import com.jsowell.pile.dto.ruanjie.UseCouponDTO;
import com.jsowell.pile.service.*;
import com.jsowell.pile.vo.ThirdPartySecretInfoVO;
@@ -41,7 +40,6 @@ import com.jsowell.thirdparty.platform.service.impl.HaiNanPlatformServiceImpl;
import com.jsowell.thirdparty.platform.service.impl.NingXiaPlatformServiceImpl;
import com.jsowell.thirdparty.platform.service.impl.QingHaiPlatformServiceImpl;
import com.jsowell.thirdparty.platform.util.HttpRequestUtil;
import com.jsowell.thirdparty.platform.util.ThirdPartyPlatformUtils;
import com.jsowell.thirdparty.ruanjie.service.RJService;
import com.jsowell.thirdparty.service.ThirdpartySecretInfoService;
import com.jsowell.thirdparty.xindiantu.service.XDTService;
@@ -227,6 +225,10 @@ public class CommonService {
RealTimeMonitorData realTimeMonitorData, String transactionCode) throws UnsupportedEncodingException {
// 推送第三方平台,先通过桩编号查出站点信息 pushToThirdPartyPlatforms
PileBasicInfo pileBasicInfo = pileBasicInfoService.selectPileBasicInfoBySN(pileSn);
if (pileBasicInfo == null) {
log.error("推送实时数据失败,未查询到桩编号:{} 对应的站点信息", pileSn);
return;
}
// 查询该站点是否推送第三方平台
List<ThirdPartyStationRelationVO> list = thirdPartyStationRelationService.getRelationInfoList(String.valueOf(pileBasicInfo.getStationId()));
@@ -392,6 +394,10 @@ public class CommonService {
RealTimeMonitorData realTimeMonitorData, String transactionCode) throws UnsupportedEncodingException {
// 推送第三方平台,先通过桩编号查出站点信息 pushToThirdPartyPlatforms
PileBasicInfo pileBasicInfo = pileBasicInfoService.selectPileBasicInfoBySN(pileSn);
if (pileBasicInfo == null) {
log.error("推送实时数据失败,未查询到桩编号:{} 对应的站点信息", pileSn);
return;
}
String pileConnectorCode = pileSn + connectorCode;
// 将枪口状态转换成对接平台的状态