beta功能查询排序

beta功能分析结果数据未赋值问题修改
gamma功能保存用户核素信息后重新缓存核素信息
This commit is contained in:
qiaoqinzheng 2023-11-06 10:57:02 +08:00
parent f3406eaae0
commit f923485118
4 changed files with 839 additions and 812 deletions

View File

@ -20,7 +20,7 @@ public interface SpectrumAnalysisMapper {
List<GardsSampleDataSpectrum> getDBSearchList(String dbName, List<String> stationTypes, List<String> userStations, boolean AllUsers);
Page<GardsSampleDataSpectrum> getDBSpectrumList(IPage<GardsSampleDataSpectrum> page, GardsSampleDataSpectrum gardsSampleData, String dbName, List<String> stationTypes, boolean CollectStopB, boolean AcqStartB, String startTime, String endTime, List<String> userStations, boolean AllUsers);
Page<GardsSampleDataSpectrum> getDBSpectrumList(IPage<GardsSampleDataSpectrum> page, GardsSampleDataSpectrum gardsSampleData, String dbName, List<String> stationTypes, boolean CollectStopB, boolean AcqStartB, String startTime, String endTime, List<String> userStations, boolean AllUsers, String orderField, String orderType);
SpectrumFileRecord getDBSpectrumFilePath(String dbName, Integer sampleId, Integer analysisID);

View File

@ -32,19 +32,19 @@
</select>
<select id="getDBSpectrumList" resultType="org.jeecg.modules.entity.GardsSampleDataSpectrum">
select c.sample_id,
select c.sample_id sampleId,
b.station_code stationName,
a.detector_code detectorsName,
c.sample_type,
c.data_type,
c.spectral_qualifie,
c.collect_stop,
c.acquisition_start,
c.acquisition_real_sec,
c.acquisition_live_sec,
d.analyst,
c.status,
c.input_file_name
c.sample_type sampleType,
c.data_type dataType,
c.spectral_qualifie spectralQualifie,
c.collect_stop collectStop,
c.acquisition_start acquisitionStart,
c.acquisition_real_sec acquisitionRealSec,
c.acquisition_live_sec acquisitionLiveSec,
d.analyst analyst,
c.status status,
c.input_file_name inputFileName
from
CONFIGURATION.GARDS_DETECTORS a,
CONFIGURATION.GARDS_STATIONS b,
@ -97,7 +97,12 @@
</if>
</if>
</where>
ORDER BY c.collect_stop DESC
<if test=" orderField != 'createTime' and orderField != '' and orderField != null and orderType != '' and orderType != null ">
ORDER BY ${orderField} ${orderType}
</if>
<if test=" orderField == 'createTime' or orderField == '' or orderField == null or orderType == '' or orderType == null ">
ORDER BY collectStop DESC
</if>
</select>
<select id="getXeDataList" resultType="org.jeecg.modules.entity.GardsXeResultsSpectrum">
@ -182,7 +187,6 @@
<where>
SAMPLE_ID = #{sampleId}
</where>
</select>
<select id="findSampleByFilePath" resultType="org.jeecg.modules.entity.GardsSampleDataSpectrum">
@ -211,7 +215,6 @@
<where>
INPUT_FILE_NAME = #{filePath}
</where>
</select>
<select id="getDetectorList" resultType="org.jeecg.modules.base.entity.configuration.GardsDetectors">

View File

@ -3568,6 +3568,15 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
boolean save = defaultNuclideSpectrumService.saveNuclidesByUserName(userLibraryName, userName, phd.getHeader().getSystem_type().toUpperCase());
if (save) {
result.success("Modified successfully");
// 查询当前用户关联的核素信息
List<String> userLib = new LinkedList<>();
// 从postgreSql中获取当前用户关注的核素信息 如果当前用户没有 则返回管理员的
userLib = defaultNuclideSpectrumService.findNuclidesByUserName(userName, phd.getHeader().getSystem_type().toUpperCase());
if (CollectionUtils.isEmpty(userLib)) {
userLib = defaultNuclideSpectrumService.findNuclidesByUserName("admin", phd.getHeader().getSystem_type().toUpperCase());
}
Map<String, NuclideLines> nuclideMap = GetNuclideLines(userLib);
redisUtil.set(fileName+"-"+userName, nuclideMap);
} else {
result.success("Modification failure");
}