新增 推送订单电池充电报告方法至0x3b中

This commit is contained in:
Lemon
2025-04-15 10:31:01 +08:00
parent 9c3eac914c
commit f9334d0be4
2 changed files with 41 additions and 4 deletions

View File

@@ -24,6 +24,7 @@ import com.jsowell.pile.service.*;
import com.jsowell.pile.service.programlogic.AbstractProgramLogic;
import com.jsowell.pile.service.programlogic.ProgramLogicFactory;
import com.jsowell.thirdparty.common.CommonService;
import com.jsowell.thirdparty.platform.service.impl.ChargeAlgorithmService;
import io.netty.channel.ChannelHandlerContext;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@@ -77,6 +78,9 @@ public class TransactionRecordsRequestHandler extends AbstractYkcHandler {
@Autowired
private PileBasicInfoService pileBasicInfoService;
@Autowired
private ChargeAlgorithmService chargeAlgorithmService;
@Autowired
private PersonalChargingRecordService personalChargingRecordService;
@@ -680,6 +684,17 @@ public class TransactionRecordsRequestHandler extends AbstractYkcHandler {
log.error("推送第三方平台订单信息error, ", e);
}
}, executor);
// 异步推送充电订单算法平台
CompletableFuture.runAsync(() -> {
try {
String result = chargeAlgorithmService.pushOrderInfo(finalOrderBasicInfo.getOrderCode());
log.info("异步推送充电订单算法平台 result:{}", result);
} catch (Exception e) {
log.error("异步推送充电订单算法平台 error, ", e);
}
}, executor);
} else {
// 平台没有查到订单
orderBasicInfoService.saveAbnormalOrder(data);