mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-19 21:48:03 +08:00
新增 宁夏交投 相关service方法
This commit is contained in:
@@ -17,4 +17,8 @@ public class NXJTQueryOrdersInfoDTO {
|
|||||||
private String licensePlateNumber;
|
private String licensePlateNumber;
|
||||||
|
|
||||||
private String operatorId;
|
private String operatorId;
|
||||||
|
|
||||||
|
private String startTime;
|
||||||
|
|
||||||
|
private String endTime;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.jsowell.pile.domain.OrderBasicInfo;
|
|||||||
import com.jsowell.pile.domain.OrderDetail;
|
import com.jsowell.pile.domain.OrderDetail;
|
||||||
import com.jsowell.pile.dto.*;
|
import com.jsowell.pile.dto.*;
|
||||||
import com.jsowell.pile.dto.nanrui.NRQueryOrderDTO;
|
import com.jsowell.pile.dto.nanrui.NRQueryOrderDTO;
|
||||||
|
import com.jsowell.pile.dto.ningxiajiaotou.NXJTQueryOrdersInfoDTO;
|
||||||
import com.jsowell.pile.vo.base.MerchantOrderInfoVO;
|
import com.jsowell.pile.vo.base.MerchantOrderInfoVO;
|
||||||
import com.jsowell.pile.vo.lianlian.AccumulativeInfoVO;
|
import com.jsowell.pile.vo.lianlian.AccumulativeInfoVO;
|
||||||
import com.jsowell.pile.vo.nanrui.NROrderInfoVO;
|
import com.jsowell.pile.vo.nanrui.NROrderInfoVO;
|
||||||
@@ -261,8 +262,8 @@ public interface OrderBasicInfoMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据车牌号查询订单信息(宁夏交投 用)
|
* 根据车牌号查询订单信息(宁夏交投 用)
|
||||||
* @param licensePlateNumber
|
* @param dto
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<OrderVO> getOrderInfoByLicensePlateNumber(String licensePlateNumber);
|
List<OrderVO> getOrderInfoByNXJT(NXJTQueryOrdersInfoDTO dto);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import com.jsowell.pile.domain.OrderDetail;
|
|||||||
import com.jsowell.pile.domain.SettleOrderReport;
|
import com.jsowell.pile.domain.SettleOrderReport;
|
||||||
import com.jsowell.pile.dto.*;
|
import com.jsowell.pile.dto.*;
|
||||||
import com.jsowell.pile.dto.nanrui.NRQueryOrderDTO;
|
import com.jsowell.pile.dto.nanrui.NRQueryOrderDTO;
|
||||||
|
import com.jsowell.pile.dto.ningxiajiaotou.NXJTQueryOrdersInfoDTO;
|
||||||
import com.jsowell.pile.service.orderlogic.AbstractOrderLogic;
|
import com.jsowell.pile.service.orderlogic.AbstractOrderLogic;
|
||||||
import com.jsowell.pile.vo.base.MerchantOrderInfoVO;
|
import com.jsowell.pile.vo.base.MerchantOrderInfoVO;
|
||||||
import com.jsowell.pile.vo.base.OrderAmountDetailVO;
|
import com.jsowell.pile.vo.base.OrderAmountDetailVO;
|
||||||
@@ -374,8 +375,8 @@ public interface IOrderBasicInfoService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据车牌号查询订单信息(宁夏交投 用)
|
* 根据车牌号查询订单信息(宁夏交投 用)
|
||||||
* @param licensePlateNumber
|
* @param dto
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<OrderVO> getOrderInfoByLicensePlateNumber(String licensePlateNumber);
|
List<OrderVO> getOrderInfoByNXJT(NXJTQueryOrdersInfoDTO dto);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ import com.jsowell.common.util.id.SnowflakeIdWorker;
|
|||||||
import com.jsowell.pile.domain.*;
|
import com.jsowell.pile.domain.*;
|
||||||
import com.jsowell.pile.dto.*;
|
import com.jsowell.pile.dto.*;
|
||||||
import com.jsowell.pile.dto.nanrui.NRQueryOrderDTO;
|
import com.jsowell.pile.dto.nanrui.NRQueryOrderDTO;
|
||||||
|
import com.jsowell.pile.dto.ningxiajiaotou.NXJTQueryOrdersInfoDTO;
|
||||||
import com.jsowell.pile.mapper.OrderBasicInfoMapper;
|
import com.jsowell.pile.mapper.OrderBasicInfoMapper;
|
||||||
import com.jsowell.pile.service.*;
|
import com.jsowell.pile.service.*;
|
||||||
import com.jsowell.pile.service.orderlogic.AbstractOrderLogic;
|
import com.jsowell.pile.service.orderlogic.AbstractOrderLogic;
|
||||||
@@ -3490,7 +3491,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<OrderVO> getOrderInfoByLicensePlateNumber(String licensePlateNumber) {
|
public List<OrderVO> getOrderInfoByNXJT(NXJTQueryOrdersInfoDTO dto) {
|
||||||
return orderBasicInfoMapper.getOrderInfoByLicensePlateNumber(licensePlateNumber);
|
return orderBasicInfoMapper.getOrderInfoByNXJT(dto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package com.jsowell.pile.vo.ningxiajiaotou;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宁夏交投订单VO
|
||||||
|
*
|
||||||
|
* @author Lemon
|
||||||
|
* @Date 2023/11/14 10:50:37
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class NXJTOrderVO {
|
||||||
|
/**
|
||||||
|
* 充电消费时间
|
||||||
|
*/
|
||||||
|
private String chargeTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车牌号码
|
||||||
|
*/
|
||||||
|
private String licensePlateNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站点名称
|
||||||
|
*/
|
||||||
|
private String stationName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单金额
|
||||||
|
*/
|
||||||
|
private BigDecimal orderAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车牌颜色
|
||||||
|
* (1-绿色;2-蓝色)
|
||||||
|
*/
|
||||||
|
private Integer licensePlateNumberColor;
|
||||||
|
}
|
||||||
@@ -74,6 +74,11 @@ public class OrderVO {
|
|||||||
*/
|
*/
|
||||||
private BigDecimal settleAmount;
|
private BigDecimal settleAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车牌号
|
||||||
|
*/
|
||||||
|
private String licensePlateNumber;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单状态
|
* 订单状态
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1217,17 +1217,25 @@
|
|||||||
and t1.pay_mode = '4'
|
and t1.pay_mode = '4'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getOrderInfoByLicensePlateNumber" resultType="com.jsowell.pile.vo.uniapp.OrderVO">
|
<select id="getOrderInfoByNXJT" resultType="com.jsowell.pile.vo.uniapp.OrderVO">
|
||||||
SELECT
|
SELECT
|
||||||
t1.charge_start_time AS startTime,
|
t1.charge_start_time AS startTime,
|
||||||
t1.station_id AS stationId,
|
t1.station_id AS stationId,
|
||||||
t2.station_name AS stationName,
|
t2.station_name AS stationName,
|
||||||
|
t1.plate_number as licensePlateNumber,
|
||||||
t1.order_amount AS orderAmount
|
t1.order_amount AS orderAmount
|
||||||
FROM
|
FROM
|
||||||
order_basic_info t1
|
order_basic_info t1
|
||||||
JOIN pile_station_info t2 ON t1.station_id = t2.id
|
JOIN pile_station_info t2 ON t1.station_id = t2.id
|
||||||
AND t1.del_flag = '0'
|
WHERE t1.del_flag = '0'
|
||||||
where
|
<if test="licensePlateNumber != null and licensePlateNumber != ''">
|
||||||
t1.plate_number = #{licensePlateNumber,jdbcType=VARCHAR}
|
AND t1.plate_number = #{licensePlateNumber,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="startTime != null and startTime != ''">
|
||||||
|
AND t1.create_time <![CDATA[ >= ]]> #{startTime,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime != ''">
|
||||||
|
AND t1.create_time <![CDATA[ <= ]]> #{endTime,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -184,9 +184,7 @@ public class LianLianServiceImpl implements LianLianService {
|
|||||||
.serviceFee(Constants.ZERO)
|
.serviceFee(Constants.ZERO)
|
||||||
.parkFree(Integer.valueOf(pileStationInfo.getParkFree()))
|
.parkFree(Integer.valueOf(pileStationInfo.getParkFree()))
|
||||||
// .ParkFee("2")
|
// .ParkFee("2")
|
||||||
// .payment("线上")
|
|
||||||
.supportOrder(Integer.valueOf(pileStationInfo.getSupportOrder()))
|
.supportOrder(Integer.valueOf(pileStationInfo.getSupportOrder()))
|
||||||
// .equipmentInfos()
|
|
||||||
.parkFeeType(0)
|
.parkFeeType(0)
|
||||||
.toiletFlag(Integer.valueOf(pileStationInfo.getToiletFlag()))
|
.toiletFlag(Integer.valueOf(pileStationInfo.getToiletFlag()))
|
||||||
.storeFlag(Integer.valueOf(pileStationInfo.getStoreFlag()))
|
.storeFlag(Integer.valueOf(pileStationInfo.getStoreFlag()))
|
||||||
|
|||||||
@@ -52,7 +52,14 @@ public interface NXJTService {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询订单信息
|
* 查询某车辆的订单信息
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, String> queryOrdersInfoByPlateNumber(NXJTQueryOrdersInfoDTO dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询指定时间内的订单信息
|
||||||
* @param dto
|
* @param dto
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -3,17 +3,14 @@ package com.jsowell.thirdparty.ningxiajiaotou.service.impl;
|
|||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.jsowell.common.enums.ykc.PileStatusEnum;
|
|
||||||
import com.jsowell.common.util.PageUtils;
|
import com.jsowell.common.util.PageUtils;
|
||||||
import com.jsowell.common.util.StringUtils;
|
|
||||||
import com.jsowell.pile.domain.PileBasicInfo;
|
|
||||||
import com.jsowell.pile.domain.PileStationInfo;
|
import com.jsowell.pile.domain.PileStationInfo;
|
||||||
import com.jsowell.pile.domain.ThirdPartyPlatformConfig;
|
import com.jsowell.pile.domain.ThirdPartyPlatformConfig;
|
||||||
import com.jsowell.pile.dto.ningxiajiaotou.NXJTQueryOrdersInfoDTO;
|
import com.jsowell.pile.dto.ningxiajiaotou.NXJTQueryOrdersInfoDTO;
|
||||||
import com.jsowell.pile.service.*;
|
import com.jsowell.pile.service.*;
|
||||||
import com.jsowell.pile.vo.base.ConnectorInfoVO;
|
import com.jsowell.pile.vo.base.ConnectorInfoVO;
|
||||||
|
import com.jsowell.pile.vo.ningxiajiaotou.NXJTOrderVO;
|
||||||
import com.jsowell.pile.vo.uniapp.OrderVO;
|
import com.jsowell.pile.vo.uniapp.OrderVO;
|
||||||
import com.jsowell.thirdparty.lianlian.domain.StationInfo;
|
|
||||||
import com.jsowell.thirdparty.lianlian.dto.CommonParamsDTO;
|
import com.jsowell.thirdparty.lianlian.dto.CommonParamsDTO;
|
||||||
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
import com.jsowell.thirdparty.lianlian.service.LianLianService;
|
||||||
import com.jsowell.thirdparty.lianlian.util.Cryptos;
|
import com.jsowell.thirdparty.lianlian.util.Cryptos;
|
||||||
@@ -177,7 +174,8 @@ public class NXJTServiceImpl implements NXJTService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Map<String, String> queryOrdersInfo(NXJTQueryOrdersInfoDTO dto) {
|
public Map<String, String> queryOrdersInfoByPlateNumber(NXJTQueryOrdersInfoDTO dto) {
|
||||||
|
List<NXJTOrderVO> resultList = new ArrayList<>();
|
||||||
int pageNo = dto.getPageNo() == null ? 1 : dto.getPageNo();
|
int pageNo = dto.getPageNo() == null ? 1 : dto.getPageNo();
|
||||||
int pageSize = dto.getPageSize() == null ? 10 : dto.getPageSize();
|
int pageSize = dto.getPageSize() == null ? 10 : dto.getPageSize();
|
||||||
|
|
||||||
@@ -188,14 +186,26 @@ public class NXJTServiceImpl implements NXJTService {
|
|||||||
// 分页
|
// 分页
|
||||||
PageUtils.startPage(pageNo, pageSize);
|
PageUtils.startPage(pageNo, pageSize);
|
||||||
// 根据车牌号查询消费情况
|
// 根据车牌号查询消费情况
|
||||||
List<OrderVO> orderVOList = orderBasicInfoService.getOrderInfoByLicensePlateNumber(dto.getLicensePlateNumber());
|
List<OrderVO> orderVOList = orderBasicInfoService.getOrderInfoByNXJT(dto);
|
||||||
PageInfo<OrderVO> pageInfo = new PageInfo<>(orderVOList);
|
PageInfo<OrderVO> pageInfo = new PageInfo<>(orderVOList);
|
||||||
|
List<OrderVO> list = pageInfo.getList();
|
||||||
|
NXJTOrderVO vo;
|
||||||
|
for (OrderVO orderVO : list) {
|
||||||
|
// 拼装成对接平台所需格式
|
||||||
|
vo = new NXJTOrderVO();
|
||||||
|
vo.setLicensePlateNumber(orderVO.getLicensePlateNumber());
|
||||||
|
vo.setOrderAmount(orderVO.getOrderAmount());
|
||||||
|
vo.setChargeTime(orderVO.getChargingTime());
|
||||||
|
vo.setStationName(orderVO.getStationName());
|
||||||
|
vo.setLicensePlateNumberColor(1);
|
||||||
|
|
||||||
|
resultList.add(vo);
|
||||||
|
}
|
||||||
Map<String, Object> map = new LinkedHashMap<>();
|
Map<String, Object> map = new LinkedHashMap<>();
|
||||||
map.put("pageNo", pageInfo.getPageNum());
|
map.put("pageNo", pageInfo.getPageNum());
|
||||||
map.put("pageCount", pageInfo.getPages());
|
map.put("pageCount", pageInfo.getPages());
|
||||||
map.put("itemSize", pageInfo.getList().size());
|
map.put("itemSize", resultList.size());
|
||||||
map.put("orderInfos", pageInfo.getList());
|
map.put("orderInfos", resultList);
|
||||||
|
|
||||||
// 加密
|
// 加密
|
||||||
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
Map<String, String> resultMap = Maps.newLinkedHashMap();
|
||||||
@@ -211,4 +221,16 @@ public class NXJTServiceImpl implements NXJTService {
|
|||||||
|
|
||||||
return resultMap;
|
return resultMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询指定时间内的订单信息
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Map<String, String> queryOrdersInfo(NXJTQueryOrdersInfoDTO dto) {
|
||||||
|
// 由于调用的查询方法、拼装的参数均相同,因此直接调用上面方法
|
||||||
|
// 两个方法仅入参不同
|
||||||
|
return queryOrdersInfoByPlateNumber(dto);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user