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
42b7ef7e
Commit
42b7ef7e
authored
Nov 02, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop' into develop
parents
37b7d279
be3f3215
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
965 additions
and
224 deletions
+965
-224
TPaymentInfoExportVo.java
...fu/cloud/plus/v1/yifu/social/vo/TPaymentInfoExportVo.java
+490
-0
TPaymentInfoController.java
...lus/v1/yifu/social/controller/TPaymentInfoController.java
+13
-0
TPaymentInfoMapper.java
.../cloud/plus/v1/yifu/social/mapper/TPaymentInfoMapper.java
+15
-0
TPaymentInfoService.java
...loud/plus/v1/yifu/social/service/TPaymentInfoService.java
+7
-0
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+66
-0
TPaymentInfoMapper.xml
...cial-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
+374
-224
No files found.
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TPaymentInfoExportVo.java
0 → 100644
View file @
42b7ef7e
This diff is collapsed.
Click to expand it.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TPaymentInfoController.java
View file @
42b7ef7e
...
...
@@ -195,6 +195,19 @@ public class TPaymentInfoController {
tPaymentInfoService
.
listExport
(
response
,
searchVo
);
}
/**
* 缴费库合并导出
*
* @author huyc
* @date 2022-10-31
**/
@Operation
(
description
=
"合并导出缴费库 hasPermission('social_tpaymentinfo_export')"
)
@PostMapping
(
"/sumExport"
)
@PreAuthorize
(
"@pms.hasPermission('social_tpaymentinfo_export')"
)
public
void
sumExport
(
HttpServletResponse
response
,
@RequestBody
TPaymentInfoSearchVo
searchVo
)
{
tPaymentInfoService
.
listSumExport
(
response
,
searchVo
);
}
/**
* 根据条件批量删除
*
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TPaymentInfoMapper.java
View file @
42b7ef7e
...
...
@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.UpdateSocialFoundVo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoExportVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoVo
;
import
org.apache.ibatis.annotations.Mapper
;
...
...
@@ -59,6 +60,20 @@ public interface TPaymentInfoMapper extends BaseMapper<TPaymentInfo> {
*/
List
<
TPaymentInfo
>
getTPaymentInfoNoPage
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
);
/**
* 缴费库合并导出查询
* @param searchVo 缴费库
* @return
*/
Integer
selectCountSumPaymentInfo
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
);
/**
* 缴费库简单分页查询
* @param searchVo 缴费库
* @return
*/
List
<
TPaymentInfoExportVo
>
getTPaymentInfoSumNoPage
(
@Param
(
"tPaymentInfo"
)
TPaymentInfoSearchVo
searchVo
);
/**
* 更新社保或者公积金
* @param tPaymentInfo 缴费库
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TPaymentInfoService.java
View file @
42b7ef7e
...
...
@@ -75,6 +75,13 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
*/
void
listExport
(
HttpServletResponse
response
,
TPaymentInfoSearchVo
searchVo
);
/**
* 合并导出缴费库
* @param response
* @param searchVo
* @return
*/
void
listSumExport
(
HttpServletResponse
response
,
TPaymentInfoSearchVo
searchVo
);
/**
* 删除缴费库数据 包括明细
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
42b7ef7e
...
...
@@ -57,6 +57,7 @@ import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService;
import
com.yifu.cloud.plus.v1.yifu.social.service.TPaymentInfoService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TSendEkpErrorService
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentHeFeiVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoExportVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoSearchVo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TPaymentInfoVo
;
import
lombok.extern.log4j.Log4j2
;
...
...
@@ -205,6 +206,71 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
/**
* 缴费库批量导出
*
* @param searchVo 缴费库
* @return
*/
@Override
public
void
listSumExport
(
HttpServletResponse
response
,
TPaymentInfoSearchVo
searchVo
)
{
String
fileName
=
"缴费库合并导出"
+
DateUtil
.
getThisTime
()
+
CommonConstants
.
XLSX
;
//获取要导出的列表
List
<
TPaymentInfoExportVo
>
list
=
new
ArrayList
<>();
Integer
count
=
baseMapper
.
selectCountSumPaymentInfo
(
searchVo
);
ServletOutputStream
out
=
null
;
try
{
out
=
response
.
getOutputStream
();
response
.
setContentType
(
CommonConstants
.
MULTIPART_FORM_DATA
);
response
.
setCharacterEncoding
(
"utf-8"
);
response
.
setHeader
(
CommonConstants
.
CONTENT_DISPOSITION
,
CommonConstants
.
ATTACHMENT_FILENAME
+
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TPaymentInfoExportVo
.
class
).
includeColumnFiledNames
(
searchVo
.
getExportFields
()).
build
();
int
index
=
0
;
if
(
count
>
CommonConstants
.
ZERO_INT
)
{
for
(
int
i
=
0
;
i
<=
count
;
)
{
// 获取实际记录
searchVo
.
setLimitStart
(
i
);
searchVo
.
setLimitEnd
(
CommonConstants
.
EXCEL_EXPORT_LIMIT
);
list
=
baseMapper
.
getTPaymentInfoSumNoPage
(
searchVo
);
if
(
Common
.
isNotNull
(
list
))
{
ExcelUtil
<
TPaymentInfoExportVo
>
util
=
new
ExcelUtil
<>(
TPaymentInfoExportVo
.
class
);
for
(
TPaymentInfoExportVo
vo
:
list
)
{
util
.
convertEntity
(
vo
,
null
,
null
,
null
);
}
}
if
(
Common
.
isNotNull
(
list
))
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"缴费库合并导出"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
index
++;
}
i
=
i
+
CommonConstants
.
EXCEL_EXPORT_LIMIT
;
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
}
}
}
else
{
WriteSheet
writeSheet
=
EasyExcel
.
writerSheet
(
"缴费库合并导出"
+
index
).
build
();
excelWriter
.
write
(
list
,
writeSheet
);
}
if
(
Common
.
isNotNull
(
list
))
{
list
.
clear
();
}
out
.
flush
();
excelWriter
.
finish
();
}
catch
(
Exception
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
finally
{
try
{
if
(
null
!=
out
)
{
out
.
close
();
}
}
catch
(
IOException
e
)
{
log
.
error
(
"执行异常"
,
e
);
}
}
}
@Override
public
R
<
Boolean
>
removeInFoById
(
String
id
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
View file @
42b7ef7e
This diff is collapsed.
Click to expand it.
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