mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-13 11:49:49 +08:00
updateupdate 查询运营商列表
This commit is contained in:
@@ -210,7 +210,7 @@ public class PileService {
|
|||||||
CompletableFuture<List<BillingPriceVO>> billingPriceFuture = CompletableFuture.supplyAsync(() -> pileBillingTemplateService.queryBillingPrice(pileInfoVO.getStationId()));
|
CompletableFuture<List<BillingPriceVO>> billingPriceFuture = CompletableFuture.supplyAsync(() -> pileBillingTemplateService.queryBillingPrice(pileInfoVO.getStationId()));
|
||||||
|
|
||||||
// 查询运营商信息
|
// 查询运营商信息
|
||||||
CompletableFuture<MerchantInfoVO> merchantInfoVOFuture = CompletableFuture.supplyAsync(() -> pileMerchantInfoService.getMerchantInfo(pileInfoVO.getMerchantId()));
|
CompletableFuture<MerchantInfoVO> merchantInfoVOFuture = CompletableFuture.supplyAsync(() -> pileMerchantInfoService.getMerchantInfoVO(pileInfoVO.getMerchantId()));
|
||||||
|
|
||||||
CompletableFuture<Void> all = CompletableFuture.allOf(connectorInfoListFuture, merchantInfoVOFuture, billingPriceFuture);
|
CompletableFuture<Void> all = CompletableFuture.allOf(connectorInfoListFuture, merchantInfoVOFuture, billingPriceFuture);
|
||||||
// .join()和.get()都会阻塞并获取线程的执行情况
|
// .join()和.get()都会阻塞并获取线程的执行情况
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ public interface IPileMerchantInfoService {
|
|||||||
*/
|
*/
|
||||||
String getFirstLevelMerchantIdByAppId(String appId);
|
String getFirstLevelMerchantIdByAppId(String appId);
|
||||||
|
|
||||||
MerchantInfoVO getMerchantInfo(String merchantId);
|
MerchantInfoVO getMerchantInfoVO(String merchantId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据运营商部门ids 查询所有站点id
|
* 根据运营商部门ids 查询所有站点id
|
||||||
@@ -87,6 +87,8 @@ public interface IPileMerchantInfoService {
|
|||||||
|
|
||||||
PileMerchantInfo queryInfoByDeptId(String deptId);
|
PileMerchantInfo queryInfoByDeptId(String deptId);
|
||||||
|
|
||||||
|
MerchantInfoVO queryMerchantInfoVOByDeptId(String deptId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过ids查询信息列表
|
* 通过ids查询信息列表
|
||||||
* @param dto
|
* @param dto
|
||||||
|
|||||||
@@ -453,17 +453,29 @@ public class MemberBasicInfoServiceImpl implements IMemberBasicInfoService {
|
|||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
String deptLevel = dept.getDeptLevel();
|
String deptLevel = dept.getDeptLevel();
|
||||||
|
String deptId = String.valueOf(dept.getDeptId());
|
||||||
if (Constants.ZERO.equals(deptLevel)) {
|
if (Constants.ZERO.equals(deptLevel)) {
|
||||||
// 平台级权限 查询所有生效的运营商
|
// 平台级权限 查询所有生效的运营商
|
||||||
resultList = pileMerchantInfoService.selectAll();
|
resultList = pileMerchantInfoService.selectAll();
|
||||||
} else if (Constants.ONE.equals(deptLevel)) {
|
} else if (Constants.ONE.equals(deptLevel)) {
|
||||||
// 一级运营商权限 查询该一级运营商下面的所有运营商
|
// 一级运营商权限 查询该一级运营商下面的所有运营商
|
||||||
PileMerchantInfo merchantInfo = pileMerchantInfoService.queryInfoByDeptId(String.valueOf(dept.getDeptId()));
|
PileMerchantInfo merchantInfo = pileMerchantInfoService.queryInfoByDeptId(deptId);
|
||||||
resultList = pileMerchantInfoService.selectListByFirstMerchant(merchantInfo.getId() + "");
|
resultList = pileMerchantInfoService.selectListByFirstMerchant(merchantInfo.getId() + "");
|
||||||
} else if (Constants.TWO.equals(deptLevel) ) {
|
} else if (Constants.TWO.equals(deptLevel) ) {
|
||||||
// 二级运营商权限 返回自身运营商
|
// 二级运营商权限 返回自身运营商
|
||||||
|
MerchantInfoVO merchantInfoVO = pileMerchantInfoService.queryMerchantInfoVOByDeptId(deptId);
|
||||||
|
if (Objects.nonNull(merchantInfoVO)) {
|
||||||
|
resultList.add(merchantInfoVO);
|
||||||
|
}
|
||||||
} else if (Constants.THREE.equals(deptLevel)) {
|
} else if (Constants.THREE.equals(deptLevel)) {
|
||||||
// 站点权限 返回自身运营商
|
// 站点权限 返回自身运营商
|
||||||
|
PileStationInfo stationInfo = pileStationInfoService.queryInfoByDeptId(deptId);
|
||||||
|
if (Objects.nonNull(stationInfo)) {
|
||||||
|
MerchantInfoVO merchantInfoVO = pileMerchantInfoService.getMerchantInfoVO(stationInfo.getMerchantId() + "");
|
||||||
|
if (Objects.nonNull(merchantInfoVO)) {
|
||||||
|
resultList.add(merchantInfoVO);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -422,7 +422,7 @@ public class PileBasicInfoServiceImpl implements IPileBasicInfoService {
|
|||||||
.merchantId(String.valueOf(basicInfo.getMerchantId()))
|
.merchantId(String.valueOf(basicInfo.getMerchantId()))
|
||||||
.build();
|
.build();
|
||||||
// 查站点信息
|
// 查站点信息
|
||||||
MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfo(String.valueOf(basicInfo.getMerchantId()));
|
MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfoVO(String.valueOf(basicInfo.getMerchantId()));
|
||||||
if (merchantInfo != null) {
|
if (merchantInfo != null) {
|
||||||
pileInfoVO.setMerchantName(merchantInfo.getMerchantName());
|
pileInfoVO.setMerchantName(merchantInfo.getMerchantName());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -307,7 +307,7 @@ public class PileMerchantInfoServiceImpl implements IPileMerchantInfoService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MerchantInfoVO getMerchantInfo(String merchantId) {
|
public MerchantInfoVO getMerchantInfoVO(String merchantId) {
|
||||||
PileMerchantInfo pileMerchantInfo = selectPileMerchantInfoById(Long.parseLong(merchantId));
|
PileMerchantInfo pileMerchantInfo = selectPileMerchantInfoById(Long.parseLong(merchantId));
|
||||||
if (pileMerchantInfo == null) {
|
if (pileMerchantInfo == null) {
|
||||||
return null;
|
return null;
|
||||||
@@ -351,6 +351,15 @@ public class PileMerchantInfoServiceImpl implements IPileMerchantInfoService {
|
|||||||
return pileMerchantInfoMapper.queryInfoByDeptId(deptId);
|
return pileMerchantInfoMapper.queryInfoByDeptId(deptId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MerchantInfoVO queryMerchantInfoVOByDeptId(String deptId) {
|
||||||
|
PileMerchantInfo merchantInfo = queryInfoByDeptId(deptId);
|
||||||
|
if (Objects.isNull(merchantInfo)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return conversion2MerchantInfoVO(merchantInfo);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过ids查询信息列表
|
* 通过ids查询信息列表
|
||||||
* @param dto
|
* @param dto
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ public class PileStationInfoServiceImpl implements IPileStationInfoService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(readOnly = false, propagation = Propagation.REQUIRED)
|
@Transactional(readOnly = false, propagation = Propagation.REQUIRED)
|
||||||
public int fastCreateStation(FastCreateStationDTO dto) {
|
public int fastCreateStation(FastCreateStationDTO dto) {
|
||||||
MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfo(dto.getMerchantId());
|
MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfoVO(dto.getMerchantId());
|
||||||
if (merchantInfo == null) {
|
if (merchantInfo == null) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -345,7 +345,7 @@ public class PileStationInfoServiceImpl implements IPileStationInfoService {
|
|||||||
/*
|
/*
|
||||||
修改组织部门
|
修改组织部门
|
||||||
*/
|
*/
|
||||||
MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfo(newMerchantId);
|
MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfoVO(newMerchantId);
|
||||||
if (merchantInfo != null) {
|
if (merchantInfo != null) {
|
||||||
// 创建一个新的站点对应部门
|
// 创建一个新的站点对应部门
|
||||||
SysDept dept = sysDeptService.createStationDept(Long.valueOf(merchantInfo.getDeptId()),
|
SysDept dept = sysDeptService.createStationDept(Long.valueOf(merchantInfo.getDeptId()),
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ import com.jsowell.common.util.JWTUtils;
|
|||||||
import com.jsowell.common.util.PageUtils;
|
import com.jsowell.common.util.PageUtils;
|
||||||
import com.jsowell.common.util.StringUtils;
|
import com.jsowell.common.util.StringUtils;
|
||||||
import com.jsowell.pile.domain.*;
|
import com.jsowell.pile.domain.*;
|
||||||
import com.jsowell.pile.domain.ykcCommond.IssueQRCodeCommand;
|
|
||||||
import com.jsowell.pile.domain.ykcCommond.StartChargingCommand;
|
import com.jsowell.pile.domain.ykcCommond.StartChargingCommand;
|
||||||
import com.jsowell.pile.domain.ykcCommond.StopChargingCommand;
|
import com.jsowell.pile.domain.ykcCommond.StopChargingCommand;
|
||||||
import com.jsowell.pile.dto.*;
|
import com.jsowell.pile.dto.*;
|
||||||
@@ -48,7 +47,6 @@ import com.jsowell.thirdparty.lianlian.vo.*;
|
|||||||
import com.jsowell.thirdparty.yongchengboche.dto.YCBCGetTokenDTO;
|
import com.jsowell.thirdparty.yongchengboche.dto.YCBCGetTokenDTO;
|
||||||
import com.jsowell.thirdparty.yongchengboche.service.YCBCService;
|
import com.jsowell.thirdparty.yongchengboche.service.YCBCService;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.RandomStringUtils;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -111,7 +109,7 @@ public class LianLianServiceImpl implements LianLianService {
|
|||||||
@Override
|
@Override
|
||||||
public void pushMerchantInfo(Long merchantId) {
|
public void pushMerchantInfo(Long merchantId) {
|
||||||
// 通过id查询运营商信息
|
// 通过id查询运营商信息
|
||||||
MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfo(String.valueOf(merchantId));
|
MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfoVO(String.valueOf(merchantId));
|
||||||
// 组装联联平台所需要的数据格式
|
// 组装联联平台所需要的数据格式
|
||||||
OperatorInfo operatorInfo = OperatorInfo.builder()
|
OperatorInfo operatorInfo = OperatorInfo.builder()
|
||||||
.OperatorID(Constants.OPERATORID_LIANLIAN) // 组织机构代码
|
.OperatorID(Constants.OPERATORID_LIANLIAN) // 组织机构代码
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ public class ZDLServiceImpl implements ZDLService {
|
|||||||
|
|
||||||
.build();
|
.build();
|
||||||
// 截取运营商组织机构代码(去除最后一位后的最后九位)
|
// 截取运营商组织机构代码(去除最后一位后的最后九位)
|
||||||
MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfo(String.valueOf(pileStationInfo.getMerchantId()));
|
MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfoVO(String.valueOf(pileStationInfo.getMerchantId()));
|
||||||
String organizationCode = merchantInfo.getOrganizationCode();
|
String organizationCode = merchantInfo.getOrganizationCode();
|
||||||
if (organizationCode.length() == 18) {
|
if (organizationCode.length() == 18) {
|
||||||
String equipmentOwnerId = StringUtils.substring(organizationCode, organizationCode.length() - 10, organizationCode.length() - 1);
|
String equipmentOwnerId = StringUtils.substring(organizationCode, organizationCode.length() - 10, organizationCode.length() - 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user