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
567d6873
Commit
567d6873
authored
Sep 06, 2023
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP1.5.8' into MVP1.5.8
parents
6ef32b52
64bb08b6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
59 additions
and
4 deletions
+59
-4
CacheConstants.java
...oud/plus/v1/yifu/common/core/constant/CacheConstants.java
+2
-0
CommonConstants.java
...ud/plus/v1/yifu/common/core/constant/CommonConstants.java
+4
-0
SysUserPermissionMapper.xml
...biz/src/main/resources/mapper/SysUserPermissionMapper.xml
+2
-2
TPaymentInfoController.java
...lus/v1/yifu/social/controller/TPaymentInfoController.java
+2
-0
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+49
-1
TPaymentInfoMapper.xml
...cial-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
+0
-1
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/constant/CacheConstants.java
View file @
567d6873
...
...
@@ -146,6 +146,8 @@ public interface CacheConstants {
String
PAYMENT_SOCIAL_PUSH
=
"payment_social_push"
;
String
PAYMENT_SOCIAL_EXPORT
=
"payment_social_export"
;
String
PAYMENT_DISPATCH_BATCH_ADD_IMPORT
=
"payment_dispatch_batch_add_import"
;
String
PAYMENT_DISPATCH_BATCH_REDUCE_IMPORT
=
"payment_dispatch_batch_reduce_import"
;
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/constant/CommonConstants.java
View file @
567d6873
...
...
@@ -578,6 +578,10 @@ public interface CommonConstants {
String
HRO_EMPLOYEE_NULL
=
"Hro人员列表为空"
;
int
THIRTY_INT_NEGATIVE
=
-
30
;
public
static
final
String
SOCIAL_EXPORT_CONTINUE
=
"当前用户有未完成的实缴导出任务不可重复操作"
;
public
static
final
String
SOCIAL_EXPORT_LIMIT
=
"导出量过大,请选择更多查询条件!如果确定要导出这些数据请联系系统管理员操作"
;
/*
* 启用停用状态
*/
...
...
yifu-permission/yifu-permission-biz/src/main/resources/mapper/SysUserPermissionMapper.xml
View file @
567d6873
...
...
@@ -114,7 +114,7 @@
SELECT
a.EMP_NAME,
a.EMP_LOGIN_NAME,
b
.fd_dept_name,
c
.fd_dept_name,
b.name AS PERMISSION_TYPE,
a.NAME,
a.CODE,
...
...
@@ -126,7 +126,7 @@
ELSE a.PERMISSION_STATUS END as PERMISSION_STATUS
FROM sys_user_permission a
LEFT JOIN permission_type b on a.PERMISSION_TYPE = b.id
LEFT JOIN sys_user_info
b on a.EMP_LOGIN_NAME = b
.fd_login_name
LEFT JOIN sys_user_info
c on a.EMP_LOGIN_NAME = c
.fd_login_name
<where>
a.DELETE_FLAG = '1'
<include
refid=
"sysUserPermission_where"
/>
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TPaymentInfoController.java
View file @
567d6873
...
...
@@ -306,6 +306,7 @@ public class TPaymentInfoController {
* @author huyc
* @date 2022-07-22
**/
@SysLog
(
"实缴导入列表不合并导出"
)
@Operation
(
description
=
"导出缴费库 hasPermission('social_tpaymentinfo_export')"
)
@PostMapping
(
"/export"
)
@PreAuthorize
(
"@pms.hasPermission('social_tpaymentinfo_export')"
)
...
...
@@ -336,6 +337,7 @@ public class TPaymentInfoController {
@Operation
(
description
=
"缴费库查询合并导出 hasPermission('social_tpaymentinfo_export')"
)
@PostMapping
(
"/sumSearchExport"
)
@PreAuthorize
(
"@pms.hasPermission('social_tpaymentinfo_export')"
)
@SysLog
(
"实缴查询列表合并导出"
)
public
void
sumSearchExport
(
HttpServletResponse
response
,
@RequestBody
TPaymentInfoSearchVo
searchVo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
searchVo
);
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
567d6873
...
...
@@ -184,11 +184,26 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
List
<
TPaymentInfoBatchVo
>
list
=
new
ArrayList
<>();
Integer
count
=
baseMapper
.
selectCountTPaymentInfo
(
searchVo
);
ServletOutputStream
out
=
null
;
YifuUser
user
=
SecurityUtils
.
getUser
();
String
key
=
CacheConstants
.
PAYMENT_SOCIAL_EXPORT
+
CommonConstants
.
DOWN_LINE_STRING
+
user
.
getId
()
;
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"
));
if
(
Common
.
isNotNull
(
redisUtil
.
get
(
key
)))
{
out
.
write
(
CommonConstants
.
SOCIAL_EXPORT_CONTINUE
.
getBytes
(
"GBK"
));
out
.
close
();
return
;
}
else
{
redisUtil
.
set
(
key
,
user
.
getId
(),
600L
);
}
if
(
count
>
200000
&&
!
CommonConstants
.
ONE_STRING
.
equals
(
user
.
getId
()))
{
out
.
write
(
CommonConstants
.
SOCIAL_EXPORT_LIMIT
.
getBytes
(
"GBK"
));
out
.
close
();
redisUtil
.
remove
(
key
);
return
;
}
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TPaymentInfoBatchVo
.
class
).
includeColumnFieldNames
(
searchVo
.
getExportFields
()).
build
();
int
index
=
0
;
...
...
@@ -220,13 +235,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
excelWriter
.
finish
();
}
}
catch
(
Exception
e
)
{
redisUtil
.
remove
(
key
);
log
.
error
(
"执行异常"
,
e
);
}
finally
{
try
{
if
(
null
!=
out
)
{
out
.
close
();
}
redisUtil
.
remove
(
key
);
}
catch
(
IOException
e
)
{
redisUtil
.
remove
(
key
);
log
.
error
(
"执行异常"
,
e
);
}
}
...
...
@@ -245,11 +263,26 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
List
<
TPaymentInfoExportVo
>
list
=
new
ArrayList
<>();
Integer
count
=
baseMapper
.
selectCountSumPaymentInfo
(
searchVo
);
ServletOutputStream
out
=
null
;
YifuUser
user
=
SecurityUtils
.
getUser
();
String
key
=
CacheConstants
.
PAYMENT_SOCIAL_EXPORT
+
CommonConstants
.
DOWN_LINE_STRING
+
user
.
getId
()
;
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"
));
if
(
Common
.
isNotNull
(
redisUtil
.
get
(
key
)))
{
out
.
write
(
CommonConstants
.
SOCIAL_EXPORT_CONTINUE
.
getBytes
(
"GBK"
));
out
.
close
();
return
;
}
else
{
redisUtil
.
set
(
key
,
user
.
getId
(),
600L
);
}
if
(
count
>
150000
&&
!
CommonConstants
.
ONE_STRING
.
equals
(
user
.
getId
()))
{
out
.
write
(
CommonConstants
.
SOCIAL_EXPORT_LIMIT
.
getBytes
(
"GBK"
));
out
.
close
();
redisUtil
.
remove
(
key
);
return
;
}
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter
excelWriter
=
EasyExcel
.
write
(
out
,
TPaymentInfoExportVo
.
class
).
includeColumnFieldNames
(
searchVo
.
getExportFields
()).
build
();
int
index
=
0
;
...
...
@@ -279,13 +312,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
out
.
flush
();
excelWriter
.
finish
();
}
catch
(
Exception
e
)
{
redisUtil
.
remove
(
key
);
log
.
error
(
"执行异常"
,
e
);
}
finally
{
try
{
if
(
null
!=
out
)
{
out
.
close
();
}
redisUtil
.
remove
(
key
);
}
catch
(
IOException
e
)
{
redisUtil
.
remove
(
key
);
log
.
error
(
"执行异常"
,
e
);
}
}
...
...
@@ -305,14 +341,23 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
List
<
TPaymentInfoNewExportVo
>
list
=
new
ArrayList
<>();
Integer
count
=
baseMapper
.
selectCountPaymentSearchInfo
(
searchVo
);
ServletOutputStream
out
=
null
;
String
key
=
CacheConstants
.
PAYMENT_SOCIAL_EXPORT
+
CommonConstants
.
DOWN_LINE_STRING
+
user
.
getId
()
;
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"
));
if
(
Common
.
isNotNull
(
redisUtil
.
get
(
key
)))
{
out
.
write
(
CommonConstants
.
SOCIAL_EXPORT_CONTINUE
.
getBytes
(
"GBK"
));
out
.
close
();
return
;
}
else
{
redisUtil
.
set
(
key
,
user
.
getId
(),
600L
);
}
if
(
count
>
150000
&&
!
CommonConstants
.
ONE_STRING
.
equals
(
user
.
getId
()))
{
out
.
write
(
"导出量过大,请选择更多查询条件!如果确定要导出这些数据请联系管理员操作"
.
getBytes
(
"GBK"
));
out
.
write
(
CommonConstants
.
SOCIAL_EXPORT_LIMIT
.
getBytes
(
"GBK"
));
out
.
close
();
redisUtil
.
remove
(
key
);
return
;
}
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
...
...
@@ -344,13 +389,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
out
.
flush
();
excelWriter
.
finish
();
}
catch
(
Exception
e
)
{
redisUtil
.
remove
(
key
);
log
.
error
(
"执行异常"
,
e
);
}
finally
{
try
{
if
(
null
!=
out
)
{
out
.
close
();
}
redisUtil
.
remove
(
key
);
}
catch
(
IOException
e
)
{
redisUtil
.
remove
(
key
);
log
.
error
(
"执行异常"
,
e
);
}
}
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TPaymentInfoMapper.xml
View file @
567d6873
...
...
@@ -1981,7 +1981,6 @@
)
) w
GROUP BY w.keyGroup
ORDER BY w.SOCIAL_CREATE_TIME desc
limit #{tPaymentInfo.limitStart},#{tPaymentInfo.limitEnd}
</select>
...
...
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