|
|
@@ -242,6 +242,19 @@ public class FactorEnchanceController extends JeecgController<FactorEnchance, IF
|
|
|
}
|
|
|
return Result.OK(factorEnchance);
|
|
|
}
|
|
|
+ @ApiOperation(value = "factor_enchance-通过id查询", notes = "factor_enchance-通过id查询")
|
|
|
+ @GetMapping(value = "/queryDynamicDataById")
|
|
|
+ public Result<FactorEnchance> queryDynamicDataById(@RequestParam(name = "id", required = true) String id) {
|
|
|
+ FactorEnchance factorEnchance = factorEnchanceService.getById(id);
|
|
|
+ if (factorEnchance == null) {
|
|
|
+ return Result.error("未找到对应数据");
|
|
|
+ }
|
|
|
+ if (factorEnchance.getEnhanceType() == 2) {
|
|
|
+ List<FactorCondRela> factorCondRelaList = factorCondRelaService.lambdaQuery().eq(FactorCondRela::getFactorEnhanceId, factorEnchance.getId()).list();
|
|
|
+ factorEnchance.setFactorCondRelaList(factorCondRelaList);
|
|
|
+ }
|
|
|
+ return Result.OK(factorEnchance);
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 导出excel
|
|
|
@@ -302,12 +315,18 @@ public class FactorEnchanceController extends JeecgController<FactorEnchance, IF
|
|
|
public Result<List<CommonResponse>> relaChildrenList(@RequestParam(name = "medicalInsRuleInfoId") Integer medicalInsRuleInfoId, HttpServletRequest req) {
|
|
|
|
|
|
List<RuleFactorRela> list = ruleFactorRelaService.list(medicalInsRuleInfoId);
|
|
|
+ List<FactorEnchance> factorEnchanceList = factorEnchanceService.list();
|
|
|
List<CommonResponse> responses = new ArrayList<>();
|
|
|
if (list.size() > 0) {
|
|
|
for (RuleFactorRela info : list) {
|
|
|
CommonResponse response = new CommonResponse();
|
|
|
response.setId(info.getId());
|
|
|
response.setName("(" + info.getFactorEnhanceId() + ")" + info.getRuleEnchanceName());
|
|
|
+ Optional<FactorEnchance> first = factorEnchanceList.stream().filter(o ->
|
|
|
+ ObjectUtils.nullSafeEquals(o.getId(), info.getFactorEnhanceId())).findFirst();
|
|
|
+ if (first.isPresent()) {
|
|
|
+ response.setType(first.get().getEnhanceType().toString());
|
|
|
+ }
|
|
|
responses.add(response);
|
|
|
}
|
|
|
}
|