2024-07-08 17:47:02 +08:00
|
|
|
package com.gunshi.project.xyt.service;
|
|
|
|
|
|
2024-07-10 09:27:20 +08:00
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
2024-07-08 17:47:02 +08:00
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
2024-07-10 09:27:20 +08:00
|
|
|
import com.gunshi.project.xyt.entity.so.OsmoticQueryPageSo;
|
2024-07-08 17:47:02 +08:00
|
|
|
import com.gunshi.project.xyt.mapper.OsmoticShiftRMapper;
|
|
|
|
|
import com.gunshi.project.xyt.model.OsmoticShiftR;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 描述: 位移监测记录表
|
|
|
|
|
* author: xusan
|
|
|
|
|
* date: 2024-07-08 17:30:37
|
|
|
|
|
*/
|
|
|
|
|
@Service
|
|
|
|
|
@Slf4j
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public class OsmoticShiftRService extends ServiceImpl<OsmoticShiftRMapper, OsmoticShiftR>
|
|
|
|
|
{
|
|
|
|
|
|
2024-07-10 09:27:20 +08:00
|
|
|
public Page<OsmoticShiftR> queryPage(OsmoticQueryPageSo osmoticQueryPageSo) {
|
|
|
|
|
LambdaQueryWrapper<OsmoticShiftR> wrapper = Wrappers.lambdaQuery();
|
|
|
|
|
if(osmoticQueryPageSo.getDateTimeRangeSo() != null && osmoticQueryPageSo.getDateTimeRangeSo().getStart() != null){
|
|
|
|
|
wrapper.ge(OsmoticShiftR::getTm,osmoticQueryPageSo.getDateTimeRangeSo().getStart());
|
|
|
|
|
}
|
|
|
|
|
if(osmoticQueryPageSo.getDateTimeRangeSo() != null && osmoticQueryPageSo.getDateTimeRangeSo().getEnd() != null){
|
|
|
|
|
wrapper.le(OsmoticShiftR::getTm,osmoticQueryPageSo.getDateTimeRangeSo().getEnd());
|
|
|
|
|
}
|
|
|
|
|
if(StringUtils.isNotEmpty(osmoticQueryPageSo.getStationCode())){
|
|
|
|
|
wrapper.eq(OsmoticShiftR::getStationCode,osmoticQueryPageSo.getStationCode());
|
|
|
|
|
}
|
|
|
|
|
wrapper.orderByDesc(OsmoticShiftR::getTm);
|
|
|
|
|
return this.page(osmoticQueryPageSo.getPageSo().toPage(),wrapper);
|
|
|
|
|
}
|
2024-07-08 17:47:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|