mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-28 15:05:18 +08:00
update 电单车
This commit is contained in:
@@ -21,6 +21,7 @@ import com.jsowell.pile.dto.RemoteAccountBalanceUpdateDTO;
|
||||
import com.jsowell.pile.dto.UpdateFirmwareDTO;
|
||||
import com.jsowell.pile.vo.web.BillingTemplateVO;
|
||||
import com.jsowell.pile.vo.web.PileDetailVO;
|
||||
import com.jsowell.wxpay.service.WxAppletRemoteService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -54,6 +55,9 @@ public class PileRemoteService {
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
@Autowired
|
||||
private WxAppletRemoteService wxAppletRemoteService;
|
||||
|
||||
@Autowired
|
||||
private EBikeSendCommandService eBikeSendCommandService;
|
||||
|
||||
@@ -108,6 +112,12 @@ public class PileRemoteService {
|
||||
log.warn("远程启动充电, 充电桩编号和枪口号不能为空");
|
||||
return;
|
||||
}
|
||||
|
||||
// 发送启动充电指令前,再次下发计费模板
|
||||
BillingTemplateVO billingTemplateVO = pileBillingTemplateService.selectBillingTemplateDetailByPileSn(pileSn);
|
||||
this.publishPileBillingTemplate(pileSn, billingTemplateVO);
|
||||
log.info("发送启动充电指令前,再次下发计费模板, transactionCode:{}, 计费模板:{}", transactionCode, JSON.toJSONString(billingTemplateVO));
|
||||
|
||||
log.info("【=====平台下发指令=====】: 远程启动充电, 桩号:{}, 枪口号:{}", pileSn, connectorCode);
|
||||
StartChargingCommand startChargingCommand = StartChargingCommand.builder()
|
||||
.pileSn(pileSn)
|
||||
@@ -131,7 +141,12 @@ public class PileRemoteService {
|
||||
startChargingCommand.setPileSn(pileSn);
|
||||
startChargingCommand.setConnectorCode(connectorCode);
|
||||
startChargingCommand.setTransactionCode(transactionCode);
|
||||
startChargingCommand.setChargeAmount(chargeAmount);
|
||||
startChargingCommand.setChargeAmount(chargeAmount); // 电单车这个字段表示具体度数
|
||||
startChargingCommand.setRateMode(2);
|
||||
|
||||
// 根据启动金额计算电量
|
||||
BigDecimal electricity = BigDecimal.ZERO;
|
||||
startChargingCommand.setElectricity(electricity);
|
||||
|
||||
try {
|
||||
ChargingOperationResponse startChargingResponse = eBikeSendCommandService.sendStartChargingCommand(startChargingCommand);
|
||||
|
||||
Reference in New Issue
Block a user