提交 1fe4efc2 编写于 作者: ibizdev's avatar ibizdev

xignzi006 发布系统代码 [Spring Boot]

上级 c718563d
......@@ -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()));
}
}
......@@ -158,5 +158,134 @@ public class Hr_skill_levelResource {
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_skill_level-Create-all')")
@ApiOperation(value = "根据技能类型建立技能等级", tags = {"技能等级" }, notes = "根据技能类型建立技能等级")
@RequestMapping(method = RequestMethod.POST, value = "/hr_skill_types/{hr_skill_type_id}/hr_skill_levels")
public ResponseEntity<Hr_skill_levelDTO> createByHr_skill_type(@PathVariable("hr_skill_type_id") Long hr_skill_type_id, @RequestBody Hr_skill_levelDTO hr_skill_leveldto) {
Hr_skill_level domain = hr_skill_levelMapping.toDomain(hr_skill_leveldto);
domain.setSkillTypeId(hr_skill_type_id);
hr_skill_levelService.create(domain);
Hr_skill_levelDTO dto = hr_skill_levelMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_skill_level-Create-all')")
@ApiOperation(value = "根据技能类型批量建立技能等级", tags = {"技能等级" }, notes = "根据技能类型批量建立技能等级")
@RequestMapping(method = RequestMethod.POST, value = "/hr_skill_types/{hr_skill_type_id}/hr_skill_levels/batch")
public ResponseEntity<Boolean> createBatchByHr_skill_type(@PathVariable("hr_skill_type_id") Long hr_skill_type_id, @RequestBody List<Hr_skill_levelDTO> hr_skill_leveldtos) {
List<Hr_skill_level> domainlist=hr_skill_levelMapping.toDomain(hr_skill_leveldtos);
for(Hr_skill_level domain:domainlist){
domain.setSkillTypeId(hr_skill_type_id);
}
hr_skill_levelService.createBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_skill_level-Update-all')")
@ApiOperation(value = "根据技能类型更新技能等级", tags = {"技能等级" }, notes = "根据技能类型更新技能等级")
@RequestMapping(method = RequestMethod.PUT, value = "/hr_skill_types/{hr_skill_type_id}/hr_skill_levels/{hr_skill_level_id}")
public ResponseEntity<Hr_skill_levelDTO> updateByHr_skill_type(@PathVariable("hr_skill_type_id") Long hr_skill_type_id, @PathVariable("hr_skill_level_id") Long hr_skill_level_id, @RequestBody Hr_skill_levelDTO hr_skill_leveldto) {
Hr_skill_level domain = hr_skill_levelMapping.toDomain(hr_skill_leveldto);
domain.setSkillTypeId(hr_skill_type_id);
domain.setId(hr_skill_level_id);
hr_skill_levelService.update(domain);
Hr_skill_levelDTO dto = hr_skill_levelMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_skill_level-Update-all')")
@ApiOperation(value = "根据技能类型批量更新技能等级", tags = {"技能等级" }, notes = "根据技能类型批量更新技能等级")
@RequestMapping(method = RequestMethod.PUT, value = "/hr_skill_types/{hr_skill_type_id}/hr_skill_levels/batch")
public ResponseEntity<Boolean> updateBatchByHr_skill_type(@PathVariable("hr_skill_type_id") Long hr_skill_type_id, @RequestBody List<Hr_skill_levelDTO> hr_skill_leveldtos) {
List<Hr_skill_level> domainlist=hr_skill_levelMapping.toDomain(hr_skill_leveldtos);
for(Hr_skill_level domain:domainlist){
domain.setSkillTypeId(hr_skill_type_id);
}
hr_skill_levelService.updateBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_skill_level-Remove-all')")
@ApiOperation(value = "根据技能类型删除技能等级", tags = {"技能等级" }, notes = "根据技能类型删除技能等级")
@RequestMapping(method = RequestMethod.DELETE, value = "/hr_skill_types/{hr_skill_type_id}/hr_skill_levels/{hr_skill_level_id}")
public ResponseEntity<Boolean> removeByHr_skill_type(@PathVariable("hr_skill_type_id") Long hr_skill_type_id, @PathVariable("hr_skill_level_id") Long hr_skill_level_id) {
return ResponseEntity.status(HttpStatus.OK).body(hr_skill_levelService.remove(hr_skill_level_id));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_skill_level-Remove-all')")
@ApiOperation(value = "根据技能类型批量删除技能等级", tags = {"技能等级" }, notes = "根据技能类型批量删除技能等级")
@RequestMapping(method = RequestMethod.DELETE, value = "/hr_skill_types/{hr_skill_type_id}/hr_skill_levels/batch")
public ResponseEntity<Boolean> removeBatchByHr_skill_type(@RequestBody List<Long> ids) {
hr_skill_levelService.removeBatch(ids);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_skill_level-Get-all')")
@ApiOperation(value = "根据技能类型获取技能等级", tags = {"技能等级" }, notes = "根据技能类型获取技能等级")
@RequestMapping(method = RequestMethod.GET, value = "/hr_skill_types/{hr_skill_type_id}/hr_skill_levels/{hr_skill_level_id}")
public ResponseEntity<Hr_skill_levelDTO> getByHr_skill_type(@PathVariable("hr_skill_type_id") Long hr_skill_type_id, @PathVariable("hr_skill_level_id") Long hr_skill_level_id) {
Hr_skill_level domain = hr_skill_levelService.get(hr_skill_level_id);
Hr_skill_levelDTO dto = hr_skill_levelMapping.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_skill_levels/getdraft")
public ResponseEntity<Hr_skill_levelDTO> getDraftByHr_skill_type(@PathVariable("hr_skill_type_id") Long hr_skill_type_id) {
Hr_skill_level domain = new Hr_skill_level();
domain.setSkillTypeId(hr_skill_type_id);
return ResponseEntity.status(HttpStatus.OK).body(hr_skill_levelMapping.toDto(hr_skill_levelService.getDraft(domain)));
}
@ApiOperation(value = "根据技能类型检查技能等级", tags = {"技能等级" }, notes = "根据技能类型检查技能等级")
@RequestMapping(method = RequestMethod.POST, value = "/hr_skill_types/{hr_skill_type_id}/hr_skill_levels/checkkey")
public ResponseEntity<Boolean> checkKeyByHr_skill_type(@PathVariable("hr_skill_type_id") Long hr_skill_type_id, @RequestBody Hr_skill_levelDTO hr_skill_leveldto) {
return ResponseEntity.status(HttpStatus.OK).body(hr_skill_levelService.checkKey(hr_skill_levelMapping.toDomain(hr_skill_leveldto)));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_skill_level-Save-all')")
@ApiOperation(value = "根据技能类型保存技能等级", tags = {"技能等级" }, notes = "根据技能类型保存技能等级")
@RequestMapping(method = RequestMethod.POST, value = "/hr_skill_types/{hr_skill_type_id}/hr_skill_levels/save")
public ResponseEntity<Boolean> saveByHr_skill_type(@PathVariable("hr_skill_type_id") Long hr_skill_type_id, @RequestBody Hr_skill_levelDTO hr_skill_leveldto) {
Hr_skill_level domain = hr_skill_levelMapping.toDomain(hr_skill_leveldto);
domain.setSkillTypeId(hr_skill_type_id);
return ResponseEntity.status(HttpStatus.OK).body(hr_skill_levelService.save(domain));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_skill_level-Save-all')")
@ApiOperation(value = "根据技能类型批量保存技能等级", tags = {"技能等级" }, notes = "根据技能类型批量保存技能等级")
@RequestMapping(method = RequestMethod.POST, value = "/hr_skill_types/{hr_skill_type_id}/hr_skill_levels/savebatch")
public ResponseEntity<Boolean> saveBatchByHr_skill_type(@PathVariable("hr_skill_type_id") Long hr_skill_type_id, @RequestBody List<Hr_skill_levelDTO> hr_skill_leveldtos) {
List<Hr_skill_level> domainlist=hr_skill_levelMapping.toDomain(hr_skill_leveldtos);
for(Hr_skill_level domain:domainlist){
domain.setSkillTypeId(hr_skill_type_id);
}
hr_skill_levelService.saveBatch(domainlist);
return ResponseEntity.status(HttpStatus.OK).body(true);
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Hr_skill_level-searchDefault-all')")
@ApiOperation(value = "根据技能类型获取数据集", tags = {"技能等级" } ,notes = "根据技能类型获取数据集")
@RequestMapping(method= RequestMethod.GET , value="/hr_skill_types/{hr_skill_type_id}/hr_skill_levels/fetchdefault")
public ResponseEntity<List<Hr_skill_levelDTO>> fetchHr_skill_levelDefaultByHr_skill_type(@PathVariable("hr_skill_type_id") Long hr_skill_type_id,Hr_skill_levelSearchContext context) {
context.setN_skill_type_id_eq(hr_skill_type_id);
Page<Hr_skill_level> domains = hr_skill_levelService.searchDefault(context) ;
List<Hr_skill_levelDTO> list = hr_skill_levelMapping.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_level-searchDefault-all')")
@ApiOperation(value = "根据技能类型查询数据集", tags = {"技能等级" } ,notes = "根据技能类型查询数据集")
@RequestMapping(method= RequestMethod.POST , value="/hr_skill_types/{hr_skill_type_id}/hr_skill_levels/searchdefault")
public ResponseEntity<Page<Hr_skill_levelDTO>> searchHr_skill_levelDefaultByHr_skill_type(@PathVariable("hr_skill_type_id") Long hr_skill_type_id, @RequestBody Hr_skill_levelSearchContext context) {
context.setN_skill_type_id_eq(hr_skill_type_id);
Page<Hr_skill_level> domains = hr_skill_levelService.searchDefault(context) ;
return ResponseEntity.status(HttpStatus.OK)
.body(new PageImpl(hr_skill_levelMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册