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
d6d3c102
Commit
d6d3c102
authored
Jun 20, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
学历信息接口更新
parent
04c3e418
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
227 additions
and
59 deletions
+227
-59
EmpEducationExcelVO.java
...u/cloud/plus/v1/yifu/archives/vo/EmpEducationExcelVO.java
+0
-2
EmpEducationUpdateVo.java
.../cloud/plus/v1/yifu/archives/vo/EmpEducationUpdateVo.java
+20
-0
TCustomerInfoController.java
.../v1/yifu/archives/controller/TCustomerInfoController.java
+0
-2
TCutsomerDataPermissonController.java
...archives/controller/TCutsomerDataPermissonController.java
+0
-2
TElecEmployeeInfoController.java
...yifu/archives/controller/TElecEmployeeInfoController.java
+0
-2
TEmpChangeInfoController.java
...v1/yifu/archives/controller/TEmpChangeInfoController.java
+0
-2
TEmpDisabilityInfoController.java
...ifu/archives/controller/TEmpDisabilityInfoController.java
+0
-4
TEmpEducationController.java
.../v1/yifu/archives/controller/TEmpEducationController.java
+3
-5
TEmpFamilyController.java
...lus/v1/yifu/archives/controller/TEmpFamilyController.java
+0
-2
TEmpProfessionalQualificationController.java
...s/controller/TEmpProfessionalQualificationController.java
+0
-2
TEmpWorkRecordingController.java
...yifu/archives/controller/TEmpWorkRecordingController.java
+0
-2
TEmployeeInfoController.java
.../v1/yifu/archives/controller/TEmployeeInfoController.java
+1
-3
TEmployeeLogController.java
...s/v1/yifu/archives/controller/TEmployeeLogController.java
+0
-2
TEmployeeProjectController.java
.../yifu/archives/controller/TEmployeeProjectController.java
+1
-3
TSettleDomainController.java
.../v1/yifu/archives/controller/TSettleDomainController.java
+0
-2
TEmployeeInfoMapper.java
...oud/plus/v1/yifu/archives/mapper/TEmployeeInfoMapper.java
+3
-0
TEmpEducationService.java
...d/plus/v1/yifu/archives/service/TEmpEducationService.java
+4
-0
TEmployeeInfoService.java
...d/plus/v1/yifu/archives/service/TEmployeeInfoService.java
+2
-0
TEmpDisabilityInfoServiceImpl.java
.../archives/service/impl/TEmpDisabilityInfoServiceImpl.java
+0
-2
TEmpEducationServiceImpl.java
.../yifu/archives/service/impl/TEmpEducationServiceImpl.java
+148
-2
TEmpFamilyServiceImpl.java
.../v1/yifu/archives/service/impl/TEmpFamilyServiceImpl.java
+1
-7
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+5
-0
TEmployeeInfoMapper.xml
...ves-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
+13
-0
CommonConstants.java
...ud.plus.v1/yifu/common/core/constant/CommonConstants.java
+20
-13
ErrorCodes.java
....cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
+5
-0
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+1
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmpEducationExcelVO.java
View file @
d6d3c102
...
...
@@ -53,8 +53,6 @@ public class EmpEducationExcelVO implements Serializable {
@Schema
(
description
=
"学历"
)
private
String
educationName
;
/**
* 学校名称
*/
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmpEducationUpdateVo.java
0 → 100644
View file @
d6d3c102
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpEducation
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
/**
* @Author fxj
* @Date 2022/6/20
* @Description
* @Version 1.0
*/
@Data
public
class
EmpEducationUpdateVo
extends
TEmpEducation
{
/**
* 是否大专及以上(0否1是)
*/
@Schema
(
description
=
"是否大专及以上(0否1是)"
)
private
Integer
isCollege
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TCustomerInfoController.java
View file @
d6d3c102
...
...
@@ -25,10 +25,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TCustomerInfoService;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TCutsomerDataPermissonController.java
View file @
d6d3c102
...
...
@@ -25,10 +25,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TCutsomerDataPermissonServic
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TElecEmployeeInfoController.java
View file @
d6d3c102
...
...
@@ -24,10 +24,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TElecEmployeeInfoService;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmpChangeInfoController.java
View file @
d6d3c102
...
...
@@ -24,10 +24,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpChangeInfoService;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmpDisabilityInfoController.java
View file @
d6d3c102
...
...
@@ -21,23 +21,19 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.pig4cloud.plugin.excel.annotation.RequestExcel
;
import
com.pig4cloud.plugin.excel.vo.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.PostExcelVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpDisabilityInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmpDisabilityInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmpDisabilityExcelVO
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.annotation.*
;
import
java.net.URLDecoder
;
import
java.util.List
;
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmpEducationController.java
View file @
d6d3c102
...
...
@@ -25,16 +25,13 @@ import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpEducation
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmpEducationService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationExcelVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmpWorkRecordExcelVO
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -92,7 +89,7 @@ public class TEmpEducationController {
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('archives_tempeducation_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
TEmpEducation
tEmpEducation
)
{
return
R
.
ok
(
tEmpEducationService
.
save
(
tEmpEducation
)
);
return
tEmpEducationService
.
saveDiy
(
tEmpEducation
);
}
/**
...
...
@@ -105,7 +102,7 @@ public class TEmpEducationController {
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('archives_tempeducation_edit')"
)
public
R
<
Boolean
>
updateById
(
@RequestBody
TEmpEducation
tEmpEducation
)
{
return
R
.
ok
(
tEmpEducationService
.
updateById
(
tEmpEducation
)
);
return
tEmpEducationService
.
updateByIdDiy
(
tEmpEducation
);
}
/**
...
...
@@ -120,6 +117,7 @@ public class TEmpEducationController {
public
R
<
Boolean
>
removeById
(
@PathVariable
Long
id
)
{
return
R
.
ok
(
tEmpEducationService
.
removeById
(
id
));
}
/**
* 通过id删除员工学历信息表
* @param ids
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmpFamilyController.java
View file @
d6d3c102
...
...
@@ -30,10 +30,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.annotation.*
;
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmpProfessionalQualificationController.java
View file @
d6d3c102
...
...
@@ -24,10 +24,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TEmpProfessionalQualificatio
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmpWorkRecordingController.java
View file @
d6d3c102
...
...
@@ -30,10 +30,8 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.annotation.*
;
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeInfoController.java
View file @
d6d3c102
...
...
@@ -25,10 +25,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeInfoService;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -56,7 +54,7 @@ public class TEmployeeInfoController {
*/
@Operation
(
summary
=
"分页查询"
,
description
=
"分页查询"
)
@GetMapping
(
"/page"
)
@PreAuthorize
(
"@pms.hasPermission('demo_temployeeinfo_get')"
)
//
@PreAuthorize("@pms.hasPermission('demo_temployeeinfo_get')")
public
R
<
IPage
<
TEmployeeInfo
>>
getTEmployeeInfoPage
(
Page
<
TEmployeeInfo
>
page
,
TEmployeeInfo
tEmployeeInfo
)
{
return
R
.
ok
(
tEmployeeInfoService
.
page
(
page
,
Wrappers
.
query
(
tEmployeeInfo
)));
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeLogController.java
View file @
d6d3c102
...
...
@@ -25,10 +25,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeLogService;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeProjectController.java
View file @
d6d3c102
...
...
@@ -23,12 +23,10 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.
http.HttpHeaders
;
import
org.springframework.
security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TSettleDomainController.java
View file @
d6d3c102
...
...
@@ -25,10 +25,8 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TEmployeeInfoMapper.java
View file @
d6d3c102
...
...
@@ -19,7 +19,9 @@ package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationUpdateVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* 人员档案表
...
...
@@ -30,4 +32,5 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public
interface
TEmployeeInfoMapper
extends
BaseMapper
<
TEmployeeInfo
>
{
int
updateEducationOfEmp
(
@Param
(
"education"
)
EmpEducationUpdateVo
education
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmpEducationService.java
View file @
d6d3c102
...
...
@@ -35,4 +35,8 @@ import java.util.List;
public
interface
TEmpEducationService
extends
IService
<
TEmpEducation
>
{
R
<
List
<
ErrorMessage
>>
importEmpEducation
(
List
<
EmpEducationExcelVO
>
excelVOList
,
BindingResult
bindingResult
);
R
<
Boolean
>
updateByIdDiy
(
TEmpEducation
tEmpEducation
);
R
<
Boolean
>
saveDiy
(
TEmpEducation
tEmpEducation
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmployeeInfoService.java
View file @
d6d3c102
...
...
@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.archives.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationUpdateVo
;
/**
* 人员档案表
...
...
@@ -28,4 +29,5 @@ import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo;
*/
public
interface
TEmployeeInfoService
extends
IService
<
TEmployeeInfo
>
{
void
updateEducationOfEmp
(
EmpEducationUpdateVo
education
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpDisabilityInfoServiceImpl.java
View file @
d6d3c102
...
...
@@ -20,8 +20,6 @@ import cn.hutool.core.bean.BeanUtil;
import
cn.hutool.core.collection.CollUtil
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.pig4cloud.plugin.excel.vo.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysPost
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.PostExcelVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpDisabilityInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpDisabilityInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmpDisabilityInfoService
;
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpEducationServiceImpl.java
View file @
d6d3c102
...
...
@@ -16,17 +16,29 @@
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.pig4cloud.plugin.excel.vo.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpEducation
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpEducationMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmpEducationService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationExcelVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationUpdateVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.validation.BindingResult
;
import
java.util.
List
;
import
java.util.
*
;
/**
* 员工学历信息表
...
...
@@ -34,11 +46,145 @@ import java.util.List;
* @author fxj
* @date 2022-06-18 09:39:46
*/
@RequiredArgsConstructor
@Service
public
class
TEmpEducationServiceImpl
extends
ServiceImpl
<
TEmpEducationMapper
,
TEmpEducation
>
implements
TEmpEducationService
{
private
final
TEmployeeInfoMapper
employeeInfoMapper
;
/**
* @Author fxj
* @Description 批量导入学历信息
* @Date 16:16 2022/6/20
**/
@Transactional
@Override
public
R
<
List
<
ErrorMessage
>>
importEmpEducation
(
List
<
EmpEducationExcelVO
>
excelVOList
,
BindingResult
bindingResult
)
{
return
null
;
// 通用校验获取失败的数据
List
<
ErrorMessage
>
errorMessageList
=
(
List
<
ErrorMessage
>)
bindingResult
.
getTarget
();
Map
<
Long
,
ErrorMessage
>
errorMsgMap
=
new
HashMap
<>();
if
(
Common
.
isNotNull
(
errorMessageList
)){
errorMessageList
.
stream
().
forEach
(
errorMessage
->
errorMsgMap
.
put
(
errorMessage
.
getLineNum
(),
errorMessage
));
}
// 个性化校验逻辑
List
<
TEmpEducation
>
list
=
this
.
list
();
TEmployeeInfo
emp
;
TEmpEducation
exist
;
Set
<
String
>
errorMsg
;
// 执行数据插入操作 组装
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
// 已有验证报错直接下一个
if
(
Common
.
isNotNull
(
errorMsgMap
.
get
(
i
+
2
))){
continue
;
}
errorMsg
=
new
HashSet
<>();
EmpEducationExcelVO
excel
=
excelVOList
.
get
(
i
);
emp
=
employeeInfoMapper
.
selectOne
(
Wrappers
.<
TEmployeeInfo
>
query
().
lambda
()
.
eq
(
TEmployeeInfo:
:
getEmpIdcard
,
excel
.
getEmpIdcard
())
.
eq
(
TEmployeeInfo:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isEmpty
(
emp
)){
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_NOT_EXIST
,
excel
.
getEmpIdcard
()));
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
emp
.
getFileStatus
())){
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_REDUCED
,
excel
.
getEmpIdcard
()));
}
// 检查添加人员是否已经存在
boolean
match
=
list
.
stream
().
anyMatch
(
info
->
excel
.
getEducationName
().
equals
(
info
.
getEducationName
())
&&
excel
.
getEmpIdcard
().
equals
(
info
.
getEmpIdcard
()));
if
(
match
)
{
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_EDUCATION_EXISTING
,
excel
.
getEmpName
()));
}
exist
=
baseMapper
.
selectOne
(
Wrappers
.<
TEmpEducation
>
query
().
lambda
()
.
eq
(
TEmpEducation:
:
getEmpIdcard
,
excel
.
getEmpIdcard
())
.
eq
(
TEmpEducation:
:
getEducationName
,
excel
.
getEducationName
())
.
eq
(
TEmpEducation:
:
getDeleteFlag
,
CommonConstants
.
ZERO_STRING
)
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
exist
)){
errorMsg
.
add
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_EDUCATION_EXISTING
,
excel
.
getEducationName
()));
}
// 数据合法情况
if
(
CollUtil
.
isEmpty
(
errorMsg
))
{
insertExcelPost
(
excel
,
emp
);
}
else
{
// 数据不合法
errorMessageList
.
add
(
new
ErrorMessage
((
long
)
(
i
+
2
),
errorMsg
));
}
}
if
(
CollUtil
.
isNotEmpty
(
errorMessageList
))
{
return
R
.
failed
(
errorMessageList
);
}
return
R
.
ok
();
}
/**
* @Author fxj
* @Description 更新学历信息
* @Date 16:17 2022/6/20
**/
@Transactional
@Override
public
R
<
Boolean
>
updateByIdDiy
(
TEmpEducation
tEmpEducation
)
{
TEmpEducation
education
=
baseMapper
.
selectOne
(
Wrappers
.<
TEmpEducation
>
query
().
lambda
()
.
eq
(
TEmpEducation:
:
getEmpIdcard
,
tEmpEducation
.
getEmpIdcard
())
.
eq
(
TEmpEducation:
:
getEducationName
,
tEmpEducation
.
getEducationName
())
.
eq
(
TEmpEducation:
:
getId
,
tEmpEducation
.
getId
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
education
)){
return
R
.
failed
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_EDUCATION_EXISTING
,
tEmpEducation
.
getEducationName
()));
}
updateEducationOfEmp
(
education
);
baseMapper
.
updateById
(
tEmpEducation
);
return
R
.
ok
();
}
/**
* @Author fxj
* @Description 保存 学历信息
* @Date 16:17 2022/6/20
**/
@Transactional
@Override
public
R
<
Boolean
>
saveDiy
(
TEmpEducation
tEmpEducation
)
{
TEmpEducation
education
=
baseMapper
.
selectOne
(
Wrappers
.<
TEmpEducation
>
query
().
lambda
()
.
eq
(
TEmpEducation:
:
getEmpIdcard
,
tEmpEducation
.
getEmpIdcard
())
.
eq
(
TEmpEducation:
:
getEducationName
,
tEmpEducation
.
getEducationName
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Common
.
isNotNull
(
education
)){
return
R
.
failed
(
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_EMP_EDUCATION_EXISTING
,
tEmpEducation
.
getEducationName
()));
}
updateEducationOfEmp
(
education
);
baseMapper
.
insert
(
tEmpEducation
);
return
R
.
ok
();
}
private
void
updateEducationOfEmp
(
TEmpEducation
education
)
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
education
.
getHighIdentification
())){
EmpEducationUpdateVo
updateVo
=
new
EmpEducationUpdateVo
();
BeanUtil
.
copyProperties
(
education
,
updateVo
);
if
(
Integer
.
parseInt
(
education
.
getEducationName
())
>=
CommonConstants
.
FOUR_INT
){
updateVo
.
setIsCollege
(
CommonConstants
.
ZERO_INT
);
}
else
{
updateVo
.
setIsCollege
(
CommonConstants
.
ONE_INT
);
}
employeeInfoMapper
.
updateEducationOfEmp
(
updateVo
);
}
}
/**
* 插入excel education
*/
private
void
insertExcelPost
(
EmpEducationExcelVO
excel
,
TEmployeeInfo
emp
)
{
TEmpEducation
insert
=
new
TEmpEducation
();
BeanUtil
.
copyProperties
(
excel
,
insert
);
insert
.
setDeleteFlag
(
CommonConstants
.
ZERO_STRING
);
insert
.
setEmpCode
(
emp
.
getEmpCode
());
insert
.
setEmpId
(
emp
.
getId
());
insert
.
setEmpCode
(
emp
.
getEmpCode
());
// 更新档案学历信息
updateEducationOfEmp
(
insert
);
this
.
save
(
insert
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpFamilyServiceImpl.java
View file @
d6d3c102
...
...
@@ -23,24 +23,18 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.pig4cloud.plugin.excel.vo.ErrorMessage
;
import
com.sun.org.apache.bcel.internal.generic.IF_ACMPEQ
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysRole
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpDisabilityInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpFamily
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmpFamilyMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmpFamilyService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmpDisabilityExcelVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmpFamilyExcelVO
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
lombok.RequiredArgsConstructor
;
import
org.omg.PortableInterceptor.INACTIVE
;
import
org.springframework.stereotype.Service
;
import
org.springframework.validation.BindingResult
;
...
...
@@ -144,7 +138,7 @@ public class TEmpFamilyServiceImpl extends ServiceImpl<TEmpFamilyMapper, TEmpFam
}
/**
* 插入excel
Post
* 插入excel
family
*/
private
void
insertExcelPost
(
EmpFamilyExcelVO
excel
,
TEmployeeInfo
emp
)
{
TEmpFamily
insert
=
new
TEmpFamily
();
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
d6d3c102
...
...
@@ -20,6 +20,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.mapper.TEmployeeInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeInfoService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationUpdateVo
;
import
org.springframework.stereotype.Service
;
/**
...
...
@@ -31,4 +32,8 @@ import org.springframework.stereotype.Service;
@Service
public
class
TEmployeeInfoServiceImpl
extends
ServiceImpl
<
TEmployeeInfoMapper
,
TEmployeeInfo
>
implements
TEmployeeInfoService
{
@Override
public
void
updateEducationOfEmp
(
EmpEducationUpdateVo
education
)
{
baseMapper
.
updateEducationOfEmp
(
education
);
}
}
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeInfoMapper.xml
View file @
d6d3c102
...
...
@@ -73,4 +73,17 @@
<result
property=
"leaveReason"
column=
"LEAVE_REASON"
/>
<result
property=
"leaveRemark"
column=
"LEAVE_REMARK"
/>
</resultMap>
<update
id=
"updateEducationOfEmp"
>
update t_employee_info
<trim
prefix=
"set"
suffixOverrides=
","
>
<if
test=
"education.isCollege != null"
>
is_college=#{education.isCollege},
</if>
<if
test=
"education.hignEducation != null"
>
hign_education=#{education.hignEducation},
</if>
<if
test=
"education.school != null"
>
school=#{education.school},
</if>
<if
test=
"education.major != null"
>
major=#{education.major},
</if>
<if
test=
"education.admissionDate != null"
>
admission_date=#{education.admissionDate},
</if>
<if
test=
"education.gradutionDate != null"
>
gradution_date=#{education.gradutionDate},
</if>
</trim>
WHERE id=#{education.empId}
</update>
</mapper>
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/CommonConstants.java
View file @
d6d3c102
...
...
@@ -113,6 +113,11 @@ public interface CommonConstants {
*/
String
ZERO_STRING
=
"0"
;
/**
* number 0
*/
int
ZERO_INT
=
0
;
/**
* number 1
*/
...
...
@@ -150,21 +155,21 @@ public interface CommonConstants {
* @Author pwang
* @Date 2019-08-02 16:39
**/
public
static
int
[]
dingleDigitIntArray
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
};
int
[]
dingleDigitIntArray
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
};
/**
* 个位数字串(阿里编码规约不允许直接使用‘魔法值’)
* @Author pwang
* @Date 2019-08-02 16:39
**/
public
static
String
[]
dingleDigitStrArray
=
{
"0"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
,
"7"
,
"8"
,
"9"
,
"10"
,
"11"
,
"12"
,
"13"
,
"14"
,
"15"
,
"16"
,
"17"
};
String
[]
dingleDigitStrArray
=
{
"0"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
,
"7"
,
"8"
,
"9"
,
"10"
,
"11"
,
"12"
,
"13"
,
"14"
,
"15"
,
"16"
,
"17"
};
/**
* 逗号
* @Author fxj
**/
public
static
final
char
COMMA_CHAR
=
','
;
char
COMMA_CHAR
=
','
;
public
static
final
char
SPOT_CHAR
=
'.'
;
char
SPOT_CHAR
=
'.'
;
/**
* 100
* @Author fxj
...
...
@@ -172,22 +177,24 @@ public interface CommonConstants {
int
INTEGER_HUNDRED
=
100
;
//,逗号
public
static
final
String
COMMA_STRING
=
","
;
String
COMMA_STRING
=
","
;
//、顿号
public
static
final
String
DUNHAO_STRING
=
"、"
;
String
DUNHAO_STRING
=
"、"
;
//- 横
public
static
final
char
DOWN_LINE_CHAR
=
'_'
;
char
DOWN_LINE_CHAR
=
'_'
;
// 冒号 :
public
static
final
String
COLON_STRING
=
":"
;
String
COLON_STRING
=
":"
;
// - 横 分割线 中
public
static
final
String
CENTER_SPLIT_LINE_STRING
=
"-"
;
String
CENTER_SPLIT_LINE_STRING
=
"-"
;
// 斜杠
public
static
final
String
SLASH_SPLIT_LINE_STRING
=
"/"
;
String
SLASH_SPLIT_LINE_STRING
=
"/"
;
// = 等
public
static
final
char
ETC_CHAR
=
'='
;
char
ETC_CHAR
=
'='
;
// = 等
public
static
final
String
ETC_STRING
=
"="
;
String
ETC_STRING
=
"="
;
//+ 加
public
static
final
char
ADD_CHAR
=
'+'
;
char
ADD_CHAR
=
'+'
;
//int 4
int
FOUR_INT
=
4
;
}
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
View file @
d6d3c102
...
...
@@ -184,4 +184,9 @@ public interface ErrorCodes {
* 已存在对应身份证的工作记录信息
*/
String
ARCHIVES_EMP_WORK_RECORD_EXISTING
=
"archives.emp.work.record.existing"
;
/**
* 已存在该员工对应学历名称的学历信息
*/
String
ARCHIVES_EMP_EDUCATION_EXISTING
=
"archives.emp.education.existing"
;
}
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
d6d3c102
...
...
@@ -46,6 +46,7 @@ archives.emp.family.name.existing=\u5DF2\u5B58\u5728\u5BF9\u5E94\u8EAB\u4EFD\u8B
archives.emp.not.exist
=
\u
65E0
\u
5BF9
\u
5E94
\u
8EAB
\u
4EFD
\u
8BC1
\u7684\u5458\u
5DE5
\u
4FE1
\u
606F
archives.emp.reduced
=
\u5458\u
5DE5
\u
5DF2
\u
51CF
\u6863
archives.emp.work.record.existing
=
\u
5DF2
\u
5B58
\u5728\u
5BF9
\u
5E94
\u
8EAB
\u
4EFD
\u
8BC1
\u7684\u
5DE5
\u
4F5C
\u
8BB0
\u
5F55
\u
4FE1
\u
606F
archives.emp.education.existing
=
\u
5DF2
\u
5B58
\u5728\u
8BE5
\u5458\u
5DE5
\u
5BF9
\u
5E94
\u
5B66
\u5386\u
540D
\u
79F0
\u7684\u
5B66
\u5386\u
4FE1
\u
606F
...
...
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