Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
0
Merge Requests
0
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
fangxinjiang
yifu-mvp
Commits
cfc89bbd
Commit
cfc89bbd
authored
Jun 18, 2025
by
chenyuxi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 瓜子档案详情接口
parent
578369c2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
195 additions
and
10 deletions
+195
-10
TGzEmpInfo.java
...m/yifu/cloud/plus/v1/yifu/archives/entity/TGzEmpInfo.java
+5
-5
TGzEmpInfoSearchVo.java
...fu/cloud/plus/v1/yifu/archives/vo/TGzEmpInfoSearchVo.java
+33
-1
TGzEmpInfoController.java
...lus/v1/yifu/archives/controller/TGzEmpInfoController.java
+13
-2
TGzEmpInfoService.java
...loud/plus/v1/yifu/archives/service/TGzEmpInfoService.java
+8
-0
TGzEmpInfoServiceImpl.java
.../v1/yifu/archives/service/impl/TGzEmpInfoServiceImpl.java
+136
-2
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TGzEmpInfo.java
View file @
cfc89bbd
...
@@ -178,7 +178,7 @@ public class TGzEmpInfo extends BaseEntity {
...
@@ -178,7 +178,7 @@ public class TGzEmpInfo extends BaseEntity {
* 婚姻状态
* 婚姻状态
*/
*/
@ExcelAttribute
(
name
=
"婚姻状态"
,
maxLength
=
1
)
@ExcelAttribute
(
name
=
"婚姻状态"
,
maxLength
=
1
)
@Length
(
max
=
1
,
message
=
"婚姻状态不能超过1个字符"
)
@Length
(
max
=
3
,
message
=
"婚姻状态不能超过1个字符"
)
@ExcelProperty
(
"婚姻状态"
)
@ExcelProperty
(
"婚姻状态"
)
@Schema
(
description
=
"婚姻状态"
)
@Schema
(
description
=
"婚姻状态"
)
private
String
marStatus
;
private
String
marStatus
;
...
@@ -193,10 +193,10 @@ public class TGzEmpInfo extends BaseEntity {
...
@@ -193,10 +193,10 @@ public class TGzEmpInfo extends BaseEntity {
/**
/**
* 是否新参社保(Y:是 N:否)
* 是否新参社保(Y:是 N:否)
*/
*/
@ExcelAttribute
(
name
=
"是否新参社保
(Y:是 N:否)"
,
maxLength
=
1
)
@ExcelAttribute
(
name
=
"是否新参社保
"
,
maxLength
=
3
)
@Length
(
max
=
1
,
message
=
"是否新参社保(Y:是 N:否)不能超过1
个字符"
)
@Length
(
max
=
3
,
message
=
"是否新参社保不能超过3
个字符"
)
@ExcelProperty
(
"是否新参社保
(Y:是 N:否)
"
)
@ExcelProperty
(
"是否新参社保"
)
@Schema
(
description
=
"是否新参社保
(Y:是 N:否)
"
)
@Schema
(
description
=
"是否新参社保"
)
private
String
insuranceSta
;
private
String
insuranceSta
;
/**
/**
* 驾照类型
* 驾照类型
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TGzEmpInfoSearchVo.java
View file @
cfc89bbd
...
@@ -16,10 +16,12 @@
...
@@ -16,10 +16,12 @@
*/
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.*
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TGzEmpInfo
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.List
;
/**
/**
* 瓜子档案表
* 瓜子档案表
*
*
...
@@ -46,4 +48,34 @@ public class TGzEmpInfoSearchVo extends TGzEmpInfo {
...
@@ -46,4 +48,34 @@ public class TGzEmpInfoSearchVo extends TGzEmpInfo {
**/
**/
private
int
limitEnd
;
private
int
limitEnd
;
/**
* 紧急联系人列表
*/
private
List
<
TGzEmpContactInfo
>
emergContactList
;
/**
* 教育经历列表
*/
private
List
<
TGzEmpEducation
>
eduExpList
;
/**
* 家庭成员列表
*/
private
List
<
TGzEmpFamily
>
familyList
;
/**
* 工作经历列表
*/
private
List
<
TGzEmpWork
>
workExpList
;
/**
* 技能证书列表
*/
private
List
<
TGzEmpSkill
>
skillList
;
/**
* 附件列表
*/
private
List
<
TAttaInfo
>
attaList
;
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TGzEmpInfoController.java
View file @
cfc89bbd
...
@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TGzEmpInfo;
...
@@ -25,6 +25,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TGzEmpInfo;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TGzEmpInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TGzEmpInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TGzEmpInfoSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TGzEmpInfoSearchVo
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
...
@@ -76,6 +77,18 @@ public class TGzEmpInfoController {
...
@@ -76,6 +77,18 @@ public class TGzEmpInfoController {
return
R
.
ok
(
tGzEmpInfoService
.
noPageDiy
(
tGzEmpInfo
));
return
R
.
ok
(
tGzEmpInfoService
.
noPageDiy
(
tGzEmpInfo
));
}
}
/**
* 通过OfferId查询瓜子档案详情
*
* @param offerId OfferId
* @return R
*/
@Operation
(
summary
=
"通过OfferId查询瓜子档案详情"
)
@GetMapping
(
"/getInfoByOfferId"
)
public
R
<
TGzEmpInfoSearchVo
>
getInfoByOfferId
(
@Param
(
"offerId"
)
Integer
offerId
)
{
return
tGzEmpInfoService
.
getInfoByOfferId
(
offerId
);
}
/**
/**
* 通过id查询瓜子档案表
* 通过id查询瓜子档案表
*
*
...
@@ -135,8 +148,6 @@ public class TGzEmpInfoController {
...
@@ -135,8 +148,6 @@ public class TGzEmpInfoController {
/**
/**
* 瓜子档案表 批量导出
* 瓜子档案表 批量导出
*
*
* @author chenyx
* @date 2025-06-13 15:19:03
**/
**/
@Operation
(
description
=
"导出瓜子档案表 hasPermission('archives_tgzempinfo-export')"
)
@Operation
(
description
=
"导出瓜子档案表 hasPermission('archives_tgzempinfo-export')"
)
@PostMapping
(
"/export"
)
@PostMapping
(
"/export"
)
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TGzEmpInfoService.java
View file @
cfc89bbd
...
@@ -47,4 +47,12 @@ public interface TGzEmpInfoService extends IService<TGzEmpInfo> {
...
@@ -47,4 +47,12 @@ public interface TGzEmpInfoService extends IService<TGzEmpInfo> {
void
listExport
(
HttpServletResponse
response
,
TGzEmpInfoSearchVo
searchVo
);
void
listExport
(
HttpServletResponse
response
,
TGzEmpInfoSearchVo
searchVo
);
List
<
TGzEmpInfo
>
noPageDiy
(
TGzEmpInfoSearchVo
searchVo
);
List
<
TGzEmpInfo
>
noPageDiy
(
TGzEmpInfoSearchVo
searchVo
);
/**
* 通过OfferId查询瓜子档案详情
*
* @param offerId OfferId
* @return R
*/
R
<
TGzEmpInfoSearchVo
>
getInfoByOfferId
(
Integer
offerId
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TGzEmpInfoServiceImpl.java
View file @
cfc89bbd
...
@@ -16,12 +16,17 @@
...
@@ -16,12 +16,17 @@
*/
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
.
impl
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TGzEmpInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TGzEmpInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.*
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TAttaInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TGzEmpInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TGzEmpInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TGzOfferInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.util.IdCardUtil
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
...
@@ -29,6 +34,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TGzEmpInfoSearchVo;
...
@@ -29,6 +34,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.TGzEmpInfoSearchVo;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.net.URL
;
import
java.util.List
;
import
java.util.List
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
...
@@ -63,6 +69,25 @@ import java.util.ArrayList;
...
@@ -63,6 +69,25 @@ import java.util.ArrayList;
@Service
@Service
@RequiredArgsConstructor
@RequiredArgsConstructor
public
class
TGzEmpInfoServiceImpl
extends
ServiceImpl
<
TGzEmpInfoMapper
,
TGzEmpInfo
>
implements
TGzEmpInfoService
{
public
class
TGzEmpInfoServiceImpl
extends
ServiceImpl
<
TGzEmpInfoMapper
,
TGzEmpInfo
>
implements
TGzEmpInfoService
{
private
final
TGzOfferInfoService
gzOfferInfoService
;
private
final
TGzEmpContactInfoMapper
gzEmpContactInfoMapper
;
private
final
TGzEmpEducationMapper
gzEmpEducationMapper
;
private
final
TGzEmpFamilyMapper
gzEmpFamilyMapper
;
private
final
TGzEmpSkillMapper
gzEmpSkillMapper
;
private
final
TGzEmpWorkMapper
gzEmpWorkMapper
;
private
final
TAttaInfoService
attaInfoService
;
@Autowired
private
OSSUtil
ossUtil
;
/**
/**
* 瓜子档案表简单分页查询
* 瓜子档案表简单分页查询
*
*
...
@@ -74,6 +99,115 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
...
@@ -74,6 +99,115 @@ public class TGzEmpInfoServiceImpl extends ServiceImpl<TGzEmpInfoMapper, TGzEmpI
return
baseMapper
.
getTGzEmpInfoPage
(
page
,
tGzEmpInfo
);
return
baseMapper
.
getTGzEmpInfoPage
(
page
,
tGzEmpInfo
);
}
}
/**
* 通过OfferId查询瓜子档案详情
*
* @param offerId OfferId
* @return R
*/
@Override
public
R
<
TGzEmpInfoSearchVo
>
getInfoByOfferId
(
Integer
offerId
)
{
TGzEmpInfoSearchVo
gzEmpInfoVo
=
new
TGzEmpInfoSearchVo
();
TGzOfferInfo
gzOfferInfo
=
gzOfferInfoService
.
getOne
(
Wrappers
.<
TGzOfferInfo
>
query
().
lambda
()
.
eq
(
TGzOfferInfo:
:
getId
,
offerId
)
.
eq
(
TGzOfferInfo:
:
getDelFlag
,
CommonConstants
.
ZERO_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isEmpty
(
gzOfferInfo
)){
return
R
.
failed
(
"数据异常,禁止操作"
);
}
if
(!
CommonConstants
.
NINE_STRING
.
equals
(
gzOfferInfo
.
getOfferStatus
())){
return
R
.
failed
(
"当前Offer不符合档案采集状态,禁止操作"
);
}
TGzEmpInfo
gzEmpInfo
=
this
.
getOne
(
Wrappers
.<
TGzEmpInfo
>
query
().
lambda
()
.
eq
(
TGzEmpInfo:
:
getOfferId
,
offerId
)
.
eq
(
TGzEmpInfo:
:
getDelFlag
,
CommonConstants
.
ZERO_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
// 还未生成档案,取offer里的信息
if
(
Common
.
isEmpty
(
gzEmpInfo
)){
gzEmpInfoVo
.
setOfferId
(
offerId
);
gzEmpInfoVo
.
setName
(
gzOfferInfo
.
getName
());
gzEmpInfoVo
.
setNameAc
(
gzOfferInfo
.
getNameAc
());
gzEmpInfoVo
.
setNationalIdType
(
gzOfferInfo
.
getNationalIdType
());
gzEmpInfoVo
.
setNationalId
(
gzOfferInfo
.
getNationalId
());
// 根据身份证得出 出生日期和性别
if
(
Common
.
isNotNull
(
gzEmpInfoVo
.
getNationalId
())
&&
gzEmpInfoVo
.
getNationalId
().
length
()
>
14
){
String
idCard
=
gzEmpInfoVo
.
getNationalId
();
gzEmpInfoVo
.
setBirthdate
(
IdCardUtil
.
getBirthdate
(
idCard
));
// 性别: F:女,M:男
if
(
idCard
.
length
()
>
17
)
{
if
(
Integer
.
parseInt
(
idCard
.
substring
(
16
,
17
))
%
2
==
1
)
{
gzEmpInfoVo
.
setSex
(
"M"
);
}
else
{
gzEmpInfoVo
.
setSex
(
"F"
);
}
}
}
gzEmpInfoVo
.
setPhone
(
gzOfferInfo
.
getPhone
());
gzEmpInfoVo
.
setMail
(
gzOfferInfo
.
getEmail
());
// 地址类型: 系统存默认值“现住址”:1A
gzEmpInfoVo
.
setAddressType
(
"1A"
);
}
else
{
BeanUtil
.
copyProperties
(
gzEmpInfo
,
gzEmpInfoVo
);
// 获取瓜子档案附属信息
// 紧急联系人
LambdaQueryWrapper
<
TGzEmpContactInfo
>
queryContactInfo
=
Wrappers
.<
TGzEmpContactInfo
>
lambdaQuery
()
.
eq
(
TGzEmpContactInfo:
:
getEmpId
,
gzEmpInfo
.
getId
())
.
eq
(
TGzEmpContactInfo:
:
getDelFlag
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TGzEmpContactInfo:
:
getPrimaryNid
,
"Y"
)
.
last
(
" limit 1 "
);
List
<
TGzEmpContactInfo
>
emergContactList
=
gzEmpContactInfoMapper
.
selectList
(
queryContactInfo
);
gzEmpInfoVo
.
setEmergContactList
(
emergContactList
);
// 教育经历
LambdaQueryWrapper
<
TGzEmpEducation
>
queryEduInfo
=
Wrappers
.<
TGzEmpEducation
>
lambdaQuery
()
.
eq
(
TGzEmpEducation:
:
getEmpId
,
gzEmpInfo
.
getId
())
.
eq
(
TGzEmpEducation:
:
getDelFlag
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
TGzEmpEducation:
:
getHighEduQualFlag
,
"Y"
)
.
last
(
" limit 1 "
);
List
<
TGzEmpEducation
>
eduList
=
gzEmpEducationMapper
.
selectList
(
queryEduInfo
);
gzEmpInfoVo
.
setEduExpList
(
eduList
);
// 工作经历列表
LambdaQueryWrapper
<
TGzEmpWork
>
queryWorkInfo
=
Wrappers
.<
TGzEmpWork
>
lambdaQuery
()
.
eq
(
TGzEmpWork:
:
getEmpId
,
gzEmpInfo
.
getId
())
.
eq
(
TGzEmpWork:
:
getDelFlag
,
CommonConstants
.
ZERO_STRING
)
.
orderByAsc
(
TGzEmpWork:
:
getCreateTime
).
orderByAsc
(
TGzEmpWork:
:
getId
);
List
<
TGzEmpWork
>
workList
=
gzEmpWorkMapper
.
selectList
(
queryWorkInfo
);
gzEmpInfoVo
.
setWorkExpList
(
workList
);
// 家庭成员列表
LambdaQueryWrapper
<
TGzEmpFamily
>
queryFamilyInfo
=
Wrappers
.<
TGzEmpFamily
>
lambdaQuery
()
.
eq
(
TGzEmpFamily:
:
getEmpId
,
gzEmpInfo
.
getId
())
.
eq
(
TGzEmpFamily:
:
getDelFlag
,
CommonConstants
.
ZERO_STRING
)
.
orderByAsc
(
TGzEmpFamily:
:
getCreateTime
).
orderByAsc
(
TGzEmpFamily:
:
getId
);
List
<
TGzEmpFamily
>
familyList
=
gzEmpFamilyMapper
.
selectList
(
queryFamilyInfo
);
gzEmpInfoVo
.
setFamilyList
(
familyList
);
// 技能证书列表
LambdaQueryWrapper
<
TGzEmpSkill
>
querySkillInfo
=
Wrappers
.<
TGzEmpSkill
>
lambdaQuery
()
.
eq
(
TGzEmpSkill:
:
getEmpId
,
gzEmpInfo
.
getId
())
.
eq
(
TGzEmpSkill:
:
getDelFlag
,
CommonConstants
.
ZERO_STRING
)
.
orderByAsc
(
TGzEmpSkill:
:
getCreateTime
).
orderByAsc
(
TGzEmpSkill:
:
getId
);
List
<
TGzEmpSkill
>
skillList
=
gzEmpSkillMapper
.
selectList
(
querySkillInfo
);
gzEmpInfoVo
.
setSkillList
(
skillList
);
// 附件
List
<
TAttaInfo
>
attaInfos
=
attaInfoService
.
list
(
Wrappers
.<
TAttaInfo
>
query
().
lambda
().
eq
(
TAttaInfo:
:
getDomainId
,
gzEmpInfo
.
getId
()));
if
(
Common
.
isNotNull
(
attaInfos
))
{
URL
url
;
for
(
TAttaInfo
atta
:
attaInfos
)
{
url
=
ossUtil
.
getObjectUrl
(
null
,
atta
.
getAttaSrc
());
if
(
Common
.
isNotNull
(
url
))
{
atta
.
setAttaUrl
(
url
.
toString
());
}
}
}
gzEmpInfoVo
.
setAttaList
(
attaInfos
);
}
return
R
.
ok
(
gzEmpInfoVo
);
}
/**
/**
* 瓜子档案表批量导出
* 瓜子档案表批量导出
*
*
...
...
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