|
@@ -1,5 +1,6 @@
|
|
|
package cn.iocoder.yudao.module.pms.dal.mysql;
|
|
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
|
import cn.iocoder.yudao.framework.common.pojo.SortablePageParam;
|
|
|
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
|
@@ -105,6 +106,42 @@ public interface IotDeviceMapper extends BaseMapperX<IotDeviceDO> {
|
|
|
.eqIfPresent(IotDeviceDO::getBomSyncStatus, reqVO.getBomSyncStatus()));
|
|
|
}
|
|
|
|
|
|
+ default List<IotDeviceDO> selectListAlone(IotDevicePageReqVO reqVO) {
|
|
|
+ LambdaQueryWrapperX<IotDeviceDO> queryWrapper = new LambdaQueryWrapperX<>();
|
|
|
+ queryWrapper
|
|
|
+ .inIfPresent(IotDeviceDO::getDeptId, reqVO.getDeviceIds())
|
|
|
+ .eqIfPresent(IotDeviceDO::getBrand, reqVO.getBrand())
|
|
|
+ .eqIfPresent(IotDeviceDO::getModel, reqVO.getModel())
|
|
|
+ .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())
|
|
|
+ .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())
|
|
|
+ .eqIfPresent(IotDeviceDO::getBomSyncStatus, reqVO.getBomSyncStatus());
|
|
|
+ if (StrUtil.isNotBlank(reqVO.getDeviceName())) {
|
|
|
+ queryWrapper.and(i -> i.like(IotDeviceDO::getDeviceName, reqVO.getDeviceName())
|
|
|
+ .or()
|
|
|
+ .like(IotDeviceDO::getDeviceCode, reqVO.getDeviceName()));
|
|
|
+ }
|
|
|
+ return selectList(queryWrapper);
|
|
|
+ }
|
|
|
+
|
|
|
default List<IotDeviceDO> selectDataCollect() {
|
|
|
return selectList(new LambdaQueryWrapperX<IotDeviceDO>()
|
|
|
.isNotNull(IotDeviceDO::getYfDeviceId));
|