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
0fcaa995
Commit
0fcaa995
authored
Jul 19, 2022
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合同优化-待提交
parent
8544c851
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
10 deletions
+42
-10
EmployeeContractExportVO.java
...ud/plus/v1/yifu/archives/vo/EmployeeContractExportVO.java
+4
-4
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+4
-4
TEmployeeContractInfoMapper.xml
...src/main/resources/mapper/TEmployeeContractInfoMapper.xml
+6
-0
DateUtil.java
...om/yifu.cloud.plus.v1/yifu/common/core/util/DateUtil.java
+28
-2
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/EmployeeContractExportVO.java
View file @
0fcaa995
...
...
@@ -78,17 +78,17 @@ public class EmployeeContractExportVO implements Serializable {
private
String
contractEnd
;
@ExcelProperty
(
"档案-省"
)
@ExcelAttribute
(
name
=
"档案-省"
,
maxLength
=
32
,
is
DataId
=
true
,
isArea
=
true
,
parentField
=
""
)
@ExcelAttribute
(
name
=
"档案-省"
,
maxLength
=
32
,
is
Area
=
true
)
@Schema
(
description
=
"档案-省"
,
name
=
"fileProvince"
)
private
String
fileProvince
;
@ExcelProperty
(
"档案-市"
)
@ExcelAttribute
(
name
=
"档案-市"
,
maxLength
=
32
,
is
DataId
=
true
,
is
Area
=
true
,
parentField
=
"fileProvince"
)
@ExcelAttribute
(
name
=
"档案-市"
,
maxLength
=
32
,
isArea
=
true
,
parentField
=
"fileProvince"
)
@Schema
(
description
=
"档案-市"
,
name
=
"fileCity"
)
private
String
fileCity
;
@ExcelProperty
(
"档案-县"
)
@ExcelAttribute
(
name
=
"档案-县"
,
maxLength
=
32
,
is
DataId
=
true
,
is
Area
=
true
,
parentField
=
"fileCity"
)
@ExcelAttribute
(
name
=
"档案-县"
,
maxLength
=
32
,
isArea
=
true
,
parentField
=
"fileCity"
)
@Schema
(
description
=
"档案-县"
,
name
=
"fileTown"
)
private
String
fileTown
;
...
...
@@ -114,7 +114,7 @@ public class EmployeeContractExportVO implements Serializable {
@Schema
(
description
=
"合同类型"
,
name
=
"contractName"
)
private
String
contractName
;
@ExcelProperty
(
"
申请编号
"
)
@ExcelProperty
(
"
业务细分
"
)
@NotBlank
(
message
=
"业务细分不能为空"
)
@Length
(
max
=
32
,
message
=
"业务细分不能超过32个字符"
)
@ExcelAttribute
(
name
=
"业务细分"
,
maxLength
=
32
,
needExport
=
true
)
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
0fcaa995
...
...
@@ -200,7 +200,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
tEmployeeContractInfo
.
setEmpNatrue
(
tEmployeeProject
.
getEmpNatrue
());
tEmployeeContractInfo
.
setEmpIdcard
(
tEmployeeInfo
.
getEmpIdcard
());
tEmployeeContractInfo
.
setEmpName
(
tEmployeeInfo
.
getEmpName
());
tEmployeeContractInfo
.
setEmpNo
(
tEmployee
Info
.
getEmpCode
());
tEmployeeContractInfo
.
setEmpNo
(
tEmployee
Project
.
getEmpNo
());
if
(
Common
.
isEmpty
(
tEmployeeContractInfo
.
getCreateBy
()))
{
tEmployeeContractInfo
.
setCreateBy
(
null
==
user
?
""
:
user
.
getId
());
tEmployeeContractInfo
.
setCreateName
(
null
==
user
?
""
:
user
.
getNickname
());
...
...
@@ -792,7 +792,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if
(
contractInfo
!=
null
&&
contractInfo
.
getExportFields
()
!=
null
&&
!
contractInfo
.
getExportFields
().
isEmpty
())
{
String
fileName
=
"员工合同批量导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
List
<
EmployeeContractExportVO
>
list
=
baseMapper
.
getTEmployeeContractExport
History
(
contractInfo
);
List
<
EmployeeContractExportVO
>
list
=
baseMapper
.
getTEmployeeContractExport
(
contractInfo
);
ServletOutputStream
out
=
null
;
if
(
list
==
null
||
list
.
isEmpty
())
{
list
=
new
ArrayList
<>();
...
...
@@ -830,7 +830,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
@Override
public
void
exportContractInfoHistory
(
TEmployeeContractInfo
contractInfo
,
HttpServletResponse
response
)
{
if
(
contractInfo
!=
null
&&
contractInfo
.
getExportFields
()
!=
null
&&
!
contractInfo
.
getExportFields
().
isEmpty
())
{
String
fileName
=
"员工合同批量导出
[合并]
"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
String
fileName
=
"员工合同批量导出
【合并历史】
"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
List
<
EmployeeContractExportVO
>
list
=
baseMapper
.
getTEmployeeContractExportHistory
(
contractInfo
);
ServletOutputStream
out
=
null
;
...
...
@@ -848,7 +848,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
,
CommonConstants
.
UTF8
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
EasyExcel
.
write
(
out
,
EmployeeContractExportVO
.
class
).
includeColumnFiledNames
(
contractInfo
.
getExportFields
())
.
sheet
(
"员工合同
[合并]
"
).
doWrite
(
list
);
.
sheet
(
"员工合同
【合并历史】
"
).
doWrite
(
list
);
out
.
flush
();
}
catch
(
Exception
e
)
{
log
.
error
(
EmployeeConstants
.
CONCART_ALL_EXPORT_EXCEPTION
,
e
);
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeContractInfoMapper.xml
View file @
0fcaa995
...
...
@@ -206,6 +206,12 @@
</sql>
<sql
id=
"tEmployeeContractInfo_where"
>
<if
test=
"tEmployeeContractInfo != null"
>
<if
test=
"tEmployeeContractInfo.idList != null"
>
AND a.id in
<foreach
item=
"idStr"
index=
"index"
collection=
"tEmployeeContractInfo.idList"
open=
"("
separator=
","
close=
")"
>
#{idStr}
</foreach>
</if>
<if
test=
"tEmployeeContractInfo.id != null and tEmployeeContractInfo.id.trim() != ''"
>
AND a.ID = #{tEmployeeContractInfo.id}
</if>
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/util/DateUtil.java
View file @
0fcaa995
...
...
@@ -1162,6 +1162,34 @@ public class DateUtil {
return
sdf
.
format
(
date
);
}
/**
* @param date
* @param patten
* @Description: 按指定格式返回
* @Author: hgw
* @Date: 2022/7/19 17:10
* @return: java.lang.String
**/
public
static
String
formatDatePatten
(
Date
date
,
String
patten
)
{
if
(
Common
.
isEmpty
(
patten
))
{
patten
=
DATETIME_YYYYMM
;
}
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
patten
);
return
sdf
.
format
(
date
);
}
/**
* @param date
* @Description: 按指定格式返回int
* @Author: hgw
* @Date: 2022/7/19 17:13
* @return: java.lang.Integer
**/
public
static
Integer
formatDateInt
(
Date
date
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
DATETIME_YYYYMM
);
return
Integer
.
parseInt
(
sdf
.
format
(
date
));
}
/**
* @param mnt 增减月份的 值
* @param yearMonth 202101
...
...
@@ -1440,7 +1468,6 @@ public class DateUtil {
* @Date: 2020/12/21
* @Description: 获取上个月
* @return: java.lang.String
* @see com.yifu.cloud.v1.common.core.util
**/
public
static
String
getLastMonth
(){
SimpleDateFormat
sf
=
new
SimpleDateFormat
(
DateUtil
.
DATETIME_YYYYMM
);
...
...
@@ -1459,7 +1486,6 @@ public class DateUtil {
* @Date: 2020/12/21
* @Description: 获取上n个月
* @return: java.lang.String
* @see com.yifu.cloud.v1.common.core.util
**/
public
static
String
getLastXMonth
(
int
month
){
SimpleDateFormat
sf
=
new
SimpleDateFormat
(
DateUtil
.
DATETIME_YYYYMM
);
...
...
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