|
@@ -37,6 +37,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
|
|
import org.jeecg.modules.medical.vo.CommonResponse;
|
|
import org.jeecg.modules.medical.vo.CommonResponse;
|
|
|
import org.jeecg.modules.message.websocket.WebSocket;
|
|
import org.jeecg.modules.message.websocket.WebSocket;
|
|
|
|
|
+import org.jeecg.modules.system.service.ISysDictService;
|
|
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
|
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
|
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
|
@@ -74,6 +75,7 @@ public class FactorEnchanceController extends JeecgController<FactorEnchance, IF
|
|
|
private final IMedicalInsRuleInfoService medicalInsRuleInfoService;
|
|
private final IMedicalInsRuleInfoService medicalInsRuleInfoService;
|
|
|
private final IRuleFactorRelaService ruleFactorRelaService;
|
|
private final IRuleFactorRelaService ruleFactorRelaService;
|
|
|
private final IEventAttrService eventAttrService;
|
|
private final IEventAttrService eventAttrService;
|
|
|
|
|
+ private final ISysDictService dictService;
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -247,7 +249,7 @@ public class FactorEnchanceController extends JeecgController<FactorEnchance, IF
|
|
|
factorEnchance.setFactorCatalogStr(first.get().getRuleName());
|
|
factorEnchance.setFactorCatalogStr(first.get().getRuleName());
|
|
|
}
|
|
}
|
|
|
factorEnchance.setFactorCatalogId(factorEnchance.getFactorCatalog());
|
|
factorEnchance.setFactorCatalogId(factorEnchance.getFactorCatalog());
|
|
|
- if (factorEnchance.getEnhanceType() == 1 || factorEnchance.getEnhanceType() == 4|| factorEnchance.getEnhanceType() == 7) {
|
|
|
|
|
|
|
+ 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();
|
|
List<FactorAttrRela> inList = factorAttrRelaService.lambdaQuery().eq(FactorAttrRela::getIoType, Constant.INPUT).eq(FactorAttrRela::getFactorEnhanceId, factorEnchance.getId()).list();
|
|
|
if (inList.size() > 0) {
|
|
if (inList.size() > 0) {
|
|
|
inList.sort(Comparator.comparing(FactorAttrRela::getSeqNum));
|
|
inList.sort(Comparator.comparing(FactorAttrRela::getSeqNum));
|
|
@@ -270,7 +272,7 @@ public class FactorEnchanceController extends JeecgController<FactorEnchance, IF
|
|
|
|
|
|
|
|
@ApiOperation(value = "factor_enchance-通过id查询", notes = "factor_enchance-通过id查询")
|
|
@ApiOperation(value = "factor_enchance-通过id查询", notes = "factor_enchance-通过id查询")
|
|
|
@GetMapping(value = "/queryDynamicDataById")
|
|
@GetMapping(value = "/queryDynamicDataById")
|
|
|
- public Result<?> queryDynamicDataById(@RequestParam(name = "id", required = true) String id) {
|
|
|
|
|
|
|
+ public Result<?> queryDynamicDataById(@RequestParam(name = "id", required = false) String id) {
|
|
|
RuleFactorRela ruleFactorRela = ruleFactorRelaService.getById(id);
|
|
RuleFactorRela ruleFactorRela = ruleFactorRelaService.getById(id);
|
|
|
if (ruleFactorRela == null) {
|
|
if (ruleFactorRela == null) {
|
|
|
return Result.error("未找到对应数据");
|
|
return Result.error("未找到对应数据");
|
|
@@ -288,7 +290,7 @@ public class FactorEnchanceController extends JeecgController<FactorEnchance, IF
|
|
|
factorEnchance.setFactorCatalogStr(first.get().getRuleName());
|
|
factorEnchance.setFactorCatalogStr(first.get().getRuleName());
|
|
|
}
|
|
}
|
|
|
factorEnchance.setFactorCatalogId(factorEnchance.getFactorCatalog());
|
|
factorEnchance.setFactorCatalogId(factorEnchance.getFactorCatalog());
|
|
|
- if (factorEnchance.getEnhanceType() == 1 || factorEnchance.getEnhanceType() == 4|| factorEnchance.getEnhanceType() == 7) {
|
|
|
|
|
|
|
+ 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();
|
|
List<FactorAttrRela> inList = factorAttrRelaService.lambdaQuery().eq(FactorAttrRela::getIoType, Constant.INPUT).eq(FactorAttrRela::getFactorEnhanceId, factorEnchance.getId()).list();
|
|
|
if (inList.size() > 0) {
|
|
if (inList.size() > 0) {
|
|
|
inList.sort(Comparator.comparing(FactorAttrRela::getSeqNum));
|
|
inList.sort(Comparator.comparing(FactorAttrRela::getSeqNum));
|
|
@@ -338,52 +340,6 @@ public class FactorEnchanceController extends JeecgController<FactorEnchance, IF
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-// if (dictDtos.size() > 0) {
|
|
|
|
|
-// dictDtos.forEach(it -> {
|
|
|
|
|
-// switch (it.getValue()) {
|
|
|
|
|
-// case "medicineDataType":
|
|
|
|
|
-// it.setComponent("j-dict-select-tag");
|
|
|
|
|
-// it.setDictCode("medicine_data_type");
|
|
|
|
|
-// break;
|
|
|
|
|
-// case "changeClass":
|
|
|
|
|
-// it.setComponent("j-dict-select-tag");
|
|
|
|
|
-// it.setDictCode("change_class");
|
|
|
|
|
-// break;
|
|
|
|
|
-// case "categoriesItems":
|
|
|
|
|
-// it.setComponent("j-dict-select-tag");
|
|
|
|
|
-// it.setDictCode("categories_items");
|
|
|
|
|
-// break;
|
|
|
|
|
-// case "medicalInsLevel":
|
|
|
|
|
-// it.setComponent("j-dict-select-tag");
|
|
|
|
|
-// it.setDictCode("medical_ins_level");
|
|
|
|
|
-// break;
|
|
|
|
|
-// case "doctorLevel":
|
|
|
|
|
-// it.setComponent("j-dict-select-tag");
|
|
|
|
|
-// it.setDictCode("doctor_level");
|
|
|
|
|
-// break;
|
|
|
|
|
-// case "state":
|
|
|
|
|
-// it.setComponent("j-dict-select-tag");
|
|
|
|
|
-// it.setDictCode("state");
|
|
|
|
|
-// break;
|
|
|
|
|
-// case "medicalDiagnoseCode":
|
|
|
|
|
-// it.setComponent("a-textarea");
|
|
|
|
|
-// break;
|
|
|
|
|
-// case "correlationMedicalDiagnoseCode":
|
|
|
|
|
-// it.setComponent("a-textarea");
|
|
|
|
|
-// break;
|
|
|
|
|
-// case "gender":
|
|
|
|
|
-// it.setComponent("j-dict-select-tag");
|
|
|
|
|
-// it.setDictCode("sex");
|
|
|
|
|
-// break;
|
|
|
|
|
-// default:
|
|
|
|
|
-// it.setComponent("a-input");
|
|
|
|
|
-// break;
|
|
|
|
|
-// }
|
|
|
|
|
-// });
|
|
|
|
|
-//
|
|
|
|
|
-// }
|
|
|
|
|
-
|
|
|
|
|
-// LinkedHashMap<String, Object> map = new LinkedHashMap<>();
|
|
|
|
|
String title = "";
|
|
String title = "";
|
|
|
List<MedicalEnchanceDto> dtoList = new ArrayList<>();
|
|
List<MedicalEnchanceDto> dtoList = new ArrayList<>();
|
|
|
switch (enchanceTypeEnum) {
|
|
switch (enchanceTypeEnum) {
|
|
@@ -426,7 +382,6 @@ public class FactorEnchanceController extends JeecgController<FactorEnchance, IF
|
|
|
title = "SQL取值";
|
|
title = "SQL取值";
|
|
|
break;
|
|
break;
|
|
|
case LOGICAL_EXPRESSION:
|
|
case LOGICAL_EXPRESSION:
|
|
|
-
|
|
|
|
|
MedicalEnchanceDto logical1 = new MedicalEnchanceDto();
|
|
MedicalEnchanceDto logical1 = new MedicalEnchanceDto();
|
|
|
logical1.setText("要素提取标题");
|
|
logical1.setText("要素提取标题");
|
|
|
logical1.setValue(factorEnchance.getRuleEnchanceName());
|
|
logical1.setValue(factorEnchance.getRuleEnchanceName());
|
|
@@ -437,45 +392,51 @@ public class FactorEnchanceController extends JeecgController<FactorEnchance, IF
|
|
|
logical2.setValue(factorEnchance.getFactorCatalogStr());
|
|
logical2.setValue(factorEnchance.getFactorCatalogStr());
|
|
|
logical2.setComponent("a-input");
|
|
logical2.setComponent("a-input");
|
|
|
dtoList.add(logical2);
|
|
dtoList.add(logical2);
|
|
|
-
|
|
|
|
|
MedicalEnchanceDto logical3 = new MedicalEnchanceDto();
|
|
MedicalEnchanceDto logical3 = new MedicalEnchanceDto();
|
|
|
logical3.setText("判断类型");
|
|
logical3.setText("判断类型");
|
|
|
logical3.setValue(factorEnchance.getExtAttr1());
|
|
logical3.setValue(factorEnchance.getExtAttr1());
|
|
|
logical3.setComponent("a-input");
|
|
logical3.setComponent("a-input");
|
|
|
dtoList.add(logical3);
|
|
dtoList.add(logical3);
|
|
|
-
|
|
|
|
|
MedicalEnchanceDto logical4 = new MedicalEnchanceDto();
|
|
MedicalEnchanceDto logical4 = new MedicalEnchanceDto();
|
|
|
- // logical4.setComponent("a-input");
|
|
|
|
|
-// map.put("要素提取标题", factorEnchance.getRuleEnchanceName());
|
|
|
|
|
-// map.put("医保规则", factorEnchance.getFactorCatalogStr());
|
|
|
|
|
-// map.put("判断类型", factorEnchance.getExtAttr1());
|
|
|
|
|
|
|
+ List<String> str = new ArrayList<>();
|
|
|
if (factorEnchance.getExtAttr3().equals("0")) {
|
|
if (factorEnchance.getExtAttr3().equals("0")) {
|
|
|
logical4.setText("逻辑表达式");
|
|
logical4.setText("逻辑表达式");
|
|
|
- logical4.setValue(factorEnchance.getFactorCondRelaList());
|
|
|
|
|
-// factorEnchance.getFactorCondRelaList().forEach(it -> {
|
|
|
|
|
-// map.put("逻辑表达式", it.getExtAttr1());
|
|
|
|
|
-// map.put("比较符", it.getOperator());
|
|
|
|
|
-// map.put("引用属性类型", it.getRefAttrType());
|
|
|
|
|
-// if (it.getRefAttrType() == 1) {
|
|
|
|
|
-// map.put("扩展属性", it.getExtAttr1());
|
|
|
|
|
-// } else {
|
|
|
|
|
-// map.put("引用属性标识", it.getRefEventAttrId());
|
|
|
|
|
-// }
|
|
|
|
|
-// });
|
|
|
|
|
|
|
+ factorEnchance.getFactorCondRelaList().forEach(it -> {
|
|
|
|
|
+ EventAttr one = eventAttrService.lambdaQuery().eq(EventAttr::getId, it.getEventAttrId()).one();
|
|
|
|
|
+ String string = "";
|
|
|
|
|
+ String type = "";
|
|
|
|
|
+ String text = "";
|
|
|
|
|
+ String operator = "";
|
|
|
|
|
+ if (one != null) {
|
|
|
|
|
+ operator = dictService.queryDictTextByKey("operator", it.getOperator().toString());
|
|
|
|
|
+ if (it.getRefAttrType() == 1) {
|
|
|
|
|
+ type = "扩展属性:";
|
|
|
|
|
+ text = it.getExtAttr1();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ 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);
|
|
|
|
|
+ str.add(concat);
|
|
|
|
|
+ });
|
|
|
|
|
+ logical4.setValue(str);
|
|
|
} else {
|
|
} else {
|
|
|
- logical4.setText("判断表达式字符串");
|
|
|
|
|
- logical4.setValue(factorEnchance.getEnhanceValue());
|
|
|
|
|
|
|
+ logical4.setText("判断表达式字符串:");
|
|
|
|
|
+ String string = factorEnchance.getEnhanceValue();
|
|
|
|
|
+
|
|
|
|
|
+ str.add(string);
|
|
|
|
|
+ logical4.setValue(str);
|
|
|
}
|
|
}
|
|
|
dtoList.add(logical4);
|
|
dtoList.add(logical4);
|
|
|
-
|
|
|
|
|
MedicalEnchanceDto logical5 = new MedicalEnchanceDto();
|
|
MedicalEnchanceDto logical5 = new MedicalEnchanceDto();
|
|
|
logical5.setText("输出要素");
|
|
logical5.setText("输出要素");
|
|
|
logical5.setValue(factorEnchance.getOutParamNameList());
|
|
logical5.setValue(factorEnchance.getOutParamNameList());
|
|
|
logical5.setComponent("a-select");
|
|
logical5.setComponent("a-select");
|
|
|
dtoList.add(logical5);
|
|
dtoList.add(logical5);
|
|
|
-// map.put("输出要素", factorEnchance.getOutParamList());
|
|
|
|
|
title = "逻辑判断";
|
|
title = "逻辑判断";
|
|
|
-
|
|
|
|
|
break;
|
|
break;
|
|
|
case PLUGIN:
|
|
case PLUGIN:
|
|
|
MedicalEnchanceDto plugin1 = new MedicalEnchanceDto();
|
|
MedicalEnchanceDto plugin1 = new MedicalEnchanceDto();
|
|
@@ -488,22 +449,16 @@ public class FactorEnchanceController extends JeecgController<FactorEnchance, IF
|
|
|
plugin2.setValue(factorEnchance.getFactorCatalogStr());
|
|
plugin2.setValue(factorEnchance.getFactorCatalogStr());
|
|
|
plugin2.setComponent("a-input");
|
|
plugin2.setComponent("a-input");
|
|
|
dtoList.add(plugin2);
|
|
dtoList.add(plugin2);
|
|
|
-// map.put("插件名称", factorEnchance.getRuleEnchanceName());
|
|
|
|
|
-// map.put("医保规则", factorEnchance.getFactorCatalogStr());
|
|
|
|
|
MedicalEnchanceDto plugin3 = new MedicalEnchanceDto();
|
|
MedicalEnchanceDto plugin3 = new MedicalEnchanceDto();
|
|
|
plugin3.setText("描述");
|
|
plugin3.setText("描述");
|
|
|
plugin3.setValue(factorEnchance.getRemarks());
|
|
plugin3.setValue(factorEnchance.getRemarks());
|
|
|
plugin3.setComponent("a-input");
|
|
plugin3.setComponent("a-input");
|
|
|
dtoList.add(plugin3);
|
|
dtoList.add(plugin3);
|
|
|
-// map.put("描述", factorEnchance.getRemarks());
|
|
|
|
|
MedicalEnchanceDto plugin4 = new MedicalEnchanceDto();
|
|
MedicalEnchanceDto plugin4 = new MedicalEnchanceDto();
|
|
|
plugin4.setText("插件Bean名称");
|
|
plugin4.setText("插件Bean名称");
|
|
|
plugin4.setValue(factorEnchance.getEnhanceValue());
|
|
plugin4.setValue(factorEnchance.getEnhanceValue());
|
|
|
plugin4.setComponent("a-input");
|
|
plugin4.setComponent("a-input");
|
|
|
dtoList.add(plugin4);
|
|
dtoList.add(plugin4);
|
|
|
-// map.put("插件Bean名称", factorEnchance.getEnhanceValue());
|
|
|
|
|
-// map.put("输入要素", factorEnchance.getInParamList());
|
|
|
|
|
-// map.put("输出要素", factorEnchance.getOutParamList());
|
|
|
|
|
MedicalEnchanceDto plugin5 = new MedicalEnchanceDto();
|
|
MedicalEnchanceDto plugin5 = new MedicalEnchanceDto();
|
|
|
plugin5.setText("输入要素");
|
|
plugin5.setText("输入要素");
|
|
|
plugin5.setValue(factorEnchance.getInParamNameList());
|
|
plugin5.setValue(factorEnchance.getInParamNameList());
|
|
@@ -515,7 +470,6 @@ public class FactorEnchanceController extends JeecgController<FactorEnchance, IF
|
|
|
plugin6.setComponent("a-select");
|
|
plugin6.setComponent("a-select");
|
|
|
dtoList.add(plugin6);
|
|
dtoList.add(plugin6);
|
|
|
title = "插件提取";
|
|
title = "插件提取";
|
|
|
-
|
|
|
|
|
break;
|
|
break;
|
|
|
case CONSTANT:
|
|
case CONSTANT:
|
|
|
MedicalEnchanceDto constant1 = new MedicalEnchanceDto();
|
|
MedicalEnchanceDto constant1 = new MedicalEnchanceDto();
|
|
@@ -528,22 +482,17 @@ public class FactorEnchanceController extends JeecgController<FactorEnchance, IF
|
|
|
constant2.setValue(factorEnchance.getFactorCatalogStr());
|
|
constant2.setValue(factorEnchance.getFactorCatalogStr());
|
|
|
constant2.setComponent("a-input");
|
|
constant2.setComponent("a-input");
|
|
|
dtoList.add(constant2);
|
|
dtoList.add(constant2);
|
|
|
-// map.put("要素提取标题", factorEnchance.getRuleEnchanceName());
|
|
|
|
|
-// map.put("医保规则", factorEnchance.getFactorCatalogStr());
|
|
|
|
|
-// map.put("常量值", factorEnchance.getExtAttr1());
|
|
|
|
|
MedicalEnchanceDto constant3 = new MedicalEnchanceDto();
|
|
MedicalEnchanceDto constant3 = new MedicalEnchanceDto();
|
|
|
constant3.setText("常量值");
|
|
constant3.setText("常量值");
|
|
|
constant3.setValue(factorEnchance.getExtAttr1());
|
|
constant3.setValue(factorEnchance.getExtAttr1());
|
|
|
constant3.setComponent("a-input");
|
|
constant3.setComponent("a-input");
|
|
|
dtoList.add(constant3);
|
|
dtoList.add(constant3);
|
|
|
-// map.put("输出要素", factorEnchance.getOutParamList());
|
|
|
|
|
MedicalEnchanceDto constant4 = new MedicalEnchanceDto();
|
|
MedicalEnchanceDto constant4 = new MedicalEnchanceDto();
|
|
|
constant4.setText("输出要素");
|
|
constant4.setText("输出要素");
|
|
|
constant4.setValue(factorEnchance.getOutParamNameList());
|
|
constant4.setValue(factorEnchance.getOutParamNameList());
|
|
|
constant4.setComponent("a-select");
|
|
constant4.setComponent("a-select");
|
|
|
dtoList.add(constant4);
|
|
dtoList.add(constant4);
|
|
|
title = "常量赋值";
|
|
title = "常量赋值";
|
|
|
-
|
|
|
|
|
break;
|
|
break;
|
|
|
case PROPERTIES:
|
|
case PROPERTIES:
|
|
|
MedicalEnchanceDto prop1 = new MedicalEnchanceDto();
|
|
MedicalEnchanceDto prop1 = new MedicalEnchanceDto();
|
|
@@ -556,10 +505,6 @@ public class FactorEnchanceController extends JeecgController<FactorEnchance, IF
|
|
|
prop2.setValue(factorEnchance.getFactorCatalogStr());
|
|
prop2.setValue(factorEnchance.getFactorCatalogStr());
|
|
|
prop2.setComponent("a-input");
|
|
prop2.setComponent("a-input");
|
|
|
dtoList.add(prop2);
|
|
dtoList.add(prop2);
|
|
|
-// map.put("要素提取标题", factorEnchance.getRuleEnchanceName());
|
|
|
|
|
-// map.put("医保规则", factorEnchance.getFactorCatalogStr());
|
|
|
|
|
-// map.put("输入要素", factorEnchance.getInParamList());
|
|
|
|
|
-// map.put("输出要素", factorEnchance.getOutParamList());
|
|
|
|
|
MedicalEnchanceDto prop3 = new MedicalEnchanceDto();
|
|
MedicalEnchanceDto prop3 = new MedicalEnchanceDto();
|
|
|
prop3.setText("输入要素");
|
|
prop3.setText("输入要素");
|
|
|
prop3.setValue(factorEnchance.getInParamNameList());
|
|
prop3.setValue(factorEnchance.getInParamNameList());
|
|
@@ -571,14 +516,11 @@ public class FactorEnchanceController extends JeecgController<FactorEnchance, IF
|
|
|
prop4.setComponent("a-select");
|
|
prop4.setComponent("a-select");
|
|
|
dtoList.add(prop4);
|
|
dtoList.add(prop4);
|
|
|
title = "属性赋值";
|
|
title = "属性赋值";
|
|
|
-
|
|
|
|
|
break;
|
|
break;
|
|
|
default:
|
|
default:
|
|
|
log.error("有配置的未处理类型");
|
|
log.error("有配置的未处理类型");
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
if (factorEnchance == null) {
|
|
if (factorEnchance == null) {
|
|
|
return Result.error("未找到对应数据");
|
|
return Result.error("未找到对应数据");
|
|
|
}
|
|
}
|