分析项目根据字典id过滤
This commit is contained in:
@@ -63,7 +63,6 @@ public interface BusinessAssayProjectDataMapper extends BaseMapperX<BusinessAssa
|
||||
.eqIfPresent(BusinessAssayProjectDataDO::getSystemDepartmentCode, reqVO.getSystemDepartmentCode())
|
||||
.betweenIfPresent(BusinessAssayProjectDataDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(BusinessAssayProjectDataDO::getRemark, reqVO.getRemark())
|
||||
.distinct()
|
||||
.orderByAsc(ConfigAssayMethodProjectDO::getSortNo));
|
||||
}
|
||||
|
||||
|
||||
@@ -172,7 +172,9 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
||||
// projectDataSearch.setBusinessAssayTaskDataId(businessAssayTaskData.getId());
|
||||
projectDataSearch.setBusinessAssayTaskDataIdList(businessAssayTaskDataIdList);
|
||||
List<BusinessAssayProjectAndParameterRespVO> projectAndParameterList = businessAssayProjectDataMapper.selectProjectAndParameterBy(projectDataSearch);
|
||||
for (BusinessAssayProjectAndParameterRespVO ep : projectAndParameterList) {
|
||||
Map<Long, List<BusinessAssayProjectAndParameterRespVO>> projectAndParameterMap = projectAndParameterList.stream().collect(Collectors.groupingBy(BusinessAssayProjectAndParameterRespVO::getDicId));
|
||||
for (Map.Entry<Long, List<BusinessAssayProjectAndParameterRespVO>> entry : projectAndParameterMap.entrySet()) {
|
||||
BusinessAssayProjectAndParameterRespVO ep = entry.getValue().get(0);
|
||||
String fieldIndex = "e" + ep.getDicId();
|
||||
String title = ep.getShowName() + (StringUtils.isBlank(ep.getUnit()) ? "" : "(" + ep.getUnit() + ")");
|
||||
boolean isEdit = StringUtils.isBlank(ep.getFormula());
|
||||
@@ -189,7 +191,26 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
||||
cloumns.add(new BatchSampleAnalysisColumnRespVO(fieldIndex, fieldIndex + ".value", title, "", "120px", p.getDataType(), p.getDecimalPosition(), null, p.getFormula(), p.getParamNo(), isEdit, p.getUnit(), "parameter", p.getFillingWay(), p.getGroupDictionaryBusinessId(), p.getGroupDictionaryBusinessKey(), p.getGroupDictionaryBusinessName()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// for (BusinessAssayProjectAndParameterRespVO ep : projectAndParameterList) {
|
||||
// String fieldIndex = "e" + ep.getDicId();
|
||||
// String title = ep.getShowName() + (StringUtils.isBlank(ep.getUnit()) ? "" : "(" + ep.getUnit() + ")");
|
||||
// boolean isEdit = StringUtils.isBlank(ep.getFormula());
|
||||
// cloumns.add(new BatchSampleAnalysisColumnRespVO(fieldIndex, fieldIndex + ".value", title, "", "120px", ep.getDataType(), ep.getDecimalPosition(), null, ep.getFormula(), ep.getParamNo(), isEdit, ep.getUnit(), "project", ep.getFillingWay(), ep.getGroupDictionaryBusinessId(), ep.getGroupDictionaryBusinessKey(), ep.getGroupDictionaryBusinessName()));
|
||||
//
|
||||
// if (StringUtils.isNotEmpty(ep.getFormula())) {
|
||||
// BusinessAssayParameterDataReqVO parameterDataSearch = new BusinessAssayParameterDataReqVO();
|
||||
// parameterDataSearch.setBusinessAssayProjectDataId(ep.getId());
|
||||
// List<BusinessAssayProjectAndParameterRespVO> plist = businessAssayParameterDataMapper.selectProjectAndParameterBy(parameterDataSearch);
|
||||
// for (BusinessAssayProjectAndParameterRespVO p : plist) {
|
||||
// fieldIndex = "p" + p.getDicId();
|
||||
// title = p.getShowName() + (StringUtils.isBlank(p.getUnit()) ? "" : "(" + p.getUnit() + ")");
|
||||
// isEdit = StringUtils.isBlank(p.getFormula());
|
||||
// cloumns.add(new BatchSampleAnalysisColumnRespVO(fieldIndex, fieldIndex + ".value", title, "", "120px", p.getDataType(), p.getDecimalPosition(), null, p.getFormula(), p.getParamNo(), isEdit, p.getUnit(), "parameter", p.getFillingWay(), p.getGroupDictionaryBusinessId(), p.getGroupDictionaryBusinessKey(), p.getGroupDictionaryBusinessName()));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
businessAssayTaskAnalysisSampleProjectRespVO.setColumns(cloumns);
|
||||
|
||||
|
||||
@@ -432,7 +453,9 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
||||
// projectDataSearch.setBusinessAssayTaskDataId(businessAssayTaskData.getId());
|
||||
projectDataSearch.setBusinessAssayTaskDataIdList(businessAssayTaskDataIdList);
|
||||
List<BusinessAssayProjectAndParameterRespVO> projectAndParameterList = businessAssayProjectDataMapper.selectProjectAndParameterBy(projectDataSearch);
|
||||
for (BusinessAssayProjectAndParameterRespVO ep : projectAndParameterList) {
|
||||
Map<Long, List<BusinessAssayProjectAndParameterRespVO>> projectAndParameterMap = projectAndParameterList.stream().collect(Collectors.groupingBy(BusinessAssayProjectAndParameterRespVO::getDicId));
|
||||
for (Map.Entry<Long, List<BusinessAssayProjectAndParameterRespVO>> entry : projectAndParameterMap.entrySet()) {
|
||||
BusinessAssayProjectAndParameterRespVO ep = entry.getValue().get(0);
|
||||
String fieldIndex = "e" + ep.getDicId();
|
||||
String title = ep.getShowName() + (StringUtils.isBlank(ep.getUnit()) ? "" : "(" + ep.getUnit() + ")");
|
||||
boolean isEdit = StringUtils.isBlank(ep.getFormula());
|
||||
@@ -449,7 +472,25 @@ public class SampleAnalysisServiceImpl implements SampleAnalysisService {
|
||||
cloumns.add(new BatchSampleAnalysisColumnRespVO(fieldIndex, fieldIndex + ".value", title, "", "120px", p.getDataType(), p.getDecimalPosition(), null, p.getFormula(), p.getParamNo(), isEdit, p.getUnit(), "parameter", p.getFillingWay(), p.getGroupDictionaryBusinessId(), p.getGroupDictionaryBusinessKey(), p.getGroupDictionaryBusinessName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// for (BusinessAssayProjectAndParameterRespVO ep : projectAndParameterList) {
|
||||
// String fieldIndex = "e" + ep.getDicId();
|
||||
// String title = ep.getShowName() + (StringUtils.isBlank(ep.getUnit()) ? "" : "(" + ep.getUnit() + ")");
|
||||
// boolean isEdit = StringUtils.isBlank(ep.getFormula());
|
||||
// cloumns.add(new BatchSampleAnalysisColumnRespVO(fieldIndex, fieldIndex + ".value", title, "", "120px", ep.getDataType(), ep.getDecimalPosition(), null, ep.getFormula(), ep.getParamNo(), isEdit, ep.getUnit(), "project", ep.getFillingWay(), ep.getGroupDictionaryBusinessId(), ep.getGroupDictionaryBusinessKey(), ep.getGroupDictionaryBusinessName()));
|
||||
//
|
||||
// if (StringUtils.isNotEmpty(ep.getFormula())) {
|
||||
// BusinessAssayParameterDataReqVO parameterDataSearch = new BusinessAssayParameterDataReqVO();
|
||||
// parameterDataSearch.setBusinessAssayProjectDataId(ep.getId());
|
||||
// List<BusinessAssayProjectAndParameterRespVO> plist = businessAssayParameterDataMapper.selectProjectAndParameterBy(parameterDataSearch);
|
||||
// for (BusinessAssayProjectAndParameterRespVO p : plist) {
|
||||
// fieldIndex = "p" + p.getDicId();
|
||||
// title = p.getShowName() + (StringUtils.isBlank(p.getUnit()) ? "" : "(" + p.getUnit() + ")");
|
||||
// isEdit = StringUtils.isBlank(p.getFormula());
|
||||
// cloumns.add(new BatchSampleAnalysisColumnRespVO(fieldIndex, fieldIndex + ".value", title, "", "120px", p.getDataType(), p.getDecimalPosition(), null, p.getFormula(), p.getParamNo(), isEdit, p.getUnit(), "parameter", p.getFillingWay(), p.getGroupDictionaryBusinessId(), p.getGroupDictionaryBusinessKey(), p.getGroupDictionaryBusinessName()));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
businessAssayTaskAnalysisDataRespVO.setColumns(cloumns);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user