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
39b6b771
Commit
39b6b771
authored
Jul 05, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
673dee69
aaa0d1d2
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
115 additions
and
25 deletions
+115
-25
EmployeeXProjectVO.java
...fu/cloud/plus/v1/yifu/archives/vo/EmployeeXProjectVO.java
+84
-0
TEmpBadRecordController.java
.../v1/yifu/archives/controller/TEmpBadRecordController.java
+3
-2
TEmpDisabilityInfoController.java
...ifu/archives/controller/TEmpDisabilityInfoController.java
+3
-2
TEmpEducationController.java
.../v1/yifu/archives/controller/TEmpEducationController.java
+3
-7
TEmpFamilyController.java
...lus/v1/yifu/archives/controller/TEmpFamilyController.java
+3
-2
TEmpProfessionalQualificationController.java
...s/controller/TEmpProfessionalQualificationController.java
+3
-2
TEmpWorkRecordingController.java
...yifu/archives/controller/TEmpWorkRecordingController.java
+3
-2
TEmployeeProjectController.java
.../yifu/archives/controller/TEmployeeProjectController.java
+2
-2
TEmployeeProjectService.java
...lus/v1/yifu/archives/service/TEmployeeProjectService.java
+2
-2
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+9
-4
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeXProjectVO.java
0 → 100644
View file @
39b6b771
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.ColumnWidth
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
lombok.Data
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
/**
* 项目档案表excel对应的实体
*
* @author huyc
* @date 2022-06-20 17:54:40
*/
@Data
@ColumnWidth
(
30
)
public
class
EmployeeXProjectVO
extends
RowIndex
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 员工姓名
*/
@NotNull
(
message
=
"员工姓名不能为空"
)
@ExcelAttribute
(
name
=
"员工姓名"
,
isNotEmpty
=
true
,
errorInfo
=
"员工姓名不能为空"
,
maxLength
=
20
)
@ExcelProperty
(
value
=
"员工姓名"
)
private
String
empName
;
/**
* 身份证号码
*/
@NotNull
(
message
=
"身份证号不能为空"
)
@ExcelAttribute
(
name
=
"身份证号"
,
isNotEmpty
=
true
,
errorInfo
=
"身份证号不能为空"
,
maxLength
=
20
)
@ExcelProperty
(
value
=
"身份证号"
)
private
String
empIdcard
;
/**
* 项目编码
*/
@NotNull
(
message
=
"项目编码不能为空"
)
@ExcelProperty
(
value
=
"项目编码"
)
@ExcelAttribute
(
name
=
"项目编码"
,
isNotEmpty
=
true
,
errorInfo
=
"项目编码不能为空"
,
maxLength
=
20
)
private
String
deptNo
;
/**
* 减项原因
*/
@ExcelProperty
(
value
=
"减项原因"
)
@NotNull
(
message
=
"减项原因不能为空"
)
@ExcelAttribute
(
name
=
"减项原因"
,
isNotEmpty
=
true
,
errorInfo
=
"减项原因不能为空"
,
maxLength
=
100
)
private
String
leaveReason
;
/**
* 减项备注
*/
@ExcelProperty
(
value
=
"减项备注"
)
private
String
leaveRemark
;
/**
* 是否同步减档(0否;1是)
*/
@ExcelProperty
(
value
=
"是否同步减档"
)
@NotNull
(
message
=
"是否同步减档不能为空"
)
@ExcelAttribute
(
name
=
"是否同步减档"
,
isNotEmpty
=
true
,
errorInfo
=
"是否同步减档不能为空"
,
maxLength
=
1
)
private
Integer
isLeaveEmployee
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmpBadRecordController.java
View file @
39b6b771
...
...
@@ -37,6 +37,7 @@ import org.springframework.web.multipart.MultipartFile;
import
javax.servlet.http.HttpServletResponse
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -140,8 +141,8 @@ public class TEmpBadRecordController {
@SysLog
(
"通过ids删除员工不良记录"
)
@DeleteMapping
(
"/removeByIds"
)
@PreAuthorize
(
"@pms.hasPermission('demo_tempbadrecord_del_batch')"
)
public
R
<
Boolean
>
removeByIds
(
@RequestBody
(
required
=
true
)
String
ids
)
{
List
<
String
>
idList
=
Common
.
get
List
(
ids
);
public
R
<
Boolean
>
removeByIds
(
@RequestBody
(
required
=
true
)
String
[]
ids
)
{
List
<
String
>
idList
=
Arrays
.
as
List
(
ids
);
return
R
.
ok
(
tEmpBadRecordService
.
removeByIds
(
idList
));
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmpDisabilityInfoController.java
View file @
39b6b771
...
...
@@ -35,6 +35,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.Arrays
;
import
java.util.List
;
...
...
@@ -138,8 +139,8 @@ public class TEmpDisabilityInfoController {
@SysLog
(
"通过ids删除员工伤残信息表"
)
@DeleteMapping
(
"/removeByIds"
)
@PreAuthorize
(
"@pms.hasPermission('archives_tempdisabilityinfo_del_batch')"
)
public
R
<
Boolean
>
removeByIds
(
@RequestBody
(
required
=
true
)
String
ids
)
{
List
<
String
>
idList
=
Common
.
get
List
(
ids
);
public
R
<
Boolean
>
removeByIds
(
@RequestBody
(
required
=
true
)
String
[]
ids
)
{
List
<
String
>
idList
=
Arrays
.
as
List
(
ids
);
return
R
.
ok
(
tEmpDisabilityInfoService
.
removeByIds
(
idList
));
}
/**
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmpEducationController.java
View file @
39b6b771
...
...
@@ -22,8 +22,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.EducationSearchVo
;
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.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
...
...
@@ -36,6 +34,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.Arrays
;
import
java.util.List
;
...
...
@@ -136,11 +135,8 @@ public class TEmpEducationController {
@SysLog
(
"通过id删除员工学历信息表"
)
@DeleteMapping
(
"/removeByIds"
)
@PreAuthorize
(
"@pms.hasPermission('archives_education_del_batch')"
)
public
R
<
Boolean
>
removeByIds
(
@RequestBody
(
required
=
true
)
String
ids
)
{
List
<
String
>
idList
=
null
;
if
(
Common
.
isNotNull
(
ids
)){
idList
=
Common
.
initStrToList
(
ids
,
CommonConstants
.
COMMA_STRING
);
}
public
R
<
Boolean
>
removeByIds
(
@RequestBody
(
required
=
true
)
String
[]
ids
)
{
List
<
String
>
idList
=
Arrays
.
asList
(
ids
);
return
R
.
ok
(
tEmpEducationService
.
removeByIds
(
idList
));
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmpFamilyController.java
View file @
39b6b771
...
...
@@ -36,6 +36,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.Arrays
;
import
java.util.List
;
...
...
@@ -146,8 +147,8 @@ public class TEmpFamilyController {
@SysLog
(
"通过id删除员工家庭信息表"
)
@DeleteMapping
(
"/removeByIds"
)
@PreAuthorize
(
"@pms.hasPermission('archives-family-batch-delete')"
)
public
R
<
Boolean
>
removeByIds
(
@RequestBody
(
required
=
true
)
String
ids
)
{
List
<
String
>
idList
=
Common
.
get
List
(
ids
);
public
R
<
Boolean
>
removeByIds
(
@RequestBody
String
[]
ids
)
{
List
<
String
>
idList
=
Arrays
.
as
List
(
ids
);
return
tEmpFamilyService
.
removeByIdsDiy
(
idList
);
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmpProfessionalQualificationController.java
View file @
39b6b771
...
...
@@ -35,6 +35,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.Arrays
;
import
java.util.List
;
...
...
@@ -135,8 +136,8 @@ public class TEmpProfessionalQualificationController {
@SysLog
(
"通过ids删除员工职业资格信息表"
)
@DeleteMapping
(
"/removeByIds"
)
@PreAuthorize
(
"@pms.hasPermission('archives_tempprofessionalqualification_del_batch')"
)
public
R
removeByIds
(
@RequestBody
(
required
=
true
)
String
ids
)
{
List
<
String
>
idList
=
Common
.
get
List
(
ids
);
public
R
removeByIds
(
@RequestBody
(
required
=
true
)
String
[]
ids
)
{
List
<
String
>
idList
=
Arrays
.
as
List
(
ids
);
return
R
.
ok
(
qualificationService
.
removeByIds
(
idList
));
}
/**
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmpWorkRecordingController.java
View file @
39b6b771
...
...
@@ -36,6 +36,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.Arrays
;
import
java.util.List
;
...
...
@@ -136,8 +137,8 @@ public class TEmpWorkRecordingController {
@SysLog
(
"通过id删除员工家工作息表"
)
@DeleteMapping
(
"/removeByIds"
)
@PreAuthorize
(
"@pms.hasPermission('archives_tempworkrecording_del_batch')"
)
public
R
<
Boolean
>
removeByIds
(
@RequestBody
(
required
=
true
)
String
ids
)
{
List
<
String
>
idList
=
Common
.
get
List
(
ids
);
public
R
<
Boolean
>
removeByIds
(
@RequestBody
(
required
=
true
)
String
[]
ids
)
{
List
<
String
>
idList
=
Arrays
.
as
List
(
ids
);
return
R
.
ok
(
tEmpWorkRecordingService
.
removeByIds
(
idList
));
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeProjectController.java
View file @
39b6b771
...
...
@@ -24,7 +24,7 @@ import com.pig4cloud.plugin.excel.annotation.RequestExcel;
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.archives.vo.EmployeeProjectExportVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.Employee
X
ProjectVO
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
...
...
@@ -190,7 +190,7 @@ public class TEmployeeProjectController {
@SysLog
(
"批量减项"
)
@PostMapping
(
"/batchDeleteEmpPro"
)
@PreAuthorize
(
"@pms.hasPermission('archives_temployeeproject_batchdelempproinfo')"
)
public
R
<
List
<
ErrorMessage
>>
batchDeleteEmpPro
(
@RequestExcel
List
<
EmployeeProjectVO
>
excelVOList
,
BindingResult
bindingResult
)
{
public
R
<
List
<
ErrorMessage
>>
batchDeleteEmpPro
(
@RequestExcel
List
<
Employee
X
ProjectVO
>
excelVOList
,
BindingResult
bindingResult
)
{
return
tEmployeeProjectService
.
batchDeleteEmpPro
(
excelVOList
,
bindingResult
);
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TEmployeeProjectService.java
View file @
39b6b771
...
...
@@ -24,7 +24,7 @@ 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.entity.TEmployeeProject
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.Employee
X
ProjectVO
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
org.springframework.validation.BindingResult
;
...
...
@@ -66,7 +66,7 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
* @Date: 2022/6/21 10:30
* @return: R
**/
R
<
List
<
ErrorMessage
>>
batchDeleteEmpPro
(
List
<
EmployeeProjectVO
>
list
,
BindingResult
bindingResult
);
R
<
List
<
ErrorMessage
>>
batchDeleteEmpPro
(
List
<
Employee
X
ProjectVO
>
list
,
BindingResult
bindingResult
);
/**
* @param inputStream
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
39b6b771
...
...
@@ -40,6 +40,7 @@ import com.yifu.cloud.plus.v1.yifu.archives.service.TEmployeeProjectService;
import
com.yifu.cloud.plus.v1.yifu.archives.service.TSettleDomainService
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectExportVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeProjectVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeXProjectVO
;
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.*
;
...
...
@@ -238,13 +239,13 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
@Override
public
R
<
List
<
ErrorMessage
>>
batchDeleteEmpPro
(
List
<
EmployeeProjectVO
>
excelVOList
,
BindingResult
bindingResult
)
{
public
R
<
List
<
ErrorMessage
>>
batchDeleteEmpPro
(
List
<
Employee
X
ProjectVO
>
excelVOList
,
BindingResult
bindingResult
)
{
// 通用校验获取失败的数据
List
<
ErrorMessage
>
errorMessageList
=
(
List
<
ErrorMessage
>)
bindingResult
.
getTarget
();
// 执行数据插入操作 组装 PostDto
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
EmployeeProjectVO
excel
=
excelVOList
.
get
(
i
);
Employee
X
ProjectVO
excel
=
excelVOList
.
get
(
i
);
//根据身份证和项目编码获取项目档案
TEmployeeProject
tEmployeeProject
=
this
.
getOne
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpIdcard
,
excel
.
getEmpIdcard
())
...
...
@@ -255,7 +256,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
TEmployeeProject
tEmployeeProjectOld
=
this
.
getById
(
tEmployeeProject
.
getId
());
if
(
Common
.
isNotNull
(
tEmployeeProject
))
{
TEmployeeInfo
tEmployeeInfo
=
tEmployeeInfoMapper
.
selectById
(
tEmployeeProject
.
getEmpId
());
if
(
tEmployeeProject
.
getIsLeaveEmployee
()
==
CommonConstants
.
dingleDigitIntArray
[
1
])
{
if
(
excel
.
getIsLeaveEmployee
()
==
CommonConstants
.
dingleDigitIntArray
[
1
])
{
Long
count
=
this
.
count
(
Wrappers
.<
TEmployeeProject
>
query
().
lambda
()
.
eq
(
TEmployeeProject:
:
getEmpId
,
tEmployeeProject
.
getEmpId
())
.
eq
(
TEmployeeProject:
:
getProjectStatus
,
CommonConstants
.
dingleDigitIntArray
[
0
]));
...
...
@@ -263,11 +264,15 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
MsgUtils
.
getMessage
(
ErrorCodes
.
ARCHIVES_PROJECT_CHANGE_NOT_EXIST
)));
}
tEmployeeInfo
.
setFileStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
tEmployeeInfo
.
setLeaveReason
(
excel
.
getLeaveReason
());
tEmployeeInfo
.
setLeaveRemark
(
excel
.
getLeaveRemark
());
tEmployeeInfoMapper
.
updateById
(
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfo
.
getId
(),
""
,
tEmployeeProjectOld
,
tEmployeeInfo
);
}
tEmployeeProject
.
setProjectStatus
(
CommonConstants
.
dingleDigitIntArray
[
1
]);
tEmployeeProject
.
setLeaveReason
(
excel
.
getLeaveReason
());
tEmployeeProject
.
setLeaveRemark
(
excel
.
getLeaveRemark
());
this
.
updateById
(
tEmployeeProject
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
0
],
tEmployeeInfo
.
getId
(),
""
,
tEmployeeProjectOld
,
tEmployeeInfo
);
tEmployeeLogService
.
saveModificationRecord
(
CommonConstants
.
dingleDigitIntArray
[
1
],
""
,
tEmployeeProject
.
getId
(),
tEmployeeInfoOld
,
tEmployeeProject
);
}
}
...
...
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