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
59aa7734
Commit
59aa7734
authored
Jun 21, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://git.yifucenter.com/fangxinjiang/yifu
into develop
parents
2f0e2592
c2d0fe5b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
128 additions
and
18 deletions
+128
-18
TEmployeeInfoController.java
.../v1/yifu/archives/controller/TEmployeeInfoController.java
+29
-13
TEmployeeProjectController.java
.../yifu/archives/controller/TEmployeeProjectController.java
+1
-5
TEmployeeInfoService.java
...d/plus/v1/yifu/archives/service/TEmployeeInfoService.java
+27
-0
TEmployeeProjectService.java
...lus/v1/yifu/archives/service/TEmployeeProjectService.java
+10
-0
TEmployeeInfoServiceImpl.java
.../yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
+50
-0
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+11
-0
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeInfoController.java
View file @
59aa7734
...
...
@@ -198,24 +198,40 @@ public class TEmployeeInfoController {
*/
@Operation
(
summary
=
"修改人员档案表"
,
description
=
"修改人员档案表"
)
@SysLog
(
"修改人员档案表"
)
@P
utMapping
@PreAuthorize
(
"@pms.hasPermission('
demo_
temployeeinfo_edit')"
)
public
R
<
Boolean
>
update
ById
(
@RequestBody
TEmployeeInfo
tEmployeeInfo
)
{
return
R
.
ok
(
tEmployeeInfoService
.
updateById
(
tEmployeeInfo
)
);
@P
ostMapping
(
"/updateEmployee"
)
@PreAuthorize
(
"@pms.hasPermission('temployeeinfo_edit')"
)
public
R
<
Boolean
>
update
Employee
(
@RequestBody
TEmployeeInfo
tEmployeeInfo
)
{
return
tEmployeeInfoService
.
updateEmployee
(
tEmployeeInfo
);
}
/**
* 通过id删除人员档案表
*
* @param id id
* @return R
*/
* @param id
* @Description: 通过id删除人员档案表
* @Author: hgw
* @Date: 2022/6/21 19:42
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Operation
(
summary
=
"通过id删除人员档案表"
,
description
=
"通过id删除人员档案表"
)
@SysLog
(
"通过id删除人员档案表"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('demo_temployeeinfo_del')"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
return
R
.
ok
(
tEmployeeInfoService
.
removeById
(
id
));
@GetMapping
(
"/deleteEmployee"
)
@PreAuthorize
(
"@pms.hasPermission('temployeeinfo_del')"
)
public
R
<
String
>
deleteEmployee
(
@RequestParam
String
id
)
{
return
tEmployeeInfoService
.
deleteEmployee
(
id
);
}
/**
* @param id
* @Description: 通过id减档人员档案表
* @Author: hgw
* @Date: 2022/6/21 19:42
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Operation
(
summary
=
"通过id减档人员档案表"
,
description
=
"通过id减档人员档案表"
)
@SysLog
(
"通过id减档人员档案表"
)
@GetMapping
(
"/minusEmployee"
)
@PreAuthorize
(
"@pms.hasPermission('temployeeinfo_minus')"
)
public
R
<
String
>
minusEmployee
(
@RequestParam
String
id
)
{
return
tEmployeeInfoService
.
minusEmployee
(
id
);
}
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeProjectController.java
View file @
59aa7734
...
...
@@ -62,11 +62,7 @@ public class TEmployeeProjectController {
@Operation
(
summary
=
"根据人员档案id获取项目list"
,
description
=
"根据人员档案id获取项目list"
)
@GetMapping
(
"/getListByEmpId"
)
public
R
<
List
<
TEmployeeProject
>>
getListByEmpId
(
@RequestParam
String
empId
)
{
TEmployeeProject
project
=
new
TEmployeeProject
();
project
.
setEmpId
(
empId
);
project
.
setProjectStatus
(
CommonConstants
.
ZERO_INT
);
project
.
setDeleteFlag
(
CommonConstants
.
STATUS_NORMAL
);
return
R
.
ok
(
tEmployeeProjectService
.
list
(
Wrappers
.
query
(
project
)));
return
R
.
ok
(
tEmployeeProjectService
.
getListByEmpId
(
empId
,
CommonConstants
.
ZERO_INT
));
}
/**
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmployeeInfoService.java
View file @
59aa7734
...
...
@@ -72,6 +72,33 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
**/
R
<
String
>
addNewEmployee
(
TEmployeeInfo
employeeInfo
);
/**
* @param employeeInfo
* @Description: 更新档案信息
* @Author: hgw
* @Date: 2022/6/21 19:29
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.Boolean>
**/
R
<
Boolean
>
updateEmployee
(
TEmployeeInfo
employeeInfo
);
/**
* @param id
* @Description: 删除
* @Author: hgw
* @Date: 2022/6/21 19:50
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R
<
String
>
deleteEmployee
(
String
id
);
/**
* @param id
* @Description: 减项
* @Author: hgw
* @Date: 2022/6/21 19:50
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
R
<
String
>
minusEmployee
(
String
id
);
/**
* @param employeeInfo 档案信息
* @param fileSource 人员档案来源(4人员档案新建、5项目档案新建、1社保/公积金、3商险、2薪酬)
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmployeeProjectService.java
View file @
59aa7734
...
...
@@ -44,5 +44,15 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
R
<
List
<
ErrorMessage
>>
importListAdd
(
List
<
EmployeeProjectVO
>
excelVOList
,
BindingResult
bindingResult
,
String
isAdd
);
/**
* @param projectStatus 传0才过滤
* @param empId
* @Description: 根据员工id获取项目list
* @Author: hgw
* @Date: 2022/6/21 19:33
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject>>
**/
List
<
TEmployeeProject
>
getListByEmpId
(
String
empId
,
int
projectStatus
);
R
<
List
<
ErrorMessage
>>
importEmpProjectUpdate
(
List
<
EmployeeProjectVO
>
excelVOList
,
BindingResult
bindingResult
);
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeInfoServiceImpl.java
View file @
59aa7734
...
...
@@ -20,8 +20,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.entity.TEmployeeProject
;
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.service.TEmployeeProjectService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmpEducationUpdateVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
...
...
@@ -47,6 +49,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
// 缓存信息
private
final
CacheManager
cacheManager
;
private
final
TEmployeeProjectService
tEmployeeProjectService
;
@Override
public
IPage
<
TEmployeeInfo
>
getPage
(
Page
<
TEmployeeInfo
>
page
,
TEmployeeInfo
employeeInfo
,
String
sql
)
{
...
...
@@ -91,6 +94,53 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
return
zeroArr
[
num
]
+
nowNums
;
}
@Override
public
R
<
Boolean
>
updateEmployee
(
TEmployeeInfo
employeeInfo
)
{
// TODO-更新学历-房
return
R
.
ok
(
this
.
updateById
(
employeeInfo
));
}
@Override
public
R
<
String
>
deleteEmployee
(
String
id
)
{
TEmployeeInfo
employee
=
this
.
getById
(
id
);
if
(
employee
!=
null
)
{
if
(
employee
.
getStatus
()
!=
CommonConstants
.
ZERO_INT
)
{
return
R
.
failed
(
"非草稿状态,无法删除!"
);
}
employee
.
setDeleteFlag
(
CommonConstants
.
STATUS_DEL
);
// 获取项目档案,传参1,不过滤项目状态
List
<
TEmployeeProject
>
projectList
=
tEmployeeProjectService
.
getListByEmpId
(
id
,
CommonConstants
.
ONE_INT
);
if
(
projectList
!=
null
&&
!
projectList
.
isEmpty
())
{
for
(
TEmployeeProject
project
:
projectList
)
{
project
.
setDeleteFlag
(
CommonConstants
.
STATUS_DEL
);
}
tEmployeeProjectService
.
updateBatchById
(
projectList
);
}
this
.
updateById
(
employee
);
return
R
.
ok
(
"已删除"
);
}
else
{
return
R
.
failed
(
"未找到人员档案信息"
);
}
}
@Override
public
R
<
String
>
minusEmployee
(
String
id
)
{
TEmployeeInfo
employee
=
this
.
getById
(
id
);
if
(
employee
!=
null
)
{
// 获取项目档案,传参0,过滤项目状态
List
<
TEmployeeProject
>
projectList
=
tEmployeeProjectService
.
getListByEmpId
(
id
,
CommonConstants
.
ZERO_INT
);
if
(
projectList
!=
null
&&
!
projectList
.
isEmpty
())
{
return
R
.
failed
(
"还有["
+
projectList
+
"]条项目未减项,请先去减项!"
);
}
employee
.
setFileStatus
(
CommonConstants
.
ONE_INT
);
this
.
updateById
(
employee
);
return
R
.
ok
(
"已减档"
);
}
else
{
return
R
.
failed
(
"未找到人员档案信息"
);
}
}
@Override
//@GlobalTransactional // 分布式事务注解
//@Transactional(rollbackFor = Exception)
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
59aa7734
...
...
@@ -434,4 +434,15 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
tEmployeeProject
.
setUpdateBy
(
user
.
getId
());
proupdateList
.
add
(
tEmployeeProject
);
}
@Override
public
List
<
TEmployeeProject
>
getListByEmpId
(
String
empId
,
int
projectStatus
)
{
TEmployeeProject
project
=
new
TEmployeeProject
();
project
.
setEmpId
(
empId
);
if
(
projectStatus
==
0
)
{
project
.
setProjectStatus
(
CommonConstants
.
ZERO_INT
);
}
project
.
setDeleteFlag
(
CommonConstants
.
STATUS_NORMAL
);
return
this
.
list
(
Wrappers
.
query
(
project
));
}
}
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