|
|
@@ -212,6 +212,45 @@ public interface IotDeviceMapper extends BaseMapperX<IotDeviceDO> {
|
|
|
.inIfPresent(IotDeviceDO::getDeptId, deptIds));
|
|
|
}
|
|
|
|
|
|
+ default PageResult<IotDeviceDO> selectAllTdPage(IotDevicePageReqVO reqVO, Collection<Long> deptIds, List<String> codes) {
|
|
|
+ return selectPage(reqVO, new LambdaQueryWrapperX<IotDeviceDO>()
|
|
|
+// .inIfPresent(IotDeviceDO::getDeviceCode, codes)
|
|
|
+ .likeIfPresent(IotDeviceDO::getDeviceName, reqVO.getDeviceName())
|
|
|
+ .eqIfPresent(IotDeviceDO::getBrand, reqVO.getBrand())
|
|
|
+ .eqIfPresent(IotDeviceDO::getModel, reqVO.getModel())
|
|
|
+ //.eqIfPresent(IotDeviceDO::getOrgId, reqVO.getOrgId())
|
|
|
+ .inIfPresent(IotDeviceDO::getDeptId, deptIds)
|
|
|
+ .eqIfPresent(IotDeviceDO::getDeviceStatus, reqVO.getDeviceStatus())
|
|
|
+ .eqIfPresent(IotDeviceDO::getAssetProperty, reqVO.getAssetProperty())
|
|
|
+ .eqIfPresent(IotDeviceDO::getPicUrl, reqVO.getPicUrl())
|
|
|
+ .eqIfPresent(IotDeviceDO::getRemark, reqVO.getRemark())
|
|
|
+ .eqIfPresent(IotDeviceDO::getManufacturerId, reqVO.getManufacturerId())
|
|
|
+ .eqIfPresent(IotDeviceDO::getSupplierId, reqVO.getSupplierId())
|
|
|
+ .eqIfPresent(IotDeviceDO::getNameplate, reqVO.getNameplate())
|
|
|
+ .eqIfPresent(IotDeviceDO::getExpires, reqVO.getExpires())
|
|
|
+ .eqIfPresent(IotDeviceDO::getPlPrice, reqVO.getPlPrice())
|
|
|
+ //.betweenIfPresent(IotDeviceDO::getPlDate, reqVO.getPlDate())
|
|
|
+ //.betweenIfPresent(IotDeviceDO::getManDate, reqVO.getManDate())
|
|
|
+ .eqIfPresent(IotDeviceDO::getPlYear, reqVO.getPlYear())
|
|
|
+ .betweenIfPresent(IotDeviceDO::getPlStartDate, reqVO.getPlStartDate())
|
|
|
+ .eqIfPresent(IotDeviceDO::getPlMonthed, reqVO.getPlMonthed())
|
|
|
+ .eqIfPresent(IotDeviceDO::getPlAmounted, reqVO.getPlAmounted())
|
|
|
+ .eqIfPresent(IotDeviceDO::getRemainAmount, reqVO.getRemainAmount())
|
|
|
+ .eqIfPresent(IotDeviceDO::getInfoId, reqVO.getInfoId())
|
|
|
+ .eqIfPresent(IotDeviceDO::getInfoType, reqVO.getInfoType())
|
|
|
+ .eqIfPresent(IotDeviceDO::getAssetClass, reqVO.getAssetClass())
|
|
|
+ .likeIfPresent(IotDeviceDO::getInfoName, reqVO.getInfoName())
|
|
|
+ .eqIfPresent(IotDeviceDO::getInfoRemark, reqVO.getInfoRemark())
|
|
|
+ .eqIfPresent(IotDeviceDO::getInfoUrl, reqVO.getInfoUrl())
|
|
|
+ .eqIfPresent(IotDeviceDO::getTemplateJson, reqVO.getTemplateJson())
|
|
|
+ .likeIfPresent(IotDeviceDO::getDeviceCode, reqVO.getDeviceCode())
|
|
|
+ .inIfPresent(IotDeviceDO::getDeviceCode, codes)
|
|
|
+ .eqIfPresent(IotDeviceDO::getBomSyncStatus, reqVO.getBomSyncStatus())
|
|
|
+ .eqIfPresent(IotDeviceDO::getIfInline, reqVO.getIfInline())
|
|
|
+ .isNotNull(IotDeviceDO::getIfInline)
|
|
|
+ .orderByAsc(IotDeviceDO::getIfInline).orderByDesc(IotDeviceDO::getLastInlineTime).orderByAsc(IotDeviceDO::getDeviceCode));
|
|
|
+ }
|
|
|
+
|
|
|
default PageResult<IotDeviceDO> selectTdPage(IotDevicePageReqVO reqVO, Collection<Long> deptIds, List<String> codes) {
|
|
|
return selectPage(reqVO, new LambdaQueryWrapperX<IotDeviceDO>()
|
|
|
// .inIfPresent(IotDeviceDO::getDeviceCode, codes)
|
|
|
@@ -248,14 +287,51 @@ public interface IotDeviceMapper extends BaseMapperX<IotDeviceDO> {
|
|
|
.eqIfPresent(IotDeviceDO::getBomSyncStatus, reqVO.getBomSyncStatus())
|
|
|
.eqIfPresent(IotDeviceDO::getIfInline, reqVO.getIfInline())
|
|
|
.isNotNull(IotDeviceDO::getIfInline)
|
|
|
- .eq(reqVO.getSource() != null && "gateway".equals(reqVO.getSource()),
|
|
|
- IotDeviceDO::getVehicleName, null) // gateway → 为空
|
|
|
- .ne(reqVO.getSource() != null && "zhbd".equals(reqVO.getSource()),
|
|
|
- IotDeviceDO::getVehicleName, null) // 非 gateway → 不为空
|
|
|
+ .isNull(IotDeviceDO::getVehicleName)
|
|
|
.orderByAsc(IotDeviceDO::getIfInline).orderByDesc(IotDeviceDO::getLastInlineTime).orderByAsc(IotDeviceDO::getDeviceCode));
|
|
|
}
|
|
|
|
|
|
|
|
|
+ default PageResult<IotDeviceDO> selectZhbdTdPage(IotDevicePageReqVO reqVO, Collection<Long> deptIds, List<String> codes) {
|
|
|
+ return selectPage(reqVO, new LambdaQueryWrapperX<IotDeviceDO>()
|
|
|
+// .inIfPresent(IotDeviceDO::getDeviceCode, codes)
|
|
|
+ .likeIfPresent(IotDeviceDO::getDeviceName, reqVO.getDeviceName())
|
|
|
+ .eqIfPresent(IotDeviceDO::getBrand, reqVO.getBrand())
|
|
|
+ .eqIfPresent(IotDeviceDO::getModel, reqVO.getModel())
|
|
|
+ //.eqIfPresent(IotDeviceDO::getOrgId, reqVO.getOrgId())
|
|
|
+ .inIfPresent(IotDeviceDO::getDeptId, deptIds)
|
|
|
+ .eqIfPresent(IotDeviceDO::getDeviceStatus, reqVO.getDeviceStatus())
|
|
|
+ .eqIfPresent(IotDeviceDO::getAssetProperty, reqVO.getAssetProperty())
|
|
|
+ .eqIfPresent(IotDeviceDO::getPicUrl, reqVO.getPicUrl())
|
|
|
+ .eqIfPresent(IotDeviceDO::getRemark, reqVO.getRemark())
|
|
|
+ .eqIfPresent(IotDeviceDO::getManufacturerId, reqVO.getManufacturerId())
|
|
|
+ .eqIfPresent(IotDeviceDO::getSupplierId, reqVO.getSupplierId())
|
|
|
+ .eqIfPresent(IotDeviceDO::getNameplate, reqVO.getNameplate())
|
|
|
+ .eqIfPresent(IotDeviceDO::getExpires, reqVO.getExpires())
|
|
|
+ .eqIfPresent(IotDeviceDO::getPlPrice, reqVO.getPlPrice())
|
|
|
+ //.betweenIfPresent(IotDeviceDO::getPlDate, reqVO.getPlDate())
|
|
|
+ //.betweenIfPresent(IotDeviceDO::getManDate, reqVO.getManDate())
|
|
|
+ .eqIfPresent(IotDeviceDO::getPlYear, reqVO.getPlYear())
|
|
|
+ .betweenIfPresent(IotDeviceDO::getPlStartDate, reqVO.getPlStartDate())
|
|
|
+ .eqIfPresent(IotDeviceDO::getPlMonthed, reqVO.getPlMonthed())
|
|
|
+ .eqIfPresent(IotDeviceDO::getPlAmounted, reqVO.getPlAmounted())
|
|
|
+ .eqIfPresent(IotDeviceDO::getRemainAmount, reqVO.getRemainAmount())
|
|
|
+ .eqIfPresent(IotDeviceDO::getInfoId, reqVO.getInfoId())
|
|
|
+ .eqIfPresent(IotDeviceDO::getInfoType, reqVO.getInfoType())
|
|
|
+ .eqIfPresent(IotDeviceDO::getAssetClass, reqVO.getAssetClass())
|
|
|
+ .likeIfPresent(IotDeviceDO::getInfoName, reqVO.getInfoName())
|
|
|
+ .eqIfPresent(IotDeviceDO::getInfoRemark, reqVO.getInfoRemark())
|
|
|
+ .eqIfPresent(IotDeviceDO::getInfoUrl, reqVO.getInfoUrl())
|
|
|
+ .eqIfPresent(IotDeviceDO::getTemplateJson, reqVO.getTemplateJson())
|
|
|
+ .likeIfPresent(IotDeviceDO::getDeviceCode, reqVO.getDeviceCode())
|
|
|
+ .inIfPresent(IotDeviceDO::getDeviceCode, codes)
|
|
|
+ .eqIfPresent(IotDeviceDO::getBomSyncStatus, reqVO.getBomSyncStatus())
|
|
|
+ .eqIfPresent(IotDeviceDO::getIfInline, reqVO.getIfInline())
|
|
|
+ .isNotNull(IotDeviceDO::getIfInline)
|
|
|
+ .isNotNull(IotDeviceDO::getVehicleName)
|
|
|
+ .orderByAsc(IotDeviceDO::getIfInline).orderByDesc(IotDeviceDO::getLastInlineTime).orderByAsc(IotDeviceDO::getDeviceCode));
|
|
|
+ }
|
|
|
+
|
|
|
default PageResult<IotDeviceDO> selectTdPageApp(IotDevicePageReqVO reqVO, Collection<Long> deptIds) {
|
|
|
LambdaQueryWrapper<IotDeviceDO> wrapper = new LambdaQueryWrapper<>();
|
|
|
// wrapper.isNotNull(IotDeviceDO::getIfInline).like(StringUtils.isNotBlank(reqVO.getCommonParam()), IotDeviceDO::getDeviceName, reqVO.getCommonParam())
|