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

@@ -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);