Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
iBiz商业中心
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz商业套件
iBiz商业中心
提交
1fe4efc2
提交
1fe4efc2
编写于
11月 04, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xignzi006 发布系统代码 [Spring Boot]
上级
c718563d
变更
2
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
258 行增加
和
0 行删除
+258
-0
Hr_skillResource.java
...n/ibizlab/businesscentral/core/rest/Hr_skillResource.java
+129
-0
Hr_skill_levelResource.java
...lab/businesscentral/core/rest/Hr_skill_levelResource.java
+129
-0
未找到文件。
businesscentral-provider/businesscentral-provider-core/src/main/java/cn/ibizlab/businesscentral/core/rest/Hr_skillResource.java
浏览文件 @
1fe4efc2
...
...
@@ -158,5 +158,134 @@ public class Hr_skillResource {
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_skill-Create-all')"
)
@ApiOperation
(
value
=
"根据技能类型建立技能"
,
tags
=
{
"技能"
},
notes
=
"根据技能类型建立技能"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/hr_skill_types/{hr_skill_type_id}/hr_skills"
)
public
ResponseEntity
<
Hr_skillDTO
>
createByHr_skill_type
(
@PathVariable
(
"hr_skill_type_id"
)
Long
hr_skill_type_id
,
@RequestBody
Hr_skillDTO
hr_skilldto
)
{
Hr_skill
domain
=
hr_skillMapping
.
toDomain
(
hr_skilldto
);
domain
.
setSkillTypeId
(
hr_skill_type_id
);
hr_skillService
.
create
(
domain
);
Hr_skillDTO
dto
=
hr_skillMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_skill-Create-all')"
)
@ApiOperation
(
value
=
"根据技能类型批量建立技能"
,
tags
=
{
"技能"
},
notes
=
"根据技能类型批量建立技能"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/hr_skill_types/{hr_skill_type_id}/hr_skills/batch"
)
public
ResponseEntity
<
Boolean
>
createBatchByHr_skill_type
(
@PathVariable
(
"hr_skill_type_id"
)
Long
hr_skill_type_id
,
@RequestBody
List
<
Hr_skillDTO
>
hr_skilldtos
)
{
List
<
Hr_skill
>
domainlist
=
hr_skillMapping
.
toDomain
(
hr_skilldtos
);
for
(
Hr_skill
domain:
domainlist
){
domain
.
setSkillTypeId
(
hr_skill_type_id
);
}
hr_skillService
.
createBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_skill-Update-all')"
)
@ApiOperation
(
value
=
"根据技能类型更新技能"
,
tags
=
{
"技能"
},
notes
=
"根据技能类型更新技能"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/hr_skill_types/{hr_skill_type_id}/hr_skills/{hr_skill_id}"
)
public
ResponseEntity
<
Hr_skillDTO
>
updateByHr_skill_type
(
@PathVariable
(
"hr_skill_type_id"
)
Long
hr_skill_type_id
,
@PathVariable
(
"hr_skill_id"
)
Long
hr_skill_id
,
@RequestBody
Hr_skillDTO
hr_skilldto
)
{
Hr_skill
domain
=
hr_skillMapping
.
toDomain
(
hr_skilldto
);
domain
.
setSkillTypeId
(
hr_skill_type_id
);
domain
.
setId
(
hr_skill_id
);
hr_skillService
.
update
(
domain
);
Hr_skillDTO
dto
=
hr_skillMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_skill-Update-all')"
)
@ApiOperation
(
value
=
"根据技能类型批量更新技能"
,
tags
=
{
"技能"
},
notes
=
"根据技能类型批量更新技能"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/hr_skill_types/{hr_skill_type_id}/hr_skills/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatchByHr_skill_type
(
@PathVariable
(
"hr_skill_type_id"
)
Long
hr_skill_type_id
,
@RequestBody
List
<
Hr_skillDTO
>
hr_skilldtos
)
{
List
<
Hr_skill
>
domainlist
=
hr_skillMapping
.
toDomain
(
hr_skilldtos
);
for
(
Hr_skill
domain:
domainlist
){
domain
.
setSkillTypeId
(
hr_skill_type_id
);
}
hr_skillService
.
updateBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_skill-Remove-all')"
)
@ApiOperation
(
value
=
"根据技能类型删除技能"
,
tags
=
{
"技能"
},
notes
=
"根据技能类型删除技能"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/hr_skill_types/{hr_skill_type_id}/hr_skills/{hr_skill_id}"
)
public
ResponseEntity
<
Boolean
>
removeByHr_skill_type
(
@PathVariable
(
"hr_skill_type_id"
)
Long
hr_skill_type_id
,
@PathVariable
(
"hr_skill_id"
)
Long
hr_skill_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
hr_skillService
.
remove
(
hr_skill_id
));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_skill-Remove-all')"
)
@ApiOperation
(
value
=
"根据技能类型批量删除技能"
,
tags
=
{
"技能"
},
notes
=
"根据技能类型批量删除技能"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/hr_skill_types/{hr_skill_type_id}/hr_skills/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatchByHr_skill_type
(
@RequestBody
List
<
Long
>
ids
)
{
hr_skillService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_skill-Get-all')"
)
@ApiOperation
(
value
=
"根据技能类型获取技能"
,
tags
=
{
"技能"
},
notes
=
"根据技能类型获取技能"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/hr_skill_types/{hr_skill_type_id}/hr_skills/{hr_skill_id}"
)
public
ResponseEntity
<
Hr_skillDTO
>
getByHr_skill_type
(
@PathVariable
(
"hr_skill_type_id"
)
Long
hr_skill_type_id
,
@PathVariable
(
"hr_skill_id"
)
Long
hr_skill_id
)
{
Hr_skill
domain
=
hr_skillService
.
get
(
hr_skill_id
);
Hr_skillDTO
dto
=
hr_skillMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"根据技能类型获取技能草稿"
,
tags
=
{
"技能"
},
notes
=
"根据技能类型获取技能草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/hr_skill_types/{hr_skill_type_id}/hr_skills/getdraft"
)
public
ResponseEntity
<
Hr_skillDTO
>
getDraftByHr_skill_type
(
@PathVariable
(
"hr_skill_type_id"
)
Long
hr_skill_type_id
)
{
Hr_skill
domain
=
new
Hr_skill
();
domain
.
setSkillTypeId
(
hr_skill_type_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
hr_skillMapping
.
toDto
(
hr_skillService
.
getDraft
(
domain
)));
}
@ApiOperation
(
value
=
"根据技能类型检查技能"
,
tags
=
{
"技能"
},
notes
=
"根据技能类型检查技能"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/hr_skill_types/{hr_skill_type_id}/hr_skills/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKeyByHr_skill_type
(
@PathVariable
(
"hr_skill_type_id"
)
Long
hr_skill_type_id
,
@RequestBody
Hr_skillDTO
hr_skilldto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
hr_skillService
.
checkKey
(
hr_skillMapping
.
toDomain
(
hr_skilldto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_skill-Save-all')"
)
@ApiOperation
(
value
=
"根据技能类型保存技能"
,
tags
=
{
"技能"
},
notes
=
"根据技能类型保存技能"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/hr_skill_types/{hr_skill_type_id}/hr_skills/save"
)
public
ResponseEntity
<
Boolean
>
saveByHr_skill_type
(
@PathVariable
(
"hr_skill_type_id"
)
Long
hr_skill_type_id
,
@RequestBody
Hr_skillDTO
hr_skilldto
)
{
Hr_skill
domain
=
hr_skillMapping
.
toDomain
(
hr_skilldto
);
domain
.
setSkillTypeId
(
hr_skill_type_id
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
hr_skillService
.
save
(
domain
));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_skill-Save-all')"
)
@ApiOperation
(
value
=
"根据技能类型批量保存技能"
,
tags
=
{
"技能"
},
notes
=
"根据技能类型批量保存技能"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/hr_skill_types/{hr_skill_type_id}/hr_skills/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatchByHr_skill_type
(
@PathVariable
(
"hr_skill_type_id"
)
Long
hr_skill_type_id
,
@RequestBody
List
<
Hr_skillDTO
>
hr_skilldtos
)
{
List
<
Hr_skill
>
domainlist
=
hr_skillMapping
.
toDomain
(
hr_skilldtos
);
for
(
Hr_skill
domain:
domainlist
){
domain
.
setSkillTypeId
(
hr_skill_type_id
);
}
hr_skillService
.
saveBatch
(
domainlist
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_skill-searchDefault-all')"
)
@ApiOperation
(
value
=
"根据技能类型获取数据集"
,
tags
=
{
"技能"
}
,
notes
=
"根据技能类型获取数据集"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/hr_skill_types/{hr_skill_type_id}/hr_skills/fetchdefault"
)
public
ResponseEntity
<
List
<
Hr_skillDTO
>>
fetchHr_skillDefaultByHr_skill_type
(
@PathVariable
(
"hr_skill_type_id"
)
Long
hr_skill_type_id
,
Hr_skillSearchContext
context
)
{
context
.
setN_skill_type_id_eq
(
hr_skill_type_id
);
Page
<
Hr_skill
>
domains
=
hr_skillService
.
searchDefault
(
context
)
;
List
<
Hr_skillDTO
>
list
=
hr_skillMapping
.
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
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_skill-searchDefault-all')"
)
@ApiOperation
(
value
=
"根据技能类型查询数据集"
,
tags
=
{
"技能"
}
,
notes
=
"根据技能类型查询数据集"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/hr_skill_types/{hr_skill_type_id}/hr_skills/searchdefault"
)
public
ResponseEntity
<
Page
<
Hr_skillDTO
>>
searchHr_skillDefaultByHr_skill_type
(
@PathVariable
(
"hr_skill_type_id"
)
Long
hr_skill_type_id
,
@RequestBody
Hr_skillSearchContext
context
)
{
context
.
setN_skill_type_id_eq
(
hr_skill_type_id
);
Page
<
Hr_skill
>
domains
=
hr_skillService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
hr_skillMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
}
businesscentral-provider/businesscentral-provider-core/src/main/java/cn/ibizlab/businesscentral/core/rest/Hr_skill_levelResource.java
浏览文件 @
1fe4efc2
此差异已折叠。
点击以展开。
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录