diff --git a/jsowell-common/src/main/java/com/jsowell/common/constant/Constants.java b/jsowell-common/src/main/java/com/jsowell/common/constant/Constants.java index 0ec9fbd51..1b4c10cc6 100644 --- a/jsowell-common/src/main/java/com/jsowell/common/constant/Constants.java +++ b/jsowell-common/src/main/java/com/jsowell/common/constant/Constants.java @@ -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 diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/lianlian/service/impl/LianLianServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/lianlian/service/impl/LianLianServiceImpl.java index 542f30423..27e273639 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/lianlian/service/impl/LianLianServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/lianlian/service/impl/LianLianServiceImpl.java @@ -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); diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/nanrui/service/impl/NRServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/nanrui/service/impl/NRServiceImpl.java index e9d74929a..c7da627b4 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/nanrui/service/impl/NRServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/nanrui/service/impl/NRServiceImpl.java @@ -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