mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-03 09:29:59 +08:00
update
This commit is contained in:
@@ -149,6 +149,12 @@ public class OrderBasicInfo extends BaseEntity {
|
||||
@Excel(name = "虚拟金额")
|
||||
private BigDecimal virtualAmount;
|
||||
|
||||
/**
|
||||
* 折扣金额
|
||||
*/
|
||||
@Excel(name = "折扣金额")
|
||||
private BigDecimal discountAmount;
|
||||
|
||||
/**
|
||||
* 结算金额
|
||||
*/
|
||||
@@ -178,12 +184,12 @@ public class OrderBasicInfo extends BaseEntity {
|
||||
/**
|
||||
* 开始SOC
|
||||
*/
|
||||
private String startSOC;
|
||||
private String startSoc;
|
||||
|
||||
/**
|
||||
* 结束SOC
|
||||
*/
|
||||
private String endSOC;
|
||||
private String endSoc;
|
||||
|
||||
/**
|
||||
* 异常原因
|
||||
@@ -200,6 +206,11 @@ public class OrderBasicInfo extends BaseEntity {
|
||||
*/
|
||||
private BigDecimal refundAmount;
|
||||
|
||||
/**
|
||||
* 退款状态(0-不需要退款;1-退款中;2-退款完成)
|
||||
*/
|
||||
private String refundStatus;
|
||||
|
||||
/**
|
||||
* 删除标识(0-正常;1-删除)
|
||||
*/
|
||||
@@ -225,8 +236,8 @@ public class OrderBasicInfo extends BaseEntity {
|
||||
.append("orderAmount", orderAmount)
|
||||
.append("chargeStartTime", chargeStartTime)
|
||||
.append("chargeEndTime", chargeEndTime)
|
||||
.append("startSOC", startSOC)
|
||||
.append("endSOC", endSOC)
|
||||
.append("startSOC", startSoc)
|
||||
.append("endSOC", endSoc)
|
||||
.append("reason", reason)
|
||||
.append("delFlag", delFlag)
|
||||
.append("orderDetailList", orderDetailList)
|
||||
|
||||
@@ -13,256 +13,320 @@ import com.jsowell.pile.vo.uniapp.PersonPileConnectorSumInfoVO;
|
||||
import com.jsowell.pile.vo.uniapp.SendMessageVO;
|
||||
import com.jsowell.pile.vo.web.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单Mapper接口
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2022-09-30
|
||||
*/
|
||||
@Repository
|
||||
public interface OrderBasicInfoMapper {
|
||||
/**
|
||||
* 查询订单
|
||||
*
|
||||
* @param id 订单主键
|
||||
* @return 订单
|
||||
*/
|
||||
OrderBasicInfo selectOrderBasicInfoById(Long id);
|
||||
/**
|
||||
* delete by primary key
|
||||
*
|
||||
* @param id primaryKey
|
||||
* @return deleteCount
|
||||
*/
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
/**
|
||||
* 条件查询订单基础信息
|
||||
* @param info
|
||||
* @return
|
||||
*/
|
||||
OrderBasicInfo getOrderBasicInfo(OrderBasicInfo info);
|
||||
/**
|
||||
* insert record to table
|
||||
*
|
||||
* @param record the record
|
||||
* @return insert count
|
||||
*/
|
||||
int insert(OrderBasicInfo record);
|
||||
|
||||
/**
|
||||
* 查询订单列表
|
||||
*
|
||||
* @param orderBasicInfo 订单
|
||||
* @return 订单集合
|
||||
*/
|
||||
List<OrderListVO> selectOrderBasicInfoList(QueryOrderDTO orderBasicInfo);
|
||||
int insertOrUpdate(OrderBasicInfo record);
|
||||
|
||||
/**
|
||||
* 新增订单
|
||||
*
|
||||
* @param orderBasicInfo 订单
|
||||
* @return 结果
|
||||
*/
|
||||
int insertOrderBasicInfo(OrderBasicInfo orderBasicInfo);
|
||||
int insertOrUpdateSelective(OrderBasicInfo record);
|
||||
|
||||
/**
|
||||
* 修改订单
|
||||
*
|
||||
* @param orderBasicInfo 订单
|
||||
* @return 结果
|
||||
*/
|
||||
int updateOrderBasicInfo(OrderBasicInfo orderBasicInfo);
|
||||
/**
|
||||
* insert record to table selective
|
||||
*
|
||||
* @param record the record
|
||||
* @return insert count
|
||||
*/
|
||||
int insertSelective(OrderBasicInfo record);
|
||||
|
||||
/**
|
||||
* 批量删除订单
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteOrderBasicInfoByIds(Long[] ids);
|
||||
/**
|
||||
* select by primary key
|
||||
*
|
||||
* @param id primary key
|
||||
* @return object by primary key
|
||||
*/
|
||||
OrderBasicInfo selectByPrimaryKey(Integer id);
|
||||
|
||||
/**
|
||||
* 批量删除订单详情
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteOrderDetailByOrderCodes(Long[] ids);
|
||||
/**
|
||||
* update record selective
|
||||
*
|
||||
* @param record the updated record
|
||||
* @return update count
|
||||
*/
|
||||
int updateByPrimaryKeySelective(OrderBasicInfo record);
|
||||
|
||||
/**
|
||||
* 批量新增订单详情
|
||||
*
|
||||
* @param orderDetailList 订单详情列表
|
||||
* @return 结果
|
||||
*/
|
||||
int batchOrderDetail(List<OrderDetail> orderDetailList);
|
||||
/**
|
||||
* update record
|
||||
*
|
||||
* @param record the updated record
|
||||
* @return update count
|
||||
*/
|
||||
int updateByPrimaryKey(OrderBasicInfo record);
|
||||
|
||||
int updateBatch(List<OrderBasicInfo> list);
|
||||
|
||||
/**
|
||||
* 通过订单主键删除订单详情信息
|
||||
*
|
||||
* @param id 订单ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteOrderDetailByOrderCode(Long id);
|
||||
int updateBatchSelective(List<OrderBasicInfo> list);
|
||||
|
||||
/**
|
||||
* 修改订单详情
|
||||
* @param orderDetail 订单详情
|
||||
*/
|
||||
int updateOrderDetail(OrderDetail orderDetail);
|
||||
int batchInsert(@Param("list") List<OrderBasicInfo> list);
|
||||
|
||||
/**
|
||||
* 通过订单号查询订单基本信息
|
||||
*
|
||||
* @param orderCode 订单号
|
||||
* @return
|
||||
*/
|
||||
OrderBasicInfo getOrderInfoByOrderCode(String orderCode);
|
||||
/**
|
||||
* 查询订单
|
||||
*
|
||||
* @param id 订单主键
|
||||
* @return 订单
|
||||
*/
|
||||
OrderBasicInfo selectOrderBasicInfoById(Long id);
|
||||
|
||||
OrderBasicInfo getOrderInfoByTransactionCode(String transactionCode);
|
||||
/**
|
||||
* 条件查询订单基础信息
|
||||
*
|
||||
* @param info
|
||||
* @return
|
||||
*/
|
||||
OrderBasicInfo getOrderBasicInfo(OrderBasicInfo info);
|
||||
|
||||
/**
|
||||
* 根据桩编号和枪口号查询某状态订单
|
||||
*
|
||||
* @param pileSn 桩编号
|
||||
* @param connectorCode 枪口号
|
||||
* @param orderStatus 订单状态
|
||||
* @return 订单
|
||||
*/
|
||||
OrderBasicInfo queryOrderBasicInfo(@Param("pileSn") String pileSn, @Param("connectorCode") String connectorCode, @Param("orderStatus") String orderStatus);
|
||||
/**
|
||||
* 查询订单列表
|
||||
*
|
||||
* @param orderBasicInfo 订单
|
||||
* @return 订单集合
|
||||
*/
|
||||
List<OrderListVO> selectOrderBasicInfoList(QueryOrderDTO orderBasicInfo);
|
||||
|
||||
/**
|
||||
* 通过订单号查询订单详情
|
||||
*
|
||||
* @param orderCode 订单号
|
||||
* @return 订单详情
|
||||
*/
|
||||
OrderDetail getOrderDetailByOrderCode(@Param("orderCode") String orderCode);
|
||||
/**
|
||||
* 新增订单
|
||||
*
|
||||
* @param orderBasicInfo 订单
|
||||
* @return 结果
|
||||
*/
|
||||
int insertOrderBasicInfo(OrderBasicInfo orderBasicInfo);
|
||||
|
||||
/**
|
||||
* 通过会员Id和订单状态查询订单信息
|
||||
*
|
||||
* @param memberId 会员id
|
||||
* @param orderStatusList 订单状态集合
|
||||
* @param dateTime
|
||||
* @return
|
||||
*/
|
||||
List<OrderVO> getListByMemberIdAndOrderStatus(@Param("memberId") String memberId,
|
||||
@Param("orderStatusList") List<String> orderStatusList,
|
||||
@Param("dateTime") LocalDateTime dateTime,
|
||||
@Param("stationId") String stationId);
|
||||
/**
|
||||
* 修改订单
|
||||
*
|
||||
* @param orderBasicInfo 订单
|
||||
* @return 结果
|
||||
*/
|
||||
int updateOrderBasicInfo(OrderBasicInfo orderBasicInfo);
|
||||
|
||||
/**
|
||||
* 将某订单修改为某状态
|
||||
* @param orderCode 订单号
|
||||
* @param orderStatus 修改为某状态
|
||||
*/
|
||||
/**
|
||||
* 批量删除订单
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteOrderBasicInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量删除订单详情
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteOrderDetailByOrderCodes(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量新增订单详情
|
||||
*
|
||||
* @param orderDetailList 订单详情列表
|
||||
* @return 结果
|
||||
*/
|
||||
int batchOrderDetail(List<OrderDetail> orderDetailList);
|
||||
|
||||
/**
|
||||
* 通过订单主键删除订单详情信息
|
||||
*
|
||||
* @param id 订单ID
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteOrderDetailByOrderCode(Long id);
|
||||
|
||||
/**
|
||||
* 修改订单详情
|
||||
*
|
||||
* @param orderDetail 订单详情
|
||||
*/
|
||||
int updateOrderDetail(OrderDetail orderDetail);
|
||||
|
||||
/**
|
||||
* 通过订单号查询订单基本信息
|
||||
*
|
||||
* @param orderCode 订单号
|
||||
* @return
|
||||
*/
|
||||
OrderBasicInfo getOrderInfoByOrderCode(String orderCode);
|
||||
|
||||
OrderBasicInfo getOrderInfoByTransactionCode(String transactionCode);
|
||||
|
||||
/**
|
||||
* 根据桩编号和枪口号查询某状态订单
|
||||
*
|
||||
* @param pileSn 桩编号
|
||||
* @param connectorCode 枪口号
|
||||
* @param orderStatus 订单状态
|
||||
* @return 订单
|
||||
*/
|
||||
OrderBasicInfo queryOrderBasicInfo(@Param("pileSn") String pileSn, @Param("connectorCode") String connectorCode, @Param("orderStatus") String orderStatus);
|
||||
|
||||
/**
|
||||
* 通过订单号查询订单详情
|
||||
*
|
||||
* @param orderCode 订单号
|
||||
* @return 订单详情
|
||||
*/
|
||||
OrderDetail getOrderDetailByOrderCode(@Param("orderCode") String orderCode);
|
||||
|
||||
/**
|
||||
* 通过会员Id和订单状态查询订单信息
|
||||
*
|
||||
* @param memberId 会员id
|
||||
* @param orderStatusList 订单状态集合
|
||||
* @param dateTime
|
||||
* @return
|
||||
*/
|
||||
List<OrderVO> getListByMemberIdAndOrderStatus(@Param("memberId") String memberId,
|
||||
@Param("orderStatusList") List<String> orderStatusList,
|
||||
@Param("dateTime") LocalDateTime dateTime,
|
||||
@Param("stationId") String stationId);
|
||||
|
||||
/**
|
||||
* 将某订单修改为某状态
|
||||
*
|
||||
* @param orderCode 订单号
|
||||
* @param orderStatus 修改为某状态
|
||||
*/
|
||||
void updateOrderStatusByOrderCode(@Param("orderCode") String orderCode, @Param("orderStatus") String orderStatus);
|
||||
|
||||
/**
|
||||
* 首页订单数据展示
|
||||
*
|
||||
* @param dto 首页信息查询dto
|
||||
* @return
|
||||
*/
|
||||
List<IndexOrderInfoVO> getIndexOrderInfo(@Param("dto") IndexQueryDTO dto);
|
||||
|
||||
/**
|
||||
* 首页订单数据展示
|
||||
* @param dto 首页信息查询dto
|
||||
* @return
|
||||
*/
|
||||
List<IndexOrderInfoVO> getIndexOrderInfo(@Param("dto") IndexQueryDTO dto);
|
||||
/**
|
||||
* 首页订单数据展示 V2
|
||||
*
|
||||
* @param dto 首页信息查询dto
|
||||
* @return
|
||||
*/
|
||||
List<IndexOrderInfoVO> getIndexOrderInfoV2(@Param("dto") IndexQueryDTO dto);
|
||||
|
||||
/**
|
||||
* 首页订单数据展示 V2
|
||||
* @param dto 首页信息查询dto
|
||||
* @return
|
||||
*/
|
||||
List<IndexOrderInfoVO> getIndexOrderInfoV2(@Param("dto") IndexQueryDTO dto);
|
||||
/**
|
||||
* 获取超过15分钟的待支付状态订单
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<OrderBasicInfo> getUnpaidOrderListOver15Min(@Param("createTime") String createTime);
|
||||
|
||||
/**
|
||||
* 获取超过15分钟的待支付状态订单
|
||||
* @return
|
||||
*/
|
||||
List<OrderBasicInfo> getUnpaidOrderListOver15Min(@Param("createTime") String createTime);
|
||||
/**
|
||||
* 根据orderId批量修改订单状态
|
||||
*
|
||||
* @param orderIds
|
||||
* @param orderStatus
|
||||
*/
|
||||
void updateOrderStatusById(@Param("orderIds") List<String> orderIds, @Param("orderStatus") String orderStatus);
|
||||
|
||||
/**
|
||||
* 根据orderId批量修改订单状态
|
||||
* @param orderIds
|
||||
* @param orderStatus
|
||||
*/
|
||||
void updateOrderStatusById(@Param("orderIds") List<String> orderIds, @Param("orderStatus") String orderStatus);
|
||||
/**
|
||||
* 通过订单号查询订单信息(小程序发送消息用)
|
||||
*
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
SendMessageVO selectOrderInfoByOrderCode(@Param("orderCode") String orderCode);
|
||||
|
||||
/**
|
||||
* 通过订单号查询订单信息(小程序发送消息用)
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
SendMessageVO selectOrderInfoByOrderCode(@Param("orderCode") String orderCode);
|
||||
List<OrderBasicInfo> selectOrderListByTimeRangeAndStatus(@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("orderStatus") String orderStatus,
|
||||
@Param("payStatus") String payStatus);
|
||||
|
||||
List<OrderBasicInfo> selectOrderListByTimeRangeAndStatus(@Param("startTime") String startTime,
|
||||
@Param("endTime") String endTime,
|
||||
@Param("orderStatus") String orderStatus,
|
||||
@Param("payStatus") String payStatus);
|
||||
/**
|
||||
* 个人桩查询充电数据
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<PersonPileConnectorSumInfoVO> getAccumulativeInfo(QueryPersonPileDTO dto);
|
||||
|
||||
/**
|
||||
* 个人桩查询充电数据
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<PersonPileConnectorSumInfoVO> getAccumulativeInfo(QueryPersonPileDTO dto);
|
||||
List<OrderBasicInfo> getAppointmentOrder(LocalDateTime dateTime);
|
||||
|
||||
List<OrderBasicInfo> getAppointmentOrder(LocalDateTime dateTime);
|
||||
List<OrderVO> getListByOrderCodes(@Param("orderCodes") List<String> orderCodes);
|
||||
|
||||
List<OrderVO> getListByOrderCodes(@Param("orderCodes") List<String> orderCodes);
|
||||
/**
|
||||
* 联联平台 获取累计数据用
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<AccumulativeInfoVO> getAccumulativeInfoForLianLian(QueryStationInfoDTO dto);
|
||||
|
||||
/**
|
||||
* 联联平台 获取累计数据用
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<AccumulativeInfoVO> getAccumulativeInfoForLianLian(QueryStationInfoDTO dto);
|
||||
List<OrderDetail> queryElecAmountNullList();
|
||||
|
||||
List<OrderDetail> queryElecAmountNullList();
|
||||
int batchUpdateOrderDetail(@Param("list") List<OrderDetail> orderDetailList);
|
||||
|
||||
int batchUpdateOrderDetail(@Param("list") List<OrderDetail> orderDetailList);
|
||||
|
||||
List<OrderDetail> getOrderDetailList(List<String> orderCodes);
|
||||
List<OrderDetail> getOrderDetailList(List<String> orderCodes);
|
||||
|
||||
List<OrderBasicInfo> tempQueryWeChatRefundOrders(@Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
|
||||
/**
|
||||
* 获取运营商订单列表
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<MerchantOrderInfoVO> getMerchantOrderInfoList(@Param("dto") QueryMerchantOrderDTO dto);
|
||||
/**
|
||||
* 获取运营商订单列表
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<MerchantOrderInfoVO> getMerchantOrderInfoList(@Param("dto") QueryMerchantOrderDTO dto);
|
||||
|
||||
List<RefundOrder> batchRefundQuery(List<String> orderCodeList);
|
||||
|
||||
/**
|
||||
* 根据订单编号
|
||||
* @param orderCodeList 订单编号列表
|
||||
* @return
|
||||
*/
|
||||
List<OrderBasicInfo> queryOrderList(@Param("orderCodeList") List<String> orderCodeList);
|
||||
/**
|
||||
* 根据订单编号
|
||||
*
|
||||
* @param orderCodeList 订单编号列表
|
||||
* @return
|
||||
*/
|
||||
List<OrderBasicInfo> queryOrderList(@Param("orderCodeList") List<String> orderCodeList);
|
||||
|
||||
/**
|
||||
* 获取首页订单详情
|
||||
* @param orderCodeList
|
||||
* @return
|
||||
*/
|
||||
IndexOrderInfoVO getIndexOrderDetail(@Param("list") List<String> orderCodeList);
|
||||
/**
|
||||
* 获取首页订单详情
|
||||
*
|
||||
* @param orderCodeList
|
||||
* @return
|
||||
*/
|
||||
IndexOrderInfoVO getIndexOrderDetail(@Param("list") List<String> orderCodeList);
|
||||
|
||||
/**
|
||||
* 通过站点id修改运营商id
|
||||
* @param stationId
|
||||
* @return
|
||||
*/
|
||||
int updateMerchantByStationId(@Param("stationId")Long stationId, @Param("newMerchantId")String newMerchantId);
|
||||
/**
|
||||
* 通过站点id修改运营商id
|
||||
*
|
||||
* @param stationId
|
||||
* @return
|
||||
*/
|
||||
int updateMerchantByStationId(@Param("stationId") Long stationId, @Param("newMerchantId") String newMerchantId);
|
||||
|
||||
/**
|
||||
* 通过订单编号获取南瑞平台所需要的订单数据信息
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
/**
|
||||
* 通过订单编号获取南瑞平台所需要的订单数据信息
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<NROrderInfoVO> getNROrderInfoByOrderCode(@Param("dto") NRQueryOrderDTO dto);
|
||||
|
||||
List<OrderPayDetailVO> queryOrderPayDetail(@Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
List<OrderPayDetailVO> queryOrderPayDetail(@Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
|
||||
/**
|
||||
* 根据车牌号查询订单信息(宁夏交投 用)
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
/**
|
||||
* 根据车牌号查询订单信息(宁夏交投 用)
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<OrderVO> getOrderInfoByNXJT(NXJTQueryOrdersInfoDTO dto);
|
||||
|
||||
OrderTotalDataVO getOrderTotalData(QueryOrderDTO dto);
|
||||
}
|
||||
}
|
||||
@@ -1,382 +0,0 @@
|
||||
package com.jsowell.pile.service;
|
||||
|
||||
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
||||
import com.jsowell.adapay.response.PaymentReverseResponse;
|
||||
import com.jsowell.adapay.vo.OrderSettleResult;
|
||||
import com.jsowell.common.core.domain.ykc.RealTimeMonitorData;
|
||||
import com.jsowell.common.core.domain.ykc.TransactionRecordsData;
|
||||
import com.jsowell.pile.domain.AdapayMemberAccount;
|
||||
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||
import com.jsowell.pile.domain.OrderDetail;
|
||||
import com.jsowell.pile.domain.SettleOrderReport;
|
||||
import com.jsowell.pile.dto.*;
|
||||
import com.jsowell.pile.dto.nanrui.NRQueryOrderDTO;
|
||||
import com.jsowell.pile.dto.ningxiajiaotou.NXJTQueryOrdersInfoDTO;
|
||||
import com.jsowell.pile.service.programlogic.AbstractProgramLogic;
|
||||
import com.jsowell.pile.vo.base.MerchantOrderInfoVO;
|
||||
import com.jsowell.pile.vo.base.OrderAmountDetailVO;
|
||||
import com.jsowell.pile.vo.base.OrderPeriodAmountVO;
|
||||
import com.jsowell.pile.vo.lianlian.AccumulativeInfoVO;
|
||||
import com.jsowell.pile.vo.nanrui.NROrderInfoVO;
|
||||
import com.jsowell.pile.vo.uniapp.OrderVO;
|
||||
import com.jsowell.pile.vo.uniapp.PersonPileConnectorSumInfoVO;
|
||||
import com.jsowell.pile.vo.uniapp.SendMessageVO;
|
||||
import com.jsowell.pile.vo.web.*;
|
||||
import com.jsowell.wxpay.response.WechatPayRefundResponse;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.ParseException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 订单Service接口
|
||||
*
|
||||
* @author jsowell
|
||||
* @date 2022-09-30
|
||||
*/
|
||||
public interface IOrderBasicInfoService {
|
||||
|
||||
/**
|
||||
* 条件查询订单基础信息
|
||||
* @param info
|
||||
* @return
|
||||
*/
|
||||
OrderBasicInfo getOrderBasicInfo(OrderBasicInfo info);
|
||||
|
||||
List<OrderListVO> selectOrderBasicInfoListWithAuth(QueryOrderDTO dto);
|
||||
|
||||
/**
|
||||
* 查询订单列表
|
||||
*
|
||||
* @param dto 订单
|
||||
* @return 订单集合
|
||||
*/
|
||||
List<OrderListVO> selectOrderBasicInfoList(QueryOrderDTO dto);
|
||||
|
||||
/**
|
||||
* 查询充电中的订单,没有数据权限校验,后管不要用
|
||||
* @param pileSn
|
||||
* @return
|
||||
*/
|
||||
List<OrderListVO> selectChargingOrder(String pileSn);
|
||||
|
||||
public OrderBasicInfo saveOrder2Database(GenerateOrderDTO dto) throws ParseException;
|
||||
|
||||
/**
|
||||
* 修改订单
|
||||
*
|
||||
* @param orderBasicInfo 订单
|
||||
* @return 结果
|
||||
*/
|
||||
int updateOrderBasicInfo(OrderBasicInfo orderBasicInfo);
|
||||
|
||||
/**
|
||||
* 修改订单详情
|
||||
* @param orderDetail
|
||||
* @return
|
||||
*/
|
||||
int updateOrderDetail(OrderDetail orderDetail);
|
||||
|
||||
// 清订单缓存
|
||||
void cleanCacheByOrderCode(String orderCode, String transactionCode);
|
||||
|
||||
/**
|
||||
* 批量删除订单
|
||||
*
|
||||
* @param ids 需要删除的订单主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteOrderBasicInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 通过订单号查询订单信息
|
||||
*
|
||||
* @param orderCode 订单号
|
||||
* @return
|
||||
*/
|
||||
OrderBasicInfo getOrderInfoByOrderCode(String orderCode);
|
||||
|
||||
OrderBasicInfo getOrderInfoByTransactionCode(String transactionCode);
|
||||
|
||||
/**
|
||||
* 通过桩号和枪口号查询充电中的状态
|
||||
* @param pileSn 桩编号
|
||||
* @param connectorCode 枪口号
|
||||
* @return
|
||||
*/
|
||||
OrderBasicInfo queryChargingByPileSnAndConnectorCode(String pileSn, String connectorCode);
|
||||
|
||||
OrderBasicInfo queryChargingByPileConnectorCode(String pileConnectorCode);
|
||||
|
||||
/**
|
||||
* 根据交易记录结算订单
|
||||
* @param data 交易记录数据
|
||||
* @param orderBasicInfo
|
||||
* @deprecated 该方法废弃 {@link AbstractProgramLogic#settleOrder(TransactionRecordsData, OrderBasicInfo)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
void settleOrder(TransactionRecordsData data, OrderBasicInfo orderBasicInfo);
|
||||
|
||||
/**
|
||||
* 关闭15分钟未支付订单
|
||||
* @return
|
||||
*/
|
||||
int close15MinutesOfUnpaidOrders();
|
||||
|
||||
WechatPayRefundResponse refundOrderWithWechatPay(ApplyRefundDTO dto);
|
||||
|
||||
WechatPayRefundResponse refundBalanceWithWechatPay(ApplyRefundDTO dto);
|
||||
|
||||
/**
|
||||
* 通过订单号查询订单详情
|
||||
*
|
||||
* @param orderCode 订单号
|
||||
* @return 订单详情
|
||||
*/
|
||||
OrderDetail getOrderDetailByOrderCode(String orderCode);
|
||||
|
||||
List<OrderDetail> getOrderDetailList(List<String> orderCodes);
|
||||
|
||||
/**
|
||||
* 通过会员Id和订单状态查询订单信息
|
||||
*
|
||||
* @param memberId 会员id
|
||||
* @param orderStatusList 订单状态集合
|
||||
* @return
|
||||
*/
|
||||
List<OrderVO> getListByMemberIdAndOrderStatus(String memberId, List<String> orderStatusList);
|
||||
|
||||
List<OrderVO> getListByMemberIdAndOrderStatus(String memberId, List<String> orderStatusList, LocalDateTime dateTime);
|
||||
|
||||
List<OrderVO> getListByMemberIdAndOrderStatus(String memberId, List<String> orderStatusList, LocalDateTime dateTime, String stationId);
|
||||
|
||||
void orderSplittingOperations(String merchantId, AdapayMemberAccount adapayMemberAccount, List<SettleOrderReport> stationReportList);
|
||||
|
||||
void orderSplittingOperations(String merchantId, String tradeDate);
|
||||
|
||||
List<BalanceDeductionAmountVO> calculateTheBalanceDeductionAmount(String memberId, BigDecimal amount);
|
||||
|
||||
/**
|
||||
* 执行订单分账
|
||||
* @param orderBasicInfo
|
||||
* @param adapayMemberAccount
|
||||
* @return
|
||||
* @throws BaseAdaPayException
|
||||
*/
|
||||
OrderSettleResult doPaymentConfirmWithDelay(OrderBasicInfo orderBasicInfo, AdapayMemberAccount adapayMemberAccount, String wechatAppId) throws BaseAdaPayException;
|
||||
|
||||
OrderSettleResult doBalancePaymentWithDelay(OrderBasicInfo orderBasicInfo, AdapayMemberAccount adapayMemberAccount, String wechatAppId) throws BaseAdaPayException;
|
||||
|
||||
/**
|
||||
* 批量查询订单
|
||||
* @param orderCodeList
|
||||
* @return
|
||||
*/
|
||||
List<OrderBasicInfo> queryOrderList(List<String> orderCodeList);
|
||||
|
||||
void realTimeMonitorDataRedis2DB(String transactionCode, String orderCode);
|
||||
|
||||
/**
|
||||
* 结算订单退款和用户余额退款调这个方法
|
||||
*/
|
||||
void weChatRefund(ApplyRefundDTO dto);
|
||||
|
||||
/**
|
||||
* 保存非法订单记录
|
||||
*/
|
||||
void saveAbnormalOrder(TransactionRecordsData data);
|
||||
|
||||
/**
|
||||
* 获取充电实时数据
|
||||
* @param transactionCode 交易流水号
|
||||
* @return
|
||||
*/
|
||||
List<RealTimeMonitorData> getChargingRealTimeData(String transactionCode);
|
||||
|
||||
/**
|
||||
* 首页订单数据展示
|
||||
* @param dto 首页信息查询dto
|
||||
* @return
|
||||
*/
|
||||
List<IndexOrderInfoVO> getIndexOrderInfo(IndexQueryDTO dto);
|
||||
|
||||
/**
|
||||
* 获取超过15分钟的待支付状态订单
|
||||
* @return
|
||||
*/
|
||||
List<OrderBasicInfo> getUnpaidOrderListOver15Min();
|
||||
|
||||
/**
|
||||
* 根据orderId批量修改订单状态
|
||||
* @param orderIds
|
||||
* @param orderStatus
|
||||
*/
|
||||
void updateOrderStatusById(List<String> orderIds, String orderStatus);
|
||||
|
||||
/**
|
||||
* 通过订单状态和支付状态 转换订单状态描述
|
||||
* @param orderStatus 订单状态
|
||||
* @param payStatus 支付状态
|
||||
* @return 订单状态描述
|
||||
*/
|
||||
String transformOrderStatusDescribe(String orderStatus, String payStatus);
|
||||
|
||||
/**
|
||||
* 查询时间段内订单总金额和总用电量
|
||||
*/
|
||||
OrderTotalDataVO getOrderTotalData(QueryOrderDTO orderBasicInfo);
|
||||
|
||||
List<OrderTotalDataVO> getOrderTotalDataV2(QueryOrderDTO dto);
|
||||
|
||||
/**
|
||||
* 通过订单号查询订单信息(小程序发送消息用)
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
SendMessageVO selectOrderInfoByOrderCode(String orderCode);
|
||||
|
||||
/**
|
||||
* 充电桩启动失败
|
||||
* @param orderCode
|
||||
* @param failedReasonMsg
|
||||
*/
|
||||
void chargingPileFailedToStart(String orderCode, String failedReasonMsg);
|
||||
|
||||
/**
|
||||
* 充电桩启动成功
|
||||
* @param orderCode
|
||||
*/
|
||||
void chargingPileStartedSuccessfully(String orderCode);
|
||||
|
||||
/**
|
||||
* 关闭启动失败的订单
|
||||
*/
|
||||
void closeStartFailedOrder(String startTime, String endTime);
|
||||
|
||||
List<OrderVO> getListByOrderCodes(List<String> orderCodes);
|
||||
|
||||
/**
|
||||
* 个人桩查询充电数据
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<PersonPileConnectorSumInfoVO> getAccumulativeInfo(QueryPersonPileDTO dto);
|
||||
|
||||
/**
|
||||
* 修改订单状态为异常(桩离线时调用)
|
||||
*
|
||||
* @param pileSn
|
||||
*/
|
||||
void updateOrderStatusAsAbnormal(String pileSn);
|
||||
|
||||
List<OrderBasicInfo> getAppointmentOrder(LocalDateTime dateTime);
|
||||
|
||||
Map<String, Object> generateOrderByCard(GenerateOrderDTO dto) throws Exception;
|
||||
|
||||
/**
|
||||
* 联联平台 获取累计数据用
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<AccumulativeInfoVO> getAccumulativeInfoForLianLian(QueryStationInfoDTO dto);
|
||||
|
||||
/**
|
||||
* 联联平台生成订单
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> generateOrderForLianLian(QueryStartChargeDTO dto);
|
||||
|
||||
List<OrderAmountDetailVO> queryOrderAmountDetail(List<String> orderCodes);
|
||||
|
||||
List<OrderPeriodAmountVO> transformPeriodAmountByOrderDetail(OrderDetail orderDetail);
|
||||
|
||||
/**
|
||||
* 汇付支付 订单退款
|
||||
* @param dto
|
||||
*/
|
||||
void refundOrderWithAdapay(ApplyRefundDTO dto);
|
||||
|
||||
/**
|
||||
* 汇付支付 余额退款
|
||||
* @param dto
|
||||
*/
|
||||
void refundBalanceWithAdapay(ApplyRefundDTO dto);
|
||||
|
||||
/**
|
||||
* 生成订单日报
|
||||
*/
|
||||
// void generateDailyOrderReports(String stationId, String tradeDate);
|
||||
|
||||
/**
|
||||
* 获取运营商订单列表
|
||||
* @return
|
||||
*/
|
||||
List<MerchantOrderInfoVO> getMerchantOrderInfoList(QueryMerchantOrderDTO dto);
|
||||
|
||||
/**
|
||||
* 生成订单逻辑
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
OrderBasicInfo generateOrder(GenerateOrderDTO dto) throws ParseException;
|
||||
|
||||
void analysisPileParameter(BasicPileDTO dto);
|
||||
|
||||
Map<String, Object> payOrder(PayOrderDTO dto) throws Exception;
|
||||
|
||||
/**
|
||||
* 订单支付成功 支付回调
|
||||
* 支付成功后掉用这个方法
|
||||
* 1. 修改订单支付状态
|
||||
* 2. 发送启动充电指令
|
||||
*/
|
||||
void payOrderSuccessCallback(PayOrderSuccessCallbackDTO dto);
|
||||
|
||||
List<PaymentReverseResponse> queryOrderAdapayRefund(OrderBasicInfo orderBasicInfo);
|
||||
|
||||
/**
|
||||
* 重试订单退款
|
||||
* @param orderCode 订单编号
|
||||
*/
|
||||
void retryRefundOrder(String orderCode) throws BaseAdaPayException;
|
||||
void retryRefundOrder(OrderBasicInfo orderBasicInfo) throws BaseAdaPayException;
|
||||
|
||||
OrderSettleResult orderPaymentSettlementAndRefund(OrderBasicInfo orderBasicInfo);
|
||||
|
||||
void returnUpdateOrderBasicInfo(OrderBasicInfo orderBasicInfo, TransactionRecordsData data);
|
||||
|
||||
OrderDetail returnUpdateOrderDetail(OrderBasicInfo orderBasicInfo, TransactionRecordsData data);
|
||||
|
||||
/**
|
||||
* 通过站点id修改运营商id
|
||||
* @param stationId
|
||||
* @return
|
||||
*/
|
||||
int updateMerchantByStationId(Long stationId, String newMerchantId);
|
||||
|
||||
/**
|
||||
* 通过订单编号获取南瑞平台所需要的订单数据信息
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
NROrderInfoVO getNROrderInfoByOrderCode(String orderCode);
|
||||
|
||||
/**
|
||||
* 通过充电结束时间批量查询
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<NROrderInfoVO> getNROrderInfos(NRQueryOrderDTO dto);
|
||||
|
||||
List<OrderPayDetailVO> queryOrderPayDetail(String startTime, String endTime);
|
||||
|
||||
/**
|
||||
* 根据车牌号查询订单信息(宁夏交投 用)
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<OrderVO> getOrderInfoByNXJT(NXJTQueryOrdersInfoDTO dto);
|
||||
}
|
||||
@@ -0,0 +1,399 @@
|
||||
package com.jsowell.pile.service;
|
||||
|
||||
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
||||
import com.jsowell.adapay.response.PaymentReverseResponse;
|
||||
import com.jsowell.adapay.vo.OrderSettleResult;
|
||||
import com.jsowell.common.core.domain.ykc.RealTimeMonitorData;
|
||||
import com.jsowell.common.core.domain.ykc.TransactionRecordsData;
|
||||
import com.jsowell.pile.domain.AdapayMemberAccount;
|
||||
import com.jsowell.pile.domain.OrderBasicInfo;
|
||||
import com.jsowell.pile.domain.OrderDetail;
|
||||
import com.jsowell.pile.domain.SettleOrderReport;
|
||||
import com.jsowell.pile.dto.*;
|
||||
import com.jsowell.pile.dto.nanrui.NRQueryOrderDTO;
|
||||
import com.jsowell.pile.dto.ningxiajiaotou.NXJTQueryOrdersInfoDTO;
|
||||
import com.jsowell.pile.service.programlogic.AbstractProgramLogic;
|
||||
import com.jsowell.pile.vo.base.MerchantOrderInfoVO;
|
||||
import com.jsowell.pile.vo.base.OrderAmountDetailVO;
|
||||
import com.jsowell.pile.vo.base.OrderPeriodAmountVO;
|
||||
import com.jsowell.pile.vo.lianlian.AccumulativeInfoVO;
|
||||
import com.jsowell.pile.vo.nanrui.NROrderInfoVO;
|
||||
import com.jsowell.pile.vo.uniapp.OrderVO;
|
||||
import com.jsowell.pile.vo.uniapp.PersonPileConnectorSumInfoVO;
|
||||
import com.jsowell.pile.vo.uniapp.SendMessageVO;
|
||||
import com.jsowell.pile.vo.web.*;
|
||||
import com.jsowell.wxpay.response.WechatPayRefundResponse;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.ParseException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface OrderBasicInfoService{
|
||||
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(OrderBasicInfo record);
|
||||
|
||||
int insertOrUpdate(OrderBasicInfo record);
|
||||
|
||||
int insertOrUpdateSelective(OrderBasicInfo record);
|
||||
|
||||
int insertSelective(OrderBasicInfo record);
|
||||
|
||||
OrderBasicInfo selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(OrderBasicInfo record);
|
||||
|
||||
int updateByPrimaryKey(OrderBasicInfo record);
|
||||
|
||||
int updateBatch(List<OrderBasicInfo> list);
|
||||
|
||||
int updateBatchSelective(List<OrderBasicInfo> list);
|
||||
|
||||
int batchInsert(List<OrderBasicInfo> list);
|
||||
|
||||
/**
|
||||
* 条件查询订单基础信息
|
||||
* @param info
|
||||
* @return
|
||||
*/
|
||||
OrderBasicInfo getOrderBasicInfo(OrderBasicInfo info);
|
||||
|
||||
List<OrderListVO> selectOrderBasicInfoListWithAuth(QueryOrderDTO dto);
|
||||
|
||||
/**
|
||||
* 查询订单列表
|
||||
*
|
||||
* @param dto 订单
|
||||
* @return 订单集合
|
||||
*/
|
||||
List<OrderListVO> selectOrderBasicInfoList(QueryOrderDTO dto);
|
||||
|
||||
/**
|
||||
* 查询充电中的订单,没有数据权限校验,后管不要用
|
||||
* @param pileSn
|
||||
* @return
|
||||
*/
|
||||
List<OrderListVO> selectChargingOrder(String pileSn);
|
||||
|
||||
public OrderBasicInfo saveOrder2Database(GenerateOrderDTO dto) throws ParseException;
|
||||
|
||||
/**
|
||||
* 修改订单
|
||||
*
|
||||
* @param orderBasicInfo 订单
|
||||
* @return 结果
|
||||
*/
|
||||
int updateOrderBasicInfo(OrderBasicInfo orderBasicInfo);
|
||||
|
||||
/**
|
||||
* 修改订单详情
|
||||
* @param orderDetail
|
||||
* @return
|
||||
*/
|
||||
int updateOrderDetail(OrderDetail orderDetail);
|
||||
|
||||
// 清订单缓存
|
||||
void cleanCacheByOrderCode(String orderCode, String transactionCode);
|
||||
|
||||
/**
|
||||
* 批量删除订单
|
||||
*
|
||||
* @param ids 需要删除的订单主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteOrderBasicInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 通过订单号查询订单信息
|
||||
*
|
||||
* @param orderCode 订单号
|
||||
* @return
|
||||
*/
|
||||
OrderBasicInfo getOrderInfoByOrderCode(String orderCode);
|
||||
|
||||
OrderBasicInfo getOrderInfoByTransactionCode(String transactionCode);
|
||||
|
||||
/**
|
||||
* 通过桩号和枪口号查询充电中的状态
|
||||
* @param pileSn 桩编号
|
||||
* @param connectorCode 枪口号
|
||||
* @return
|
||||
*/
|
||||
OrderBasicInfo queryChargingByPileSnAndConnectorCode(String pileSn, String connectorCode);
|
||||
|
||||
OrderBasicInfo queryChargingByPileConnectorCode(String pileConnectorCode);
|
||||
|
||||
/**
|
||||
* 根据交易记录结算订单
|
||||
* @param data 交易记录数据
|
||||
* @param orderBasicInfo
|
||||
* @deprecated 该方法废弃 {@link AbstractProgramLogic#settleOrder(TransactionRecordsData, OrderBasicInfo)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
void settleOrder(TransactionRecordsData data, OrderBasicInfo orderBasicInfo);
|
||||
|
||||
/**
|
||||
* 关闭15分钟未支付订单
|
||||
* @return
|
||||
*/
|
||||
int close15MinutesOfUnpaidOrders();
|
||||
|
||||
WechatPayRefundResponse refundOrderWithWechatPay(ApplyRefundDTO dto);
|
||||
|
||||
WechatPayRefundResponse refundBalanceWithWechatPay(ApplyRefundDTO dto);
|
||||
|
||||
/**
|
||||
* 通过订单号查询订单详情
|
||||
*
|
||||
* @param orderCode 订单号
|
||||
* @return 订单详情
|
||||
*/
|
||||
OrderDetail getOrderDetailByOrderCode(String orderCode);
|
||||
|
||||
List<OrderDetail> getOrderDetailList(List<String> orderCodes);
|
||||
|
||||
/**
|
||||
* 通过会员Id和订单状态查询订单信息
|
||||
*
|
||||
* @param memberId 会员id
|
||||
* @param orderStatusList 订单状态集合
|
||||
* @return
|
||||
*/
|
||||
List<OrderVO> getListByMemberIdAndOrderStatus(String memberId, List<String> orderStatusList);
|
||||
|
||||
List<OrderVO> getListByMemberIdAndOrderStatus(String memberId, List<String> orderStatusList, LocalDateTime dateTime);
|
||||
|
||||
List<OrderVO> getListByMemberIdAndOrderStatus(String memberId, List<String> orderStatusList, LocalDateTime dateTime, String stationId);
|
||||
|
||||
void orderSplittingOperations(String merchantId, AdapayMemberAccount adapayMemberAccount, List<SettleOrderReport> stationReportList);
|
||||
|
||||
void orderSplittingOperations(String merchantId, String tradeDate);
|
||||
|
||||
List<BalanceDeductionAmountVO> calculateTheBalanceDeductionAmount(String memberId, BigDecimal amount);
|
||||
|
||||
/**
|
||||
* 执行订单分账
|
||||
* @param orderBasicInfo
|
||||
* @param adapayMemberAccount
|
||||
* @return
|
||||
* @throws BaseAdaPayException
|
||||
*/
|
||||
OrderSettleResult doPaymentConfirmWithDelay(OrderBasicInfo orderBasicInfo, AdapayMemberAccount adapayMemberAccount, String wechatAppId) throws BaseAdaPayException;
|
||||
|
||||
OrderSettleResult doBalancePaymentWithDelay(OrderBasicInfo orderBasicInfo, AdapayMemberAccount adapayMemberAccount, String wechatAppId) throws BaseAdaPayException;
|
||||
|
||||
/**
|
||||
* 批量查询订单
|
||||
* @param orderCodeList
|
||||
* @return
|
||||
*/
|
||||
List<OrderBasicInfo> queryOrderList(List<String> orderCodeList);
|
||||
|
||||
void realTimeMonitorDataRedis2DB(String transactionCode, String orderCode);
|
||||
|
||||
/**
|
||||
* 结算订单退款和用户余额退款调这个方法
|
||||
*/
|
||||
void weChatRefund(ApplyRefundDTO dto);
|
||||
|
||||
/**
|
||||
* 保存非法订单记录
|
||||
*/
|
||||
void saveAbnormalOrder(TransactionRecordsData data);
|
||||
|
||||
/**
|
||||
* 获取充电实时数据
|
||||
* @param transactionCode 交易流水号
|
||||
* @return
|
||||
*/
|
||||
List<RealTimeMonitorData> getChargingRealTimeData(String transactionCode);
|
||||
|
||||
/**
|
||||
* 首页订单数据展示
|
||||
* @param dto 首页信息查询dto
|
||||
* @return
|
||||
*/
|
||||
List<IndexOrderInfoVO> getIndexOrderInfo(IndexQueryDTO dto);
|
||||
|
||||
/**
|
||||
* 获取超过15分钟的待支付状态订单
|
||||
* @return
|
||||
*/
|
||||
List<OrderBasicInfo> getUnpaidOrderListOver15Min();
|
||||
|
||||
/**
|
||||
* 根据orderId批量修改订单状态
|
||||
* @param orderIds
|
||||
* @param orderStatus
|
||||
*/
|
||||
void updateOrderStatusById(List<String> orderIds, String orderStatus);
|
||||
|
||||
/**
|
||||
* 通过订单状态和支付状态 转换订单状态描述
|
||||
* @param orderStatus 订单状态
|
||||
* @param payStatus 支付状态
|
||||
* @return 订单状态描述
|
||||
*/
|
||||
String transformOrderStatusDescribe(String orderStatus, String payStatus);
|
||||
|
||||
/**
|
||||
* 查询时间段内订单总金额和总用电量
|
||||
*/
|
||||
OrderTotalDataVO getOrderTotalData(QueryOrderDTO orderBasicInfo);
|
||||
|
||||
List<OrderTotalDataVO> getOrderTotalDataV2(QueryOrderDTO dto);
|
||||
|
||||
/**
|
||||
* 通过订单号查询订单信息(小程序发送消息用)
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
SendMessageVO selectOrderInfoByOrderCode(String orderCode);
|
||||
|
||||
/**
|
||||
* 充电桩启动失败
|
||||
* @param orderCode
|
||||
* @param failedReasonMsg
|
||||
*/
|
||||
void chargingPileFailedToStart(String orderCode, String failedReasonMsg);
|
||||
|
||||
/**
|
||||
* 充电桩启动成功
|
||||
* @param orderCode
|
||||
*/
|
||||
void chargingPileStartedSuccessfully(String orderCode);
|
||||
|
||||
/**
|
||||
* 关闭启动失败的订单
|
||||
*/
|
||||
void closeStartFailedOrder(String startTime, String endTime);
|
||||
|
||||
List<OrderVO> getListByOrderCodes(List<String> orderCodes);
|
||||
|
||||
/**
|
||||
* 个人桩查询充电数据
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<PersonPileConnectorSumInfoVO> getAccumulativeInfo(QueryPersonPileDTO dto);
|
||||
|
||||
/**
|
||||
* 修改订单状态为异常(桩离线时调用)
|
||||
*
|
||||
* @param pileSn
|
||||
*/
|
||||
void updateOrderStatusAsAbnormal(String pileSn);
|
||||
|
||||
List<OrderBasicInfo> getAppointmentOrder(LocalDateTime dateTime);
|
||||
|
||||
Map<String, Object> generateOrderByCard(GenerateOrderDTO dto) throws Exception;
|
||||
|
||||
/**
|
||||
* 联联平台 获取累计数据用
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<AccumulativeInfoVO> getAccumulativeInfoForLianLian(QueryStationInfoDTO dto);
|
||||
|
||||
/**
|
||||
* 联联平台生成订单
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> generateOrderForLianLian(QueryStartChargeDTO dto);
|
||||
|
||||
List<OrderAmountDetailVO> queryOrderAmountDetail(List<String> orderCodes);
|
||||
|
||||
List<OrderPeriodAmountVO> transformPeriodAmountByOrderDetail(OrderDetail orderDetail);
|
||||
|
||||
/**
|
||||
* 汇付支付 订单退款
|
||||
* @param dto
|
||||
*/
|
||||
void refundOrderWithAdapay(ApplyRefundDTO dto);
|
||||
|
||||
/**
|
||||
* 汇付支付 余额退款
|
||||
* @param dto
|
||||
*/
|
||||
void refundBalanceWithAdapay(ApplyRefundDTO dto);
|
||||
|
||||
/**
|
||||
* 生成订单日报
|
||||
*/
|
||||
// void generateDailyOrderReports(String stationId, String tradeDate);
|
||||
|
||||
/**
|
||||
* 获取运营商订单列表
|
||||
* @return
|
||||
*/
|
||||
List<MerchantOrderInfoVO> getMerchantOrderInfoList(QueryMerchantOrderDTO dto);
|
||||
|
||||
/**
|
||||
* 生成订单逻辑
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
OrderBasicInfo generateOrder(GenerateOrderDTO dto) throws ParseException;
|
||||
|
||||
void analysisPileParameter(BasicPileDTO dto);
|
||||
|
||||
Map<String, Object> payOrder(PayOrderDTO dto) throws Exception;
|
||||
|
||||
/**
|
||||
* 订单支付成功 支付回调
|
||||
* 支付成功后掉用这个方法
|
||||
* 1. 修改订单支付状态
|
||||
* 2. 发送启动充电指令
|
||||
*/
|
||||
void payOrderSuccessCallback(PayOrderSuccessCallbackDTO dto);
|
||||
|
||||
List<PaymentReverseResponse> queryOrderAdapayRefund(OrderBasicInfo orderBasicInfo);
|
||||
|
||||
/**
|
||||
* 重试订单退款
|
||||
* @param orderCode 订单编号
|
||||
*/
|
||||
void retryRefundOrder(String orderCode) throws BaseAdaPayException;
|
||||
void retryRefundOrder(OrderBasicInfo orderBasicInfo) throws BaseAdaPayException;
|
||||
|
||||
OrderSettleResult orderPaymentSettlementAndRefund(OrderBasicInfo orderBasicInfo);
|
||||
|
||||
void returnUpdateOrderBasicInfo(OrderBasicInfo orderBasicInfo, TransactionRecordsData data);
|
||||
|
||||
OrderDetail returnUpdateOrderDetail(OrderBasicInfo orderBasicInfo, TransactionRecordsData data);
|
||||
|
||||
/**
|
||||
* 通过站点id修改运营商id
|
||||
* @param stationId
|
||||
* @return
|
||||
*/
|
||||
int updateMerchantByStationId(Long stationId, String newMerchantId);
|
||||
|
||||
/**
|
||||
* 通过订单编号获取南瑞平台所需要的订单数据信息
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
NROrderInfoVO getNROrderInfoByOrderCode(String orderCode);
|
||||
|
||||
/**
|
||||
* 通过充电结束时间批量查询
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<NROrderInfoVO> getNROrderInfos(NRQueryOrderDTO dto);
|
||||
|
||||
List<OrderPayDetailVO> queryOrderPayDetail(String startTime, String endTime);
|
||||
|
||||
/**
|
||||
* 根据车牌号查询订单信息(宁夏交投 用)
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<OrderVO> getOrderInfoByNXJT(NXJTQueryOrdersInfoDTO dto);
|
||||
|
||||
}
|
||||
@@ -80,7 +80,7 @@ import java.util.stream.Collectors;
|
||||
* @date 2022-09-30
|
||||
*/
|
||||
@Service
|
||||
public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
@@ -615,7 +615,8 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
|
||||
/**
|
||||
* 清除订单缓存 订单编号或交易流水号 任意传一个
|
||||
* @param orderCode 订单编号
|
||||
*
|
||||
* @param orderCode 订单编号
|
||||
* @param transactionCode 交易流水号
|
||||
*/
|
||||
@Override
|
||||
@@ -837,6 +838,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
* 延迟商家订单退款处理逻辑
|
||||
* 例如:举视以及下面的二级运营商
|
||||
* 因为在结算时还没有到分账的时间,先解冻需要退款的金额,并退款
|
||||
*
|
||||
* @param orderBasicInfo 订单信息
|
||||
* @param adapayMemberAccount 汇付用户信息
|
||||
* @param wechatAppId 小程序appId
|
||||
@@ -1025,6 +1027,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
|
||||
/**
|
||||
* 通过站点id修改运营商id
|
||||
*
|
||||
* @param stationId
|
||||
* @return
|
||||
*/
|
||||
@@ -1035,6 +1038,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
|
||||
/**
|
||||
* 通过订单编号获取南瑞平台所需要的订单数据信息
|
||||
*
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
@@ -1053,6 +1057,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
|
||||
/**
|
||||
* 通过充电结束时间批量查询
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@@ -1433,6 +1438,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算余额扣除金额
|
||||
*
|
||||
@@ -1517,8 +1523,9 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
|
||||
/**
|
||||
* 校验订单分账金额
|
||||
* @param paymentIds 支付id集合
|
||||
* @param orderCode 订单编号
|
||||
*
|
||||
* @param paymentIds 支付id集合
|
||||
* @param orderCode 订单编号
|
||||
* @param settleAmount 结算金额
|
||||
*/
|
||||
private OrderSettleResult verifyOrderConfirmAmount(List<String> paymentIds, String orderCode, BigDecimal settleAmount, String wechatAppId) throws BaseAdaPayException {
|
||||
@@ -1683,8 +1690,8 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
* 余额支付 计算需要退回的金额
|
||||
*
|
||||
* @param principalPay 本金支付金额
|
||||
* @param giftPay 赠送金额支付的金额
|
||||
* @param orderAmount 订单消费金额
|
||||
* @param giftPay 赠送金额支付的金额
|
||||
* @param orderAmount 订单消费金额
|
||||
* @return
|
||||
*/
|
||||
private Map<String, BigDecimal> calculateReturnAmount(BigDecimal principalPay, BigDecimal giftPay, BigDecimal orderAmount) {
|
||||
@@ -1805,10 +1812,10 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
String transactionIdentifier = data.getTransactionIdentifier();
|
||||
String startMode = null;
|
||||
if (StringUtils.equals(transactionIdentifier, "01")) {
|
||||
startMode = StartModeEnum.APP.getValue();
|
||||
startMode = StartModeEnum.APP.getValue();
|
||||
} else if (StringUtils.equals(transactionIdentifier, "02")) {
|
||||
// 鉴权卡启动
|
||||
startMode = StartModeEnum.AUTH_CARD.getValue();
|
||||
// 鉴权卡启动
|
||||
startMode = StartModeEnum.AUTH_CARD.getValue();
|
||||
orderBasicInfo.setLogicCard(data.getLogicCard());
|
||||
} else if (StringUtils.equals(transactionIdentifier, "04")) {
|
||||
// 离线卡启动
|
||||
@@ -2090,6 +2097,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
/**
|
||||
* 校验未支付订单
|
||||
* 如果存在因为未收到支付回调导致超时关闭的订单,在修改订单状态后,检查一下是否支付过,把支付的金额退款
|
||||
*
|
||||
* @param orderBasicInfo
|
||||
*/
|
||||
private void checkUnpaidOrder(OrderBasicInfo orderBasicInfo) {
|
||||
@@ -3216,6 +3224,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
/**
|
||||
* 余额支付订单逻辑
|
||||
* 去除赠送金额相关的代码
|
||||
*
|
||||
* @param dto
|
||||
*/
|
||||
// private void balancePayOrder(PayOrderDTO dto) {
|
||||
@@ -3309,7 +3318,6 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
// orderPayRecordService.batchInsert(payRecordList);
|
||||
// }
|
||||
// }
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void balancePayOrderV2(PayOrderDTO dto) {
|
||||
String orderCode = dto.getOrderCode(); // 订单编号
|
||||
@@ -3549,6 +3557,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
|
||||
/**
|
||||
* 根据车牌号查询订单信息(宁夏交投 用)
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@@ -3556,4 +3565,60 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
public List<OrderVO> getOrderInfoByNXJT(NXJTQueryOrdersInfoDTO dto) {
|
||||
return orderBasicInfoMapper.getOrderInfoByNXJT(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return orderBasicInfoMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(OrderBasicInfo record) {
|
||||
return orderBasicInfoMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertOrUpdate(OrderBasicInfo record) {
|
||||
return orderBasicInfoMapper.insertOrUpdate(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertOrUpdateSelective(OrderBasicInfo record) {
|
||||
return orderBasicInfoMapper.insertOrUpdateSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(OrderBasicInfo record) {
|
||||
return orderBasicInfoMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderBasicInfo selectByPrimaryKey(Integer id) {
|
||||
return orderBasicInfoMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(OrderBasicInfo record) {
|
||||
return orderBasicInfoMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(OrderBasicInfo record) {
|
||||
return orderBasicInfoMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateBatch(List<OrderBasicInfo> list) {
|
||||
return orderBasicInfoMapper.updateBatch(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateBatchSelective(List<OrderBasicInfo> list) {
|
||||
return orderBasicInfoMapper.updateBatchSelective(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int batchInsert(List<OrderBasicInfo> list) {
|
||||
return orderBasicInfoMapper.batchInsert(list);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ import com.jsowell.pile.dto.GetInvoiceInfoDTO;
|
||||
import com.jsowell.pile.dto.QueryInvoiceRecordDTO;
|
||||
import com.jsowell.pile.mapper.OrderInvoiceRecordMapper;
|
||||
import com.jsowell.pile.service.IMemberInvoiceTitleService;
|
||||
import com.jsowell.pile.service.IOrderBasicInfoService;
|
||||
import com.jsowell.pile.service.IOrderInvoiceRecordService;
|
||||
import com.jsowell.pile.service.OrderBasicInfoService;
|
||||
import com.jsowell.pile.util.UserUtils;
|
||||
import com.jsowell.pile.vo.base.OrderAmountDetailVO;
|
||||
import com.jsowell.pile.vo.uniapp.InvoiceTitleVO;
|
||||
@@ -37,7 +37,7 @@ public class OrderInvoiceRecordServiceImpl implements IOrderInvoiceRecordService
|
||||
private IMemberInvoiceTitleService memberInvoiceTitleService;
|
||||
|
||||
@Autowired
|
||||
private IOrderBasicInfoService orderBasicInfoService;
|
||||
private OrderBasicInfoService orderBasicInfoService;
|
||||
|
||||
/**
|
||||
* 查询申请开票
|
||||
|
||||
@@ -36,7 +36,7 @@ public class OrderPayRecordServiceImpl implements OrderPayRecordService {
|
||||
private IMemberTransactionRecordService memberTransactionRecordService;
|
||||
|
||||
@Autowired
|
||||
private IOrderBasicInfoService orderBasicInfoService;
|
||||
private OrderBasicInfoService orderBasicInfoService;
|
||||
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
@@ -57,7 +57,7 @@ public class OrderPileOccupyServiceImpl implements OrderPileOccupyService {
|
||||
private IPileBasicInfoService pileBasicInfoService;
|
||||
|
||||
@Resource
|
||||
private IOrderBasicInfoService orderBasicInfoService;
|
||||
private OrderBasicInfoService orderBasicInfoService;
|
||||
|
||||
@Resource
|
||||
private IPileBillingTemplateService pileBillingTemplateService;
|
||||
|
||||
@@ -65,7 +65,7 @@ public class PileConnectorInfoServiceImpl implements IPileConnectorInfoService {
|
||||
private IPileModelInfoService pileModelInfoService;
|
||||
|
||||
@Autowired
|
||||
private IOrderBasicInfoService orderBasicInfoService;
|
||||
private OrderBasicInfoService orderBasicInfoService;
|
||||
|
||||
@Autowired
|
||||
private IPileStationInfoService pileStationInfoService;
|
||||
|
||||
@@ -86,7 +86,7 @@ public class PileStationInfoServiceImpl implements IPileStationInfoService {
|
||||
private IThirdPartyParkingConfigService parkingConfigService;
|
||||
|
||||
@Autowired
|
||||
private IOrderBasicInfoService orderBasicInfoService;
|
||||
private OrderBasicInfoService orderBasicInfoService;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -52,7 +52,7 @@ public abstract class AbstractProgramLogic implements InitializingBean {
|
||||
protected String ADAPAY_CALLBACK_URL;
|
||||
|
||||
@Resource
|
||||
protected IOrderBasicInfoService orderBasicInfoService;
|
||||
protected OrderBasicInfoService orderBasicInfoService;
|
||||
|
||||
@Autowired
|
||||
protected IPileBasicInfoService pileBasicInfoService;
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.jsowell.pile.domain.PileConnectorInfo;
|
||||
import com.jsowell.pile.mapper.*;
|
||||
import com.jsowell.pile.service.ClearingBillDetailService;
|
||||
import com.jsowell.pile.service.ClearingBillInfoService;
|
||||
import com.jsowell.pile.service.IOrderBasicInfoService;
|
||||
import com.jsowell.pile.service.OrderBasicInfoService;
|
||||
import com.jsowell.pile.transaction.dto.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
@@ -47,7 +47,7 @@ public class TransactionService {
|
||||
private MemberWalletInfoMapper memberWalletInfoMapper;
|
||||
|
||||
@Autowired
|
||||
private IOrderBasicInfoService orderBasicInfoService;
|
||||
private OrderBasicInfoService orderBasicInfoService;
|
||||
|
||||
@Autowired
|
||||
private ClearingBillInfoService clearingBillInfoService;
|
||||
|
||||
@@ -15,8 +15,8 @@ import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.common.util.http.HttpUtils;
|
||||
import com.jsowell.pile.domain.MemberBasicInfo;
|
||||
import com.jsowell.pile.service.IMemberBasicInfoService;
|
||||
import com.jsowell.pile.service.IOrderBasicInfoService;
|
||||
import com.jsowell.pile.service.IPileBillingTemplateService;
|
||||
import com.jsowell.pile.service.OrderBasicInfoService;
|
||||
import com.jsowell.pile.vo.uniapp.CurrentTimePriceDetails;
|
||||
import com.jsowell.pile.vo.uniapp.SendMessageVO;
|
||||
import com.jsowell.wxpay.config.WeixinLoginProperties;
|
||||
@@ -50,7 +50,7 @@ public class WxAppletRemoteService {
|
||||
private RedisCache redisCache;
|
||||
|
||||
@Autowired
|
||||
private IOrderBasicInfoService orderBasicInfoService;
|
||||
private OrderBasicInfoService orderBasicInfoService;
|
||||
|
||||
@Autowired
|
||||
private IPileBillingTemplateService pileBillingTemplateService;
|
||||
|
||||
Reference in New Issue
Block a user