|
@@ -4,62 +4,33 @@ import com.diagbot.biz.push.entity.Item;
|
|
|
import com.diagbot.biz.push.entity.Lis;
|
|
|
import com.diagbot.client.CRFServiceClient;
|
|
|
import com.diagbot.client.StandConvertServiceClient;
|
|
|
-import com.diagbot.dto.BillMsg;
|
|
|
-import com.diagbot.dto.RuleDTO;
|
|
|
-import com.diagbot.dto.RuleExtDTO;
|
|
|
-import com.diagbot.dto.StandConvertCrfBatchDTO;
|
|
|
-import com.diagbot.dto.StandConvertCrfDTO;
|
|
|
-import com.diagbot.dto.WordCrfDTO;
|
|
|
+import com.diagbot.dto.*;
|
|
|
+import com.diagbot.enums.ConceptTypeEnum;
|
|
|
import com.diagbot.enums.LexiconEnum;
|
|
|
import com.diagbot.enums.RedisEnum;
|
|
|
import com.diagbot.enums.StandConvertEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
|
import com.diagbot.exception.CommonException;
|
|
|
import com.diagbot.model.ai.AIAnalyze;
|
|
|
-import com.diagbot.model.entity.BodyPart;
|
|
|
-import com.diagbot.model.entity.Clinical;
|
|
|
-import com.diagbot.model.entity.Modification;
|
|
|
import com.diagbot.model.entity.Operation;
|
|
|
-import com.diagbot.model.entity.Pacs;
|
|
|
-import com.diagbot.model.entity.Vital;
|
|
|
-import com.diagbot.model.label.ChiefLabel;
|
|
|
-import com.diagbot.model.label.DiagLabel;
|
|
|
-import com.diagbot.model.label.PacsLabel;
|
|
|
-import com.diagbot.model.label.PastLabel;
|
|
|
-import com.diagbot.model.label.PresentLabel;
|
|
|
-import com.diagbot.model.label.VitalLabel;
|
|
|
+import com.diagbot.model.entity.*;
|
|
|
+import com.diagbot.model.label.*;
|
|
|
import com.diagbot.rule.CommonRule;
|
|
|
-import com.diagbot.util.BeanUtil;
|
|
|
-import com.diagbot.util.CoreUtil;
|
|
|
-import com.diagbot.util.ListUtil;
|
|
|
-import com.diagbot.util.RedisUtil;
|
|
|
-import com.diagbot.util.ReflectUtil;
|
|
|
-import com.diagbot.util.StringUtil;
|
|
|
-import com.diagbot.vo.NeoPushVO;
|
|
|
-import com.diagbot.vo.RuleVO;
|
|
|
-import com.diagbot.vo.SearchData;
|
|
|
-import com.diagbot.vo.StandConvert;
|
|
|
-import com.diagbot.vo.StandConvertCrfVO;
|
|
|
-import com.diagbot.vo.neoPushEntity.ChiefPushVo;
|
|
|
+import com.diagbot.util.*;
|
|
|
+import com.diagbot.vo.*;
|
|
|
import com.diagbot.vo.neoPushEntity.Diag;
|
|
|
-import com.diagbot.vo.neoPushEntity.DiagVo;
|
|
|
import com.diagbot.vo.neoPushEntity.Drug;
|
|
|
-import com.diagbot.vo.neoPushEntity.LisPushVo;
|
|
|
-import com.diagbot.vo.neoPushEntity.PacsPushVo;
|
|
|
-import com.diagbot.vo.neoPushEntity.PresentPushVo;
|
|
|
-import com.diagbot.vo.neoPushEntity.Symptom;
|
|
|
+import com.diagbot.vo.neoPushEntity.*;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import org.apache.commons.beanutils.BeanUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.lang.reflect.Method;
|
|
|
import java.math.BigDecimal;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Iterator;
|
|
|
-import java.util.LinkedHashMap;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
@@ -72,9 +43,7 @@ public class CommonFacade {
|
|
|
@Autowired
|
|
|
CRFServiceClient crfServiceClient;
|
|
|
@Autowired
|
|
|
- LisConfigFacade lisConfigFacade;
|
|
|
- @Autowired
|
|
|
- PacsConfigFacade pacsConfigFacade;
|
|
|
+ MappingConfigFacade mappingConfigFacade;
|
|
|
@Autowired
|
|
|
TranOperationConfigFacade tranOperationConfigFacade;
|
|
|
@Autowired
|
|
@@ -428,9 +397,9 @@ public class CommonFacade {
|
|
|
// // 3、开单辅检项目
|
|
|
// CoreUtil.setPropertyList(wordCrfDTO.getPacsOrder(), "name", "uniqueName", map.get(StandConvertEnum.pacs.toString()));
|
|
|
|
|
|
- CoreUtil.setUninameFromDetail(wordCrfDTO.getLis(), "detailName");
|
|
|
- CoreUtil.setUninameFromDetail(wordCrfDTO.getLisOrder(), "name");
|
|
|
-
|
|
|
+// CoreUtil.setUninameFromDetail(wordCrfDTO.getLis(), "detailName");
|
|
|
+// CoreUtil.setUninameFromDetail(wordCrfDTO.getLisOrder(), "name");
|
|
|
+ lisGetAndSet(wordCrfDTO);
|
|
|
pacsGetAndSet(wordCrfDTO);
|
|
|
|
|
|
// 【体征回填】
|
|
@@ -673,38 +642,44 @@ public class CommonFacade {
|
|
|
CoreUtil.addList(operationList, CoreUtil.getPropertyList(wordCrfDTO.getPresentLabel().getOperations()));
|
|
|
// 3、既往史手术
|
|
|
CoreUtil.addList(operationList, CoreUtil.getPropertyList(wordCrfDTO.getPastLabel().getOperations()));
|
|
|
- // 4、开单手术
|
|
|
- CoreUtil.addList(operationList, CoreUtil.filterUniqueList(wordCrfDTO.getOperationOrder()));
|
|
|
- // 5、结构化手术
|
|
|
- CoreUtil.addList(operationList, CoreUtil.filterUniqueList(wordCrfDTO.getOperation()));
|
|
|
- // 6、选中手术
|
|
|
- if (wordCrfDTO.getOperationName() != null && StringUtils.isBlank(wordCrfDTO.getOperationName().getUniqueName())) {
|
|
|
- operationList.add(wordCrfDTO.getOperationName().getName());
|
|
|
- }
|
|
|
+// // 4、开单手术
|
|
|
+// CoreUtil.addList(operationList, CoreUtil.filterUniqueList(wordCrfDTO.getOperationOrder()));
|
|
|
+// // 5、结构化手术
|
|
|
+// CoreUtil.addList(operationList, CoreUtil.filterUniqueList(wordCrfDTO.getOperation()));
|
|
|
+// // 6、选中手术
|
|
|
+// if (wordCrfDTO.getOperationName() != null && StringUtils.isBlank(wordCrfDTO.getOperationName().getUniqueName())) {
|
|
|
+// operationList.add(wordCrfDTO.getOperationName().getName());
|
|
|
+// }
|
|
|
operationList = operationList
|
|
|
.stream()
|
|
|
.distinct()
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
- Map<String, Map<String, Long>> configMap = new LinkedHashMap<>();
|
|
|
+// Map<String, Map<String, Long>> configMap = new LinkedHashMap<>();
|
|
|
if (ListUtil.isNotEmpty(operationList)) {
|
|
|
- configMap = tranOperationConfigFacade.getConfigMap(wordCrfDTO.getHospitalId(), operationList, null);
|
|
|
+// configMap = tranOperationConfigFacade.getConfigMap(wordCrfDTO.getHospitalId(), operationList, null);
|
|
|
+ Map<String, Map<String, Map<String, List<String>>>> operstionMap = mappingConfigFacade.groupByHisNameWithName(operationList, ConceptTypeEnum.Operation.getKey(), wordCrfDTO.getHospitalId());
|
|
|
// 1、主诉手术
|
|
|
- setListProperty(wordCrfDTO.getChiefLabel(), "operations", "standName", configMap);
|
|
|
+// setListProperty(wordCrfDTO.getChiefLabel(), "operations", "standName", configMap);
|
|
|
+ setListProperty(wordCrfDTO.getChiefLabel(), "operations", ConceptTypeEnum.Operation.getKey(),"StandName",operstionMap);
|
|
|
// 2、现病史手术
|
|
|
- setListProperty(wordCrfDTO.getPresentLabel(), "operations", "standName", configMap);
|
|
|
+// setListProperty(wordCrfDTO.getPresentLabel(), "operations", "standName", configMap);
|
|
|
+ setListProperty(wordCrfDTO.getPresentLabel(),"operations", ConceptTypeEnum.Operation.getKey(),"StandName",operstionMap);
|
|
|
// 3、既往史手术
|
|
|
- setListProperty(wordCrfDTO.getPastLabel(), "operations", "standName", configMap);
|
|
|
- // 4、开单手术
|
|
|
- setListProperty(wordCrfDTO, "operation", "uniqueName", configMap);
|
|
|
- // 5、结构化手术
|
|
|
- setListProperty(wordCrfDTO, "operationOrder", "uniqueName", configMap);
|
|
|
- // 6、选中手术
|
|
|
- if (wordCrfDTO.getOperationName() != null &&
|
|
|
- StringUtil.isNotBlank(wordCrfDTO.getOperationName().getName()) &&
|
|
|
- StringUtil.isBlank(wordCrfDTO.getOperationName().getUniqueName())) {
|
|
|
- wordCrfDTO.getOperationName().setUniqueName(wordCrfDTO.getOperationName().getName());
|
|
|
- }
|
|
|
+// setListProperty(wordCrfDTO.getPastLabel(), "operations", "standName", configMap);
|
|
|
+ setListProperty(wordCrfDTO.getPastLabel(),"operations", ConceptTypeEnum.Operation.getKey(),"StandName",operstionMap);
|
|
|
+// // 4、结构化手术
|
|
|
+//// setListProperty(wordCrfDTO, "operation", "uniqueName", configMap);
|
|
|
+// setListProperty(wordCrfDTO, "operation", ConceptTypeEnum.Operation.getKey(),"UniqueName",operstionMap);
|
|
|
+// // 5、手术
|
|
|
+//// setListProperty(wordCrfDTO, "operationOrder", "uniqueName", configMap);
|
|
|
+// setListProperty(wordCrfDTO, "operationOrder", ConceptTypeEnum.Operation.getKey(),"UniqueName",operstionMap);
|
|
|
+// // 6、选中手术
|
|
|
+// if (wordCrfDTO.getOperationName() != null &&
|
|
|
+// StringUtil.isNotBlank(wordCrfDTO.getOperationName().getName()) &&
|
|
|
+// StringUtil.isBlank(wordCrfDTO.getOperationName().getUniqueName())) {
|
|
|
+// wordCrfDTO.getOperationName().setUniqueName(wordCrfDTO.getOperationName().getName());
|
|
|
+// }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -717,24 +692,49 @@ public class CommonFacade {
|
|
|
// 【所有辅检】
|
|
|
List<String> pacsList = new ArrayList<>();
|
|
|
// 1、结构化
|
|
|
- CoreUtil.addList(pacsList, CoreUtil.getPropertyList(wordCrfDTO.getPacs()));
|
|
|
- // 2、开单
|
|
|
- CoreUtil.addList(pacsList, CoreUtil.getPropertyList(wordCrfDTO.getPacsOrder()));
|
|
|
+// CoreUtil.addList(pacsList, CoreUtil.getPropertyList(wordCrfDTO.getPacs()));
|
|
|
+// // 2、开单
|
|
|
+// CoreUtil.addList(pacsList, CoreUtil.getPropertyList(wordCrfDTO.getPacsOrder()));
|
|
|
+ PacsLabel pacsLabel = wordCrfDTO.getPacsLabel();
|
|
|
+ if(pacsLabel != null){
|
|
|
+ pacsList = pacsLabel.getItem().stream()
|
|
|
+ .map(x -> x.getName())
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ }
|
|
|
+
|
|
|
+ if (ListUtil.isNotEmpty(pacsList)) {
|
|
|
+ Map<String, Map<String, Map<String, List<String>>>> pacsMap = mappingConfigFacade.groupByHisNameWithName(pacsList, ConceptTypeEnum.Pacs.getKey(), wordCrfDTO.getHospitalId());
|
|
|
+ setListProperty(wordCrfDTO, "pacs", ConceptTypeEnum.Pacs.getKey(),"UniqueName",pacsMap);
|
|
|
+ setListProperty(pacsLabel, "item", ConceptTypeEnum.Pacs.getKey(),"UniqueName",pacsMap);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- pacsList = pacsList
|
|
|
+ /**
|
|
|
+ * 化验映射(关闭同义词转换)
|
|
|
+ *
|
|
|
+ * @param wordCrfDTO
|
|
|
+ */
|
|
|
+ public void lisGetAndSet(WordCrfDTO wordCrfDTO) {
|
|
|
+ //化验公表转换
|
|
|
+ List<String> lisHisNameList = Lists.newArrayList();
|
|
|
+ // 【所有化验】
|
|
|
+ List<Lis> lisList = wordCrfDTO.getLis();
|
|
|
+ if(ListUtil.isNotEmpty(lisList)){
|
|
|
+ lisHisNameList.addAll(lisList
|
|
|
+ .stream()
|
|
|
+ .filter(i -> StringUtil.isNotBlank(i.getName()) || StringUtil.isNotBlank(i.getUniqueName()))
|
|
|
+ .map(i -> i.getName())
|
|
|
+ .collect(Collectors.toList()));
|
|
|
+ }
|
|
|
+ lisHisNameList = lisHisNameList
|
|
|
.stream()
|
|
|
.distinct()
|
|
|
.collect(Collectors.toList());
|
|
|
-
|
|
|
- Map<String, Map<String, Long>> configMap = new LinkedHashMap<>();
|
|
|
- if (ListUtil.isNotEmpty(pacsList)) {
|
|
|
- configMap = pacsConfigFacade.getConfigMap(wordCrfDTO.getHospitalId(), pacsList, null);
|
|
|
-
|
|
|
- // 4、结构化
|
|
|
- setListProperty(wordCrfDTO, "pacs", "uniqueName", configMap);
|
|
|
- // 5、开单
|
|
|
- setListProperty(wordCrfDTO, "pacsOrder", "uniqueName", configMap);
|
|
|
+ if (ListUtil.isNotEmpty(lisHisNameList)) {
|
|
|
+ Map<String, Map<String, Map<String, List<String>>>> lisConfigMap = mappingConfigFacade.groupByHisNameWithName(lisHisNameList, ConceptTypeEnum.LisPack.getKey(), wordCrfDTO.getHospitalId());
|
|
|
+ setListProperty(wordCrfDTO, "lis", ConceptTypeEnum.LisPack.getKey(),"UniqueName",lisConfigMap);
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -751,6 +751,12 @@ public class CommonFacade {
|
|
|
ReflectUtil.setProperty(obj, listProperty, newList);
|
|
|
}
|
|
|
|
|
|
+ public <T> void setListProperty(Object obj, String listProperty,Integer type,String propertyName, Map<String, Map<String, Map<String, List<String>>>> configMap) {
|
|
|
+ Object tList = CoreUtil.getFieldValue(obj, listProperty);
|
|
|
+ List<T> newList = convertStandName((List) tList,type, propertyName,configMap);
|
|
|
+ ReflectUtil.setProperty(obj, listProperty, newList);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 标准名称转换
|
|
|
*
|
|
@@ -800,6 +806,94 @@ public class CommonFacade {
|
|
|
return retList;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 标准名称转换
|
|
|
+ *
|
|
|
+ * @param list
|
|
|
+ * @param configMap
|
|
|
+ * @param type
|
|
|
+ * @param <T>
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public <T> List<T> convertStandName(List<T> list,Integer type,String propertyName, Map<String, Map<String, Map<String, List<String>>>> configMap) {
|
|
|
+ List<T> retList = new ArrayList<>();
|
|
|
+ if (ListUtil.isEmpty(list)) {
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+ if (configMap == null || configMap.size() == 0) {
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
+ try {
|
|
|
+ for (T item : list) {
|
|
|
+ String name = item.getClass().getMethod("getName").invoke(item).toString();
|
|
|
+ if (StringUtil.isBlank(name)) {
|
|
|
+ retList.add(item);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+// String uniqueName = item.getClass().getMethod("getUniqueName").invoke(item).toString();
|
|
|
+ String uniqueName = item.getClass().getMethod("get"+propertyName).invoke(item).toString();
|
|
|
+ if (StringUtil.isNotBlank(uniqueName)) {
|
|
|
+ retList.add(item);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ String hisDetailName = "";
|
|
|
+ if(type.equals(ConceptTypeEnum.LisPack.getKey())) {
|
|
|
+ hisDetailName = item.getClass().getMethod("getDetailName").invoke(item).toString();
|
|
|
+ if (StringUtil.isBlank(hisDetailName)) {
|
|
|
+ hisDetailName = "";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (configMap.containsKey(name)) {
|
|
|
+ Map<String, Map<String, List<String>>> subMap = configMap.get(name);
|
|
|
+ if (subMap.containsKey(hisDetailName)) {
|
|
|
+ if (type.equals(ConceptTypeEnum.Drug.getKey())) {
|
|
|
+ for (Map.Entry<String, List<String>> thirdEntry : subMap.get(hisDetailName).entrySet()) {
|
|
|
+ if (ListUtil.isNotEmpty(thirdEntry.getValue())) {
|
|
|
+ for (String form : thirdEntry.getValue()) {
|
|
|
+ T o = (T) item.getClass().newInstance();
|
|
|
+ BeanUtil.copyProperties(item, o);
|
|
|
+ Method setUniqueName = o.getClass().getMethod("set"+propertyName, String.class);
|
|
|
+ setUniqueName.invoke(o, thirdEntry.getKey());
|
|
|
+ Method setForm = o.getClass().getMethod("setForm", String.class);
|
|
|
+ setForm.invoke(o, form);
|
|
|
+ retList.add(o);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ T o = (T) item.getClass().newInstance();
|
|
|
+ BeanUtil.copyProperties(item, o);
|
|
|
+ Method setUniqueName = o.getClass().getMethod("set"+propertyName, String.class);
|
|
|
+ setUniqueName.invoke(o, thirdEntry.getKey());
|
|
|
+ retList.add(o);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ List<String> standNames = new ArrayList<>(subMap.get(hisDetailName).keySet());
|
|
|
+ for (String stdName : standNames) {
|
|
|
+ T o = (T) item.getClass().newInstance();
|
|
|
+ BeanUtil.copyProperties(item, o);
|
|
|
+ Method setUniqueName = o.getClass().getMethod("set"+propertyName, String.class);
|
|
|
+ setUniqueName.invoke(o, stdName);
|
|
|
+ retList.add(o);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ retList.add(item);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ retList.add(item);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return retList;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 生成给图谱的入参(推送)
|
|
|
*/
|
|
@@ -959,9 +1053,9 @@ public class CommonFacade {
|
|
|
/**************************化验结构化处理开始*****************************/
|
|
|
List<Lis> lisList = new ArrayList<>();
|
|
|
// 处理主诉化验
|
|
|
- getLisStruct(wordCrfDTO.getChiefLabel().getLises(), lisList, wordCrfDTO.getHospitalId());
|
|
|
+ getLisStruct(wordCrfDTO.getChiefLabel().getLises(), lisList);
|
|
|
// 处理现病史化验
|
|
|
- getLisStruct(wordCrfDTO.getPresentLabel().getLises(), lisList, wordCrfDTO.getHospitalId());
|
|
|
+ getLisStruct(wordCrfDTO.getPresentLabel().getLises(), lisList);
|
|
|
// 统一放置化验结构
|
|
|
if (ListUtil.isNotEmpty(lisList)) {
|
|
|
wordCrfDTO.getLis().addAll(lisList);
|
|
@@ -975,6 +1069,16 @@ public class CommonFacade {
|
|
|
getPacsStruct(pacsLabel, wordCrfDTO.getChiefLabel().getPacsLabel());
|
|
|
// 处理现病史辅检
|
|
|
getPacsStruct(pacsLabel, wordCrfDTO.getPresentLabel().getPacsLabel());
|
|
|
+ //结构化pacs
|
|
|
+ List<com.diagbot.biz.push.entity.Pacs> pacs = wordCrfDTO.getPacs();
|
|
|
+ if(ListUtil.isNotEmpty(pacs)){
|
|
|
+ pacs.forEach(p ->{
|
|
|
+ Item item = new Item();
|
|
|
+ item.setName(p.getName()==null?"":p.getName());
|
|
|
+ item.setUniqueName(p.getUniqueName()==null?"":p.getUniqueName());
|
|
|
+ pacsLabel.getItem().add(item);
|
|
|
+ });
|
|
|
+ }
|
|
|
// 辅检结果去重
|
|
|
if (ListUtil.isNotEmpty(pacsLabel.getRes())) {
|
|
|
dealMsgWithItem(pacsLabel.getRes());
|
|
@@ -1007,8 +1111,8 @@ public class CommonFacade {
|
|
|
if (ListUtil.isNotEmpty(res.getDisease())) {
|
|
|
for (Pacs pacs : res.getDisease()) {
|
|
|
Item item = new Item();
|
|
|
- item.setName(pacs.getName());
|
|
|
- item.setUniqueName(pacs.getStandName());
|
|
|
+ item.setName(pacs.getName()==null?"":pacs.getName());
|
|
|
+ item.setUniqueName(pacs.getStandName()==null?"":pacs.getStandName());
|
|
|
pacsResList.add(item);
|
|
|
}
|
|
|
}
|
|
@@ -1048,43 +1152,18 @@ public class CommonFacade {
|
|
|
*
|
|
|
* @param lises
|
|
|
* @param lisList
|
|
|
- * @param hospitalId
|
|
|
+ *
|
|
|
*/
|
|
|
- public void getLisStruct(List<com.diagbot.model.entity.Lis> lises, List<Lis> lisList, Long hospitalId) {
|
|
|
+ public void getLisStruct(List<com.diagbot.model.entity.Lis> lises, List<Lis> lisList) {
|
|
|
if (ListUtil.isNotEmpty(lises)) {
|
|
|
- List<String> lisNames = lises.stream().map(x -> x.getBigItem().getName()).distinct().collect(Collectors.toList());
|
|
|
- Map<String, Map<String, Map<String, Long>>> configMap = lisConfigFacade.getConfigMap(hospitalId, lisNames, null);
|
|
|
- if (configMap.size() > 0) {
|
|
|
lises.stream().forEach(x -> {
|
|
|
String bigName = x.getBigItem().getName();//大项名
|
|
|
String detailName = x.getName();//小项名
|
|
|
String value = x.getPd().getValue();
|
|
|
String unit = x.getPd().getUnit();
|
|
|
- if (configMap.containsKey(bigName)) {
|
|
|
- Map<String, Map<String, Long>> uniqueDetailMap = configMap.get(bigName);
|
|
|
- if (uniqueDetailMap.containsKey(detailName)) {
|
|
|
- List<String> uniques = uniqueDetailMap.get(detailName).keySet().stream().collect(Collectors.toList());//所有的公表项
|
|
|
- if (ListUtil.isNotEmpty(uniques)) {
|
|
|
- List<Lis> lisStream = uniques.stream().map(z -> {
|
|
|
- return getLis(bigName, detailName, value, unit, z);
|
|
|
- }).collect(Collectors.toList());
|
|
|
- lisList.addAll(lisStream);
|
|
|
- }
|
|
|
- } else {
|
|
|
- Lis lis = getLis(bigName, detailName, value, unit, null);
|
|
|
- lisList.add(lis);
|
|
|
- }
|
|
|
- } else {
|
|
|
- Lis lis = getLis(bigName, detailName, value, unit, null);
|
|
|
- lisList.add(lis);
|
|
|
- }
|
|
|
+ String standName = x.getStandName();
|
|
|
+ lisList.add(getLis(bigName,detailName,value,unit,standName));
|
|
|
});
|
|
|
- } else {
|
|
|
- lises.stream().forEach(x -> {
|
|
|
- Lis lis = getLis(x.getBigItem().getName(), x.getName(), x.getPd().getValue(), x.getPd().getUnit(), null);
|
|
|
- lisList.add(lis);
|
|
|
- });
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
|