mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-25 01:29:47 +08:00
update 二维码下发规则
This commit is contained in:
@@ -16,8 +16,10 @@ import com.jsowell.pile.domain.PileBillingTemplate;
|
|||||||
import com.jsowell.pile.dto.PublishBillingTemplateDTO;
|
import com.jsowell.pile.dto.PublishBillingTemplateDTO;
|
||||||
import com.jsowell.pile.service.IPileBasicInfoService;
|
import com.jsowell.pile.service.IPileBasicInfoService;
|
||||||
import com.jsowell.pile.service.IPileBillingTemplateService;
|
import com.jsowell.pile.service.IPileBillingTemplateService;
|
||||||
|
import com.jsowell.pile.service.IPileStationInfoService;
|
||||||
import com.jsowell.pile.vo.web.BillingTemplateVO;
|
import com.jsowell.pile.vo.web.BillingTemplateVO;
|
||||||
import com.jsowell.pile.vo.web.PileDetailVO;
|
import com.jsowell.pile.vo.web.PileDetailVO;
|
||||||
|
import com.jsowell.pile.vo.web.PileStationVO;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@@ -41,6 +43,9 @@ public class PileRemoteService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private YKCPushCommandService ykcPushCommandService;
|
private YKCPushCommandService ykcPushCommandService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IPileStationInfoService pileStationInfoService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取充电桩实时数据信息
|
* 获取充电桩实时数据信息
|
||||||
*
|
*
|
||||||
@@ -108,9 +113,11 @@ public class PileRemoteService {
|
|||||||
public void issueQRCode(String pileSn) {
|
public void issueQRCode(String pileSn) {
|
||||||
IssueQRCodeCommand command = IssueQRCodeCommand.builder().pileSn(pileSn).build();
|
IssueQRCodeCommand command = IssueQRCodeCommand.builder().pileSn(pileSn).build();
|
||||||
// 查询充电站info
|
// 查询充电站info
|
||||||
|
PileStationVO pileStationVO = pileStationInfoService.getStationInfoByPileSn(pileSn);
|
||||||
|
if (StringUtils.isNotBlank(pileStationVO.getQrcodePrefix())) {
|
||||||
|
command.setQrcodePrefix(pileStationVO.getQrcodePrefix());
|
||||||
ykcPushCommandService.pushIssueQRCodeCommand(command);
|
ykcPushCommandService.pushIssueQRCodeCommand(command);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -16,13 +16,11 @@ import com.jsowell.common.util.StringUtils;
|
|||||||
import com.jsowell.common.util.YKCUtils;
|
import com.jsowell.common.util.YKCUtils;
|
||||||
import com.jsowell.netty.command.ykc.*;
|
import com.jsowell.netty.command.ykc.*;
|
||||||
import com.jsowell.netty.service.yunkuaichong.YKCPushCommandService;
|
import com.jsowell.netty.service.yunkuaichong.YKCPushCommandService;
|
||||||
import com.jsowell.pile.service.IPileBasicInfoService;
|
import com.jsowell.pile.domain.PileBasicInfo;
|
||||||
import com.jsowell.pile.service.IPileBillingTemplateService;
|
import com.jsowell.pile.service.*;
|
||||||
import com.jsowell.pile.service.IPileConnectorInfoService;
|
|
||||||
import com.jsowell.pile.service.IPileModelInfoService;
|
|
||||||
import com.jsowell.pile.service.IPileMsgRecordService;
|
|
||||||
import com.jsowell.pile.vo.web.BillingTemplateVO;
|
import com.jsowell.pile.vo.web.BillingTemplateVO;
|
||||||
import com.jsowell.pile.vo.web.PileModelInfoVO;
|
import com.jsowell.pile.vo.web.PileModelInfoVO;
|
||||||
|
import com.jsowell.pile.vo.web.PileStationVO;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.channel.Channel;
|
import io.netty.channel.Channel;
|
||||||
import io.netty.channel.ChannelFuture;
|
import io.netty.channel.ChannelFuture;
|
||||||
@@ -49,6 +47,9 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IPileBasicInfoService pileBasicInfoService;
|
private IPileBasicInfoService pileBasicInfoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IPileStationInfoService pileStationInfoService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private RedisCache redisCache;
|
private RedisCache redisCache;
|
||||||
|
|
||||||
@@ -226,7 +227,8 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService {
|
|||||||
// String qrCodePrefix = pileBasicInfoService.getPileQrCodeUrl(null);
|
// String qrCodePrefix = pileBasicInfoService.getPileQrCodeUrl(null);
|
||||||
String qrCodePrefix = "";
|
String qrCodePrefix = "";
|
||||||
if (StringUtils.isBlank(command.getQrcodePrefix())) {
|
if (StringUtils.isBlank(command.getQrcodePrefix())) {
|
||||||
qrCodePrefix = pileConnectorInfoService.getPileConnectorQrCodeUrl(null);
|
// 为空则给平台二维码前缀
|
||||||
|
qrCodePrefix = pileBasicInfoService.getPileQrCodeUrl(null);
|
||||||
}else {
|
}else {
|
||||||
qrCodePrefix = command.getQrcodePrefix();
|
qrCodePrefix = command.getQrcodePrefix();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user