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