|
@@ -1,10 +1,13 @@
|
|
|
|
|
|
package com.dskj.znzn.transData.web.waveData.service.impl;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.dskj.znzn.transData.common.base.PageR;
|
|
|
import com.dskj.znzn.transData.common.exception.BusinessException;
|
|
|
import com.dskj.znzn.transData.web.waveData.entity.WaveData;
|
|
|
import com.dskj.znzn.transData.web.waveData.indata.GetMesureDataInData;
|
|
|
+import com.dskj.znzn.transData.web.waveData.indata.GetMesureWithSFDataInData;
|
|
|
import com.dskj.znzn.transData.web.waveData.mapper.WaveDataMapper;
|
|
|
import com.dskj.znzn.transData.web.waveData.service.IWaveDataService;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
@@ -34,4 +37,27 @@ public class WaveDataServiceImpl extends ServiceImpl<WaveDataMapper, WaveData> i
|
|
|
return this.waveDataMapper.getById(windCode + "_wave", id);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public PageR<WaveData> getMesureDataWithSF(GetMesureWithSFDataInData inData) {
|
|
|
+ if (inData.getWindCode().contains(" ")) {
|
|
|
+ throw new BusinessException("风场参数异常");
|
|
|
+ } else {
|
|
|
+ Page<WaveData> queryPage = Page.of(inData.getPageNo(), inData.getPageSize());
|
|
|
+ inData.setWindCode(inData.getWindCode() + "_wave");
|
|
|
+ Page<WaveData> pageData = this.waveDataMapper.getMesureDataWithSF(queryPage, inData);
|
|
|
+ return PageR.page(pageData);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<String> getAllSamplingFrequency(String windCode) {
|
|
|
+
|
|
|
+ if (windCode.contains(" ")) {
|
|
|
+ throw new BusinessException("风场参数异常");
|
|
|
+ } else {
|
|
|
+ windCode = windCode + "_wave";
|
|
|
+ return waveDataMapper.getAllSamplingFrequency(windCode);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|