新增 宁夏交投 相关service方法

This commit is contained in:
Lemon
2023-11-14 14:06:50 +08:00
parent 7b0b094211
commit 9d79c635ec
10 changed files with 108 additions and 21 deletions

View File

@@ -184,9 +184,7 @@ public class LianLianServiceImpl implements LianLianService {
.serviceFee(Constants.ZERO)
.parkFree(Integer.valueOf(pileStationInfo.getParkFree()))
// .ParkFee("2")
// .payment("线上")
.supportOrder(Integer.valueOf(pileStationInfo.getSupportOrder()))
// .equipmentInfos()
.parkFeeType(0)
.toiletFlag(Integer.valueOf(pileStationInfo.getToiletFlag()))
.storeFlag(Integer.valueOf(pileStationInfo.getStoreFlag()))

View File

@@ -52,7 +52,14 @@ public interface NXJTService {
/**
* 查询订单信息
* 查询某车辆的订单信息
* @param dto
* @return
*/
Map<String, String> queryOrdersInfoByPlateNumber(NXJTQueryOrdersInfoDTO dto);
/**
* 查询指定时间内的订单信息
* @param dto
* @return
*/

View File

@@ -3,17 +3,14 @@ package com.jsowell.thirdparty.ningxiajiaotou.service.impl;
import com.alibaba.fastjson2.JSONObject;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.Maps;
import com.jsowell.common.enums.ykc.PileStatusEnum;
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.ThirdPartyPlatformConfig;
import com.jsowell.pile.dto.ningxiajiaotou.NXJTQueryOrdersInfoDTO;
import com.jsowell.pile.service.*;
import com.jsowell.pile.vo.base.ConnectorInfoVO;
import com.jsowell.pile.vo.ningxiajiaotou.NXJTOrderVO;
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.service.LianLianService;
import com.jsowell.thirdparty.lianlian.util.Cryptos;
@@ -177,7 +174,8 @@ public class NXJTServiceImpl implements NXJTService {
* @return
*/
@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 pageSize = dto.getPageSize() == null ? 10 : dto.getPageSize();
@@ -188,14 +186,26 @@ public class NXJTServiceImpl implements NXJTService {
// 分页
PageUtils.startPage(pageNo, pageSize);
// 根据车牌号查询消费情况
List<OrderVO> orderVOList = orderBasicInfoService.getOrderInfoByLicensePlateNumber(dto.getLicensePlateNumber());
List<OrderVO> orderVOList = orderBasicInfoService.getOrderInfoByNXJT(dto);
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.put("pageNo", pageInfo.getPageNum());
map.put("pageCount", pageInfo.getPages());
map.put("itemSize", pageInfo.getList().size());
map.put("orderInfos", pageInfo.getList());
map.put("itemSize", resultList.size());
map.put("orderInfos", resultList);
// 加密
Map<String, String> resultMap = Maps.newLinkedHashMap();
@@ -211,4 +221,16 @@ public class NXJTServiceImpl implements NXJTService {
return resultMap;
}
/**
* 查询指定时间内的订单信息
* @param dto
* @return
*/
@Override
public Map<String, String> queryOrdersInfo(NXJTQueryOrdersInfoDTO dto) {
// 由于调用的查询方法、拼装的参数均相同,因此直接调用上面方法
// 两个方法仅入参不同
return queryOrdersInfoByPlateNumber(dto);
}
}