|
@@ -87,16 +87,16 @@ public class PushProcess {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ Item diaeaseName = pushVo.getDiseaseName();
|
|
|
Map<String, List<PushBaseDTO>> dis = new HashMap<>();
|
|
|
- if (ruleTypeList.contains("10") && pushVo.getDiseaseName() != null) {
|
|
|
+ if (ruleTypeList.contains("10") && diaeaseName != null) {
|
|
|
List<TreatDTO> collect = new ArrayList<>();
|
|
|
- Item diaeaseName = pushVo.getDiseaseName();
|
|
|
TreatDTO treatDTO = new TreatDTO();
|
|
|
treatDTO.setName(diaeaseName.getName());
|
|
|
String uniqueName = diaeaseName.getUniqueName();
|
|
|
uniqueName = StringUtils.isNotBlank(uniqueName)?uniqueName:diaeaseName.getName();
|
|
|
treatDTO.setUniqueName(uniqueName);
|
|
|
- Map<String,List<String>> reverseInfoByDisName = neoFacade.reverseInfoByDisName(uniqueName);
|
|
|
+ /*Map<String,List<String>> reverseInfoByDisName = neoFacade.reverseInfoByDisName(uniqueName);
|
|
|
if(reverseInfoByDisName.containsKey(StaticTypeEnum.DRUG.getName())){
|
|
|
treatDTO.setMedicineTreat(reverseInfoByDisName.get(StaticTypeEnum.DRUG.getName()).stream().map(x -> {
|
|
|
PushBaseDTO pushBaseDTO = new PushBaseDTO();
|
|
@@ -110,10 +110,33 @@ public class PushProcess {
|
|
|
pushBaseDTO.setName(x);
|
|
|
return pushBaseDTO;
|
|
|
}).collect(Collectors.toList()));
|
|
|
- }
|
|
|
+ }*/
|
|
|
collect.add(treatDTO);
|
|
|
pushDTO.setTreat(collect);
|
|
|
}
|
|
|
+ Map<String,List<String>> reverseInfoByDisName = null;
|
|
|
+ //推送治疗
|
|
|
+ if(diaeaseName != null){
|
|
|
+ String uniqueName = diaeaseName.getUniqueName();
|
|
|
+ uniqueName = StringUtils.isNotBlank(uniqueName)?uniqueName:diaeaseName.getName();
|
|
|
+ reverseInfoByDisName = neoFacade.reverseInfoByDisName(uniqueName);
|
|
|
+ }
|
|
|
+ if(reverseInfoByDisName != null){
|
|
|
+ if (ruleTypeList.contains("8") && reverseInfoByDisName.containsKey(StaticTypeEnum.DRUG.getName())) {
|
|
|
+ pushDTO.setMedicines(reverseInfoByDisName.get(StaticTypeEnum.DRUG.getName()).stream().map(x -> {
|
|
|
+ PushBaseDTO pushBaseDTO = new PushBaseDTO();
|
|
|
+ pushBaseDTO.setName(x);
|
|
|
+ return pushBaseDTO;
|
|
|
+ }).collect(Collectors.toList()));
|
|
|
+ }
|
|
|
+ if (ruleTypeList.contains("9") && reverseInfoByDisName.containsKey(StaticTypeEnum.OPT.getName())) {
|
|
|
+ pushDTO.setOperations(reverseInfoByDisName.get(StaticTypeEnum.OPT.getName()).stream().map(x -> {
|
|
|
+ PushBaseDTO pushBaseDTO = new PushBaseDTO();
|
|
|
+ pushBaseDTO.setName(x);
|
|
|
+ return pushBaseDTO;
|
|
|
+ }).collect(Collectors.toList()));
|
|
|
+ }
|
|
|
+ }
|
|
|
if(ListUtil.isNotEmpty(icssVo.getDiagOrder())){
|
|
|
List<PreResult> diagOrder = icssVo.getDiagOrder();
|
|
|
//把第一个推送出来的诊断set到diagOrder中,再反推
|
|
@@ -172,13 +195,15 @@ public class PushProcess {
|
|
|
|
|
|
//判断该对象是否: 返回ture表示所有属性为null 返回false表示不是所有属性都是null
|
|
|
public static boolean isAllFieldNull(Object obj) throws Exception{
|
|
|
+ List<String> params = Lists.newArrayList("operations", "medicines", "treat");
|
|
|
Class stuCla = (Class) obj.getClass();// 得到类对象
|
|
|
Field[] fs = stuCla.getDeclaredFields();//得到属性集合
|
|
|
boolean flag = true;
|
|
|
for (Field f : fs) {//遍历属性
|
|
|
f.setAccessible(true); // 设置属性是可以访问的(私有的也可以)
|
|
|
+ String name = f.getName();
|
|
|
Object val = f.get(obj);// 得到此属性的值
|
|
|
- if(val!=null) {//只要有1个属性不为空,那么就不是所有的属性值都为空
|
|
|
+ if(val!=null && !params.contains(name)) {//只要有1个属性不为空,那么就不是所有的属性值都为空
|
|
|
flag = false;
|
|
|
break;
|
|
|
}
|