|
@@ -105,6 +105,7 @@ public class KlRuleFacade extends KlRuleServiceImpl {
|
|
|
.set(StringUtil.isNotBlank(klRuleInfoSaveVO.getParHasSub().toString()), "has_sub_cond", klRuleInfoSaveVO.getParHasSub())
|
|
|
.set(StringUtil.isNotBlank(klRuleInfoSaveVO.getParStatus().toString()), "status", klRuleInfoSaveVO.getParStatus())
|
|
|
.set(StringUtil.isNotBlank(klRuleInfoSaveVO.getParMsg()), "msg", klRuleInfoSaveVO.getParMsg())
|
|
|
+ .set("modifier", klRuleInfoSaveVO.getModifier())
|
|
|
.set("gmt_modified", now);
|
|
|
res = this.update(klRuleUpdate);
|
|
|
|
|
@@ -118,6 +119,8 @@ public class KlRuleFacade extends KlRuleServiceImpl {
|
|
|
//先保存主表rule
|
|
|
KlRule klRule = new KlRule();
|
|
|
klRule.setConceptId(klRuleInfoSaveVO.getParConceptId());
|
|
|
+ klRule.setCreator(klRuleInfoSaveVO.getModifier());
|
|
|
+ klRule.setModifier(klRuleInfoSaveVO.getModifier());
|
|
|
klRule.setDescription(klRuleInfoSaveVO.getParDescription());
|
|
|
klRule.setHasSubCond(klRuleInfoSaveVO.getParHasSub());
|
|
|
klRule.setRuleType(klRuleInfoSaveVO.getParRuleType());
|
|
@@ -182,8 +185,10 @@ public class KlRuleFacade extends KlRuleServiceImpl {
|
|
|
//先保存数据到kl_rule_base表里
|
|
|
List<KlRuleBase> klRuleBaseList = new ArrayList<>();
|
|
|
for (KlRuleInfoSaveSubVO list : klRuleInfoSaveSub) {
|
|
|
+ KlRuleCondition klRuleCondition = new KlRuleCondition();
|
|
|
KlRuleBase klRuleBase = new KlRuleBase();
|
|
|
klRuleBase.setGmtModified(now);
|
|
|
+ klRuleBase.setModifier(klRuleInfoSaveVO.getModifier());
|
|
|
klRuleBase.setConceptId(list.getSubConceptId());
|
|
|
klRuleBase.setType(list.getSubType());
|
|
|
klRuleBase.setDescription(list.getSubDescription());
|
|
@@ -197,23 +202,18 @@ public class KlRuleFacade extends KlRuleServiceImpl {
|
|
|
klRuleBase.setEqValue(list.getSubEqValue());
|
|
|
klRuleBase.setEqOperator(list.getSubEqOperator());
|
|
|
klRuleBase.setEqUnit(list.getSubEqUnit());
|
|
|
- klRuleBaseList.add(klRuleBase);
|
|
|
- }
|
|
|
- res = klRuleBaseFacade.saveBatchAll(klRuleBaseList);
|
|
|
- List<KlRuleCondition> klRuleConditionList = new ArrayList<>();
|
|
|
- for (KlRuleBase data1 : klRuleBaseList) {
|
|
|
- for (KlRuleInfoSaveSubVO data2 : klRuleInfoSaveSub) {
|
|
|
- KlRuleCondition klRuleCondition = new KlRuleCondition();
|
|
|
- if (data1.getDescription().equals(data2.getSubDescription())) {
|
|
|
- klRuleCondition.setGmtCreate(now);
|
|
|
- klRuleCondition.setGroupType(data2.getGroupType());
|
|
|
- klRuleCondition.setRuleBaseId(data1.getId());
|
|
|
- klRuleCondition.setRuleId(klRuleInfoSaveVO.getParId());
|
|
|
- klRuleConditionList.add(klRuleCondition);
|
|
|
- }
|
|
|
+ res = klRuleBaseFacade.save(klRuleBase);
|
|
|
+ //再把数据保存在kl_rule_condition
|
|
|
+ if (res) {
|
|
|
+ klRuleCondition.setGmtCreate(now);
|
|
|
+ klRuleCondition.setModifier(klRuleInfoSaveVO.getModifier());
|
|
|
+ klRuleCondition.setGroupType(list.getGroupType());
|
|
|
+ klRuleCondition.setRuleBaseId(klRuleBase.getId());
|
|
|
+ klRuleCondition.setRuleId(klRuleInfoSaveVO.getParId());
|
|
|
+ res = klRuleConditionFacade.save(klRuleCondition);
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
- res = klRuleConditionFacade.saveBatchAll(klRuleConditionList);
|
|
|
}
|
|
|
|
|
|
return res;
|
|
@@ -231,6 +231,7 @@ public class KlRuleFacade extends KlRuleServiceImpl {
|
|
|
klRuleUpdate.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("id", klRuleSatartOrdisaVO.getId())
|
|
|
.set("status", start)
|
|
|
+ .set("modifier", klRuleSatartOrdisaVO.getModifier())
|
|
|
.set("gmt_modified", now);
|
|
|
return this.update(klRuleUpdate);
|
|
|
}
|