Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzrt
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzrt
提交
da722af9
提交
da722af9
编写于
6月 24, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 部署微服务应用
上级
64c65c10
变更
11
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
3025 行增加
和
157 行删除
+3025
-157
package.json
app_Web/package.json
+1
-1
app-group-picker.vue
app_Web/src/components/app-group-picker/app-group-picker.vue
+22
-22
app-group-select.vue
app_Web/src/components/app-group-select/app-group-select.vue
+20
-20
ibzteam-members.ts
app_Web/src/mock/entity/ibzteam-members/ibzteam-members.ts
+1467
-112
ibzteam-member-grid-view-base.vue
...bzteam-member-grid-view/ibzteam-member-grid-view-base.vue
+7
-2
router.ts
app_Web/src/pages/rt/index/router.ts
+306
-0
ibzemployee-service-base.ts
app_Web/src/service/ibzemployee/ibzemployee-service-base.ts
+296
-0
ibzteam-member-service-base.ts
...src/service/ibzteam-member/ibzteam-member-service-base.ts
+250
-0
ibzteam-service-base.ts
app_Web/src/service/ibzteam/ibzteam-service-base.ts
+50
-0
main-form-base.vue
app_Web/src/widgets/ibzteam/main-form/main-form-base.vue
+1
-0
IBZTeamMemberResource.java
.../main/java/cn/ibizlab/api/rest/IBZTeamMemberResource.java
+605
-0
未找到文件。
app_Web/package.json
浏览文件 @
da722af9
...
...
@@ -27,7 +27,7 @@
"file-saver"
:
"^2.0.2"
,
"font-awesome"
:
"^4.7.0"
,
"ibiz-gantt-elastic"
:
"^1.0.17"
,
"ibiz-vue-lib"
:
"^0.1.1
0
"
,
"ibiz-vue-lib"
:
"^0.1.1
3
"
,
"interactjs"
:
"^1.9.4"
,
"moment"
:
"^2.24.0"
,
"path-to-regexp"
:
"^6.1.0"
,
...
...
app_Web/src/components/app-group-picker/app-group-picker.vue
浏览文件 @
da722af9
...
...
@@ -20,13 +20,13 @@ import { Component, Vue, Prop, Watch } from 'vue-property-decorator';
import
{
Subject
}
from
'rxjs'
;
import
{
Http
}
from
'../../utils'
;
@
Component
({})
export
default
class
IBiz
GroupPicker
extends
Vue
{
export
default
class
App
GroupPicker
extends
Vue
{
/**
* 视图上下文参数
*
* @type {*}
* @memberof
IBiz
GroupPicker
* @memberof
App
GroupPicker
*/
@
Prop
()
viewdata
:
any
;
...
...
@@ -34,7 +34,7 @@ export default class IBizGroupPicker extends Vue {
* 视图参数
*
* @type {*}
* @memberof
IBiz
GroupPicker
* @memberof
App
GroupPicker
*/
@
Prop
()
viewparam
:
any
;
...
...
@@ -42,7 +42,7 @@ export default class IBizGroupPicker extends Vue {
* 多选
*
* @type {*}
* @memberof
IBiz
GroupPicker
* @memberof
App
GroupPicker
*/
protected
multiple
:
boolean
=
false
;
...
...
@@ -50,7 +50,7 @@ export default class IBizGroupPicker extends Vue {
* 加载树url
*
* @type {*}
* @memberof
IBiz
GroupPicker
* @memberof
App
GroupPicker
*/
protected
treeurl
:
any
;
...
...
@@ -58,7 +58,7 @@ export default class IBizGroupPicker extends Vue {
* 加载人员url
*
* @type {*}
* @memberof
IBiz
GroupPicker
* @memberof
App
GroupPicker
*/
protected
url
:
any
;
...
...
@@ -66,7 +66,7 @@ export default class IBizGroupPicker extends Vue {
* 树数据集
*
* @type {*}
* @memberof
IBiz
GroupPicker
* @memberof
App
GroupPicker
*/
protected
treeItems
:
any
[]
=
[];
...
...
@@ -74,7 +74,7 @@ export default class IBizGroupPicker extends Vue {
* 分组表数据集
*
* @type {*}
* @memberof
IBiz
GroupPicker
* @memberof
App
GroupPicker
*/
protected
cardItems
:
any
[]
=
[];
...
...
@@ -82,7 +82,7 @@ export default class IBizGroupPicker extends Vue {
* 视图上下文参数对象
*
* @type {*}
* @memberof
IBiz
GroupPicker
* @memberof
App
GroupPicker
*/
protected
viewData
:
any
;
...
...
@@ -90,7 +90,7 @@ export default class IBizGroupPicker extends Vue {
* 视图参数对象
*
* @type {*}
* @memberof
IBiz
GroupPicker
* @memberof
App
GroupPicker
*/
protected
viewParam
:
any
;
...
...
@@ -98,7 +98,7 @@ export default class IBizGroupPicker extends Vue {
* 树选中值
*
* @type {*}
* @memberof
IBiz
GroupPicker
* @memberof
App
GroupPicker
*/
protected
treeSelectVal
:
string
=
''
;
...
...
@@ -106,7 +106,7 @@ export default class IBizGroupPicker extends Vue {
* 分组表选中集合
*
* @type {*}
* @memberof
IBiz
GroupPicker
* @memberof
App
GroupPicker
*/
protected
cardSelctVal
:
any
=
[];
...
...
@@ -114,7 +114,7 @@ export default class IBizGroupPicker extends Vue {
* 数据选中集合
*
* @type {*}
* @memberof
IBiz
GroupPicker
* @memberof
App
GroupPicker
*/
protected
selects
:
any
[]
=
[];
...
...
@@ -122,7 +122,7 @@ export default class IBizGroupPicker extends Vue {
* 是否显示树
*
* @type {*}
* @memberof
IBiz
GroupPicker
* @memberof
App
GroupPicker
*/
get
showTree
()
{
if
(
this
.
viewParam
)
{
...
...
@@ -134,7 +134,7 @@ export default class IBizGroupPicker extends Vue {
* 生命周期
*
* @type {*}
* @memberof
IBiz
GroupPicker
* @memberof
App
GroupPicker
*/
public
created
()
{
if
(
!
this
.
viewdata
||
!
this
.
viewparam
)
{
...
...
@@ -158,7 +158,7 @@ export default class IBizGroupPicker extends Vue {
* 加载数据
*
* @type {*}
* @memberof
IBiz
GroupPicker
* @memberof
App
GroupPicker
*/
public
load
()
{
if
(
this
.
showTree
)
{
...
...
@@ -172,7 +172,7 @@ export default class IBizGroupPicker extends Vue {
* 加载树数据
*
* @type {*}
* @memberof
IBiz
GroupPicker
* @memberof
App
GroupPicker
*/
public
loadTree
()
{
let
orgid
=
this
.
viewParam
.
filtervalue
;
...
...
@@ -191,7 +191,7 @@ export default class IBizGroupPicker extends Vue {
* 加载分组表数据
*
* @type {*}
* @memberof
IBiz
GroupPicker
* @memberof
App
GroupPicker
*/
public
loadGroupData
(
key
:
string
)
{
let
tempUrl
=
this
.
url
.
replace
(
'${selected-orgid}'
,
key
);
...
...
@@ -209,7 +209,7 @@ export default class IBizGroupPicker extends Vue {
* 树选中
*
* @type {*}
* @memberof
IBiz
GroupPicker
* @memberof
App
GroupPicker
*/
public
treeSelect
(
event
:
any
)
{
if
(
!
event
||
JSON
.
parse
(
event
).
length
==
0
)
{
...
...
@@ -223,7 +223,7 @@ export default class IBizGroupPicker extends Vue {
* 分组表选中
*
* @type {*}
* @memberof
IBiz
GroupPicker
* @memberof
App
GroupPicker
*/
public
groupSelect
(
event
:
any
)
{
if
(
!
event
||
!
event
.
select
)
{
...
...
@@ -255,7 +255,7 @@ export default class IBizGroupPicker extends Vue {
* 确认
*
* @type {*}
* @memberof
IBiz
GroupPicker
* @memberof
App
GroupPicker
*/
public
onOK
()
{
this
.
$emit
(
'close'
,
this
.
selects
);
...
...
@@ -265,7 +265,7 @@ export default class IBizGroupPicker extends Vue {
* 取消
*
* @type {*}
* @memberof
IBiz
GroupPicker
* @memberof
App
GroupPicker
*/
public
onCancel
()
{
this
.
$emit
(
'close'
);
...
...
app_Web/src/components/app-group-select/app-group-select.vue
浏览文件 @
da722af9
...
...
@@ -23,12 +23,12 @@ import { Component, Vue, Prop, Watch } from 'vue-property-decorator';
import
{
Subject
}
from
'rxjs'
;
@
Component
({})
export
default
class
IBiz
GroupSelect
extends
Vue
{
export
default
class
App
GroupSelect
extends
Vue
{
/**
* 名称标识
*
* @type {*}
* @memberof
IBiz
GroupSelect
* @memberof
App
GroupSelect
*/
@
Prop
()
name
!
:
string
;
...
...
@@ -36,7 +36,7 @@ export default class IBizGroupSelect extends Vue {
* 树加载地址
*
* @type {*}
* @memberof
IBiz
GroupSelect
* @memberof
App
GroupSelect
*/
@
Prop
()
treeurl
?:
boolean
;
...
...
@@ -44,7 +44,7 @@ export default class IBizGroupSelect extends Vue {
* 数据接口地址
*
* @type {*}
* @memberof
IBiz
GroupSelect
* @memberof
App
GroupSelect
*/
@
Prop
()
url
!
:
string
;
...
...
@@ -52,7 +52,7 @@ export default class IBizGroupSelect extends Vue {
* 多选
*
* @type {*}
* @memberof
IBiz
GroupSelect
* @memberof
App
GroupSelect
*/
@
Prop
({
default
:
false
})
multiple
?:
boolean
;
...
...
@@ -60,7 +60,7 @@ export default class IBizGroupSelect extends Vue {
* 数据对象
*
* @type {*}
* @memberof
IBiz
GroupSelect
* @memberof
App
GroupSelect
*/
@
Prop
()
data
:
any
;
...
...
@@ -68,7 +68,7 @@ export default class IBizGroupSelect extends Vue {
* 过滤属性标识
*
* @type {*}
* @memberof
IBiz
GroupSelect
* @memberof
App
GroupSelect
*/
@
Prop
()
filter
?:
string
;
...
...
@@ -76,7 +76,7 @@ export default class IBizGroupSelect extends Vue {
* 是否启用
*
* @type {*}
* @memberof
IBiz
GroupSelect
* @memberof
App
GroupSelect
*/
@
Prop
()
disabled
?:
boolean
;
...
...
@@ -84,7 +84,7 @@ export default class IBizGroupSelect extends Vue {
* 值
*
* @type {*}
* @memberof
IBiz
GroupSelect
* @memberof
App
GroupSelect
*/
@
Prop
()
value
:
any
;
...
...
@@ -92,7 +92,7 @@ export default class IBizGroupSelect extends Vue {
* 上下文参数
*
* @type {*}
* @memberof
IBiz
GroupSelect
* @memberof
App
GroupSelect
*/
@
Prop
()
context
:
any
;
...
...
@@ -100,7 +100,7 @@ export default class IBizGroupSelect extends Vue {
* 关联属性
*
* @type {*}
* @memberof
IBiz
GroupSelect
* @memberof
App
GroupSelect
*/
@
Prop
()
valueitem
:
any
;
...
...
@@ -108,7 +108,7 @@ export default class IBizGroupSelect extends Vue {
* 填充属性
*
* @type {*}
* @memberof
IBiz
GroupSelect
* @memberof
App
GroupSelect
*/
@
Prop
()
fillmap
:
any
;
...
...
@@ -116,7 +116,7 @@ export default class IBizGroupSelect extends Vue {
* 选中项集合
*
* @type {*}
* @memberof
IBiz
GroupSelect
* @memberof
App
GroupSelect
*/
protected
selects
:
any
[]
=
[];
...
...
@@ -124,7 +124,7 @@ export default class IBizGroupSelect extends Vue {
* 值变化
*
* @type {*}
* @memberof
IBiz
GroupSelect
* @memberof
App
GroupSelect
*/
@
Watch
(
'value'
)
onValueChange
(
newVal
:
any
)
{
...
...
@@ -154,7 +154,7 @@ export default class IBizGroupSelect extends Vue {
* 单选时选中名称
*
* @type {*}
* @memberof
IBiz
GroupSelect
* @memberof
App
GroupSelect
*/
get
selectName
()
{
if
(
this
.
selects
.
length
>
0
)
{
...
...
@@ -166,11 +166,11 @@ export default class IBizGroupSelect extends Vue {
* 打开选择视图
*
* @type {*}
* @memberof
IBiz
GroupSelect
* @memberof
App
GroupSelect
*/
public
openView
()
{
const
view
:
any
=
{
viewname
:
'
ibiz
-group-picker'
,
viewname
:
'
app
-group-picker'
,
title
:
'分组选择'
};
const
context
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
));
...
...
@@ -208,7 +208,7 @@ export default class IBizGroupSelect extends Vue {
* 选择视图关闭
*
* @type {*}
* @memberof
IBiz
GroupSelect
* @memberof
App
GroupSelect
*/
public
openViewClose
(
result
:
any
)
{
this
.
selects
=
[];
...
...
@@ -222,7 +222,7 @@ export default class IBizGroupSelect extends Vue {
* 数据删除
*
* @type {*}
* @memberof
IBiz
GroupSelect
* @memberof
App
GroupSelect
*/
public
remove
(
item
:
any
)
{
this
.
selects
.
splice
(
this
.
selects
.
indexOf
(
item
),
1
);
...
...
@@ -233,7 +233,7 @@ export default class IBizGroupSelect extends Vue {
* 设置值
*
* @type {*}
* @memberof
IBiz
GroupSelect
* @memberof
App
GroupSelect
*/
public
setValue
()
{
let
item
:
any
=
{};
...
...
app_Web/src/mock/entity/ibzteam-members/ibzteam-members.ts
浏览文件 @
da722af9
...
...
@@ -87,6 +87,151 @@ mock.onDelete(new RegExp(/^\/ibzteammembers\/batch$/)).reply((config: any) => {
});
// Select
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Select"
);
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
>
=
[
'orgid'
,
'deptid'
,
'userid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
).
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
.
teammemberid
,
tempValue
.
teammemberid
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
});
// Select
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Select"
);
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
>
=
[
'orgid'
,
'userid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
).
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
.
teammemberid
,
tempValue
.
teammemberid
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
});
// Select
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Select"
);
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
>
=
[
'deptid'
,
'userid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
).
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
.
teammemberid
,
tempValue
.
teammemberid
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
});
// Select
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzteams
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Select"
);
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
>
=
[
'teamid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzteams
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
).
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
.
teammemberid
,
tempValue
.
teammemberid
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
});
// Select
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Select"
);
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
>
=
[
'userid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
).
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
.
teammemberid
,
tempValue
.
teammemberid
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
});
// Select
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Select"
);
...
...
@@ -95,8 +240,1174 @@ mock.onGet(new RegExp(/^\/ibzteammembers\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).re
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
).
exec
(
config
.
url
);
const
paramArray
:
Array
<
any
>
=
[
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
).
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
.
teammemberid
,
tempValue
.
teammemberid
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
});
// CheckKey
mock
.
onPost
(
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: CheckKey"
);
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
>
=
[
'orgid'
,
'deptid'
,
'userid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey$/
).
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
,
{}];
});
// CheckKey
mock
.
onPost
(
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: CheckKey"
);
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
>
=
[
'orgid'
,
'userid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey$/
).
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
,
{}];
});
// CheckKey
mock
.
onPost
(
new
RegExp
(
/^
\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: CheckKey"
);
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
>
=
[
'deptid'
,
'userid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey$/
).
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
,
{}];
});
// CheckKey
mock
.
onPost
(
new
RegExp
(
/^
\/
ibzteams
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: CheckKey"
);
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
>
=
[
'teamid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzteams
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey$/
).
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
,
{}];
});
// CheckKey
mock
.
onPost
(
new
RegExp
(
/^
\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: CheckKey"
);
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
>
=
[
'userid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey$/
).
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
,
{}];
});
// CheckKey
mock
.
onPost
(
new
RegExp
(
/^
\/
ibzteammembers
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: CheckKey"
);
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
>
=
[
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey$/
).
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.teammemberid, tempValue.teammemberid));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'teammemberid'
]
==
tempValue
[
'teammemberid'
]
){
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
];
});
// GetDraft
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: GetDraft"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
// GetDraft
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
({});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
{}];
});
// GetDraft
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: GetDraft"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
// GetDraft
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
({});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
{}];
});
// GetDraft
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: GetDraft"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
// GetDraft
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
({});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
{}];
});
// GetDraft
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzteams
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: GetDraft"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
// GetDraft
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
({});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
{}];
});
// GetDraft
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: GetDraft"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
// GetDraft
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
({});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
{}];
});
// GetDraft
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzteammembers
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: GetDraft"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
// GetDraft
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
({});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
{}];
});
// Create
mock
.
onPost
(
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Create"
);
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
>
=
[
'orgid'
,
'deptid'
,
'userid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
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
,
{}];
});
// Create
mock
.
onPost
(
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Create"
);
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
>
=
[
'orgid'
,
'userid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
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
,
{}];
});
// Create
mock
.
onPost
(
new
RegExp
(
/^
\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Create"
);
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
>
=
[
'deptid'
,
'userid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
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
,
{}];
});
// Create
mock
.
onPost
(
new
RegExp
(
/^
\/
ibzteams
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Create"
);
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
>
=
[
'teamid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzteams
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
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
,
{}];
});
// Create
mock
.
onPost
(
new
RegExp
(
/^
\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Create"
);
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
>
=
[
'userid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
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
,
{}];
});
// Create
mock
.
onPost
(
new
RegExp
(
/^
\/
ibzteammembers
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Create"
);
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
>
=
[
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
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
(
mockDatas
[
0
]);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
mockDatas
[
0
]];
});
// Save
mock
.
onPost
(
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Save"
);
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
>
=
[
'orgid'
,
'deptid'
,
'userid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save$/
).
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
,
{}];
});
// Save
mock
.
onPost
(
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Save"
);
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
>
=
[
'orgid'
,
'userid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save$/
).
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
,
{}];
});
// Save
mock
.
onPost
(
new
RegExp
(
/^
\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Save"
);
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
>
=
[
'deptid'
,
'userid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save$/
).
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
,
{}];
});
// Save
mock
.
onPost
(
new
RegExp
(
/^
\/
ibzteams
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Save"
);
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
>
=
[
'teamid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzteams
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save$/
).
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
,
{}];
});
// Save
mock
.
onPost
(
new
RegExp
(
/^
\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Save"
);
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
>
=
[
'userid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save$/
).
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
,
{}];
});
// Save
mock
.
onPost
(
new
RegExp
(
/^
\/
ibzteammembers
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Save"
);
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
>
=
[
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save$/
).
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.teammemberid, tempValue.teammemberid));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'teammemberid'
]
==
tempValue
[
'teammemberid'
]
){
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
];
});
// Update
mock
.
onPut
(
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Update"
);
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
>
=
[
'orgid'
,
'deptid'
,
'userid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
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
,
{}];
});
// Update
mock
.
onPut
(
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Update"
);
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
>
=
[
'orgid'
,
'userid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
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
,
{}];
});
// Update
mock
.
onPut
(
new
RegExp
(
/^
\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Update"
);
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
>
=
[
'deptid'
,
'userid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
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
,
{}];
});
// Update
mock
.
onPut
(
new
RegExp
(
/^
\/
ibzteams
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Update"
);
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
>
=
[
'teamid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzteams
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
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
,
{}];
});
// Update
mock
.
onPut
(
new
RegExp
(
/^
\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Update"
);
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
>
=
[
'userid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
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
,
{}];
});
// Update
mock
.
onPut
(
new
RegExp
(
/^
\/
ibzteammembers
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Update"
);
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
>
=
[
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
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.teammemberid, tempValue.teammemberid));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'teammemberid'
]
==
tempValue
[
'teammemberid'
]
){
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
];
});
// FetchDefault
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/
fetchdefault$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: FetchDefault"
);
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
>
=
[
'orgid'
,
'deptid'
,
'userid'
];
let
tempValue
:
any
=
{};
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/
fetchdefault$/
).
exec
(
config
.
url
);
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
:
[];
if
(
items
.
length
>
0
&&
paramArray
.
length
>
0
)
{
paramArray
.
forEach
((
paramkey
:
any
)
=>
{
if
(
tempValue
[
paramkey
]
&&
tempValue
[
paramkey
].
indexOf
(
";"
)
>
0
)
{
let
keysGrounp
:
Array
<
any
>
=
tempValue
[
paramkey
].
split
(
new
RegExp
(
/
[\;]
/
));
let
tempArray
:
Array
<
any
>
=
[];
keysGrounp
.
forEach
((
singlekey
:
any
)
=>
{
let
_items
=
items
.
filter
((
item
:
any
)
=>
{
return
item
[
paramkey
]
==
singlekey
});
if
(
_items
.
length
>
0
){
tempArray
.
push
(...
_items
);
}
})
items
=
tempArray
;
}
else
{
items
=
items
.
filter
((
item
:
any
)
=>
{
return
item
[
paramkey
]
==
tempValue
[
paramkey
]
});
}
})
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
items
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
items
];
});
// FetchDefault
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/
fetchdefault$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: FetchDefault"
);
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
>
=
[
'orgid'
,
'userid'
];
let
tempValue
:
any
=
{};
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/
fetchdefault$/
).
exec
(
config
.
url
);
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
:
[];
if
(
items
.
length
>
0
&&
paramArray
.
length
>
0
)
{
paramArray
.
forEach
((
paramkey
:
any
)
=>
{
if
(
tempValue
[
paramkey
]
&&
tempValue
[
paramkey
].
indexOf
(
";"
)
>
0
)
{
let
keysGrounp
:
Array
<
any
>
=
tempValue
[
paramkey
].
split
(
new
RegExp
(
/
[\;]
/
));
let
tempArray
:
Array
<
any
>
=
[];
keysGrounp
.
forEach
((
singlekey
:
any
)
=>
{
let
_items
=
items
.
filter
((
item
:
any
)
=>
{
return
item
[
paramkey
]
==
singlekey
});
if
(
_items
.
length
>
0
){
tempArray
.
push
(...
_items
);
}
})
items
=
tempArray
;
}
else
{
items
=
items
.
filter
((
item
:
any
)
=>
{
return
item
[
paramkey
]
==
tempValue
[
paramkey
]
});
}
})
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
items
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
items
];
});
// FetchDefault
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/
fetchdefault$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: FetchDefault"
);
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
>
=
[
'deptid'
,
'userid'
];
let
tempValue
:
any
=
{};
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/
fetchdefault$/
).
exec
(
config
.
url
);
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
:
[];
if
(
items
.
length
>
0
&&
paramArray
.
length
>
0
)
{
paramArray
.
forEach
((
paramkey
:
any
)
=>
{
if
(
tempValue
[
paramkey
]
&&
tempValue
[
paramkey
].
indexOf
(
";"
)
>
0
)
{
let
keysGrounp
:
Array
<
any
>
=
tempValue
[
paramkey
].
split
(
new
RegExp
(
/
[\;]
/
));
let
tempArray
:
Array
<
any
>
=
[];
keysGrounp
.
forEach
((
singlekey
:
any
)
=>
{
let
_items
=
items
.
filter
((
item
:
any
)
=>
{
return
item
[
paramkey
]
==
singlekey
});
if
(
_items
.
length
>
0
){
tempArray
.
push
(...
_items
);
}
})
items
=
tempArray
;
}
else
{
items
=
items
.
filter
((
item
:
any
)
=>
{
return
item
[
paramkey
]
==
tempValue
[
paramkey
]
});
}
})
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
items
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
items
];
});
// FetchDefault
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzteams
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/
fetchdefault$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: FetchDefault"
);
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
>
=
[
'teamid'
];
let
tempValue
:
any
=
{};
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzteams
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/
fetchdefault$/
).
exec
(
config
.
url
);
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
:
[];
if
(
items
.
length
>
0
&&
paramArray
.
length
>
0
)
{
paramArray
.
forEach
((
paramkey
:
any
)
=>
{
if
(
tempValue
[
paramkey
]
&&
tempValue
[
paramkey
].
indexOf
(
";"
)
>
0
)
{
let
keysGrounp
:
Array
<
any
>
=
tempValue
[
paramkey
].
split
(
new
RegExp
(
/
[\;]
/
));
let
tempArray
:
Array
<
any
>
=
[];
keysGrounp
.
forEach
((
singlekey
:
any
)
=>
{
let
_items
=
items
.
filter
((
item
:
any
)
=>
{
return
item
[
paramkey
]
==
singlekey
});
if
(
_items
.
length
>
0
){
tempArray
.
push
(...
_items
);
}
})
items
=
tempArray
;
}
else
{
items
=
items
.
filter
((
item
:
any
)
=>
{
return
item
[
paramkey
]
==
tempValue
[
paramkey
]
});
}
})
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
items
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
items
];
});
// FetchDefault
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/
fetchdefault$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: FetchDefault"
);
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
>
=
[
'userid'
];
let
tempValue
:
any
=
{};
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/
fetchdefault$/
).
exec
(
config
.
url
);
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
:
[];
if
(
items
.
length
>
0
&&
paramArray
.
length
>
0
)
{
paramArray
.
forEach
((
paramkey
:
any
)
=>
{
if
(
tempValue
[
paramkey
]
&&
tempValue
[
paramkey
].
indexOf
(
";"
)
>
0
)
{
let
keysGrounp
:
Array
<
any
>
=
tempValue
[
paramkey
].
split
(
new
RegExp
(
/
[\;]
/
));
let
tempArray
:
Array
<
any
>
=
[];
keysGrounp
.
forEach
((
singlekey
:
any
)
=>
{
let
_items
=
items
.
filter
((
item
:
any
)
=>
{
return
item
[
paramkey
]
==
singlekey
});
if
(
_items
.
length
>
0
){
tempArray
.
push
(...
_items
);
}
})
items
=
tempArray
;
}
else
{
items
=
items
.
filter
((
item
:
any
)
=>
{
return
item
[
paramkey
]
==
tempValue
[
paramkey
]
});
}
})
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
items
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
items
];
});
// FetchDefault
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzteammembers
\/
fetchdefault$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: FetchDefault"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
mockDatas
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
mockDatas
?
mockDatas
:
[]];
});
// FetchDefault
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzteammembers
\/
fetchdefault
(\?[\w
-.
/
?%&=,
]
*
)
*$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: FetchDefault"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
if
(
config
.
url
.
includes
(
'page'
)){
let
url
=
config
.
url
.
split
(
'?'
)[
1
];
let
params
=
qs
.
parse
(
url
);
Object
.
assign
(
config
,
params
);
}
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
let
total
=
mockDatas
.
length
;
let
records
:
Array
<
any
>
=
[];
if
(
!
config
.
page
||
!
config
.
size
){
records
=
mockDatas
;
}
else
{
if
((
config
.
page
-
1
)
*
config
.
size
<
total
){
records
=
mockDatas
.
slice
(
config
.
page
,
config
.
size
);
}
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
records
?
records
:
[]);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
records
?
records
:
[]];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Remove
mock
.
onDelete
(
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Remove"
);
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
>
=
[
'orgid'
,
'deptid'
,
'userid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
...
@@ -109,22 +1420,22 @@ mock.onGet(new RegExp(/^\/ibzteammembers\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).re
let
items
=
mockDatas
?
mockDatas
:
[];
let
_items
=
items
.
find
((
item
:
any
)
=>
Object
.
is
(
item
.
teammemberid
,
tempValue
.
teammemberid
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
table
(
_items
?
_items
:{}
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
return
[
status
,
_items
?
_items
:{}
];
});
//
CheckKey
mock
.
on
Post
(
new
RegExp
(
/^
\/
ibzteammembers
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法:
CheckKey
"
);
//
Remove
mock
.
on
Delete
(
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法:
Remove
"
);
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
>
=
[
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibz
teammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
const
paramArray
:
Array
<
any
>
=
[
'
orgid'
,
'userid'
,
'
teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibz
organizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
...
@@ -134,51 +1445,53 @@ mock.onPost(new RegExp(/^\/ibzteammembers\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.teammemberid, tempValue.teammemberid));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'teammemberid'
]
==
tempValue
[
'teammemberid'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
let
items
=
mockDatas
?
mockDatas
:
[];
let
_items
=
items
.
find
((
item
:
any
)
=>
Object
.
is
(
item
.
teammemberid
,
tempValue
.
teammemberid
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
data
);
console
.
table
(
_items
?
_items
:{}
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
return
[
status
,
_items
?
_items
:{}
];
});
//
GetDraft
mock
.
on
Get
(
new
RegExp
(
/^
\/
ibzteammembers
\/
getdraft
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法:
GetDraft
"
);
//
Remove
mock
.
on
Delete
(
new
RegExp
(
/^
\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法:
Remove
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
// GetDraft
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'deptid'
,
'userid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
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
.
teammemberid
,
tempValue
.
teammemberid
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
({});
console
.
table
(
_items
?
_items
:
{});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
{}];
return
[
status
,
_items
?
_items
:
{}];
});
//
Creat
e
mock
.
on
Post
(
new
RegExp
(
/^
\/
ibzteammembers
\/?([
a-zA-Z0-9
\-\;]{0
,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法:
Creat
e"
);
//
Remov
e
mock
.
on
Delete
(
new
RegExp
(
/^
\/
ibzteams
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1
,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法:
Remov
e"
);
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
>
=
[
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
const
paramArray
:
Array
<
any
>
=
[
'team
id'
,
'team
memberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzteam
s
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteam
members
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
...
@@ -188,23 +1501,25 @@ mock.onPost(new RegExp(/^\/ibzteammembers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((c
});
});
}
let
items
=
mockDatas
?
mockDatas
:
[];
let
_items
=
items
.
find
((
item
:
any
)
=>
Object
.
is
(
item
.
teammemberid
,
tempValue
.
teammemberid
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
mockDatas
[
0
]
);
console
.
table
(
_items
?
_items
:{}
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
mockDatas
[
0
]
];
return
[
status
,
_items
?
_items
:{}
];
});
//
Sa
ve
mock
.
on
Post
(
new
RegExp
(
/^
\/
ibzteammembers
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法:
Sa
ve"
);
//
Remo
ve
mock
.
on
Delete
(
new
RegExp
(
/^
\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法:
Remo
ve"
);
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
>
=
[
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibz
teammembers
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save
$/
).
exec
(
config
.
url
);
const
paramArray
:
Array
<
any
>
=
[
'
userid'
,
'
teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibz
employees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
...
@@ -214,28 +1529,18 @@ mock.onPost(new RegExp(/^\/ibzteammembers\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).re
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.teammemberid, tempValue.teammemberid));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'teammemberid'
]
==
tempValue
[
'teammemberid'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
let
items
=
mockDatas
?
mockDatas
:
[];
let
_items
=
items
.
find
((
item
:
any
)
=>
Object
.
is
(
item
.
teammemberid
,
tempValue
.
teammemberid
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
data
);
console
.
table
(
_items
?
_items
:{}
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
return
[
status
,
_items
?
_items
:{}
];
});
//
Updat
e
mock
.
on
Put
(
new
RegExp
(
/^
\/
ibzteammembers
\/?([
a-zA-Z0-9
\-\;]{0
,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法:
Updat
e"
);
//
Remov
e
mock
.
on
Delete
(
new
RegExp
(
/^
\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1
,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法:
Remov
e"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
...
...
@@ -252,87 +1557,137 @@ mock.onPut(new RegExp(/^\/ibzteammembers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((co
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.teammemberid, tempValue.teammemberid));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'teammemberid'
]
==
tempValue
[
'teammemberid'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
let
items
=
mockDatas
?
mockDatas
:
[];
let
_items
=
items
.
find
((
item
:
any
)
=>
Object
.
is
(
item
.
teammemberid
,
tempValue
.
teammemberid
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
data
);
console
.
table
(
_items
?
_items
:{}
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
return
[
status
,
_items
?
_items
:{}
];
});
//
FetchDefaul
t
mock
.
onGet
(
new
RegExp
(
/^
\/
ibz
teammembers
\/
fetchdefault
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法:
FetchDefaul
t"
);
//
Ge
t
mock
.
onGet
(
new
RegExp
(
/^
\/
ibz
organizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法:
Ge
t"
);
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
>
=
[
'orgid'
,
'deptid'
,
'userid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
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
.
teammemberid
,
tempValue
.
teammemberid
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
mockDatas
);
console
.
table
(
_items
?
_items
:{}
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
mockDatas
?
mockDatas
:
[]
];
return
[
status
,
_items
?
_items
:{}
];
});
//
FetchDefaul
t
mock
.
onGet
(
new
RegExp
(
/^
\/
ibz
teammembers
\/
fetchdefault
(\?[\w
-.
/
?%&=,
]
*
)
*
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法:
FetchDefaul
t"
);
//
Ge
t
mock
.
onGet
(
new
RegExp
(
/^
\/
ibz
organizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法:
Ge
t"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
if
(
config
.
url
.
includes
(
'page'
)){
let
url
=
config
.
url
.
split
(
'?'
)[
1
];
let
params
=
qs
.
parse
(
url
);
Object
.
assign
(
config
,
params
);
}
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'orgid'
,
'userid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzorganizations
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
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
total
=
mockDatas
.
length
;
let
records
:
Array
<
any
>
=
[];
if
(
!
config
.
page
||
!
config
.
size
){
records
=
mockDatas
;
}
else
{
if
((
config
.
page
-
1
)
*
config
.
size
<
total
){
records
=
mockDatas
.
slice
(
config
.
page
,
config
.
size
);
}
let
items
=
mockDatas
?
mockDatas
:
[];
let
_items
=
items
.
find
((
item
:
any
)
=>
Object
.
is
(
item
.
teammemberid
,
tempValue
.
teammemberid
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
?
_items
:{});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
?
_items
:{}];
});
// Get
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Get"
);
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
>
=
[
'deptid'
,
'userid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzdepartments
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
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
.
teammemberid
,
tempValue
.
teammemberid
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
records
?
records
:
[]
);
console
.
table
(
_items
?
_items
:{}
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
records
?
records
:
[]
];
return
[
status
,
_items
?
_items
:{}
];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Get
mock
.
onGet
(
new
RegExp
(
/^
\/
ibzteams
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法: Get"
);
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
>
=
[
'teamid'
,
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzteams
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
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
.
teammemberid
,
tempValue
.
teammemberid
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
?
_items
:{});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
?
_items
:{}];
});
//
Remove
mock
.
on
Delete
(
new
RegExp
(
/^
\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法:
Remove
"
);
//
Get
mock
.
on
Get
(
new
RegExp
(
/^
\/
ibzemployees
\/([
a-zA-Z0-9
\-\;]{1,35})
\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibzteammember 方法:
Get
"
);
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
>
=
[
'teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibzteammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
const
paramArray
:
Array
<
any
>
=
[
'
userid'
,
'
teammemberid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibz
employees
\/([
a-zA-Z0-9
\-\;]{1,35})\/
ibz
teammembers
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
...
app_Web/src/pages/ou/ibzteam-member-grid-view/ibzteam-member-grid-view-base.vue
浏览文件 @
da722af9
...
...
@@ -1165,7 +1165,7 @@ export default class IBZTeamMemberGridViewBase extends Vue {
batchAddPSAppViews
=
[
{
view
:{
viewname
:
'ibzemployee-mpickup-view'
,
height
:
0
,
width
:
0
,
title
:
'人员数据多项选择视图'
},
res
:[
'IBZEmployee'
],
'resAppKey'
:
''
}
'resAppKey'
:
'
userid
'
}
];
if
(
batchAddPSAppViews
.
length
==
0
||
!
this
.
context
.
srfparentdename
){
this
.
$Notice
.
warning
({
title
:
'错误'
,
desc
:
'批量添加需添加N:N关系'
});
...
...
@@ -1224,7 +1224,12 @@ export default class IBZTeamMemberGridViewBase extends Vue {
if
(
args
.
length
>
0
){
Object
.
assign
(
tempContext
,
args
[
0
]);
}
const
deResParameters
:
any
[]
=
[];
let
deResParameters
:
any
[]
=
[];
if
(
tempContext
.
ibzemployee
&&
true
){
deResParameters
=
[
{
pathName
:
'ibzemployees'
,
parameterName
:
'ibzemployee'
},
]
}
const
parameters
:
any
[]
=
[
{
pathName
:
'ibzteammembers'
,
parameterName
:
'ibzteammember'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
...
...
app_Web/src/pages/rt/index/router.ts
浏览文件 @
da722af9
...
...
@@ -317,6 +317,85 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/ou/ibzemployee-option-view/ibzemployee-option-view.vue'
),
},
{
path
:
'ibzorganizations/:ibzorganization?/ibzdepartments/:ibzdepartment?/ibzemployees/:ibzemployee?/ibzteammembers/:ibzteammember?/editview/:editview?'
,
meta
:
{
caption
:
'entities.ibzteammember.views.editview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'ibzorganizations'
,
parameterName
:
'ibzorganization'
},
{
pathName
:
'ibzdepartments'
,
parameterName
:
'ibzdepartment'
},
{
pathName
:
'ibzemployees'
,
parameterName
:
'ibzemployee'
},
{
pathName
:
'ibzteammembers'
,
parameterName
:
'ibzteammember'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzteam-member-edit-view/ibzteam-member-edit-view.vue'
),
},
{
path
:
'ibzorganizations/:ibzorganization?/ibzemployees/:ibzemployee?/ibzteammembers/:ibzteammember?/editview/:editview?'
,
meta
:
{
caption
:
'entities.ibzteammember.views.editview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'ibzorganizations'
,
parameterName
:
'ibzorganization'
},
{
pathName
:
'ibzemployees'
,
parameterName
:
'ibzemployee'
},
{
pathName
:
'ibzteammembers'
,
parameterName
:
'ibzteammember'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzteam-member-edit-view/ibzteam-member-edit-view.vue'
),
},
{
path
:
'ibzdepartments/:ibzdepartment?/ibzemployees/:ibzemployee?/ibzteammembers/:ibzteammember?/editview/:editview?'
,
meta
:
{
caption
:
'entities.ibzteammember.views.editview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'ibzdepartments'
,
parameterName
:
'ibzdepartment'
},
{
pathName
:
'ibzemployees'
,
parameterName
:
'ibzemployee'
},
{
pathName
:
'ibzteammembers'
,
parameterName
:
'ibzteammember'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzteam-member-edit-view/ibzteam-member-edit-view.vue'
),
},
{
path
:
'ibzteams/:ibzteam?/ibzteammembers/:ibzteammember?/editview/:editview?'
,
meta
:
{
caption
:
'entities.ibzteammember.views.editview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'ibzteams'
,
parameterName
:
'ibzteam'
},
{
pathName
:
'ibzteammembers'
,
parameterName
:
'ibzteammember'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzteam-member-edit-view/ibzteam-member-edit-view.vue'
),
},
{
path
:
'ibzemployees/:ibzemployee?/ibzteammembers/:ibzteammember?/editview/:editview?'
,
meta
:
{
caption
:
'entities.ibzteammember.views.editview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'ibzemployees'
,
parameterName
:
'ibzemployee'
},
{
pathName
:
'ibzteammembers'
,
parameterName
:
'ibzteammember'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzteam-member-edit-view/ibzteam-member-edit-view.vue'
),
},
{
path
:
'ibzteammembers/:ibzteammember?/editview/:editview?'
,
meta
:
{
...
...
@@ -835,6 +914,85 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/workflow/wfuser-pickup-view/wfuser-pickup-view.vue'
),
},
{
path
:
'ibzorganizations/:ibzorganization?/ibzdepartments/:ibzdepartment?/ibzemployees/:ibzemployee?/ibzteammembers/:ibzteammember?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.ibzteammember.views.gridview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'ibzorganizations'
,
parameterName
:
'ibzorganization'
},
{
pathName
:
'ibzdepartments'
,
parameterName
:
'ibzdepartment'
},
{
pathName
:
'ibzemployees'
,
parameterName
:
'ibzemployee'
},
{
pathName
:
'ibzteammembers'
,
parameterName
:
'ibzteammember'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzteam-member-grid-view/ibzteam-member-grid-view.vue'
),
},
{
path
:
'ibzorganizations/:ibzorganization?/ibzemployees/:ibzemployee?/ibzteammembers/:ibzteammember?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.ibzteammember.views.gridview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'ibzorganizations'
,
parameterName
:
'ibzorganization'
},
{
pathName
:
'ibzemployees'
,
parameterName
:
'ibzemployee'
},
{
pathName
:
'ibzteammembers'
,
parameterName
:
'ibzteammember'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzteam-member-grid-view/ibzteam-member-grid-view.vue'
),
},
{
path
:
'ibzdepartments/:ibzdepartment?/ibzemployees/:ibzemployee?/ibzteammembers/:ibzteammember?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.ibzteammember.views.gridview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'ibzdepartments'
,
parameterName
:
'ibzdepartment'
},
{
pathName
:
'ibzemployees'
,
parameterName
:
'ibzemployee'
},
{
pathName
:
'ibzteammembers'
,
parameterName
:
'ibzteammember'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzteam-member-grid-view/ibzteam-member-grid-view.vue'
),
},
{
path
:
'ibzteams/:ibzteam?/ibzteammembers/:ibzteammember?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.ibzteammember.views.gridview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'ibzteams'
,
parameterName
:
'ibzteam'
},
{
pathName
:
'ibzteammembers'
,
parameterName
:
'ibzteammember'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzteam-member-grid-view/ibzteam-member-grid-view.vue'
),
},
{
path
:
'ibzemployees/:ibzemployee?/ibzteammembers/:ibzteammember?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.ibzteammember.views.gridview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'index'
,
parameterName
:
'index'
},
{
pathName
:
'ibzemployees'
,
parameterName
:
'ibzemployee'
},
{
pathName
:
'ibzteammembers'
,
parameterName
:
'ibzteammember'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzteam-member-grid-view/ibzteam-member-grid-view.vue'
),
},
{
path
:
'ibzteammembers/:ibzteammember?/gridview/:gridview?'
,
meta
:
{
...
...
@@ -1898,6 +2056,80 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/uaa/sys-role-pickup-view/sys-role-pickup-view.vue'
),
},
{
path
:
'/ibzorganizations/:ibzorganization?/ibzdepartments/:ibzdepartment?/ibzemployees/:ibzemployee?/ibzteammembers/:ibzteammember?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.ibzteammember.views.gridview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'ibzorganizations'
,
parameterName
:
'ibzorganization'
},
{
pathName
:
'ibzdepartments'
,
parameterName
:
'ibzdepartment'
},
{
pathName
:
'ibzemployees'
,
parameterName
:
'ibzemployee'
},
{
pathName
:
'ibzteammembers'
,
parameterName
:
'ibzteammember'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzteam-member-grid-view/ibzteam-member-grid-view.vue'
),
},
{
path
:
'/ibzorganizations/:ibzorganization?/ibzemployees/:ibzemployee?/ibzteammembers/:ibzteammember?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.ibzteammember.views.gridview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'ibzorganizations'
,
parameterName
:
'ibzorganization'
},
{
pathName
:
'ibzemployees'
,
parameterName
:
'ibzemployee'
},
{
pathName
:
'ibzteammembers'
,
parameterName
:
'ibzteammember'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzteam-member-grid-view/ibzteam-member-grid-view.vue'
),
},
{
path
:
'/ibzdepartments/:ibzdepartment?/ibzemployees/:ibzemployee?/ibzteammembers/:ibzteammember?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.ibzteammember.views.gridview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'ibzdepartments'
,
parameterName
:
'ibzdepartment'
},
{
pathName
:
'ibzemployees'
,
parameterName
:
'ibzemployee'
},
{
pathName
:
'ibzteammembers'
,
parameterName
:
'ibzteammember'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzteam-member-grid-view/ibzteam-member-grid-view.vue'
),
},
{
path
:
'/ibzteams/:ibzteam?/ibzteammembers/:ibzteammember?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.ibzteammember.views.gridview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'ibzteams'
,
parameterName
:
'ibzteam'
},
{
pathName
:
'ibzteammembers'
,
parameterName
:
'ibzteammember'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzteam-member-grid-view/ibzteam-member-grid-view.vue'
),
},
{
path
:
'/ibzemployees/:ibzemployee?/ibzteammembers/:ibzteammember?/gridview/:gridview?'
,
meta
:
{
caption
:
'entities.ibzteammember.views.gridview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'ibzemployees'
,
parameterName
:
'ibzemployee'
},
{
pathName
:
'ibzteammembers'
,
parameterName
:
'ibzteammember'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzteam-member-grid-view/ibzteam-member-grid-view.vue'
),
},
{
path
:
'/ibzteammembers/:ibzteammember?/gridview/:gridview?'
,
meta
:
{
...
...
@@ -2097,6 +2329,80 @@ const router = new Router({
},
component
:
()
=>
import
(
'@pages/ou/ibzteam-grid-view/ibzteam-grid-view.vue'
),
},
{
path
:
'/ibzorganizations/:ibzorganization?/ibzdepartments/:ibzdepartment?/ibzemployees/:ibzemployee?/ibzteammembers/:ibzteammember?/editview/:editview?'
,
meta
:
{
caption
:
'entities.ibzteammember.views.editview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'ibzorganizations'
,
parameterName
:
'ibzorganization'
},
{
pathName
:
'ibzdepartments'
,
parameterName
:
'ibzdepartment'
},
{
pathName
:
'ibzemployees'
,
parameterName
:
'ibzemployee'
},
{
pathName
:
'ibzteammembers'
,
parameterName
:
'ibzteammember'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzteam-member-edit-view/ibzteam-member-edit-view.vue'
),
},
{
path
:
'/ibzorganizations/:ibzorganization?/ibzemployees/:ibzemployee?/ibzteammembers/:ibzteammember?/editview/:editview?'
,
meta
:
{
caption
:
'entities.ibzteammember.views.editview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'ibzorganizations'
,
parameterName
:
'ibzorganization'
},
{
pathName
:
'ibzemployees'
,
parameterName
:
'ibzemployee'
},
{
pathName
:
'ibzteammembers'
,
parameterName
:
'ibzteammember'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzteam-member-edit-view/ibzteam-member-edit-view.vue'
),
},
{
path
:
'/ibzdepartments/:ibzdepartment?/ibzemployees/:ibzemployee?/ibzteammembers/:ibzteammember?/editview/:editview?'
,
meta
:
{
caption
:
'entities.ibzteammember.views.editview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'ibzdepartments'
,
parameterName
:
'ibzdepartment'
},
{
pathName
:
'ibzemployees'
,
parameterName
:
'ibzemployee'
},
{
pathName
:
'ibzteammembers'
,
parameterName
:
'ibzteammember'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzteam-member-edit-view/ibzteam-member-edit-view.vue'
),
},
{
path
:
'/ibzteams/:ibzteam?/ibzteammembers/:ibzteammember?/editview/:editview?'
,
meta
:
{
caption
:
'entities.ibzteammember.views.editview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'ibzteams'
,
parameterName
:
'ibzteam'
},
{
pathName
:
'ibzteammembers'
,
parameterName
:
'ibzteammember'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzteam-member-edit-view/ibzteam-member-edit-view.vue'
),
},
{
path
:
'/ibzemployees/:ibzemployee?/ibzteammembers/:ibzteammember?/editview/:editview?'
,
meta
:
{
caption
:
'entities.ibzteammember.views.editview.title'
,
info
:
''
,
parameters
:
[
{
pathName
:
'ibzemployees'
,
parameterName
:
'ibzemployee'
},
{
pathName
:
'ibzteammembers'
,
parameterName
:
'ibzteammember'
},
{
pathName
:
'editview'
,
parameterName
:
'editview'
},
],
requireAuth
:
true
,
},
component
:
()
=>
import
(
'@pages/ou/ibzteam-member-edit-view/ibzteam-member-edit-view.vue'
),
},
{
path
:
'/ibzteammembers/:ibzteammember?/editview/:editview?'
,
meta
:
{
...
...
app_Web/src/service/ibzemployee/ibzemployee-service-base.ts
浏览文件 @
da722af9
...
...
@@ -110,9 +110,25 @@ export default class IBZEmployeeServiceBase extends EntityService {
}
}
masterData
.
ibzdeptmembers
=
ibzdeptmembersData
;
let
ibzteammembersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
),
'undefined'
)){
ibzteammembersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
)
as
any
);
if
(
ibzteammembersData
&&
ibzteammembersData
.
length
&&
ibzteammembersData
.
length
>
0
){
ibzteammembersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
teammemberid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
ibzteammembers
=
ibzteammembersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
if
(
context
.
ibzorganization
&&
context
.
ibzemployee
){
...
...
@@ -132,9 +148,25 @@ export default class IBZEmployeeServiceBase extends EntityService {
}
}
masterData
.
ibzdeptmembers
=
ibzdeptmembersData
;
let
ibzteammembersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
),
'undefined'
)){
ibzteammembersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
)
as
any
);
if
(
ibzteammembersData
&&
ibzteammembersData
.
length
&&
ibzteammembersData
.
length
>
0
){
ibzteammembersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
teammemberid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
ibzteammembers
=
ibzteammembersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzemployees/
${
context
.
ibzemployee
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
if
(
context
.
ibzdepartment
&&
context
.
ibzemployee
){
...
...
@@ -154,9 +186,25 @@ export default class IBZEmployeeServiceBase extends EntityService {
}
}
masterData
.
ibzdeptmembers
=
ibzdeptmembersData
;
let
ibzteammembersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
),
'undefined'
)){
ibzteammembersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
)
as
any
);
if
(
ibzteammembersData
&&
ibzteammembersData
.
length
&&
ibzteammembersData
.
length
>
0
){
ibzteammembersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
teammemberid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
ibzteammembers
=
ibzteammembersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
let
masterData
:
any
=
{};
...
...
@@ -175,9 +223,25 @@ export default class IBZEmployeeServiceBase extends EntityService {
}
}
masterData
.
ibzdeptmembers
=
ibzdeptmembersData
;
let
ibzteammembersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
),
'undefined'
)){
ibzteammembersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
)
as
any
);
if
(
ibzteammembersData
&&
ibzteammembersData
.
length
&&
ibzteammembersData
.
length
>
0
){
ibzteammembersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
teammemberid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
ibzteammembers
=
ibzteammembersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/ibzemployees/
${
context
.
ibzemployee
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
...
...
@@ -208,9 +272,25 @@ export default class IBZEmployeeServiceBase extends EntityService {
}
}
masterData
.
ibzdeptmembers
=
ibzdeptmembersData
;
let
ibzteammembersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
),
'undefined'
)){
ibzteammembersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
)
as
any
);
if
(
ibzteammembersData
&&
ibzteammembersData
.
length
&&
ibzteammembersData
.
length
>
0
){
ibzteammembersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
teammemberid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
ibzteammembers
=
ibzteammembersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
if
(
context
.
ibzorganization
&&
context
.
ibzemployee
){
...
...
@@ -230,9 +310,25 @@ export default class IBZEmployeeServiceBase extends EntityService {
}
}
masterData
.
ibzdeptmembers
=
ibzdeptmembersData
;
let
ibzteammembersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
),
'undefined'
)){
ibzteammembersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
)
as
any
);
if
(
ibzteammembersData
&&
ibzteammembersData
.
length
&&
ibzteammembersData
.
length
>
0
){
ibzteammembersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
teammemberid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
ibzteammembers
=
ibzteammembersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzemployees/
${
context
.
ibzemployee
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
if
(
context
.
ibzdepartment
&&
context
.
ibzemployee
){
...
...
@@ -252,9 +348,25 @@ export default class IBZEmployeeServiceBase extends EntityService {
}
}
masterData
.
ibzdeptmembers
=
ibzdeptmembersData
;
let
ibzteammembersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
),
'undefined'
)){
ibzteammembersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
)
as
any
);
if
(
ibzteammembersData
&&
ibzteammembersData
.
length
&&
ibzteammembersData
.
length
>
0
){
ibzteammembersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
teammemberid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
ibzteammembers
=
ibzteammembersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
/checkkey`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/ibzemployees/
${
context
.
ibzemployee
}
/checkkey`
,
data
,
isloading
);
...
...
@@ -273,20 +385,24 @@ export default class IBZEmployeeServiceBase extends EntityService {
if
(
context
.
ibzorganization
&&
context
.
ibzdepartment
&&
context
.
ibzemployee
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
if
(
context
.
ibzorganization
&&
context
.
ibzemployee
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzemployees/
${
context
.
ibzemployee
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
if
(
context
.
ibzdepartment
&&
context
.
ibzemployee
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibzemployees/
${
context
.
ibzemployee
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
...
...
@@ -317,9 +433,25 @@ export default class IBZEmployeeServiceBase extends EntityService {
}
}
masterData
.
ibzdeptmembers
=
ibzdeptmembersData
;
let
ibzteammembersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
),
'undefined'
)){
ibzteammembersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
)
as
any
);
if
(
ibzteammembersData
&&
ibzteammembersData
.
length
&&
ibzteammembersData
.
length
>
0
){
ibzteammembersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
teammemberid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
ibzteammembers
=
ibzteammembersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
if
(
context
.
ibzorganization
&&
context
.
ibzemployee
){
...
...
@@ -339,9 +471,25 @@ export default class IBZEmployeeServiceBase extends EntityService {
}
}
masterData
.
ibzdeptmembers
=
ibzdeptmembersData
;
let
ibzteammembersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
),
'undefined'
)){
ibzteammembersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
)
as
any
);
if
(
ibzteammembersData
&&
ibzteammembersData
.
length
&&
ibzteammembersData
.
length
>
0
){
ibzteammembersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
teammemberid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
ibzteammembers
=
ibzteammembersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzemployees/
${
context
.
ibzemployee
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
if
(
context
.
ibzdepartment
&&
context
.
ibzemployee
){
...
...
@@ -361,9 +509,25 @@ export default class IBZEmployeeServiceBase extends EntityService {
}
}
masterData
.
ibzdeptmembers
=
ibzdeptmembersData
;
let
ibzteammembersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
),
'undefined'
)){
ibzteammembersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
)
as
any
);
if
(
ibzteammembersData
&&
ibzteammembersData
.
length
&&
ibzteammembersData
.
length
>
0
){
ibzteammembersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
teammemberid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
ibzteammembers
=
ibzteammembersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
let
masterData
:
any
=
{};
...
...
@@ -382,9 +546,25 @@ export default class IBZEmployeeServiceBase extends EntityService {
}
}
masterData
.
ibzdeptmembers
=
ibzdeptmembersData
;
let
ibzteammembersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
),
'undefined'
)){
ibzteammembersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
)
as
any
);
if
(
ibzteammembersData
&&
ibzteammembersData
.
length
&&
ibzteammembersData
.
length
>
0
){
ibzteammembersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
teammemberid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
ibzteammembers
=
ibzteammembersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzemployees/
${
context
.
ibzemployee
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
...
...
@@ -415,9 +595,25 @@ export default class IBZEmployeeServiceBase extends EntityService {
}
}
masterData
.
ibzdeptmembers
=
ibzdeptmembersData
;
let
ibzteammembersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
),
'undefined'
)){
ibzteammembersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
)
as
any
);
if
(
ibzteammembersData
&&
ibzteammembersData
.
length
&&
ibzteammembersData
.
length
>
0
){
ibzteammembersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
teammemberid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
ibzteammembers
=
ibzteammembersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
/initpwd`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
if
(
context
.
ibzorganization
&&
context
.
ibzemployee
){
...
...
@@ -437,9 +633,25 @@ export default class IBZEmployeeServiceBase extends EntityService {
}
}
masterData
.
ibzdeptmembers
=
ibzdeptmembersData
;
let
ibzteammembersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
),
'undefined'
)){
ibzteammembersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
)
as
any
);
if
(
ibzteammembersData
&&
ibzteammembersData
.
length
&&
ibzteammembersData
.
length
>
0
){
ibzteammembersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
teammemberid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
ibzteammembers
=
ibzteammembersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzemployees/
${
context
.
ibzemployee
}
/initpwd`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
if
(
context
.
ibzdepartment
&&
context
.
ibzemployee
){
...
...
@@ -459,9 +671,25 @@ export default class IBZEmployeeServiceBase extends EntityService {
}
}
masterData
.
ibzdeptmembers
=
ibzdeptmembersData
;
let
ibzteammembersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
),
'undefined'
)){
ibzteammembersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
)
as
any
);
if
(
ibzteammembersData
&&
ibzteammembersData
.
length
&&
ibzteammembersData
.
length
>
0
){
ibzteammembersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
teammemberid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
ibzteammembers
=
ibzteammembersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
/initpwd`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
return
Http
.
getInstance
().
post
(
`/ibzemployees/
${
context
.
ibzemployee
}
/initpwd`
,
data
,
isloading
);
...
...
@@ -481,23 +709,27 @@ export default class IBZEmployeeServiceBase extends EntityService {
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/getdraft`
,
isloading
);
res
.
data
.
ibzemployee
=
data
.
ibzemployee
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
if
(
context
.
ibzorganization
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzemployees/getdraft`
,
isloading
);
res
.
data
.
ibzemployee
=
data
.
ibzemployee
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
if
(
context
.
ibzdepartment
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/getdraft`
,
isloading
);
res
.
data
.
ibzemployee
=
data
.
ibzemployee
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibzemployees/getdraft`
,
isloading
);
res
.
data
.
ibzemployee
=
data
.
ibzemployee
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
...
...
@@ -528,6 +760,21 @@ export default class IBZEmployeeServiceBase extends EntityService {
}
}
masterData
.
ibzdeptmembers
=
ibzdeptmembersData
;
let
ibzteammembersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
),
'undefined'
)){
ibzteammembersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
)
as
any
);
if
(
ibzteammembersData
&&
ibzteammembersData
.
length
&&
ibzteammembersData
.
length
>
0
){
ibzteammembersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
teammemberid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
ibzteammembers
=
ibzteammembersData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -538,6 +785,7 @@ export default class IBZEmployeeServiceBase extends EntityService {
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
if
(
context
.
ibzorganization
&&
true
){
...
...
@@ -557,6 +805,21 @@ export default class IBZEmployeeServiceBase extends EntityService {
}
}
masterData
.
ibzdeptmembers
=
ibzdeptmembersData
;
let
ibzteammembersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
),
'undefined'
)){
ibzteammembersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
)
as
any
);
if
(
ibzteammembersData
&&
ibzteammembersData
.
length
&&
ibzteammembersData
.
length
>
0
){
ibzteammembersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
teammemberid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
ibzteammembers
=
ibzteammembersData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -567,6 +830,7 @@ export default class IBZEmployeeServiceBase extends EntityService {
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzemployees`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
if
(
context
.
ibzdepartment
&&
true
){
...
...
@@ -586,6 +850,21 @@ export default class IBZEmployeeServiceBase extends EntityService {
}
}
masterData
.
ibzdeptmembers
=
ibzdeptmembersData
;
let
ibzteammembersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
),
'undefined'
)){
ibzteammembersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
)
as
any
);
if
(
ibzteammembersData
&&
ibzteammembersData
.
length
&&
ibzteammembersData
.
length
>
0
){
ibzteammembersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
teammemberid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
ibzteammembers
=
ibzteammembersData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -596,6 +875,7 @@ export default class IBZEmployeeServiceBase extends EntityService {
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
let
masterData
:
any
=
{};
...
...
@@ -614,6 +894,21 @@ export default class IBZEmployeeServiceBase extends EntityService {
}
}
masterData
.
ibzdeptmembers
=
ibzdeptmembersData
;
let
ibzteammembersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
),
'undefined'
)){
ibzteammembersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
)
as
any
);
if
(
ibzteammembersData
&&
ibzteammembersData
.
length
&&
ibzteammembersData
.
length
>
0
){
ibzteammembersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
teammemberid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
ibzteammembers
=
ibzteammembersData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -624,6 +919,7 @@ export default class IBZEmployeeServiceBase extends EntityService {
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzemployees`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_ibzdeptmembers'
,
JSON
.
stringify
(
res
.
data
.
ibzdeptmembers
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
...
...
app_Web/src/service/ibzteam-member/ibzteam-member-service-base.ts
浏览文件 @
da722af9
...
...
@@ -48,6 +48,21 @@ export default class IBZTeamMemberServiceBase extends EntityService {
* @memberof IBZTeamMemberServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
ibzorganization
&&
context
.
ibzdepartment
&&
context
.
ibzemployee
&&
context
.
ibzteammember
){
return
Http
.
getInstance
().
get
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/
${
context
.
ibzteammember
}
/select`
,
isloading
);
}
if
(
context
.
ibzorganization
&&
context
.
ibzemployee
&&
context
.
ibzteammember
){
return
Http
.
getInstance
().
get
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/
${
context
.
ibzteammember
}
/select`
,
isloading
);
}
if
(
context
.
ibzdepartment
&&
context
.
ibzemployee
&&
context
.
ibzteammember
){
return
Http
.
getInstance
().
get
(
`/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/
${
context
.
ibzteammember
}
/select`
,
isloading
);
}
if
(
context
.
ibzteam
&&
context
.
ibzteammember
){
return
Http
.
getInstance
().
get
(
`/ibzteams/
${
context
.
ibzteam
}
/ibzteammembers/
${
context
.
ibzteammember
}
/select`
,
isloading
);
}
if
(
context
.
ibzemployee
&&
context
.
ibzteammember
){
return
Http
.
getInstance
().
get
(
`/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/
${
context
.
ibzteammember
}
/select`
,
isloading
);
}
return
Http
.
getInstance
().
get
(
`/ibzteammembers/
${
context
.
ibzteammember
}
/select`
,
isloading
);
}
...
...
@@ -61,6 +76,21 @@ export default class IBZTeamMemberServiceBase extends EntityService {
* @memberof IBZTeamMemberServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
ibzorganization
&&
context
.
ibzdepartment
&&
context
.
ibzemployee
&&
context
.
ibzteammember
){
return
Http
.
getInstance
().
delete
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/
${
context
.
ibzteammember
}
`
,
isloading
);
}
if
(
context
.
ibzorganization
&&
context
.
ibzemployee
&&
context
.
ibzteammember
){
return
Http
.
getInstance
().
delete
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/
${
context
.
ibzteammember
}
`
,
isloading
);
}
if
(
context
.
ibzdepartment
&&
context
.
ibzemployee
&&
context
.
ibzteammember
){
return
Http
.
getInstance
().
delete
(
`/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/
${
context
.
ibzteammember
}
`
,
isloading
);
}
if
(
context
.
ibzteam
&&
context
.
ibzteammember
){
return
Http
.
getInstance
().
delete
(
`/ibzteams/
${
context
.
ibzteam
}
/ibzteammembers/
${
context
.
ibzteammember
}
`
,
isloading
);
}
if
(
context
.
ibzemployee
&&
context
.
ibzteammember
){
return
Http
.
getInstance
().
delete
(
`/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/
${
context
.
ibzteammember
}
`
,
isloading
);
}
return
Http
.
getInstance
().
delete
(
`/ibzteammembers/
${
context
.
ibzteammember
}
`
,
isloading
);
}
...
...
@@ -74,6 +104,36 @@ export default class IBZTeamMemberServiceBase extends EntityService {
* @memberof IBZTeamMemberServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
ibzorganization
&&
context
.
ibzdepartment
&&
context
.
ibzemployee
&&
context
.
ibzteammember
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/
${
context
.
ibzteammember
}
/checkkey`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
ibzorganization
&&
context
.
ibzemployee
&&
context
.
ibzteammember
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/
${
context
.
ibzteammember
}
/checkkey`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
ibzdepartment
&&
context
.
ibzemployee
&&
context
.
ibzteammember
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/
${
context
.
ibzteammember
}
/checkkey`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
ibzteam
&&
context
.
ibzteammember
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzteams/
${
context
.
ibzteam
}
/ibzteammembers/
${
context
.
ibzteammember
}
/checkkey`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
ibzemployee
&&
context
.
ibzteammember
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/
${
context
.
ibzteammember
}
/checkkey`
,
data
,
isloading
);
return
res
;
}
return
Http
.
getInstance
().
post
(
`/ibzteammembers/
${
context
.
ibzteammember
}
/checkkey`
,
data
,
isloading
);
}
...
...
@@ -87,6 +147,26 @@ export default class IBZTeamMemberServiceBase extends EntityService {
* @memberof IBZTeamMemberServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
ibzorganization
&&
context
.
ibzdepartment
&&
context
.
ibzemployee
&&
context
.
ibzteammember
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/
${
context
.
ibzteammember
}
`
,
isloading
);
return
res
;
}
if
(
context
.
ibzorganization
&&
context
.
ibzemployee
&&
context
.
ibzteammember
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/
${
context
.
ibzteammember
}
`
,
isloading
);
return
res
;
}
if
(
context
.
ibzdepartment
&&
context
.
ibzemployee
&&
context
.
ibzteammember
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/
${
context
.
ibzteammember
}
`
,
isloading
);
return
res
;
}
if
(
context
.
ibzteam
&&
context
.
ibzteammember
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibzteams/
${
context
.
ibzteam
}
/ibzteammembers/
${
context
.
ibzteammember
}
`
,
isloading
);
return
res
;
}
if
(
context
.
ibzemployee
&&
context
.
ibzteammember
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/
${
context
.
ibzteammember
}
`
,
isloading
);
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibzteammembers/
${
context
.
ibzteammember
}
`
,
isloading
);
return
res
;
}
...
...
@@ -101,6 +181,31 @@ export default class IBZTeamMemberServiceBase extends EntityService {
* @memberof IBZTeamMemberServiceBase
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
ibzorganization
&&
context
.
ibzdepartment
&&
context
.
ibzemployee
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/getdraft`
,
isloading
);
res
.
data
.
ibzteammember
=
data
.
ibzteammember
;
return
res
;
}
if
(
context
.
ibzorganization
&&
context
.
ibzemployee
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/getdraft`
,
isloading
);
res
.
data
.
ibzteammember
=
data
.
ibzteammember
;
return
res
;
}
if
(
context
.
ibzdepartment
&&
context
.
ibzemployee
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/getdraft`
,
isloading
);
res
.
data
.
ibzteammember
=
data
.
ibzteammember
;
return
res
;
}
if
(
context
.
ibzteam
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibzteams/
${
context
.
ibzteam
}
/ibzteammembers/getdraft`
,
isloading
);
res
.
data
.
ibzteammember
=
data
.
ibzteammember
;
return
res
;
}
if
(
context
.
ibzemployee
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/getdraft`
,
isloading
);
res
.
data
.
ibzteammember
=
data
.
ibzteammember
;
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibzteammembers/getdraft`
,
isloading
);
res
.
data
.
ibzteammember
=
data
.
ibzteammember
;
return
res
;
...
...
@@ -116,6 +221,71 @@ export default class IBZTeamMemberServiceBase extends EntityService {
* @memberof IBZTeamMemberServiceBase
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
ibzorganization
&&
context
.
ibzdepartment
&&
context
.
ibzemployee
&&
true
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
ibzorganization
&&
context
.
ibzemployee
&&
true
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
ibzdepartment
&&
context
.
ibzemployee
&&
true
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
ibzteam
&&
true
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzteams/
${
context
.
ibzteam
}
/ibzteammembers`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
ibzemployee
&&
true
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers`
,
data
,
isloading
);
return
res
;
}
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
...
...
@@ -139,6 +309,36 @@ export default class IBZTeamMemberServiceBase extends EntityService {
* @memberof IBZTeamMemberServiceBase
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
ibzorganization
&&
context
.
ibzdepartment
&&
context
.
ibzemployee
&&
context
.
ibzteammember
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/
${
context
.
ibzteammember
}
/save`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
ibzorganization
&&
context
.
ibzemployee
&&
context
.
ibzteammember
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/
${
context
.
ibzteammember
}
/save`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
ibzdepartment
&&
context
.
ibzemployee
&&
context
.
ibzteammember
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/
${
context
.
ibzteammember
}
/save`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
ibzteam
&&
context
.
ibzteammember
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzteams/
${
context
.
ibzteam
}
/ibzteammembers/
${
context
.
ibzteammember
}
/save`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
ibzemployee
&&
context
.
ibzteammember
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/
${
context
.
ibzteammember
}
/save`
,
data
,
isloading
);
return
res
;
}
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzteammembers/
${
context
.
ibzteammember
}
/save`
,
data
,
isloading
);
...
...
@@ -155,6 +355,36 @@ export default class IBZTeamMemberServiceBase extends EntityService {
* @memberof IBZTeamMemberServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
ibzorganization
&&
context
.
ibzdepartment
&&
context
.
ibzemployee
&&
context
.
ibzteammember
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/
${
context
.
ibzteammember
}
`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
ibzorganization
&&
context
.
ibzemployee
&&
context
.
ibzteammember
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/
${
context
.
ibzteammember
}
`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
ibzdepartment
&&
context
.
ibzemployee
&&
context
.
ibzteammember
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/
${
context
.
ibzteammember
}
`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
ibzteam
&&
context
.
ibzteammember
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/ibzteams/
${
context
.
ibzteam
}
/ibzteammembers/
${
context
.
ibzteammember
}
`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
ibzemployee
&&
context
.
ibzteammember
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/
${
context
.
ibzteammember
}
`
,
data
,
isloading
);
return
res
;
}
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/ibzteammembers/
${
context
.
ibzteammember
}
`
,
data
,
isloading
);
...
...
@@ -171,6 +401,26 @@ export default class IBZTeamMemberServiceBase extends EntityService {
* @memberof IBZTeamMemberServiceBase
*/
public
async
FetchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
ibzorganization
&&
context
.
ibzdepartment
&&
context
.
ibzemployee
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/fetchdefault`
,
tempData
,
isloading
);
}
if
(
context
.
ibzorganization
&&
context
.
ibzemployee
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/ibzorganizations/
${
context
.
ibzorganization
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/fetchdefault`
,
tempData
,
isloading
);
}
if
(
context
.
ibzdepartment
&&
context
.
ibzemployee
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/ibzdepartments/
${
context
.
ibzdepartment
}
/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/fetchdefault`
,
tempData
,
isloading
);
}
if
(
context
.
ibzteam
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/ibzteams/
${
context
.
ibzteam
}
/ibzteammembers/fetchdefault`
,
tempData
,
isloading
);
}
if
(
context
.
ibzemployee
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/ibzemployees/
${
context
.
ibzemployee
}
/ibzteammembers/fetchdefault`
,
tempData
,
isloading
);
}
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/ibzteammembers/fetchdefault`
,
tempData
,
isloading
);
}
...
...
app_Web/src/service/ibzteam/ibzteam-service-base.ts
浏览文件 @
da722af9
...
...
@@ -75,6 +75,21 @@ export default class IBZTeamServiceBase extends EntityService {
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
ibzteammembersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
),
'undefined'
)){
ibzteammembersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
)
as
any
);
if
(
ibzteammembersData
&&
ibzteammembersData
.
length
&&
ibzteammembersData
.
length
>
0
){
ibzteammembersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
teammemberid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
ibzteammembers
=
ibzteammembersData
;
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
...
...
@@ -84,6 +99,7 @@ export default class IBZTeamServiceBase extends EntityService {
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzteams`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
...
...
@@ -98,8 +114,24 @@ export default class IBZTeamServiceBase extends EntityService {
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
ibzteammembersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
),
'undefined'
)){
ibzteammembersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
)
as
any
);
if
(
ibzteammembersData
&&
ibzteammembersData
.
length
&&
ibzteammembersData
.
length
>
0
){
ibzteammembersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
teammemberid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
ibzteammembers
=
ibzteammembersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/ibzteams/
${
context
.
ibzteam
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
...
...
@@ -127,6 +159,7 @@ export default class IBZTeamServiceBase extends EntityService {
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibzteams/
${
context
.
ibzteam
}
`
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
...
...
@@ -141,8 +174,24 @@ export default class IBZTeamServiceBase extends EntityService {
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
ibzteammembersData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
),
'undefined'
)){
ibzteammembersData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
)
as
any
);
if
(
ibzteammembersData
&&
ibzteammembersData
.
length
&&
ibzteammembersData
.
length
>
0
){
ibzteammembersData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
teammemberid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
ibzteammembers
=
ibzteammembersData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibzteams/
${
context
.
ibzteam
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
...
...
@@ -158,6 +207,7 @@ export default class IBZTeamServiceBase extends EntityService {
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibzteams/getdraft`
,
isloading
);
res
.
data
.
ibzteam
=
data
.
ibzteam
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_ibzteammembers'
,
JSON
.
stringify
(
res
.
data
.
ibzteammembers
));
return
res
;
}
...
...
app_Web/src/widgets/ibzteam/main-form/main-form-base.vue
浏览文件 @
da722af9
...
...
@@ -41,6 +41,7 @@
paramItem=
'ibzteam'
:parentdata=
'
{"srfparentdefname":"TEAMID","srfparentdename":"IBZTEAM","SRFPARENTTYPE":"DER1N","srfparentmode":"DER1N_IBZTEAMMEMBER_IBZTEAM_TEAMID","SRFDER1NID":"DER1N_IBZTEAMMEMBER_IBZTEAM_TEAMID"}'
:parameters="[
{ pathName: 'ibzemployees', parameterName: 'ibzemployee' },
]"
:context="context"
:viewparams="viewparams"
...
...
ibzrt-provider/ibzrt-provider-api/src/main/java/cn/ibizlab/api/rest/IBZTeamMemberResource.java
浏览文件 @
da722af9
...
...
@@ -147,5 +147,610 @@ public class IBZTeamMemberResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
ibzteammemberMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
@ApiOperation
(
value
=
"根据人员删除组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据人员删除组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/ibzemployees/{ibzemployee_id}/ibzteammembers/{ibzteammember_id}"
)
public
ResponseEntity
<
Boolean
>
removeByIBZEmployee
(
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@PathVariable
(
"ibzteammember_id"
)
String
ibzteammember_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzteammemberService
.
remove
(
ibzteammember_id
));
}
@ApiOperation
(
value
=
"根据人员批量删除组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据人员批量删除组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/ibzemployees/{ibzemployee_id}/ibzteammembers/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatchByIBZEmployee
(
@RequestBody
List
<
String
>
ids
)
{
ibzteammemberService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据人员检查组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据人员检查组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzemployees/{ibzemployee_id}/ibzteammembers/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKeyByIBZEmployee
(
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
IBZTeamMemberDTO
ibzteammemberdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzteammemberService
.
checkKey
(
ibzteammemberMapping
.
toDomain
(
ibzteammemberdto
)));
}
@ApiOperation
(
value
=
"根据人员获取组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据人员获取组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzemployees/{ibzemployee_id}/ibzteammembers/{ibzteammember_id}"
)
public
ResponseEntity
<
IBZTeamMemberDTO
>
getByIBZEmployee
(
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@PathVariable
(
"ibzteammember_id"
)
String
ibzteammember_id
)
{
IBZTeamMember
domain
=
ibzteammemberService
.
get
(
ibzteammember_id
);
IBZTeamMemberDTO
dto
=
ibzteammemberMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"根据人员获取组成员草稿"
,
tags
=
{
"组成员"
},
notes
=
"根据人员获取组成员草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzemployees/{ibzemployee_id}/ibzteammembers/getdraft"
)
public
ResponseEntity
<
IBZTeamMemberDTO
>
getDraftByIBZEmployee
(
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
)
{
IBZTeamMember
domain
=
new
IBZTeamMember
();
domain
.
setUserid
(
ibzemployee_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzteammemberMapping
.
toDto
(
ibzteammemberService
.
getDraft
(
domain
)));
}
@ApiOperation
(
value
=
"根据人员建立组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据人员建立组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzemployees/{ibzemployee_id}/ibzteammembers"
)
public
ResponseEntity
<
IBZTeamMemberDTO
>
createByIBZEmployee
(
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
IBZTeamMemberDTO
ibzteammemberdto
)
{
IBZTeamMember
domain
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdto
);
domain
.
setUserid
(
ibzemployee_id
);
ibzteammemberService
.
create
(
domain
);
IBZTeamMemberDTO
dto
=
ibzteammemberMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"根据人员批量建立组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据人员批量建立组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzemployees/{ibzemployee_id}/ibzteammembers/batch"
)
public
ResponseEntity
<
Boolean
>
createBatchByIBZEmployee
(
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
List
<
IBZTeamMemberDTO
>
ibzteammemberdtos
)
{
List
<
IBZTeamMember
>
domainlist
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdtos
);
for
(
IBZTeamMember
domain:
domainlist
){
domain
.
setUserid
(
ibzemployee_id
);
}
ibzteammemberService
.
createBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据人员保存组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据人员保存组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzemployees/{ibzemployee_id}/ibzteammembers/save"
)
public
ResponseEntity
<
Boolean
>
saveByIBZEmployee
(
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
IBZTeamMemberDTO
ibzteammemberdto
)
{
IBZTeamMember
domain
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdto
);
domain
.
setUserid
(
ibzemployee_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzteammemberService
.
save
(
domain
));
}
@ApiOperation
(
value
=
"根据人员批量保存组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据人员批量保存组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzemployees/{ibzemployee_id}/ibzteammembers/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatchByIBZEmployee
(
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
List
<
IBZTeamMemberDTO
>
ibzteammemberdtos
)
{
List
<
IBZTeamMember
>
domainlist
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdtos
);
for
(
IBZTeamMember
domain:
domainlist
){
domain
.
setUserid
(
ibzemployee_id
);
}
ibzteammemberService
.
saveBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据人员更新组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据人员更新组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/ibzemployees/{ibzemployee_id}/ibzteammembers/{ibzteammember_id}"
)
public
ResponseEntity
<
IBZTeamMemberDTO
>
updateByIBZEmployee
(
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@PathVariable
(
"ibzteammember_id"
)
String
ibzteammember_id
,
@RequestBody
IBZTeamMemberDTO
ibzteammemberdto
)
{
IBZTeamMember
domain
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdto
);
domain
.
setUserid
(
ibzemployee_id
);
domain
.
setTeammemberid
(
ibzteammember_id
);
ibzteammemberService
.
update
(
domain
);
IBZTeamMemberDTO
dto
=
ibzteammemberMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"根据人员批量更新组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据人员批量更新组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/ibzemployees/{ibzemployee_id}/ibzteammembers/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatchByIBZEmployee
(
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
List
<
IBZTeamMemberDTO
>
ibzteammemberdtos
)
{
List
<
IBZTeamMember
>
domainlist
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdtos
);
for
(
IBZTeamMember
domain:
domainlist
){
domain
.
setUserid
(
ibzemployee_id
);
}
ibzteammemberService
.
updateBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据人员获取DEFAULT"
,
tags
=
{
"组成员"
}
,
notes
=
"根据人员获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzemployees/{ibzemployee_id}/ibzteammembers/fetchdefault"
)
public
ResponseEntity
<
List
<
IBZTeamMemberDTO
>>
fetchIBZTeamMemberDefaultByIBZEmployee
(
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
IBZTeamMemberSearchContext
context
)
{
context
.
setN_userid_eq
(
ibzemployee_id
);
Page
<
IBZTeamMember
>
domains
=
ibzteammemberService
.
searchDefault
(
context
)
;
List
<
IBZTeamMemberDTO
>
list
=
ibzteammemberMapping
.
toDto
(
domains
.
getContent
());
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
header
(
"x-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageNumber
()))
.
header
(
"x-per-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageSize
()))
.
header
(
"x-total"
,
String
.
valueOf
(
domains
.
getTotalElements
()))
.
body
(
list
);
}
@ApiOperation
(
value
=
"根据人员查询DEFAULT"
,
tags
=
{
"组成员"
}
,
notes
=
"根据人员查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzemployees/{ibzemployee_id}/ibzteammembers/searchdefault"
)
public
ResponseEntity
<
Page
<
IBZTeamMemberDTO
>>
searchIBZTeamMemberDefaultByIBZEmployee
(
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
IBZTeamMemberSearchContext
context
)
{
context
.
setN_userid_eq
(
ibzemployee_id
);
Page
<
IBZTeamMember
>
domains
=
ibzteammemberService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
ibzteammemberMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
@ApiOperation
(
value
=
"根据组删除组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据组删除组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/ibzteams/{ibzteam_id}/ibzteammembers/{ibzteammember_id}"
)
public
ResponseEntity
<
Boolean
>
removeByIBZTeam
(
@PathVariable
(
"ibzteam_id"
)
String
ibzteam_id
,
@PathVariable
(
"ibzteammember_id"
)
String
ibzteammember_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzteammemberService
.
remove
(
ibzteammember_id
));
}
@ApiOperation
(
value
=
"根据组批量删除组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据组批量删除组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/ibzteams/{ibzteam_id}/ibzteammembers/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatchByIBZTeam
(
@RequestBody
List
<
String
>
ids
)
{
ibzteammemberService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据组检查组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据组检查组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzteams/{ibzteam_id}/ibzteammembers/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKeyByIBZTeam
(
@PathVariable
(
"ibzteam_id"
)
String
ibzteam_id
,
@RequestBody
IBZTeamMemberDTO
ibzteammemberdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzteammemberService
.
checkKey
(
ibzteammemberMapping
.
toDomain
(
ibzteammemberdto
)));
}
@ApiOperation
(
value
=
"根据组获取组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据组获取组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzteams/{ibzteam_id}/ibzteammembers/{ibzteammember_id}"
)
public
ResponseEntity
<
IBZTeamMemberDTO
>
getByIBZTeam
(
@PathVariable
(
"ibzteam_id"
)
String
ibzteam_id
,
@PathVariable
(
"ibzteammember_id"
)
String
ibzteammember_id
)
{
IBZTeamMember
domain
=
ibzteammemberService
.
get
(
ibzteammember_id
);
IBZTeamMemberDTO
dto
=
ibzteammemberMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"根据组获取组成员草稿"
,
tags
=
{
"组成员"
},
notes
=
"根据组获取组成员草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzteams/{ibzteam_id}/ibzteammembers/getdraft"
)
public
ResponseEntity
<
IBZTeamMemberDTO
>
getDraftByIBZTeam
(
@PathVariable
(
"ibzteam_id"
)
String
ibzteam_id
)
{
IBZTeamMember
domain
=
new
IBZTeamMember
();
domain
.
setTeamid
(
ibzteam_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzteammemberMapping
.
toDto
(
ibzteammemberService
.
getDraft
(
domain
)));
}
@ApiOperation
(
value
=
"根据组建立组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据组建立组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzteams/{ibzteam_id}/ibzteammembers"
)
public
ResponseEntity
<
IBZTeamMemberDTO
>
createByIBZTeam
(
@PathVariable
(
"ibzteam_id"
)
String
ibzteam_id
,
@RequestBody
IBZTeamMemberDTO
ibzteammemberdto
)
{
IBZTeamMember
domain
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdto
);
domain
.
setTeamid
(
ibzteam_id
);
ibzteammemberService
.
create
(
domain
);
IBZTeamMemberDTO
dto
=
ibzteammemberMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"根据组批量建立组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据组批量建立组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzteams/{ibzteam_id}/ibzteammembers/batch"
)
public
ResponseEntity
<
Boolean
>
createBatchByIBZTeam
(
@PathVariable
(
"ibzteam_id"
)
String
ibzteam_id
,
@RequestBody
List
<
IBZTeamMemberDTO
>
ibzteammemberdtos
)
{
List
<
IBZTeamMember
>
domainlist
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdtos
);
for
(
IBZTeamMember
domain:
domainlist
){
domain
.
setTeamid
(
ibzteam_id
);
}
ibzteammemberService
.
createBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据组保存组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据组保存组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzteams/{ibzteam_id}/ibzteammembers/save"
)
public
ResponseEntity
<
Boolean
>
saveByIBZTeam
(
@PathVariable
(
"ibzteam_id"
)
String
ibzteam_id
,
@RequestBody
IBZTeamMemberDTO
ibzteammemberdto
)
{
IBZTeamMember
domain
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdto
);
domain
.
setTeamid
(
ibzteam_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzteammemberService
.
save
(
domain
));
}
@ApiOperation
(
value
=
"根据组批量保存组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据组批量保存组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzteams/{ibzteam_id}/ibzteammembers/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatchByIBZTeam
(
@PathVariable
(
"ibzteam_id"
)
String
ibzteam_id
,
@RequestBody
List
<
IBZTeamMemberDTO
>
ibzteammemberdtos
)
{
List
<
IBZTeamMember
>
domainlist
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdtos
);
for
(
IBZTeamMember
domain:
domainlist
){
domain
.
setTeamid
(
ibzteam_id
);
}
ibzteammemberService
.
saveBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据组更新组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据组更新组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/ibzteams/{ibzteam_id}/ibzteammembers/{ibzteammember_id}"
)
public
ResponseEntity
<
IBZTeamMemberDTO
>
updateByIBZTeam
(
@PathVariable
(
"ibzteam_id"
)
String
ibzteam_id
,
@PathVariable
(
"ibzteammember_id"
)
String
ibzteammember_id
,
@RequestBody
IBZTeamMemberDTO
ibzteammemberdto
)
{
IBZTeamMember
domain
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdto
);
domain
.
setTeamid
(
ibzteam_id
);
domain
.
setTeammemberid
(
ibzteammember_id
);
ibzteammemberService
.
update
(
domain
);
IBZTeamMemberDTO
dto
=
ibzteammemberMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"根据组批量更新组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据组批量更新组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/ibzteams/{ibzteam_id}/ibzteammembers/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatchByIBZTeam
(
@PathVariable
(
"ibzteam_id"
)
String
ibzteam_id
,
@RequestBody
List
<
IBZTeamMemberDTO
>
ibzteammemberdtos
)
{
List
<
IBZTeamMember
>
domainlist
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdtos
);
for
(
IBZTeamMember
domain:
domainlist
){
domain
.
setTeamid
(
ibzteam_id
);
}
ibzteammemberService
.
updateBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据组获取DEFAULT"
,
tags
=
{
"组成员"
}
,
notes
=
"根据组获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzteams/{ibzteam_id}/ibzteammembers/fetchdefault"
)
public
ResponseEntity
<
List
<
IBZTeamMemberDTO
>>
fetchIBZTeamMemberDefaultByIBZTeam
(
@PathVariable
(
"ibzteam_id"
)
String
ibzteam_id
,
IBZTeamMemberSearchContext
context
)
{
context
.
setN_teamid_eq
(
ibzteam_id
);
Page
<
IBZTeamMember
>
domains
=
ibzteammemberService
.
searchDefault
(
context
)
;
List
<
IBZTeamMemberDTO
>
list
=
ibzteammemberMapping
.
toDto
(
domains
.
getContent
());
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
header
(
"x-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageNumber
()))
.
header
(
"x-per-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageSize
()))
.
header
(
"x-total"
,
String
.
valueOf
(
domains
.
getTotalElements
()))
.
body
(
list
);
}
@ApiOperation
(
value
=
"根据组查询DEFAULT"
,
tags
=
{
"组成员"
}
,
notes
=
"根据组查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzteams/{ibzteam_id}/ibzteammembers/searchdefault"
)
public
ResponseEntity
<
Page
<
IBZTeamMemberDTO
>>
searchIBZTeamMemberDefaultByIBZTeam
(
@PathVariable
(
"ibzteam_id"
)
String
ibzteam_id
,
@RequestBody
IBZTeamMemberSearchContext
context
)
{
context
.
setN_teamid_eq
(
ibzteam_id
);
Page
<
IBZTeamMember
>
domains
=
ibzteammemberService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
ibzteammemberMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
@ApiOperation
(
value
=
"根据部门人员删除组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据部门人员删除组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/{ibzteammember_id}"
)
public
ResponseEntity
<
Boolean
>
removeByIBZDepartmentIBZEmployee
(
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@PathVariable
(
"ibzteammember_id"
)
String
ibzteammember_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzteammemberService
.
remove
(
ibzteammember_id
));
}
@ApiOperation
(
value
=
"根据部门人员批量删除组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据部门人员批量删除组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatchByIBZDepartmentIBZEmployee
(
@RequestBody
List
<
String
>
ids
)
{
ibzteammemberService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据部门人员检查组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据部门人员检查组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKeyByIBZDepartmentIBZEmployee
(
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
IBZTeamMemberDTO
ibzteammemberdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzteammemberService
.
checkKey
(
ibzteammemberMapping
.
toDomain
(
ibzteammemberdto
)));
}
@ApiOperation
(
value
=
"根据部门人员获取组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据部门人员获取组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/{ibzteammember_id}"
)
public
ResponseEntity
<
IBZTeamMemberDTO
>
getByIBZDepartmentIBZEmployee
(
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@PathVariable
(
"ibzteammember_id"
)
String
ibzteammember_id
)
{
IBZTeamMember
domain
=
ibzteammemberService
.
get
(
ibzteammember_id
);
IBZTeamMemberDTO
dto
=
ibzteammemberMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"根据部门人员获取组成员草稿"
,
tags
=
{
"组成员"
},
notes
=
"根据部门人员获取组成员草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/getdraft"
)
public
ResponseEntity
<
IBZTeamMemberDTO
>
getDraftByIBZDepartmentIBZEmployee
(
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
)
{
IBZTeamMember
domain
=
new
IBZTeamMember
();
domain
.
setUserid
(
ibzemployee_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzteammemberMapping
.
toDto
(
ibzteammemberService
.
getDraft
(
domain
)));
}
@ApiOperation
(
value
=
"根据部门人员建立组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据部门人员建立组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers"
)
public
ResponseEntity
<
IBZTeamMemberDTO
>
createByIBZDepartmentIBZEmployee
(
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
IBZTeamMemberDTO
ibzteammemberdto
)
{
IBZTeamMember
domain
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdto
);
domain
.
setUserid
(
ibzemployee_id
);
ibzteammemberService
.
create
(
domain
);
IBZTeamMemberDTO
dto
=
ibzteammemberMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"根据部门人员批量建立组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据部门人员批量建立组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/batch"
)
public
ResponseEntity
<
Boolean
>
createBatchByIBZDepartmentIBZEmployee
(
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
List
<
IBZTeamMemberDTO
>
ibzteammemberdtos
)
{
List
<
IBZTeamMember
>
domainlist
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdtos
);
for
(
IBZTeamMember
domain:
domainlist
){
domain
.
setUserid
(
ibzemployee_id
);
}
ibzteammemberService
.
createBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据部门人员保存组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据部门人员保存组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/save"
)
public
ResponseEntity
<
Boolean
>
saveByIBZDepartmentIBZEmployee
(
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
IBZTeamMemberDTO
ibzteammemberdto
)
{
IBZTeamMember
domain
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdto
);
domain
.
setUserid
(
ibzemployee_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzteammemberService
.
save
(
domain
));
}
@ApiOperation
(
value
=
"根据部门人员批量保存组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据部门人员批量保存组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatchByIBZDepartmentIBZEmployee
(
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
List
<
IBZTeamMemberDTO
>
ibzteammemberdtos
)
{
List
<
IBZTeamMember
>
domainlist
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdtos
);
for
(
IBZTeamMember
domain:
domainlist
){
domain
.
setUserid
(
ibzemployee_id
);
}
ibzteammemberService
.
saveBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据部门人员更新组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据部门人员更新组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/{ibzteammember_id}"
)
public
ResponseEntity
<
IBZTeamMemberDTO
>
updateByIBZDepartmentIBZEmployee
(
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@PathVariable
(
"ibzteammember_id"
)
String
ibzteammember_id
,
@RequestBody
IBZTeamMemberDTO
ibzteammemberdto
)
{
IBZTeamMember
domain
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdto
);
domain
.
setUserid
(
ibzemployee_id
);
domain
.
setTeammemberid
(
ibzteammember_id
);
ibzteammemberService
.
update
(
domain
);
IBZTeamMemberDTO
dto
=
ibzteammemberMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"根据部门人员批量更新组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据部门人员批量更新组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatchByIBZDepartmentIBZEmployee
(
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
List
<
IBZTeamMemberDTO
>
ibzteammemberdtos
)
{
List
<
IBZTeamMember
>
domainlist
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdtos
);
for
(
IBZTeamMember
domain:
domainlist
){
domain
.
setUserid
(
ibzemployee_id
);
}
ibzteammemberService
.
updateBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据部门人员获取DEFAULT"
,
tags
=
{
"组成员"
}
,
notes
=
"根据部门人员获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/fetchdefault"
)
public
ResponseEntity
<
List
<
IBZTeamMemberDTO
>>
fetchIBZTeamMemberDefaultByIBZDepartmentIBZEmployee
(
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
IBZTeamMemberSearchContext
context
)
{
context
.
setN_userid_eq
(
ibzemployee_id
);
Page
<
IBZTeamMember
>
domains
=
ibzteammemberService
.
searchDefault
(
context
)
;
List
<
IBZTeamMemberDTO
>
list
=
ibzteammemberMapping
.
toDto
(
domains
.
getContent
());
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
header
(
"x-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageNumber
()))
.
header
(
"x-per-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageSize
()))
.
header
(
"x-total"
,
String
.
valueOf
(
domains
.
getTotalElements
()))
.
body
(
list
);
}
@ApiOperation
(
value
=
"根据部门人员查询DEFAULT"
,
tags
=
{
"组成员"
}
,
notes
=
"根据部门人员查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/searchdefault"
)
public
ResponseEntity
<
Page
<
IBZTeamMemberDTO
>>
searchIBZTeamMemberDefaultByIBZDepartmentIBZEmployee
(
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
IBZTeamMemberSearchContext
context
)
{
context
.
setN_userid_eq
(
ibzemployee_id
);
Page
<
IBZTeamMember
>
domains
=
ibzteammemberService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
ibzteammemberMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
@ApiOperation
(
value
=
"根据单位机构人员删除组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据单位机构人员删除组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/{ibzteammember_id}"
)
public
ResponseEntity
<
Boolean
>
removeByIBZOrganizationIBZEmployee
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@PathVariable
(
"ibzteammember_id"
)
String
ibzteammember_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzteammemberService
.
remove
(
ibzteammember_id
));
}
@ApiOperation
(
value
=
"根据单位机构人员批量删除组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据单位机构人员批量删除组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatchByIBZOrganizationIBZEmployee
(
@RequestBody
List
<
String
>
ids
)
{
ibzteammemberService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据单位机构人员检查组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据单位机构人员检查组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKeyByIBZOrganizationIBZEmployee
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
IBZTeamMemberDTO
ibzteammemberdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzteammemberService
.
checkKey
(
ibzteammemberMapping
.
toDomain
(
ibzteammemberdto
)));
}
@ApiOperation
(
value
=
"根据单位机构人员获取组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据单位机构人员获取组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/{ibzteammember_id}"
)
public
ResponseEntity
<
IBZTeamMemberDTO
>
getByIBZOrganizationIBZEmployee
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@PathVariable
(
"ibzteammember_id"
)
String
ibzteammember_id
)
{
IBZTeamMember
domain
=
ibzteammemberService
.
get
(
ibzteammember_id
);
IBZTeamMemberDTO
dto
=
ibzteammemberMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"根据单位机构人员获取组成员草稿"
,
tags
=
{
"组成员"
},
notes
=
"根据单位机构人员获取组成员草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/getdraft"
)
public
ResponseEntity
<
IBZTeamMemberDTO
>
getDraftByIBZOrganizationIBZEmployee
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
)
{
IBZTeamMember
domain
=
new
IBZTeamMember
();
domain
.
setUserid
(
ibzemployee_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzteammemberMapping
.
toDto
(
ibzteammemberService
.
getDraft
(
domain
)));
}
@ApiOperation
(
value
=
"根据单位机构人员建立组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据单位机构人员建立组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzteammembers"
)
public
ResponseEntity
<
IBZTeamMemberDTO
>
createByIBZOrganizationIBZEmployee
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
IBZTeamMemberDTO
ibzteammemberdto
)
{
IBZTeamMember
domain
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdto
);
domain
.
setUserid
(
ibzemployee_id
);
ibzteammemberService
.
create
(
domain
);
IBZTeamMemberDTO
dto
=
ibzteammemberMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"根据单位机构人员批量建立组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据单位机构人员批量建立组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/batch"
)
public
ResponseEntity
<
Boolean
>
createBatchByIBZOrganizationIBZEmployee
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
List
<
IBZTeamMemberDTO
>
ibzteammemberdtos
)
{
List
<
IBZTeamMember
>
domainlist
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdtos
);
for
(
IBZTeamMember
domain:
domainlist
){
domain
.
setUserid
(
ibzemployee_id
);
}
ibzteammemberService
.
createBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据单位机构人员保存组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据单位机构人员保存组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/save"
)
public
ResponseEntity
<
Boolean
>
saveByIBZOrganizationIBZEmployee
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
IBZTeamMemberDTO
ibzteammemberdto
)
{
IBZTeamMember
domain
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdto
);
domain
.
setUserid
(
ibzemployee_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzteammemberService
.
save
(
domain
));
}
@ApiOperation
(
value
=
"根据单位机构人员批量保存组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据单位机构人员批量保存组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatchByIBZOrganizationIBZEmployee
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
List
<
IBZTeamMemberDTO
>
ibzteammemberdtos
)
{
List
<
IBZTeamMember
>
domainlist
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdtos
);
for
(
IBZTeamMember
domain:
domainlist
){
domain
.
setUserid
(
ibzemployee_id
);
}
ibzteammemberService
.
saveBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据单位机构人员更新组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据单位机构人员更新组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/{ibzteammember_id}"
)
public
ResponseEntity
<
IBZTeamMemberDTO
>
updateByIBZOrganizationIBZEmployee
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@PathVariable
(
"ibzteammember_id"
)
String
ibzteammember_id
,
@RequestBody
IBZTeamMemberDTO
ibzteammemberdto
)
{
IBZTeamMember
domain
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdto
);
domain
.
setUserid
(
ibzemployee_id
);
domain
.
setTeammemberid
(
ibzteammember_id
);
ibzteammemberService
.
update
(
domain
);
IBZTeamMemberDTO
dto
=
ibzteammemberMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"根据单位机构人员批量更新组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据单位机构人员批量更新组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatchByIBZOrganizationIBZEmployee
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
List
<
IBZTeamMemberDTO
>
ibzteammemberdtos
)
{
List
<
IBZTeamMember
>
domainlist
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdtos
);
for
(
IBZTeamMember
domain:
domainlist
){
domain
.
setUserid
(
ibzemployee_id
);
}
ibzteammemberService
.
updateBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据单位机构人员获取DEFAULT"
,
tags
=
{
"组成员"
}
,
notes
=
"根据单位机构人员获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/fetchdefault"
)
public
ResponseEntity
<
List
<
IBZTeamMemberDTO
>>
fetchIBZTeamMemberDefaultByIBZOrganizationIBZEmployee
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
IBZTeamMemberSearchContext
context
)
{
context
.
setN_userid_eq
(
ibzemployee_id
);
Page
<
IBZTeamMember
>
domains
=
ibzteammemberService
.
searchDefault
(
context
)
;
List
<
IBZTeamMemberDTO
>
list
=
ibzteammemberMapping
.
toDto
(
domains
.
getContent
());
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
header
(
"x-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageNumber
()))
.
header
(
"x-per-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageSize
()))
.
header
(
"x-total"
,
String
.
valueOf
(
domains
.
getTotalElements
()))
.
body
(
list
);
}
@ApiOperation
(
value
=
"根据单位机构人员查询DEFAULT"
,
tags
=
{
"组成员"
}
,
notes
=
"根据单位机构人员查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/searchdefault"
)
public
ResponseEntity
<
Page
<
IBZTeamMemberDTO
>>
searchIBZTeamMemberDefaultByIBZOrganizationIBZEmployee
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
IBZTeamMemberSearchContext
context
)
{
context
.
setN_userid_eq
(
ibzemployee_id
);
Page
<
IBZTeamMember
>
domains
=
ibzteammemberService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
ibzteammemberMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
@ApiOperation
(
value
=
"根据单位机构部门人员删除组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据单位机构部门人员删除组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/{ibzteammember_id}"
)
public
ResponseEntity
<
Boolean
>
removeByIBZOrganizationIBZDepartmentIBZEmployee
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@PathVariable
(
"ibzteammember_id"
)
String
ibzteammember_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzteammemberService
.
remove
(
ibzteammember_id
));
}
@ApiOperation
(
value
=
"根据单位机构部门人员批量删除组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据单位机构部门人员批量删除组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatchByIBZOrganizationIBZDepartmentIBZEmployee
(
@RequestBody
List
<
String
>
ids
)
{
ibzteammemberService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据单位机构部门人员检查组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据单位机构部门人员检查组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKeyByIBZOrganizationIBZDepartmentIBZEmployee
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
IBZTeamMemberDTO
ibzteammemberdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzteammemberService
.
checkKey
(
ibzteammemberMapping
.
toDomain
(
ibzteammemberdto
)));
}
@ApiOperation
(
value
=
"根据单位机构部门人员获取组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据单位机构部门人员获取组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/{ibzteammember_id}"
)
public
ResponseEntity
<
IBZTeamMemberDTO
>
getByIBZOrganizationIBZDepartmentIBZEmployee
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@PathVariable
(
"ibzteammember_id"
)
String
ibzteammember_id
)
{
IBZTeamMember
domain
=
ibzteammemberService
.
get
(
ibzteammember_id
);
IBZTeamMemberDTO
dto
=
ibzteammemberMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"根据单位机构部门人员获取组成员草稿"
,
tags
=
{
"组成员"
},
notes
=
"根据单位机构部门人员获取组成员草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/getdraft"
)
public
ResponseEntity
<
IBZTeamMemberDTO
>
getDraftByIBZOrganizationIBZDepartmentIBZEmployee
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
)
{
IBZTeamMember
domain
=
new
IBZTeamMember
();
domain
.
setUserid
(
ibzemployee_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzteammemberMapping
.
toDto
(
ibzteammemberService
.
getDraft
(
domain
)));
}
@ApiOperation
(
value
=
"根据单位机构部门人员建立组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据单位机构部门人员建立组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers"
)
public
ResponseEntity
<
IBZTeamMemberDTO
>
createByIBZOrganizationIBZDepartmentIBZEmployee
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
IBZTeamMemberDTO
ibzteammemberdto
)
{
IBZTeamMember
domain
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdto
);
domain
.
setUserid
(
ibzemployee_id
);
ibzteammemberService
.
create
(
domain
);
IBZTeamMemberDTO
dto
=
ibzteammemberMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"根据单位机构部门人员批量建立组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据单位机构部门人员批量建立组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/batch"
)
public
ResponseEntity
<
Boolean
>
createBatchByIBZOrganizationIBZDepartmentIBZEmployee
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
List
<
IBZTeamMemberDTO
>
ibzteammemberdtos
)
{
List
<
IBZTeamMember
>
domainlist
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdtos
);
for
(
IBZTeamMember
domain:
domainlist
){
domain
.
setUserid
(
ibzemployee_id
);
}
ibzteammemberService
.
createBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据单位机构部门人员保存组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据单位机构部门人员保存组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/save"
)
public
ResponseEntity
<
Boolean
>
saveByIBZOrganizationIBZDepartmentIBZEmployee
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
IBZTeamMemberDTO
ibzteammemberdto
)
{
IBZTeamMember
domain
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdto
);
domain
.
setUserid
(
ibzemployee_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzteammemberService
.
save
(
domain
));
}
@ApiOperation
(
value
=
"根据单位机构部门人员批量保存组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据单位机构部门人员批量保存组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatchByIBZOrganizationIBZDepartmentIBZEmployee
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
List
<
IBZTeamMemberDTO
>
ibzteammemberdtos
)
{
List
<
IBZTeamMember
>
domainlist
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdtos
);
for
(
IBZTeamMember
domain:
domainlist
){
domain
.
setUserid
(
ibzemployee_id
);
}
ibzteammemberService
.
saveBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据单位机构部门人员更新组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据单位机构部门人员更新组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/{ibzteammember_id}"
)
public
ResponseEntity
<
IBZTeamMemberDTO
>
updateByIBZOrganizationIBZDepartmentIBZEmployee
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@PathVariable
(
"ibzteammember_id"
)
String
ibzteammember_id
,
@RequestBody
IBZTeamMemberDTO
ibzteammemberdto
)
{
IBZTeamMember
domain
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdto
);
domain
.
setUserid
(
ibzemployee_id
);
domain
.
setTeammemberid
(
ibzteammember_id
);
ibzteammemberService
.
update
(
domain
);
IBZTeamMemberDTO
dto
=
ibzteammemberMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"根据单位机构部门人员批量更新组成员"
,
tags
=
{
"组成员"
},
notes
=
"根据单位机构部门人员批量更新组成员"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatchByIBZOrganizationIBZDepartmentIBZEmployee
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
List
<
IBZTeamMemberDTO
>
ibzteammemberdtos
)
{
List
<
IBZTeamMember
>
domainlist
=
ibzteammemberMapping
.
toDomain
(
ibzteammemberdtos
);
for
(
IBZTeamMember
domain:
domainlist
){
domain
.
setUserid
(
ibzemployee_id
);
}
ibzteammemberService
.
updateBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"根据单位机构部门人员获取DEFAULT"
,
tags
=
{
"组成员"
}
,
notes
=
"根据单位机构部门人员获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/fetchdefault"
)
public
ResponseEntity
<
List
<
IBZTeamMemberDTO
>>
fetchIBZTeamMemberDefaultByIBZOrganizationIBZDepartmentIBZEmployee
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
IBZTeamMemberSearchContext
context
)
{
context
.
setN_userid_eq
(
ibzemployee_id
);
Page
<
IBZTeamMember
>
domains
=
ibzteammemberService
.
searchDefault
(
context
)
;
List
<
IBZTeamMemberDTO
>
list
=
ibzteammemberMapping
.
toDto
(
domains
.
getContent
());
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
header
(
"x-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageNumber
()))
.
header
(
"x-per-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageSize
()))
.
header
(
"x-total"
,
String
.
valueOf
(
domains
.
getTotalElements
()))
.
body
(
list
);
}
@ApiOperation
(
value
=
"根据单位机构部门人员查询DEFAULT"
,
tags
=
{
"组成员"
}
,
notes
=
"根据单位机构部门人员查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}/ibzemployees/{ibzemployee_id}/ibzteammembers/searchdefault"
)
public
ResponseEntity
<
Page
<
IBZTeamMemberDTO
>>
searchIBZTeamMemberDefaultByIBZOrganizationIBZDepartmentIBZEmployee
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@PathVariable
(
"ibzemployee_id"
)
String
ibzemployee_id
,
@RequestBody
IBZTeamMemberSearchContext
context
)
{
context
.
setN_userid_eq
(
ibzemployee_id
);
Page
<
IBZTeamMember
>
domains
=
ibzteammemberService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
ibzteammemberMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录