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卡,把信息存库