mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update 预约充电
This commit is contained in:
@@ -151,14 +151,19 @@ public class OrderBasicInfo {
|
||||
private Date chargeEndTime;
|
||||
|
||||
/**
|
||||
* 启动类型(now-立即启动;appointment-预约启动)
|
||||
* 启动类型(now-立即启动;reserved-预约启动)
|
||||
*/
|
||||
private String startType;
|
||||
|
||||
/**
|
||||
* 预约时间
|
||||
* 预约开始时间
|
||||
*/
|
||||
private Date appointmentTime;
|
||||
private Date reservedStartTime;
|
||||
|
||||
/**
|
||||
* 预约结束时间
|
||||
*/
|
||||
private Date reservedEndTime;
|
||||
|
||||
/**
|
||||
* 开始SOC
|
||||
|
||||
@@ -39,12 +39,12 @@ public class ReservedChargingCommand {
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date appointmentStartTime;
|
||||
private Date reservedStartTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date appointmentEndTime;
|
||||
private Date reservedEndTime;
|
||||
|
||||
/**
|
||||
* 启动金额
|
||||
|
||||
@@ -60,9 +60,14 @@ public class GenerateOrderDTO extends BasicPileDTO{
|
||||
private String startType;
|
||||
|
||||
/**
|
||||
* 预约时间
|
||||
* 预约开始时间
|
||||
*/
|
||||
private String appointmentTime;
|
||||
private String reservedStartTime;
|
||||
|
||||
/**
|
||||
* 预约结束时间
|
||||
*/
|
||||
private String reservedEndTime;
|
||||
|
||||
/**
|
||||
* 使用刷卡创建订单时有值
|
||||
|
||||
@@ -258,7 +258,7 @@ public interface OrderBasicInfoMapper {
|
||||
*/
|
||||
List<PersonPileConnectorSumInfoVO> getAccumulativeInfo(QueryPersonPileDTO dto);
|
||||
|
||||
List<OrderBasicInfo> getAppointmentOrder(LocalDateTime dateTime);
|
||||
List<OrderBasicInfo> getReservedOrder(LocalDateTime dateTime);
|
||||
|
||||
List<OrderVO> getListByOrderCodes(@Param("orderCodes") List<String> orderCodes);
|
||||
|
||||
|
||||
@@ -298,7 +298,7 @@ public interface OrderBasicInfoService{
|
||||
*/
|
||||
void updateOrderStatusAsAbnormal(String pileSn);
|
||||
|
||||
List<OrderBasicInfo> getAppointmentOrder(LocalDateTime dateTime);
|
||||
List<OrderBasicInfo> getReservedOrder(LocalDateTime dateTime);
|
||||
|
||||
Map<String, Object> generateOrderByCard(GenerateOrderDTO dto) throws Exception;
|
||||
|
||||
|
||||
@@ -544,8 +544,8 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
Date payTime = orderBasicInfo.getPayTime();
|
||||
time = payTime == null ? 0L : payTime.getTime();
|
||||
} else {
|
||||
Date appointmentTime = orderBasicInfo.getAppointmentTime();
|
||||
time = appointmentTime == null ? 0L : appointmentTime.getTime();
|
||||
Date reservedStartTime = orderBasicInfo.getReservedStartTime();
|
||||
time = reservedStartTime == null ? 0L : reservedStartTime.getTime();
|
||||
}
|
||||
|
||||
if (currentTimeMillis - time < 1000 * 60 * 15) {
|
||||
@@ -2380,8 +2380,8 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrderBasicInfo> getAppointmentOrder(LocalDateTime dateTime) {
|
||||
return orderBasicInfoMapper.getAppointmentOrder(dateTime);
|
||||
public List<OrderBasicInfo> getReservedOrder(LocalDateTime dateTime) {
|
||||
return orderBasicInfoMapper.getReservedOrder(dateTime);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3549,7 +3549,8 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
}
|
||||
|
||||
if (StringUtils.equals(dto.getStartType(), StartTypeEnum.RESERVED.getValue())) {
|
||||
orderBasicInfo.setAppointmentTime(DateUtils.parseDate(dto.getAppointmentTime(), DateUtils.YYYY_MM_DD_HH_MM_SS));
|
||||
orderBasicInfo.setReservedStartTime(DateUtils.parseDate(dto.getReservedStartTime(), DateUtils.YYYY_MM_DD_HH_MM_SS));
|
||||
orderBasicInfo.setReservedEndTime(DateUtils.parseDate(dto.getReservedEndTime(), DateUtils.YYYY_MM_DD_HH_MM_SS));
|
||||
}
|
||||
|
||||
// 订单详情
|
||||
|
||||
@@ -493,12 +493,12 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService {
|
||||
byte[] operateByteArr = BytesUtil.str2Bcd(operation);
|
||||
|
||||
// 开始时间
|
||||
Date appointmentStartTime = command.getAppointmentStartTime();
|
||||
byte[] appointmentStartTimeByteArr = Cp56Time2aUtil.date2Hbyte(DateUtils.parseDate(appointmentStartTime));
|
||||
Date reservedStartTime = command.getReservedStartTime();
|
||||
byte[] reservedStartTimeByteArr = Cp56Time2aUtil.date2Hbyte(DateUtils.parseDate(reservedStartTime));
|
||||
|
||||
// 结束时间
|
||||
Date appointmentEndTime = command.getAppointmentEndTime();
|
||||
byte[] appointmentEndTimeByteArr = Cp56Time2aUtil.date2Hbyte(DateUtils.parseDate(appointmentEndTime));
|
||||
Date reservedEndTime = command.getReservedEndTime();
|
||||
byte[] reservedEndTimeByteArr = Cp56Time2aUtil.date2Hbyte(DateUtils.parseDate(reservedEndTime));
|
||||
|
||||
// 启动金额
|
||||
BigDecimal amount = command.getAmount();
|
||||
@@ -506,7 +506,7 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService {
|
||||
|
||||
// 拼装msg信息
|
||||
byte[] msg = Bytes.concat(transactionCodeArr, pileSnByteArr, connectorCodeByteArr, operateByteArr,
|
||||
appointmentStartTimeByteArr, appointmentEndTimeByteArr, amountByteArr);
|
||||
reservedStartTimeByteArr, reservedEndTimeByteArr, amountByteArr);
|
||||
this.push(msg, pileSn, YKCFrameTypeCode.RESERVE_CHARGING_CODE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -772,177 +772,6 @@ public abstract class AbstractProgramLogic implements InitializingBean {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存订单信息到数据库
|
||||
* 2024年3月11日14点04分修改,使用OrderBasicInfoService中的公共方法
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
// protected OrderBasicInfo saveOrder2Database(GenerateOrderDTO dto) throws ParseException {
|
||||
// String orderCode = generateNewOrderCode();
|
||||
// String transactionCode = IdUtils.generateTransactionCode(dto.getPileSn(), dto.getConnectorCode());
|
||||
//
|
||||
// if (StringUtils.isBlank(dto.getStartType())) {
|
||||
// dto.setStartType(StartTypeEnum.NOW.getValue());
|
||||
// }
|
||||
//
|
||||
// String stationId = dto.getPileConnector().getStationId();
|
||||
// // 查询站点信息
|
||||
// PileStationInfo pileStationInfo = pileStationInfoService.selectPileStationInfoById(Long.valueOf(stationId));
|
||||
// String merchantId = pileStationInfo != null ? String.valueOf(pileStationInfo.getMerchantId()) : "";
|
||||
// String plateNumber = dto.getPlateNumber() != null ? dto.getPlateNumber() : "";
|
||||
// // 订单基本信息
|
||||
// OrderBasicInfo orderBasicInfo = OrderBasicInfo.builder()
|
||||
// .orderCode(orderCode)
|
||||
// .transactionCode(transactionCode)
|
||||
// .orderStatus(OrderStatusEnum.NOT_START.getValue())
|
||||
// .memberId(dto.getMemberId())
|
||||
// .stationId(stationId)
|
||||
// .merchantId(merchantId)
|
||||
// .pileSn(dto.getPileSn())
|
||||
// .connectorCode(dto.getConnectorCode())
|
||||
// .pileConnectorCode(dto.getPileSn() + dto.getConnectorCode())
|
||||
// .startMode(dto.getStartMode())
|
||||
// .payStatus(Constants.ZERO)
|
||||
// .payAmount(dto.getChargeAmount())
|
||||
// .payMode(dto.getPayMode())
|
||||
// .plateNumber(plateNumber)
|
||||
// .orderAmount(BigDecimal.ZERO)
|
||||
// .virtualAmount(BigDecimal.ZERO)
|
||||
// .settleAmount(BigDecimal.ZERO)
|
||||
// .startType(dto.getStartType())
|
||||
// .build();
|
||||
// if (StringUtils.equals(dto.getStartMode(), StartModeEnum.AUTH_CARD.getValue())) {
|
||||
// // 鉴权卡启动
|
||||
// orderBasicInfo.setLogicCard(dto.getPileAuthCardInfo().getLogicCard());
|
||||
// }
|
||||
// if (StringUtils.equals(dto.getStartMode(), StartModeEnum.VIN_CODE.getValue())) {
|
||||
// // vin启动
|
||||
// MemberPlateNumberRelation memberPlateNumberRelation = dto.getMemberPlateNumberRelation();
|
||||
// if (memberPlateNumberRelation != null) {
|
||||
// if (StringUtils.isNotBlank(memberPlateNumberRelation.getVinCode())) {
|
||||
// orderBasicInfo.setVinCode(memberPlateNumberRelation.getVinCode());
|
||||
// }
|
||||
// if (StringUtils.isNotBlank(memberPlateNumberRelation.getLicensePlateNumber())) {
|
||||
// orderBasicInfo.setPlateNumber(memberPlateNumberRelation.getLicensePlateNumber());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (StringUtils.equals(dto.getStartType(), StartTypeEnum.APPOINTMENT.getValue())) {
|
||||
// orderBasicInfo.setAppointmentTime(DateUtils.parseDate(dto.getAppointmentTime(), DateUtils.YYYY_MM_DD_HH_MM_SS));
|
||||
// }
|
||||
//
|
||||
// // 订单详情
|
||||
// BillingTemplateVO billingTemplate = dto.getBillingTemplate();
|
||||
// logger.info("订单使用的计费模板-orderCode:{}, billingTemplate:{}", orderCode, JSON.toJSONString(billingTemplate));
|
||||
// BigDecimal sharpElectricityPrice = billingTemplate.getSharpElectricityPrice() != null ? billingTemplate.getSharpElectricityPrice() : BigDecimal.ZERO;
|
||||
// BigDecimal sharpServicePrice = billingTemplate.getSharpServicePrice() != null ? billingTemplate.getSharpServicePrice() : BigDecimal.ZERO;
|
||||
// BigDecimal peakElectricityPrice = billingTemplate.getPeakElectricityPrice() != null ? billingTemplate.getPeakElectricityPrice() : BigDecimal.ZERO;
|
||||
// BigDecimal peakServicePrice = billingTemplate.getPeakServicePrice() != null ? billingTemplate.getPeakServicePrice() : BigDecimal.ZERO;
|
||||
// BigDecimal flatElectricityPrice = billingTemplate.getFlatElectricityPrice() != null ? billingTemplate.getFlatElectricityPrice() : BigDecimal.ZERO;
|
||||
// BigDecimal flatServicePrice = billingTemplate.getFlatServicePrice() != null ? billingTemplate.getFlatServicePrice() : BigDecimal.ZERO;
|
||||
// BigDecimal valleyElectricityPrice = billingTemplate.getValleyElectricityPrice() != null ? billingTemplate.getValleyElectricityPrice() : BigDecimal.ZERO;
|
||||
// BigDecimal valleyServicePrice = billingTemplate.getValleyServicePrice() != null ? billingTemplate.getValleyServicePrice() : BigDecimal.ZERO;
|
||||
//
|
||||
// OrderDetail orderDetail = OrderDetail.builder()
|
||||
// .orderCode(orderCode)
|
||||
// .sharpPrice(sharpElectricityPrice.add(sharpServicePrice))
|
||||
// .sharpElectricityPrice(sharpElectricityPrice)
|
||||
// .sharpServicePrice(sharpServicePrice)
|
||||
// .peakPrice(peakElectricityPrice.add(peakServicePrice))
|
||||
// .peakElectricityPrice(peakElectricityPrice)
|
||||
// .peakServicePrice(peakServicePrice)
|
||||
// .flatPrice(flatElectricityPrice.add(flatServicePrice))
|
||||
// .flatElectricityPrice(flatElectricityPrice)
|
||||
// .flatServicePrice(flatServicePrice)
|
||||
// .valleyPrice(valleyElectricityPrice.add(valleyServicePrice))
|
||||
// .valleyElectricityPrice(valleyElectricityPrice)
|
||||
// .valleyServicePrice(valleyServicePrice)
|
||||
// .build();
|
||||
//
|
||||
// OrderTransactionDTO createOrderTransactionDTO = OrderTransactionDTO.builder()
|
||||
// .orderBasicInfo(orderBasicInfo)
|
||||
// .orderDetail(orderDetail)
|
||||
// .build();
|
||||
// transactionService.doCreateOrder(createOrderTransactionDTO);
|
||||
// return orderBasicInfo;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 计算订单折扣
|
||||
* @param orderBasicInfo 订单主表
|
||||
* @param orderDetail 订单详情
|
||||
*/
|
||||
// protected void calculateOrderDiscounts(OrderBasicInfo orderBasicInfo, OrderDetail orderDetail) {
|
||||
// String memberId = orderBasicInfo.getMemberId(); // 会员id
|
||||
// String merchantId = orderBasicInfo.getMerchantId(); // 运营商id
|
||||
// String stationId = orderBasicInfo.getStationId(); // 站点id
|
||||
//
|
||||
// // 电费折扣金额
|
||||
// BigDecimal discountElectricityAmount = BigDecimal.ZERO;
|
||||
// // 服务费折扣金额
|
||||
// BigDecimal discountServiceAmount = BigDecimal.ZERO;
|
||||
// // 优惠后服务费金额 初始值为优惠前金额
|
||||
// BigDecimal afterServiceAmountDiscount = orderDetail.getTotalServiceAmount();
|
||||
// // 优惠后电费金额 初始值为优惠前金额
|
||||
// BigDecimal afterElectricityAmountDiscount = orderDetail.getTotalElectricityAmount();
|
||||
//
|
||||
// // 查询会员在此站点会员折扣
|
||||
// MemberDiscountVO memberDiscountVO = memberGroupService.queryMemberDiscount(merchantId, stationId, memberId);
|
||||
// if (memberDiscountVO != null) {
|
||||
// BigDecimal discount = memberDiscountVO.getDiscount(); // 折扣率
|
||||
// String groupType = memberDiscountVO.getGroupType(); // 类型(1-服务费折扣,2-电费折扣 ,3-电费和服务费一起折扣)
|
||||
// BigDecimal totalElectricityAmount = orderDetail.getTotalElectricityAmount(); // 电费
|
||||
// BigDecimal totalServiceAmount = orderDetail.getTotalServiceAmount(); // 服务费
|
||||
//
|
||||
// // 未进行打折前
|
||||
// afterServiceAmountDiscount = totalServiceAmount;
|
||||
// afterElectricityAmountDiscount = totalElectricityAmount;
|
||||
// if (Constants.ONE.equals(groupType)) {
|
||||
// // 服务费折扣
|
||||
// afterServiceAmountDiscount = totalServiceAmount.multiply(discount).setScale(4, RoundingMode.DOWN);
|
||||
// discountServiceAmount = totalServiceAmount.subtract(afterServiceAmountDiscount);
|
||||
// } else if (Constants.TWO.equals(groupType)) {
|
||||
// // 电费折扣
|
||||
// afterElectricityAmountDiscount = totalElectricityAmount.multiply(discount).setScale(4, RoundingMode.DOWN);
|
||||
// discountElectricityAmount = totalElectricityAmount.subtract(afterElectricityAmountDiscount);
|
||||
// } else {
|
||||
// // BigDecimal afterServiceAmountDiscount = totalServiceAmount.multiply(discount).setScale(2, RoundingMode.DOWN);
|
||||
// // discountServiceAmount = totalServiceAmount.subtract(afterServiceAmountDiscount);
|
||||
// // BigDecimal afterElectricityAmountDiscount = totalElectricityAmount.multiply(discount).setScale(2, RoundingMode.DOWN);
|
||||
// // discountElectricityAmount = totalElectricityAmount.subtract(afterElectricityAmountDiscount);
|
||||
//
|
||||
// // 电费和服务费一起折扣
|
||||
// afterServiceAmountDiscount = totalServiceAmount.multiply(discount).setScale(4, RoundingMode.DOWN);
|
||||
// afterElectricityAmountDiscount = totalElectricityAmount.multiply(discount).setScale(4, RoundingMode.DOWN);
|
||||
//
|
||||
// discountServiceAmount = totalServiceAmount.subtract(afterServiceAmountDiscount);
|
||||
// discountElectricityAmount = totalElectricityAmount.subtract(afterElectricityAmountDiscount);
|
||||
// }
|
||||
// orderBasicInfo.setGroupCode(memberDiscountVO.getGroupCode());
|
||||
// }
|
||||
// // 订单折扣金额
|
||||
// BigDecimal discountAmount = discountServiceAmount.add(discountElectricityAmount);
|
||||
// orderBasicInfo.setDiscountAmount(discountAmount);
|
||||
//
|
||||
// // 更新结算金额 结算金额 = 消费金额 - 虚拟金额 - 优惠金额
|
||||
// BigDecimal newSettleAmount = orderBasicInfo.getSettleAmount().subtract(discountAmount);
|
||||
// orderBasicInfo.setSettleAmount(newSettleAmount);
|
||||
//
|
||||
// // 总消费金额 = 折扣后电费 + 折扣后服务费
|
||||
// BigDecimal totalConsumeAmount = afterServiceAmountDiscount.add(afterElectricityAmountDiscount);
|
||||
//
|
||||
// // 更新退款金额
|
||||
// BigDecimal refundAmount = orderBasicInfo.getPayAmount().subtract(totalConsumeAmount).setScale(2, RoundingMode.DOWN);
|
||||
// orderBasicInfo.setRefundAmount(refundAmount);
|
||||
//
|
||||
// orderDetail.setDiscountElectricityAmount(discountElectricityAmount);
|
||||
// orderDetail.setDiscountServiceAmount(discountServiceAmount);
|
||||
// logger.info("计算订单折扣, orderCode:{}, memberId:{}, discountAmount:{}, discountElectricityAmount:{}, discountServiceAmount:{}, totalConsumeAmount:{}",
|
||||
// orderBasicInfo.getOrderCode(), memberId, discountAmount, discountElectricityAmount, discountServiceAmount, totalConsumeAmount);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 计算订单折扣V2
|
||||
* 使用优惠计费模板计算优惠金额
|
||||
|
||||
@@ -78,119 +78,6 @@ public class NotDelayMerchantProgramLogic extends AbstractProgramLogic {
|
||||
return orderBasicInfoService.saveOrder2Database(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成订单编号
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
// private String generateNewOrderCode() {
|
||||
// while (true) {
|
||||
// String orderCode = "C" + IdUtils.getOrderCode();
|
||||
// // 通过orderCode查询是否已经存在
|
||||
// OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
||||
// if (orderBasicInfo == null) {
|
||||
// return orderCode;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* 保存订单信息到数据库
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
// protected OrderBasicInfo saveOrder2Database(GenerateOrderDTO dto) throws ParseException {
|
||||
// String orderCode = generateNewOrderCode();
|
||||
// String transactionCode = IdUtils.generateTransactionCode(dto.getPileSn(), dto.getConnectorCode());
|
||||
//
|
||||
// if (StringUtils.isBlank(dto.getStartType())) {
|
||||
// dto.setStartType(StartTypeEnum.NOW.getValue());
|
||||
// }
|
||||
//
|
||||
// String stationId = dto.getPileConnector().getStationId();
|
||||
// // 查询站点信息
|
||||
// PileStationInfo pileStationInfo = pileStationInfoService.selectPileStationInfoById(Long.valueOf(stationId));
|
||||
// String merchantId = pileStationInfo != null ? String.valueOf(pileStationInfo.getMerchantId()) : "";
|
||||
// String plateNumber = dto.getPlateNumber() != null ? dto.getPlateNumber() : "";
|
||||
// // 订单基本信息
|
||||
// OrderBasicInfo orderBasicInfo = OrderBasicInfo.builder()
|
||||
// .orderCode(orderCode)
|
||||
// .transactionCode(transactionCode)
|
||||
// .orderStatus(OrderStatusEnum.NOT_START.getValue())
|
||||
// .memberId(dto.getMemberId())
|
||||
// .stationId(stationId)
|
||||
// .merchantId(merchantId)
|
||||
// .pileSn(dto.getPileSn())
|
||||
// .connectorCode(dto.getConnectorCode())
|
||||
// .pileConnectorCode(dto.getPileSn() + dto.getConnectorCode())
|
||||
// .startMode(dto.getStartMode())
|
||||
// .payStatus(Constants.ZERO)
|
||||
// .payAmount(dto.getChargeAmount())
|
||||
// .payMode(dto.getPayMode())
|
||||
// .plateNumber(plateNumber)
|
||||
// .orderAmount(BigDecimal.ZERO)
|
||||
// .virtualAmount(BigDecimal.ZERO)
|
||||
// .settleAmount(BigDecimal.ZERO)
|
||||
// .startType(dto.getStartType())
|
||||
// .build();
|
||||
// if (StringUtils.equals(dto.getStartMode(), StartModeEnum.AUTH_CARD.getValue())) {
|
||||
// // 鉴权卡启动
|
||||
// orderBasicInfo.setLogicCard(dto.getPileAuthCardInfo().getLogicCard());
|
||||
// }
|
||||
// if (StringUtils.equals(dto.getStartMode(), StartModeEnum.VIN_CODE.getValue())) {
|
||||
// // vin启动
|
||||
// MemberPlateNumberRelation memberPlateNumberRelation = dto.getMemberPlateNumberRelation();
|
||||
// if (memberPlateNumberRelation != null) {
|
||||
// if (StringUtils.isNotBlank(memberPlateNumberRelation.getVinCode())) {
|
||||
// orderBasicInfo.setVinCode(memberPlateNumberRelation.getVinCode());
|
||||
// }
|
||||
// if (StringUtils.isNotBlank(memberPlateNumberRelation.getLicensePlateNumber())) {
|
||||
// orderBasicInfo.setPlateNumber(memberPlateNumberRelation.getLicensePlateNumber());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (StringUtils.equals(dto.getStartType(), StartTypeEnum.APPOINTMENT.getValue())) {
|
||||
// orderBasicInfo.setAppointmentTime(DateUtils.parseDate(dto.getAppointmentTime(), DateUtils.YYYY_MM_DD_HH_MM_SS));
|
||||
// }
|
||||
//
|
||||
// // 订单详情
|
||||
// BillingTemplateVO billingTemplate = dto.getBillingTemplate();
|
||||
// logger.info("订单使用的计费模板-orderCode:{}, billingTemplate:{}", orderCode, JSON.toJSONString(billingTemplate));
|
||||
// BigDecimal sharpElectricityPrice = billingTemplate.getSharpElectricityPrice() != null ? billingTemplate.getSharpElectricityPrice() : BigDecimal.ZERO;
|
||||
// BigDecimal sharpServicePrice = billingTemplate.getSharpServicePrice() != null ? billingTemplate.getSharpServicePrice() : BigDecimal.ZERO;
|
||||
// BigDecimal peakElectricityPrice = billingTemplate.getPeakElectricityPrice() != null ? billingTemplate.getPeakElectricityPrice() : BigDecimal.ZERO;
|
||||
// BigDecimal peakServicePrice = billingTemplate.getPeakServicePrice() != null ? billingTemplate.getPeakServicePrice() : BigDecimal.ZERO;
|
||||
// BigDecimal flatElectricityPrice = billingTemplate.getFlatElectricityPrice() != null ? billingTemplate.getFlatElectricityPrice() : BigDecimal.ZERO;
|
||||
// BigDecimal flatServicePrice = billingTemplate.getFlatServicePrice() != null ? billingTemplate.getFlatServicePrice() : BigDecimal.ZERO;
|
||||
// BigDecimal valleyElectricityPrice = billingTemplate.getValleyElectricityPrice() != null ? billingTemplate.getValleyElectricityPrice() : BigDecimal.ZERO;
|
||||
// BigDecimal valleyServicePrice = billingTemplate.getValleyServicePrice() != null ? billingTemplate.getValleyServicePrice() : BigDecimal.ZERO;
|
||||
//
|
||||
// OrderDetail orderDetail = OrderDetail.builder()
|
||||
// .orderCode(orderCode)
|
||||
// .sharpPrice(sharpElectricityPrice.add(sharpServicePrice))
|
||||
// .sharpElectricityPrice(sharpElectricityPrice)
|
||||
// .sharpServicePrice(sharpServicePrice)
|
||||
// .peakPrice(peakElectricityPrice.add(peakServicePrice))
|
||||
// .peakElectricityPrice(peakElectricityPrice)
|
||||
// .peakServicePrice(peakServicePrice)
|
||||
// .flatPrice(flatElectricityPrice.add(flatServicePrice))
|
||||
// .flatElectricityPrice(flatElectricityPrice)
|
||||
// .flatServicePrice(flatServicePrice)
|
||||
// .valleyPrice(valleyElectricityPrice.add(valleyServicePrice))
|
||||
// .valleyElectricityPrice(valleyElectricityPrice)
|
||||
// .valleyServicePrice(valleyServicePrice)
|
||||
// .build();
|
||||
//
|
||||
// OrderTransactionDTO createOrderTransactionDTO = OrderTransactionDTO.builder()
|
||||
// .orderBasicInfo(orderBasicInfo)
|
||||
// .orderDetail(orderDetail)
|
||||
// .build();
|
||||
// transactionService.doCreateOrder(createOrderTransactionDTO);
|
||||
// return orderBasicInfo;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public Map<String, Object> payOrder(PayOrderDTO dto) {
|
||||
logger.info("【{}】-支付订单start, param:{}", this.getClass().getSimpleName(), JSON.toJSONString(dto));
|
||||
|
||||
Reference in New Issue
Block a user