fix: 设备绑定记录,设备管理,联动控制等,设备编号支持模糊查询。
This commit is contained in:
@@ -95,7 +95,7 @@ public class DeviceBindRecordServiceImpl implements IDeviceBindRecordService {
|
|||||||
// 基础查询条件
|
// 基础查询条件
|
||||||
wrapper.like(StringUtils.isNotBlank(bo.getIotId()), DeviceBindRecord::getIotId, bo.getIotId());
|
wrapper.like(StringUtils.isNotBlank(bo.getIotId()), DeviceBindRecord::getIotId, bo.getIotId());
|
||||||
wrapper.eq(bo.getDeviceType() != null, DeviceBindRecord::getDeviceType, bo.getDeviceType());
|
wrapper.eq(bo.getDeviceType() != null, DeviceBindRecord::getDeviceType, bo.getDeviceType());
|
||||||
wrapper.eq(StringUtils.isNotBlank(bo.getSerialNum()), DeviceBindRecord::getSerialNum, bo.getSerialNum());
|
wrapper.like(StringUtils.isNotBlank(bo.getSerialNum()), DeviceBindRecord::getSerialNum, bo.getSerialNum());
|
||||||
wrapper.eq(bo.getUserId() != null, DeviceBindRecord::getUserId, bo.getUserId());
|
wrapper.eq(bo.getUserId() != null, DeviceBindRecord::getUserId, bo.getUserId());
|
||||||
wrapper.eq(bo.getIsBind() != null, DeviceBindRecord::getIsBind, bo.getIsBind());
|
wrapper.eq(bo.getIsBind() != null, DeviceBindRecord::getIsBind, bo.getIsBind());
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ public class DeviceCorrectRecordServiceImpl implements IDeviceCorrectRecordServi
|
|||||||
// 查询条件
|
// 查询条件
|
||||||
wrapper.eq(bo.getDeviceId() != null, DeviceCorrectRecord::getDeviceId, bo.getDeviceId())
|
wrapper.eq(bo.getDeviceId() != null, DeviceCorrectRecord::getDeviceId, bo.getDeviceId())
|
||||||
.eq(bo.getUserId() != null, DeviceCorrectRecord::getUserId, bo.getUserId())
|
.eq(bo.getUserId() != null, DeviceCorrectRecord::getUserId, bo.getUserId())
|
||||||
.eq(StringUtils.isNotBlank(bo.getSerialNum()), DeviceCorrectRecord::getSerialNum, bo.getSerialNum())
|
.like(StringUtils.isNotBlank(bo.getSerialNum()), DeviceCorrectRecord::getSerialNum, bo.getSerialNum())
|
||||||
.eq(bo.getDeviceType() != null, DeviceCorrectRecord::getDeviceType, bo.getDeviceType())
|
.eq(bo.getDeviceType() != null, DeviceCorrectRecord::getDeviceType, bo.getDeviceType())
|
||||||
.eq(bo.getValueDissolvedOxygen() != null, DeviceCorrectRecord::getValueDissolvedOxygen, bo.getValueDissolvedOxygen())
|
.eq(bo.getValueDissolvedOxygen() != null, DeviceCorrectRecord::getValueDissolvedOxygen, bo.getValueDissolvedOxygen())
|
||||||
.eq(bo.getValueTemperature() != null, DeviceCorrectRecord::getValueTemperature, bo.getValueTemperature())
|
.eq(bo.getValueTemperature() != null, DeviceCorrectRecord::getValueTemperature, bo.getValueTemperature())
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ public class DeviceServiceImpl implements IDeviceService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
wrapper.eq(bo.getUserId() != null, Device::getUserId, bo.getUserId());
|
wrapper.eq(bo.getUserId() != null, Device::getUserId, bo.getUserId());
|
||||||
wrapper.eq(StringUtils.isNotBlank(bo.getSerialNum()), Device::getSerialNum, bo.getSerialNum());
|
wrapper.like(StringUtils.isNotBlank(bo.getSerialNum()), Device::getSerialNum, bo.getSerialNum());
|
||||||
wrapper.like(StringUtils.isNotBlank(bo.getDeviceName()), Device::getDeviceName, bo.getDeviceName());
|
wrapper.like(StringUtils.isNotBlank(bo.getDeviceName()), Device::getDeviceName, bo.getDeviceName());
|
||||||
wrapper.eq(bo.getDeviceType() != null, Device::getDeviceType, bo.getDeviceType());
|
wrapper.eq(bo.getDeviceType() != null, Device::getDeviceType, bo.getDeviceType());
|
||||||
wrapper.eq(bo.getBindTime() != null, Device::getBindTime, bo.getBindTime());
|
wrapper.eq(bo.getBindTime() != null, Device::getBindTime, bo.getBindTime());
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ public class DeviceWarnCombineServiceImpl implements IDeviceWarnCombineService {
|
|||||||
.selectAll(DeviceWarnCombine.class)
|
.selectAll(DeviceWarnCombine.class)
|
||||||
.selectCount(DeviceWarnOne::getId, DeviceWarnCombineVo::getTotalCount)
|
.selectCount(DeviceWarnOne::getId, DeviceWarnCombineVo::getTotalCount)
|
||||||
.leftJoin(DeviceWarnOne.class, DeviceWarnOne::getWarnCombineId, DeviceWarnCombine::getId)
|
.leftJoin(DeviceWarnOne.class, DeviceWarnOne::getWarnCombineId, DeviceWarnCombine::getId)
|
||||||
.eq(StringUtils.isNotBlank(bo.getDeviceSerialNum()), DeviceWarnCombine::getDeviceSerialNum, bo.getDeviceSerialNum())
|
.like(StringUtils.isNotBlank(bo.getDeviceSerialNum()), DeviceWarnCombine::getDeviceSerialNum, bo.getDeviceSerialNum())
|
||||||
.eq(bo.getDeviceType() != null, DeviceWarnCombine::getDeviceType, bo.getDeviceType())
|
.eq(bo.getDeviceType() != null, DeviceWarnCombine::getDeviceType, bo.getDeviceType())
|
||||||
.eq(bo.getThresholdType() != null, DeviceWarnCombine::getThresholdType, bo.getThresholdType())
|
.eq(bo.getThresholdType() != null, DeviceWarnCombine::getThresholdType, bo.getThresholdType())
|
||||||
.eq(bo.getProcessStatus() != null, DeviceWarnCombine::getProcessStatus, bo.getProcessStatus())
|
.eq(bo.getProcessStatus() != null, DeviceWarnCombine::getProcessStatus, bo.getProcessStatus())
|
||||||
|
|||||||
@@ -154,6 +154,10 @@ public class LinkedCtrlServiceImpl implements ILinkedCtrlService {
|
|||||||
.eq(bo.getOxyUpperOpen() != null, LinkedCtrl::getOxyUpperOpen, bo.getOxyUpperOpen())
|
.eq(bo.getOxyUpperOpen() != null, LinkedCtrl::getOxyUpperOpen, bo.getOxyUpperOpen())
|
||||||
.eq(bo.getOxyLowerOpen() != null, LinkedCtrl::getOxyLowerOpen, bo.getOxyLowerOpen())
|
.eq(bo.getOxyLowerOpen() != null, LinkedCtrl::getOxyLowerOpen, bo.getOxyLowerOpen())
|
||||||
.eq(bo.getIsOxyUpperTrigger() != null, LinkedCtrl::getIsOxyUpperTrigger, bo.getIsOxyUpperTrigger());
|
.eq(bo.getIsOxyUpperTrigger() != null, LinkedCtrl::getIsOxyUpperTrigger, bo.getIsOxyUpperTrigger());
|
||||||
|
// 处理额外的查询参数
|
||||||
|
if (params != null && !params.isEmpty()) {
|
||||||
|
handleExtraParams(wrapper, params);
|
||||||
|
}
|
||||||
return wrapper;
|
return wrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user