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
a8d76319
Commit
a8d76319
authored
Oct 10, 2025
by
alex yao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:人力资源接口
parent
9d09427b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
116 additions
and
126 deletions
+116
-126
HumanResourceServiceImpl.java
...an_resources/aggregate/impl/HumanResourceServiceImpl.java
+1
-0
BizHumanResourcePositionConvert.java
...an_resources/convert/BizHumanResourcePositionConvert.java
+91
-22
BizHumanResourceResumeConvert.java
...uman_resources/convert/BizHumanResourceResumeConvert.java
+2
-3
BizHumanResourcePositionDto.java
.../poc/human_resources/dto/BizHumanResourcePositionDto.java
+0
-97
HumanResourcePositionBaseInfo.java
...human_resources/entity/HumanResourcePositionBaseInfo.java
+10
-0
HumanResourceRest.java
...va/cn/com/poc/human_resources/rest/HumanResourceRest.java
+1
-1
HumanResourceRestImpl.java
.../poc/human_resources/rest/impl/HumanResourceRestImpl.java
+11
-3
No files found.
src/main/java/cn/com/poc/human_resources/aggregate/impl/HumanResourceServiceImpl.java
View file @
a8d76319
...
...
@@ -194,6 +194,7 @@ public class HumanResourceServiceImpl implements HumanResourceService {
if
(
CollectionUtils
.
isNotEmpty
(
positionListQueryItems
))
{
result
=
positionListQueryItems
.
stream
().
map
(
item
->
{
HumanResourcePositionBaseInfo
baseInfo
=
new
HumanResourcePositionBaseInfo
();
baseInfo
.
setId
(
item
.
getId
());
baseInfo
.
setJobTitle
(
item
.
getJobTitle
());
baseInfo
.
setWorkLocation
(
item
.
getWorkLocation
());
baseInfo
.
setJobNature
(
item
.
getJobNature
());
...
...
src/main/java/cn/com/poc/human_resources/convert/BizHumanResourcePositionConvert.java
View file @
a8d76319
package
cn
.
com
.
poc
.
human_resources
.
convert
;
package
cn
.
com
.
poc
.
human_resources
.
convert
;
import
cn.com.poc.
human_resources.model.BizHumanResourcePositionModel
;
import
cn.com.poc.
human_resources.entity.BizHumanResourcePositionEntity
;
import
cn.com.poc.
common.utils.JsonUtils
;
import
cn.com.poc.
common.utils.StringUtils
;
import
cn.com.poc.human_resources.dto.BizHumanResourcePositionDto
;
import
cn.com.poc.human_resources.dto.HumanResourcePositionDto
;
import
cn.com.poc.human_resources.entity.BizHumanResourcePositionEntity
;
import
cn.com.poc.human_resources.entity.position.BaseInfo
;
import
cn.com.poc.human_resources.entity.position.Job
;
import
cn.com.poc.human_resources.entity.position.Por
;
import
cn.com.poc.human_resources.model.BizHumanResourcePositionModel
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
static
com
.
baidubce
.
services
.
bcc
.
model
.
deployset
.
DeploySetAction
.
list
;
public
class
BizHumanResourcePositionConvert
{
public
static
BizHumanResourcePositionEntity
modelToEntity
(
BizHumanResourcePositionModel
model
){
public
static
BizHumanResourcePositionEntity
modelToEntity
(
BizHumanResourcePositionModel
model
)
{
BizHumanResourcePositionEntity
entity
=
new
BizHumanResourcePositionEntity
();
entity
.
setId
(
model
.
getId
());
entity
.
setJobTitle
(
model
.
getJobTitle
());
...
...
@@ -33,7 +49,7 @@ public class BizHumanResourcePositionConvert {
return
entity
;
}
public
static
BizHumanResourcePositionModel
entityToModel
(
BizHumanResourcePositionEntity
entity
){
public
static
BizHumanResourcePositionModel
entityToModel
(
BizHumanResourcePositionEntity
entity
)
{
BizHumanResourcePositionModel
model
=
new
BizHumanResourcePositionModel
();
model
.
setId
(
entity
.
getId
());
model
.
setJobTitle
(
entity
.
getJobTitle
());
...
...
@@ -58,8 +74,8 @@ public class BizHumanResourcePositionConvert {
model
.
setSysVersion
(
entity
.
getSysVersion
());
return
model
;
}
public
static
BizHumanResourcePositionDto
entityToDto
(
BizHumanResourcePositionEntity
entity
){
public
static
BizHumanResourcePositionDto
entityToDto
(
BizHumanResourcePositionEntity
entity
)
{
BizHumanResourcePositionDto
dto
=
new
BizHumanResourcePositionDto
();
dto
.
setId
(
entity
.
getId
());
dto
.
setJobTitle
(
entity
.
getJobTitle
());
...
...
@@ -75,17 +91,10 @@ public class BizHumanResourcePositionConvert {
dto
.
setEssential
(
entity
.
getEssential
());
dto
.
setBonusPoints
(
entity
.
getBonusPoints
());
dto
.
setExclusion
(
entity
.
getExclusion
());
dto
.
setMemberId
(
entity
.
getMemberId
());
dto
.
setIsDeleted
(
entity
.
getIsDeleted
());
dto
.
setCreator
(
entity
.
getCreator
());
dto
.
setCreatedTime
(
entity
.
getCreatedTime
());
dto
.
setModifier
(
entity
.
getModifier
());
dto
.
setModifiedTime
(
entity
.
getModifiedTime
());
dto
.
setSysVersion
(
entity
.
getSysVersion
());
return
dto
;
}
public
static
BizHumanResourcePositionEntity
dtoToEntity
(
BizHumanResourcePositionDto
dto
){
public
static
BizHumanResourcePositionEntity
dtoToEntity
(
BizHumanResourcePositionDto
dto
)
{
BizHumanResourcePositionEntity
entity
=
new
BizHumanResourcePositionEntity
();
entity
.
setId
(
dto
.
getId
());
entity
.
setJobTitle
(
dto
.
getJobTitle
());
...
...
@@ -101,13 +110,73 @@ public class BizHumanResourcePositionConvert {
entity
.
setEssential
(
dto
.
getEssential
());
entity
.
setBonusPoints
(
dto
.
getBonusPoints
());
entity
.
setExclusion
(
dto
.
getExclusion
());
entity
.
setMemberId
(
dto
.
getMemberId
());
entity
.
setIsDeleted
(
dto
.
getIsDeleted
());
entity
.
setCreator
(
dto
.
getCreator
());
entity
.
setCreatedTime
(
dto
.
getCreatedTime
());
entity
.
setModifier
(
dto
.
getModifier
());
entity
.
setModifiedTime
(
dto
.
getModifiedTime
());
entity
.
setSysVersion
(
dto
.
getSysVersion
());
return
entity
;
}
public
static
HumanResourcePositionDto
entityToHumanResourcePositionDto
(
BizHumanResourcePositionEntity
positionEntity
)
{
HumanResourcePositionDto
resourcePositionDto
=
new
HumanResourcePositionDto
();
BaseInfo
baseInfo
=
new
BaseInfo
();
baseInfo
.
setJobTitle
(
positionEntity
.
getJobTitle
());
baseInfo
.
setDepartment
(
positionEntity
.
getDepartment
());
baseInfo
.
setWorkLocation
(
positionEntity
.
getWorkLocation
());
baseInfo
.
setJobNature
(
positionEntity
.
getJobNature
());
baseInfo
.
setNumberOfRecruits
(
positionEntity
.
getNumberOfRecruits
());
baseInfo
.
setWorkExperience
(
positionEntity
.
getWorkExperience
());
baseInfo
.
setEducationalRe
(
positionEntity
.
getEducationalRe
());
baseInfo
.
setSalaryRange
(
positionEntity
.
getSalaryRange
());
resourcePositionDto
.
setBaseInfo
(
baseInfo
);
Job
job
=
new
Job
();
job
.
setJobDuties
(
positionEntity
.
getJobDuties
());
job
.
setJobRequirements
(
positionEntity
.
getJobRequirements
());
resourcePositionDto
.
setJob
(
job
);
Por
por
=
new
Por
();
if
(
StringUtils
.
isNotBlank
(
positionEntity
.
getEssential
()))
{
JSONArray
jsonArray
=
JSONObject
.
parseArray
(
positionEntity
.
getEssential
());
List
<
Map
<
String
,
String
>>
list
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
JSONObject
jsonObject
=
jsonArray
.
getJSONObject
(
i
);
for
(
String
key
:
jsonObject
.
keySet
())
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
key
,
jsonObject
.
getString
(
key
));
list
.
add
(
map
);
}
}
por
.
setEssential
(
list
);
}
if
(
StringUtils
.
isNotBlank
(
positionEntity
.
getBonusPoints
()))
{
JSONArray
jsonArray
=
JSONObject
.
parseArray
(
positionEntity
.
getBonusPoints
());
List
<
Map
<
String
,
String
>>
list
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
JSONObject
jsonObject
=
jsonArray
.
getJSONObject
(
i
);
for
(
String
key
:
jsonObject
.
keySet
())
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
key
,
jsonObject
.
getString
(
key
));
list
.
add
(
map
);
}
}
por
.
setBonusPoints
(
list
);
}
if
(
StringUtils
.
isNotBlank
(
positionEntity
.
getExclusion
()))
{
JSONArray
jsonArray
=
JSONObject
.
parseArray
(
positionEntity
.
getExclusion
());
List
<
Map
<
String
,
String
>>
list
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
jsonArray
.
size
();
i
++)
{
JSONObject
jsonObject
=
jsonArray
.
getJSONObject
(
i
);
for
(
String
key
:
jsonObject
.
keySet
())
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
key
,
jsonObject
.
getString
(
key
));
list
.
add
(
map
);
}
}
por
.
setExclusion
(
list
);
}
resourcePositionDto
.
setPor
(
por
);
return
resourcePositionDto
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/human_resources/convert/BizHumanResourceResumeConvert.java
View file @
a8d76319
package
cn
.
com
.
poc
.
human_resources
.
convert
;
import
cn.com.poc.common.utils.JsonUtils
;
import
cn.com.poc.human_resources.dto.BizHumanResourceResumeDto
;
import
cn.com.poc.human_resources.dto.ResumeDto
;
import
cn.com.poc.human_resources.entity.BizHumanResourceResumeEntity
;
import
cn.com.poc.human_resources.entity.resume.Info
;
import
cn.com.poc.human_resources.entity.resume.Resume
;
import
cn.com.poc.human_resources.entity.resume.Tag
;
import
cn.com.poc.human_resources.model.BizHumanResourceResumeModel
;
import
cn.com.poc.human_resources.entity.BizHumanResourceResumeEntity
;
import
cn.com.poc.human_resources.dto.BizHumanResourceResumeDto
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
org.apache.avro.data.Json
;
import
java.util.List
;
...
...
src/main/java/cn/com/poc/human_resources/dto/BizHumanResourcePositionDto.java
View file @
a8d76319
...
...
@@ -201,101 +201,4 @@ public class BizHumanResourcePositionDto {
this
.
exclusion
=
exclusion
;
}
/**
* member_id
* 创建人ID
*/
private
java
.
lang
.
Long
memberId
;
public
java
.
lang
.
Long
getMemberId
()
{
return
this
.
memberId
;
}
public
void
setMemberId
(
java
.
lang
.
Long
memberId
)
{
this
.
memberId
=
memberId
;
}
/**
* is_deleted
* 是否删除 1、Y 是 2、N 否
*/
private
java
.
lang
.
String
isDeleted
;
public
java
.
lang
.
String
getIsDeleted
()
{
return
this
.
isDeleted
;
}
public
void
setIsDeleted
(
java
.
lang
.
String
isDeleted
)
{
this
.
isDeleted
=
isDeleted
;
}
/**
* CREATOR
* 创建人
*/
private
java
.
lang
.
String
creator
;
public
java
.
lang
.
String
getCreator
()
{
return
this
.
creator
;
}
public
void
setCreator
(
java
.
lang
.
String
creator
)
{
this
.
creator
=
creator
;
}
/**
* CREATED_TIME
* 创建时间
*/
private
java
.
util
.
Date
createdTime
;
public
java
.
util
.
Date
getCreatedTime
()
{
return
this
.
createdTime
;
}
public
void
setCreatedTime
(
java
.
util
.
Date
createdTime
)
{
this
.
createdTime
=
createdTime
;
}
/**
* MODIFIER
* 修改人
*/
private
java
.
lang
.
String
modifier
;
public
java
.
lang
.
String
getModifier
()
{
return
this
.
modifier
;
}
public
void
setModifier
(
java
.
lang
.
String
modifier
)
{
this
.
modifier
=
modifier
;
}
/**
* MODIFIED_TIME
* 修改时间
*/
private
java
.
util
.
Date
modifiedTime
;
public
java
.
util
.
Date
getModifiedTime
()
{
return
this
.
modifiedTime
;
}
public
void
setModifiedTime
(
java
.
util
.
Date
modifiedTime
)
{
this
.
modifiedTime
=
modifiedTime
;
}
/**
* SYS_VERSION
* 乐观锁,版本号
*/
private
java
.
lang
.
Integer
sysVersion
;
public
java
.
lang
.
Integer
getSysVersion
()
{
return
this
.
sysVersion
;
}
public
void
setSysVersion
(
java
.
lang
.
Integer
sysVersion
)
{
this
.
sysVersion
=
sysVersion
;
}
}
\ No newline at end of file
src/main/java/cn/com/poc/human_resources/entity/HumanResourcePositionBaseInfo.java
View file @
a8d76319
...
...
@@ -6,6 +6,16 @@ package cn.com.poc.human_resources.entity;
*/
public
class
HumanResourcePositionBaseInfo
{
private
Long
id
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
/**
* job_title
* 职位名称
...
...
src/main/java/cn/com/poc/human_resources/rest/HumanResourceRest.java
View file @
a8d76319
...
...
@@ -54,7 +54,7 @@ public interface HumanResourceRest extends BaseRest {
*
* @param positionId 职位id
*/
Biz
HumanResourcePositionDto
getPositionDetail
(
@RequestParam
Long
positionId
)
throws
Exception
;
HumanResourcePositionDto
getPositionDetail
(
@RequestParam
Long
positionId
)
throws
Exception
;
/**
* 删除职位[批量]
...
...
src/main/java/cn/com/poc/human_resources/rest/impl/HumanResourceRestImpl.java
View file @
a8d76319
...
...
@@ -6,8 +6,10 @@ import cn.com.poc.human_resources.aggregate.HumanResourceService;
import
cn.com.poc.human_resources.convert.BizHumanResourcePositionConvert
;
import
cn.com.poc.human_resources.convert.BizHumanResourceResumeConvert
;
import
cn.com.poc.human_resources.dto.*
;
import
cn.com.poc.human_resources.entity.BizHumanResourcePositionEntity
;
import
cn.com.poc.human_resources.entity.HumanResourcePositionBaseInfo
;
import
cn.com.poc.human_resources.rest.HumanResourceRest
;
import
cn.com.yict.framemax.core.exception.BusinessException
;
import
cn.com.yict.framemax.data.model.PagingInfo
;
import
org.springframework.stereotype.Component
;
...
...
@@ -84,6 +86,7 @@ public class HumanResourceRestImpl implements HumanResourceRest {
return
humanResourcePositionBaseInfos
.
stream
()
.
map
(
info
->
{
HumanResourcePositionBaseInfoDto
dto
=
new
HumanResourcePositionBaseInfoDto
();
dto
.
setId
(
info
.
getId
());
dto
.
setJobTitle
(
info
.
getJobTitle
());
dto
.
setWorkLocation
(
info
.
getWorkLocation
());
dto
.
setJobNature
(
info
.
getJobNature
());
...
...
@@ -92,12 +95,17 @@ public class HumanResourceRestImpl implements HumanResourceRest {
return
dto
;
})
.
collect
(
Collectors
.
toList
());
}
@Override
public
BizHumanResourcePositionDto
getPositionDetail
(
Long
positionId
)
throws
Exception
{
return
BizHumanResourcePositionConvert
.
entityToDto
(
humanResourceService
.
getPositionDetail
(
BlContext
.
getCurrentUser
().
getUserId
(),
positionId
));
public
HumanResourcePositionDto
getPositionDetail
(
Long
positionId
)
throws
Exception
{
BizHumanResourcePositionEntity
positionEntity
=
humanResourceService
.
getPositionDetail
(
BlContext
.
getCurrentUser
().
getUserId
(),
positionId
);
if
(
positionEntity
==
null
)
{
throw
new
BusinessException
(
"该岗位信息不存在"
);
}
HumanResourcePositionDto
resourcePositionDto
=
BizHumanResourcePositionConvert
.
entityToHumanResourcePositionDto
(
positionEntity
);
resourcePositionDto
.
setId
(
positionId
);
return
resourcePositionDto
;
}
@Override
...
...
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