|
@@ -6,10 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.xy.collections.list.JArrayList;
|
|
import com.xy.collections.list.JArrayList;
|
|
-import com.xy.dto.DeviceAlgorithmChargingHistoryDto;
|
|
|
|
-import com.xy.dto.DeviceInfoDto;
|
|
|
|
-import com.xy.dto.MercFeeConfigDto;
|
|
|
|
-import com.xy.dto.OrderMercManageDto;
|
|
|
|
|
|
+import com.xy.dto.*;
|
|
import com.xy.dto.be.MercDto;
|
|
import com.xy.dto.be.MercDto;
|
|
import com.xy.entity.DeviceAlgorithmChargingHistory;
|
|
import com.xy.entity.DeviceAlgorithmChargingHistory;
|
|
import com.xy.mapper.DeviceAlgorithmChargingHistoryMapper;
|
|
import com.xy.mapper.DeviceAlgorithmChargingHistoryMapper;
|
|
@@ -145,19 +142,13 @@ public class DeviceAlgorithmChargingHistoryServiceImpl extends ServiceImpl<Devic
|
|
PageBean<DeviceAlgorithmChargingHistoryDto.MySpendPageVO> voPageBean = toPageBean(DeviceAlgorithmChargingHistoryDto.MySpendPageVO.class, iPage);
|
|
PageBean<DeviceAlgorithmChargingHistoryDto.MySpendPageVO> voPageBean = toPageBean(DeviceAlgorithmChargingHistoryDto.MySpendPageVO.class, iPage);
|
|
List<DeviceAlgorithmChargingHistoryDto.MySpendPageVO> records = voPageBean.getRecords();
|
|
List<DeviceAlgorithmChargingHistoryDto.MySpendPageVO> records = voPageBean.getRecords();
|
|
if (Emptys.check(records)) {
|
|
if (Emptys.check(records)) {
|
|
-
|
|
|
|
-
|
|
|
|
- List<Long> deviceIds = records.stream().map(DeviceAlgorithmChargingHistoryDto.MySpendPageVO::getDeviceId).distinct().collect(Collectors.toList());
|
|
|
|
-
|
|
|
|
- List<DeviceInfoDto.Vo> deviceList = R.feignCheckData(deviceInfoService.listCommon(new DeviceInfoDto.ListCommon().setDeviceIds(deviceIds)));
|
|
|
|
- Map<Long, DeviceInfoDto.Vo> devcieMap = deviceList.stream().collect(Collectors.toMap(DeviceInfoDto.Vo::getDeviceId, d -> d));
|
|
|
|
|
|
+ List<OrderMercManageDto.Vo> orderMercManages = orderMercManageService.list(new OrderMercManageDto.SelectList().setId(new JArrayList<>(records).getProperty(DeviceAlgorithmChargingHistoryDto.MySpendPageVO::getOrderId))).getData();
|
|
copy(records)
|
|
copy(records)
|
|
- .target(() -> orderMercManageService.list(new OrderMercManageDto.SelectList().setId(new JArrayList<>(records).getProperty(DeviceAlgorithmChargingHistoryDto.MySpendPageVO::getOrderId))).getData()
|
|
|
|
- , DeviceAlgorithmChargingHistoryDto.MySpendPageVO::getOrderId, DeviceAlgorithmChargingHistoryDto.MySpendPageVO::getFiles, OrderMercManageDto.Vo::getId, OrderMercManageDto.Vo::getFiles
|
|
|
|
- ).target(() -> mercService.list(new MercDto.SelectList().setMercIds(new JArrayList<>(records).getProperty(DeviceAlgorithmChargingHistoryDto.MySpendPageVO::getMercId).comparing())).getData()
|
|
|
|
|
|
+ .target(() -> orderMercManages, DeviceAlgorithmChargingHistoryDto.MySpendPageVO::getOrderId, DeviceAlgorithmChargingHistoryDto.MySpendPageVO::getFiles, OrderMercManageDto.Vo::getId, OrderMercManageDto.Vo::getFiles)
|
|
|
|
+ .target(() -> orderMercManages, DeviceAlgorithmChargingHistoryDto.MySpendPageVO::getOrderId, DeviceAlgorithmChargingHistoryDto.MySpendPageVO::getBalanceMone, OrderMercManageDto.Vo::getId, OrderMercManageDto.Vo::getBalanceMoney)
|
|
|
|
+ .target(() -> mercService.list(new MercDto.SelectList().setMercIds(new JArrayList<>(records).getProperty(DeviceAlgorithmChargingHistoryDto.MySpendPageVO::getMercId).comparing())).getData()
|
|
, DeviceAlgorithmChargingHistoryDto.MySpendPageVO::getMercId, DeviceAlgorithmChargingHistoryDto.MySpendPageVO::getMercName, MercDto.Vo::getId, MercDto.Vo::getName)
|
|
, DeviceAlgorithmChargingHistoryDto.MySpendPageVO::getMercId, DeviceAlgorithmChargingHistoryDto.MySpendPageVO::getMercName, MercDto.Vo::getId, MercDto.Vo::getName)
|
|
.builder();
|
|
.builder();
|
|
-
|
|
|
|
}
|
|
}
|
|
return R.ok(voPageBean);
|
|
return R.ok(voPageBean);
|
|
|
|
|