Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibztask
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibztask
提交
3752c911
提交
3752c911
编写于
2月 07, 2021
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 发布系统代码 [ibiz-task,任务调度]
上级
f167e080
变更
19
展开全部
显示空白字符变更
内嵌
并排
正在显示
19 个修改的文件
包含
716 行增加
和
231 行删除
+716
-231
app-data-upload.vue
app_web/src/components/app-data-upload/app-data-upload.vue
+8
-2
app-message-popover.vue
...rc/components/app-message-popover/app-message-popover.vue
+118
-116
dropdown-list-mpicker.vue
...omponents/dropdown-list-mpicker/dropdown-list-mpicker.vue
+2
-2
dropdown-list.vue
app_web/src/components/dropdown-list/dropdown-list.vue
+3
-1
environment.ts
app_web/src/environments/environment.ts
+2
-0
main-form-base.vue
app_web/src/widgets/jobs-info/main-form/main-form-base.vue
+2
-2
main-form-base.vue
app_web/src/widgets/jobs-log/main-form/main-form-base.vue
+1
-1
application-web-prod.yml
...ztask-app-web/src/main/resources/application-web-prod.yml
+4
-0
application-dev.yml
ibztask-boot/src/main/resources/application-dev.yml
+4
-0
DroolsAutoConfiguration.java
.../cn/ibizlab/core/util/config/DroolsAutoConfiguration.java
+6
-89
pom.xml
ibztask-dependencies/pom.xml
+11
-0
JobsInfoResource.java
...i/src/main/java/cn/ibizlab/api/rest/JobsInfoResource.java
+5
-3
JobsLockResource.java
...i/src/main/java/cn/ibizlab/api/rest/JobsLockResource.java
+5
-3
JobsLogResource.java
...pi/src/main/java/cn/ibizlab/api/rest/JobsLogResource.java
+5
-3
JobsRegistryResource.java
...c/main/java/cn/ibizlab/api/rest/JobsRegistryResource.java
+5
-3
pom.xml
ibztask-util/pom.xml
+34
-0
DELogicAspect.java
...l/src/main/java/cn/ibizlab/util/aspect/DELogicAspect.java
+476
-0
LayeringCache.java
.../main/java/cn/ibizlab/util/cache/cache/LayeringCache.java
+6
-6
DELogic.java
...sk-util/src/main/java/cn/ibizlab/util/domain/DELogic.java
+19
-0
未找到文件。
app_web/src/components/app-data-upload/app-data-upload.vue
浏览文件 @
3752c911
...
@@ -52,6 +52,7 @@ import CodeListService from "@/codelist/codelist-service";
...
@@ -52,6 +52,7 @@ import CodeListService from "@/codelist/codelist-service";
import
EntityService
from
'@/service/entity-service'
;
import
EntityService
from
'@/service/entity-service'
;
import
{
Vue
,
Component
,
Prop
,
Provide
,
Emit
,
Watch
}
from
'vue-property-decorator'
;
import
{
Vue
,
Component
,
Prop
,
Provide
,
Emit
,
Watch
}
from
'vue-property-decorator'
;
import
{
Environment
}
from
'@/environments/environment'
;
import
{
Environment
}
from
'@/environments/environment'
;
import
moment
from
"moment"
;
@
Component
({
@
Component
({
})
})
...
@@ -395,11 +396,11 @@ export default class AppDataUploadView extends Vue {
...
@@ -395,11 +396,11 @@ export default class AppDataUploadView extends Vue {
let
reader
=
new
FileReader
();
let
reader
=
new
FileReader
();
reader
.
onload
=
(
e
:
any
)
=>
{
reader
.
onload
=
(
e
:
any
)
=>
{
let
data
=
e
.
target
.
result
;
let
data
=
e
.
target
.
result
;
this
.
workBookData
=
XLSX
.
read
(
data
,
{
type
:
'binary'
});
this
.
workBookData
=
XLSX
.
read
(
data
,
{
type
:
'binary'
,
cellDates
:
true
});
let
xlsxData
=
XLSX
.
utils
.
sheet_to_json
(
this
.
workBookData
.
Sheets
[
this
.
workBookData
.
SheetNames
[
0
]]);
let
xlsxData
=
XLSX
.
utils
.
sheet_to_json
(
this
.
workBookData
.
Sheets
[
this
.
workBookData
.
SheetNames
[
0
]]);
let
list1
=
this
.
getFirstRow
(
this
.
workBookData
);
let
list1
=
this
.
getFirstRow
(
this
.
workBookData
);
xlsxData
=
this
.
AddXlsxData
(
xlsxData
,
list1
);
xlsxData
=
this
.
AddXlsxData
(
xlsxData
,
list1
);
this
.
importDataArray
=
JSON
.
parse
(
JSON
.
stringify
(
xlsxData
)
);
this
.
importDataArray
=
this
.
$util
.
deepCopy
(
xlsxData
);
(
this
.
$refs
.
inputUpLoad
as
any
).
value
=
''
;
(
this
.
$refs
.
inputUpLoad
as
any
).
value
=
''
;
};
};
reader
.
readAsBinaryString
(
f
);
reader
.
readAsBinaryString
(
f
);
...
@@ -505,6 +506,11 @@ export default class AppDataUploadView extends Vue {
...
@@ -505,6 +506,11 @@ export default class AppDataUploadView extends Vue {
data
.
forEach
((
item
:
any
)
=>
{
data
.
forEach
((
item
:
any
)
=>
{
let
curObject
:
any
=
{};
let
curObject
:
any
=
{};
Object
.
keys
(
item
).
forEach
((
ele
:
any
)
=>
{
Object
.
keys
(
item
).
forEach
((
ele
:
any
)
=>
{
// todo XLSX读取时间为国际时间(东8区)+8H转为标准时间
if
(
item
[
ele
]
instanceof
Date
){
const
tempDate
:
Date
=
item
[
ele
];
item
[
ele
]
=
moment
(
tempDate
).
add
(
8
,
'h'
).
format
(
"YYYY-MM-DD HH:mm:ss"
);
}
if
(
this
.
allFieldMap
.
get
(
ele
).
codelist
){
if
(
this
.
allFieldMap
.
get
(
ele
).
codelist
){
let
codelistTag
:
string
=
this
.
allFieldMap
.
get
(
ele
).
codelist
.
tag
;
let
codelistTag
:
string
=
this
.
allFieldMap
.
get
(
ele
).
codelist
.
tag
;
let
codelistIsNumber
:
boolean
=
this
.
allFieldMap
.
get
(
ele
).
codelist
.
isnumber
;
let
codelistIsNumber
:
boolean
=
this
.
allFieldMap
.
get
(
ele
).
codelist
.
isnumber
;
...
...
app_web/src/components/app-message-popover/app-message-popover.vue
浏览文件 @
3752c911
...
@@ -84,13 +84,12 @@
...
@@ -84,13 +84,12 @@
</template>
</template>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Prop
,
Model
,
Emit
}
from
"vue-property-decorator"
;
import
{
Vue
,
Component
,
Prop
,
Model
,
Emit
}
from
"vue-property-decorator"
;
import
{
Subject
}
from
"rxjs"
;
import
{
Environment
}
from
'@/environments/environment'
;
import
{
Environment
}
from
'@/environments/environment'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
@
Component
({})
@
Component
({})
export
default
class
AppMessagePopover
extends
Vue
{
export
default
class
AppMessagePopover
extends
Vue
{
// 是否显示小圆点
// 是否显示小圆点
public
showIsDot
:
any
=
false
;
public
showIsDot
:
any
=
false
;
...
@@ -118,6 +117,9 @@
...
@@ -118,6 +117,9 @@
* vue挂载
* vue挂载
*/
*/
mounted
():
void
{
mounted
():
void
{
if
(
!
Environment
.
workflow
){
return
;
}
// 首次获取待办列表
// 首次获取待办列表
this
.
getMyTasks
();
this
.
getMyTasks
();
// 定时器:每隔1分钟重新获取待办列表
// 定时器:每隔1分钟重新获取待办列表
...
@@ -217,7 +219,7 @@
...
@@ -217,7 +219,7 @@
this
.
msgShowCnt
=
this
.
myMsgs
.
length
>=
10
?
10
:
this
.
myMsgs
.
length
;
this
.
msgShowCnt
=
this
.
myMsgs
.
length
>=
10
?
10
:
this
.
myMsgs
.
length
;
}
}
}
}
</
script
>
</
script
>
<
style
lang=
'less'
>
<
style
lang=
'less'
>
...
...
app_web/src/components/dropdown-list-mpicker/dropdown-list-mpicker.vue
浏览文件 @
3752c911
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
:filterable=
"filterable"
:filterable=
"filterable"
@
on-open-change=
"onClick"
@
on-open-change=
"onClick"
:placeholder=
"placeholder?placeholder:$t('components.dropDownListMpicker.placeholder')"
>
:placeholder=
"placeholder?placeholder:$t('components.dropDownListMpicker.placeholder')"
>
<i-option
v-for=
"(item, index) in items"
:key=
"index"
:class=
"item.class"
:value=
"item.value
.toString()
"
:label=
"item.text"
>
<i-option
v-for=
"(item, index) in items"
:key=
"index"
:class=
"item.class"
:value=
"item.value
? item.value.toString():''
"
:label=
"item.text"
>
<Checkbox
:value
=
"(currentVal.indexOf(item.value.toString()))==-1?false:
true"
>
<Checkbox
:value
=
"(currentVal.indexOf(item.value ? item.value.toString() : '')) == -1 ? false :
true"
>
{{
Object
.
is
(
codelistType
,
'STATIC'
)
?
$t
(
'codelist.'
+
tag
+
'.'
+
item
.
value
)
:
item
.
text
}}
{{
Object
.
is
(
codelistType
,
'STATIC'
)
?
$t
(
'codelist.'
+
tag
+
'.'
+
item
.
value
)
:
item
.
text
}}
</Checkbox>
</Checkbox>
</i-option>
</i-option>
...
...
app_web/src/components/dropdown-list/dropdown-list.vue
浏览文件 @
3752c911
...
@@ -394,7 +394,9 @@ export default class DropDownList extends Vue {
...
@@ -394,7 +394,9 @@ export default class DropDownList extends Vue {
if
(
type
===
'number'
){
if
(
type
===
'number'
){
item
.
value
=
item
.
value
.
toString
();
item
.
value
=
item
.
value
.
toString
();
}
else
{
}
else
{
if
(
item
.
value
.
indexOf
(
'.'
)
==
-
1
){
if
(
type
==
"null"
)
{
this
.
valueType
==
"number"
?
item
.
value
=
0
:
item
.
value
=
''
;
}
else
if
(
item
.
value
.
indexOf
(
'.'
)
==
-
1
){
item
.
value
=
parseInt
(
item
.
value
);
item
.
value
=
parseInt
(
item
.
value
);
}
else
{
}
else
{
item
.
value
=
parseFloat
(
item
.
value
);
item
.
value
=
parseFloat
(
item
.
value
);
...
...
app_web/src/environments/environment.ts
浏览文件 @
3752c911
...
@@ -45,6 +45,8 @@ export const Environment = {
...
@@ -45,6 +45,8 @@ export const Environment = {
ibizlabtUrl
:
'https://www.ibizlab.cn'
,
ibizlabtUrl
:
'https://www.ibizlab.cn'
,
// ibiz论坛地址
// ibiz论坛地址
ibizbbstUrl
:
'https://bbs.ibizlab.cn'
,
ibizbbstUrl
:
'https://bbs.ibizlab.cn'
,
// 是否启用工作流
workflow
:
false
,
};
};
// 挂载外部配置文件
// 挂载外部配置文件
if
((
window
as
any
).
Environment
)
{
if
((
window
as
any
).
Environment
)
{
...
...
app_web/src/widgets/jobs-info/main-form/main-form-base.vue
浏览文件 @
3752c911
...
@@ -176,7 +176,7 @@
...
@@ -176,7 +176,7 @@
<i-col
v-show=
"detailsModel.create_time.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<i-col
v-show=
"detailsModel.create_time.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'create_time'
:itemRules=
"this.rules().create_time"
class=
''
:caption=
"$t('entities.jobsinfo.main_form.details.create_time')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.create_time.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'create_time'
:itemRules=
"this.rules().create_time"
class=
''
:caption=
"$t('entities.jobsinfo.main_form.details.create_time')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.create_time.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-span
name=
'create_time'
:value=
"data.create_time"
dataType=
"DATETIME"
valueFormat=
"%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS"
:precision=
"0"
<app-span
name=
'create_time'
:value=
"data.create_time"
dataType=
"DATETIME"
unitName=
""
valueFormat=
"%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS"
:precision=
"0"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'
{ }' :localParam ='{ }' style="">
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'
{ }' :localParam ='{ }' style="">
</app-span>
</app-span>
...
@@ -186,7 +186,7 @@
...
@@ -186,7 +186,7 @@
<i-col
v-show=
"detailsModel.update_time.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<i-col
v-show=
"detailsModel.update_time.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'update_time'
:itemRules=
"this.rules().update_time"
class=
''
:caption=
"$t('entities.jobsinfo.main_form.details.update_time')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.update_time.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'update_time'
:itemRules=
"this.rules().update_time"
class=
''
:caption=
"$t('entities.jobsinfo.main_form.details.update_time')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.update_time.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-span
name=
'update_time'
:value=
"data.update_time"
dataType=
"DATETIME"
valueFormat=
"%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS"
:precision=
"0"
<app-span
name=
'update_time'
:value=
"data.update_time"
dataType=
"DATETIME"
unitName=
""
valueFormat=
"%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS"
:precision=
"0"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'
{ }' :localParam ='{ }' style="">
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'
{ }' :localParam ='{ }' style="">
</app-span>
</app-span>
...
...
app_web/src/widgets/jobs-log/main-form/main-form-base.vue
浏览文件 @
3752c911
...
@@ -106,7 +106,7 @@
...
@@ -106,7 +106,7 @@
<i-col
v-show=
"detailsModel.create_time.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<i-col
v-show=
"detailsModel.create_time.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'create_time'
:itemRules=
"this.rules().create_time"
class=
''
:caption=
"$t('entities.jobslog.main_form.details.create_time')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.create_time.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'create_time'
:itemRules=
"this.rules().create_time"
class=
''
:caption=
"$t('entities.jobslog.main_form.details.create_time')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.create_time.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-span
name=
'create_time'
:value=
"data.create_time"
dataType=
"DATETIME"
valueFormat=
"%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS"
:precision=
"0"
<app-span
name=
'create_time'
:value=
"data.create_time"
dataType=
"DATETIME"
unitName=
""
valueFormat=
"%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS"
:precision=
"0"
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'
{ }' :localParam ='{ }' style="">
:data=
"data"
:context=
"context"
:viewparams=
"viewparams"
:localContext =
'
{ }' :localParam ='{ }' style="">
</app-span>
</app-span>
...
...
ibztask-app/ibztask-app-web/src/main/resources/application-web-prod.yml
浏览文件 @
3752c911
...
@@ -75,5 +75,9 @@ zuul:
...
@@ -75,5 +75,9 @@ zuul:
path
:
/lite/**
path
:
/lite/**
serviceId
:
${ibiz.ref.service.lite:ibzlite-api}
serviceId
:
${ibiz.ref.service.lite:ibzlite-api}
stripPrefix
:
false
stripPrefix
:
false
sysauthlog
:
path
:
/sysauthlogs
serviceId
:
${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix
:
false
sensitive-headers
:
sensitive-headers
:
-
Cookie,Set-Cookie,Authorization
-
Cookie,Set-Cookie,Authorization
ibztask-boot/src/main/resources/application-dev.yml
浏览文件 @
3752c911
...
@@ -56,5 +56,9 @@ zuul:
...
@@ -56,5 +56,9 @@ zuul:
path
:
/lite/**
path
:
/lite/**
serviceId
:
${ibiz.ref.service.lite:ibzlite-api}
serviceId
:
${ibiz.ref.service.lite:ibzlite-api}
stripPrefix
:
false
stripPrefix
:
false
sysauthlog
:
path
:
/sysauthlogs
serviceId
:
${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix
:
false
sensitive-headers
:
sensitive-headers
:
-
Cookie,Set-Cookie,Authorization
-
Cookie,Set-Cookie,Authorization
ibztask-core/src/main/java/cn/ibizlab/core/util/config/DroolsAutoConfiguration.java
浏览文件 @
3752c911
package
cn
.
ibizlab
.
core
.
util
.
config
;
package
cn
.
ibizlab
.
core
.
util
.
config
;
import
org.kie.api.KieBase
;
import
org.kie.api.KieServices
;
import
org.kie.api.KieServices
;
import
org.kie.api.builder.
*
;
import
org.kie.api.builder.
KieFileSystem
;
import
org.kie.api.runtime.KieContainer
;
import
org.kie.api.runtime.KieContainer
;
import
org.kie.api.runtime.KieSession
;
import
org.kie.internal.io.ResourceFactory
;
import
org.kie.spring.KModuleBeanFactoryPostProcessor
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.core.io.Resource
;
import
org.springframework.core.io.support.PathMatchingResourcePatternResolver
;
import
org.springframework.core.io.support.ResourcePatternResolver
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
java.io.IOException
;
import
java.util.List
;
@Configuration
@Configuration
public
class
DroolsAutoConfiguration
{
public
class
DroolsAutoConfiguration
{
private
Log
logger
=
LogFactory
.
getLog
(
DroolsAutoConfiguration
.
class
);
private
static
final
String
RULES_PATH
=
"rules/"
;
@Bean
@ConditionalOnMissingBean
(
KieFileSystem
.
class
)
public
KieFileSystem
kieFileSystem
()
throws
IOException
{
KieFileSystem
kieFileSystem
=
getKieServices
().
newKieFileSystem
();
for
(
Resource
file
:
getRuleFiles
())
{
kieFileSystem
.
write
(
ResourceFactory
.
newUrlResource
(
file
.
getURL
()));
}
return
kieFileSystem
;
}
private
Resource
[]
getRuleFiles
()
throws
IOException
{
ResourcePatternResolver
resourcePatternResolver
=
new
PathMatchingResourcePatternResolver
();
return
resourcePatternResolver
.
getResources
(
"classpath*:"
+
RULES_PATH
+
"**/*.*"
);
}
@Bean
@Bean
@ConditionalOnMissingBean
(
KieContainer
.
class
)
@ConditionalOnMissingBean
(
KieContainer
.
class
)
public
KieContainer
kieContainer
()
throws
IOException
{
public
KieContainer
kieContainer
()
{
final
KieRepository
kieRepository
=
getKieServices
().
getRepository
();
KieServices
kieServices
=
KieServices
.
get
();
KieFileSystem
kieFileSystem
=
kieServices
.
newKieFileSystem
();
kieRepository
.
addKieModule
(
new
KieModule
()
{
kieServices
.
newKieBuilder
(
kieFileSystem
).
buildAll
();
public
ReleaseId
getReleaseId
()
{
return
kieServices
.
newKieContainer
(
kieServices
.
getRepository
().
getDefaultReleaseId
());
return
kieRepository
.
getDefaultReleaseId
();
}
});
KieBuilder
kieBuilder
=
getKieServices
().
newKieBuilder
(
kieFileSystem
());
kieBuilder
.
buildAll
();
if
(
kieBuilder
.
getResults
().
hasMessages
(
new
Message
.
Level
[]
{
Message
.
Level
.
ERROR
})){
List
<
Message
>
errors
=
kieBuilder
.
getResults
().
getMessages
(
new
Message
.
Level
[]
{
Message
.
Level
.
ERROR
});
StringBuilder
stringBuilder
=
new
StringBuilder
(
"Errors:"
);
for
(
Message
msg
:
errors
)
{
stringBuilder
.
append
(
new
StringBuilder
().
append
(
"\n "
).
append
(
prettyBuildMessage
(
msg
)).
toString
());
}
logger
.
error
(
String
.
format
(
"初始化处理逻辑发生异常,异常原因为[%s]"
,
stringBuilder
.
toString
()));
//忽略处理逻辑
getKieServices
().
newKieBuilder
(
getKieServices
().
newKieFileSystem
()).
buildAll
();
}
return
getKieServices
().
newKieContainer
(
kieRepository
.
getDefaultReleaseId
());
}
private
KieServices
getKieServices
()
{
return
KieServices
.
Factory
.
get
();
}
@Bean
@ConditionalOnMissingBean
(
KieBase
.
class
)
public
KieBase
kieBase
()
throws
IOException
{
return
kieContainer
().
getKieBase
();
}
@Bean
@ConditionalOnMissingBean
(
KieSession
.
class
)
public
KieSession
kieSession
()
throws
IOException
{
return
kieContainer
().
newKieSession
();
}
@Bean
@ConditionalOnMissingBean
(
KModuleBeanFactoryPostProcessor
.
class
)
public
KModuleBeanFactoryPostProcessor
kiePostProcessor
()
{
return
new
KModuleBeanFactoryPostProcessor
();
}
/**
* 输出异常信息
* @param msg
* @return
*/
public
static
String
prettyBuildMessage
(
Message
msg
)
{
return
new
StringBuilder
().
append
(
"Message: {id="
).
append
(
msg
.
getId
()).
append
(
", level="
).
append
(
msg
.
getLevel
()).
append
(
", path="
).
append
(
msg
.
getPath
()).
append
(
", line="
).
append
(
msg
.
getLine
())
.
append
(
", column="
).
append
(
msg
.
getColumn
()).
append
(
", text=\""
).
append
(
msg
.
getText
()).
append
(
"\"}"
).
toString
();
}
}
}
}
\ No newline at end of file
ibztask-dependencies/pom.xml
浏览文件 @
3752c911
...
@@ -85,6 +85,7 @@
...
@@ -85,6 +85,7 @@
<oracle.version>
19.8.0.0
</oracle.version>
<oracle.version>
19.8.0.0
</oracle.version>
<postgresql.version>
42.2.6
</postgresql.version>
<postgresql.version>
42.2.6
</postgresql.version>
<flowable-modeler.version>
6.4.2
</flowable-modeler.version>
</properties>
</properties>
<dependencyManagement>
<dependencyManagement>
...
@@ -261,6 +262,16 @@
...
@@ -261,6 +262,16 @@
</dependency>
</dependency>
<dependency>
<groupId>
org.flowable
</groupId>
<artifactId>
flowable-json-converter
</artifactId>
<version>
${flowable-modeler.version}
</version>
</dependency>
<dependency>
<groupId>
org.flowable
</groupId>
<artifactId>
flowable-ui-modeler-conf
</artifactId>
<version>
${flowable-modeler.version}
</version>
</dependency>
</dependencies>
</dependencies>
</dependencyManagement>
</dependencyManagement>
...
...
ibztask-provider/ibztask-provider-api/src/main/java/cn/ibizlab/api/rest/JobsInfoResource.java
浏览文件 @
3752c911
...
@@ -72,7 +72,7 @@ public class JobsInfoResource {
...
@@ -72,7 +72,7 @@ public class JobsInfoResource {
JobsInfo
domain
=
jobsinfoMapping
.
toDomain
(
jobsinfodto
);
JobsInfo
domain
=
jobsinfoMapping
.
toDomain
(
jobsinfodto
);
domain
.
setId
(
jobsinfo_id
);
domain
.
setId
(
jobsinfo_id
);
jobsinfoService
.
update
(
domain
);
jobsinfoService
.
update
(
domain
);
JobsInfoDTO
dto
=
jobsinfoMapping
.
toDto
(
domain
);
JobsInfoDTO
dto
=
jobsinfoMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
...
@@ -142,8 +142,10 @@ public class JobsInfoResource {
...
@@ -142,8 +142,10 @@ public class JobsInfoResource {
@ApiOperation
(
value
=
"保存任务信息"
,
tags
=
{
"任务信息"
},
notes
=
"保存任务信息"
)
@ApiOperation
(
value
=
"保存任务信息"
,
tags
=
{
"任务信息"
},
notes
=
"保存任务信息"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/jobsinfos/save"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/jobsinfos/save"
)
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
JobsInfoDTO
jobsinfodto
)
{
public
ResponseEntity
<
JobsInfoDTO
>
save
(
@RequestBody
JobsInfoDTO
jobsinfodto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
jobsinfoService
.
save
(
jobsinfoMapping
.
toDomain
(
jobsinfodto
)));
JobsInfo
domain
=
jobsinfoMapping
.
toDomain
(
jobsinfodto
);
jobsinfoService
.
save
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
jobsinfoMapping
.
toDto
(
domain
));
}
}
@ApiOperation
(
value
=
"批量保存任务信息"
,
tags
=
{
"任务信息"
},
notes
=
"批量保存任务信息"
)
@ApiOperation
(
value
=
"批量保存任务信息"
,
tags
=
{
"任务信息"
},
notes
=
"批量保存任务信息"
)
...
...
ibztask-provider/ibztask-provider-api/src/main/java/cn/ibizlab/api/rest/JobsLockResource.java
浏览文件 @
3752c911
...
@@ -72,7 +72,7 @@ public class JobsLockResource {
...
@@ -72,7 +72,7 @@ public class JobsLockResource {
JobsLock
domain
=
jobslockMapping
.
toDomain
(
jobslockdto
);
JobsLock
domain
=
jobslockMapping
.
toDomain
(
jobslockdto
);
domain
.
setId
(
jobslock_id
);
domain
.
setId
(
jobslock_id
);
jobslockService
.
update
(
domain
);
jobslockService
.
update
(
domain
);
JobsLockDTO
dto
=
jobslockMapping
.
toDto
(
domain
);
JobsLockDTO
dto
=
jobslockMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
...
@@ -124,8 +124,10 @@ public class JobsLockResource {
...
@@ -124,8 +124,10 @@ public class JobsLockResource {
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLock-Save-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLock-Save-all')"
)
@ApiOperation
(
value
=
"保存任务锁"
,
tags
=
{
"任务锁"
},
notes
=
"保存任务锁"
)
@ApiOperation
(
value
=
"保存任务锁"
,
tags
=
{
"任务锁"
},
notes
=
"保存任务锁"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/jobslocks/save"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/jobslocks/save"
)
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
JobsLockDTO
jobslockdto
)
{
public
ResponseEntity
<
JobsLockDTO
>
save
(
@RequestBody
JobsLockDTO
jobslockdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
jobslockService
.
save
(
jobslockMapping
.
toDomain
(
jobslockdto
)));
JobsLock
domain
=
jobslockMapping
.
toDomain
(
jobslockdto
);
jobslockService
.
save
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
jobslockMapping
.
toDto
(
domain
));
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLock-Save-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLock-Save-all')"
)
...
...
ibztask-provider/ibztask-provider-api/src/main/java/cn/ibizlab/api/rest/JobsLogResource.java
浏览文件 @
3752c911
...
@@ -72,7 +72,7 @@ public class JobsLogResource {
...
@@ -72,7 +72,7 @@ public class JobsLogResource {
JobsLog
domain
=
jobslogMapping
.
toDomain
(
jobslogdto
);
JobsLog
domain
=
jobslogMapping
.
toDomain
(
jobslogdto
);
domain
.
setId
(
jobslog_id
);
domain
.
setId
(
jobslog_id
);
jobslogService
.
update
(
domain
);
jobslogService
.
update
(
domain
);
JobsLogDTO
dto
=
jobslogMapping
.
toDto
(
domain
);
JobsLogDTO
dto
=
jobslogMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
...
@@ -124,8 +124,10 @@ public class JobsLogResource {
...
@@ -124,8 +124,10 @@ public class JobsLogResource {
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLog-Save-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLog-Save-all')"
)
@ApiOperation
(
value
=
"保存任务调度日志"
,
tags
=
{
"任务调度日志"
},
notes
=
"保存任务调度日志"
)
@ApiOperation
(
value
=
"保存任务调度日志"
,
tags
=
{
"任务调度日志"
},
notes
=
"保存任务调度日志"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/jobslogs/save"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/jobslogs/save"
)
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
JobsLogDTO
jobslogdto
)
{
public
ResponseEntity
<
JobsLogDTO
>
save
(
@RequestBody
JobsLogDTO
jobslogdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
jobslogService
.
save
(
jobslogMapping
.
toDomain
(
jobslogdto
)));
JobsLog
domain
=
jobslogMapping
.
toDomain
(
jobslogdto
);
jobslogService
.
save
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
jobslogMapping
.
toDto
(
domain
));
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLog-Save-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLog-Save-all')"
)
...
...
ibztask-provider/ibztask-provider-api/src/main/java/cn/ibizlab/api/rest/JobsRegistryResource.java
浏览文件 @
3752c911
...
@@ -72,7 +72,7 @@ public class JobsRegistryResource {
...
@@ -72,7 +72,7 @@ public class JobsRegistryResource {
JobsRegistry
domain
=
jobsregistryMapping
.
toDomain
(
jobsregistrydto
);
JobsRegistry
domain
=
jobsregistryMapping
.
toDomain
(
jobsregistrydto
);
domain
.
setId
(
jobsregistry_id
);
domain
.
setId
(
jobsregistry_id
);
jobsregistryService
.
update
(
domain
);
jobsregistryService
.
update
(
domain
);
JobsRegistryDTO
dto
=
jobsregistryMapping
.
toDto
(
domain
);
JobsRegistryDTO
dto
=
jobsregistryMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
...
@@ -124,8 +124,10 @@ public class JobsRegistryResource {
...
@@ -124,8 +124,10 @@ public class JobsRegistryResource {
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsRegistry-Save-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsRegistry-Save-all')"
)
@ApiOperation
(
value
=
"保存任务注册信息"
,
tags
=
{
"任务注册信息"
},
notes
=
"保存任务注册信息"
)
@ApiOperation
(
value
=
"保存任务注册信息"
,
tags
=
{
"任务注册信息"
},
notes
=
"保存任务注册信息"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/jobsregistries/save"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/jobsregistries/save"
)
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
JobsRegistryDTO
jobsregistrydto
)
{
public
ResponseEntity
<
JobsRegistryDTO
>
save
(
@RequestBody
JobsRegistryDTO
jobsregistrydto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
jobsregistryService
.
save
(
jobsregistryMapping
.
toDomain
(
jobsregistrydto
)));
JobsRegistry
domain
=
jobsregistryMapping
.
toDomain
(
jobsregistrydto
);
jobsregistryService
.
save
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
jobsregistryMapping
.
toDto
(
domain
));
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsRegistry-Save-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsRegistry-Save-all')"
)
...
...
ibztask-util/pom.xml
浏览文件 @
3752c911
...
@@ -90,5 +90,39 @@
...
@@ -90,5 +90,39 @@
<artifactId>
feign-httpclient
</artifactId>
<artifactId>
feign-httpclient
</artifactId>
</dependency>
</dependency>
<!-- drools -->
<dependency>
<groupId>
org.drools
</groupId>
<artifactId>
drools-compiler
</artifactId>
</dependency>
<dependency>
<groupId>
org.drools
</groupId>
<artifactId>
drools-core
</artifactId>
</dependency>
<dependency>
<groupId>
org.kie
</groupId>
<artifactId>
kie-spring
</artifactId>
</dependency>
<dependency>
<groupId>
org.kie
</groupId>
<artifactId>
kie-api
</artifactId>
</dependency>
<dependency>
<groupId>
org.flowable
</groupId>
<artifactId>
flowable-json-converter
</artifactId>
</dependency>
<dependency>
<groupId>
org.flowable
</groupId>
<artifactId>
flowable-ui-modeler-conf
</artifactId>
<exclusions>
<exclusion>
<groupId>
org.apache.logging.log4j
</groupId>
<artifactId>
log4j-slf4j-impl
</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
ibztask-util/src/main/java/cn/ibizlab/util/aspect/DELogicAspect.java
0 → 100644
浏览文件 @
3752c911
此差异已折叠。
点击以展开。
ibztask-util/src/main/java/cn/ibizlab/util/cache/cache/LayeringCache.java
浏览文件 @
3752c911
...
@@ -59,15 +59,15 @@ public class LayeringCache extends AbstractValueAdaptingCache {
...
@@ -59,15 +59,15 @@ public class LayeringCache extends AbstractValueAdaptingCache {
@Override
@Override
public
ValueWrapper
get
(
Object
key
)
{
public
ValueWrapper
get
(
Object
key
)
{
ValueWrapper
wrapper
=
caffeineCache
.
get
(
key
);
ValueWrapper
wrapper
=
caffeineCache
.
get
(
key
);
Object
value
=
ObjectUtils
.
isEmpty
(
wrapper
)?
null
:
wrapper
.
get
();
Object
value
=
ObjectUtils
.
isEmpty
(
wrapper
)
?
null
:
wrapper
.
get
();
log
.
debug
(
"查询一级缓存 key:{}
,value:{}"
,
key
,
value
);
log
.
debug
(
"查询一级缓存 key:{}
"
,
key
,
value
);
if
(
ObjectUtils
.
isEmpty
(
value
))
{
if
(
ObjectUtils
.
isEmpty
(
value
))
{
wrapper
=
redisCache
.
get
(
key
);
wrapper
=
redisCache
.
get
(
key
);
value
=
ObjectUtils
.
isEmpty
(
wrapper
)?
null
:
wrapper
.
get
();
value
=
ObjectUtils
.
isEmpty
(
wrapper
)
?
null
:
wrapper
.
get
();
log
.
debug
(
"查询二级缓存 key:{}
,value:{}"
,
key
,
value
);
log
.
debug
(
"查询二级缓存 key:{}
"
,
key
);
if
(!
ObjectUtils
.
isEmpty
(
value
))
{
if
(!
ObjectUtils
.
isEmpty
(
value
))
{
caffeineCache
.
put
(
key
,
value
);
caffeineCache
.
put
(
key
,
value
);
log
.
debug
(
"查询二级缓存,并将数据放到一级缓存。 key:{}
,value:{}"
,
key
,
value
);
log
.
debug
(
"查询二级缓存,并将数据放到一级缓存。 key:{}
"
,
key
);
}
}
}
}
return
wrapper
;
return
wrapper
;
...
...
ibztask-util/src/main/java/cn/ibizlab/util/domain/DELogic.java
0 → 100644
浏览文件 @
3752c911
package
cn
.
ibizlab
.
util
.
domain
;
import
lombok.Data
;
import
org.flowable.bpmn.model.Process
;
import
org.kie.api.runtime.KieContainer
;
import
java.io.File
;
import
java.io.Serializable
;
import
java.util.List
;
@Data
public
class
DELogic
implements
Serializable
{
String
id
;
String
name
;
Process
process
;
KieContainer
container
;
List
<
DELogic
>
refLogic
;
List
<
File
>
refRuleFiles
;
String
md5
;
}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录