mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
如果查询订单状态只有异常的情况下,排除个人桩的异常订单
This commit is contained in:
@@ -107,4 +107,9 @@ public class QueryOrderDTO extends BaseEntity {
|
||||
* 车牌号
|
||||
*/
|
||||
private String plateNumber;
|
||||
|
||||
/**
|
||||
* 排除的站点Id列表
|
||||
*/
|
||||
private List<Integer> excludeStationIdList;
|
||||
}
|
||||
|
||||
@@ -291,6 +291,7 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
*/
|
||||
@Override
|
||||
public List<OrderListVO> selectOrderBasicInfoList(QueryOrderDTO dto) {
|
||||
excludePersonalPileStation(dto); // 筛选个人桩站点
|
||||
List<OrderListVO> orderListVOS = orderBasicInfoMapper.selectOrderBasicInfoList(dto);
|
||||
if (CollectionUtils.isEmpty(orderListVOS)) {
|
||||
return orderListVOS;
|
||||
@@ -339,6 +340,24 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
||||
return orderListVOS;
|
||||
}
|
||||
|
||||
/**
|
||||
* 如果查询订单状态只有异常的情况下,排除个人桩的异常订单
|
||||
*/
|
||||
private void excludePersonalPileStation(QueryOrderDTO dto) {
|
||||
// 如果orderStatus不等于异常,直接返回
|
||||
if (!OrderStatusEnum.ABNORMAL.getValue().equals(dto.getOrderStatus())) {
|
||||
return;
|
||||
}
|
||||
// 如果dto中除了订单状态还有其他查询条件,则返回
|
||||
if (dto.getMerchantId() != null || dto.getStationId() != null || dto.getOrderCode() != null
|
||||
|| dto.getMobileNumber() != null || dto.getTransactionCode() != null || dto.getPileSn() != null
|
||||
|| dto.getPlateNumber() != null) {
|
||||
return;
|
||||
}
|
||||
// 设置个人桩站id, 148-个人桩站点; 684-7KW小直流个人桩站点
|
||||
dto.setExcludeStationIdList(Lists.newArrayList(148, 684));
|
||||
}
|
||||
|
||||
private void batchQueryFeeAmt(List<OrderListVO> orderListVOS) {
|
||||
// 批量查手续费
|
||||
List<String> orderCodeList = orderListVOS.stream().map(OrderListVO::getOrderCode).collect(Collectors.toList());
|
||||
|
||||
@@ -1988,6 +1988,12 @@
|
||||
#{stationDeptId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="excludeStationIdList != null and excludeStationIdList.size() != 0">
|
||||
and t1.station_id not in
|
||||
<foreach close=")" collection="excludeStationIdList" item="excludeStationId" open="(" separator=",">
|
||||
#{excludeStationId}
|
||||
</foreach>
|
||||
</if>
|
||||
order by t1.create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user