mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-07 11:29:58 +08:00
update
This commit is contained in:
@@ -107,6 +107,8 @@ public class PileRemoteService {
|
||||
*/
|
||||
public void issueQRCode(String pileSn) {
|
||||
IssueQRCodeCommand command = IssueQRCodeCommand.builder().pileSn(pileSn).build();
|
||||
// 查询充电站info
|
||||
|
||||
ykcPushCommandService.pushIssueQRCodeCommand(command);
|
||||
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.common.util.SecurityUtils;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.common.util.id.SnUtils;
|
||||
import com.jsowell.netty.command.ykc.IssueQRCodeCommand;
|
||||
import com.jsowell.netty.service.yunkuaichong.YKCPushCommandService;
|
||||
import com.jsowell.pile.domain.MemberBasicInfo;
|
||||
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||
@@ -106,6 +105,9 @@ public class PileService {
|
||||
@Autowired
|
||||
private YKCPushCommandService ykcPushCommandService;
|
||||
|
||||
@Autowired
|
||||
private PileRemoteService pileRemoteService;
|
||||
|
||||
/**
|
||||
* 查询设备信息
|
||||
*
|
||||
@@ -519,13 +521,15 @@ public class PileService {
|
||||
List<String> pileSnList = pileDetailVOS.stream()
|
||||
.map(PileDetailVO::getPileSn)
|
||||
.collect(Collectors.toList());
|
||||
IssueQRCodeCommand command;
|
||||
// IssueQRCodeCommand command;
|
||||
for (String pileSn : pileSnList) {
|
||||
// 给桩下发二维码
|
||||
command = new IssueQRCodeCommand();
|
||||
command.setPileSn(pileSn);
|
||||
command.setQrcodePrefix(dto.getQrcodePrefix());
|
||||
ykcPushCommandService.pushIssueQRCodeCommand(command);
|
||||
// command = new IssueQRCodeCommand();
|
||||
// command.setPileSn(pileSn);
|
||||
// command.setQrcodePrefix(dto.getQrcodePrefix());
|
||||
// ykcPushCommandService.pushIssueQRCodeCommand(command);
|
||||
|
||||
pileRemoteService.issueQRCode(pileSn);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import com.jsowell.common.core.page.PageResponse;
|
||||
import com.jsowell.pile.domain.PileStationInfo;
|
||||
import com.jsowell.pile.dto.FastCreateStationDTO;
|
||||
import com.jsowell.pile.dto.QueryStationDTO;
|
||||
import com.jsowell.pile.vo.base.StationInfoVO;
|
||||
import com.jsowell.pile.vo.web.PileStationVO;
|
||||
|
||||
import java.util.List;
|
||||
@@ -89,4 +88,6 @@ public interface IPileStationInfoService {
|
||||
PageResponse uniAppQueryStationInfoList(QueryStationDTO queryStationDTO);
|
||||
|
||||
PileStationVO getStationInfo(String stationId);
|
||||
|
||||
PileStationVO getStationInfoByPileSn(String pileSn);
|
||||
}
|
||||
|
||||
@@ -95,6 +95,7 @@ public class PileBasicInfoServiceImpl implements IPileBasicInfoService {
|
||||
|
||||
@Override
|
||||
public PileBasicInfo selectPileBasicInfoBySN(String pileSn) {
|
||||
// 加缓存
|
||||
return pileBasicInfoMapper.selectPileBasicInfoBySn(pileSn);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,31 +1,33 @@
|
||||
package com.jsowell.pile.service.impl;
|
||||
|
||||
import cn.hutool.core.util.PageUtil;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.core.domain.entity.SysDept;
|
||||
import com.jsowell.common.core.domain.vo.AuthorizedDeptVO;
|
||||
import com.jsowell.common.core.page.PageResponse;
|
||||
import com.jsowell.common.util.*;
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.common.util.DistanceUtils;
|
||||
import com.jsowell.common.util.SecurityUtils;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.common.util.ip.AddressUtils;
|
||||
import com.jsowell.pile.domain.PileStationInfo;
|
||||
import com.jsowell.pile.dto.FastCreateStationDTO;
|
||||
import com.jsowell.pile.dto.QueryStationDTO;
|
||||
import com.jsowell.pile.mapper.PileStationInfoMapper;
|
||||
import com.jsowell.pile.service.IPileBasicInfoService;
|
||||
import com.jsowell.pile.service.IPileBillingTemplateService;
|
||||
import com.jsowell.pile.service.IPileConnectorInfoService;
|
||||
import com.jsowell.pile.service.IPileMerchantInfoService;
|
||||
import com.jsowell.pile.service.IPileStationInfoService;
|
||||
import com.jsowell.pile.vo.base.ConnectorInfoVO;
|
||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||
import com.jsowell.pile.vo.base.PileInfoVO;
|
||||
import com.jsowell.pile.vo.base.StationInfoVO;
|
||||
import com.jsowell.pile.vo.uniapp.CurrentTimePriceDetails;
|
||||
import com.jsowell.pile.vo.web.PileStationVO;
|
||||
import com.jsowell.system.service.SysDeptService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -58,6 +60,9 @@ public class PileStationInfoServiceImpl implements IPileStationInfoService {
|
||||
@Autowired
|
||||
private SysDeptService sysDeptService;
|
||||
|
||||
@Autowired
|
||||
private IPileBasicInfoService pileBasicInfoService;
|
||||
|
||||
/**
|
||||
* 查询充电站信息
|
||||
*
|
||||
@@ -71,6 +76,7 @@ public class PileStationInfoServiceImpl implements IPileStationInfoService {
|
||||
|
||||
/**
|
||||
* 查询站点基本资料
|
||||
* 加缓存
|
||||
* @param stationId
|
||||
* @return
|
||||
*/
|
||||
@@ -116,6 +122,18 @@ public class PileStationInfoServiceImpl implements IPileStationInfoService {
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PileStationVO getStationInfoByPileSn(String pileSn) {
|
||||
// 通过pileSn查询充电桩(缓存方法)
|
||||
PileInfoVO pileInfoVO = pileBasicInfoService.selectPileInfoBySn(pileSn);
|
||||
if (pileInfoVO == null) {
|
||||
return null;
|
||||
}
|
||||
// 通过stationId查询充电站信息(缓存方法)
|
||||
PileStationVO stationInfo = getStationInfo(pileInfoVO.getStationId());
|
||||
return stationInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询充电站信息列表
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user