修改参数搜索问题
This commit is contained in:
+3
@@ -39,4 +39,7 @@ public interface IParamsReportConfigDataEOService extends IService<ParamsReportC
|
||||
* @return
|
||||
*/
|
||||
int deleteByParamsReportDetailIdList(List<String> paramsReportDetailIdList);
|
||||
|
||||
|
||||
List<ParamsReportConfigDataEO> queryListByCollectManifestIdList(List<String> paramsCollectManifestIdList);
|
||||
}
|
||||
|
||||
+15
@@ -78,4 +78,19 @@ public class ParamsReportConfigDataEOServiceImpl extends ServiceImpl<ParamsRepor
|
||||
return baseMapper.delete(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param paramsConfigId
|
||||
* @param paramsCollectManifestId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ParamsReportConfigDataEO> queryListByCollectManifestIdList(List<String> paramsCollectManifestIdList) {
|
||||
LambdaQueryWrapper<ParamsReportConfigDataEO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.in(ParamsReportConfigDataEO::getParamsCollectManifestId, paramsCollectManifestIdList);
|
||||
queryWrapper.orderByDesc(ParamsReportConfigDataEO::getOrderNum);
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
+11
-1
@@ -154,6 +154,9 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
dictItemList.addAll(dictItems);
|
||||
}
|
||||
|
||||
List<String> collectManifestIdList = list.stream().map(ParamsReportDetailEO::getId).distinct().collect(Collectors.toList());
|
||||
List<ParamsReportConfigDataEO> paramsReportConfigDataEOList = this.paramsReportConfigDataEOService.queryListByCollectManifestIdList(collectManifestIdList);
|
||||
|
||||
List<Map<String, Object>> listMap = new ArrayList<>();
|
||||
list.forEach(collectManifestEO -> { // 参数收集清单
|
||||
|
||||
@@ -225,7 +228,14 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
Map<String, Object> configMap = new HashMap<>();
|
||||
|
||||
String paramsConfigId = paramsConfigEO.getId();
|
||||
List<ParamsReportConfigDataEO> paramsConfigDataEOList = this.paramsReportConfigDataEOService.queryListByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据
|
||||
List<ParamsReportConfigDataEO> paramsConfigDataEOList = paramsReportConfigDataEOList.stream().filter(prcdEO -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(prcdEO.getParamsConfigId(),paramsConfigId) && StringUtils.equals(prcdEO.getParamsCollectManifestId(),paramsCollectManifestId)) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).distinct().collect(Collectors.toList());
|
||||
// List<ParamsReportConfigDataEO> paramsConfigDataEOList = this.paramsReportConfigDataEOService.queryListByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId); // 参数配置数据
|
||||
if(CollectionUtils.isNotEmpty(paramsConfigDataEOList)){
|
||||
// 匿名比较器排序
|
||||
Collections.sort(paramsConfigDataEOList, new Comparator<ParamsReportConfigDataEO>() {
|
||||
|
||||
Reference in New Issue
Block a user