update 电单车查询收费标准

This commit is contained in:
Lemon
2025-12-15 10:06:15 +08:00
parent 5b959eca97
commit 819785667e
3 changed files with 68 additions and 26 deletions

View File

@@ -13,6 +13,7 @@ import com.jsowell.common.enums.ykc.ReturnCodeEnum;
import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.util.DateUtils;
import com.jsowell.common.util.StringUtils;
import com.jsowell.common.util.YKCUtils;
import com.jsowell.common.util.http.HttpUtils;
import com.jsowell.pile.domain.MemberBasicInfo;
import com.jsowell.pile.domain.OrderBasicInfo;
@@ -21,6 +22,7 @@ import com.jsowell.pile.service.OrderBasicInfoService;
import com.jsowell.pile.service.PileBillingTemplateService;
import com.jsowell.pile.vo.uniapp.customer.CurrentTimePriceDetails;
import com.jsowell.pile.vo.uniapp.customer.SendMessageVO;
import com.jsowell.pile.vo.web.BillingTemplateVO;
import com.jsowell.wxpay.config.WeixinLoginProperties;
import com.jsowell.wxpay.dto.AppletTemplateMessageSendDTO;
import com.jsowell.wxpay.dto.WechatSendMsgDTO;
@@ -239,9 +241,28 @@ public class WxAppletRemoteService {
startChargingMessage.setStationName(sendMessageVO.getStationName()); // 站点名称
// 订单编号
startChargingMessage.setOrderCode(sendMessageVO.getOrderCode());
String orderCode = sendMessageVO.getOrderCode();
startChargingMessage.setOrderCode(orderCode);
// 查询订单信息
OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
if (orderBasicInfo == null) {
return null;
}
String pileSn = orderBasicInfo.getPileSn();
Boolean result = YKCUtils.checkEVPileSn(pileSn);
// 收费标准
CurrentTimePriceDetails currentTimePriceDetails = pileBillingTemplateService.getCurrentTimePriceDetailsByPileType(sendMessageVO.getStationId(),sendMessageVO.getPileSn());
CurrentTimePriceDetails currentTimePriceDetails = new CurrentTimePriceDetails();
if (result) {
// 查询电动汽车收费标准
currentTimePriceDetails = pileBillingTemplateService.getCurrentTimePriceDetails(sendMessageVO.getStationId());
}else {
// 查询电单车收费标准
currentTimePriceDetails = pileBillingTemplateService.getCurrentTimePriceDetailsForEBike(sendMessageVO.getStationId());
}
// 收费标准
// CurrentTimePriceDetails currentTimePriceDetails = pileBillingTemplateService.getCurrentTimePriceDetailsByPileType(sendMessageVO.getStationId(),sendMessageVO.getPileSn());
startChargingMessage.setTotalPrice(currentTimePriceDetails.getTotalPrice() + " 元/度");
// 枪口编号