|
@@ -508,9 +508,9 @@ public class ExportFacade {
|
|
|
&& StringUtil.isNotBlank(importDataVO.getOrderType())
|
|
|
&& !importDataVO.getOrderType().equals("联合项目")
|
|
|
&& StringUtil.isBlank(importDataVO.getStatus())) {
|
|
|
-// if (!importDataVO.getNeoType().equals("7")) {
|
|
|
-// continue;
|
|
|
-// }
|
|
|
+ // if (!importDataVO.getNeoType().equals("7")) {
|
|
|
+ // continue;
|
|
|
+ // }
|
|
|
if (importDataVO.getNeoType().equals("7")) {
|
|
|
if (importDataVO.getNeoName().trim().equals("本品成份")
|
|
|
|| importDataVO.getNeoName().trim().equals("本品的成分")
|
|
@@ -1028,7 +1028,7 @@ public class ExportFacade {
|
|
|
}
|
|
|
klRuleService.save(klRule);
|
|
|
if (importDataVO.getOperationLevel().equals("2")) {
|
|
|
- Integer groupType = 0;
|
|
|
+ Integer groupType = 1;
|
|
|
if (StringUtil.isNotBlank(importDataVO.getAgeAll())) {
|
|
|
groupType = analyDataDeal(map, importDataVO.getAgeAll(), klRule.getId(), 410, groupType);
|
|
|
}
|
|
@@ -1111,10 +1111,10 @@ public class ExportFacade {
|
|
|
}
|
|
|
|
|
|
private Integer klRuleAnalyVODeal(KlRuleAnalyVO klRuleAnalyVO, Map<String, KlConcept> map, Long ruleId, Integer condType, Integer noCondType, Integer groupType) {
|
|
|
+ List<KlRuleBase> klRuleBaseList = new ArrayList<>();
|
|
|
if (ListUtil.isNotEmpty(klRuleAnalyVO.getCondList())) {
|
|
|
for (KlRuleConditionVO klRuleConditionVO : klRuleAnalyVO.getCondList()) {
|
|
|
if (null != map.get(klRuleConditionVO.getName() + "_" + condType)) {
|
|
|
- groupType++;
|
|
|
KlRuleBase klRuleBase = new KlRuleBase();
|
|
|
klRuleBase.setType(2);
|
|
|
klRuleBase.setConceptId(map.get(klRuleConditionVO.getName() + "_" + condType).getId());
|
|
@@ -1145,32 +1145,33 @@ public class ExportFacade {
|
|
|
} else {
|
|
|
/*DO Nothing*/
|
|
|
}
|
|
|
- klRuleBaseService.save(klRuleBase);
|
|
|
- KlRuleCondition klRuleCondition = new KlRuleCondition();
|
|
|
- klRuleCondition.setGroupType(groupType);
|
|
|
- klRuleCondition.setRuleId(ruleId);
|
|
|
- klRuleCondition.setRuleBaseId(klRuleBase.getId());
|
|
|
- klRuleConditionService.save(klRuleCondition);
|
|
|
+ klRuleBaseList.add(klRuleBase);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (ListUtil.isNotEmpty(klRuleAnalyVO.getNoCondList())) {
|
|
|
for (String noCond : klRuleAnalyVO.getNoCondList()) {
|
|
|
if (null != map.get(noCond + "_" + noCondType)) {
|
|
|
- groupType++;
|
|
|
KlRuleBase klRuleBase = new KlRuleBase();
|
|
|
klRuleBase.setType(1);
|
|
|
klRuleBase.setConceptId(map.get(noCond + "_" + noCondType).getId());
|
|
|
klRuleBase.setDescription(noCond);
|
|
|
- klRuleBaseService.save(klRuleBase);
|
|
|
- KlRuleCondition klRuleCondition = new KlRuleCondition();
|
|
|
- klRuleCondition.setGroupType(groupType);
|
|
|
- klRuleCondition.setRuleId(ruleId);
|
|
|
- klRuleCondition.setRuleBaseId(klRuleBase.getId());
|
|
|
- klRuleConditionService.save(klRuleCondition);
|
|
|
+ klRuleBaseList.add(klRuleBase);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if (ListUtil.isNotEmpty(klRuleBaseList)) {
|
|
|
+ klRuleBaseService.saveBatch(klRuleBaseList);
|
|
|
+ List<KlRuleCondition> klRuleConditionList = new ArrayList<>();
|
|
|
+ for (KlRuleBase klRuleBase : klRuleBaseList) {
|
|
|
+ KlRuleCondition klRuleCondition = new KlRuleCondition();
|
|
|
+ klRuleCondition.setGroupType(groupType++);
|
|
|
+ klRuleCondition.setRuleId(ruleId);
|
|
|
+ klRuleCondition.setRuleBaseId(klRuleBase.getId());
|
|
|
+ klRuleConditionList.add(klRuleCondition);
|
|
|
+ }
|
|
|
+ klRuleConditionService.saveBatch(klRuleConditionList);
|
|
|
+ }
|
|
|
return groupType;
|
|
|
}
|
|
|
|