|
@@ -17,6 +17,7 @@ import jakarta.annotation.PostConstruct;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
+import java.util.Collections;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
@@ -101,6 +102,9 @@ public class WashStationServiceImpl extends MyBaseServiceImpl<WashStationMapper,
|
|
|
.eq(CommUtil.isNotEmptyAndNull(params.getStationId()), WashStation::getStationId, params.getStationId())
|
|
.eq(CommUtil.isNotEmptyAndNull(params.getStationId()), WashStation::getStationId, params.getStationId())
|
|
|
.like(CommUtil.isNotEmptyAndNull(params.getStationName()), WashStation::getStationName, params.getStationName())
|
|
.like(CommUtil.isNotEmptyAndNull(params.getStationName()), WashStation::getStationName, params.getStationName())
|
|
|
.list();
|
|
.list();
|
|
|
|
|
+ if (stationList.isEmpty()) {
|
|
|
|
|
+ return new PageBean<>(Collections.emptyList());
|
|
|
|
|
+ }
|
|
|
// 查询站点下的所有设备,按照站点统计可用设备数量
|
|
// 查询站点下的所有设备,按照站点统计可用设备数量
|
|
|
var res = washDeviceService.lambdaQuery().in(WashDevice::getStationId, stationList.stream().map(WashStation::getStationId).toList())
|
|
var res = washDeviceService.lambdaQuery().in(WashDevice::getStationId, stationList.stream().map(WashStation::getStationId).toList())
|
|
|
.eq(WashDevice::getState, WashDevice.STATE_空闲)
|
|
.eq(WashDevice::getState, WashDevice.STATE_空闲)
|