From 1acb03f56e778e343b32b6aa391e9fd612a23c17 Mon Sep 17 00:00:00 2001 From: Lemon Date: Mon, 14 Oct 2024 14:48:03 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E9=99=86=E6=88=90=E5=8A=9F=E5=90=8E?= =?UTF-8?q?=E5=BC=82=E6=AD=A5=E5=8F=91=E9=80=810x58=E4=B8=8B=E5=8F=91?= =?UTF-8?q?=E8=AE=A1=E8=B4=B9=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunkuaichong/LoginRequestHandler.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/jsowell-netty/src/main/java/com/jsowell/netty/handler/yunkuaichong/LoginRequestHandler.java b/jsowell-netty/src/main/java/com/jsowell/netty/handler/yunkuaichong/LoginRequestHandler.java index 9aa2fe819..03a9ae583 100644 --- a/jsowell-netty/src/main/java/com/jsowell/netty/handler/yunkuaichong/LoginRequestHandler.java +++ b/jsowell-netty/src/main/java/com/jsowell/netty/handler/yunkuaichong/LoginRequestHandler.java @@ -15,9 +15,12 @@ import com.jsowell.netty.factory.YKCOperateFactory; import com.jsowell.pile.domain.PileBasicInfo; import com.jsowell.pile.domain.ykcCommond.IssueQRCodeCommand; import com.jsowell.pile.domain.ykcCommond.ProofreadTimeCommand; +import com.jsowell.pile.domain.ykcCommond.PublishPileBillingTemplateCommand; import com.jsowell.pile.service.PileBasicInfoService; +import com.jsowell.pile.service.PileBillingTemplateService; import com.jsowell.pile.service.PileMsgRecordService; import com.jsowell.pile.service.YKCPushCommandService; +import com.jsowell.pile.vo.web.BillingTemplateVO; import io.netty.channel.ChannelHandlerContext; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -42,6 +45,9 @@ public class LoginRequestHandler extends AbstractYkcHandler { @Autowired private PileMsgRecordService pileMsgRecordService; + @Autowired + private PileBillingTemplateService pileBillingTemplateService; + private List newProgramVersionList = Lists.newArrayList("c6-30"); // 引入线程池 @@ -232,6 +238,18 @@ public class LoginRequestHandler extends AbstractYkcHandler { ykcPushCommandService.pushIssueQRCodeCommand(issueQRCodeCommand); }, executor); + // 异步发送0x58 + CompletableFuture.runAsync(() -> { + // 查询计费模板 + BillingTemplateVO billingTemplateVO = pileBillingTemplateService.selectBillingTemplateDetailByPileSn(pileSn); + PublishPileBillingTemplateCommand command = PublishPileBillingTemplateCommand.builder() + .pileSn(pileSn) + .billingTemplateVO(billingTemplateVO) + .build(); + // 发送请求 + ykcPushCommandService.pushPublishPileBillingTemplate(command); + }, executor); + if (StringUtils.equals("00", internetConnection)) { CompletableFuture.runAsync(() -> { // 充电桩使用的sim卡,把信息存库