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
acdf59f2
Commit
acdf59f2
authored
May 21, 2024
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.6.4-优化导出的count
parent
5b9f4544
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
20 deletions
+25
-20
TSalaryStandardOriginalMapper.java
.../v1/yifu/salary/mapper/TSalaryStandardOriginalMapper.java
+3
-0
TSalaryStandardOriginalServiceImpl.java
...lary/service/impl/TSalaryStandardOriginalServiceImpl.java
+6
-20
TSalaryStandardOriginalMapper.xml
...c/main/resources/mapper/TSalaryStandardOriginalMapper.xml
+16
-0
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/mapper/TSalaryStandardOriginalMapper.java
View file @
acdf59f2
...
@@ -57,4 +57,7 @@ public interface TSalaryStandardOriginalMapper extends BaseMapper<TSalaryStandar
...
@@ -57,4 +57,7 @@ public interface TSalaryStandardOriginalMapper extends BaseMapper<TSalaryStandar
List
<
TSalaryOriginalExportVo
>
getTSalaryOriginalExportVoList
(
@Param
(
"tSalaryStandardOriginal"
)
TSalaryOriginalSearchVo
tSalaryStandardOriginal
List
<
TSalaryOriginalExportVo
>
getTSalaryOriginalExportVoList
(
@Param
(
"tSalaryStandardOriginal"
)
TSalaryOriginalSearchVo
tSalaryStandardOriginal
,
@Param
(
"idsStr"
)
List
<
String
>
idsStr
);
,
@Param
(
"idsStr"
)
List
<
String
>
idsStr
);
int
exportListCount
(
@Param
(
"tSalaryStandardOriginal"
)
TSalaryOriginalSearchVo
tSalaryStandardOriginal
,
@Param
(
"idsStr"
)
List
<
String
>
idsStr
);
}
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TSalaryStandardOriginalServiceImpl.java
View file @
acdf59f2
...
@@ -20,9 +20,7 @@ import com.alibaba.excel.EasyExcelFactory;
...
@@ -20,9 +20,7 @@ import com.alibaba.excel.EasyExcelFactory;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.alibaba.excel.write.metadata.WriteSheet
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
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.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.monitorjbl.xlsx.StreamingReader
;
import
com.monitorjbl.xlsx.StreamingReader
;
...
@@ -97,6 +95,11 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
...
@@ -97,6 +95,11 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
return
baseMapper
.
getTSalaryOriginalExportVoList
(
searchVo
,
idList
);
return
baseMapper
.
getTSalaryOriginalExportVoList
(
searchVo
,
idList
);
}
}
private
int
exportListCount
(
TSalaryOriginalSearchVo
searchVo
)
{
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
return
baseMapper
.
exportListCount
(
searchVo
,
idList
);
}
/**
/**
* @Description: 分页查询
* @Description: 分页查询
* @Author: hgw
* @Author: hgw
...
@@ -1042,7 +1045,7 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
...
@@ -1042,7 +1045,7 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
String
fileName
=
"薪资原表配置导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
String
fileName
=
"薪资原表配置导出"
+
DateUtil
.
getThisTime
()
+
".xlsx"
;
//获取要导出的列表
//获取要导出的列表
List
<
TSalaryOriginalExportVo
>
list
=
new
ArrayList
<>();
List
<
TSalaryOriginalExportVo
>
list
=
new
ArrayList
<>();
long
count
=
noPageCountDiy
(
searchVo
);
long
count
=
exportListCount
(
searchVo
);
ServletOutputStream
out
=
null
;
ServletOutputStream
out
=
null
;
try
{
try
{
out
=
response
.
getOutputStream
();
out
=
response
.
getOutputStream
();
...
@@ -1087,21 +1090,4 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
...
@@ -1087,21 +1090,4 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
}
}
}
}
private
Long
noPageCountDiy
(
TSalaryOriginalSearchVo
searchVo
)
{
LambdaQueryWrapper
<
TSalaryStandardOriginal
>
wrapper
=
buildQueryWrapper
(
searchVo
);
List
<
String
>
idList
=
Common
.
getList
(
searchVo
.
getIds
());
if
(
Common
.
isNotNull
(
idList
))
{
wrapper
.
in
(
TSalaryStandardOriginal:
:
getId
,
idList
);
}
return
baseMapper
.
selectCount
(
wrapper
);
}
private
LambdaQueryWrapper
buildQueryWrapper
(
TSalaryOriginalSearchVo
entity
)
{
LambdaQueryWrapper
<
TSalaryOriginalSearchVo
>
wrapper
=
Wrappers
.
lambdaQuery
(
entity
);
if
(
Common
.
isNotNull
(
entity
.
getCreateName
()))
{
wrapper
.
like
(
TSalaryOriginalSearchVo:
:
getCreateName
,
entity
.
getCreateName
());
}
return
wrapper
;
}
}
}
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TSalaryStandardOriginalMapper.xml
View file @
acdf59f2
...
@@ -123,6 +123,22 @@
...
@@ -123,6 +123,22 @@
ORDER BY a.CREATE_TIME desc
ORDER BY a.CREATE_TIME desc
</select>
</select>
<select
id=
"exportListCount"
resultType=
"java.lang.Integer"
>
SELECT
count(1)
FROM
t_salary_standard_original a
<where>
a.DELETE_FLAG = 0
<if
test=
"idsStr != null and idsStr.size > 0"
>
AND a.ID in
<foreach
item=
"items"
index=
"index"
collection=
"idsStr"
open=
"("
separator=
","
close=
")"
>
#{items}
</foreach>
</if>
<include
refid=
"TSalaryStandardOriginal_where"
/>
</where>
</select>
<select
id=
"getTSalaryOriginalExportVoList"
resultMap=
"TSalaryOriginalExportMap"
>
<select
id=
"getTSalaryOriginalExportVoList"
resultMap=
"TSalaryOriginalExportMap"
>
SELECT
SELECT
a.DEPT_NO,a.DEPT_NAME,a.SET_NAME,a.CREATE_NAME,a.CREATE_TIME
a.DEPT_NO,a.DEPT_NAME,a.SET_NAME,a.CREATE_NAME,a.CREATE_TIME
...
...
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