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
db553efb
Commit
db553efb
authored
Jul 06, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
6a13dee2
ed12c975
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
7 deletions
+28
-7
EmployeeProjectExportVO.java
...oud/plus/v1/yifu/archives/vo/EmployeeProjectExportVO.java
+9
-4
TEmpChangeInfoVO.java
...yifu/cloud/plus/v1/yifu/archives/vo/TEmpChangeInfoVO.java
+2
-1
TEmpChangeInfoServiceImpl.java
...yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
+11
-0
TEmployeeProjectServiceImpl.java
...fu/archives/service/impl/TEmployeeProjectServiceImpl.java
+2
-2
TElecEmployeeInfoMapper.xml
...biz/src/main/resources/mapper/TElecEmployeeInfoMapper.xml
+3
-0
TEmployeeProjectMapper.xml
...-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
+1
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeProjectExportVO.java
View file @
db553efb
...
...
@@ -17,14 +17,15 @@
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
;
import
lombok.Data
;
import
javax.validation.constraints.Past
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
import
java.util.Date
;
import
java.util.List
;
/**
...
...
@@ -68,13 +69,13 @@ public class EmployeeProjectExportVO{
* 身份证有效期起
*/
@ExcelProperty
(
value
=
"身份证开始日期"
)
private
Local
Date
validityStart
;
private
Date
validityStart
;
/**
* 身份证有效期止
*/
@ExcelProperty
(
value
=
"身份证截止日期"
)
private
Local
Date
validityEnd
;
private
Date
validityEnd
;
/**
* 婚姻状况
...
...
@@ -188,12 +189,14 @@ public class EmployeeProjectExportVO{
* 入学时间
*/
@ExcelProperty
(
value
=
"入学时间"
)
@DateTimeFormat
(
"yyyy-MM-dd"
)
private
LocalDateTime
admissionDate
;
/**
* 毕业时间
*/
@ExcelProperty
(
value
=
"毕业时间"
)
@DateTimeFormat
(
"yyyy-MM-dd"
)
private
LocalDateTime
gradutionDate
;
/**
...
...
@@ -233,6 +236,7 @@ public class EmployeeProjectExportVO{
* 创建时间
*/
@ExcelProperty
(
value
=
"人员档案创建时间"
)
@DateTimeFormat
(
"yyyy-MM-dd"
)
private
LocalDateTime
proCreateTime
;
...
...
@@ -285,7 +289,7 @@ public class EmployeeProjectExportVO{
*/
@ExcelProperty
(
value
=
"入职日期"
)
@Past
private
Local
Date
enjoinDate
;
private
Date
enjoinDate
;
/**
* 试用期(单位月)
...
...
@@ -400,6 +404,7 @@ public class EmployeeProjectExportVO{
* 项目档案创建时间
*/
@ExcelProperty
(
value
=
"项目档案创建时间"
)
@DateTimeFormat
(
"yyyy-MM-dd"
)
private
LocalDateTime
createTime
;
private
List
<
String
>
idList
;
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TEmpChangeInfoVO.java
View file @
db553efb
...
...
@@ -19,6 +19,7 @@ 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
com.yifu.cloud.plus.v1.yifu.common.core.constant.ValidityConstants
;
import
lombok.Data
;
import
javax.validation.constraints.NotNull
;
...
...
@@ -79,7 +80,7 @@ public class TEmpChangeInfoVO implements Serializable {
* 划转起始月
*/
@ExcelProperty
(
value
=
"划转起始月"
)
@ExcelAttribute
(
name
=
"划转起始月"
,
maxLength
=
6
,
isInteger
=
true
)
@ExcelAttribute
(
name
=
"划转起始月"
,
maxLength
=
6
,
errorInfo
=
"划转起始月不能超过6位"
,
isInteger
=
true
)
private
String
changeStartMonth
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmpChangeInfoServiceImpl.java
View file @
db553efb
...
...
@@ -35,6 +35,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.validation.BindingResult
;
import
java.util.*
;
import
java.util.regex.Pattern
;
/**
* 档案划转日志表
...
...
@@ -54,6 +55,8 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
private
final
TEmployeeLogServiceImpl
tEmployeeLogService
;
public
static
final
Pattern
PATTERN
=
Pattern
.
compile
(
"^[-\\+]?[\\d]*$"
);
/**
* @Author huyc
* @Description 档案划转
...
...
@@ -116,6 +119,14 @@ public class TEmpChangeInfoServiceImpl extends ServiceImpl<TEmpChangeInfoMapper,
errorMsg
=
new
HashSet
<>();
TEmpChangeInfoVO
excel
=
excelVOList
.
get
(
i
);
if
(
Common
.
isNotNull
(
excel
.
getChangeStartMonth
())
&&
excel
.
getChangeStartMonth
().
length
()
>
CommonConstants
.
dingleDigitIntArray
[
6
])
{
errorMsg
.
add
(
"第"
+
(
i
+
2
)
+
"行划转起始月长度不能超过6位"
);
errorMsgMap
.
put
((
i
+
2L
),
new
ErrorMessage
(
"第"
+
(
i
+
2
)
+
"行划转起始月长度不能超过6位"
));
}
if
(!
PATTERN
.
matcher
(
excel
.
getChangeStartMonth
()).
matches
())
{
errorMsg
.
add
(
"第"
+
(
i
+
2
)
+
"行划转起始月格式错误"
);
errorMsgMap
.
put
((
i
+
2L
),
new
ErrorMessage
(
"第"
+
(
i
+
2
)
+
"行划转起始月格式错误"
));
}
if
(
excel
.
getUnsettleDeal
().
equals
(
CommonConstants
.
IS_CHANGE
))
{
if
(
Common
.
isEmpty
(
excel
.
getChangeStartMonth
()))
{
errorMsg
.
add
(
"第"
+
(
i
+
2
)
+
"行划转起始月不能为空"
);
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeProjectServiceImpl.java
View file @
db553efb
...
...
@@ -778,7 +778,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
@Override
public
void
listExportProject
(
HttpServletResponse
response
,
EmployeeProjectExportVO
projectDTO
,
String
idstr
,
List
<
String
>
exportFields
)
{
String
fileName
=
"项目档案批量导出"
+
LocalDateTime
.
now
()
+
".xlsx"
;
String
fileName
=
"项目档案批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
// 根据用户传入确定要导出的字段
Set
<
String
>
includeColumnFiledNames
=
new
HashSet
<
String
>();
for
(
String
exportField
:
exportFields
)
{
...
...
@@ -804,7 +804,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
out
=
response
.
getOutputStream
();
response
.
setContentType
(
"multipart/form-data"
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename
*=utf-8'zh_cn'
"
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename
=
"
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel
.
write
(
out
,
EmployeeProjectExportVO
.
class
).
includeColumnFiledNames
(
includeColumnFiledNames
).
sheet
(
"项目档案"
)
.
doWrite
(
list
);
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TElecEmployeeInfoMapper.xml
View file @
db553efb
...
...
@@ -74,6 +74,9 @@
<if
test=
"tElecEmployeeInfo.deptName != null and tElecEmployeeInfo.deptName.trim() != ''"
>
AND b.DEPT_NAME like concat('%',#{tElecEmployeeInfo.deptName},'%')
</if>
<if
test=
"tElecEmployeeInfo.empNo != null and tElecEmployeeInfo.empNo.trim() != ''"
>
AND b.EMP_NO like = #{tElecEmployeeInfo.empNo}
</if>
<if
test=
"tElecEmployeeInfo.deptNo != null and tElecEmployeeInfo.deptNo.trim() != ''"
>
AND b.DEPT_NO like concat('%',#{tElecEmployeeInfo.deptNo},'%')
</if>
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
View file @
db553efb
...
...
@@ -220,6 +220,7 @@
a.STATUS,
a.CREATE_NAME,
a.CREATE_TIME,
b.EMP_EMAIL,
b.EMP_NATRUE AS PROEMP_NATRUE
</sql>
...
...
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