Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz企业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz企业套件
iBiz企业中心
提交
ddba5b72
提交
ddba5b72
编写于
7月 14, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chitanda 发布系统代码
上级
58306ba4
变更
38
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
38 个修改的文件
包含
2859 行增加
和
1407 行删除
+2859
-1407
app-mpicker.vue
app_CRM/src/components/app-mpicker/app-mpicker.vue
+27
-22
incidents.ts
app_CRM/src/mock/entity/incidents/incidents.ts
+246
-0
account-service-base.ts
app_CRM/src/service/account/account-service-base.ts
+50
-50
campaign-service-base.ts
app_CRM/src/service/campaign/campaign-service-base.ts
+41
-41
competitor-service-base.ts
app_CRM/src/service/competitor/competitor-service-base.ts
+46
-46
contact-service-base.ts
app_CRM/src/service/contact/contact-service-base.ts
+131
-131
ibiz-list-service-base.ts
app_CRM/src/service/ibiz-list/ibiz-list-service-base.ts
+50
-50
active-logic-base.ts
app_CRM/src/service/incident/active-logic-base.ts
+141
-0
active-logic.ts
app_CRM/src/service/incident/active-logic.ts
+22
-0
cancel-logic-base.ts
app_CRM/src/service/incident/cancel-logic-base.ts
+141
-0
cancel-logic.ts
app_CRM/src/service/incident/cancel-logic.ts
+22
-0
incident-service-base.ts
app_CRM/src/service/incident/incident-service-base.ts
+90
-0
resolve-logic-base.ts
app_CRM/src/service/incident/resolve-logic-base.ts
+141
-0
resolve-logic.ts
app_CRM/src/service/incident/resolve-logic.ts
+22
-0
lead-service-base.ts
app_CRM/src/service/lead/lead-service-base.ts
+369
-369
opportunity-service-base.ts
app_CRM/src/service/opportunity/opportunity-service-base.ts
+278
-278
product-service-base.ts
app_CRM/src/service/product/product-service-base.ts
+50
-50
sales-literature-service-base.ts
...service/sales-literature/sales-literature-service-base.ts
+46
-46
sales-order-service-base.ts
app_CRM/src/service/sales-order/sales-order-service-base.ts
+308
-308
IncidentMapper.java
...b/businesscentral/core/service/mapper/IncidentMapper.java
+3
-0
IIncidentService.java
...usinesscentral/core/service/service/IIncidentService.java
+6
-0
IncidentServiceImpl.java
...entral/core/service/service/impl/IncidentServiceImpl.java
+60
-0
IIncidentActiveLogic.java
...tral/core/service/service/logic/IIncidentActiveLogic.java
+18
-0
IIncidentCancelLogic.java
...tral/core/service/service/logic/IIncidentCancelLogic.java
+18
-0
IIncidentResolveLogic.java
...ral/core/service/service/logic/IIncidentResolveLogic.java
+18
-0
IncidentActiveLogicImpl.java
...e/service/service/logic/impl/IncidentActiveLogicImpl.java
+64
-0
IncidentCancelLogicImpl.java
...e/service/service/logic/impl/IncidentCancelLogicImpl.java
+64
-0
IncidentResolveLogicImpl.java
.../service/service/logic/impl/IncidentResolveLogicImpl.java
+64
-0
h2_table.xml
...esscentral-core/src/main/resources/liquibase/h2_table.xml
+14
-14
IncidentMapper.xml
...main/resources/mapper/service/incident/IncidentMapper.xml
+34
-0
systemResource.json
...al-core/src/main/resources/permission/systemResource.json
+2
-2
IncidentActiveRule.drl
...tral-core/src/main/resources/rules/IncidentActiveRule.drl
+37
-0
IncidentActiveRuleFlow.bpmn
...core/src/main/resources/rules/IncidentActiveRuleFlow.bpmn
+21
-0
IncidentCancelRule.drl
...tral-core/src/main/resources/rules/IncidentCancelRule.drl
+37
-0
IncidentCancelRuleFlow.bpmn
...core/src/main/resources/rules/IncidentCancelRuleFlow.bpmn
+21
-0
IncidentResolveRule.drl
...ral-core/src/main/resources/rules/IncidentResolveRule.drl
+37
-0
IncidentResolveRuleFlow.bpmn
...ore/src/main/resources/rules/IncidentResolveRuleFlow.bpmn
+21
-0
IncidentResource.java
...lab/businesscentral/centralapi/rest/IncidentResource.java
+99
-0
未找到文件。
app_CRM/src/components/app-mpicker/app-mpicker.vue
浏览文件 @
ddba5b72
...
...
@@ -246,16 +246,7 @@ export default class AppMpicker extends Vue {
if
(
index
>=
0
)
{
const
item
=
this
.
items
[
index
];
const
params
=
{
[
this
.
deKeyField
]:
item
[
this
.
deKeyField
],
[
this
.
deMajorField
]:
item
[
this
.
deMajorField
]
};
if
(
isExist
(
this
.
extraFillParams
))
{
for
(
const
key
in
this
.
extraFillParams
)
{
if
(
this
.
extraFillParams
.
hasOwnProperty
(
key
))
{
const
self
=
this
.
extraFillParams
[
key
];
if
(
isExist
(
item
[
self
.
key
]))
{
Object
.
assign
(
params
,
{
[
self
.
value
]:
item
[
self
.
key
]});
}
}
}
}
this
.
fillExtraValue
(
params
,
item
);
val
.
push
(
params
);
}
else
{
index
=
this
.
selectItems
.
findIndex
((
item
:
any
)
=>
Object
.
is
(
item
[
this
.
deKeyField
],
select
));
...
...
@@ -355,16 +346,7 @@ export default class AppMpicker extends Vue {
let
index
=
this
.
items
.
findIndex
((
item
)
=>
Object
.
is
(
item
[
this
.
deKeyField
],
select
[
this
.
deKeyField
]));
if
(
index
<
0
)
{
const
params
=
{
[
this
.
deMajorField
]:
select
[
this
.
deMajorField
],
[
this
.
deKeyField
]:
select
[
this
.
deKeyField
]
}
if
(
isExist
(
this
.
extraFillParams
))
{
for
(
const
key
in
this
.
extraFillParams
)
{
if
(
this
.
extraFillParams
.
hasOwnProperty
(
key
))
{
const
self
=
this
.
extraFillParams
[
key
];
if
(
isExist
(
select
[
self
.
key
]))
{
Object
.
assign
(
params
,
{
[
self
.
value
]:
select
[
self
.
key
]});
}
}
}
}
this
.
fillExtraValue
(
params
,
select
);
this
.
items
.
push
(
params
);
}
});
...
...
@@ -387,7 +369,9 @@ export default class AppMpicker extends Vue {
let
result
=
[];
if
(
this
.
deKeyField
!==
"srfkey"
||
this
.
deMajorField
!==
"srfmajortext"
){
value
.
forEach
((
item
:
any
)
=>
{
result
.
push
({[
this
.
deMajorField
]:
item
.
srfmajortext
,
[
this
.
deKeyField
]:
item
.
srfkey
});
const
params
=
{[
this
.
deMajorField
]:
item
.
srfmajortext
,
[
this
.
deKeyField
]:
item
.
srfkey
};
this
.
fillExtraValue
(
params
,
item
);
result
.
push
(
params
);
});
}
else
{
result
=
value
;
...
...
@@ -405,7 +389,9 @@ export default class AppMpicker extends Vue {
let
result
=
[];
if
(
this
.
deKeyField
!==
"srfkey"
||
this
.
deMajorField
!==
"srfmajortext"
){
value
.
forEach
((
item
:
any
)
=>
{
result
.
push
({
srfmajortext
:
item
[
this
.
deMajorField
],
srfkey
:
item
[
this
.
deKeyField
]});
const
params
=
{
srfmajortext
:
item
[
this
.
deMajorField
],
srfkey
:
item
[
this
.
deKeyField
]};
this
.
fillExtraValue
(
params
,
item
);
result
.
push
(
params
);
});
}
else
{
result
=
value
;
...
...
@@ -413,6 +399,25 @@ export default class AppMpicker extends Vue {
return
result
;
}
/**
* 填充额外参数
*
* @param {*} params
* @param {*} item
* @memberof AppMpicker
*/
public
fillExtraValue
(
params
:
any
,
item
:
any
):
void
{
if
(
isExist
(
this
.
extraFillParams
))
{
for
(
const
key
in
this
.
extraFillParams
)
{
if
(
this
.
extraFillParams
.
hasOwnProperty
(
key
))
{
const
self
=
this
.
extraFillParams
[
key
];
if
(
isExist
(
item
[
self
.
key
]))
{
Object
.
assign
(
params
,
{
[
self
.
value
]:
item
[
self
.
key
]});
}
}
}
}
}
}
</
script
>
...
...
app_CRM/src/mock/entity/incidents/incidents.ts
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
app_CRM/src/service/account/account-service-base.ts
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
app_CRM/src/service/campaign/campaign-service-base.ts
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
app_CRM/src/service/competitor/competitor-service-base.ts
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
app_CRM/src/service/contact/contact-service-base.ts
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
app_CRM/src/service/ibiz-list/ibiz-list-service-base.ts
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
app_CRM/src/service/incident/active-logic-base.ts
0 → 100644
浏览文件 @
ddba5b72
import
IncidentService
from
'@/service/incident/incident-service'
;
import
{
Verify
}
from
'@/utils/verify/verify'
;
/**
* 重新激活
*
* @export
* @class ActiveLogicBase
*/
export
default
class
ActiveLogicBase
{
/**
* 名称
*
* @memberof ActiveLogicBase
*/
private
name
:
string
=
"Active"
;
/**
* 唯一标识
*
* @memberof ActiveLogicBase
*/
private
id
:
string
=
"111CBE02-6C43-4707-8AFF-2BC47BC50E83"
;
/**
* 默认参数名称
*
* @memberof ActiveLogicBase
*/
private
defaultParamName
:
string
=
"Default"
;
/**
* 参数集合
*
* @memberof ActiveLogicBase
*/
private
paramsMap
:
Map
<
string
,
any
>
=
new
Map
();
/**
* Creates an instance of ActiveLogicBase.
*
* @param {*} [opts={}]
* @memberof ActiveLogicBase
*/
constructor
(
opts
:
any
=
{})
{
this
.
initParams
(
opts
);
}
/**
* 初始化参数集合
*
* @param {*} [opts={}]
* @memberof ActiveLogicBase
*/
public
initParams
(
opts
:
any
){
this
.
paramsMap
.
set
(
'Default'
,
opts
);
}
/**
* 计算0节点结果
*
* @param params 传入参数
*/
public
compute0Cond
(
params
:
any
):
boolean
{
return
true
;
}
/**
* 计算1节点结果
*
* @param params 传入参数
*/
public
compute1Cond
(
params
:
any
):
boolean
{
return
true
;
}
/**
* 执行逻辑
*
* @param context 应用上下文
* @param params 传入参数
*/
public
onExecute
(
context
:
any
,
params
:
any
,
isloading
:
boolean
){
return
this
.
executeBegin
(
context
,
params
,
isloading
);
}
/**
* 准备参数
*
* @param context 应用上下文
* @param params 传入参数
*/
private
async
executePrepareparam1
(
context
:
any
,
params
:
any
,
isloading
:
boolean
){
// 准备参数节点
let
tempDstParam0Context
:
any
=
this
.
paramsMap
.
get
(
'Default'
).
context
?
this
.
paramsMap
.
get
(
'Default'
).
context
:{};
let
tempDstParam0Data
:
any
=
this
.
paramsMap
.
get
(
'Default'
).
data
?
this
.
paramsMap
.
get
(
'Default'
).
data
:{};
Object
.
assign
(
tempDstParam0Data
,{
statecode
:
"0"
});
this
.
paramsMap
.
set
(
'Default'
,{
data
:
tempDstParam0Data
,
context
:
tempDstParam0Context
});
if
(
this
.
compute1Cond
(
params
)){
return
this
.
executeDeaction1
(
context
,
params
,
isloading
);
}
}
/**
* 开始
*
* @param params 传入参数
*/
private
async
executeBegin
(
context
:
any
,
params
:
any
,
isloading
:
boolean
){
//开始节点
if
(
this
.
compute0Cond
(
params
)){
return
this
.
executePrepareparam1
(
context
,
params
,
isloading
);
}
}
/**
* 更新案例状态
*
* @param context 应用上下文
* @param params 传入参数
*/
private
async
executeDeaction1
(
context
:
any
,
params
:
any
,
isloading
:
boolean
){
// 行为处理节点
let
result
:
any
;
let
actionParam
:
any
=
this
.
paramsMap
.
get
(
'Default'
);
const
targetService
:
IncidentService
=
new
IncidentService
();
if
(
targetService
[
'Update'
]
&&
targetService
[
'Update'
]
instanceof
Function
)
{
result
=
await
targetService
[
'Update'
](
actionParam
.
context
,
actionParam
.
data
,
false
);
}
if
(
result
&&
result
.
status
==
200
){
Object
.
assign
(
actionParam
.
data
,
result
.
data
);
return
this
.
paramsMap
.
get
(
this
.
defaultParamName
).
data
;
}
}
}
\ No newline at end of file
app_CRM/src/service/incident/active-logic.ts
0 → 100644
浏览文件 @
ddba5b72
import
{
Http
,
Util
}
from
'@/utils'
;
import
ActiveLogicBase
from
'./active-logic-base'
;
/**
* 重新激活
*
* @export
* @class ActiveLogic
*/
export
default
class
ActiveLogic
extends
ActiveLogicBase
{
/**
* Creates an instance of ActiveLogic
*
* @param {*} [opts={}]
* @memberof ActiveLogic
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
}
}
\ No newline at end of file
app_CRM/src/service/incident/cancel-logic-base.ts
0 → 100644
浏览文件 @
ddba5b72
import
IncidentService
from
'@/service/incident/incident-service'
;
import
{
Verify
}
from
'@/utils/verify/verify'
;
/**
* 取消案例
*
* @export
* @class CancelLogicBase
*/
export
default
class
CancelLogicBase
{
/**
* 名称
*
* @memberof CancelLogicBase
*/
private
name
:
string
=
"Cancel"
;
/**
* 唯一标识
*
* @memberof CancelLogicBase
*/
private
id
:
string
=
"5557E4DD-1650-42B6-A5D5-9292CBEE3342"
;
/**
* 默认参数名称
*
* @memberof CancelLogicBase
*/
private
defaultParamName
:
string
=
"Default"
;
/**
* 参数集合
*
* @memberof CancelLogicBase
*/
private
paramsMap
:
Map
<
string
,
any
>
=
new
Map
();
/**
* Creates an instance of CancelLogicBase.
*
* @param {*} [opts={}]
* @memberof CancelLogicBase
*/
constructor
(
opts
:
any
=
{})
{
this
.
initParams
(
opts
);
}
/**
* 初始化参数集合
*
* @param {*} [opts={}]
* @memberof CancelLogicBase
*/
public
initParams
(
opts
:
any
){
this
.
paramsMap
.
set
(
'Default'
,
opts
);
}
/**
* 计算0节点结果
*
* @param params 传入参数
*/
public
compute0Cond
(
params
:
any
):
boolean
{
return
true
;
}
/**
* 计算1节点结果
*
* @param params 传入参数
*/
public
compute1Cond
(
params
:
any
):
boolean
{
return
true
;
}
/**
* 执行逻辑
*
* @param context 应用上下文
* @param params 传入参数
*/
public
onExecute
(
context
:
any
,
params
:
any
,
isloading
:
boolean
){
return
this
.
executeBegin
(
context
,
params
,
isloading
);
}
/**
* 开始
*
* @param params 传入参数
*/
private
async
executeBegin
(
context
:
any
,
params
:
any
,
isloading
:
boolean
){
//开始节点
if
(
this
.
compute1Cond
(
params
)){
return
this
.
executePrepareparam1
(
context
,
params
,
isloading
);
}
}
/**
* 准备参数
*
* @param context 应用上下文
* @param params 传入参数
*/
private
async
executePrepareparam1
(
context
:
any
,
params
:
any
,
isloading
:
boolean
){
// 准备参数节点
let
tempDstParam0Context
:
any
=
this
.
paramsMap
.
get
(
'Default'
).
context
?
this
.
paramsMap
.
get
(
'Default'
).
context
:{};
let
tempDstParam0Data
:
any
=
this
.
paramsMap
.
get
(
'Default'
).
data
?
this
.
paramsMap
.
get
(
'Default'
).
data
:{};
Object
.
assign
(
tempDstParam0Data
,{
statecode
:
"2"
});
this
.
paramsMap
.
set
(
'Default'
,{
data
:
tempDstParam0Data
,
context
:
tempDstParam0Context
});
if
(
this
.
compute0Cond
(
params
)){
return
this
.
executeDeaction1
(
context
,
params
,
isloading
);
}
}
/**
* 更新案例状态
*
* @param context 应用上下文
* @param params 传入参数
*/
private
async
executeDeaction1
(
context
:
any
,
params
:
any
,
isloading
:
boolean
){
// 行为处理节点
let
result
:
any
;
let
actionParam
:
any
=
this
.
paramsMap
.
get
(
'Default'
);
const
targetService
:
IncidentService
=
new
IncidentService
();
if
(
targetService
[
'Update'
]
&&
targetService
[
'Update'
]
instanceof
Function
)
{
result
=
await
targetService
[
'Update'
](
actionParam
.
context
,
actionParam
.
data
,
false
);
}
if
(
result
&&
result
.
status
==
200
){
Object
.
assign
(
actionParam
.
data
,
result
.
data
);
return
this
.
paramsMap
.
get
(
this
.
defaultParamName
).
data
;
}
}
}
\ No newline at end of file
app_CRM/src/service/incident/cancel-logic.ts
0 → 100644
浏览文件 @
ddba5b72
import
{
Http
,
Util
}
from
'@/utils'
;
import
CancelLogicBase
from
'./cancel-logic-base'
;
/**
* 取消案例
*
* @export
* @class CancelLogic
*/
export
default
class
CancelLogic
extends
CancelLogicBase
{
/**
* Creates an instance of CancelLogic
*
* @param {*} [opts={}]
* @memberof CancelLogic
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
}
}
\ No newline at end of file
app_CRM/src/service/incident/incident-service-base.ts
浏览文件 @
ddba5b72
import
{
Http
,
Util
}
from
'@/utils'
;
import
EntityService
from
'../entity-service'
;
import
ActiveLogic
from
'@/service/incident/active-logic'
;
import
CancelLogic
from
'@/service/incident/cancel-logic'
;
import
ResolveLogic
from
'@/service/incident/resolve-logic'
;
...
...
@@ -166,6 +169,36 @@ export default class IncidentServiceBase extends EntityService {
return
res
;
}
/**
* Active接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IncidentServiceBase
*/
public
async
Active
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
appLogic
:
ActiveLogic
=
new
ActiveLogic
({
context
:
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
:
JSON
.
parse
(
JSON
.
stringify
(
data
))});
const
result
=
await
appLogic
.
onExecute
(
context
,
data
,
isloading
?
true
:
false
);
return
{
status
:
200
,
data
:
result
};
}
/**
* Cancel接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IncidentServiceBase
*/
public
async
Cancel
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
appLogic
:
CancelLogic
=
new
CancelLogic
({
context
:
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
:
JSON
.
parse
(
JSON
.
stringify
(
data
))});
const
result
=
await
appLogic
.
onExecute
(
context
,
data
,
isloading
?
true
:
false
);
return
{
status
:
200
,
data
:
result
};
}
/**
* CheckKey接口方法
*
...
...
@@ -179,6 +212,21 @@ export default class IncidentServiceBase extends EntityService {
return
Http
.
getInstance
().
post
(
`/incidents/
${
context
.
incident
}
/checkkey`
,
data
,
isloading
);
}
/**
* Resolve接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IncidentServiceBase
*/
public
async
Resolve
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
appLogic
:
ResolveLogic
=
new
ResolveLogic
({
context
:
JSON
.
parse
(
JSON
.
stringify
(
context
)),
data
:
JSON
.
parse
(
JSON
.
stringify
(
data
))});
const
result
=
await
appLogic
.
onExecute
(
context
,
data
,
isloading
?
true
:
false
);
return
{
status
:
200
,
data
:
result
};
}
/**
* Save接口方法
*
...
...
@@ -225,6 +273,20 @@ export default class IncidentServiceBase extends EntityService {
return
Http
.
getInstance
().
get
(
`/incidents/fetchbyparentkey`
,
tempData
,
isloading
);
}
/**
* FetchCancel接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IncidentServiceBase
*/
public
async
FetchCancel
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/incidents/fetchcancel`
,
tempData
,
isloading
);
}
/**
* FetchDefault接口方法
*
...
...
@@ -238,4 +300,32 @@ export default class IncidentServiceBase extends EntityService {
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/incidents/fetchdefault`
,
tempData
,
isloading
);
}
/**
* FetchEffective接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IncidentServiceBase
*/
public
async
FetchEffective
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/incidents/fetcheffective`
,
tempData
,
isloading
);
}
/**
* FetchResolved接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IncidentServiceBase
*/
public
async
FetchResolved
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/incidents/fetchresolved`
,
tempData
,
isloading
);
}
}
\ No newline at end of file
app_CRM/src/service/incident/resolve-logic-base.ts
0 → 100644
浏览文件 @
ddba5b72
import
IncidentService
from
'@/service/incident/incident-service'
;
import
{
Verify
}
from
'@/utils/verify/verify'
;
/**
* 解决案例
*
* @export
* @class ResolveLogicBase
*/
export
default
class
ResolveLogicBase
{
/**
* 名称
*
* @memberof ResolveLogicBase
*/
private
name
:
string
=
"Resolve"
;
/**
* 唯一标识
*
* @memberof ResolveLogicBase
*/
private
id
:
string
=
"D4E611FE-33A7-4E2B-9C69-39C61428C926"
;
/**
* 默认参数名称
*
* @memberof ResolveLogicBase
*/
private
defaultParamName
:
string
=
"Default"
;
/**
* 参数集合
*
* @memberof ResolveLogicBase
*/
private
paramsMap
:
Map
<
string
,
any
>
=
new
Map
();
/**
* Creates an instance of ResolveLogicBase.
*
* @param {*} [opts={}]
* @memberof ResolveLogicBase
*/
constructor
(
opts
:
any
=
{})
{
this
.
initParams
(
opts
);
}
/**
* 初始化参数集合
*
* @param {*} [opts={}]
* @memberof ResolveLogicBase
*/
public
initParams
(
opts
:
any
){
this
.
paramsMap
.
set
(
'Default'
,
opts
);
}
/**
* 计算0节点结果
*
* @param params 传入参数
*/
public
compute0Cond
(
params
:
any
):
boolean
{
return
true
;
}
/**
* 计算1节点结果
*
* @param params 传入参数
*/
public
compute1Cond
(
params
:
any
):
boolean
{
return
true
;
}
/**
* 执行逻辑
*
* @param context 应用上下文
* @param params 传入参数
*/
public
onExecute
(
context
:
any
,
params
:
any
,
isloading
:
boolean
){
return
this
.
executeBegin
(
context
,
params
,
isloading
);
}
/**
* 开始
*
* @param params 传入参数
*/
private
async
executeBegin
(
context
:
any
,
params
:
any
,
isloading
:
boolean
){
//开始节点
if
(
this
.
compute1Cond
(
params
)){
return
this
.
executePrepareparam1
(
context
,
params
,
isloading
);
}
}
/**
* 准备参数
*
* @param context 应用上下文
* @param params 传入参数
*/
private
async
executePrepareparam1
(
context
:
any
,
params
:
any
,
isloading
:
boolean
){
// 准备参数节点
let
tempDstParam0Context
:
any
=
this
.
paramsMap
.
get
(
'Default'
).
context
?
this
.
paramsMap
.
get
(
'Default'
).
context
:{};
let
tempDstParam0Data
:
any
=
this
.
paramsMap
.
get
(
'Default'
).
data
?
this
.
paramsMap
.
get
(
'Default'
).
data
:{};
Object
.
assign
(
tempDstParam0Data
,{
statecode
:
"1"
});
this
.
paramsMap
.
set
(
'Default'
,{
data
:
tempDstParam0Data
,
context
:
tempDstParam0Context
});
if
(
this
.
compute0Cond
(
params
)){
return
this
.
executeDeaction1
(
context
,
params
,
isloading
);
}
}
/**
* 更新案例状态
*
* @param context 应用上下文
* @param params 传入参数
*/
private
async
executeDeaction1
(
context
:
any
,
params
:
any
,
isloading
:
boolean
){
// 行为处理节点
let
result
:
any
;
let
actionParam
:
any
=
this
.
paramsMap
.
get
(
'Default'
);
const
targetService
:
IncidentService
=
new
IncidentService
();
if
(
targetService
[
'Update'
]
&&
targetService
[
'Update'
]
instanceof
Function
)
{
result
=
await
targetService
[
'Update'
](
actionParam
.
context
,
actionParam
.
data
,
false
);
}
if
(
result
&&
result
.
status
==
200
){
Object
.
assign
(
actionParam
.
data
,
result
.
data
);
return
this
.
paramsMap
.
get
(
this
.
defaultParamName
).
data
;
}
}
}
\ No newline at end of file
app_CRM/src/service/incident/resolve-logic.ts
0 → 100644
浏览文件 @
ddba5b72
import
{
Http
,
Util
}
from
'@/utils'
;
import
ResolveLogicBase
from
'./resolve-logic-base'
;
/**
* 解决案例
*
* @export
* @class ResolveLogic
*/
export
default
class
ResolveLogic
extends
ResolveLogicBase
{
/**
* Creates an instance of ResolveLogic
*
* @param {*} [opts={}]
* @memberof ResolveLogic
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
}
}
\ No newline at end of file
app_CRM/src/service/lead/lead-service-base.ts
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
app_CRM/src/service/opportunity/opportunity-service-base.ts
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
app_CRM/src/service/product/product-service-base.ts
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
app_CRM/src/service/sales-literature/sales-literature-service-base.ts
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
app_CRM/src/service/sales-order/sales-order-service-base.ts
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/service/mapper/IncidentMapper.java
浏览文件 @
ddba5b72
...
...
@@ -20,7 +20,10 @@ import com.alibaba.fastjson.JSONObject;
public
interface
IncidentMapper
extends
BaseMapper
<
Incident
>{
Page
<
Incident
>
searchByParentKey
(
IPage
page
,
@Param
(
"srf"
)
IncidentSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
Incident
>
wrapper
)
;
Page
<
Incident
>
searchCancel
(
IPage
page
,
@Param
(
"srf"
)
IncidentSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
Incident
>
wrapper
)
;
Page
<
Incident
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
IncidentSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
Incident
>
wrapper
)
;
Page
<
Incident
>
searchEffective
(
IPage
page
,
@Param
(
"srf"
)
IncidentSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
Incident
>
wrapper
)
;
Page
<
Incident
>
searchResolved
(
IPage
page
,
@Param
(
"srf"
)
IncidentSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
Incident
>
wrapper
)
;
@Override
Incident
selectById
(
Serializable
id
);
@Override
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/service/service/IIncidentService.java
浏览文件 @
ddba5b72
...
...
@@ -33,11 +33,17 @@ public interface IIncidentService extends IService<Incident>{
void
removeBatch
(
Collection
<
String
>
idList
)
;
Incident
get
(
String
key
)
;
Incident
getDraft
(
Incident
et
)
;
Incident
active
(
Incident
et
)
;
Incident
cancel
(
Incident
et
)
;
boolean
checkKey
(
Incident
et
)
;
Incident
resolve
(
Incident
et
)
;
boolean
save
(
Incident
et
)
;
void
saveBatch
(
List
<
Incident
>
list
)
;
Page
<
Incident
>
searchByParentKey
(
IncidentSearchContext
context
)
;
Page
<
Incident
>
searchCancel
(
IncidentSearchContext
context
)
;
Page
<
Incident
>
searchDefault
(
IncidentSearchContext
context
)
;
Page
<
Incident
>
searchEffective
(
IncidentSearchContext
context
)
;
Page
<
Incident
>
searchResolved
(
IncidentSearchContext
context
)
;
List
<
Incident
>
selectByPrimarycontactid
(
String
contactid
)
;
void
removeByPrimarycontactid
(
String
contactid
)
;
List
<
Incident
>
selectByResponsiblecontactid
(
String
contactid
)
;
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/service/service/impl/IncidentServiceImpl.java
浏览文件 @
ddba5b72
...
...
@@ -83,6 +83,18 @@ public class IncidentServiceImpl extends ServiceImpl<IncidentMapper, Incident> i
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
base
.
service
.
ITransactionCurrencyService
transactioncurrencyService
;
@Autowired
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
service
.
service
.
logic
.
IIncidentActiveLogic
activeLogic
;
@Autowired
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
service
.
service
.
logic
.
IIncidentCancelLogic
cancelLogic
;
@Autowired
@Lazy
protected
cn
.
ibizlab
.
businesscentral
.
core
.
service
.
service
.
logic
.
IIncidentResolveLogic
resolveLogic
;
protected
int
batchSize
=
500
;
@Override
...
...
@@ -148,10 +160,31 @@ public class IncidentServiceImpl extends ServiceImpl<IncidentMapper, Incident> i
return
et
;
}
@Override
@Transactional
public
Incident
active
(
Incident
et
)
{
activeLogic
.
execute
(
et
);
return
et
;
}
@Override
@Transactional
public
Incident
cancel
(
Incident
et
)
{
cancelLogic
.
execute
(
et
);
return
et
;
}
@Override
public
boolean
checkKey
(
Incident
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getIncidentid
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getIncidentid
())));
}
@Override
@Transactional
public
Incident
resolve
(
Incident
et
)
{
resolveLogic
.
execute
(
et
);
return
et
;
}
@Override
@Transactional
public
boolean
save
(
Incident
et
)
{
...
...
@@ -336,6 +369,15 @@ public class IncidentServiceImpl extends ServiceImpl<IncidentMapper, Incident> i
return
new
PageImpl
<
Incident
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
/**
* 查询集合 已取消
*/
@Override
public
Page
<
Incident
>
searchCancel
(
IncidentSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
Incident
>
pages
=
baseMapper
.
searchCancel
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
Incident
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
/**
* 查询集合 DEFAULT
*/
...
...
@@ -345,6 +387,24 @@ public class IncidentServiceImpl extends ServiceImpl<IncidentMapper, Incident> i
return
new
PageImpl
<
Incident
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
/**
* 查询集合 有效
*/
@Override
public
Page
<
Incident
>
searchEffective
(
IncidentSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
Incident
>
pages
=
baseMapper
.
searchEffective
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
Incident
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
/**
* 查询集合 已解决
*/
@Override
public
Page
<
Incident
>
searchResolved
(
IncidentSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
Incident
>
pages
=
baseMapper
.
searchResolved
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
Incident
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
/**
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/service/service/logic/IIncidentActiveLogic.java
0 → 100644
浏览文件 @
ddba5b72
package
cn
.
ibizlab
.
businesscentral
.
core
.
service
.
service
.
logic
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.HashMap
;
import
cn.ibizlab.businesscentral.core.service.domain.Incident
;
/**
* 关系型数据实体[Active] 对象
*/
public
interface
IIncidentActiveLogic
{
void
execute
(
Incident
incident
)
;
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/service/service/logic/IIncidentCancelLogic.java
0 → 100644
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/service/service/logic/IIncidentResolveLogic.java
0 → 100644
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/service/service/logic/impl/IncidentActiveLogicImpl.java
0 → 100644
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/service/service/logic/impl/IncidentCancelLogicImpl.java
0 → 100644
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/service/service/logic/impl/IncidentResolveLogicImpl.java
0 → 100644
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
businesscentral-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
businesscentral-core/src/main/resources/mapper/service/incident/IncidentMapper.xml
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
businesscentral-core/src/main/resources/permission/systemResource.json
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
businesscentral-core/src/main/resources/rules/IncidentActiveRule.drl
0 → 100644
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
businesscentral-core/src/main/resources/rules/IncidentActiveRuleFlow.bpmn
0 → 100644
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
businesscentral-core/src/main/resources/rules/IncidentCancelRule.drl
0 → 100644
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
businesscentral-core/src/main/resources/rules/IncidentCancelRuleFlow.bpmn
0 → 100644
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
businesscentral-core/src/main/resources/rules/IncidentResolveRule.drl
0 → 100644
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
businesscentral-core/src/main/resources/rules/IncidentResolveRuleFlow.bpmn
0 → 100644
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
businesscentral-provider/businesscentral-provider-centralapi/src/main/java/cn/ibizlab/businesscentral/centralapi/rest/IncidentResource.java
浏览文件 @
ddba5b72
此差异已折叠。
点击以展开。
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录