fix:完善
This commit is contained in:
parent
c2f303b5fb
commit
dc6ef1a3c4
|
@ -167,8 +167,10 @@ public class SysDatabaseServiceImpl extends ServiceImpl<SysDatabaseMapper, SysDa
|
|||
@Override
|
||||
public List<SourceDto> listAll() {
|
||||
LambdaQueryWrapper<SysDatabase> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.orderByDesc(SysDatabase::getStatus);
|
||||
wrapper.orderByAsc(SysDatabase::getName);
|
||||
List<SourceDto> sourceDtos = new ArrayList<>();
|
||||
for (SysDatabase sysDatabase : list()) {
|
||||
for (SysDatabase sysDatabase : list(wrapper)) {
|
||||
SourceDto sourceDto = new SourceDto();
|
||||
sourceDto.setSourceId(sysDatabase.getId());
|
||||
sourceDto.setSourceName(sysDatabase.getName());
|
||||
|
|
|
@ -158,8 +158,10 @@ public class SysServerServiceImpl extends ServiceImpl<SysServerMapper, SysServer
|
|||
@Override
|
||||
public List<SourceDto> listAll() {
|
||||
LambdaQueryWrapper<SysServer> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.orderByDesc(SysServer::getStatus);
|
||||
wrapper.orderByAsc(SysServer::getName);
|
||||
List<SourceDto> sourceDtos = new ArrayList<>();
|
||||
for (SysServer sysServer : list()) {
|
||||
for (SysServer sysServer : list(wrapper)) {
|
||||
SourceDto sourceDto = new SourceDto();
|
||||
sourceDto.setSourceId(sysServer.getId());
|
||||
sourceDto.setSourceName(sysServer.getName());
|
||||
|
|
|
@ -2,12 +2,15 @@ package org.jeecg.modules.mapper;
|
|||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.base.entity.original.GardsMetData;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@DS("ora")
|
||||
@Mapper
|
||||
public interface StationMetDataMapper extends BaseMapper<GardsMetData> {
|
||||
|
||||
List<GardsMetData> findMetDataList(@Param("stationIds") List<String> stationIds, @Param("startDate") String startDate);
|
||||
|
|
|
@ -2,12 +2,14 @@ package org.jeecg.modules.mapper;
|
|||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.base.entity.original.GardsSampleData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@DS("ora")
|
||||
@Mapper
|
||||
public interface StationSampleDataMapper extends BaseMapper<GardsSampleData> {
|
||||
|
||||
List<GardsSampleData> findSampleDataList(@Param("detectorIds") List<Integer> detectorIds, @Param("startDate") String startDate);
|
||||
|
|
|
@ -2,15 +2,16 @@ package org.jeecg.modules.mapper;
|
|||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.cursor.Cursor;
|
||||
import org.jeecg.modules.base.entity.original.GardsSohData;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@DS("ora")
|
||||
@Mapper
|
||||
public interface StationSohDataMapper extends BaseMapper<GardsSohData> {
|
||||
|
||||
List<GardsSohData> findSohDataList(@Param("stationId") String stationId, @Param("detectorIds") List<Integer> detectorIds, @Param("startDate") String startDate);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
</foreach>
|
||||
</if>
|
||||
<if test=" startDate!=null and startDate!='' ">
|
||||
and MODDATE >= TO_DATE(#{startDate}, 'YYYY-MM-DD hh24:mi:ss')
|
||||
and MODDATE >= TO_DATE('${startDate}', 'YYYY-MM-DD hh24:mi:ss')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY ACQUISITION_STOP
|
||||
|
|
|
@ -19,9 +19,8 @@
|
|||
and STATION_ID = #{stationId}
|
||||
</if>
|
||||
<if test=" startDate!=null and startDate!='' ">
|
||||
and MODDATE >= TO_DATE(#{startDate}, 'YYYY-MM-DD hh24:mi:ss')
|
||||
and MODDATE >= TO_DATE('${startDate}', 'YYYY-MM-DD hh24:mi:ss')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -1,5 +1,6 @@
|
|||
package org.jeecg.modules.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
|
@ -116,6 +117,10 @@ public class StationOperationServiceImpl extends ServiceImpl<StationOperationMap
|
|||
if (StringUtils.isNotBlank(stationType)){
|
||||
result = result.stream().filter(item-> StringUtils.isNotBlank(item.getStationType()) && item.getStationType().equalsIgnoreCase(stationType)).collect(Collectors.toList());
|
||||
}
|
||||
// 根据StationId排序
|
||||
result = result.stream()
|
||||
.sorted(Comparator.comparingInt(StationOperation::getStationId))
|
||||
.collect(Collectors.toList());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -419,6 +424,7 @@ public class StationOperationServiceImpl extends ServiceImpl<StationOperationMap
|
|||
List<GardsSohData> sohDataList = stationSohDataMapper.findSohDataList(stationId, detectorIds, startDateTime);
|
||||
//用于接收当前台站下所有探测器及探测器所有的样品数据,气体数据,状态数据集合
|
||||
List<Map<String, DetectorData>> detectorDataList = new LinkedList<>();
|
||||
|
||||
for (Integer detectorId:detectorIds) {
|
||||
Map<String, DetectorData> detectorMap = new HashMap<>();
|
||||
DetectorData detectorData = new DetectorData();
|
||||
|
@ -432,21 +438,23 @@ public class StationOperationServiceImpl extends ServiceImpl<StationOperationMap
|
|||
for (GardsSampleData sampleData:dataListSample) {
|
||||
DataInfoVo dataInfo = new DataInfoVo();
|
||||
//根据样品数据类型判断 数据类型 根据不同的样品数据状态
|
||||
if (sampleData.getDataType().equals("S")){
|
||||
String dataType = sampleData.getDataType();
|
||||
String spectralQualifie = sampleData.getSpectralQualifie();
|
||||
if (StrUtil.equals(dataType,"S")){
|
||||
dataInfo.setType("PHD");
|
||||
if(sampleData.getStatus() == "PREL") {
|
||||
if (StrUtil.equals(spectralQualifie,"PREL")){
|
||||
dataInfo.setStatus("SPREL");
|
||||
} else {
|
||||
} else if (StrUtil.equals(spectralQualifie,"FULL")) {
|
||||
dataInfo.setStatus("SFULL");
|
||||
}
|
||||
} else if (sampleData.getDataType().equals("Q")){
|
||||
} else if (StrUtil.equals(dataType,"Q")){
|
||||
dataInfo.setType("QC");
|
||||
dataInfo.setStatus("QC");
|
||||
} else if (sampleData.getDataType().equals("G")){
|
||||
} else if (StrUtil.equals(dataType,"G")){
|
||||
dataInfo.setType("PHD");
|
||||
if(sampleData.getStatus() == "PREL") {
|
||||
if (StrUtil.equals(spectralQualifie,"PREL")){
|
||||
dataInfo.setStatus("GPREL");
|
||||
} else {
|
||||
} else if (StrUtil.equals(spectralQualifie,"FULL")) {
|
||||
dataInfo.setStatus("GFULL");
|
||||
}
|
||||
} else {
|
||||
|
@ -506,6 +514,7 @@ public class StationOperationServiceImpl extends ServiceImpl<StationOperationMap
|
|||
detectorMap.put(String.valueOf(detectorId), detectorData);
|
||||
detectorDataList.add(detectorMap);
|
||||
}
|
||||
|
||||
stationMap.put(stationId, detectorDataList);
|
||||
stationData.setStationId(stationId);
|
||||
if (CollectionUtils.isNotEmpty(stationInfoMap)){
|
||||
|
|
Loading…
Reference in New Issue
Block a user