|
@@ -6,7 +6,6 @@ import cn.hutool.core.collection.ListUtil;
|
|
|
import cn.hutool.core.date.DatePattern;
|
|
|
import cn.hutool.core.date.DateTime;
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
-import cn.hutool.core.lang.Console;
|
|
|
import cn.hutool.core.map.MapUtil;
|
|
|
import cn.hutool.core.text.StrBuilder;
|
|
|
import cn.hutool.core.util.BooleanUtil;
|
|
@@ -22,7 +21,6 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.xy.collections.list.JArrayList;
|
|
|
import com.xy.collections.list.JList;
|
|
|
-import com.xy.collections.map.JHashMap;
|
|
|
import com.xy.collections.map.JMap;
|
|
|
import com.xy.config.DeviceThreadPoolConfig;
|
|
|
import com.xy.consts.DictConsts;
|
|
@@ -85,14 +83,14 @@ import static com.xy.utils.PlusBeans.*;
|
|
|
@Api(tags = "设备-信息")
|
|
|
public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceInfo> implements DeviceInfoService {
|
|
|
|
|
|
- private final CloudWalkApiService cloudWalkApiService;
|
|
|
- private final AlgorithmService algorithmService;
|
|
|
- private final CountApiService countApiService;
|
|
|
- private final TyApiService tyApiService;
|
|
|
/**
|
|
|
* 质检商户code
|
|
|
*/
|
|
|
public static final String QA_MERC_CODE = "10001";
|
|
|
+ private final CloudWalkApiService cloudWalkApiService;
|
|
|
+ private final AlgorithmService algorithmService;
|
|
|
+ private final CountApiService countApiService;
|
|
|
+ private final TyApiService tyApiService;
|
|
|
private final MercFeignService mercFeignService;
|
|
|
private final DeviceSysinfoServiceImpl deviceSysinfoService;
|
|
|
private final DeviceStatusServiceImpl deviceStatusService;
|
|
@@ -1340,6 +1338,23 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
|
return list(Wrappers.<DeviceInfo>lambdaQuery().eq(DeviceInfo::getMercId, mercId).eq(DeviceInfo::getActiveState, DeviceActiveStateEnum.TRUE.getCode()));
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ @ApiOperation("通用商户设备搜索组件")
|
|
|
+ public R<PageBean<DeviceInfoDto.SimpleDeviceSearchPageVo>> simpleDeviceSearchPage(@RequestBody DeviceInfoDto.SimpleDeviceSearchPageDto dto) {
|
|
|
+ LambdaQueryWrapper<DeviceInfo> lqw = new LambdaQueryWrapper<DeviceInfo>()
|
|
|
+ .select(DeviceInfo::getDeviceId, DeviceInfo::getDeviceName)
|
|
|
+ .and(Emptys.check(dto.getSearchKey()), wrapper -> {
|
|
|
+ wrapper.like(DeviceInfo::getDeviceId, dto.getSearchKey())
|
|
|
+ .or()
|
|
|
+ .like(DeviceInfo::getDeviceName, dto.getSearchKey());
|
|
|
+ })
|
|
|
+ .in(Emptys.check(dto.getMyDeviceIds()), DeviceInfo::getDeviceId, dto.getMyDeviceIds())
|
|
|
+ .eq(DeviceInfo::getActiveState, DeviceActiveStateEnum.TRUE.getCode())
|
|
|
+ .eq(Emptys.check(dto.getMercId()), DeviceInfo::getMercId, dto.getMercId());
|
|
|
+ IPage page = page(toIPage(dto.getPage()), lqw);
|
|
|
+ PageBean<DeviceInfoDto.SimpleDeviceSearchPageVo> simpleDeviceSearchPageVoPageBean = toPageBean(DeviceInfoDto.SimpleDeviceSearchPageVo.class, page);
|
|
|
+ return R.ok(simpleDeviceSearchPageVoPageBean);
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 小程序商户设备搜索
|