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

@@ -10,7 +10,6 @@ import com.jsowell.common.core.domain.vo.AuthorizedDeptVO;
import com.jsowell.common.core.domain.ykc.*; import com.jsowell.common.core.domain.ykc.*;
import com.jsowell.common.core.redis.RedisCache; import com.jsowell.common.core.redis.RedisCache;
import com.jsowell.common.enums.DelFlagEnum; 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.PileConnectorDataBaseStatusEnum;
import com.jsowell.common.enums.ykc.PileConnectorStatusEnum; import com.jsowell.common.enums.ykc.PileConnectorStatusEnum;
import com.jsowell.common.enums.ykc.PileStatusEnum; 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.dto.PileTransactionDTO;
import com.jsowell.pile.transaction.service.TransactionService; import com.jsowell.pile.transaction.service.TransactionService;
import com.jsowell.pile.util.UserUtils; 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.MerchantInfoVO;
import com.jsowell.pile.vo.base.PileInfoVO; import com.jsowell.pile.vo.base.PileInfoVO;
import com.jsowell.pile.vo.uniapp.customer.GroundLockInfoVO; import com.jsowell.pile.vo.uniapp.customer.GroundLockInfoVO;
@@ -136,8 +134,6 @@ public class PileBasicInfoServiceImpl implements PileBasicInfoService {
redisCache.setCacheObject(redisKey, pileBasicInfo, 15, TimeUnit.MINUTES); redisCache.setCacheObject(redisKey, pileBasicInfo, 15, TimeUnit.MINUTES);
} }
} }
// PileBasicInfo pileBasicInfo = pileBasicInfoMapper.selectPileBasicInfoBySn(pileSn);
return pileBasicInfo; return pileBasicInfo;
} }

View File

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