diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBasicInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBasicInfoServiceImpl.java index d1f0d7e45..ff53a992a 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBasicInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileBasicInfoServiceImpl.java @@ -10,7 +10,6 @@ import com.jsowell.common.core.domain.vo.AuthorizedDeptVO; import com.jsowell.common.core.domain.ykc.*; import com.jsowell.common.core.redis.RedisCache; import com.jsowell.common.enums.DelFlagEnum; -import com.jsowell.common.enums.lianlian.LianLianPileStatusEnum; import com.jsowell.common.enums.ykc.PileConnectorDataBaseStatusEnum; import com.jsowell.common.enums.ykc.PileConnectorStatusEnum; import com.jsowell.common.enums.ykc.PileStatusEnum; @@ -28,7 +27,6 @@ import com.jsowell.pile.thirdparty.*; import com.jsowell.pile.transaction.dto.PileTransactionDTO; import com.jsowell.pile.transaction.service.TransactionService; import com.jsowell.pile.util.UserUtils; -import com.jsowell.pile.vo.base.ConnectorInfoVO; import com.jsowell.pile.vo.base.MerchantInfoVO; import com.jsowell.pile.vo.base.PileInfoVO; import com.jsowell.pile.vo.uniapp.customer.GroundLockInfoVO; @@ -136,8 +134,6 @@ public class PileBasicInfoServiceImpl implements PileBasicInfoService { redisCache.setCacheObject(redisKey, pileBasicInfo, 15, TimeUnit.MINUTES); } } - - // PileBasicInfo pileBasicInfo = pileBasicInfoMapper.selectPileBasicInfoBySn(pileSn); return pileBasicInfo; } diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/common/CommonService.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/common/CommonService.java index 77e73da57..4bb3ab917 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/common/CommonService.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/common/CommonService.java @@ -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 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; // 将枪口状态转换成对接平台的状态