mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-03 21:48:13 +08:00
update
This commit is contained in:
@@ -17,6 +17,7 @@ import com.jsowell.common.util.*;
|
||||
import com.jsowell.pile.domain.*;
|
||||
import com.jsowell.pile.domain.ykcCommond.StartChargingCommand;
|
||||
import com.jsowell.pile.dto.*;
|
||||
import com.jsowell.pile.mapper.ThirdPartyStationRelationMapper;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.thirdparty.CommonParamsDTO;
|
||||
import com.jsowell.pile.thirdparty.ConnectorInfo;
|
||||
@@ -94,6 +95,9 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
@Autowired
|
||||
private PileRemoteService pileRemoteService;
|
||||
|
||||
@Autowired
|
||||
private ThirdPartyStationRelationMapper thirdPartyStationRelationMapper;
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
ThirdPartyPlatformFactory.register(thirdPlatformType, this);
|
||||
@@ -180,13 +184,17 @@ public class ChangZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
SupStationInfo stationInfo = new SupStationInfo();
|
||||
stationInfo.setStationID(String.valueOf(pileStationInfo.getId()));
|
||||
stationInfo.setOperatorID(Constants.OPERATORID_JIANG_SU); // 组织机构代码
|
||||
String organizationCode = pileStationInfo.getOrganizationCode();
|
||||
if (StringUtils.isNotBlank(organizationCode) && organizationCode.length() == 18) {
|
||||
String equipmentOwnerId = StringUtils.substring(organizationCode, organizationCode.length() - 10, organizationCode.length() - 1);
|
||||
stationInfo.setEquipmentOwnerID(equipmentOwnerId);
|
||||
}else {
|
||||
stationInfo.setEquipmentOwnerID(Constants.OPERATORID_JIANG_SU);
|
||||
}
|
||||
|
||||
ThirdPartyStationRelation build = ThirdPartyStationRelation.builder()
|
||||
.stationId(pileStationInfo.getId())
|
||||
.thirdPartyType(thirdPlatformType)
|
||||
.build();
|
||||
|
||||
List<ThirdPartyStationRelation> thirdPartyStationRelations = thirdPartyStationRelationMapper.selectThirdPartyStationRelationList(build);
|
||||
|
||||
stationInfo.setEquipmentOwnerID(thirdPartyStationRelations.get(0).getEquipmentOwnerId());
|
||||
|
||||
|
||||
stationInfo.setStationName(pileStationInfo.getStationName());
|
||||
stationInfo.setCountryCode(pileStationInfo.getCountryCode());
|
||||
String areaCode = pileStationInfo.getAreaCode(); // 330000,330200,330213
|
||||
|
||||
@@ -18,7 +18,9 @@ import com.jsowell.common.util.PageUtils;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||
import com.jsowell.pile.domain.OrderDetail;
|
||||
import com.jsowell.pile.domain.ThirdPartyStationRelation;
|
||||
import com.jsowell.pile.dto.QueryStationInfoDTO;
|
||||
import com.jsowell.pile.mapper.ThirdPartyStationRelationMapper;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.thirdparty.CommonParamsDTO;
|
||||
import com.jsowell.pile.thirdparty.EquipmentInfo;
|
||||
@@ -83,6 +85,10 @@ public class GanSuPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
@Autowired
|
||||
private ThirdPartyStationRelationMapper thirdPartyStationRelationMapper;
|
||||
|
||||
|
||||
// 平台类型
|
||||
private final String thirdPlatformType = ThirdPlatformTypeEnum.GAN_SU_PLATFORM.getTypeCode();
|
||||
|
||||
@@ -210,13 +216,15 @@ public class GanSuPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
stationInfo.setAreaCode(subAreaCode);
|
||||
|
||||
// EquipmentOwnerID
|
||||
String organizationCode = pileStationInfo.getOrganizationCode();
|
||||
if (StringUtils.isNotBlank(organizationCode) && organizationCode.length() == 18) {
|
||||
String equipmentOwnerId = StringUtils.substring(organizationCode, organizationCode.length() - 10, organizationCode.length() - 1);
|
||||
stationInfo.setEquipmentOwnerID(equipmentOwnerId);
|
||||
} else {
|
||||
stationInfo.setEquipmentOwnerID(Constants.OPERATORID_JIANG_SU);
|
||||
}
|
||||
ThirdPartyStationRelation build = ThirdPartyStationRelation.builder()
|
||||
.stationId(pileStationInfo.getId())
|
||||
.thirdPartyType(thirdPlatformType)
|
||||
.build();
|
||||
|
||||
List<ThirdPartyStationRelation> thirdPartyStationRelations = thirdPartyStationRelationMapper.selectThirdPartyStationRelationList(build);
|
||||
|
||||
stationInfo.setEquipmentOwnerID(thirdPartyStationRelations.get(0).getEquipmentOwnerId());
|
||||
|
||||
|
||||
List<EquipmentInfo> pileList = pileBasicInfoService.getPileListForLianLian(stationId);
|
||||
if (CollectionUtils.isNotEmpty(pileList)) {
|
||||
|
||||
@@ -21,9 +21,11 @@ import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.domain.AreaCodeInfo;
|
||||
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||
import com.jsowell.pile.domain.OrderDetail;
|
||||
import com.jsowell.pile.domain.ThirdPartyStationRelation;
|
||||
import com.jsowell.pile.dto.QueryOrderDTO;
|
||||
import com.jsowell.pile.dto.QueryStartChargeDTO;
|
||||
import com.jsowell.pile.dto.QueryStationInfoDTO;
|
||||
import com.jsowell.pile.mapper.ThirdPartyStationRelationMapper;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.thirdparty.CommonParamsDTO;
|
||||
import com.jsowell.pile.thirdparty.EquipmentInfo;
|
||||
@@ -97,6 +99,10 @@ public class GuangXiPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
@Autowired
|
||||
private IAreaCodeInfoService areaCodeInfoService;
|
||||
|
||||
@Autowired
|
||||
private ThirdPartyStationRelationMapper thirdPartyStationRelationMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
ThirdPartyPlatformFactory.register(thirdPlatformType, this);
|
||||
@@ -189,7 +195,6 @@ public class GuangXiPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
SupStationInfo info = SupStationInfo.builder()
|
||||
.stationID(String.valueOf(pileStationInfo.getId()))
|
||||
.operatorID(Constants.OPERATORID_JIANG_SU)
|
||||
.equipmentOwnerID(ThirdPartyPlatformUtils.extractEquipmentOwnerID(pileStationInfo.getOrganizationCode()))
|
||||
.stationName(pileStationInfo.getStationName())
|
||||
.countryCode(pileStationInfo.getCountryCode())
|
||||
// .areaCode()
|
||||
@@ -211,6 +216,16 @@ public class GuangXiPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
|
||||
.build();
|
||||
|
||||
ThirdPartyStationRelation build = ThirdPartyStationRelation.builder()
|
||||
.stationId(pileStationInfo.getId())
|
||||
.thirdPartyType(thirdPlatformType)
|
||||
.build();
|
||||
|
||||
List<ThirdPartyStationRelation> thirdPartyStationRelations = thirdPartyStationRelationMapper.selectThirdPartyStationRelationList(build);
|
||||
|
||||
info.setEquipmentOwnerID(thirdPartyStationRelations.get(0).getEquipmentOwnerId());
|
||||
|
||||
|
||||
StringBuilder electricityFee = new StringBuilder();
|
||||
StringBuilder serviceFee = new StringBuilder();
|
||||
// 查询计费模板
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.jsowell.pile.dto.QueryConnectorListDTO;
|
||||
import com.jsowell.pile.dto.QueryOperatorInfoDTO;
|
||||
import com.jsowell.pile.dto.QueryOrderDTO;
|
||||
import com.jsowell.pile.dto.QueryStationInfoDTO;
|
||||
import com.jsowell.pile.mapper.ThirdPartyStationRelationMapper;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.thirdparty.CommonParamsDTO;
|
||||
import com.jsowell.pile.thirdparty.ConnectorInfo;
|
||||
@@ -97,6 +98,10 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
@Autowired
|
||||
private ThirdPartyStationRelationMapper thirdPartyStationRelationMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
ThirdPartyPlatformFactory.register(thirdPlatformType, this);
|
||||
@@ -239,7 +244,6 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
SupStationInfo info = SupStationInfo.builder()
|
||||
.stationID(String.valueOf(pileStationInfo.getId()))
|
||||
.operatorID(Constants.OPERATORID_JIANG_SU)
|
||||
.equipmentOwnerID(ThirdPartyPlatformUtils.extractEquipmentOwnerID(pileStationInfo.getOrganizationCode()))
|
||||
.stationName(pileStationInfo.getStationName())
|
||||
.countryCode(pileStationInfo.getCountryCode())
|
||||
// .areaCode()
|
||||
@@ -264,6 +268,18 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
.videoMonitor(Constants.zero) // 视频监控配套情况 0-无;1-有
|
||||
|
||||
.build();
|
||||
|
||||
ThirdPartyStationRelation build = ThirdPartyStationRelation.builder()
|
||||
.stationId(pileStationInfo.getId())
|
||||
.thirdPartyType(thirdPlatformType)
|
||||
.build();
|
||||
|
||||
List<ThirdPartyStationRelation> thirdPartyStationRelations = thirdPartyStationRelationMapper.selectThirdPartyStationRelationList(build);
|
||||
|
||||
info.setEquipmentOwnerID(thirdPartyStationRelations.get(0).getEquipmentOwnerId());
|
||||
|
||||
|
||||
|
||||
String areaCode = pileStationInfo.getAreaCode(); // 330000,330200,330213
|
||||
// 根据逗号分组
|
||||
String[] split = StringUtils.split(areaCode, ",");
|
||||
@@ -323,7 +339,7 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
public String notificationStationInfo(String stationId) {
|
||||
// 通过id查询站点相关信息
|
||||
PileStationInfo pileStationInfo = pileStationInfoService.selectPileStationInfoById(Long.parseLong(stationId));
|
||||
PileMerchantInfoVO pileMerchantInfoVO = pileMerchantInfoService.queryMerchantInfoByStationId(String.valueOf(pileStationInfo.getId()));
|
||||
// PileMerchantInfoVO pileMerchantInfoVO = pileMerchantInfoService.queryMerchantInfoByStationId(String.valueOf(pileStationInfo.getId()));
|
||||
|
||||
// 查询第三方平台配置信息
|
||||
ThirdPartySecretInfoVO thirdPartySecretInfoVO = getGuiZhouPlatformSecretInfo();
|
||||
@@ -339,7 +355,6 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
SupStationInfo info = SupStationInfo.builder()
|
||||
.stationID(stationId)
|
||||
.operatorID(operatorId)
|
||||
.equipmentOwnerID(ThirdPartyPlatformUtils.extractEquipmentOwnerID(pileMerchantInfoVO.getOrganizationCode()))
|
||||
.stationName(pileStationInfo.getStationName())
|
||||
.countryCode(pileStationInfo.getCountryCode())
|
||||
// .areaCode()
|
||||
@@ -364,6 +379,17 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
.videoMonitor(Constants.zero) // 视频监控配套情况 0-无;1-有
|
||||
|
||||
.build();
|
||||
|
||||
ThirdPartyStationRelation build = ThirdPartyStationRelation.builder()
|
||||
.stationId(pileStationInfo.getId())
|
||||
.thirdPartyType(thirdPlatformType)
|
||||
.build();
|
||||
|
||||
List<ThirdPartyStationRelation> thirdPartyStationRelations = thirdPartyStationRelationMapper.selectThirdPartyStationRelationList(build);
|
||||
|
||||
info.setEquipmentOwnerID(thirdPartyStationRelations.get(0).getEquipmentOwnerId());
|
||||
|
||||
|
||||
String areaCode = pileStationInfo.getAreaCode(); // 330000,330200,330213
|
||||
// 根据逗号分组
|
||||
String[] split = StringUtils.split(areaCode, ",");
|
||||
@@ -446,18 +472,29 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
List<ConnectorInfoVO> voList = entry.getValue();
|
||||
StationStatusInfo stationStatusInfo = new StationStatusInfo();
|
||||
|
||||
PileStationVO stationInfo = pileStationInfoService.getStationInfo(stationId);
|
||||
PileMerchantInfoVO pileMerchantInfoVO = pileMerchantInfoService.queryMerchantInfoByStationId(String.valueOf(stationInfo.getId()));
|
||||
String organizationCode = pileMerchantInfoVO.getOrganizationCode();
|
||||
// PileStationVO stationInfo = pileStationInfoService.getStationInfo(stationId);
|
||||
// PileMerchantInfoVO pileMerchantInfoVO = pileMerchantInfoService.queryMerchantInfoByStationId(String.valueOf(stationInfo.getId()));
|
||||
// String organizationCode = pileMerchantInfoVO.getOrganizationCode();
|
||||
|
||||
stationStatusInfo.setOperatorId(Constants.OPERATORID_JIANG_SU);
|
||||
stationStatusInfo.setEquipmentOwnerId(ThirdPartyPlatformUtils.extractEquipmentOwnerID(organizationCode));
|
||||
|
||||
ThirdPartyStationRelation build = ThirdPartyStationRelation.builder()
|
||||
.stationId(Long.valueOf(stationId))
|
||||
.thirdPartyType(thirdPlatformType)
|
||||
.build();
|
||||
|
||||
List<ThirdPartyStationRelation> thirdPartyStationRelations = thirdPartyStationRelationMapper.selectThirdPartyStationRelationList(build);
|
||||
String equipmentOwnerId = thirdPartyStationRelations.get(0).getEquipmentOwnerId();
|
||||
|
||||
stationStatusInfo.setEquipmentOwnerId(equipmentOwnerId);
|
||||
|
||||
|
||||
stationStatusInfo.setStationId(stationId);
|
||||
ConnectorStatusInfo connectorStatusInfo;
|
||||
for (ConnectorInfoVO connectorInfoVO : voList) {
|
||||
connectorStatusInfo = ConnectorStatusInfo.builder()
|
||||
.operatorId(Constants.OPERATORID_JIANG_SU)
|
||||
.equipmentOwnerId(ThirdPartyPlatformUtils.extractEquipmentOwnerID(organizationCode))
|
||||
.equipmentOwnerId(equipmentOwnerId)
|
||||
.stationId(connectorInfoVO.getStationId())
|
||||
.equipmentId(connectorInfoVO.getPileSn())
|
||||
.connectorID(connectorInfoVO.getPileConnectorCode())
|
||||
@@ -500,7 +537,7 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
|
||||
SupConnectorStatusInfo info = SupConnectorStatusInfo.builder()
|
||||
.operatorID(Constants.OPERATORID_JIANG_SU)
|
||||
.equipmentOwnerID(MerchantUtils.getOperatorID(merchantInfoVO.getOrganizationCode()))
|
||||
// .equipmentOwnerID(MerchantUtils.getOperatorID(merchantInfoVO.getOrganizationCode()))
|
||||
.stationID(connectorInfo.getStationId())
|
||||
.equipmentID(connectorInfo.getPileSn())
|
||||
.connectorID(pileConnectorCode)
|
||||
@@ -509,6 +546,15 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
.equipmentClassification(Constants.ONE)
|
||||
.build();
|
||||
|
||||
ThirdPartyStationRelation build = ThirdPartyStationRelation.builder()
|
||||
.stationId(Long.valueOf(stationId))
|
||||
.thirdPartyType(thirdPlatformType)
|
||||
.build();
|
||||
|
||||
List<ThirdPartyStationRelation> thirdPartyStationRelations = thirdPartyStationRelationMapper.selectThirdPartyStationRelationList(build);
|
||||
|
||||
info.setEquipmentOwnerID(thirdPartyStationRelations.get(0).getEquipmentOwnerId());
|
||||
|
||||
// 调用联联平台接口
|
||||
String operatorId = Constants.OPERATORID_JIANG_SU;
|
||||
String operatorSecret = secretInfoVO.getTheirOperatorSecret();
|
||||
@@ -547,8 +593,8 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
String urlAddress = guiZhouPlatformSecretInfo.getTheirUrlPrefix();
|
||||
// 查询站点信息
|
||||
PileStationVO stationInfo = pileStationInfoService.getStationInfo(orderInfo.getStationId());
|
||||
PileMerchantInfoVO pileMerchantInfoVO = pileMerchantInfoService.queryMerchantInfoByStationId(String.valueOf(stationInfo.getId()));
|
||||
String organizationCode = pileMerchantInfoVO.getOrganizationCode();
|
||||
// PileMerchantInfoVO pileMerchantInfoVO = pileMerchantInfoService.queryMerchantInfoByStationId(String.valueOf(stationInfo.getId()));
|
||||
// String organizationCode = pileMerchantInfoVO.getOrganizationCode();
|
||||
|
||||
// 查询枪口实时状态
|
||||
List<RealTimeMonitorData> chargingRealTimeData = orderBasicInfoService.getChargingRealTimeData(orderInfo.getTransactionCode());
|
||||
@@ -588,7 +634,7 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
String dateTime = DateUtils.getDateTime();
|
||||
SupEquipChargeStatusInfo supEquipChargeStatusInfo = SupEquipChargeStatusInfo.builder()
|
||||
.operatorID(Constants.OPERATORID_JIANG_SU)
|
||||
.equipmentOwnerID(ThirdPartyPlatformUtils.extractEquipmentOwnerID(organizationCode))
|
||||
// .equipmentOwnerID(ThirdPartyPlatformUtils.extractEquipmentOwnerID(organizationCode))
|
||||
.stationID(orderInfo.getStationId())
|
||||
.equipmentID(orderInfo.getPileSn())
|
||||
.connectorID(orderInfo.getPileConnectorCode())
|
||||
@@ -606,7 +652,17 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
|
||||
.build();
|
||||
|
||||
supEquipChargeStatusInfo.setEquipmentOwnerID(ThirdPartyPlatformUtils.extractEquipmentOwnerID(stationInfo.getOrganizationCode()));
|
||||
|
||||
ThirdPartyStationRelation build = ThirdPartyStationRelation.builder()
|
||||
.stationId(Long.valueOf(stationInfo.getId()))
|
||||
.thirdPartyType(thirdPlatformType)
|
||||
.build();
|
||||
|
||||
List<ThirdPartyStationRelation> thirdPartyStationRelations = thirdPartyStationRelationMapper.selectThirdPartyStationRelationList(build);
|
||||
|
||||
supEquipChargeStatusInfo.setEquipmentOwnerID(thirdPartyStationRelations.get(0).getEquipmentOwnerId());
|
||||
|
||||
|
||||
|
||||
String url = urlAddress + "supervise_notification_equip_charge_status";
|
||||
// 调用平台接口
|
||||
@@ -838,8 +894,8 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
}
|
||||
|
||||
PileStationVO stationInfo = pileStationInfoService.getStationInfo(stationId);
|
||||
PileMerchantInfoVO pileMerchantInfoVO = pileMerchantInfoService.queryMerchantInfoByStationId(String.valueOf(stationInfo.getId()));
|
||||
String organizationCode = pileMerchantInfoVO.getOrganizationCode();
|
||||
// PileMerchantInfoVO pileMerchantInfoVO = pileMerchantInfoService.queryMerchantInfoByStationId(String.valueOf(stationInfo.getId()));
|
||||
// String organizationCode = pileMerchantInfoVO.getOrganizationCode();
|
||||
|
||||
// 保留两位小数
|
||||
stationTotalElectricity= stationTotalElectricity.setScale(2, RoundingMode.HALF_UP);
|
||||
@@ -850,7 +906,7 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
SupStationStatsInfo supStationStatsInfo = SupStationStatsInfo.builder()
|
||||
.stationId(stationId)
|
||||
.operatorId(Constants.OPERATORID_JIANG_SU)
|
||||
.equipmentOwnerId(ThirdPartyPlatformUtils.extractEquipmentOwnerID(organizationCode))
|
||||
// .equipmentOwnerId(ThirdPartyPlatformUtils.extractEquipmentOwnerID(organizationCode))
|
||||
.stationClassification(1)
|
||||
.startTime(startTime)
|
||||
.endTime(endTime)
|
||||
@@ -862,6 +918,17 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
.equipmentStatsInfos(equipmentStatsInfoList)
|
||||
.build();
|
||||
|
||||
ThirdPartyStationRelation build = ThirdPartyStationRelation.builder()
|
||||
.stationId(Long.valueOf(stationInfo.getId()))
|
||||
.thirdPartyType(thirdPlatformType)
|
||||
.build();
|
||||
|
||||
List<ThirdPartyStationRelation> thirdPartyStationRelations = thirdPartyStationRelationMapper.selectThirdPartyStationRelationList(build);
|
||||
|
||||
supStationStatsInfo.setEquipmentOwnerId(thirdPartyStationRelations.get(0).getEquipmentOwnerId());
|
||||
|
||||
|
||||
|
||||
JSONObject json = new JSONObject();
|
||||
List<SupStationStatsInfo> supStationStatsInfoList = new ArrayList<>();
|
||||
supStationStatsInfoList.add(supStationStatsInfo);
|
||||
@@ -911,11 +978,22 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
supStationPowerInfo.setStationRealTimePower(stationPower);
|
||||
|
||||
// 查询运营商基本信息
|
||||
PileMerchantInfoVO pileMerchantInfoVO = pileMerchantInfoService.queryMerchantInfoByStationId(stationId);
|
||||
String organizationCode = pileMerchantInfoVO.getOrganizationCode();
|
||||
if (StringUtils.isNotBlank(organizationCode) && organizationCode.length() == 18) {
|
||||
supStationPowerInfo.setEquipmentOwnerID(ThirdPartyPlatformUtils.extractEquipmentOwnerID(organizationCode));
|
||||
}
|
||||
// PileMerchantInfoVO pileMerchantInfoVO = pileMerchantInfoService.queryMerchantInfoByStationId(stationId);
|
||||
// String organizationCode = pileMerchantInfoVO.getOrganizationCode();
|
||||
// if (StringUtils.isNotBlank(organizationCode) && organizationCode.length() == 18) {
|
||||
// supStationPowerInfo.setEquipmentOwnerID(ThirdPartyPlatformUtils.extractEquipmentOwnerID(organizationCode));
|
||||
// }
|
||||
|
||||
ThirdPartyStationRelation build = ThirdPartyStationRelation.builder()
|
||||
.stationId(Long.valueOf(stationId))
|
||||
.thirdPartyType(thirdPlatformType)
|
||||
.build();
|
||||
|
||||
List<ThirdPartyStationRelation> thirdPartyStationRelations = thirdPartyStationRelationMapper.selectThirdPartyStationRelationList(build);
|
||||
|
||||
supStationPowerInfo.setEquipmentOwnerID(thirdPartyStationRelations.get(0).getEquipmentOwnerId());
|
||||
|
||||
|
||||
|
||||
// 根据站点id查询桩信息
|
||||
List<PileBasicInfo> pileList = pileBasicInfoService.getPileListByStationId(stationId);
|
||||
@@ -1026,13 +1104,22 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
*/
|
||||
private ChargeOrderInfo transformChargeOrderInfo(OrderBasicInfo orderBasicInfo, OrderDetail orderDetail) {
|
||||
PileStationVO stationInfo = pileStationInfoService.getStationInfo(orderBasicInfo.getStationId());
|
||||
PileMerchantInfoVO pileMerchantInfoVO = pileMerchantInfoService.queryMerchantInfoByStationId(String.valueOf(stationInfo.getId()));
|
||||
String organizationCode = pileMerchantInfoVO.getOrganizationCode();
|
||||
// PileMerchantInfoVO pileMerchantInfoVO = pileMerchantInfoService.queryMerchantInfoByStationId(String.valueOf(stationInfo.getId()));
|
||||
// String organizationCode = pileMerchantInfoVO.getOrganizationCode();
|
||||
|
||||
ThirdPartyStationRelation build = ThirdPartyStationRelation.builder()
|
||||
.stationId(Long.valueOf(stationInfo.getId()))
|
||||
.thirdPartyType(thirdPlatformType)
|
||||
.build();
|
||||
|
||||
List<ThirdPartyStationRelation> thirdPartyStationRelations = thirdPartyStationRelationMapper.selectThirdPartyStationRelationList(build);
|
||||
|
||||
|
||||
|
||||
ChargeOrderInfo chargeOrderInfo = ChargeOrderInfo.builder()
|
||||
.operatorID(Constants.OPERATORID_JIANG_SU)
|
||||
.stationID(orderBasicInfo.getStationId())
|
||||
.equipmentOwnerID(ThirdPartyPlatformUtils.extractEquipmentOwnerID(organizationCode))
|
||||
// .equipmentOwnerID(ThirdPartyPlatformUtils.extractEquipmentOwnerID(organizationCode))
|
||||
.equipmentID(orderBasicInfo.getPileSn())
|
||||
.orderNo(orderBasicInfo.getOrderCode())
|
||||
.connectorID(orderBasicInfo.getPileConnectorCode())
|
||||
@@ -1057,6 +1144,9 @@ public class GuiZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
.stopDesc(orderBasicInfo.getReason())
|
||||
.sumPeriod(0)
|
||||
.build();
|
||||
|
||||
chargeOrderInfo.setEquipmentOwnerID(thirdPartyStationRelations.get(0).getEquipmentOwnerId());
|
||||
|
||||
if (orderBasicInfo.getPlateNumber() != null) {
|
||||
chargeOrderInfo.setLicensePlate(orderBasicInfo.getPlateNumber());
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.jsowell.common.util.*;
|
||||
import com.jsowell.pile.domain.*;
|
||||
import com.jsowell.pile.domain.ykcCommond.StartChargingCommand;
|
||||
import com.jsowell.pile.dto.*;
|
||||
import com.jsowell.pile.mapper.ThirdPartyStationRelationMapper;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.thirdparty.CommonParamsDTO;
|
||||
import com.jsowell.pile.thirdparty.EquipmentInfo;
|
||||
@@ -108,6 +109,10 @@ public class HaiNanPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
@Autowired
|
||||
private ZDLService zdlService;
|
||||
|
||||
@Autowired
|
||||
private ThirdPartyStationRelationMapper thirdPartyStationRelationMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
ThirdPartyPlatformFactory.register(thirdPlatformType, this);
|
||||
@@ -209,7 +214,7 @@ public class HaiNanPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
SupStationInfo stationInfo = SupStationInfo.builder()
|
||||
.stationID(stationId)
|
||||
.operatorID(Constants.OPERATORID_JIANG_SU)
|
||||
.equipmentOwnerID(ThirdPartyPlatformUtils.extractEquipmentOwnerID(pileStationInfo.getOrganizationCode()))
|
||||
// .equipmentOwnerID(ThirdPartyPlatformUtils.extractEquipmentOwnerID(pileStationInfo.getOrganizationCode()))
|
||||
.stationName(pileStationInfo.getStationName())
|
||||
.countryCode(pileStationInfo.getCountryCode())
|
||||
.address(pileStationInfo.getAddress())
|
||||
@@ -223,6 +228,17 @@ public class HaiNanPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
|
||||
.build();
|
||||
|
||||
ThirdPartyStationRelation build = ThirdPartyStationRelation.builder()
|
||||
.stationId(Long.valueOf(stationId))
|
||||
.thirdPartyType(thirdPlatformType)
|
||||
.build();
|
||||
|
||||
List<ThirdPartyStationRelation> thirdPartyStationRelations = thirdPartyStationRelationMapper.selectThirdPartyStationRelationList(build);
|
||||
|
||||
stationInfo.setEquipmentOwnerID(thirdPartyStationRelations.get(0).getEquipmentOwnerId());
|
||||
|
||||
|
||||
|
||||
String areaCode = pileStationInfo.getAreaCode(); // 330000,330200,330213
|
||||
// 根据逗号分组
|
||||
String[] split = StringUtils.split(areaCode, ",");
|
||||
|
||||
@@ -18,8 +18,10 @@ import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.domain.AreaCodeInfo;
|
||||
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||
import com.jsowell.pile.domain.OrderDetail;
|
||||
import com.jsowell.pile.domain.ThirdPartyStationRelation;
|
||||
import com.jsowell.pile.dto.PushRealTimeInfoDTO;
|
||||
import com.jsowell.pile.dto.QueryStationInfoDTO;
|
||||
import com.jsowell.pile.mapper.ThirdPartyStationRelationMapper;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.thirdparty.CommonParamsDTO;
|
||||
import com.jsowell.pile.thirdparty.EquipmentInfo;
|
||||
@@ -91,6 +93,10 @@ public class HeNanPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
@Autowired
|
||||
private PileConnectorInfoService pileConnectorInfoService;
|
||||
|
||||
@Autowired
|
||||
private ThirdPartyStationRelationMapper thirdPartyStationRelationMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
ThirdPartyPlatformFactory.register(thirdPlatformType, this);
|
||||
@@ -181,12 +187,24 @@ public class HeNanPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
stationInfo.setStationID(String.valueOf(pileStationInfo.getId()));
|
||||
stationInfo.setOperatorID(Constants.OPERATORID_JIANG_SU); // 组织机构代码
|
||||
String organizationCode = pileStationInfo.getOrganizationCode();
|
||||
if (StringUtils.isNotBlank(organizationCode) && organizationCode.length() == 18) {
|
||||
String equipmentOwnerId = StringUtils.substring(organizationCode, organizationCode.length() - 10, organizationCode.length() - 1);
|
||||
stationInfo.setEquipmentOwnerID(equipmentOwnerId);
|
||||
}else {
|
||||
stationInfo.setEquipmentOwnerID(Constants.OPERATORID_JIANG_SU);
|
||||
}
|
||||
// if (StringUtils.isNotBlank(organizationCode) && organizationCode.length() == 18) {
|
||||
// String equipmentOwnerId = StringUtils.substring(organizationCode, organizationCode.length() - 10, organizationCode.length() - 1);
|
||||
// stationInfo.setEquipmentOwnerID(equipmentOwnerId);
|
||||
// }else {
|
||||
// stationInfo.setEquipmentOwnerID(Constants.OPERATORID_JIANG_SU);
|
||||
// }
|
||||
|
||||
ThirdPartyStationRelation build = ThirdPartyStationRelation.builder()
|
||||
.stationId(pileStationInfo.getId())
|
||||
.thirdPartyType(thirdPlatformType)
|
||||
.build();
|
||||
|
||||
List<ThirdPartyStationRelation> thirdPartyStationRelations = thirdPartyStationRelationMapper.selectThirdPartyStationRelationList(build);
|
||||
|
||||
stationInfo.setEquipmentOwnerID(thirdPartyStationRelations.get(0).getEquipmentOwnerId());
|
||||
|
||||
|
||||
|
||||
stationInfo.setStationName(pileStationInfo.getStationName());
|
||||
stationInfo.setCountryCode(pileStationInfo.getCountryCode());
|
||||
String areaCode = pileStationInfo.getAreaCode(); // 330000,330200,330213
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.jsowell.pile.dto.PushRealTimeInfoDTO;
|
||||
import com.jsowell.pile.dto.QueryEquipChargeStatusDTO;
|
||||
import com.jsowell.pile.dto.QueryOrderDTO;
|
||||
import com.jsowell.pile.dto.QueryStationInfoDTO;
|
||||
import com.jsowell.pile.mapper.ThirdPartyStationRelationMapper;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.thirdparty.CommonParamsDTO;
|
||||
import com.jsowell.pile.thirdparty.ConnectorInfo;
|
||||
@@ -77,6 +78,10 @@ public class HuZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
@Autowired
|
||||
private OrderBasicInfoService orderBasicInfoService;
|
||||
|
||||
@Autowired
|
||||
private ThirdPartyStationRelationMapper thirdPartyStationRelationMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
ThirdPartyPlatformFactory.register(thirdPlatformType, this);
|
||||
@@ -217,12 +222,23 @@ public class HuZhouPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
stationInfo.setStationID(String.valueOf(pileStationInfo.getId()));
|
||||
stationInfo.setOperatorID(Constants.OPERATORID_JIANG_SU); // 组织机构代码
|
||||
String organizationCode = pileStationInfo.getOrganizationCode();
|
||||
if (StringUtils.isNotBlank(organizationCode) && organizationCode.length() == 18) {
|
||||
String equipmentOwnerId = StringUtils.substring(organizationCode, organizationCode.length() - 10, organizationCode.length() - 1);
|
||||
stationInfo.setEquipmentOwnerID(equipmentOwnerId);
|
||||
}else {
|
||||
stationInfo.setEquipmentOwnerID(Constants.OPERATORID_JIANG_SU);
|
||||
}
|
||||
// if (StringUtils.isNotBlank(organizationCode) && organizationCode.length() == 18) {
|
||||
// String equipmentOwnerId = StringUtils.substring(organizationCode, organizationCode.length() - 10, organizationCode.length() - 1);
|
||||
// stationInfo.setEquipmentOwnerID(equipmentOwnerId);
|
||||
// }else {
|
||||
// stationInfo.setEquipmentOwnerID(Constants.OPERATORID_JIANG_SU);
|
||||
// }
|
||||
|
||||
ThirdPartyStationRelation build = ThirdPartyStationRelation.builder()
|
||||
.stationId(Long.valueOf(pileStationInfo.getId()))
|
||||
.thirdPartyType(thirdPlatformType)
|
||||
.build();
|
||||
|
||||
List<ThirdPartyStationRelation> thirdPartyStationRelations = thirdPartyStationRelationMapper.selectThirdPartyStationRelationList(build);
|
||||
|
||||
stationInfo.setEquipmentOwnerID(thirdPartyStationRelations.get(0).getEquipmentOwnerId());
|
||||
|
||||
|
||||
stationInfo.setStationName(pileStationInfo.getStationName());
|
||||
stationInfo.setCountryCode(pileStationInfo.getCountryCode());
|
||||
String areaCode = pileStationInfo.getAreaCode(); // 330000,330200,330213
|
||||
|
||||
@@ -17,6 +17,7 @@ import com.jsowell.pile.domain.*;
|
||||
import com.jsowell.pile.domain.ykcCommond.StartChargingCommand;
|
||||
import com.jsowell.pile.dto.*;
|
||||
import com.jsowell.pile.mapper.PileBasicInfoMapper;
|
||||
import com.jsowell.pile.mapper.ThirdPartyStationRelationMapper;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.thirdparty.*;
|
||||
import com.jsowell.pile.thirdparty.EquipmentInfoDTO;
|
||||
@@ -101,6 +102,8 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
@Autowired
|
||||
private PileBasicInfoMapper pileBasicInfoMapper;
|
||||
|
||||
@Autowired
|
||||
private ThirdPartyStationRelationMapper thirdPartyStationRelationMapper;
|
||||
|
||||
|
||||
|
||||
@@ -232,9 +235,20 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
SupStationInfoDTO1 stationInfo = new SupStationInfoDTO1();
|
||||
stationInfo.setStationID(String.valueOf(pileStationInfo.getId()));
|
||||
stationInfo.setOperatorID(Constants.OPERATORID_JIANG_SU); // 组织机构代码
|
||||
String organizationCode = pileStationInfo.getOrganizationCode();
|
||||
// String organizationCode = pileStationInfo.getOrganizationCode();
|
||||
// 充电服务运营商
|
||||
stationInfo.setEquipmentOwnerID(ThirdPartyPlatformUtils.extractEquipmentOwnerID(organizationCode));
|
||||
// stationInfo.setEquipmentOwnerID(ThirdPartyPlatformUtils.extractEquipmentOwnerID(organizationCode));
|
||||
|
||||
ThirdPartyStationRelation build = ThirdPartyStationRelation.builder()
|
||||
.stationId(Long.valueOf(pileStationInfo.getId()))
|
||||
.thirdPartyType(thirdPlatformType)
|
||||
.build();
|
||||
|
||||
List<ThirdPartyStationRelation> thirdPartyStationRelations = thirdPartyStationRelationMapper.selectThirdPartyStationRelationList(build);
|
||||
|
||||
stationInfo.setEquipmentOwnerID(thirdPartyStationRelations.get(0).getEquipmentOwnerId());
|
||||
|
||||
|
||||
stationInfo.setStationName(pileStationInfo.getStationName());
|
||||
stationInfo.setCountryCode(pileStationInfo.getCountryCode());
|
||||
|
||||
@@ -443,11 +457,17 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
info.setAreaCodeCountryside("12345678901");
|
||||
}
|
||||
// 截取运营商组织机构代码(去除最后一位后的最后九位)
|
||||
MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfoVO(String.valueOf(pileStationInfo.getMerchantId()));
|
||||
String organizationCode = merchantInfo.getOrganizationCode();
|
||||
// MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfoVO(String.valueOf(pileStationInfo.getMerchantId()));
|
||||
// String organizationCode = merchantInfo.getOrganizationCode();
|
||||
|
||||
info.setEquipmentOwnerID(ThirdPartyPlatformUtils.extractEquipmentOwnerID(organizationCode));
|
||||
ThirdPartyStationRelation build = ThirdPartyStationRelation.builder()
|
||||
.stationId(Long.valueOf(stationId))
|
||||
.thirdPartyType(thirdPlatformType)
|
||||
.build();
|
||||
|
||||
List<ThirdPartyStationRelation> thirdPartyStationRelations = thirdPartyStationRelationMapper.selectThirdPartyStationRelationList(build);
|
||||
|
||||
info.setEquipmentOwnerID(thirdPartyStationRelations.get(0).getEquipmentOwnerId());
|
||||
|
||||
// 站点图片
|
||||
if (StringUtils.isNotBlank(pileStationInfo.getPictures())) {
|
||||
@@ -499,15 +519,25 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
String stationId = entry.getKey();
|
||||
List<ConnectorInfoVO> voList = entry.getValue();
|
||||
|
||||
PileStationVO stationInfo = pileStationInfoService.getStationInfo(stationId);
|
||||
PileMerchantInfoVO pileMerchantInfoVO = pileMerchantInfoService.queryMerchantInfoByStationId(String.valueOf(stationInfo.getId()));
|
||||
String organizationCode = pileMerchantInfoVO.getOrganizationCode();
|
||||
// PileStationVO stationInfo = pileStationInfoService.getStationInfo(stationId);
|
||||
// PileMerchantInfoVO pileMerchantInfoVO = pileMerchantInfoService.queryMerchantInfoByStationId(String.valueOf(stationInfo.getId()));
|
||||
// String organizationCode = pileMerchantInfoVO.getOrganizationCode();
|
||||
|
||||
|
||||
ThirdPartyStationRelation build = ThirdPartyStationRelation.builder()
|
||||
.stationId(Long.valueOf(stationId))
|
||||
.thirdPartyType(thirdPlatformType)
|
||||
.build();
|
||||
|
||||
List<ThirdPartyStationRelation> thirdPartyStationRelations = thirdPartyStationRelationMapper.selectThirdPartyStationRelationList(build);
|
||||
|
||||
|
||||
|
||||
ConnectorStatusInfo connectorStatusInfo;
|
||||
for (ConnectorInfoVO connectorInfoVO : voList) {
|
||||
connectorStatusInfo = ConnectorStatusInfo.builder()
|
||||
.operatorId(Constants.OPERATORID_JIANG_SU)
|
||||
.equipmentOwnerId(ThirdPartyPlatformUtils.extractEquipmentOwnerID(organizationCode))
|
||||
.equipmentOwnerId(thirdPartyStationRelations.get(0).getEquipmentOwnerId())
|
||||
.stationId(connectorInfoVO.getStationId())
|
||||
.equipmentId(connectorInfoVO.getPileSn())
|
||||
.connectorID(connectorInfoVO.getPileConnectorCode())
|
||||
@@ -565,9 +595,18 @@ public class JiLinPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_CONNECTOR_INFO_NULL_ERROR);
|
||||
}
|
||||
|
||||
ThirdPartyStationRelation build = ThirdPartyStationRelation.builder()
|
||||
.stationId(Long.valueOf(stationId))
|
||||
.thirdPartyType(thirdPlatformType)
|
||||
.build();
|
||||
|
||||
List<ThirdPartyStationRelation> thirdPartyStationRelations = thirdPartyStationRelationMapper.selectThirdPartyStationRelationList(build);
|
||||
|
||||
|
||||
|
||||
SupConnectorStatusInfo info = SupConnectorStatusInfo.builder()
|
||||
.operatorID(Constants.OPERATORID_JIANG_SU)
|
||||
.equipmentOwnerID(MerchantUtils.getOperatorID(merchantInfoVO.getOrganizationCode()))
|
||||
.equipmentOwnerID(thirdPartyStationRelations.get(0).getEquipmentOwnerId())
|
||||
.stationID(connectorInfo.getStationId())
|
||||
.equipmentID(connectorInfo.getPileSn())
|
||||
.connectorID(pileConnectorCode)
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.jsowell.pile.domain.nanrui.JiangSuOrderInfo;
|
||||
import com.jsowell.pile.dto.*;
|
||||
import com.jsowell.pile.dto.nanrui.NRQueryOrderDTO;
|
||||
import com.jsowell.pile.dto.nanrui.PushAlarmInfoDTO;
|
||||
import com.jsowell.pile.mapper.ThirdPartyStationRelationMapper;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.vo.ThirdPartySecretInfoVO;
|
||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||
@@ -87,6 +88,10 @@ public class JiangSuPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
@Autowired
|
||||
private ThirdPartyStationRelationMapper thirdPartyStationRelationMapper;
|
||||
|
||||
|
||||
// 平台类型
|
||||
private final String thirdPlatformType = ThirdPlatformTypeEnum.JIANG_SU_PLATFORM.getTypeCode();
|
||||
|
||||
@@ -147,12 +152,24 @@ public class JiangSuPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
|
||||
.build();
|
||||
// 截取运营商组织机构代码(去除最后一位后的最后九位)
|
||||
MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfoVO(String.valueOf(stationInfoVO.getMerchantId()));
|
||||
String organizationCode = merchantInfo.getOrganizationCode();
|
||||
if (StringUtils.isNotBlank(organizationCode) && organizationCode.length() == 18) {
|
||||
String equipmentOwnerId = StringUtils.substring(organizationCode, organizationCode.length() - 10, organizationCode.length() - 1);
|
||||
nrStationInfo.setEquipmentOwnerID(equipmentOwnerId);
|
||||
}
|
||||
// MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfoVO(String.valueOf(stationInfoVO.getMerchantId()));
|
||||
// String organizationCode = merchantInfo.getOrganizationCode();
|
||||
// if (StringUtils.isNotBlank(organizationCode) && organizationCode.length() == 18) {
|
||||
// String equipmentOwnerId = StringUtils.substring(organizationCode, organizationCode.length() - 10, organizationCode.length() - 1);
|
||||
// nrStationInfo.setEquipmentOwnerID(equipmentOwnerId);
|
||||
// }
|
||||
|
||||
ThirdPartyStationRelation build = ThirdPartyStationRelation.builder()
|
||||
.stationId(Long.valueOf(stationId))
|
||||
.thirdPartyType(thirdPlatformType)
|
||||
.build();
|
||||
|
||||
List<ThirdPartyStationRelation> thirdPartyStationRelations = thirdPartyStationRelationMapper.selectThirdPartyStationRelationList(build);
|
||||
|
||||
nrStationInfo.setEquipmentOwnerID(thirdPartyStationRelations.get(0).getEquipmentOwnerId());
|
||||
|
||||
|
||||
|
||||
// 站点地址
|
||||
String areaCode = stationInfoVO.getAreaCode();
|
||||
// 截取最后一组数据,例如将 320000,320500,320583 截取为 320583
|
||||
@@ -218,7 +235,7 @@ public class JiangSuPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
NRStationInfo nrStationInfo = NRStationInfo.builder()
|
||||
.stationId(String.valueOf(pileStationInfo.getId()))
|
||||
.operatorID(Constants.OPERATORID_JIANG_SU)
|
||||
.equipmentOwnerID(Constants.OPERATORID_JIANG_SU)
|
||||
// .equipmentOwnerID(Constants.OPERATORID_JIANG_SU)
|
||||
.stationName(pileStationInfo.getStationName())
|
||||
.countryCode(pileStationInfo.getCountryCode())
|
||||
.areaCode(pileStationInfo.getAreaCode())
|
||||
@@ -232,6 +249,19 @@ public class JiangSuPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
.openAllDay(Integer.parseInt(pileStationInfo.getOpenAllDay()))
|
||||
.busineHours(pileStationInfo.getBusinessHours())
|
||||
.build();
|
||||
|
||||
|
||||
ThirdPartyStationRelation build = ThirdPartyStationRelation.builder()
|
||||
.stationId(pileStationInfo.getId())
|
||||
.thirdPartyType(thirdPlatformType)
|
||||
.build();
|
||||
|
||||
List<ThirdPartyStationRelation> thirdPartyStationRelations = thirdPartyStationRelationMapper.selectThirdPartyStationRelationList(build);
|
||||
|
||||
nrStationInfo.setEquipmentOwnerID(thirdPartyStationRelations.get(0).getEquipmentOwnerId());
|
||||
|
||||
|
||||
|
||||
// 站点费率
|
||||
// 查计费模板
|
||||
CurrentTimePriceDetails currentTimePriceDetails = pileBillingTemplateService.getCurrentTimePriceDetails(String.valueOf(pileStationInfo.getId()));
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.jsowell.pile.domain.*;
|
||||
import com.jsowell.pile.dto.PushRealTimeInfoDTO;
|
||||
import com.jsowell.pile.dto.QueryOperatorInfoDTO;
|
||||
import com.jsowell.pile.dto.QueryStationInfoDTO;
|
||||
import com.jsowell.pile.mapper.ThirdPartyStationRelationMapper;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.thirdparty.*;
|
||||
import com.jsowell.thirdparty.platform.domain.NMG.NMGSupConnectorInfo;
|
||||
@@ -97,6 +98,9 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
@Autowired
|
||||
private PileBillingTemplateService pileBillingTemplateService;
|
||||
|
||||
@Autowired
|
||||
ThirdPartyStationRelationMapper thirdPartyStationRelationMapper;
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
ThirdPartyPlatformFactory.register(thirdPlatformType, this);
|
||||
@@ -235,8 +239,17 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
stationInfo.setStationID(stationId);
|
||||
stationInfo.setOperatorID(Constants.JSOWELL_OPERATORID); // 组织机构代码
|
||||
String organizationCode = pileStationInfo.getOrganizationCode();
|
||||
String equipmentOwnerId = StringUtils.substring(organizationCode, organizationCode.length() - 10, organizationCode.length() - 1);
|
||||
stationInfo.setEquipmentOwnerID(equipmentOwnerId);
|
||||
|
||||
ThirdPartyStationRelation build = ThirdPartyStationRelation.builder()
|
||||
.stationId(Long.valueOf(stationId))
|
||||
.thirdPartyType(thirdPlatformType)
|
||||
.build();
|
||||
|
||||
List<ThirdPartyStationRelation> thirdPartyStationRelations = thirdPartyStationRelationMapper.selectThirdPartyStationRelationList(build);
|
||||
|
||||
stationInfo.setEquipmentOwnerID(thirdPartyStationRelations.get(0).getEquipmentOwnerId());
|
||||
|
||||
|
||||
stationInfo.setStationName(pileStationInfo.getStationName());
|
||||
stationInfo.setIsAloneApply(Integer.valueOf(pileStationInfo.getAloneApply()));
|
||||
stationInfo.setIsPublicParkingLot(Integer.valueOf(pileStationInfo.getPublicParking()));
|
||||
@@ -564,10 +577,17 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
}
|
||||
String operatorID = Constants.JSOWELL_OPERATORID;
|
||||
String organizationCode = pileMerchantInfoVO.getOrganizationCode();
|
||||
String equipmentOwnerId = StringUtils.substring(organizationCode, organizationCode.length() - 10, organizationCode.length() - 1);
|
||||
ThirdPartyStationRelation build = ThirdPartyStationRelation.builder()
|
||||
.stationId(Long.valueOf(stationId))
|
||||
.thirdPartyType(thirdPlatformType)
|
||||
.build();
|
||||
|
||||
List<ThirdPartyStationRelation> thirdPartyStationRelations = thirdPartyStationRelationMapper.selectThirdPartyStationRelationList(build);
|
||||
|
||||
|
||||
SupStationStatusInfo stationStatusInfo = new SupStationStatusInfo();
|
||||
stationStatusInfo.setStationID(stationId);
|
||||
stationStatusInfo.setEquipmentOwnerID(equipmentOwnerId);
|
||||
stationStatusInfo.setEquipmentOwnerID(thirdPartyStationRelations.get(0).getEquipmentOwnerId());
|
||||
stationStatusInfo.setOperatorID(operatorID);
|
||||
// 根据站点id查询充电桩列表
|
||||
List<ConnectorInfoVO> connectorInfoVOList = pileConnectorInfoService.getConnectorListForLianLian(Long.parseLong(stationId));
|
||||
@@ -576,7 +596,7 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
for (ConnectorInfoVO connectorInfoVO : connectorInfoVOList) {
|
||||
SupConnectorStatusInfo connectorStatusInfo = new SupConnectorStatusInfo();
|
||||
connectorStatusInfo.setOperatorID(operatorID);
|
||||
connectorStatusInfo.setEquipmentOwnerID(equipmentOwnerId);
|
||||
connectorStatusInfo.setEquipmentOwnerID(thirdPartyStationRelations.get(0).getEquipmentOwnerId());
|
||||
connectorStatusInfo.setStationID(stationId);
|
||||
connectorStatusInfo.setEquipmentID(connectorInfoVO.getPileSn());
|
||||
connectorStatusInfo.setConnectorID(connectorInfoVO.getPileConnectorCode());
|
||||
@@ -657,9 +677,18 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_CONNECTOR_INFO_NULL_ERROR);
|
||||
}
|
||||
|
||||
ThirdPartyStationRelation build = ThirdPartyStationRelation.builder()
|
||||
.stationId(Long.valueOf(stationId))
|
||||
.thirdPartyType(thirdPlatformType)
|
||||
.build();
|
||||
|
||||
List<ThirdPartyStationRelation> thirdPartyStationRelations = thirdPartyStationRelationMapper.selectThirdPartyStationRelationList(build);
|
||||
|
||||
|
||||
|
||||
SupConnectorStatusInfo info = SupConnectorStatusInfo.builder()
|
||||
.operatorID(Constants.JSOWELL_OPERATORID)
|
||||
.equipmentOwnerID(MerchantUtils.getOperatorID(merchantInfoVO.getOrganizationCode()))
|
||||
.equipmentOwnerID(thirdPartyStationRelations.get(0).getEquipmentOwnerId())
|
||||
.stationID(connectorInfo.getStationId())
|
||||
.equipmentID(connectorInfo.getPileSn())
|
||||
.connectorID(pileConnectorCode)
|
||||
|
||||
Reference in New Issue
Block a user