|
@@ -0,0 +1,376 @@
|
|
|
+package com.diagbot.aggregate;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.diagbot.dto.AllRulesDTO;
|
|
|
+import com.diagbot.dto.RuleBaseDTO;
|
|
|
+import com.diagbot.dto.RuleBaseInitDTO;
|
|
|
+import com.diagbot.vo.RuleBaseQueryVO;
|
|
|
+import com.diagbot.dto.RuleConditionDTO;
|
|
|
+import com.diagbot.dto.RuleConditionInitDTO;
|
|
|
+import com.diagbot.dto.RuleDTO;
|
|
|
+import com.diagbot.dto.RuleIdDTO;
|
|
|
+import com.diagbot.dto.RuleInitDTO;
|
|
|
+import com.diagbot.entity.KlRuleSearch;
|
|
|
+import com.diagbot.enums.BaseTypeEnum;
|
|
|
+import com.diagbot.enums.LexiconEnum;
|
|
|
+import com.diagbot.enums.RedisEnum;
|
|
|
+import com.diagbot.enums.RuleTypeEnum;
|
|
|
+import com.diagbot.exception.CommonErrorCode;
|
|
|
+import com.diagbot.exception.CommonException;
|
|
|
+import com.diagbot.facade.KlRuleFacade;
|
|
|
+import com.diagbot.service.KlRuleSearchService;
|
|
|
+import com.diagbot.util.BeanUtil;
|
|
|
+import com.diagbot.util.EntityUtil;
|
|
|
+import com.diagbot.util.ListUtil;
|
|
|
+import com.diagbot.util.RedisUtil;
|
|
|
+import io.github.lvyahui8.spring.annotation.DataConsumer;
|
|
|
+import io.github.lvyahui8.spring.annotation.DataProvider;
|
|
|
+import io.github.lvyahui8.spring.annotation.InvokeParameter;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.collections.MapUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Qualifier;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.HashSet;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @Description:
|
|
|
+ * @author: gaodm
|
|
|
+ * @time: 2021/5/31 17:14
|
|
|
+ */
|
|
|
+@Component
|
|
|
+@Slf4j
|
|
|
+public class RuleAggregate {
|
|
|
+ @Autowired
|
|
|
+ private KlRuleFacade klRuleFacade;
|
|
|
+ @Autowired
|
|
|
+ private RedisUtil redisUtil;
|
|
|
+ @Autowired
|
|
|
+ @Qualifier("klRuleSearchServiceImpl")
|
|
|
+ private KlRuleSearchService klRuleSearchService;
|
|
|
+
|
|
|
+ @DataProvider("getAllRules")
|
|
|
+ public AllRulesDTO getAllRules(
|
|
|
+ @DataConsumer("getRuleInit") Map<String, List<RuleInitDTO>> ruleInits,
|
|
|
+ @DataConsumer("getRuleConditionInit") Map<Integer, Map<String, List<RuleConditionInitDTO>>> ruleConditionInits,
|
|
|
+ @DataConsumer("getRuleBaseInit") Map<Integer, List<RuleBaseInitDTO>> ruleBaseInits) {
|
|
|
+ try {
|
|
|
+ //有效规则Map
|
|
|
+ Map<String, RuleDTO> ruleDTOMap = new HashMap();
|
|
|
+ //药物过敏源
|
|
|
+ Map<String, Integer> drugAllergen = new HashMap<>();
|
|
|
+ //规则搜索有效的规则ID
|
|
|
+ HashSet<Long> ruleIdSet = new HashSet<>();
|
|
|
+ List<KlRuleSearch> klRuleSearchList = new ArrayList<>();
|
|
|
+ //结果判空第一层规则类型
|
|
|
+ if (MapUtils.isNotEmpty(ruleInits)) {
|
|
|
+ for (String ruleKey : ruleInits.keySet()) {
|
|
|
+ RuleInitDTO ruleInitZeroDTO = ruleInits.get(ruleKey).get(0);
|
|
|
+ RuleDTO ruleDTO = new RuleDTO();
|
|
|
+ ruleDTO.setLibName(ruleInitZeroDTO.getLibName());
|
|
|
+ ruleDTO.setLibType(ruleInitZeroDTO.getLibType());
|
|
|
+ ruleDTO.setRuleType(ruleInitZeroDTO.getRuleType());
|
|
|
+ //药物过敏源相关
|
|
|
+ Boolean allergenAdd = false;
|
|
|
+ if (ruleDTO.getRuleType().equals(RuleTypeEnum.bill.getKey())
|
|
|
+ && ruleDTO.getLibType().equals(LexiconEnum.Medicine.getKey())) {
|
|
|
+ allergenAdd = true;
|
|
|
+ }
|
|
|
+ Map<String, Integer> ruleConditionMap = new HashMap<>();
|
|
|
+ for (RuleInitDTO ruleInitDTO : ruleInits.get(ruleKey)) {
|
|
|
+ if (ruleInitDTO.getHasSubCond().equals(1)) {
|
|
|
+ Map<String, List<RuleConditionInitDTO>> map = ruleConditionInits.get(ruleInitDTO.getRuleId());
|
|
|
+ //结果判空第二层条件组别
|
|
|
+ if (MapUtils.isNotEmpty(map)) {
|
|
|
+ for (String ruleGroup : map.keySet()) {
|
|
|
+ RuleConditionDTO ruleConditionDTO = new RuleConditionDTO();
|
|
|
+ ruleConditionDTO.setHasSubCond(ruleInitDTO.getHasSubCond());
|
|
|
+ ruleConditionDTO.setDescription(ruleInitDTO.getDescription());
|
|
|
+ ruleConditionDTO.setRuleGroup(ruleGroup);
|
|
|
+ //结果判空第三层条件明细
|
|
|
+ if (ListUtil.isNotEmpty(map.get(ruleGroup))) {
|
|
|
+ List<List<RuleBaseDTO>> ruleBaseList = new ArrayList<>();
|
|
|
+ for (RuleConditionInitDTO ruleConditionInitDTO : map.get(ruleGroup)) {
|
|
|
+ ruleConditionDTO.setMsg(ruleConditionInitDTO.getMsg());
|
|
|
+ List<RuleBaseInitDTO> ruleBaseInitDTOList = ruleBaseInits.get(ruleConditionInitDTO.getRuleBaseId());
|
|
|
+ if (ListUtil.isNotEmpty(ruleBaseInitDTOList)) {
|
|
|
+ List<RuleBaseDTO> ruleBaseDTOList = BeanUtil.listCopyTo(ruleBaseInitDTOList, RuleBaseDTO.class);
|
|
|
+ ruleBaseList.add(ruleBaseDTOList);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //笛卡尔积
|
|
|
+ List<List<RuleBaseDTO>> ruleBaseGroup = new ArrayList<>();
|
|
|
+ descartes(ruleBaseList, ruleBaseGroup, 0, new ArrayList<>());
|
|
|
+ //药物过敏源相关
|
|
|
+ if (allergenAdd
|
|
|
+ && ruleBaseGroup.size() == 1) {
|
|
|
+ allergenAdd = true;
|
|
|
+ }
|
|
|
+ for (List<RuleBaseDTO> ruleBaseDTOList : ruleBaseGroup) {
|
|
|
+ RuleConditionDTO ruleConditionDTO1 = new RuleConditionDTO();
|
|
|
+ ruleConditionDTO1.setHasSubCond(ruleConditionDTO.getHasSubCond());
|
|
|
+ ruleConditionDTO1.setRuleGroup(ruleConditionDTO.getRuleGroup());
|
|
|
+ ruleConditionDTO1.setDescription(ruleConditionDTO.getDescription());
|
|
|
+ ruleConditionDTO1.setMsg(ruleConditionDTO.getMsg());
|
|
|
+ ruleConditionDTO1.getRuleBaseDTOList().addAll(ruleBaseDTOList);
|
|
|
+ if (!ruleConditionMap.containsKey(ruleConditionDTO1.toString())) {
|
|
|
+ ruleDTO.getRuleConditionDTOList().add(ruleConditionDTO1);
|
|
|
+ //药物过敏源相关
|
|
|
+ if (allergenAdd
|
|
|
+ && ruleBaseDTOList.size() == 1) {
|
|
|
+ RuleBaseDTO ruleBaseDTO = ruleBaseDTOList.get(0);
|
|
|
+ if (ruleBaseDTO.getBaseType().equals(BaseTypeEnum.B4.getKey())
|
|
|
+ && ruleDTO.getLibType().equals(ruleBaseDTO.getBaseLibType())
|
|
|
+ && ruleDTO.getLibName().equals(ruleBaseDTO.getBaseLibName())) {
|
|
|
+ if (!drugAllergen.containsKey(ruleDTO.getLibName())) {
|
|
|
+ drugAllergen.put(ruleDTO.getLibName(), 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ruleConditionMap.put(ruleConditionDTO1.toString(), 1);
|
|
|
+ //规则搜索有效的规则ID
|
|
|
+ if (!ruleIdSet.contains(ruleInitDTO.getRuleId())) {
|
|
|
+ ruleIdSet.add(ruleInitDTO.getRuleId());
|
|
|
+ KlRuleSearch klRuleSearch = new KlRuleSearch();
|
|
|
+ klRuleSearch.setId(ruleInitDTO.getRuleId());
|
|
|
+ klRuleSearchList.add(klRuleSearch);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ RuleConditionDTO ruleConditionDTO = new RuleConditionDTO();
|
|
|
+ ruleConditionDTO.setHasSubCond(ruleInitDTO.getHasSubCond());
|
|
|
+ ruleConditionDTO.setDescription(ruleInitDTO.getDescription());
|
|
|
+ ruleConditionDTO.setMsg(ruleInitDTO.getMsg());
|
|
|
+ //无条件
|
|
|
+ ruleConditionDTO.setRuleGroup(ruleInitDTO.getRuleId() + "-1");
|
|
|
+ ruleConditionDTO.getRuleBaseDTOList().add(new RuleBaseDTO());
|
|
|
+ if (!ruleConditionMap.containsKey(ruleConditionDTO.toString())) {
|
|
|
+ ruleDTO.getRuleConditionDTOList().add(ruleConditionDTO);
|
|
|
+ ruleConditionMap.put(ruleConditionDTO.toString(), 1);
|
|
|
+ //规则搜索有效的规则ID
|
|
|
+ if (!ruleIdSet.contains(ruleInitDTO.getRuleId())) {
|
|
|
+ ruleIdSet.add(ruleInitDTO.getRuleId());
|
|
|
+ KlRuleSearch klRuleSearch = new KlRuleSearch();
|
|
|
+ klRuleSearch.setId(ruleInitDTO.getRuleId());
|
|
|
+ klRuleSearchList.add(klRuleSearch);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ruleDTOMap.put(RedisEnum.allRule.getName() + ruleDTO.getLibType() + "_" + ruleDTO.getLibName() + "_" + ruleDTO.getRuleType(), ruleDTO);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //出参设置
|
|
|
+ AllRulesDTO allRulesDTO = new AllRulesDTO();
|
|
|
+ allRulesDTO.setRuleDTOMap(ruleDTOMap);
|
|
|
+ allRulesDTO.setDrugAllergen(drugAllergen);
|
|
|
+ allRulesDTO.setKlRuleSearchList(klRuleSearchList);
|
|
|
+ return allRulesDTO;
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "全部规则加载出错:" + e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @DataProvider("getRuleInit")
|
|
|
+ public Map<String, List<RuleInitDTO>> getRuleInit() {
|
|
|
+ List<RuleInitDTO> list = klRuleFacade.getRuleInitDTO();
|
|
|
+ return EntityUtil.makeEntityListMap(list, "conceptGroup");
|
|
|
+ }
|
|
|
+
|
|
|
+ // @DataProvider("getRuleInit")
|
|
|
+ // public Map<String, List<RuleInitDTO>> getRuleInit(
|
|
|
+ // @DataConsumer("getRuleInitNotHaveClass") List<RuleInitDTO> ruleNotHaveClass,
|
|
|
+ // @DataConsumer("getRuleInitHaveClass") List<RuleInitDTO> ruleHaveClass) {
|
|
|
+ // List<RuleInitDTO> list = new ArrayList<>();
|
|
|
+ // if (ListUtil.isNotEmpty(ruleNotHaveClass)) {
|
|
|
+ // list.addAll(ruleNotHaveClass);
|
|
|
+ // }
|
|
|
+ // if (ListUtil.isNotEmpty(ruleHaveClass)) {
|
|
|
+ // list.addAll(ruleHaveClass);
|
|
|
+ // }
|
|
|
+ // return EntityUtil.makeEntityListMap(list, "conceptGroup");
|
|
|
+ // }
|
|
|
+
|
|
|
+ @DataProvider("getRuleConditionInit")
|
|
|
+ public Map<Long, Map<String, List<RuleConditionInitDTO>>> getRuleConditionInit() {
|
|
|
+ List<RuleConditionInitDTO> list = klRuleFacade.getRuleConditionInitDTO();
|
|
|
+ Map<Long, List<RuleConditionInitDTO>> map = EntityUtil.makeEntityListMap(list, "ruleId");
|
|
|
+ Map<Long, Map<String, List<RuleConditionInitDTO>>> res = new HashMap<>();
|
|
|
+ for (Long ruleId : map.keySet()) {
|
|
|
+ res.put(ruleId, EntityUtil.makeEntityListMap(map.get(ruleId), "ruleGroup"));
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ @DataProvider("getRuleBaseInit")
|
|
|
+ public Map<Long, List<RuleBaseInitDTO>> getRuleBaseInit(
|
|
|
+ @DataConsumer("getRuleBaseInitNotHaveClass") List<RuleBaseInitDTO> ruleBaseNotHaveClass,
|
|
|
+ @DataConsumer("getRuleBaseInitHaveClass") List<RuleBaseInitDTO> ruleBaseHaveClass) {
|
|
|
+ List<RuleBaseInitDTO> list = new ArrayList<>();
|
|
|
+ if (ListUtil.isNotEmpty(ruleBaseNotHaveClass)) {
|
|
|
+ list.addAll(ruleBaseNotHaveClass);
|
|
|
+ }
|
|
|
+ if (ListUtil.isNotEmpty(ruleBaseHaveClass)) {
|
|
|
+ list.addAll(ruleBaseHaveClass);
|
|
|
+ }
|
|
|
+ return EntityUtil.makeEntityListMap(list, "ruleBaseId");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @DataProvider("getRuleInitNotHaveClass")
|
|
|
+ public List<RuleInitDTO> getRuleInitNotHaveClass() {
|
|
|
+ return klRuleFacade.getRuleInitDTONotHaveClass();
|
|
|
+ }
|
|
|
+
|
|
|
+ @DataProvider("getRuleInitHaveClass")
|
|
|
+ public List<RuleInitDTO> getRuleInitHaveClass() {
|
|
|
+ return klRuleFacade.getRuleInitDTOHaveClass();
|
|
|
+ }
|
|
|
+
|
|
|
+ @DataProvider("getRuleBaseInitNotHaveClass")
|
|
|
+ public List<RuleBaseInitDTO> getRuleBaseInitNotHaveClass() {
|
|
|
+ return klRuleFacade.getRuleBaseInitDTONotHaveClass();
|
|
|
+ }
|
|
|
+
|
|
|
+ @DataProvider("getRuleBaseInitHaveClass")
|
|
|
+ public List<RuleBaseInitDTO> getRuleBaseInitHaveClass() {
|
|
|
+ return klRuleFacade.getRuleBaseInitDTOHaveClass();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Discription: 笛卡尔乘积算法
|
|
|
+ * 把一个List{[1,2],[A,B],[a,b]} 转化成
|
|
|
+ * List{[1,A,a],[1,A,b],[1,B,a],[1,B,b],[2,A,a],[2,A,b],[2,B,a],[2,B,b]} 数组输出
|
|
|
+ *
|
|
|
+ * @param dimensionValue 原List
|
|
|
+ * @param result 通过乘积转化后的数组
|
|
|
+ * @param layer 中间参数
|
|
|
+ * @param currentList 中间参数
|
|
|
+ */
|
|
|
+ public static <T> void descartes(List<List<T>> dimensionValue, List<List<T>> result, int layer, List<T> currentList) {
|
|
|
+ if (layer < dimensionValue.size() - 1) {
|
|
|
+ if (dimensionValue.get(layer).size() == 0) {
|
|
|
+ descartes(dimensionValue, result, layer + 1, currentList);
|
|
|
+ } else {
|
|
|
+ for (int i = 0; i < dimensionValue.get(layer).size(); i++) {
|
|
|
+ List<T> list = new ArrayList<T>(currentList);
|
|
|
+ list.add(dimensionValue.get(layer).get(i));
|
|
|
+ descartes(dimensionValue, result, layer + 1, list);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (layer == dimensionValue.size() - 1) {
|
|
|
+ if (dimensionValue.get(layer).size() == 0) {
|
|
|
+ result.add(currentList);
|
|
|
+ } else {
|
|
|
+ for (int i = 0; i < dimensionValue.get(layer).size(); i++) {
|
|
|
+ List<T> list = new ArrayList<T>(currentList);
|
|
|
+ list.add(dimensionValue.get(layer).get(i));
|
|
|
+ result.add(list);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @DataProvider("setAllRules")
|
|
|
+ public Boolean setAllRules(
|
|
|
+ @InvokeParameter("allRulesDTO") AllRulesDTO allRulesDTO,
|
|
|
+ @DataConsumer("setRuleDTOMap") Boolean resRuleDTOMap,
|
|
|
+ @DataConsumer("setDrugAllergen") Boolean resDrugAllergen,
|
|
|
+ @DataConsumer("setKlRuleSearchList") Boolean resKlRuleSearchList) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ @DataProvider("setRuleDTOMap")
|
|
|
+ public Boolean setRuleDTOMap(@InvokeParameter("allRulesDTO") AllRulesDTO allRulesDTO) {
|
|
|
+ //加载有效规则Map
|
|
|
+ if (MapUtils.isNotEmpty(allRulesDTO.getRuleDTOMap())) {
|
|
|
+ redisUtil.multiSet(allRulesDTO.getRuleDTOMap());
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ @DataProvider("setDrugAllergen")
|
|
|
+ public Boolean setDrugAllergen(@InvokeParameter("allRulesDTO") AllRulesDTO allRulesDTO) {
|
|
|
+ //加载药物过敏源缓存
|
|
|
+ if (MapUtils.isNotEmpty(allRulesDTO.getDrugAllergen())) {
|
|
|
+ redisUtil.set(RedisEnum.drugAllergen.getName(), allRulesDTO.getDrugAllergen());
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ @DataProvider("setKlRuleSearchList")
|
|
|
+ public Boolean setKlRuleSearchList(@InvokeParameter("allRulesDTO") AllRulesDTO allRulesDTO) {
|
|
|
+ //存储有效规则Id
|
|
|
+ klRuleSearchService.remove(new QueryWrapper<>());
|
|
|
+ if (ListUtil.isNotEmpty(allRulesDTO.getKlRuleSearchList())) {
|
|
|
+ klRuleSearchService.saveBatch(allRulesDTO.getKlRuleSearchList());
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ @DataProvider("getAllRuleIds")
|
|
|
+ public List<Long> setAllRules(
|
|
|
+ @InvokeParameter("ruleBaseQueryVO") RuleBaseQueryVO ruleBaseQueryVO,
|
|
|
+ @DataConsumer("getRuleNotHaveClass") List<RuleIdDTO> notHaveClassRuleIds,
|
|
|
+ @DataConsumer("getRuleHaveClass") List<RuleIdDTO> haveClassRuleIds) {
|
|
|
+ List<Long> ruleIds = new ArrayList<>();
|
|
|
+ if (ListUtil.isNotEmpty(notHaveClassRuleIds)){
|
|
|
+ ruleIds.addAll(notHaveClassRuleIds.stream().map(RuleIdDTO::getRuleId).distinct().collect(Collectors.toList()));
|
|
|
+ }
|
|
|
+ if (ListUtil.isNotEmpty(haveClassRuleIds)){
|
|
|
+ ruleIds.addAll(haveClassRuleIds.stream().map(RuleIdDTO::getRuleId).distinct().collect(Collectors.toList()));
|
|
|
+ }
|
|
|
+ if (ListUtil.isEmpty(ruleIds)){
|
|
|
+ ruleIds.add(-1000L);
|
|
|
+ }
|
|
|
+ return ruleIds;
|
|
|
+ }
|
|
|
+ @DataProvider("getRuleNotHaveClass")
|
|
|
+ public List<RuleIdDTO> getRuleNotHaveClass( @InvokeParameter("ruleBaseQueryVO") RuleBaseQueryVO ruleBaseQueryVO){
|
|
|
+ return klRuleFacade.getRuleNotHaveClass(ruleBaseQueryVO);
|
|
|
+ }
|
|
|
+
|
|
|
+ @DataProvider("getRuleHaveClass")
|
|
|
+ public List<RuleIdDTO> getRuleHaveClass( @InvokeParameter("ruleBaseQueryVO") RuleBaseQueryVO ruleBaseQueryVO){
|
|
|
+ return klRuleFacade.getRuleHaveClass(ruleBaseQueryVO);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static void main(String[] args) {
|
|
|
+ List<List<RuleBaseDTO>> ruleBaseList = new ArrayList<>();
|
|
|
+ List<RuleBaseDTO> ruleBaseDTOListA = new ArrayList<>();
|
|
|
+ RuleBaseDTO baseDTOA = new RuleBaseDTO();
|
|
|
+ baseDTOA.setBaseLibName("A");
|
|
|
+ ruleBaseDTOListA.add(baseDTOA);
|
|
|
+ RuleBaseDTO baseDTOB = new RuleBaseDTO();
|
|
|
+ baseDTOB.setBaseLibName("B");
|
|
|
+ ruleBaseDTOListA.add(baseDTOB);
|
|
|
+ List<RuleBaseDTO> ruleBaseDTOListC = BeanUtil.listCopyTo(ruleBaseDTOListA, RuleBaseDTO.class);
|
|
|
+ ruleBaseList.add(ruleBaseDTOListC);
|
|
|
+ RuleBaseDTO baseDTOC = new RuleBaseDTO();
|
|
|
+ baseDTOC.setBaseLibName("C");
|
|
|
+ ruleBaseDTOListA.add(baseDTOC);
|
|
|
+ ruleBaseList.add(ruleBaseDTOListA);
|
|
|
+ List<RuleBaseDTO> ruleBaseDTOList1 = new ArrayList<>();
|
|
|
+ RuleBaseDTO baseDTO1 = new RuleBaseDTO();
|
|
|
+ baseDTO1.setBaseLibName("1");
|
|
|
+ ruleBaseDTOList1.add(baseDTO1);
|
|
|
+ RuleBaseDTO baseDTO2 = new RuleBaseDTO();
|
|
|
+ baseDTO2.setBaseLibName("2");
|
|
|
+ ruleBaseDTOList1.add(baseDTO2);
|
|
|
+ ruleBaseList.add(ruleBaseDTOList1);
|
|
|
+ List<List<RuleBaseDTO>> ruleBaseGroup = new ArrayList<>();
|
|
|
+ descartes(ruleBaseList, ruleBaseGroup, 0, new ArrayList<>());
|
|
|
+ System.out.println();
|
|
|
+ }
|
|
|
+
|
|
|
+}
|