fix:findAutoPage增加参数sampleType
This commit is contained in:
parent
630bc4ee4f
commit
cc3c056bcf
|
@ -24,10 +24,11 @@ public class RadionuclideController {
|
||||||
|
|
||||||
@GetMapping("findAutoPage")
|
@GetMapping("findAutoPage")
|
||||||
@ApiOperation(value = "分页查询自动处理结果", notes = "分页查询自动处理结果")
|
@ApiOperation(value = "分页查询自动处理结果", notes = "分页查询自动处理结果")
|
||||||
public Result findAutoPage(QueryRequest queryRequest, Integer[] stationIds, String qualifie,
|
public Result findAutoPage(QueryRequest queryRequest, Integer[] stationIds,
|
||||||
|
String qualifie, String sampleType,
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")Date startTime,
|
@DateTimeFormat(pattern = "yyyy-MM-dd")Date startTime,
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime){
|
@DateTimeFormat(pattern = "yyyy-MM-dd") Date endTime){
|
||||||
return autoService.findAutoPage(queryRequest, stationIds, qualifie, startTime, endTime);
|
return autoService.findAutoPage(queryRequest, stationIds, qualifie, sampleType,startTime, endTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("findReviewedPage")
|
@GetMapping("findReviewedPage")
|
||||||
|
|
|
@ -13,7 +13,7 @@ import java.util.Map;
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface GardsSampleDataWebMapper extends BaseMapper<GardsSampleDataWeb> {
|
public interface GardsSampleDataWebMapper extends BaseMapper<GardsSampleDataWeb> {
|
||||||
|
|
||||||
Page<GardsSampleDataWeb> findAutoPage(String startDate, String endDate, List<Integer> stationIdList, String qualifie, Page<GardsSampleDataWeb> page);
|
Page<GardsSampleDataWeb> findAutoPage(String startDate, String endDate, List<Integer> stationIdList, String qualifie, String sampleType, Page<GardsSampleDataWeb> page);
|
||||||
|
|
||||||
Page<GardsSampleDataWeb> findReviewedPage(String startDate, String endDate, List<Integer> stationIdList, String qualifie, Page<GardsSampleDataWeb> page);
|
Page<GardsSampleDataWeb> findReviewedPage(String startDate, String endDate, List<Integer> stationIdList, String qualifie, Page<GardsSampleDataWeb> page);
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,9 @@
|
||||||
<if test = "qualifie != null and qualifie != ''">
|
<if test = "qualifie != null and qualifie != ''">
|
||||||
AND sam.SPECTRAL_QUALIFIE = #{qualifie}
|
AND sam.SPECTRAL_QUALIFIE = #{qualifie}
|
||||||
</if>
|
</if>
|
||||||
|
<if test = "sampleType != null and sampleType != ''">
|
||||||
|
AND sam.SAMPLE_TYPE = #{sampleType}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
ORDER BY sam.ACQUISITION_START DESC
|
ORDER BY sam.ACQUISITION_START DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -10,7 +10,7 @@ import java.util.Date;
|
||||||
|
|
||||||
public interface IAutoService extends IService<GardsAnalyses> {
|
public interface IAutoService extends IService<GardsAnalyses> {
|
||||||
|
|
||||||
Result findAutoPage(QueryRequest queryRequest, Integer[] stationIds, String qualifie, Date startTime, Date endTime);
|
Result findAutoPage(QueryRequest queryRequest, Integer[] stationIds, String qualifie, String sampleType,Date startTime, Date endTime);
|
||||||
|
|
||||||
GardsAnalyses getOne(Integer sampleId);
|
GardsAnalyses getOne(Integer sampleId);
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class AutoServiceImpl extends ServiceImpl<GardsAnalysesAutoMapper, GardsA
|
||||||
private RedisUtil redisUtil;
|
private RedisUtil redisUtil;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result findAutoPage(QueryRequest queryRequest, Integer[] stationIds, String qualifie, Date startTime, Date endTime) {
|
public Result findAutoPage(QueryRequest queryRequest, Integer[] stationIds, String qualifie, String sampleType, Date startTime, Date endTime) {
|
||||||
Result result = new Result();
|
Result result = new Result();
|
||||||
//获取redis中缓存的台站信息
|
//获取redis中缓存的台站信息
|
||||||
Map<String, String> stationMap = (Map<String, String>)redisUtil.get("stationMap");
|
Map<String, String> stationMap = (Map<String, String>)redisUtil.get("stationMap");
|
||||||
|
@ -66,7 +66,7 @@ public class AutoServiceImpl extends ServiceImpl<GardsAnalysesAutoMapper, GardsA
|
||||||
stationIdList = Arrays.asList(stationIds);
|
stationIdList = Arrays.asList(stationIds);
|
||||||
}
|
}
|
||||||
Page<GardsSampleDataWeb> page = new Page<>(queryRequest.getPageNo(), queryRequest.getPageSize());
|
Page<GardsSampleDataWeb> page = new Page<>(queryRequest.getPageNo(), queryRequest.getPageSize());
|
||||||
Page<GardsSampleDataWeb> sampleDataPage = gardsSampleDataWebMapper.findAutoPage(startDate, endDate, stationIdList, qualifie, page);
|
Page<GardsSampleDataWeb> sampleDataPage = gardsSampleDataWebMapper.findAutoPage(startDate, endDate, stationIdList, qualifie, sampleType, page);
|
||||||
sampleDataPage.getRecords().forEach(item->{
|
sampleDataPage.getRecords().forEach(item->{
|
||||||
item.setSiteDetCode(StringUtils.trim(item.getSiteDetCode()));
|
item.setSiteDetCode(StringUtils.trim(item.getSiteDetCode()));
|
||||||
if (stationMap.containsKey(item.getStationId().toString()) && CollectionUtils.isNotEmpty(stationMap)){
|
if (stationMap.containsKey(item.getStationId().toString()) && CollectionUtils.isNotEmpty(stationMap)){
|
||||||
|
|
Loading…
Reference in New Issue
Block a user