Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdst
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdst
提交
d809455b
提交
d809455b
编写于
1月 13, 2021
作者:
hebao@lab.ibiz5.com
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
报表数据构建维度缓存逻辑调整
上级
5e6cb158
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
28 行增加
和
25 行删除
+28
-25
AnalyseEntityServiceImpl.java
...lab/core/extensions/service/AnalyseEntityServiceImpl.java
+7
-18
DABuildExService.java
.../cn/ibizlab/core/extensions/service/DABuildExService.java
+19
-6
IBZDictFeignClient.java
.../main/java/cn/ibizlab/util/client/IBZDictFeignClient.java
+2
-1
未找到文件。
ibzdst-core/src/main/java/cn/ibizlab/core/extensions/service/AnalyseEntityServiceImpl.java
浏览文件 @
d809455b
...
...
@@ -34,6 +34,10 @@ public class AnalyseEntityServiceImpl extends BaseEntityServiceImpl {
@Autowired
private
DefaultMQProducerService
defaultMQProducerService
;
@Autowired
@Lazy
private
DABuildExService
daBuildExService
;
@Autowired
@Lazy
private
cn
.
ibizlab
.
util
.
client
.
IBZDictFeignClient
ibzDictFeignClient
;
...
...
@@ -94,7 +98,7 @@ public class AnalyseEntityServiceImpl extends BaseEntityServiceImpl {
if
((!
StringUtils
.
isEmpty
(
result
.
getRuleid
()))&&(!
StringUtils
.
isEmpty
(
result
.
getDomainsfield
()))&&(!
StringUtils
.
isEmpty
(
result
.
getKeyvaluefield
()))&&(!
ObjectUtils
.
isEmpty
(
result
.
getTimefield
())))
{
result
.
setUpdatedate
(
ExecResult
.
nowLocalDate
());
List
<
DADimension
>
dims
=
this
.
getDims
(
result
.
getBusinesscat
());
List
<
DADimension
>
dims
=
daBuildExService
.
getDims
(
result
.
getBusinesscat
());
if
(
dims
!=
null
)
{
ArrayList
<
ExecResult
>
results
=
new
ArrayList
<>();
for
(
DADimension
dim
:
dims
)
{
...
...
@@ -116,7 +120,8 @@ public class AnalyseEntityServiceImpl extends BaseEntityServiceImpl {
CachedBeanCopier
.
copy
(
result
,
result2
);
result2
.
setDimfield
(
valuesOf
(
code
.
getValue
()));
saveResults
.
add
(
result2
);
if
(
StringUtils
.
isEmpty
(
code
.
getParent
()))
//非逐层核算或无父代码项退出
if
(
dim
.
getRecursive
()
==
0
||
StringUtils
.
isEmpty
(
code
.
getParent
()))
{
break
;
}
...
...
@@ -144,22 +149,6 @@ public class AnalyseEntityServiceImpl extends BaseEntityServiceImpl {
}
private
Hashtable
<
String
,
List
<
DADimension
>>
dimset
=
new
Hashtable
<>();
private
Object
dimslock
=
new
Object
();
@Autowired
private
IDABuildService
daBuildExService
;
private
List
<
DADimension
>
getDims
(
String
id
)
{
synchronized
(
dimslock
)
{
if
(!
dimset
.
containsKey
(
id
))
dimset
.
put
(
id
,
daBuildExService
.
get
(
id
).
getDadimension
());
return
dimset
.
get
(
id
);
}
}
@Autowired
protected
IExecLogService
ruExecLogService
;
public
ExecLog
processAll
(
BaseRequest
msg
)
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/extensions/service/DABuildExService.java
浏览文件 @
d809455b
package
cn
.
ibizlab
.
core
.
extensions
.
service
;
import
cn.ibizlab.core.analysis.domain.DABuild
;
import
cn.ibizlab.core.analysis.domain.DADimension
;
import
cn.ibizlab.core.analysis.domain.DAMetric
;
import
cn.ibizlab.core.analysis.service.IDAMetricService
;
import
cn.ibizlab.core.analysis.service.impl.DABuildServiceImpl
;
...
...
@@ -8,13 +10,11 @@ import cn.ibizlab.core.extensions.domain.EngineMQMsg;
import
cn.ibizlab.core.extensions.util.DefaultMQProducerService
;
import
cn.ibizlab.core.extensions.util.MQConsumeMsgListenerProcessor
;
import
cn.ibizlab.core.lite.extensions.domain.EntityObj
;
import
cn.ibizlab.core.lite.extensions.domain.Setting
;
import
cn.ibizlab.core.lite.extensions.model.DataModel
;
import
cn.ibizlab.core.lite.extensions.service.LiteDataCallback
;
import
cn.ibizlab.core.lite.extensions.service.LiteDataService
;
import
cn.ibizlab.core.lite.extensions.service.LiteModelService
;
import
cn.ibizlab.core.rule.domain.ExecLog
;
import
cn.ibizlab.core.rule.domain.RuleEngine
;
import
cn.ibizlab.core.rule.domain.RuleItem
;
import
cn.ibizlab.core.rule.service.IExecLogService
;
import
cn.ibizlab.core.rule.service.IRuleItemService
;
...
...
@@ -24,19 +24,18 @@ import com.alibaba.fastjson.JSON;
import
com.baomidou.mybatisplus.core.toolkit.IdWorker
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
lombok.extern.slf4j.Slf4j
;
import
cn.ibizlab.core.analysis.domain.DABuild
;
import
org.kie.api.definition.rule.Rule
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.cache.annotation.CacheEvict
;
import
org.springframework.cache.annotation.Cacheable
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.context.annotation.Primary
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Primary
;
import
org.springframework.util.StringUtils
;
import
java.io.File
;
import
java.sql.Wrapper
;
import
java.util.*
;
...
...
@@ -249,5 +248,19 @@ public class DABuildExService extends DABuildServiceImpl {
param
.
put
(
"engineId"
,
engineMQMsg
.
getEngineId
());
this
.
execute
(
updateSql
,
param
);
}
@Cacheable
(
value
=
"dabuilddims"
,
key
=
"'row:'+#p0"
)
public
List
<
DADimension
>
getDims
(
String
id
)
{
return
this
.
get
(
id
).
getDadimension
();
}
@Override
@Transactional
@CacheEvict
(
value
={
"dabuild"
,
"dabuilddims"
},
key
=
"'row:'+#p0.buildId"
)
public
boolean
update
(
DABuild
et
)
{
return
super
.
update
(
et
);
}
}
ibzdst-util/src/main/java/cn/ibizlab/util/client/IBZDictFeignClient.java
浏览文件 @
d809455b
...
...
@@ -4,6 +4,7 @@ import cn.ibizlab.util.dict.CodeItem;
import
cn.ibizlab.util.dict.CodeList
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.cache.annotation.Cacheable
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
@@ -19,7 +20,7 @@ public interface IBZDictFeignClient
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dictionarys/catalogs/sync"
)
Boolean
syncRuntimeDict
(
@RequestBody
JSONArray
catalogs
);
@Cacheable
(
value
=
"dictcatalog"
,
key
=
"'codelist:'+#p0"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/dictionarys/codelist/{code}"
)
CodeList
getCodeList
(
@PathVariable
(
"code"
)
String
code
);
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录