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
4a6ced87
Commit
4a6ced87
authored
Jan 29, 2023
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.4-EXPORT' into MVP1.4-EXPORT
parents
0e86c87b
855b0ee2
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
96 additions
and
13 deletions
+96
-13
TEmployeeContractInfo.java
...d/plus/v1/yifu/archives/entity/TEmployeeContractInfo.java
+15
-0
TEmployeeContractInfoMapper.java
.../v1/yifu/archives/mapper/TEmployeeContractInfoMapper.java
+5
-1
TEmployeeContractInfoServiceImpl.java
...chives/service/impl/TEmployeeContractInfoServiceImpl.java
+46
-12
TEmployeeContractInfoMapper.xml
...src/main/resources/mapper/TEmployeeContractInfoMapper.xml
+30
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TEmployeeContractInfo.java
View file @
4a6ced87
...
...
@@ -510,4 +510,19 @@ public class TEmployeeContractInfo extends BaseEntity {
@ExcelAttribute
(
name
=
"减少原因"
)
@Schema
(
description
=
"减少原因"
)
private
String
reduceReason
;
/**
* @Author fxj
* 查询数据起
**/
@Schema
(
description
=
"查询limit 开始"
)
@TableField
(
exist
=
false
)
private
int
limitStart
;
/**
* @Author fxj
* 查询数据止
**/
@Schema
(
description
=
"查询limit 数据条数"
)
@TableField
(
exist
=
false
)
private
int
limitEnd
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TEmployeeContractInfoMapper.java
View file @
4a6ced87
...
...
@@ -23,7 +23,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeContractInfo
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportAuditVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeContractExportVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.EmployeeExportVO
;
import
com.yifu.cloud.plus.v1.yifu.archives.vo.TEmployeeContractSearchVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -50,8 +49,13 @@ public interface TEmployeeContractInfoMapper extends BaseMapper<TEmployeeContrac
List
<
TEmployeeContractInfo
>
getTEmployeeContractList
(
@Param
(
"tEmployeeContractInfo"
)
TEmployeeContractInfo
tEmployeeContractInfo
);
List
<
EmployeeContractExportVO
>
getTEmployeeContractExport
(
@Param
(
"tEmployeeContractInfo"
)
TEmployeeContractInfo
tEmployeeContractInfo
);
Integer
selectCountContractExport
(
@Param
(
"tEmployeeContractInfo"
)
TEmployeeContractInfo
tEmployeeContractInfo
);
List
<
EmployeeContractExportVO
>
getTEmployeeContractExportHistory
(
@Param
(
"tEmployeeContractInfo"
)
TEmployeeContractInfo
tEmployeeContractInfo
);
Integer
selectCountHistoryContractExport
(
@Param
(
"tEmployeeContractInfo"
)
TEmployeeContractInfo
tEmployeeContractInfo
);
TEmployeeContractInfo
getOneContractByApplyNo
(
@Param
(
"applyNo"
)
String
applyNo
);
/**
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TEmployeeContractInfoServiceImpl.java
View file @
4a6ced87
...
...
@@ -1130,11 +1130,9 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if
(
contractInfo
!=
null
&&
contractInfo
.
getExportFields
()
!=
null
&&
!
contractInfo
.
getExportFields
().
isEmpty
())
{
String
fileName
=
"员工合同批量导出"
+
DateUtil
.
getThisTime
()
+
CommonConstants
.
XLSX
;
//获取要导出的列表
List
<
EmployeeContractExportVO
>
list
=
baseMapper
.
getTEmployeeContractExport
(
contractInfo
);
List
<
EmployeeContractExportVO
>
list
=
new
ArrayList
<>(
);
ServletOutputStream
out
=
null
;
if
(
list
==
null
||
list
.
isEmpty
())
{
list
=
new
ArrayList
<>();
}
Integer
count
=
baseMapper
.
selectCountContractExport
(
contractInfo
);
try
{
ExcelUtil
<
EmployeeContractExportVO
>
util
=
new
ExcelUtil
<>(
EmployeeContractExportVO
.
class
);
out
=
response
.
getOutputStream
();
...
...
@@ -1149,8 +1147,27 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
EmployeeContractExportVO
.
class
)
.
registerConverter
(
new
DictConverter
(
nameAndDicTypeMap
,
redisLabelMap
))
.
includeColumnFieldNames
(
contractInfo
.
getExportFields
()).
build
();
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"员工合同"
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
WriteSheet
writeSheet
;
for
(
int
i
=
0
;
i
<=
count
;
i
+=
CommonConstants
.
EXCEL_EXPORT_LIMIT
)
{
// 获取实际记录
contractInfo
.
setLimitStart
(
i
);
contractInfo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
baseMapper
.
getTEmployeeContractExport
(
contractInfo
);
if
(
Common
.
isNotNull
(
list
))
{
writeSheet
=
EasyExcel
.
writerSheet
(
"员工合同"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
}
}
}
else
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"员工合同"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
}
out
.
flush
();
excelWriter
.
finish
();
}
catch
(
Exception
e
)
{
...
...
@@ -1175,11 +1192,9 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if
(
contractInfo
!=
null
&&
contractInfo
.
getExportFields
()
!=
null
&&
!
contractInfo
.
getExportFields
().
isEmpty
())
{
String
fileName
=
"员工合同批量导出【合并历史】"
+
DateUtil
.
getThisTime
()
+
CommonConstants
.
XLSX
;
//获取要导出的列表
List
<
EmployeeContractExportVO
>
list
=
baseMapper
.
getTEmployeeContractExportHistory
(
contractInfo
);
List
<
EmployeeContractExportVO
>
list
=
new
ArrayList
<>(
);
ServletOutputStream
out
=
null
;
if
(
list
==
null
||
list
.
isEmpty
())
{
list
=
new
ArrayList
<>();
}
Integer
count
=
baseMapper
.
selectCountHistoryContractExport
(
contractInfo
);
try
{
ExcelUtil
<
EmployeeContractExportVO
>
util
=
new
ExcelUtil
<>(
EmployeeContractExportVO
.
class
);
out
=
response
.
getOutputStream
();
...
...
@@ -1194,8 +1209,27 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
EmployeeContractExportVO
.
class
)
.
registerConverter
(
new
DictConverter
(
nameAndDicTypeMap
,
redisLabelMap
))
.
includeColumnFieldNames
(
contractInfo
.
getExportFields
()).
build
();
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"员工合同【合并历史】"
).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
WriteSheet
writeSheet
;
for
(
int
i
=
0
;
i
<=
count
;
i
+=
CommonConstants
.
EXCEL_EXPORT_LIMIT
)
{
// 获取实际记录
contractInfo
.
setLimitStart
(
i
);
contractInfo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
baseMapper
.
getTEmployeeContractExportHistory
(
contractInfo
);
if
(
Common
.
isNotNull
(
list
))
{
writeSheet
=
EasyExcel
.
writerSheet
(
"员工合同【合并历史】"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
}
}
}
else
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"员工合同【合并历史】"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
}
out
.
flush
();
excelWriter
.
finish
();
}
catch
(
Exception
e
)
{
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeContractInfoMapper.xml
View file @
4a6ced87
...
...
@@ -445,6 +445,20 @@
order by a.APPLY_NO desc
</select>
<!--导出合同数量查询-->
<select
id=
"selectCountContractExport"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
FROM t_employee_contract_info a
<where>
a.DELETE_FLAG = 0
<include
refid=
"tEmployeeContractInfo_where"
/>
<if
test=
"tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''"
>
${tEmployeeContractInfo.authSql}
</if>
</where>
</select>
<!--导出-->
<select
id=
"getTEmployeeContractExport"
resultMap=
"tEmployeeContrctInfoExportMap"
>
SELECT
...
...
@@ -495,6 +509,21 @@
</where>
GROUP BY a.id
order by a.APPLY_NO desc
limit #{tEmployeeContractInfo.limitStart},#{tEmployeeContractInfo.limitEnd}
</select>
<!--导出历史合并合同数量查询-->
<select
id=
"selectCountHistoryContractExport"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
FROM t_employee_contract_info a
<where>
a.DELETE_FLAG = 0 and a.AUDIT_TIME_LAST is not null and a.SITUATION != '作废' and a.SITUATION != '终止'
<include
refid=
"tEmployeeContractInfo_where"
/>
<if
test=
"tEmployeeContractInfo.authSql != null and tEmployeeContractInfo.authSql.trim() != ''"
>
${tEmployeeContractInfo.authSql}
</if>
</where>
</select>
<!--导出历史合并-->
...
...
@@ -551,6 +580,7 @@
</where>
GROUP BY a.EMP_IDCARD,a.SETTLE_DOMAIN
order by a.APPLY_NO desc
limit #{tEmployeeContractInfo.limitStart},#{tEmployeeContractInfo.limitEnd}
</select>
<!--tEmployeeContractInfo简单分页查询-->
...
...
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