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

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