Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-api
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
poc
poc-api
Commits
e246a2b6
Commit
e246a2b6
authored
Dec 23, 2025
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat[AI人力]:新增职位上下架功能
parent
97bdf635
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
386 additions
and
173 deletions
+386
-173
HumanResourceService.java
...m/poc/human_resources/aggregate/HumanResourceService.java
+20
-4
HumanResourceServiceImpl.java
...an_resources/aggregate/impl/HumanResourceServiceImpl.java
+58
-16
HumanResourcePositionConstant.java
...man_resources/constant/HumanResourcePositionConstant.java
+16
-0
BizHumanResourcePositionConvert.java
...an_resources/convert/BizHumanResourcePositionConvert.java
+6
-0
BizHumanResourcePositionDto.java
.../poc/human_resources/dto/BizHumanResourcePositionDto.java
+16
-0
HumanResourcePositionDto.java
...com/poc/human_resources/dto/HumanResourcePositionDto.java
+10
-0
BizHumanResourcePositionEntity.java
...uman_resources/entity/BizHumanResourcePositionEntity.java
+16
-0
HumanResourcePositionBaseInfo.java
...human_resources/entity/HumanResourcePositionBaseInfo.java
+13
-0
BizHumanResourcePositionModel.java
.../human_resources/model/BizHumanResourcePositionModel.java
+125
-108
PositionListQuery.sql
...va/cn/com/poc/human_resources/query/PositionListQuery.sql
+2
-0
PositionListQueryCondition.java
...poc/human_resources/query/PositionListQueryCondition.java
+15
-6
PositionListQueryItem.java
.../com/poc/human_resources/query/PositionListQueryItem.java
+47
-30
HumanResourceRest.java
...va/cn/com/poc/human_resources/rest/HumanResourceRest.java
+11
-0
HumanResourceRestImpl.java
.../poc/human_resources/rest/impl/HumanResourceRestImpl.java
+24
-6
BizHumanResourcePositionService.java
...an_resources/service/BizHumanResourcePositionService.java
+1
-1
BizHumanResourcePositionServiceImpl.java
...ces/service/impl/BizHumanResourcePositionServiceImpl.java
+6
-2
No files found.
src/main/java/cn/com/poc/human_resources/aggregate/HumanResourceService.java
View file @
e246a2b6
...
@@ -9,6 +9,7 @@ import cn.com.poc.human_resources.entity.position.Job;
...
@@ -9,6 +9,7 @@ import cn.com.poc.human_resources.entity.position.Job;
import
cn.com.poc.human_resources.entity.position.Por
;
import
cn.com.poc.human_resources.entity.position.Por
;
import
cn.com.poc.human_resources.entity.resume.Resume
;
import
cn.com.poc.human_resources.entity.resume.Resume
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.List
;
import
java.util.List
;
...
@@ -62,7 +63,8 @@ public interface HumanResourceService {
...
@@ -62,7 +63,8 @@ public interface HumanResourceService {
* @param id 职位id[更新必填]
* @param id 职位id[更新必填]
* @param memberId 用户id
* @param memberId 用户id
*/
*/
BizHumanResourcePositionEntity
saveOrUpdatePosition
(
BaseInfo
baseInfo
,
Job
job
,
Por
por
,
Long
id
,
Long
memberId
)
throws
Exception
;
BizHumanResourcePositionEntity
saveOrUpdatePosition
(
BaseInfo
baseInfo
,
Job
job
,
Por
por
,
Long
id
,
Long
memberId
)
throws
Exception
;
/**
/**
...
@@ -89,6 +91,17 @@ public interface HumanResourceService {
...
@@ -89,6 +91,17 @@ public interface HumanResourceService {
*/
*/
void
deletePositions
(
Long
userId
,
Long
...
positionIds
)
throws
Exception
;
void
deletePositions
(
Long
userId
,
Long
...
positionIds
)
throws
Exception
;
/**
* 发布职位-仅用于上架/发布职位
*/
String
publishPositions
(
Long
id
,
Long
memberId
)
throws
Exception
;
/**
* 下架职位
*/
String
unPublishPositions
(
Long
id
,
Long
memberId
)
throws
Exception
;
// ------------------------- 简历 -------------------------- //
// ------------------------- 简历 -------------------------- //
/**
/**
...
@@ -100,7 +113,8 @@ public interface HumanResourceService {
...
@@ -100,7 +113,8 @@ public interface HumanResourceService {
* @param resume
* @param resume
* @throws Exception
* @throws Exception
*/
*/
BizHumanResourceResumeEntity
saveResume
(
Long
userId
,
String
fileURL
,
Long
positionId
,
Resume
resume
)
throws
Exception
;
BizHumanResourceResumeEntity
saveResume
(
Long
userId
,
String
fileURL
,
Long
positionId
,
Resume
resume
)
throws
Exception
;
/**
/**
* 更新简历信息
* 更新简历信息
...
@@ -113,7 +127,8 @@ public interface HumanResourceService {
...
@@ -113,7 +127,8 @@ public interface HumanResourceService {
* @return
* @return
* @throws Exception
* @throws Exception
*/
*/
BizHumanResourceResumeEntity
updateResume
(
Long
id
,
Long
userId
,
String
fileURL
,
Long
positionId
,
Resume
resume
)
throws
Exception
;
BizHumanResourceResumeEntity
updateResume
(
Long
id
,
Long
userId
,
String
fileURL
,
Long
positionId
,
Resume
resume
)
throws
Exception
;
/**
/**
* 查询简历列表
* 查询简历列表
...
@@ -122,7 +137,8 @@ public interface HumanResourceService {
...
@@ -122,7 +137,8 @@ public interface HumanResourceService {
* @param positionId
* @param positionId
* @param pagingInfo
* @param pagingInfo
*/
*/
List
<
BizHumanResourceResumeEntity
>
listResumes
(
Long
userId
,
Long
positionId
,
PagingInfo
pagingInfo
)
throws
Exception
;
List
<
BizHumanResourceResumeEntity
>
listResumes
(
Long
userId
,
Long
positionId
,
PagingInfo
pagingInfo
)
throws
Exception
;
/**
/**
* 查询简历详情
* 查询简历详情
...
...
src/main/java/cn/com/poc/human_resources/aggregate/impl/HumanResourceServiceImpl.java
View file @
e246a2b6
This diff is collapsed.
Click to expand it.
src/main/java/cn/com/poc/human_resources/constant/HumanResourcePositionConstant.java
0 → 100644
View file @
e246a2b6
package
cn
.
com
.
poc
.
human_resources
.
constant
;
/**
* @author alex.yao
* @date 2025/12/23
*/
public
interface
HumanResourcePositionConstant
{
interface
POST_STATUS
{
String
DRAFT
=
"DRAFT"
;
String
PUBLISHED
=
"PUBLISHED"
;
}
}
src/main/java/cn/com/poc/human_resources/convert/BizHumanResourcePositionConvert.java
View file @
e246a2b6
...
@@ -26,6 +26,7 @@ public class BizHumanResourcePositionConvert {
...
@@ -26,6 +26,7 @@ public class BizHumanResourcePositionConvert {
public
static
BizHumanResourcePositionEntity
modelToEntity
(
BizHumanResourcePositionModel
model
)
{
public
static
BizHumanResourcePositionEntity
modelToEntity
(
BizHumanResourcePositionModel
model
)
{
BizHumanResourcePositionEntity
entity
=
new
BizHumanResourcePositionEntity
();
BizHumanResourcePositionEntity
entity
=
new
BizHumanResourcePositionEntity
();
entity
.
setId
(
model
.
getId
());
entity
.
setId
(
model
.
getId
());
entity
.
setPostStatus
(
model
.
getPostStatus
());
entity
.
setJobTitle
(
model
.
getJobTitle
());
entity
.
setJobTitle
(
model
.
getJobTitle
());
entity
.
setDepartment
(
model
.
getDepartment
());
entity
.
setDepartment
(
model
.
getDepartment
());
entity
.
setWorkLocation
(
model
.
getWorkLocation
());
entity
.
setWorkLocation
(
model
.
getWorkLocation
());
...
@@ -52,6 +53,7 @@ public class BizHumanResourcePositionConvert {
...
@@ -52,6 +53,7 @@ public class BizHumanResourcePositionConvert {
public
static
BizHumanResourcePositionModel
entityToModel
(
BizHumanResourcePositionEntity
entity
)
{
public
static
BizHumanResourcePositionModel
entityToModel
(
BizHumanResourcePositionEntity
entity
)
{
BizHumanResourcePositionModel
model
=
new
BizHumanResourcePositionModel
();
BizHumanResourcePositionModel
model
=
new
BizHumanResourcePositionModel
();
model
.
setId
(
entity
.
getId
());
model
.
setId
(
entity
.
getId
());
model
.
setPostStatus
(
entity
.
getPostStatus
());
model
.
setJobTitle
(
entity
.
getJobTitle
());
model
.
setJobTitle
(
entity
.
getJobTitle
());
model
.
setDepartment
(
entity
.
getDepartment
());
model
.
setDepartment
(
entity
.
getDepartment
());
model
.
setWorkLocation
(
entity
.
getWorkLocation
());
model
.
setWorkLocation
(
entity
.
getWorkLocation
());
...
@@ -78,6 +80,7 @@ public class BizHumanResourcePositionConvert {
...
@@ -78,6 +80,7 @@ public class BizHumanResourcePositionConvert {
public
static
BizHumanResourcePositionDto
entityToDto
(
BizHumanResourcePositionEntity
entity
)
{
public
static
BizHumanResourcePositionDto
entityToDto
(
BizHumanResourcePositionEntity
entity
)
{
BizHumanResourcePositionDto
dto
=
new
BizHumanResourcePositionDto
();
BizHumanResourcePositionDto
dto
=
new
BizHumanResourcePositionDto
();
dto
.
setId
(
entity
.
getId
());
dto
.
setId
(
entity
.
getId
());
dto
.
setPostStatus
(
entity
.
getPostStatus
());
dto
.
setJobTitle
(
entity
.
getJobTitle
());
dto
.
setJobTitle
(
entity
.
getJobTitle
());
dto
.
setDepartment
(
entity
.
getDepartment
());
dto
.
setDepartment
(
entity
.
getDepartment
());
dto
.
setWorkLocation
(
entity
.
getWorkLocation
());
dto
.
setWorkLocation
(
entity
.
getWorkLocation
());
...
@@ -97,6 +100,7 @@ public class BizHumanResourcePositionConvert {
...
@@ -97,6 +100,7 @@ public class BizHumanResourcePositionConvert {
public
static
BizHumanResourcePositionEntity
dtoToEntity
(
BizHumanResourcePositionDto
dto
)
{
public
static
BizHumanResourcePositionEntity
dtoToEntity
(
BizHumanResourcePositionDto
dto
)
{
BizHumanResourcePositionEntity
entity
=
new
BizHumanResourcePositionEntity
();
BizHumanResourcePositionEntity
entity
=
new
BizHumanResourcePositionEntity
();
entity
.
setId
(
dto
.
getId
());
entity
.
setId
(
dto
.
getId
());
entity
.
setPostStatus
(
dto
.
getPostStatus
());
entity
.
setJobTitle
(
dto
.
getJobTitle
());
entity
.
setJobTitle
(
dto
.
getJobTitle
());
entity
.
setDepartment
(
dto
.
getDepartment
());
entity
.
setDepartment
(
dto
.
getDepartment
());
entity
.
setWorkLocation
(
dto
.
getWorkLocation
());
entity
.
setWorkLocation
(
dto
.
getWorkLocation
());
...
@@ -116,6 +120,8 @@ public class BizHumanResourcePositionConvert {
...
@@ -116,6 +120,8 @@ public class BizHumanResourcePositionConvert {
public
static
HumanResourcePositionDto
entityToHumanResourcePositionDto
(
BizHumanResourcePositionEntity
positionEntity
)
{
public
static
HumanResourcePositionDto
entityToHumanResourcePositionDto
(
BizHumanResourcePositionEntity
positionEntity
)
{
HumanResourcePositionDto
resourcePositionDto
=
new
HumanResourcePositionDto
();
HumanResourcePositionDto
resourcePositionDto
=
new
HumanResourcePositionDto
();
resourcePositionDto
.
setPostStatus
(
positionEntity
.
getPostStatus
());
BaseInfo
baseInfo
=
new
BaseInfo
();
BaseInfo
baseInfo
=
new
BaseInfo
();
baseInfo
.
setJobTitle
(
positionEntity
.
getJobTitle
());
baseInfo
.
setJobTitle
(
positionEntity
.
getJobTitle
());
baseInfo
.
setDepartment
(
positionEntity
.
getDepartment
());
baseInfo
.
setDepartment
(
positionEntity
.
getDepartment
());
...
...
src/main/java/cn/com/poc/human_resources/dto/BizHumanResourcePositionDto.java
View file @
e246a2b6
...
@@ -18,6 +18,22 @@ public class BizHumanResourcePositionDto {
...
@@ -18,6 +18,22 @@ public class BizHumanResourcePositionDto {
this
.
id
=
id
;
this
.
id
=
id
;
}
}
/**
* post_status
* 发布状态
* DRAFT-草稿
* PUBLISHED - 已发布
*/
private
java
.
lang
.
String
postStatus
;
public
String
getPostStatus
()
{
return
postStatus
;
}
public
void
setPostStatus
(
String
postStatus
)
{
this
.
postStatus
=
postStatus
;
}
/**
/**
* job_title
* job_title
* 职位名称
* 职位名称
...
...
src/main/java/cn/com/poc/human_resources/dto/HumanResourcePositionDto.java
View file @
e246a2b6
...
@@ -12,12 +12,22 @@ public class HumanResourcePositionDto {
...
@@ -12,12 +12,22 @@ public class HumanResourcePositionDto {
private
Long
id
;
private
Long
id
;
private
String
postStatus
;
private
BaseInfo
baseInfo
;
private
BaseInfo
baseInfo
;
private
Job
job
;
private
Job
job
;
private
Por
por
;
private
Por
por
;
public
String
getPostStatus
()
{
return
postStatus
;
}
public
void
setPostStatus
(
String
postStatus
)
{
this
.
postStatus
=
postStatus
;
}
public
Long
getId
()
{
public
Long
getId
()
{
return
id
;
return
id
;
}
}
...
...
src/main/java/cn/com/poc/human_resources/entity/BizHumanResourcePositionEntity.java
View file @
e246a2b6
...
@@ -18,6 +18,22 @@ public class BizHumanResourcePositionEntity {
...
@@ -18,6 +18,22 @@ public class BizHumanResourcePositionEntity {
public
void
setId
(
java
.
lang
.
Long
id
){
public
void
setId
(
java
.
lang
.
Long
id
){
this
.
id
=
id
;
this
.
id
=
id
;
}
}
/**
* post_status
* 发布状态
* DRAFT-草稿
* PUBLISHED - 已发布
*/
private
java
.
lang
.
String
postStatus
;
public
String
getPostStatus
()
{
return
postStatus
;
}
public
void
setPostStatus
(
String
postStatus
)
{
this
.
postStatus
=
postStatus
;
}
/** job_title
/** job_title
*职位名称
*职位名称
*/
*/
...
...
src/main/java/cn/com/poc/human_resources/entity/HumanResourcePositionBaseInfo.java
View file @
e246a2b6
...
@@ -16,6 +16,19 @@ public class HumanResourcePositionBaseInfo {
...
@@ -16,6 +16,19 @@ public class HumanResourcePositionBaseInfo {
this
.
id
=
id
;
this
.
id
=
id
;
}
}
/**
* 发布状态
*/
private
String
postStatus
;
public
String
getPostStatus
()
{
return
postStatus
;
}
public
void
setPostStatus
(
String
postStatus
)
{
this
.
postStatus
=
postStatus
;
}
/**
/**
* job_title
* job_title
* 职位名称
* 职位名称
...
...
src/main/java/cn/com/poc/human_resources/model/BizHumanResourcePositionModel.java
View file @
e246a2b6
...
@@ -41,6 +41,23 @@ public class BizHumanResourcePositionModel extends BaseModelClass implements Ser
...
@@ -41,6 +41,23 @@ public class BizHumanResourcePositionModel extends BaseModelClass implements Ser
super
.
addValidField
(
"id"
);
super
.
addValidField
(
"id"
);
}
}
/**
* post_status
* 发布状态
* DRAFT-草稿
* PUBLISHED - 已发布
*/
private
java
.
lang
.
String
postStatus
;
@Column
(
name
=
"post_status"
,
length
=
10
)
public
String
getPostStatus
()
{
return
postStatus
;
}
public
void
setPostStatus
(
String
postStatus
)
{
this
.
postStatus
=
postStatus
;
super
.
addValidField
(
"postStatus"
);
}
/** job_title
/** job_title
*职位名称
*职位名称
...
...
src/main/java/cn/com/poc/human_resources/query/PositionListQuery.sql
View file @
e246a2b6
select
select
bhrp
.
id
,
bhrp
.
id
,
bhrp
.
post_status
,
bhrp
.
job_title
,
bhrp
.
job_title
,
bhrp
.
work_location
,
bhrp
.
work_location
,
bhrp
.
job_nature
,
bhrp
.
job_nature
,
...
@@ -12,6 +13,7 @@ left join biz_human_resource_resume bhrr on bhrr.`position` = bhrp.id and bhrr.i
...
@@ -12,6 +13,7 @@ left join biz_human_resource_resume bhrr on bhrr.`position` = bhrp.id and bhrr.i
where
where
bhrp
.
is_deleted
=
'N'
bhrp
.
is_deleted
=
'N'
<<
and
bhrp
.
member_id
=
:
memberId
>>
<<
and
bhrp
.
member_id
=
:
memberId
>>
<<
and
bhrp
.
post_status
=
:
postStatus
>>
GROUP
BY
GROUP
BY
bhrp
.
id
bhrp
.
id
order
by
bhrp
.
CREATED_TIME
desc
order
by
bhrp
.
CREATED_TIME
desc
\ No newline at end of file
src/main/java/cn/com/poc/human_resources/query/PositionListQueryCondition.java
View file @
e246a2b6
...
@@ -20,4 +20,13 @@ public class PositionListQueryCondition implements Serializable{
...
@@ -20,4 +20,13 @@ public class PositionListQueryCondition implements Serializable{
this
.
memberId
=
memberId
;
this
.
memberId
=
memberId
;
}
}
private
java
.
lang
.
String
postStatus
;
public
String
getPostStatus
()
{
return
postStatus
;
}
public
void
setPostStatus
(
String
postStatus
)
{
this
.
postStatus
=
postStatus
;
}
}
}
\ No newline at end of file
src/main/java/cn/com/poc/human_resources/query/PositionListQueryItem.java
View file @
e246a2b6
...
@@ -27,6 +27,23 @@ public class PositionListQueryItem extends BaseItemClass implements Serializable
...
@@ -27,6 +27,23 @@ public class PositionListQueryItem extends BaseItemClass implements Serializable
this
.
id
=
id
;
this
.
id
=
id
;
}
}
/**
* post_status
* 发布状态
* DRAFT-草稿
* PUBLISHED - 已发布
*/
private
java
.
lang
.
String
postStatus
;
@Column
(
name
=
"post_status"
)
public
String
getPostStatus
()
{
return
postStatus
;
}
public
void
setPostStatus
(
String
postStatus
)
{
this
.
postStatus
=
postStatus
;
}
/** job_title
/** job_title
*job_title
*job_title
*/
*/
...
...
src/main/java/cn/com/poc/human_resources/rest/HumanResourceRest.java
View file @
e246a2b6
...
@@ -63,6 +63,16 @@ public interface HumanResourceRest extends BaseRest {
...
@@ -63,6 +63,16 @@ public interface HumanResourceRest extends BaseRest {
*/
*/
void
deletePositions
(
@RequestParam
Long
...
positionIds
)
throws
Exception
;
void
deletePositions
(
@RequestParam
Long
...
positionIds
)
throws
Exception
;
/**
* 发布职位-仅用于上架/发布职位
*/
String
publishPositions
(
@RequestParam
Long
id
)
throws
Exception
;
/**
* 下架职位-仅用于下架职位
*/
String
unPublishPositions
(
@RequestParam
Long
id
)
throws
Exception
;
// ------------------------- 简历 -------------------------- //
// ------------------------- 简历 -------------------------- //
/**
/**
...
@@ -96,4 +106,5 @@ public interface HumanResourceRest extends BaseRest {
...
@@ -96,4 +106,5 @@ public interface HumanResourceRest extends BaseRest {
* @throws Exception
* @throws Exception
*/
*/
void
deleteResumes
(
@RequestParam
Long
...
resumeIds
)
throws
Exception
;
void
deleteResumes
(
@RequestParam
Long
...
resumeIds
)
throws
Exception
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/human_resources/rest/impl/HumanResourceRestImpl.java
View file @
e246a2b6
...
@@ -9,6 +9,7 @@ import cn.com.poc.human_resources.dto.*;
...
@@ -9,6 +9,7 @@ import cn.com.poc.human_resources.dto.*;
import
cn.com.poc.human_resources.entity.BizHumanResourcePositionEntity
;
import
cn.com.poc.human_resources.entity.BizHumanResourcePositionEntity
;
import
cn.com.poc.human_resources.entity.HumanResourcePositionBaseInfo
;
import
cn.com.poc.human_resources.entity.HumanResourcePositionBaseInfo
;
import
cn.com.poc.human_resources.rest.HumanResourceRest
;
import
cn.com.poc.human_resources.rest.HumanResourceRest
;
import
cn.com.poc.support.security.oauth.entity.UserBaseEntity
;
import
cn.com.yict.framemax.core.exception.BusinessException
;
import
cn.com.yict.framemax.core.exception.BusinessException
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
@@ -82,11 +83,13 @@ public class HumanResourceRestImpl implements HumanResourceRest {
...
@@ -82,11 +83,13 @@ public class HumanResourceRestImpl implements HumanResourceRest {
@Override
@Override
public
List
<
HumanResourcePositionBaseInfoDto
>
listPositions
(
PagingInfo
pagingInfo
)
throws
Exception
{
public
List
<
HumanResourcePositionBaseInfoDto
>
listPositions
(
PagingInfo
pagingInfo
)
throws
Exception
{
List
<
HumanResourcePositionBaseInfo
>
humanResourcePositionBaseInfos
=
humanResourceService
.
listPositions
(
BlContext
.
getCurrentUser
().
getUserId
(),
pagingInfo
);
List
<
HumanResourcePositionBaseInfo
>
humanResourcePositionBaseInfos
=
humanResourceService
.
listPositions
(
BlContext
.
getCurrentUser
().
getUserId
(),
pagingInfo
);
return
humanResourcePositionBaseInfos
.
stream
()
return
humanResourcePositionBaseInfos
.
stream
()
.
map
(
info
->
{
.
map
(
info
->
{
HumanResourcePositionBaseInfoDto
dto
=
new
HumanResourcePositionBaseInfoDto
();
HumanResourcePositionBaseInfoDto
dto
=
new
HumanResourcePositionBaseInfoDto
();
dto
.
setId
(
info
.
getId
());
dto
.
setId
(
info
.
getId
());
dto
.
setPostStatus
(
info
.
getPostStatus
());
dto
.
setJobTitle
(
info
.
getJobTitle
());
dto
.
setJobTitle
(
info
.
getJobTitle
());
dto
.
setWorkLocation
(
info
.
getWorkLocation
());
dto
.
setWorkLocation
(
info
.
getWorkLocation
());
dto
.
setJobNature
(
info
.
getJobNature
());
dto
.
setJobNature
(
info
.
getJobNature
());
...
@@ -99,11 +102,13 @@ public class HumanResourceRestImpl implements HumanResourceRest {
...
@@ -99,11 +102,13 @@ public class HumanResourceRestImpl implements HumanResourceRest {
@Override
@Override
public
HumanResourcePositionDto
getPositionDetail
(
Long
positionId
)
throws
Exception
{
public
HumanResourcePositionDto
getPositionDetail
(
Long
positionId
)
throws
Exception
{
BizHumanResourcePositionEntity
positionEntity
=
humanResourceService
.
getPositionDetail
(
BlContext
.
getCurrentUser
().
getUserId
(),
positionId
);
BizHumanResourcePositionEntity
positionEntity
=
humanResourceService
.
getPositionDetail
(
BlContext
.
getCurrentUser
().
getUserId
(),
positionId
);
if
(
positionEntity
==
null
)
{
if
(
positionEntity
==
null
)
{
throw
new
BusinessException
(
"该岗位信息不存在"
);
throw
new
BusinessException
(
"该岗位信息不存在"
);
}
}
HumanResourcePositionDto
resourcePositionDto
=
BizHumanResourcePositionConvert
.
entityToHumanResourcePositionDto
(
positionEntity
);
HumanResourcePositionDto
resourcePositionDto
=
BizHumanResourcePositionConvert
.
entityToHumanResourcePositionDto
(
positionEntity
);
resourcePositionDto
.
setId
(
positionId
);
resourcePositionDto
.
setId
(
positionId
);
return
resourcePositionDto
;
return
resourcePositionDto
;
}
}
...
@@ -114,6 +119,16 @@ public class HumanResourceRestImpl implements HumanResourceRest {
...
@@ -114,6 +119,16 @@ public class HumanResourceRestImpl implements HumanResourceRest {
humanResourceService
.
deletePositions
(
BlContext
.
getCurrentUser
().
getUserId
(),
positionIds
);
humanResourceService
.
deletePositions
(
BlContext
.
getCurrentUser
().
getUserId
(),
positionIds
);
}
}
@Override
public
String
publishPositions
(
Long
id
)
throws
Exception
{
return
humanResourceService
.
publishPositions
(
id
,
BlContext
.
getCurrentUser
().
getUserId
());
}
@Override
public
String
unPublishPositions
(
Long
id
)
throws
Exception
{
return
humanResourceService
.
unPublishPositions
(
id
,
BlContext
.
getCurrentUser
().
getUserId
());
}
@Override
@Override
public
void
saveResume
(
SaveResumeDto
saveResumeDto
)
throws
Exception
{
public
void
saveResume
(
SaveResumeDto
saveResumeDto
)
throws
Exception
{
Assert
.
notBlank
(
saveResumeDto
.
getFileURL
(),
"文件不能为空"
);
Assert
.
notBlank
(
saveResumeDto
.
getFileURL
(),
"文件不能为空"
);
...
@@ -122,9 +137,11 @@ public class HumanResourceRestImpl implements HumanResourceRest {
...
@@ -122,9 +137,11 @@ public class HumanResourceRestImpl implements HumanResourceRest {
Assert
.
notNull
(
saveResumeDto
.
getResume
().
getInfo
(),
"简历基础信息不能为空"
);
Assert
.
notNull
(
saveResumeDto
.
getResume
().
getInfo
(),
"简历基础信息不能为空"
);
Assert
.
notNull
(
saveResumeDto
.
getResume
().
getTag
(),
"简历标签信息不能为空"
);
Assert
.
notNull
(
saveResumeDto
.
getResume
().
getTag
(),
"简历标签信息不能为空"
);
if
(
saveResumeDto
.
getId
()
!=
null
)
{
if
(
saveResumeDto
.
getId
()
!=
null
)
{
humanResourceService
.
updateResume
(
saveResumeDto
.
getId
(),
BlContext
.
getCurrentUser
().
getUserId
(),
saveResumeDto
.
getFileURL
(),
saveResumeDto
.
getPositionId
(),
saveResumeDto
.
getResume
());
humanResourceService
.
updateResume
(
saveResumeDto
.
getId
(),
BlContext
.
getCurrentUser
().
getUserId
(),
saveResumeDto
.
getFileURL
(),
saveResumeDto
.
getPositionId
(),
saveResumeDto
.
getResume
());
}
else
{
}
else
{
humanResourceService
.
saveResume
(
BlContext
.
getCurrentUser
().
getUserId
(),
saveResumeDto
.
getFileURL
(),
saveResumeDto
.
getPositionId
(),
saveResumeDto
.
getResume
());
humanResourceService
.
saveResume
(
BlContext
.
getCurrentUser
().
getUserId
(),
saveResumeDto
.
getFileURL
(),
saveResumeDto
.
getPositionId
(),
saveResumeDto
.
getResume
());
}
}
}
}
...
@@ -138,7 +155,8 @@ public class HumanResourceRestImpl implements HumanResourceRest {
...
@@ -138,7 +155,8 @@ public class HumanResourceRestImpl implements HumanResourceRest {
@Override
@Override
public
ResumeDto
getResumeDetail
(
Long
resumeId
)
throws
Exception
{
public
ResumeDto
getResumeDetail
(
Long
resumeId
)
throws
Exception
{
return
BizHumanResourceResumeConvert
.
entityToResumeDto
(
humanResourceService
.
getResumeDetail
(
BlContext
.
getCurrentUser
().
getUserId
(),
resumeId
));
return
BizHumanResourceResumeConvert
.
entityToResumeDto
(
humanResourceService
.
getResumeDetail
(
BlContext
.
getCurrentUser
().
getUserId
(),
resumeId
));
}
}
@Override
@Override
...
...
src/main/java/cn/com/poc/human_resources/service/BizHumanResourcePositionService.java
View file @
e246a2b6
...
@@ -11,7 +11,7 @@ import java.util.List;
...
@@ -11,7 +11,7 @@ import java.util.List;
public
interface
BizHumanResourcePositionService
extends
BaseService
{
public
interface
BizHumanResourcePositionService
extends
BaseService
{
BizHumanResourcePositionEntity
get
(
java
.
lang
.
Long
id
)
throws
Exception
;
BizHumanResourcePositionEntity
get
(
java
.
lang
.
Long
id
)
;
List
<
BizHumanResourcePositionEntity
>
findByExample
(
BizHumanResourcePositionEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
;
List
<
BizHumanResourcePositionEntity
>
findByExample
(
BizHumanResourcePositionEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
;
...
...
src/main/java/cn/com/poc/human_resources/service/impl/BizHumanResourcePositionServiceImpl.java
View file @
e246a2b6
...
@@ -27,7 +27,7 @@ public class BizHumanResourcePositionServiceImpl extends BaseServiceImpl
...
@@ -27,7 +27,7 @@ public class BizHumanResourcePositionServiceImpl extends BaseServiceImpl
@Resource
@Resource
private
BizHumanResourcePositionRepository
repository
;
private
BizHumanResourcePositionRepository
repository
;
public
BizHumanResourcePositionEntity
get
(
java
.
lang
.
Long
id
)
throws
Exception
{
public
BizHumanResourcePositionEntity
get
(
java
.
lang
.
Long
id
)
{
Assert
.
notNull
(
id
);
Assert
.
notNull
(
id
);
BizHumanResourcePositionModel
model
=
this
.
repository
.
get
(
id
);
BizHumanResourcePositionModel
model
=
this
.
repository
.
get
(
id
);
if
(
model
==
null
)
{
if
(
model
==
null
)
{
...
@@ -40,7 +40,8 @@ public class BizHumanResourcePositionServiceImpl extends BaseServiceImpl
...
@@ -40,7 +40,8 @@ public class BizHumanResourcePositionServiceImpl extends BaseServiceImpl
}
}
public
List
<
BizHumanResourcePositionEntity
>
findByExample
(
BizHumanResourcePositionEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
{
public
List
<
BizHumanResourcePositionEntity
>
findByExample
(
BizHumanResourcePositionEntity
example
,
PagingInfo
pagingInfo
)
throws
Exception
{
List
<
BizHumanResourcePositionEntity
>
result
=
new
ArrayList
<
BizHumanResourcePositionEntity
>();
List
<
BizHumanResourcePositionEntity
>
result
=
new
ArrayList
<
BizHumanResourcePositionEntity
>();
BizHumanResourcePositionModel
model
=
new
BizHumanResourcePositionModel
();
BizHumanResourcePositionModel
model
=
new
BizHumanResourcePositionModel
();
if
(
example
!=
null
)
{
if
(
example
!=
null
)
{
...
@@ -68,6 +69,9 @@ public class BizHumanResourcePositionServiceImpl extends BaseServiceImpl
...
@@ -68,6 +69,9 @@ public class BizHumanResourcePositionServiceImpl extends BaseServiceImpl
Assert
.
notNull
(
entity
.
getId
(),
"update pk can not be null"
);
Assert
.
notNull
(
entity
.
getId
(),
"update pk can not be null"
);
BizHumanResourcePositionModel
model
=
this
.
repository
.
get
(
entity
.
getId
());
BizHumanResourcePositionModel
model
=
this
.
repository
.
get
(
entity
.
getId
());
if
(
entity
.
getPostStatus
()
!=
null
)
{
model
.
setPostStatus
(
entity
.
getPostStatus
());
}
if
(
entity
.
getJobTitle
()
!=
null
)
{
if
(
entity
.
getJobTitle
()
!=
null
)
{
model
.
setJobTitle
(
entity
.
getJobTitle
());
model
.
setJobTitle
(
entity
.
getJobTitle
());
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment