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
1dc387ec
Commit
1dc387ec
authored
Jul 04, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huyc 项目档案代码提交
parent
50792c69
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
13 deletions
+27
-13
EmployeeProjectVO.java
...ifu/cloud/plus/v1/yifu/archives/vo/EmployeeProjectVO.java
+9
-6
TElecEmployeeInfoController.java
...yifu/archives/controller/TElecEmployeeInfoController.java
+0
-2
TEmployeeProjectController.java
.../yifu/archives/controller/TEmployeeProjectController.java
+1
-1
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+15
-2
ExcelAttributeConstants.java
...v1/yifu/common/core/constant/ExcelAttributeConstants.java
+2
-2
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeProjectVO.java
View file @
1dc387ec
...
...
@@ -17,6 +17,7 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.format.DateTimeFormat
;
import
com.alibaba.excel.annotation.write.style.ColumnWidth
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants
;
...
...
@@ -26,6 +27,7 @@ import javax.validation.constraints.NotNull;
import
javax.validation.constraints.Past
;
import
java.io.Serializable
;
import
java.time.LocalDate
;
import
java.util.Date
;
/**
* 项目档案表excel对应的实体
...
...
@@ -35,7 +37,7 @@ import java.time.LocalDate;
*/
@Data
@ColumnWidth
(
30
)
public
class
EmployeeProjectVO
extends
RowIndex
implements
Serializable
{
public
class
EmployeeProjectVO
extends
RowIndex
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -43,7 +45,7 @@ public class EmployeeProjectVO extends RowIndex implements Serializable {
* 员工类型(字典值,0外包1派遣2代理)
*/
@NotNull
(
message
=
"员工类型不能为空"
)
@ExcelAttribute
(
name
=
"员工类型"
,
isNotEmpty
=
true
,
errorInfo
=
"员工类型不能为空"
,
maxLength
=
1
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMP_NATRUE
)
@ExcelAttribute
(
name
=
"员工类型"
,
isNotEmpty
=
true
,
errorInfo
=
"员工类型不能为空"
,
maxLength
=
2
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMP_NATRUE
)
@ExcelProperty
(
value
=
"员工类型"
)
private
String
empNatrue
;
...
...
@@ -94,7 +96,7 @@ public class EmployeeProjectVO extends RowIndex implements Serializable {
*/
@NotNull
(
message
=
"合同类型不能为空"
)
@ExcelProperty
(
value
=
"合同类型"
)
@ExcelAttribute
(
name
=
"合同类型"
,
isNotEmpty
=
true
,
errorInfo
=
"合同类型不能为空"
,
maxLength
=
2
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMPLOYEE_CONTRACT_TYPE
)
@ExcelAttribute
(
name
=
"合同类型"
,
isNotEmpty
=
true
,
errorInfo
=
"合同类型不能为空"
,
maxLength
=
10
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
EMPLOYEE_CONTRACT_TYPE
)
private
String
contractType
;
/**
...
...
@@ -102,7 +104,7 @@ public class EmployeeProjectVO extends RowIndex implements Serializable {
*/
@NotNull
(
message
=
"工时制不能为空"
)
@ExcelProperty
(
value
=
"工时制"
)
@ExcelAttribute
(
name
=
"工时制"
,
isNotEmpty
=
true
,
errorInfo
=
"工时制不能为空"
,
maxLength
=
1
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
WORKING_HOURS
)
@ExcelAttribute
(
name
=
"工时制"
,
isNotEmpty
=
true
,
errorInfo
=
"工时制不能为空"
,
maxLength
=
1
0
,
isDataId
=
true
,
dataType
=
ExcelAttributeConstants
.
WORKING_HOURS
)
private
String
workingHours
;
/**
...
...
@@ -119,14 +121,15 @@ public class EmployeeProjectVO extends RowIndex implements Serializable {
@ExcelProperty
(
value
=
"入职日期"
)
@NotNull
(
message
=
"入职日期不能为空"
)
@Past
private
LocalDate
enjoinDate
;
@DateTimeFormat
(
"yyyy-MM-dd"
)
private
Date
enjoinDate
;
/**
* 试用期(单位月)
*/
@ExcelProperty
(
value
=
"试用期"
)
@NotNull
(
message
=
"试用期不能为空"
)
@ExcelAttribute
(
name
=
"试用期"
,
isNotEmpty
=
true
,
errorInfo
=
"试用期不能为空"
,
maxLength
=
2
)
@ExcelAttribute
(
name
=
"试用期"
,
isNotEmpty
=
true
,
errorInfo
=
"试用期不能为空"
,
maxLength
=
4
)
private
String
tryPeriod
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TElecEmployeeInfoController.java
View file @
1dc387ec
...
...
@@ -54,7 +54,6 @@ public class TElecEmployeeInfoController {
*/
@Operation
(
summary
=
"分页查询"
,
description
=
"分页查询"
)
@GetMapping
(
"/page"
)
@PreAuthorize
(
"@pms.hasPermission('archives_telecemployeeinfo_get')"
)
public
R
getTElecEmployeeInfoPage
(
Page
page
,
TElecEmployeeInfo
tElecEmployeeInfo
)
{
return
R
.
ok
(
tElecEmployeeInfoService
.
getTElecEmployeeInfoPage
(
page
,
tElecEmployeeInfo
));
}
...
...
@@ -67,7 +66,6 @@ public class TElecEmployeeInfoController {
*/
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询"
)
@GetMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('archives_telecemployeeinfo_get')"
)
public
R
getById
(
@PathVariable
(
"id"
)
Long
id
)
{
return
R
.
ok
(
tElecEmployeeInfoService
.
getById
(
id
));
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmployeeProjectController.java
View file @
1dc387ec
...
...
@@ -206,7 +206,7 @@ public class TEmployeeProjectController {
@SysLog
(
"批量新增项目档案信息"
)
@PostMapping
(
"/importListAdd"
)
@PreAuthorize
(
"@pms.hasPermission('wxhr:employeeProjectinfo_importListAdd')"
)
public
R
<
List
<
ErrorMessage
>>
importListAdd
(
@RequestBody
MultipartFile
file
,
@RequestParam
(
"idAdd"
)
String
idAdd
)
throws
IOException
{
public
R
<
List
<
ErrorMessage
>>
importListAdd
(
@RequestBody
MultipartFile
file
,
@RequestParam
(
"idAdd"
)
String
idAdd
){
return
tEmployeeProjectService
.
importListAdd
(
file
.
getInputStream
(),
idAdd
);
}
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
1dc387ec
...
...
@@ -28,6 +28,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.archives.Constants.EmployeeConstants
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TCustomerInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject
;
...
...
@@ -345,10 +346,22 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
// 执行数据插入操作 组装 PostDto
for
(
int
i
=
0
;
i
<
excelVOList
.
size
();
i
++)
{
EmployeeProjectVO
excel
=
excelVOList
.
get
(
i
);
Set
<
String
>
errorMsg
=
new
HashSet
<>();
idCard
=
excel
.
getEmpIdcard
();
deptNo
=
excel
.
getDeptNo
();
if
(
excel
.
getEmpNatrue
().
equals
(
CommonConstants
.
ZERO_STRING
)
||
excel
.
getEmpNatrue
().
equals
(
CommonConstants
.
ONE_STRING
))
{
if
(
excel
.
getContractType
().
equals
(
CommonConstants
.
ONE_STRING
))
{
if
(
Common
.
isEmpty
(
excel
.
getWorkingHours
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"第"
+
(
excel
.
getRowIndex
())
+
"工时制不能为空!"
));
}
}
if
(
Common
.
isEmpty
(
excel
.
getEnjoinDate
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"第"
+
(
excel
.
getRowIndex
())
+
"入职日期不能为空!"
));
}
if
(
Common
.
isEmpty
(
excel
.
getTryPeriod
()))
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"第"
+
(
excel
.
getRowIndex
())
+
"试用期不能为空!"
));
}
}
if
(
idCardMap
.
get
(
idCard
.
concat
(
deptNo
))
!=
null
)
{
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
"第"
+
(
excel
.
getRowIndex
())
+
"行身份证号+项目编码与第"
+
idCardMap
.
get
(
idCard
)
+
"行重复!"
));
}
else
{
...
...
@@ -383,7 +396,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
}
//存在复档或复项的情况,允许复档复项
if
(
CommonConstants
.
ZERO
_STRING
.
equals
(
idAdd
))
{
if
(
CommonConstants
.
ONE
_STRING
.
equals
(
idAdd
))
{
//档案有(离职库),项目(已减档)
if
(
Common
.
isNotNull
(
tEmployeeInfo
)
&&
CommonConstants
.
dingleDigitIntArray
[
1
]
==
tEmployeeInfo
.
getFileStatus
()
&&
Common
.
isNotNull
(
tEmployeeProject
)
&&
CommonConstants
.
dingleDigitIntArray
[
1
]
==
tEmployeeProject
.
getProjectStatus
())
{
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/ExcelAttributeConstants.java
View file @
1dc387ec
...
...
@@ -33,9 +33,9 @@ public class ExcelAttributeConstants {
//员工合同类型
public
static
final
String
EMPLOYEE_CONTRACT_TYPE
=
"
employee_
contract_type"
;
public
static
final
String
EMPLOYEE_CONTRACT_TYPE
=
"contract_type"
;
//员工合同工时制 1标准工时 2 综合工时 3不定时工时制
public
static
final
String
WORKING_HOURS
=
"working_hours"
;
public
static
final
String
WORKING_HOURS
=
"
contract_
working_hours"
;
//员工合同续签情况
public
static
final
String
EMPLOYEE_SITUATION_TYPE
=
"situation_type"
;
...
...
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