mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-12 11:19:52 +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.PileBasicInfo;
|
||||||
import com.jsowell.pile.domain.ykcCommond.IssueQRCodeCommand;
|
import com.jsowell.pile.domain.ykcCommond.IssueQRCodeCommand;
|
||||||
import com.jsowell.pile.domain.ykcCommond.ProofreadTimeCommand;
|
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.PileBasicInfoService;
|
||||||
|
import com.jsowell.pile.service.PileBillingTemplateService;
|
||||||
import com.jsowell.pile.service.PileMsgRecordService;
|
import com.jsowell.pile.service.PileMsgRecordService;
|
||||||
import com.jsowell.pile.service.YKCPushCommandService;
|
import com.jsowell.pile.service.YKCPushCommandService;
|
||||||
|
import com.jsowell.pile.vo.web.BillingTemplateVO;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -42,6 +45,9 @@ public class LoginRequestHandler extends AbstractYkcHandler {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private PileMsgRecordService pileMsgRecordService;
|
private PileMsgRecordService pileMsgRecordService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private PileBillingTemplateService pileBillingTemplateService;
|
||||||
|
|
||||||
private List<String> newProgramVersionList = Lists.newArrayList("c6-30");
|
private List<String> newProgramVersionList = Lists.newArrayList("c6-30");
|
||||||
|
|
||||||
// 引入线程池
|
// 引入线程池
|
||||||
@@ -232,6 +238,18 @@ public class LoginRequestHandler extends AbstractYkcHandler {
|
|||||||
ykcPushCommandService.pushIssueQRCodeCommand(issueQRCodeCommand);
|
ykcPushCommandService.pushIssueQRCodeCommand(issueQRCodeCommand);
|
||||||
}, executor);
|
}, 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)) {
|
if (StringUtils.equals("00", internetConnection)) {
|
||||||
CompletableFuture.runAsync(() -> {
|
CompletableFuture.runAsync(() -> {
|
||||||
// 充电桩使用的sim卡,把信息存库
|
// 充电桩使用的sim卡,把信息存库
|
||||||
|
|||||||
Reference in New Issue
Block a user