|
|
@@ -291,54 +291,58 @@ public class FactorEnchanceController extends JeecgController<FactorEnchance, IF
|
|
|
}
|
|
|
factorEnchance.setFactorCatalogId(factorEnchance.getFactorCatalog());
|
|
|
if (factorEnchance.getEnhanceType() == 1 || factorEnchance.getEnhanceType() == 4 || factorEnchance.getEnhanceType() == 7) {
|
|
|
- List<FactorAttrRela> inList = factorAttrRelaService.lambdaQuery().eq(FactorAttrRela::getIoType, Constant.INPUT).eq(FactorAttrRela::getFactorEnhanceId, factorEnchance.getId()).list();
|
|
|
- if (inList.size() > 0) {
|
|
|
- inList.sort(Comparator.comparing(FactorAttrRela::getSeqNum));
|
|
|
- List<Integer> in = inList.stream().map(item -> item.getEventAttrId()).collect(Collectors.toList());
|
|
|
- List<EventAttr> list = eventAttrService.lambdaQuery().in(EventAttr::getId, in).list();
|
|
|
- if (list.size() > 0) {
|
|
|
- List<String> collect = list.stream().map(item -> item.getChName()).collect(Collectors.toList());
|
|
|
- factorEnchance.setInParamNameList(collect);
|
|
|
- }
|
|
|
- }
|
|
|
- List<FactorAttrRela> outList = factorAttrRelaService.lambdaQuery().eq(FactorAttrRela::getIoType, Constant.OUTPUT).eq(FactorAttrRela::getFactorEnhanceId, factorEnchance.getId()).list();
|
|
|
- if (outList.size() > 0) {
|
|
|
- outList.sort(Comparator.comparing(FactorAttrRela::getSeqNum));
|
|
|
- List<Integer> out = outList.stream().map(item -> item.getEventAttrId()).collect(Collectors.toList());
|
|
|
- List<EventAttr> list = eventAttrService.lambdaQuery().in(EventAttr::getId, out).list();
|
|
|
- if (list.size() > 0) {
|
|
|
- List<String> collect = list.stream().map(item -> item.getChName()).collect(Collectors.toList());
|
|
|
- factorEnchance.setOutParamNameList(collect);
|
|
|
- }
|
|
|
- }
|
|
|
+ List<String> list = eventAttrService.getByInById(factorEnchance.getId());
|
|
|
+ factorEnchance.setInParamNameList(list);
|
|
|
+// List<String> outList = eventAttrService.getByOutById(factorEnchance.getId());
|
|
|
+// factorEnchance.setOutParamNameList(outList);
|
|
|
+
|
|
|
}
|
|
|
if (factorEnchance.getEnhanceType() == 2 && factorEnchance.getExtAttr3().equals("0")) {
|
|
|
List<FactorCondRela> factorCondRelaList = factorCondRelaService.lambdaQuery().eq(FactorCondRela::getFactorEnhanceId, factorEnchance.getId()).list();
|
|
|
factorEnchance.setFactorCondRelaList(factorCondRelaList);
|
|
|
- List<FactorAttrRela> outList = factorAttrRelaService.lambdaQuery().eq(FactorAttrRela::getIoType, Constant.OUTPUT).eq(FactorAttrRela::getFactorEnhanceId, factorEnchance.getId()).list();
|
|
|
- if (outList.size() > 0) {
|
|
|
- outList.sort(Comparator.comparing(FactorAttrRela::getSeqNum));
|
|
|
- List<Integer> out = outList.stream().map(item -> item.getEventAttrId()).collect(Collectors.toList());
|
|
|
- List<EventAttr> list = eventAttrService.lambdaQuery().in(EventAttr::getId, out).list();
|
|
|
- if (list.size() > 0) {
|
|
|
- List<String> collect = list.stream().map(item -> item.getChName()).collect(Collectors.toList());
|
|
|
- factorEnchance.setOutParamNameList(collect);
|
|
|
- }
|
|
|
- }
|
|
|
+// List<FactorAttrRela> outList = factorAttrRelaService.lambdaQuery().eq(FactorAttrRela::getIoType, Constant.OUTPUT).eq(FactorAttrRela::getFactorEnhanceId, factorEnchance.getId()).list();
|
|
|
+// if (outList.size() > 0) {
|
|
|
+// outList.sort(Comparator.comparing(FactorAttrRela::getSeqNum));
|
|
|
+// List<Integer> out = outList.stream().map(item -> item.getEventAttrId()).collect(Collectors.toList());
|
|
|
+// List<EventAttr> list = eventAttrService.lambdaQuery().in(EventAttr::getId, out).list();
|
|
|
+// if (list.size() > 0) {
|
|
|
+// List<String> collect = list.stream().map(item -> item.getChName()).collect(Collectors.toList());
|
|
|
+// factorEnchance.setOutParamNameList(collect);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// List<String> outList = eventAttrService.getByOutById(factorEnchance.getId());
|
|
|
+// factorEnchance.setOutParamNameList(outList);
|
|
|
}
|
|
|
if (factorEnchance.getEnhanceType() == 6) {
|
|
|
List<FactorCondRela> factorCondRelaList = factorCondRelaService.lambdaQuery().eq(FactorCondRela::getFactorEnhanceId, factorEnchance.getId()).list();
|
|
|
factorEnchance.setFactorCondRelaList(factorCondRelaList);
|
|
|
- List<FactorAttrRela> outList = factorAttrRelaService.lambdaQuery().eq(FactorAttrRela::getIoType, Constant.OUTPUT).eq(FactorAttrRela::getFactorEnhanceId, factorEnchance.getId()).list();
|
|
|
- if (outList.size() > 0) {
|
|
|
- outList.sort(Comparator.comparing(FactorAttrRela::getSeqNum));
|
|
|
- List<Integer> out = outList.stream().map(item -> item.getEventAttrId()).collect(Collectors.toList());
|
|
|
- List<EventAttr> list = eventAttrService.lambdaQuery().in(EventAttr::getId, out).list();
|
|
|
- if (list.size() > 0) {
|
|
|
- List<String> collect = list.stream().map(item -> item.getChName()).collect(Collectors.toList());
|
|
|
- factorEnchance.setOutParamNameList(collect);
|
|
|
- }
|
|
|
+// List<FactorAttrRela> outList = factorAttrRelaService.lambdaQuery().eq(FactorAttrRela::getIoType, Constant.OUTPUT).eq(FactorAttrRela::getFactorEnhanceId, factorEnchance.getId()).list();
|
|
|
+// if (outList.size() > 0) {
|
|
|
+// outList.sort(Comparator.comparing(FactorAttrRela::getSeqNum));
|
|
|
+// List<Integer> out = outList.stream().map(item -> item.getEventAttrId()).collect(Collectors.toList());
|
|
|
+// List<EventAttr> list = eventAttrService.lambdaQuery().in(EventAttr::getId, out).list();
|
|
|
+// if (list.size() > 0) {
|
|
|
+// List<String> collect = list.stream().map(item -> item.getChName()).collect(Collectors.toList());
|
|
|
+// factorEnchance.setOutParamNameList(collect);
|
|
|
+// }
|
|
|
+// }
|
|
|
+
|
|
|
+ }
|
|
|
+// case 1: 'SQL取值'
|
|
|
+// case 2: 逻辑判断'
|
|
|
+// case 4: 插件提取'
|
|
|
+// case 6: '常量赋值'
|
|
|
+// case 7: 属性赋值'
|
|
|
+ if(factorEnchance.getEnhanceType()==1 ||factorEnchance.getEnhanceType()==4){
|
|
|
+ List<String> outList = eventAttrService.getByOutById(factorEnchance.getId());
|
|
|
+ factorEnchance.setOutParamNameList(outList);
|
|
|
+ }else{
|
|
|
+ EventAttr byId = eventAttrService.getById(factorEnchance.getEventAttrId());
|
|
|
+ List<String> name = new ArrayList<>();
|
|
|
+ if(byId!=null){
|
|
|
+ name.add(byId.getChName());
|
|
|
}
|
|
|
+ factorEnchance.setOutParamNameList(name);
|
|
|
}
|
|
|
String title = "";
|
|
|
List<MedicalEnchanceDto> dtoList = new ArrayList<>();
|
|
|
@@ -410,16 +414,16 @@ public class FactorEnchanceController extends JeecgController<FactorEnchance, IF
|
|
|
if (one != null) {
|
|
|
operator = dictService.queryDictTextByKey("operator", it.getOperator().toString());
|
|
|
if (it.getRefAttrType() == 1) {
|
|
|
- type = "扩展属性:";
|
|
|
+// type = "扩展属性:";
|
|
|
text = it.getExtAttr1();
|
|
|
} else {
|
|
|
- type = "引用属性标识:";
|
|
|
+// type = "引用属性标识:";
|
|
|
EventAttr two = eventAttrService.lambdaQuery().eq(EventAttr::getId, it.getRefEventAttrId()).one();
|
|
|
text = two.getChName();
|
|
|
}
|
|
|
}
|
|
|
- String concat = string.concat("逻辑表达式:").concat(one.getChName()+";").concat("比较符:")
|
|
|
- .concat(operator+";").concat("引用属性类型:").concat(type).concat(text);
|
|
|
+ String concat = string.concat(one.getChName() + "(" + one.getEnName() + ")")
|
|
|
+ .concat(operator).concat(type).concat(text);
|
|
|
str.add(concat);
|
|
|
});
|
|
|
logical4.setValue(str);
|