Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz企业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz企业套件
iBiz企业中心
提交
5b2e3d4c
提交
5b2e3d4c
编写于
7月 03, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xignzi006 发布系统代码
上级
45d495c5
变更
26
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
26 个修改的文件
包含
1126 行增加
和
248 行删除
+1126
-248
account_en_US.ts
app_CRM/src/locale/lanres/entities/account/account_en_US.ts
+17
-9
account_zh_CN.ts
app_CRM/src/locale/lanres/entities/account/account_zh_CN.ts
+15
-7
contact_en_US.ts
app_CRM/src/locale/lanres/entities/contact/contact_en_US.ts
+16
-0
contact_zh_CN.ts
app_CRM/src/locale/lanres/entities/contact/contact_zh_CN.ts
+16
-0
accounts.ts
app_CRM/src/mock/entity/accounts/accounts.ts
+76
-0
contacts.ts
app_CRM/src/mock/entity/contacts/contacts.ts
+130
-0
account-info-base.tsx
app_CRM/src/pages/base/account-info/account-info-base.tsx
+44
-10
contact-info-base.tsx
app_CRM/src/pages/base/contact-info/contact-info-base.tsx
+69
-0
account-service-base.ts
app_CRM/src/service/account/account-service-base.ts
+26
-0
contact-service-base.ts
app_CRM/src/service/contact/contact-service-base.ts
+234
-100
ibiz-list-service-base.ts
app_CRM/src/service/ibiz-list/ibiz-list-service-base.ts
+50
-50
product-service-base.ts
app_CRM/src/service/product/product-service-base.ts
+47
-47
state.ts
app_CRM/src/store/modules/view-action/state.ts
+0
-1
account-ui-service-base.ts
app_CRM/src/uiservice/account/account-ui-service-base.ts
+69
-2
contact-ui-service-base.ts
app_CRM/src/uiservice/contact/contact-ui-service-base.ts
+134
-0
gradation-treeview-base.tsx
...ts/account/gradation-treeview/gradation-treeview-base.tsx
+2
-2
IAccountService.java
...ab/businesscentral/core/base/service/IAccountService.java
+2
-0
IContactService.java
...ab/businesscentral/core/base/service/IContactService.java
+2
-0
AccountServiceImpl.java
...esscentral/core/base/service/impl/AccountServiceImpl.java
+14
-0
ContactServiceImpl.java
...esscentral/core/base/service/impl/ContactServiceImpl.java
+14
-0
AccountServiceEx.java
...nesscentral/core/extensions.service/AccountServiceEx.java
+12
-0
AccountExService.java
...nesscentral/core/extensions/service/AccountExService.java
+45
-0
h2_table.xml
...esscentral-core/src/main/resources/liquibase/h2_table.xml
+18
-18
systemResource.json
...al-core/src/main/resources/permission/systemResource.json
+2
-2
AccountResource.java
...zlab/businesscentral/centralapi/rest/AccountResource.java
+24
-0
ContactResource.java
...zlab/businesscentral/centralapi/rest/ContactResource.java
+48
-0
未找到文件。
app_CRM/src/locale/lanres/entities/account/account_en_US.ts
浏览文件 @
5b2e3d4c
...
...
@@ -668,14 +668,6 @@ export default {
},
},
infotoolbar_toolbar
:
{
tbitem1_openmaineditview
:
{
caption
:
"编辑"
,
tip
:
"编辑"
,
},
seperator3
:
{
caption
:
""
,
tip
:
""
,
},
deuiaction4
:
{
caption
:
"Edit"
,
tip
:
"Edit {0}"
,
...
...
@@ -684,6 +676,22 @@ export default {
caption
:
""
,
tip
:
""
,
},
tbitem17_inactive
:
{
caption
:
"停用"
,
tip
:
"停用"
,
},
tbitem17_active_sep
:
{
caption
:
""
,
tip
:
""
,
},
tbitem17_active
:
{
caption
:
"激活"
,
tip
:
"激活"
,
},
tbitem2
:
{
caption
:
"-"
,
tip
:
""
,
},
deuiaction1
:
{
caption
:
"Remove And Close"
,
tip
:
"Remove And Close Window"
,
...
...
@@ -711,7 +719,7 @@ export default {
},
uiactions
:
{
account_openmaineditview
:
"编辑"
,
account_
disabl
e
:
"停用"
,
account_
inactiv
e
:
"停用"
,
account_remove
:
"删除"
,
},
},
...
...
app_CRM/src/locale/lanres/entities/account/account_zh_CN.ts
浏览文件 @
5b2e3d4c
...
...
@@ -667,22 +667,30 @@ export default {
},
},
infotoolbar_toolbar
:
{
tbitem1_openmaineditview
:
{
deuiaction4
:
{
caption
:
"编辑"
,
tip
:
"编辑"
,
},
seperator
3
:
{
seperator
4
:
{
caption
:
""
,
tip
:
""
,
},
deuiaction4
:
{
caption
:
"
编辑
"
,
tip
:
"
编辑
"
,
tbitem17_inactive
:
{
caption
:
"
停用
"
,
tip
:
"
停用
"
,
},
seperator4
:
{
tbitem17_active_sep
:
{
caption
:
""
,
tip
:
""
,
},
tbitem17_active
:
{
caption
:
"激活"
,
tip
:
"激活"
,
},
tbitem2
:
{
caption
:
"-"
,
tip
:
""
,
},
deuiaction1
:
{
caption
:
"删除并关闭"
,
tip
:
"删除并关闭"
,
...
...
@@ -710,7 +718,7 @@ export default {
},
uiactions
:
{
account_openmaineditview
:
"编辑"
,
account_
disabl
e
:
"停用"
,
account_
inactiv
e
:
"停用"
,
account_remove
:
"删除"
,
},
},
...
...
app_CRM/src/locale/lanres/entities/contact/contact_en_US.ts
浏览文件 @
5b2e3d4c
...
...
@@ -616,6 +616,22 @@ export default {
caption
:
""
,
tip
:
""
,
},
tbitem17_inactive
:
{
caption
:
"停用"
,
tip
:
"停用"
,
},
tbitem17_active_sep
:
{
caption
:
""
,
tip
:
""
,
},
tbitem17_active
:
{
caption
:
"激活"
,
tip
:
"激活"
,
},
tbitem2
:
{
caption
:
"-"
,
tip
:
""
,
},
deuiaction1
:
{
caption
:
"Remove And Close"
,
tip
:
"Remove And Close Window"
,
...
...
app_CRM/src/locale/lanres/entities/contact/contact_zh_CN.ts
浏览文件 @
5b2e3d4c
...
...
@@ -615,6 +615,22 @@ export default {
caption
:
""
,
tip
:
""
,
},
tbitem17_inactive
:
{
caption
:
"停用"
,
tip
:
"停用"
,
},
tbitem17_active_sep
:
{
caption
:
""
,
tip
:
""
,
},
tbitem17_active
:
{
caption
:
"激活"
,
tip
:
"激活"
,
},
tbitem2
:
{
caption
:
"-"
,
tip
:
""
,
},
deuiaction1
:
{
caption
:
"删除并关闭"
,
tip
:
"删除并关闭"
,
...
...
app_CRM/src/mock/entity/accounts/accounts.ts
浏览文件 @
5b2e3d4c
...
...
@@ -195,6 +195,44 @@ mock.onGet(new RegExp(/^\/accounts\/getdraft$/)).reply((config: any) => {
return
[
status
,
{}];
});
// Active
mock
.
onPost
(
new
RegExp
(
/^
\/
accounts
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
active$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:account 方法: Active"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'accountid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
accounts
\/([
a-zA-Z0-9
\-\;]{1,35})\/
active$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.accountid, tempValue.accountid));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'accountid'
]
==
tempValue
[
'accountid'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
});
// CheckKey
mock
.
onPost
(
new
RegExp
(
/^
\/
accounts
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:account 方法: CheckKey"
);
...
...
@@ -233,6 +271,44 @@ mock.onPost(new RegExp(/^\/accounts\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).repl
return
[
status
,
data
];
});
// Inactive
mock
.
onPost
(
new
RegExp
(
/^
\/
accounts
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
inactive$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:account 方法: Inactive"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'accountid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
accounts
\/([
a-zA-Z0-9
\-\;]{1,35})\/
inactive$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.accountid, tempValue.accountid));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'accountid'
]
==
tempValue
[
'accountid'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
});
// Save
mock
.
onPost
(
new
RegExp
(
/^
\/
accounts
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:account 方法: Save"
);
...
...
app_CRM/src/mock/entity/contacts/contacts.ts
浏览文件 @
5b2e3d4c
...
...
@@ -298,6 +298,71 @@ mock.onGet(new RegExp(/^\/contacts\/getdraft$/)).reply((config: any) => {
});
// Active
mock
.
onPost
(
new
RegExp
(
/^
\/
accounts
\/([
a-zA-Z0-9
\-\;]{1,35})\/
contacts
\/([
a-zA-Z0-9
\-\;]{1,35})\/
active$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:contact 方法: Active"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'accountid'
,
'contactid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
accounts
\/([
a-zA-Z0-9
\-\;]{1,35})\/
contacts
\/([
a-zA-Z0-9
\-\;]{1,35})\/
active$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
({});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
{}];
});
// Active
mock
.
onPost
(
new
RegExp
(
/^
\/
contacts
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
active$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:contact 方法: Active"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'contactid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
contacts
\/([
a-zA-Z0-9
\-\;]{1,35})\/
active$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.contactid, tempValue.contactid));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'contactid'
]
==
tempValue
[
'contactid'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
});
// CheckKey
mock
.
onPost
(
new
RegExp
(
/^
\/
accounts
\/([
a-zA-Z0-9
\-\;]{1,35})\/
contacts
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:contact 方法: CheckKey"
);
...
...
@@ -363,6 +428,71 @@ mock.onPost(new RegExp(/^\/contacts\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).repl
});
// Inactive
mock
.
onPost
(
new
RegExp
(
/^
\/
accounts
\/([
a-zA-Z0-9
\-\;]{1,35})\/
contacts
\/([
a-zA-Z0-9
\-\;]{1,35})\/
inactive$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:contact 方法: Inactive"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'accountid'
,
'contactid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
accounts
\/([
a-zA-Z0-9
\-\;]{1,35})\/
contacts
\/([
a-zA-Z0-9
\-\;]{1,35})\/
inactive$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
({});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
{}];
});
// Inactive
mock
.
onPost
(
new
RegExp
(
/^
\/
contacts
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
inactive$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:contact 方法: Inactive"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'contactid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
contacts
\/([
a-zA-Z0-9
\-\;]{1,35})\/
inactive$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.contactid, tempValue.contactid));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'contactid'
]
==
tempValue
[
'contactid'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
});
// Save
mock
.
onPost
(
new
RegExp
(
/^
\/
accounts
\/([
a-zA-Z0-9
\-\;]{1,35})\/
contacts
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:contact 方法: Save"
);
...
...
app_CRM/src/pages/base/account-info/account-info-base.tsx
浏览文件 @
5b2e3d4c
...
...
@@ -64,12 +64,15 @@ export class AccountInfoBase extends TabExpViewBase {
* @memberof AccountInfo
*/
public
toolBarModels
:
any
=
{
tbitem1_openmaineditview
:
{
name
:
'tbitem1_openmaineditview'
,
caption
:
'编辑'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'编辑'
,
iconcls
:
'fa fa-edit'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'OpenMainEditView'
,
target
:
'SINGLEKEY'
},
class
:
''
},
seperator3
:
{
name
:
'seperator3'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
deuiaction4
:
{
name
:
'deuiaction4'
,
caption
:
'编辑'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'编辑'
,
iconcls
:
'fa fa-edit'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Edit'
,
target
:
'SINGLEKEY'
},
class
:
''
},
seperator4
:
{
name
:
'seperator4'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem17_inactive
:
{
name
:
'tbitem17_inactive'
,
caption
:
'停用'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'停用'
,
iconcls
:
'fa fa-minus'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Inactive'
,
target
:
'SINGLEKEY'
},
class
:
''
},
tbitem17_active_sep
:
{
name
:
'tbitem17_active_sep'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem17_active
:
{
name
:
'tbitem17_active'
,
caption
:
'激活'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'激活'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Active'
,
target
:
'SINGLEKEY'
},
class
:
''
},
tbitem2
:
{
name
:
'tbitem2'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
deuiaction1
:
{
name
:
'deuiaction1'
,
caption
:
'删除并关闭'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'删除并关闭'
,
iconcls
:
'fa fa-remove'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'RemoveAndExit'
,
target
:
'SINGLEKEY'
},
class
:
''
},
seperator2
:
{
name
:
'seperator2'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
...
...
@@ -124,12 +127,15 @@ export class AccountInfoBase extends TabExpViewBase {
* @memberof AccountInfoBase
*/
public
toolbar_click
(
$event
:
any
,
$event2
?:
any
):
void
{
if
(
Object
.
is
(
$event
.
tag
,
'tbitem1_openmaineditview'
))
{
this
.
toolbar_tbitem1_openmaineditview_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'deuiaction4'
))
{
this
.
toolbar_deuiaction4_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem17_inactive'
))
{
this
.
toolbar_tbitem17_inactive_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem17_active'
))
{
this
.
toolbar_tbitem17_active_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'deuiaction1'
))
{
this
.
toolbar_deuiaction1_click
(
null
,
''
,
$event2
);
}
...
...
@@ -149,7 +155,34 @@ export class AccountInfoBase extends TabExpViewBase {
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem1_openmaineditview_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
public
toolbar_deuiaction4_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
if
(
_this
.
getDatas
&&
_this
.
getDatas
instanceof
Function
)
{
datas
=
[...
_this
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
this
.
Edit
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Account"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem17_inactive_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
...
...
@@ -166,7 +199,7 @@ export class AccountInfoBase extends TabExpViewBase {
}
// 界面行为
const
curUIService
:
AccountUIService
=
new
AccountUIService
();
curUIService
.
Account_
OpenMainEditView
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Account"
);
curUIService
.
Account_
Inactive
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Account"
);
}
/**
...
...
@@ -177,7 +210,7 @@ export class AccountInfoBase extends TabExpViewBase {
* @param {*} [$event]
* @memberof
*/
public
toolbar_
deuiaction4
_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
public
toolbar_
tbitem17_active
_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
...
...
@@ -193,7 +226,8 @@ export class AccountInfoBase extends TabExpViewBase {
datas
=
[
params
];
}
// 界面行为
this
.
Edit
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Account"
);
const
curUIService
:
AccountUIService
=
new
AccountUIService
();
curUIService
.
Account_Active
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Account"
);
}
/**
...
...
app_CRM/src/pages/base/contact-info/contact-info-base.tsx
浏览文件 @
5b2e3d4c
...
...
@@ -2,6 +2,7 @@ import { Subject } from 'rxjs';
import
{
TabExpViewBase
}
from
'@/studio-core'
;
import
ContactService
from
'@/service/contact/contact-service'
;
import
TabExpViewEngine
from
'@engine/view/tab-exp-view-engine'
;
import
ContactUIService
from
'@/uiservice/contact/contact-ui-service'
;
/**
* 联系人信息视图基类
...
...
@@ -66,6 +67,12 @@ export class ContactInfoBase extends TabExpViewBase {
deuiaction4
:
{
name
:
'deuiaction4'
,
caption
:
'编辑'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'编辑'
,
iconcls
:
'fa fa-edit'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Edit'
,
target
:
'SINGLEKEY'
},
class
:
''
},
seperator4
:
{
name
:
'seperator4'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem17_inactive
:
{
name
:
'tbitem17_inactive'
,
caption
:
'停用'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'停用'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Inactive'
,
target
:
'SINGLEKEY'
},
class
:
''
},
tbitem17_active_sep
:
{
name
:
'tbitem17_active_sep'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
tbitem17_active
:
{
name
:
'tbitem17_active'
,
caption
:
'激活'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'激活'
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'Active'
,
target
:
'SINGLEKEY'
},
class
:
''
},
tbitem2
:
{
name
:
'tbitem2'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
deuiaction1
:
{
name
:
'deuiaction1'
,
caption
:
'删除并关闭'
,
'isShowCaption'
:
true
,
'isShowIcon'
:
true
,
tooltip
:
'删除并关闭'
,
iconcls
:
'fa fa-remove'
,
icon
:
''
,
disabled
:
false
,
type
:
'DEUIACTION'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
tag
:
'RemoveAndExit'
,
target
:
'SINGLEKEY'
},
class
:
''
},
seperator2
:
{
name
:
'seperator2'
,
type
:
'SEPERATOR'
,
visabled
:
true
,
dataaccaction
:
''
,
uiaction
:
{
}
},
...
...
@@ -123,6 +130,12 @@ export class ContactInfoBase extends TabExpViewBase {
if
(
Object
.
is
(
$event
.
tag
,
'deuiaction4'
))
{
this
.
toolbar_deuiaction4_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem17_inactive'
))
{
this
.
toolbar_tbitem17_inactive_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'tbitem17_active'
))
{
this
.
toolbar_tbitem17_active_click
(
null
,
''
,
$event2
);
}
if
(
Object
.
is
(
$event
.
tag
,
'deuiaction1'
))
{
this
.
toolbar_deuiaction1_click
(
null
,
''
,
$event2
);
}
...
...
@@ -161,6 +174,62 @@ export class ContactInfoBase extends TabExpViewBase {
this
.
Edit
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Contact"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem17_inactive_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
if
(
_this
.
getDatas
&&
_this
.
getDatas
instanceof
Function
)
{
datas
=
[...
_this
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
const
curUIService
:
ContactUIService
=
new
ContactUIService
();
curUIService
.
Contact_Inactive
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Contact"
);
}
/**
* 逻辑事件
*
* @param {*} [params={}]
* @param {*} [tag]
* @param {*} [$event]
* @memberof
*/
public
toolbar_tbitem17_active_click
(
params
:
any
=
{},
tag
?:
any
,
$event
?:
any
)
{
// 参数
// 取数
let
datas
:
any
[]
=
[];
let
xData
:
any
=
null
;
// _this 指向容器对象
const
_this
:
any
=
this
;
let
paramJO
:
any
=
{};
let
contextJO
:
any
=
{};
if
(
_this
.
getDatas
&&
_this
.
getDatas
instanceof
Function
)
{
datas
=
[...
_this
.
getDatas
()];
}
if
(
params
){
datas
=
[
params
];
}
// 界面行为
const
curUIService
:
ContactUIService
=
new
ContactUIService
();
curUIService
.
Contact_Active
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Contact"
);
}
/**
* 逻辑事件
*
...
...
app_CRM/src/service/account/account-service-base.ts
浏览文件 @
5b2e3d4c
...
...
@@ -200,6 +200,19 @@ export default class AccountServiceBase extends EntityService {
return
res
;
}
/**
* Active接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof AccountServiceBase
*/
public
async
Active
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/active`
,
data
,
isloading
);
}
/**
* CheckKey接口方法
*
...
...
@@ -213,6 +226,19 @@ export default class AccountServiceBase extends EntityService {
return
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/checkkey`
,
data
,
isloading
);
}
/**
* Inactive接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof AccountServiceBase
*/
public
async
Inactive
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/accounts/
${
context
.
account
}
/inactive`
,
data
,
isloading
);
}
/**
* Save接口方法
*
...
...
app_CRM/src/service/contact/contact-service-base.ts
浏览文件 @
5b2e3d4c
此差异已折叠。
点击以展开。
app_CRM/src/service/ibiz-list/ibiz-list-service-base.ts
浏览文件 @
5b2e3d4c
此差异已折叠。
点击以展开。
app_CRM/src/service/product/product-service-base.ts
浏览文件 @
5b2e3d4c
此差异已折叠。
点击以展开。
app_CRM/src/store/modules/view-action/state.ts
浏览文件 @
5b2e3d4c
...
...
@@ -416,7 +416,6 @@ export const viewstate: any = {
'fb06f2c1cea1ac2a5a70c20f4a277ae5'
,
'5c7e90ccfaeb49b5bd84ae6c17b479e3'
,
'bae77557d2f7a7852b634dc5d5a93435'
,
'6e18ac74e5685439110f9b4e534ee005'
,
'016e75bb460270519a0ee9dda57b2c90'
,
],
},
...
...
app_CRM/src/uiservice/account/account-ui-service-base.ts
浏览文件 @
5b2e3d4c
...
...
@@ -242,6 +242,73 @@ export default class AccountUIServiceBase extends UIService {
openDrawer
(
view
,
data
);
}
/**
* 激活
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public
async
Account_Active
(
args
:
any
[],
context
:
any
=
{},
params
:
any
=
{},
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
){
let
data
:
any
=
{};
let
parentContext
:
any
=
{};
let
parentViewParam
:
any
=
{};
const
_this
:
any
=
actionContext
;
const
_args
:
any
[]
=
Util
.
deepCopy
(
args
);
const
actionTarget
:
string
|
null
=
'SINGLEKEY'
;
Object
.
assign
(
context
,
{
account
:
'%account%'
});
Object
.
assign
(
params
,
{
accountid
:
'%account%'
});
Object
.
assign
(
params
,
{
accountname
:
'%accountname%'
});
if
(
_this
.
context
){
parentContext
=
_this
.
context
;
}
if
(
_this
.
viewparams
){
parentViewParam
=
_this
.
viewparams
;
}
context
=
UIActionTool
.
handleContextParam
(
actionTarget
,
_args
,
parentContext
,
parentViewParam
,
context
);
data
=
UIActionTool
.
handleActionParam
(
actionTarget
,
_args
,
parentContext
,
parentViewParam
,
params
);
context
=
Object
.
assign
({},
actionContext
.
context
,
context
);
let
parentObj
:
any
=
{
srfparentdename
:
srfParentDeName
?
srfParentDeName
:
null
,
srfparentkey
:
srfParentDeName
?
context
[
srfParentDeName
.
toLowerCase
()]:
null
};
Object
.
assign
(
data
,
parentObj
);
Object
.
assign
(
context
,
parentObj
);
// 直接调实体服务需要转换的数据
if
(
context
&&
context
.
srfsessionid
){
context
.
srfsessionkey
=
context
.
srfsessionid
;
delete
context
.
srfsessionid
;
}
const
backend
=
()
=>
{
const
curService
:
AccountService
=
new
AccountService
();
curService
.
Active
(
context
,
data
,
true
).
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
actionContext
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
response
.
message
});
return
;
}
actionContext
.
$Notice
.
success
({
title
:
'成功'
,
desc
:
'激活成功!'
});
const
_this
:
any
=
actionContext
;
if
(
xData
&&
xData
.
refresh
&&
xData
.
refresh
instanceof
Function
)
{
xData
.
refresh
(
args
);
}
return
response
;
}).
catch
((
response
:
any
)
=>
{
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
actionContext
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'系统异常!'
});
return
;
}
if
(
response
.
status
===
401
)
{
return
;
}
return
response
;
});
};
backend
();
}
/**
* 编辑
*
...
...
@@ -497,7 +564,7 @@ export default class AccountUIServiceBase extends UIService {
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public
async
Account_
Disabl
e
(
args
:
any
[],
context
:
any
=
{},
params
:
any
=
{},
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
){
public
async
Account_
Inactiv
e
(
args
:
any
[],
context
:
any
=
{},
params
:
any
=
{},
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
){
let
data
:
any
=
{};
let
parentContext
:
any
=
{};
let
parentViewParam
:
any
=
{};
...
...
@@ -526,7 +593,7 @@ export default class AccountUIServiceBase extends UIService {
}
const
backend
=
()
=>
{
const
curService
:
AccountService
=
new
AccountService
();
curService
.
Get
(
context
,
data
,
true
).
then
((
response
:
any
)
=>
{
curService
.
Inactive
(
context
,
data
,
true
).
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
actionContext
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
response
.
message
});
return
;
...
...
app_CRM/src/uiservice/contact/contact-ui-service-base.ts
浏览文件 @
5b2e3d4c
...
...
@@ -232,6 +232,73 @@ export default class ContactUIServiceBase extends UIService {
openIndexViewTab
(
data
);
}
/**
* 停用
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public
async
Contact_Inactive
(
args
:
any
[],
context
:
any
=
{},
params
:
any
=
{},
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
){
let
data
:
any
=
{};
let
parentContext
:
any
=
{};
let
parentViewParam
:
any
=
{};
const
_this
:
any
=
actionContext
;
const
_args
:
any
[]
=
Util
.
deepCopy
(
args
);
const
actionTarget
:
string
|
null
=
'SINGLEKEY'
;
Object
.
assign
(
context
,
{
contact
:
'%contact%'
});
Object
.
assign
(
params
,
{
contactid
:
'%contact%'
});
Object
.
assign
(
params
,
{
fullname
:
'%fullname%'
});
if
(
_this
.
context
){
parentContext
=
_this
.
context
;
}
if
(
_this
.
viewparams
){
parentViewParam
=
_this
.
viewparams
;
}
context
=
UIActionTool
.
handleContextParam
(
actionTarget
,
_args
,
parentContext
,
parentViewParam
,
context
);
data
=
UIActionTool
.
handleActionParam
(
actionTarget
,
_args
,
parentContext
,
parentViewParam
,
params
);
context
=
Object
.
assign
({},
actionContext
.
context
,
context
);
let
parentObj
:
any
=
{
srfparentdename
:
srfParentDeName
?
srfParentDeName
:
null
,
srfparentkey
:
srfParentDeName
?
context
[
srfParentDeName
.
toLowerCase
()]:
null
};
Object
.
assign
(
data
,
parentObj
);
Object
.
assign
(
context
,
parentObj
);
// 直接调实体服务需要转换的数据
if
(
context
&&
context
.
srfsessionid
){
context
.
srfsessionkey
=
context
.
srfsessionid
;
delete
context
.
srfsessionid
;
}
const
backend
=
()
=>
{
const
curService
:
ContactService
=
new
ContactService
();
curService
.
Inactive
(
context
,
data
,
true
).
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
actionContext
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
response
.
message
});
return
;
}
actionContext
.
$Notice
.
success
({
title
:
'成功'
,
desc
:
'停用成功!'
});
const
_this
:
any
=
actionContext
;
if
(
xData
&&
xData
.
refresh
&&
xData
.
refresh
instanceof
Function
)
{
xData
.
refresh
(
args
);
}
return
response
;
}).
catch
((
response
:
any
)
=>
{
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
actionContext
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'系统异常!'
});
return
;
}
if
(
response
.
status
===
401
)
{
return
;
}
return
response
;
});
};
backend
();
}
/**
* 设置为主要联系人
*
...
...
@@ -296,6 +363,73 @@ export default class ContactUIServiceBase extends UIService {
backend
();
}
/**
* 激活
*
* @param {any[]} args 当前数据
* @param {any} context 行为附加上下文
* @param {*} [params] 附加参数
* @param {*} [$event] 事件源
* @param {*} [xData] 执行行为所需当前部件
* @param {*} [actionContext] 执行行为上下文
* @param {*} [srfParentDeName] 父实体名称
* @returns {Promise<any>}
*/
public
async
Contact_Active
(
args
:
any
[],
context
:
any
=
{},
params
:
any
=
{},
$event
?:
any
,
xData
?:
any
,
actionContext
?:
any
,
srfParentDeName
?:
string
){
let
data
:
any
=
{};
let
parentContext
:
any
=
{};
let
parentViewParam
:
any
=
{};
const
_this
:
any
=
actionContext
;
const
_args
:
any
[]
=
Util
.
deepCopy
(
args
);
const
actionTarget
:
string
|
null
=
'SINGLEKEY'
;
Object
.
assign
(
context
,
{
contact
:
'%contact%'
});
Object
.
assign
(
params
,
{
contactid
:
'%contact%'
});
Object
.
assign
(
params
,
{
fullname
:
'%fullname%'
});
if
(
_this
.
context
){
parentContext
=
_this
.
context
;
}
if
(
_this
.
viewparams
){
parentViewParam
=
_this
.
viewparams
;
}
context
=
UIActionTool
.
handleContextParam
(
actionTarget
,
_args
,
parentContext
,
parentViewParam
,
context
);
data
=
UIActionTool
.
handleActionParam
(
actionTarget
,
_args
,
parentContext
,
parentViewParam
,
params
);
context
=
Object
.
assign
({},
actionContext
.
context
,
context
);
let
parentObj
:
any
=
{
srfparentdename
:
srfParentDeName
?
srfParentDeName
:
null
,
srfparentkey
:
srfParentDeName
?
context
[
srfParentDeName
.
toLowerCase
()]:
null
};
Object
.
assign
(
data
,
parentObj
);
Object
.
assign
(
context
,
parentObj
);
// 直接调实体服务需要转换的数据
if
(
context
&&
context
.
srfsessionid
){
context
.
srfsessionkey
=
context
.
srfsessionid
;
delete
context
.
srfsessionid
;
}
const
backend
=
()
=>
{
const
curService
:
ContactService
=
new
ContactService
();
curService
.
Active
(
context
,
data
,
true
).
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
actionContext
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
response
.
message
});
return
;
}
actionContext
.
$Notice
.
success
({
title
:
'成功'
,
desc
:
'激活成功!'
});
const
_this
:
any
=
actionContext
;
if
(
xData
&&
xData
.
refresh
&&
xData
.
refresh
instanceof
Function
)
{
xData
.
refresh
(
args
);
}
return
response
;
}).
catch
((
response
:
any
)
=>
{
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
actionContext
.
$Notice
.
error
({
title
:
'错误'
,
desc
:
'系统异常!'
});
return
;
}
if
(
response
.
status
===
401
)
{
return
;
}
return
response
;
});
};
backend
();
}
/**
* 获取指定数据的重定向页面
...
...
app_CRM/src/widgets/account/gradation-treeview/gradation-treeview-base.tsx
浏览文件 @
5b2e3d4c
...
...
@@ -133,7 +133,7 @@ export class GradationTreeBase extends MainControlBase {
}
// 界面行为
const
curUIService
:
AccountUIService
=
new
AccountUIService
();
curUIService
.
Account_
Disabl
e
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Account"
);
curUIService
.
Account_
Inactiv
e
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Account"
);
}
/**
...
...
@@ -220,7 +220,7 @@ export class GradationTreeBase extends MainControlBase {
}
// 界面行为
const
curUIService
:
AccountUIService
=
new
AccountUIService
();
curUIService
.
Account_
Disabl
e
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Account"
);
curUIService
.
Account_
Inactiv
e
(
datas
,
contextJO
,
paramJO
,
$event
,
xData
,
this
,
"Account"
);
}
/**
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/base/service/IAccountService.java
浏览文件 @
5b2e3d4c
...
...
@@ -33,7 +33,9 @@ public interface IAccountService extends IService<Account>{
void
removeBatch
(
Collection
<
String
>
idList
)
;
Account
get
(
String
key
)
;
Account
getDraft
(
Account
et
)
;
Account
active
(
Account
et
)
;
boolean
checkKey
(
Account
et
)
;
Account
inactive
(
Account
et
)
;
boolean
save
(
Account
et
)
;
void
saveBatch
(
List
<
Account
>
list
)
;
Page
<
Account
>
searchDefault
(
AccountSearchContext
context
)
;
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/base/service/IContactService.java
浏览文件 @
5b2e3d4c
...
...
@@ -33,7 +33,9 @@ public interface IContactService extends IService<Contact>{
void
removeBatch
(
Collection
<
String
>
idList
)
;
Contact
get
(
String
key
)
;
Contact
getDraft
(
Contact
et
)
;
Contact
active
(
Contact
et
)
;
boolean
checkKey
(
Contact
et
)
;
Contact
inactive
(
Contact
et
)
;
boolean
save
(
Contact
et
)
;
void
saveBatch
(
List
<
Contact
>
list
)
;
Contact
setPrimary
(
Contact
et
)
;
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/base/service/impl/AccountServiceImpl.java
浏览文件 @
5b2e3d4c
...
...
@@ -148,10 +148,24 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
return
et
;
}
@Override
@Transactional
public
Account
active
(
Account
et
)
{
//自定义代码
return
et
;
}
@Override
public
boolean
checkKey
(
Account
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getAccountid
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getAccountid
())));
}
@Override
@Transactional
public
Account
inactive
(
Account
et
)
{
//自定义代码
return
et
;
}
@Override
@Transactional
public
boolean
save
(
Account
et
)
{
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/base/service/impl/ContactServiceImpl.java
浏览文件 @
5b2e3d4c
...
...
@@ -146,10 +146,24 @@ public class ContactServiceImpl extends ServiceImpl<ContactMapper, Contact> impl
return
et
;
}
@Override
@Transactional
public
Contact
active
(
Contact
et
)
{
//自定义代码
return
et
;
}
@Override
public
boolean
checkKey
(
Contact
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getContactid
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getContactid
())));
}
@Override
@Transactional
public
Contact
inactive
(
Contact
et
)
{
//自定义代码
return
et
;
}
@Override
@Transactional
public
boolean
save
(
Contact
et
)
{
...
...
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/extensions.service/AccountServiceEx.java
0 → 100644
浏览文件 @
5b2e3d4c
package
cn
.
ibizlab
.
businesscentral
.
core
.
extensions
.
service
;
/**
* 扩展目录已变更,请到[cn.ibizlab.businesscentral.core.extensions.service.xxExService]中来进行扩展
* 若您之前有在当前目录下扩展过其它的service对象,请将扩展的代码移到新的扩展类中,并注释掉老的扩展类,防止Bean重复
*/
@Deprecated
public
class
AccountServiceEx
{
}
businesscentral-core/src/main/java/cn/ibizlab/businesscentral/core/extensions/service/AccountExService.java
0 → 100644
浏览文件 @
5b2e3d4c
package
cn
.
ibizlab
.
businesscentral
.
core
.
extensions
.
service
;
import
cn.ibizlab.businesscentral.core.base.service.impl.AccountServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
cn.ibizlab.businesscentral.core.base.domain.Account
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Primary
;
import
java.util.*
;
/**
* 实体[客户] 自定义服务对象
*/
@Slf4j
@Primary
@Service
(
"AccountExService"
)
public
class
AccountExService
extends
AccountServiceImpl
{
@Override
protected
Class
currentModelClass
()
{
return
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
ReflectionKit
.
getSuperClassGenericType
(
this
.
getClass
().
getSuperclass
(),
1
);
}
/**
* 自定义行为[Active]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
Account
active
(
Account
et
)
{
return
super
.
active
(
et
);
}
/**
* 自定义行为[Inactive]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
Account
inactive
(
Account
et
)
{
return
super
.
inactive
(
et
);
}
}
businesscentral-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
5b2e3d4c
...
...
@@ -3284,7 +3284,7 @@
<!--输出实体[CONTACT]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-contact-2
55
-46"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-contact-2
61
-46"
>
<createTable
tableName=
"CONTACT"
>
<column
name=
"ADDRESS1_FREIGHTTERMSCODE"
remarks=
""
type=
"VARCHAR(30)"
>
</column>
...
...
@@ -4620,7 +4620,7 @@
<!--输出实体[ACCOUNT]数据结构 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-account-3
73
-57"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"tab-account-3
81
-57"
>
<createTable
tableName=
"ACCOUNT"
>
<column
name=
"ADDRESS1_PRIMARYCONTACTNAME"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
...
...
@@ -11240,25 +11240,25 @@
<addForeignKeyConstraint
baseColumnNames=
"ENTITLEMENTTEMPLATEID"
baseTableName=
"ENTITLEMENTTEMPLATECHANNEL"
constraintName=
"DER1N_ENTITLEMENTTEMPLATECHANN"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ENTITLEMENTTEMPLATEID"
referencedTableName=
"ENTITLEMENTTEMPLATE"
validate=
"true"
/>
</changeSet>
<!--输出实体[CONTACT]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-2
55
-225"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-2
61
-225"
>
<addForeignKeyConstraint
baseColumnNames=
"CUSTOMERID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT_ACCOUNT_CUSTOMER"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ACCOUNTID"
referencedTableName=
"ACCOUNT"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-2
55
-226"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-2
61
-226"
>
<addForeignKeyConstraint
baseColumnNames=
"PREFERREDEQUIPMENTID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__EQUIPMENT__PREF"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"EQUIPMENTID"
referencedTableName=
"EQUIPMENT"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-2
55
-227"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-2
61
-227"
>
<addForeignKeyConstraint
baseColumnNames=
"ORIGINATINGLEADID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__LEAD__ORIGINATI"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"LEADID"
referencedTableName=
"LEAD"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-2
55
-228"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-2
61
-228"
>
<addForeignKeyConstraint
baseColumnNames=
"DEFAULTPRICELEVELID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__PRICELEVEL__DEF"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRICELEVELID"
referencedTableName=
"PRICELEVEL"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-2
55
-229"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-2
61
-229"
>
<addForeignKeyConstraint
baseColumnNames=
"PREFERREDSERVICEID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__SERVICE__PREFER"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SERVICEID"
referencedTableName=
"SERVICE"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-2
55
-230"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-2
61
-230"
>
<addForeignKeyConstraint
baseColumnNames=
"SLAID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__SLA__SLAID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SLAID"
referencedTableName=
"SLA"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-2
55
-231"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-contact-2
61
-231"
>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"CONTACT"
constraintName=
"DER1N_CONTACT__TRANSACTIONCURR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
<!--输出实体[TEAM]外键关系 -->
...
...
@@ -11344,31 +11344,31 @@
<addForeignKeyConstraint
baseColumnNames=
"METRICID"
baseTableName=
"GOAL"
constraintName=
"DER1N_GOAL__METRIC__METRICID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"METRICID"
referencedTableName=
"METRIC"
validate=
"true"
/>
</changeSet>
<!--输出实体[ACCOUNT]外键关系 -->
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
73
-266"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
81
-266"
>
<addForeignKeyConstraint
baseColumnNames=
"PARENTACCOUNTID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__ACCOUNT__PARENT"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ACCOUNTID"
referencedTableName=
"ACCOUNT"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
73
-267"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
81
-267"
>
<addForeignKeyConstraint
baseColumnNames=
"PRIMARYCONTACTID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__CONTACT__PRIMAR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"CONTACTID"
referencedTableName=
"CONTACT"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
73
-268"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
81
-268"
>
<addForeignKeyConstraint
baseColumnNames=
"PREFERREDEQUIPMENTID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__EQUIPMENT__PREF"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"EQUIPMENTID"
referencedTableName=
"EQUIPMENT"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
73
-269"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
81
-269"
>
<addForeignKeyConstraint
baseColumnNames=
"ORIGINATINGLEADID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__LEAD__ORIGINATI"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"LEADID"
referencedTableName=
"LEAD"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
73
-270"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
81
-270"
>
<addForeignKeyConstraint
baseColumnNames=
"DEFAULTPRICELEVELID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__PRICELEVEL__DEF"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"PRICELEVELID"
referencedTableName=
"PRICELEVEL"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
73
-271"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
81
-271"
>
<addForeignKeyConstraint
baseColumnNames=
"PREFERREDSERVICEID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__SERVICE__PREFER"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SERVICEID"
referencedTableName=
"SERVICE"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
73
-272"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
81
-272"
>
<addForeignKeyConstraint
baseColumnNames=
"SLAID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__SLA__SLAID"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SLAID"
referencedTableName=
"SLA"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
73
-273"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
81
-273"
>
<addForeignKeyConstraint
baseColumnNames=
"TERRITORYID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__TERRITORY__TERR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TERRITORYID"
referencedTableName=
"TERRITORY"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
73
-274"
>
<changeSet
author=
"a_LAB01_e85d8801c"
id=
"fk-account-3
81
-274"
>
<addForeignKeyConstraint
baseColumnNames=
"TRANSACTIONCURRENCYID"
baseTableName=
"ACCOUNT"
constraintName=
"DER1N_ACCOUNT__TRANSACTIONCURR"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"TRANSACTIONCURRENCYID"
referencedTableName=
"TRANSACTIONCURRENCY"
validate=
"true"
/>
</changeSet>
<!--输出实体[KNOWLEDGEARTICLEVIEWS]外键关系 -->
...
...
businesscentral-core/src/main/resources/permission/systemResource.json
浏览文件 @
5b2e3d4c
...
...
@@ -344,7 +344,7 @@
"delogicname"
:
"联系人"
,
"sysmoudle"
:{
"id"
:
"BASE"
,
"name"
:
"Base"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"deaction"
:[{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"
CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN
"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
},{
"id"
:
"SetPrimary"
,
"name"
:
"SetPrimary"
,
"type"
:
"USERCUSTOM"
}],
"deaction"
:[{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"
Active"
,
"name"
:
"激活"
,
"type"
:
"USERCUSTOM"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Inactive"
,
"name"
:
"停用"
,
"type"
:
"USERCUSTOM
"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
},{
"id"
:
"SetPrimary"
,
"name"
:
"SetPrimary"
,
"type"
:
"USERCUSTOM"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
},
{
"id"
:
"createman"
,
"name"
:
"创建人"
}]
}
,
{
...
...
@@ -368,7 +368,7 @@
"delogicname"
:
"客户"
,
"sysmoudle"
:{
"id"
:
"BASE"
,
"name"
:
"Base"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
},{
"id"
:
"Root"
,
"name"
:
"Root"
}],
"deaction"
:[{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"
CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN
"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"deaction"
:[{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"
Active"
,
"name"
:
"激活"
,
"type"
:
"USERCUSTOM"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Inactive"
,
"name"
:
"停用"
,
"type"
:
"USERCUSTOM
"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
},
{
"id"
:
"createman"
,
"name"
:
"创建人"
}]
}
,
{
...
...
businesscentral-provider/businesscentral-provider-centralapi/src/main/java/cn/ibizlab/businesscentral/centralapi/rest/AccountResource.java
浏览文件 @
5b2e3d4c
...
...
@@ -118,12 +118,36 @@ public class AccountResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
accountMapping
.
toDto
(
accountService
.
getDraft
(
new
Account
())));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Account-Active-all')"
)
@ApiOperation
(
value
=
"激活"
,
tags
=
{
"客户"
},
notes
=
"激活"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/active"
)
@Transactional
public
ResponseEntity
<
AccountDTO
>
active
(
@PathVariable
(
"account_id"
)
String
account_id
,
@RequestBody
AccountDTO
accountdto
)
{
Account
domain
=
accountMapping
.
toDomain
(
accountdto
);
domain
.
setAccountid
(
account_id
);
domain
=
accountService
.
active
(
domain
);
accountdto
=
accountMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
accountdto
);
}
@ApiOperation
(
value
=
"检查客户"
,
tags
=
{
"客户"
},
notes
=
"检查客户"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
AccountDTO
accountdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
accountService
.
checkKey
(
accountMapping
.
toDomain
(
accountdto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Account-Inactive-all')"
)
@ApiOperation
(
value
=
"停用"
,
tags
=
{
"客户"
},
notes
=
"停用"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/inactive"
)
@Transactional
public
ResponseEntity
<
AccountDTO
>
inactive
(
@PathVariable
(
"account_id"
)
String
account_id
,
@RequestBody
AccountDTO
accountdto
)
{
Account
domain
=
accountMapping
.
toDomain
(
accountdto
);
domain
.
setAccountid
(
account_id
);
domain
=
accountService
.
inactive
(
domain
);
accountdto
=
accountMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
accountdto
);
}
@PreAuthorize
(
"hasPermission(this.accountMapping.toDomain(#accountdto),'iBizBusinessCentral-Account-Save')"
)
@ApiOperation
(
value
=
"保存客户"
,
tags
=
{
"客户"
},
notes
=
"保存客户"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/save"
)
...
...
businesscentral-provider/businesscentral-provider-centralapi/src/main/java/cn/ibizlab/businesscentral/centralapi/rest/ContactResource.java
浏览文件 @
5b2e3d4c
...
...
@@ -118,12 +118,36 @@ public class ContactResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
contactMapping
.
toDto
(
contactService
.
getDraft
(
new
Contact
())));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Contact-Active-all')"
)
@ApiOperation
(
value
=
"激活"
,
tags
=
{
"联系人"
},
notes
=
"激活"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/contacts/{contact_id}/active"
)
@Transactional
public
ResponseEntity
<
ContactDTO
>
active
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@RequestBody
ContactDTO
contactdto
)
{
Contact
domain
=
contactMapping
.
toDomain
(
contactdto
);
domain
.
setContactid
(
contact_id
);
domain
=
contactService
.
active
(
domain
);
contactdto
=
contactMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
contactdto
);
}
@ApiOperation
(
value
=
"检查联系人"
,
tags
=
{
"联系人"
},
notes
=
"检查联系人"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/contacts/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
ContactDTO
contactdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
contactService
.
checkKey
(
contactMapping
.
toDomain
(
contactdto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Contact-Inactive-all')"
)
@ApiOperation
(
value
=
"停用"
,
tags
=
{
"联系人"
},
notes
=
"停用"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/contacts/{contact_id}/inactive"
)
@Transactional
public
ResponseEntity
<
ContactDTO
>
inactive
(
@PathVariable
(
"contact_id"
)
String
contact_id
,
@RequestBody
ContactDTO
contactdto
)
{
Contact
domain
=
contactMapping
.
toDomain
(
contactdto
);
domain
.
setContactid
(
contact_id
);
domain
=
contactService
.
inactive
(
domain
);
contactdto
=
contactMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
contactdto
);
}
@PreAuthorize
(
"hasPermission(this.contactMapping.toDomain(#contactdto),'iBizBusinessCentral-Contact-Save')"
)
@ApiOperation
(
value
=
"保存联系人"
,
tags
=
{
"联系人"
},
notes
=
"保存联系人"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/contacts/save"
)
...
...
@@ -255,12 +279,36 @@ public class ContactResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
contactMapping
.
toDto
(
contactService
.
getDraft
(
domain
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Contact-Active-all')"
)
@ApiOperation
(
value
=
"根据客户联系人"
,
tags
=
{
"联系人"
},
notes
=
"根据客户联系人"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/active"
)
@Transactional
public
ResponseEntity
<
ContactDTO
>
activeByAccount
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@RequestBody
ContactDTO
contactdto
)
{
Contact
domain
=
contactMapping
.
toDomain
(
contactdto
);
domain
.
setCustomerid
(
account_id
);
domain
=
contactService
.
active
(
domain
)
;
contactdto
=
contactMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
contactdto
);
}
@ApiOperation
(
value
=
"根据客户检查联系人"
,
tags
=
{
"联系人"
},
notes
=
"根据客户检查联系人"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKeyByAccount
(
@PathVariable
(
"account_id"
)
String
account_id
,
@RequestBody
ContactDTO
contactdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
contactService
.
checkKey
(
contactMapping
.
toDomain
(
contactdto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Contact-Inactive-all')"
)
@ApiOperation
(
value
=
"根据客户联系人"
,
tags
=
{
"联系人"
},
notes
=
"根据客户联系人"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/{contact_id}/inactive"
)
@Transactional
public
ResponseEntity
<
ContactDTO
>
inactiveByAccount
(
@PathVariable
(
"account_id"
)
String
account_id
,
@PathVariable
(
"contact_id"
)
String
contact_id
,
@RequestBody
ContactDTO
contactdto
)
{
Contact
domain
=
contactMapping
.
toDomain
(
contactdto
);
domain
.
setCustomerid
(
account_id
);
domain
=
contactService
.
inactive
(
domain
)
;
contactdto
=
contactMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
contactdto
);
}
@PreAuthorize
(
"hasPermission(this.contactMapping.toDomain(#contactdto),'iBizBusinessCentral-Contact-Save')"
)
@ApiOperation
(
value
=
"根据客户保存联系人"
,
tags
=
{
"联系人"
},
notes
=
"根据客户保存联系人"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/accounts/{account_id}/contacts/save"
)
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录