mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 19:15:35 +08:00
update 后管页面查询引流抽成订单列表接口增加分页返回值
This commit is contained in:
@@ -106,6 +106,6 @@ public interface OrderSplitRecordService {
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
List<OrderSplitRecordVO> getStationCommissionList(QueryOrderSplitRecordDTO dto);
|
||||
PageResponse getStationCommissionList(QueryOrderSplitRecordDTO dto);
|
||||
}
|
||||
|
||||
|
||||
@@ -568,21 +568,30 @@ public class OrderSplitRecordServiceImpl implements OrderSplitRecordService {
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<OrderSplitRecordVO> getStationCommissionList(QueryOrderSplitRecordDTO dto) {
|
||||
public PageResponse getStationCommissionList(QueryOrderSplitRecordDTO dto) {
|
||||
int pageNo = dto.getPageNum() == null ? 1 : dto.getPageNum();
|
||||
int pageSize = dto.getPageSize() == null ? 10 : dto.getPageSize();
|
||||
// 分页
|
||||
PageUtils.startPage(pageNo, pageSize);
|
||||
List<OrderSplitRecordVO> stationCommissionList = orderSplitRecordMapper.getStationCommissionList(dto);
|
||||
if (CollectionUtils.isEmpty(stationCommissionList)) {
|
||||
return new ArrayList<>();
|
||||
return null;
|
||||
}
|
||||
for (OrderSplitRecordVO orderSplitRecordVO : stationCommissionList) {
|
||||
PageInfo<OrderSplitRecordVO> pageInfo = new PageInfo<>(stationCommissionList);
|
||||
for (OrderSplitRecordVO orderSplitRecordVO : pageInfo.getList()) {
|
||||
// 计算 抽成总金额 = 抽成电费 + 抽成服务费
|
||||
BigDecimal commissionAmount = orderSplitRecordVO.getElectricitySplitAmount().add(orderSplitRecordVO.getServiceSplitAmount());
|
||||
orderSplitRecordVO.setCommissionAmount(commissionAmount);
|
||||
}
|
||||
return stationCommissionList;
|
||||
// 组装分页返回参数
|
||||
PageResponse pageResponse = PageResponse.builder()
|
||||
.pageSize(pageSize)
|
||||
.pageNum(pageNo)
|
||||
.list(pageInfo.getList())
|
||||
.pages(pageInfo.getPages())
|
||||
.total(pageInfo.getTotal())
|
||||
.build();
|
||||
return pageResponse;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -195,6 +195,10 @@ public class PileStationInfoServiceImpl implements PileStationInfoService {
|
||||
if (StringUtils.isNotBlank(pileStationInfo.getMatchCars())) {
|
||||
vo.setSelectMatchCars(Lists.newArrayList(pileStationInfo.getMatchCars().split(",")));
|
||||
}
|
||||
// 支持服务费率
|
||||
if (StringUtils.isNotBlank(String.valueOf(pileStationInfo.getServiceRate()))) {
|
||||
vo.setServiceRate(pileStationInfo.getServiceRate());
|
||||
}
|
||||
|
||||
// 数据库保存的是GCJ02坐标,需要转换成天地图使用的WGS84坐标
|
||||
if (StringUtils.isNotBlank(pileStationInfo.getStationLat()) && StringUtils.isNotBlank(pileStationInfo.getStationLng())) {
|
||||
|
||||
@@ -288,4 +288,9 @@ public class PileStationVO {
|
||||
*/
|
||||
private String parkingLockFlag;
|
||||
|
||||
/**
|
||||
* 支持服务费率
|
||||
*/
|
||||
private BigDecimal serviceRate;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user