mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 19:15:35 +08:00
登陆成功后异步发送0x58下发计费模板
This commit is contained in:
@@ -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<String> 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卡,把信息存库
|
||||
|
||||
Reference in New Issue
Block a user