Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdst
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdst
提交
48b81819
提交
48b81819
编写于
2年前
作者:
hebao@lab.ibiz5.com
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
规则引擎构建支持业务数据自定义sql条件过滤
上级
e3cfb7db
master
cql4
hebao
master-xuhui
无相关合并请求
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
28 行增加
和
1 行删除
+28
-1
BaseRequest.java
...n/java/cn/ibizlab/core/extensions/domain/BaseRequest.java
+1
-0
RuleEngineExService.java
.../ibizlab/core/extensions/service/RuleEngineExService.java
+9
-1
LiteDataService.java
...ibizlab/core/lite/extensions/service/LiteDataService.java
+18
-0
未找到文件。
ibzdst-core/src/main/java/cn/ibizlab/core/extensions/domain/BaseRequest.java
浏览文件 @
48b81819
...
...
@@ -54,6 +54,7 @@ public class BaseRequest
private
String
resultDataSource
;
private
String
resultTableName
;
private
String
resultTopic
;
private
String
extCond
;
private
String
batch
;
private
List
<
String
>
rules
;
private
List
<
String
>
ruleIds
;
...
...
This diff is collapsed.
Click to expand it.
ibzdst-core/src/main/java/cn/ibizlab/core/extensions/service/RuleEngineExService.java
浏览文件 @
48b81819
...
...
@@ -193,7 +193,11 @@ public class RuleEngineExService extends RuleEngineServiceImpl {
execlog
.
setKeyValueField
(
msg
.
getModel
());
execlog
.
setSystemId
(
msg
.
getSystemid
());
ruExecLogService
.
create
(
execlog
);
msg
.
setDatas
(
liteDataService
.
getModelObjs
(
msg
.
getModelId
(),
msg
.
getFillpropertys
(),
engineMQMsg
.
getDatas
()));
if
(
StringUtils
.
hasLength
(
msg
.
getExtCond
())){
msg
.
setDatas
(
liteDataService
.
getModelObjs2
(
msg
.
getModelId
(),
msg
.
getFillpropertys
(),
engineMQMsg
.
getDatas
(),
msg
.
getExtCond
()));
}
else
{
msg
.
setDatas
(
liteDataService
.
getModelObjs
(
msg
.
getModelId
(),
msg
.
getFillpropertys
(),
engineMQMsg
.
getDatas
()));
}
baseEntityService
.
processAll
(
msg
);
}
catch
(
Exception
ex
){
...
...
@@ -242,6 +246,7 @@ public class RuleEngineExService extends RuleEngineServiceImpl {
String
resultDataSource
=
Setting
.
getValue
(
et
.
getExtParams
(),
"resultDataSource"
);
String
resultTableName
=
Setting
.
getValue
(
et
.
getExtParams
(),
"resultTableName"
);
String
resultTopic
=
Setting
.
getValue
(
et
.
getExtParams
(),
"resultTopic"
);
String
extCond
=
Setting
.
getValue
(
et
.
getExtParams
(),
"extCond"
);
if
(
StringUtils
.
isEmpty
(
resultDataSource
)){
resultDataSource
=
Default_ResultDataSource
;
}
...
...
@@ -251,6 +256,9 @@ public class RuleEngineExService extends RuleEngineServiceImpl {
if
(!
StringUtils
.
isEmpty
(
resultTopic
)){
msg
.
setResultTopic
(
resultTopic
);
}
if
(
StringUtils
.
hasLength
(
extCond
)){
msg
.
setExtCond
(
extCond
);
}
msg
.
setResultDataSource
(
resultDataSource
);
msg
.
setResultTableName
(
resultTableName
);
List
<
String
>
rules
=
new
ArrayList
<>();
...
...
This diff is collapsed.
Click to expand it.
ibzdst-core/src/main/java/cn/ibizlab/core/lite/extensions/service/LiteDataService.java
浏览文件 @
48b81819
...
...
@@ -160,6 +160,24 @@ public class LiteDataService {
return
rt
;
}
public
List
<
ModelObj
>
getModelObjs2
(
String
metaModelId
,
Set
<
String
>
fillPropertys
,
List
<
EntityObj
>
kEntityObjs
,
String
extCond
)
{
DataModel
dataModel
=
liteModelService
.
getDataModel
(
metaModelId
);
EntityModel
entityModel
=
dataModel
.
getFactEntityModel
();
List
<
ModelObj
>
rt
=
new
ArrayList
<>();
List
<
EntityObj
>
factEntityList
=
new
ArrayList
<>();
List
<
List
<
EntityObj
>>
splist
=
splitList
(
kEntityObjs
,
1000
);
if
(
fillPropertys
==
null
||
fillPropertys
.
size
()
==
0
||
fillPropertys
.
contains
(
dataModel
.
getFactPorperty
().
getPropertyName
()))
splist
.
forEach
(
list
->
factEntityList
.
addAll
(
getEntityService
(
entityModel
.
getDsName
()).
selectBase
(
entityModel
.
getDsName
(),
entityModel
,
QueryFilter
.
createQuery
().
cust
(
dataModel
.
lookup
(
list
)+(
StringUtils
.
hasLength
(
extCond
)?
" and "
+
extCond:
""
)))));
factEntityList
.
forEach
(
entityObj
->
rt
.
add
(
new
ModelObj
().
setDataModel
(
dataModel
).
setFactEntity
(
entityObj
.
setProperty
(
dataModel
.
getFactPorperty
()))));
fillEntityObj
(
dataModel
,
fillPropertys
,
rt
);
dataModel
.
getNestedDataModels
().
forEach
(
subModel
->
this
.
getModelObjs
(
subModel
,
fillPropertys
,
factEntityList
).
forEach
(
subObj
->
subObj
.
findParent
(
rt
)));
rt
.
forEach
(
modelObj
->
modelObj
.
getTimestamp
());
return
rt
;
}
public
void
fillEntityObj
(
DataModel
dataModel
,
Set
<
String
>
fillPropertys
,
List
<
ModelObj
>
modelObjs
)
{
List
<
List
<
ModelObj
>>
splist
=
splitList
(
modelObjs
,
1000
);
if
(
dataModel
.
getObjectProperties
().
size
()
>
1
)
{
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录