注释提交

This commit is contained in:
zhangheng 2024-07-15 15:37:40 +08:00
parent 4bfc46021c
commit 0de3c32f1d

View File

@ -212,7 +212,7 @@ public class LabelFieldContentServiceImpl implements ILabelFieldContentService {
} }
PatientTaskDto patientTaskDto = new PatientTaskDto(); PatientTaskDto patientTaskDto = new PatientTaskDto();
patientTaskDto.setPatientId(patientId); patientTaskDto.setPatientId(patientId);
//暂时不用 //查询节点富文本所需标签
List<SignPatientManageRouteNode> nodeList = signPatientManageRouteNodeMapper.getNodeList(patientTaskDto); List<SignPatientManageRouteNode> nodeList = signPatientManageRouteNodeMapper.getNodeList(patientTaskDto);
List<String> nodeContentList = nodeList.stream().filter(Objects::nonNull).map(SignPatientManageRouteNode::getNodeContent).filter(Objects::nonNull).collect(Collectors.toList()); List<String> nodeContentList = nodeList.stream().filter(Objects::nonNull).map(SignPatientManageRouteNode::getNodeContent).filter(Objects::nonNull).collect(Collectors.toList());
String nodeContentListJoin = String.join(",", nodeContentList); String nodeContentListJoin = String.join(",", nodeContentList);
@ -224,7 +224,7 @@ public class LabelFieldContentServiceImpl implements ILabelFieldContentService {
String paramKey = span.attr("data-fieldMark"); String paramKey = span.attr("data-fieldMark");
string.add(paramKey); string.add(paramKey);
} }
//根据patientId查询是否有已经维护的参数 //根据patientId查询是否有已经维护的参数有维护数据返回已维护数据没有维护数据查询视图数据
List<LabelFieldAndPartitionDict> labelFieldContents = labelFieldContentMapper.labelFieldAndPartitionDict(taskPartitionDictId, patientId, null); List<LabelFieldAndPartitionDict> labelFieldContents = labelFieldContentMapper.labelFieldAndPartitionDict(taskPartitionDictId, patientId, null);
if (CollectionUtils.isNotEmpty(labelFieldContents)) { if (CollectionUtils.isNotEmpty(labelFieldContents)) {
return labelFieldContents; return labelFieldContents;
@ -235,19 +235,21 @@ public class LabelFieldContentServiceImpl implements ILabelFieldContentService {
if (CollectionUtils.isEmpty(labelFieldContentList)) { if (CollectionUtils.isEmpty(labelFieldContentList)) {
return new ArrayList<>(); return new ArrayList<>();
} }
//属性名 //患者表视图属性名
PatientAllInfoView patientAllInfoView = new PatientAllInfoView(); PatientAllInfoView patientAllInfoView = new PatientAllInfoView();
Field[] declaredFields = patientAllInfoView.getClass().getDeclaredFields(); Field[] declaredFields = patientAllInfoView.getClass().getDeclaredFields();
String[] strings = new String[declaredFields.length]; String[] strings = new String[declaredFields.length];
for (int i = 0; i < declaredFields.length; i++) { for (int i = 0; i < declaredFields.length; i++) {
strings[i] = declaredFields[i].getName().toUpperCase(); strings[i] = declaredFields[i].getName().toUpperCase();
} }
//遍历分组根据属性名塞入视图值
List<String> asListStrings = Arrays.asList(strings); List<String> asListStrings = Arrays.asList(strings);
for (GroupingValue groupingValue : labelFieldContentList) { for (GroupingValue groupingValue : labelFieldContentList) {
groupingValue.setPatientId(patientId); groupingValue.setPatientId(patientId);
String s = asListStrings.stream().filter(Objects::nonNull).filter(item -> item.equals(groupingValue.getFieldCode())).findFirst().orElse(new String()); String s = asListStrings.stream().filter(Objects::nonNull).filter(item -> item.equals(groupingValue.getFieldCode())).findFirst().orElse(new String());
groupingValue.setFieldValue(paramsValue.getOrDefault(s, "").toString()); groupingValue.setFieldValue(paramsValue.getOrDefault(s, "").toString());
} }
//遍历任务细分id组装数据
List<Long> collect = labelFieldContentList.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getTaskPartitionDictId())).map(LabelFieldInfo::getTaskPartitionDictId).distinct().collect(Collectors.toList()); List<Long> collect = labelFieldContentList.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getTaskPartitionDictId())).map(LabelFieldInfo::getTaskPartitionDictId).distinct().collect(Collectors.toList());
List<LabelFieldAndPartitionDict> labelFieldAndPartitionDictList = new ArrayList<>(); List<LabelFieldAndPartitionDict> labelFieldAndPartitionDictList = new ArrayList<>();
for (Long aLong : collect) { for (Long aLong : collect) {