update 第三方平台推送时判断具体的运营商组织结构代码

This commit is contained in:
Lemon
2023-12-06 11:22:22 +08:00
parent a6d76b4c9c
commit 410292e21d
3 changed files with 26 additions and 2 deletions

View File

@@ -58,6 +58,8 @@ public class Constants {
public static final String OPERATORID_XI_XIAO = "MAC13L2Q9";
public static final String OPERATORID_YUAN_DA = "599777560";
// public static final String APP_ID = "wxbb3e0d474569481d"; // 举视充电网 wxbb3e0d474569481d
//
// public static final String APP_SECRET = "bbac689f4654b209de4d6944808ec80b"; // 举视充电网 bbac689f4654b209de4d6944808ec80b

View File

@@ -160,7 +160,7 @@ public class LianLianServiceImpl implements LianLianService {
StationInfo info = StationInfo.builder()
.stationID("LC" +dto.getStationId())
.operatorID(operatorId)
.equipmentOwnerID(Constants.OPERATORID_LIANLIAN)
// .equipmentOwnerID(Constants.OPERATORID_LIANLIAN)
.stationName(pileStationInfo.getStationName())
.isAloneApply(Integer.valueOf(pileStationInfo.getAloneApply()))
.isPublicParkingLot(Integer.valueOf(pileStationInfo.getPublicParking()))
@@ -198,6 +198,17 @@ public class LianLianServiceImpl implements LianLianService {
// 只取最后一部分 330213
String subAreaCode = split[split.length - 1];
info.setAreaCode(subAreaCode);
// 截取运营商组织机构代码(去除最后一位后的最后九位)
MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfoVO(String.valueOf(pileStationInfo.getMerchantId()));
String organizationCode = merchantInfo.getOrganizationCode();
if (StringUtils.isNotBlank(organizationCode) && organizationCode.length() == 18) {
String equipmentOwnerId = StringUtils.substring(organizationCode, organizationCode.length() - 10, organizationCode.length() - 1);
info.setEquipmentOwnerID(equipmentOwnerId);
}
if (StringUtils.equals("36", String.valueOf(pileStationInfo.getMerchantId()))) {
// 远大
info.setEquipmentOwnerID(Constants.OPERATORID_YUAN_DA);
}
if (StringUtils.equals("35", String.valueOf(pileStationInfo.getMerchantId()))) {
// 如果是希晓运营商则把equipmentOwnerID换成希晓
info.setEquipmentOwnerID(Constants.OPERATORID_XI_XIAO);

View File

@@ -23,6 +23,7 @@ import com.jsowell.pile.dto.QueryStationInfoDTO;
import com.jsowell.pile.dto.nanrui.NRQueryOrderDTO;
import com.jsowell.pile.dto.nanrui.PushAlarmInfoDTO;
import com.jsowell.pile.service.*;
import com.jsowell.pile.vo.base.MerchantInfoVO;
import com.jsowell.pile.vo.base.ThirdPartyStationInfoVO;
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
import com.jsowell.pile.vo.nanrui.NROrderInfoVO;
@@ -76,6 +77,9 @@ public class NRServiceImpl implements NRService {
@Autowired
private IPileBillingTemplateService pileBillingTemplateService;
@Autowired
private IPileMerchantInfoService pileMerchantInfoService;
@Autowired
private IOrderBasicInfoService orderBasicInfoService;
@@ -153,7 +157,7 @@ public class NRServiceImpl implements NRService {
NRStationInfo nrStationInfo = NRStationInfo.builder()
.stationId(String.valueOf(stationInfoVO.getId()))
.operatorID(Constants.OPERATORID_JIANG_SU)
.equipmentOwnerID(Constants.OPERATORID_JIANG_SU)
// .equipmentOwnerID(Constants.OPERATORID_JIANG_SU)
.stationName(stationInfoVO.getStationName())
.countryCode(stationInfoVO.getCountryCode())
// .areaCode()
@@ -185,6 +189,13 @@ public class NRServiceImpl implements NRService {
.parkFeeType(1)
.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);
}
// 站点地址
String areaCode = stationInfoVO.getAreaCode();
// 截取最后一组数据,例如将 320000,320500,320583 截取为 320583