|
@@ -28,6 +28,7 @@ import com.xy.device.*;
|
|
|
import com.xy.dto.*;
|
|
|
import com.xy.dto.api.biz.ContainerAddDTO;
|
|
|
import com.xy.dto.be.MercDto;
|
|
|
+import com.xy.dto.common.MercPlaceDto;
|
|
|
import com.xy.dto.common.MercRegionDto;
|
|
|
import com.xy.entity.*;
|
|
|
import com.xy.enums.FileExportType;
|
|
@@ -35,6 +36,7 @@ import com.xy.error.CommRuntimeException;
|
|
|
import com.xy.mapper.DeviceInfoMapper;
|
|
|
import com.xy.mapper.entity.DeviceInfoQueryPage;
|
|
|
import com.xy.service.be.MercFeignService;
|
|
|
+import com.xy.service.common.MercPlaceService;
|
|
|
import com.xy.service.common.MercRegionService;
|
|
|
import com.xy.sys.EnumDataClearSize;
|
|
|
import com.xy.util.ExcelUtils;
|
|
@@ -105,6 +107,8 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
|
|
|
private final DeviceAlgorithmChargingServiceImpl deviceAlgorithmChargingService;
|
|
|
|
|
|
+ private final MercPlaceService mercPlaceService;
|
|
|
+
|
|
|
@PostMapping("eventList")
|
|
|
@ApiOperation("根据事件编码查询设备")
|
|
|
public R<PageBean<DeviceInfoDto.EventListVo>> eventList(@RequestBody @Validated DeviceInfoDto.EventList eventList) {
|
|
@@ -774,6 +778,14 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
Long mercId = dto.getMercId();
|
|
|
String deviceName = dto.getDeviceName();
|
|
|
Long deviceId = dto.getDeviceId();
|
|
|
+ //根据管理员名字查询点位ID列表
|
|
|
+ MercPlaceDto.ListDto placeDto = new MercPlaceDto.ListDto();
|
|
|
+ placeDto.setMercId(mercId).setAdminName(dto.getAdminName());
|
|
|
+ List<Long> placeIdList = new ArrayList<>();
|
|
|
+ List<MercPlaceDto.Vo> placeList = mercPlaceService.list(placeDto).getData();
|
|
|
+ if(Emptys.check(placeList)){
|
|
|
+ placeIdList = placeList.stream().map(MercPlaceDto.Vo::getId).distinct().collect(Collectors.toList());
|
|
|
+ }
|
|
|
boolean isQa = false;
|
|
|
if ("393010594508869".equals(String.valueOf(mercId))) {
|
|
|
isQa = true;
|
|
@@ -785,6 +797,7 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
//名称或者编号搜索设备
|
|
|
List<DeviceInfo> list = list(Wrappers.<DeviceInfo>lambdaQuery()
|
|
|
.eq(DeviceInfo::getMercId, mercId)
|
|
|
+ .in(Emptys.check(placeIdList),DeviceInfo::getPlaceId,placeList)
|
|
|
.and(wrapper -> wrapper
|
|
|
.eq(DeviceInfo::getDeviceId, searchKey)
|
|
|
.or()
|