手动结算订单

This commit is contained in:
2023-03-16 15:23:01 +08:00
parent e28093012b
commit 337899b9ed
5 changed files with 92 additions and 40 deletions

View File

@@ -7,6 +7,7 @@ import com.jsowell.netty.command.ykc.IssueQRCodeCommand;
import com.jsowell.netty.command.ykc.ProofreadTimeCommand;
import com.jsowell.netty.command.ykc.PublishPileBillingTemplateCommand;
import com.jsowell.netty.command.ykc.RebootCommand;
import com.jsowell.netty.command.ykc.StartChargingCommand;
import com.jsowell.netty.command.ykc.StopChargingCommand;
import com.jsowell.netty.command.ykc.UpdateFileCommand;
import com.jsowell.netty.service.yunkuaichong.YKCPushCommandService;
@@ -23,6 +24,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@@ -71,21 +73,21 @@ public class PileRemoteService {
*
* @param pileSn 充电桩sn
*/
// public void remoteStartCharging(String orderCode, String pileSn, String connectorCode, BigDecimal accountBalance) {
// // String s = "550314127823050120180619144446808800000000000101000000100000057300000000D14B0A54A0860100";
// if (StringUtils.isEmpty(pileSn) || StringUtils.isEmpty(connectorCode)) {
// log.warn("远程启动充电, 充电桩编号和枪口号不能为空");
// return;
// }
// log.info("=====平台下发指令=====: 远程启动充电, 桩号:{}, 枪口号:{}", pileSn, connectorCode);
// StartChargingCommand startChargingCommand = StartChargingCommand.builder()
// .pileSn(pileSn)
// .connectorCode(connectorCode)
// .orderCode(orderCode)
// .chargeAmount(accountBalance)
// .build();
// ykcPushCommandService.pushStartChargingCommand(startChargingCommand);
// }
public void remoteStartCharging(String pileSn, String connectorCode, String transactionCode, BigDecimal accountBalance) {
// String s = "550314127823050120180619144446808800000000000101000000100000057300000000D14B0A54A0860100";
if (StringUtils.isEmpty(pileSn) || StringUtils.isEmpty(connectorCode)) {
log.warn("远程启动充电, 充电桩编号和枪口号不能为空");
return;
}
log.info("=====平台下发指令=====: 远程启动充电, 桩号:{}, 枪口号:{}", pileSn, connectorCode);
StartChargingCommand startChargingCommand = StartChargingCommand.builder()
.pileSn(pileSn)
.connectorCode(connectorCode)
.transactionCode(transactionCode)
.chargeAmount(accountBalance)
.build();
ykcPushCommandService.pushStartChargingCommand(startChargingCommand);
}
/**
* 远程停止充电