From 410292e21de7144587065dbe3bf8a17a4ff14142 Mon Sep 17 00:00:00 2001 From: Lemon Date: Wed, 6 Dec 2023 11:22:22 +0800 Subject: [PATCH] =?UTF-8?q?update=20=20=E7=AC=AC=E4=B8=89=E6=96=B9?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E6=8E=A8=E9=80=81=E6=97=B6=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E5=85=B7=E4=BD=93=E7=9A=84=E8=BF=90=E8=90=A5=E5=95=86=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E7=BB=93=E6=9E=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/jsowell/common/constant/Constants.java | 2 ++ .../lianlian/service/impl/LianLianServiceImpl.java | 13 ++++++++++++- .../nanrui/service/impl/NRServiceImpl.java | 13 ++++++++++++- 3 files changed, 26 insertions(+), 2 deletions(-) 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