|
|
@ -11,14 +11,14 @@ import com.ruoyi.code.camera.service.IWaterPhotoInfoService; |
|
|
|
import com.ruoyi.code.sctaationinfo.domain.ScStationInfo; |
|
|
|
import com.ruoyi.code.sctaationinfo.domain.ScStationInfo; |
|
|
|
import com.ruoyi.code.sctaationinfo.service.IScStationInfoService; |
|
|
|
import com.ruoyi.code.sctaationinfo.service.IScStationInfoService; |
|
|
|
import com.ruoyi.common.core.page.R; |
|
|
|
import com.ruoyi.common.core.page.R; |
|
|
|
|
|
|
|
import com.ruoyi.common.exception.RYException; |
|
|
|
|
|
|
|
import com.ruoyi.common.utils.DateUtils; |
|
|
|
import com.ruoyi.common.utils.Query; |
|
|
|
import com.ruoyi.common.utils.Query; |
|
|
|
|
|
|
|
import com.ruoyi.common.utils.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.*; |
|
|
|
import java.util.HashMap; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Service业务层处理 |
|
|
|
* Service业务层处理 |
|
|
@ -35,6 +35,16 @@ public class WaterPhotoInfoServiceImpl extends ServiceImpl<WaterPhotoInfoMapper, |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public R queryPage(Map<String, Object> params) { |
|
|
|
public R queryPage(Map<String, Object> params) { |
|
|
|
|
|
|
|
String startTime = (String) params.get("startTime"); |
|
|
|
|
|
|
|
String endTime = (String) params.get("endTime"); |
|
|
|
|
|
|
|
if(StringUtils.isBlank(startTime) || StringUtils.isBlank(endTime)){ |
|
|
|
|
|
|
|
throw new RYException("开始结束时间不能为空"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Date start = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS,startTime); |
|
|
|
|
|
|
|
Date end = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS,endTime); |
|
|
|
|
|
|
|
if(end.getTime() - start.getTime() >= 1000*60*60*24*7 ){ |
|
|
|
|
|
|
|
throw new RYException("时间跨度不能大于七天"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
IPage<WaterPhotoInfo> page = baseMapper.queryPhotoList( |
|
|
|
IPage<WaterPhotoInfo> page = baseMapper.queryPhotoList( |
|
|
|
new Query<WaterPhotoInfo>().getPage(params), |
|
|
|
new Query<WaterPhotoInfo>().getPage(params), |
|
|
|