update 二维码下发规则

This commit is contained in:
Lemon
2023-04-06 16:18:06 +08:00
parent 36ec9c9940
commit 34f9aa4317
2 changed files with 18 additions and 9 deletions

View File

@@ -16,8 +16,10 @@ import com.jsowell.pile.domain.PileBillingTemplate;
import com.jsowell.pile.dto.PublishBillingTemplateDTO;
import com.jsowell.pile.service.IPileBasicInfoService;
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.PileDetailVO;
import com.jsowell.pile.vo.web.PileStationVO;
import org.apache.commons.collections4.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -41,6 +43,9 @@ public class PileRemoteService {
@Autowired
private YKCPushCommandService ykcPushCommandService;
@Autowired
private IPileStationInfoService pileStationInfoService;
/**
* 获取充电桩实时数据信息
*
@@ -108,9 +113,11 @@ public class PileRemoteService {
public void issueQRCode(String pileSn) {
IssueQRCodeCommand command = IssueQRCodeCommand.builder().pileSn(pileSn).build();
// 查询充电站info
ykcPushCommandService.pushIssueQRCodeCommand(command);
PileStationVO pileStationVO = pileStationInfoService.getStationInfoByPileSn(pileSn);
if (StringUtils.isNotBlank(pileStationVO.getQrcodePrefix())) {
command.setQrcodePrefix(pileStationVO.getQrcodePrefix());
ykcPushCommandService.pushIssueQRCodeCommand(command);
}
}
/**