Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
tianjin-cement
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
竹天卫
tianjin-cement
Commits
7f17e5be
Commit
7f17e5be
authored
Mar 25, 2021
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人员产值统计导出功能 优化2
parent
dcf345c2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
52 deletions
+39
-52
NonStandardApplyController.java
...ement/business/controller/NonStandardApplyController.java
+4
-4
INonStandardApplyService.java
.../sc/cement/business/service/INonStandardApplyService.java
+2
-10
NonStandardApplyServiceImpl.java
...nt/business/service/impl/NonStandardApplyServiceImpl.java
+33
-38
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/NonStandardApplyController.java
View file @
7f17e5be
...
...
@@ -34,9 +34,9 @@ public class NonStandardApplyController {
@ApiOperation
(
value
=
"非标产值申请分页"
)
@GetMapping
(
"/getPage"
)
public
BaseResponse
getPage
(
PageQuery
pageQuery
,
String
name
,
Integer
userId
)
{
public
BaseResponse
getPage
(
PageQuery
pageQuery
)
{
try
{
return
iNonStandardApplyService
.
getPage
(
pageQuery
,
name
,
userId
);
return
iNonStandardApplyService
.
getPage
(
pageQuery
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"非标产值申请分页列表{}"
,
e
);
}
...
...
@@ -115,9 +115,9 @@ public class NonStandardApplyController {
@ApiOperation
(
"导出-非标产值申请列表"
)
@PostMapping
(
"/exportList"
)
public
void
exportList
(
String
filename
,
Integer
userId
,
String
name
,
HttpServletResponse
response
)
{
public
void
exportList
(
String
filename
,
HttpServletResponse
response
)
{
try
{
iNonStandardApplyService
.
exportList
(
filename
,
userId
,
name
,
response
);
iNonStandardApplyService
.
exportList
(
filename
,
response
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"导出-非标产值申请导出列表{}"
,
e
);
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/INonStandardApplyService.java
View file @
7f17e5be
...
...
@@ -27,7 +27,7 @@ public interface INonStandardApplyService extends IService<NonStandardApply> {
* @param pageQuery 非标产值信息分页
* @return IPage<NoneStandardApply>
*/
BaseResponse
<
IPage
<
NonStandardApplyVo
>>
getPage
(
PageQuery
pageQuery
,
String
name
,
Integer
userId
);
BaseResponse
<
IPage
<
NonStandardApplyVo
>>
getPage
(
PageQuery
pageQuery
);
/**
* 获取所有非标产值申请信息
...
...
@@ -67,15 +67,7 @@ public interface INonStandardApplyService extends IService<NonStandardApply> {
*/
BaseResponse
delete
(
Integer
id
);
/**
* 非标产值申请列表导出
*
* @param userId 用户id
* @param name 姓名
* @param filename 文件名
* @param response
*/
void
exportList
(
String
filename
,
Integer
userId
,
String
name
,
HttpServletResponse
response
);
void
exportList
(
String
filename
,
HttpServletResponse
response
);
/**
* 更改状态信息,达到改变显示的效果
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/NonStandardApplyServiceImpl.java
View file @
7f17e5be
...
...
@@ -50,10 +50,11 @@ public class NonStandardApplyServiceImpl extends ServiceImpl<NonStandardApplyMap
private
ISysUserService
userService
;
@Override
public
BaseResponse
<
IPage
<
NonStandardApplyVo
>>
getPage
(
PageQuery
pageQuery
,
String
name
,
Integer
userId
)
{
public
BaseResponse
<
IPage
<
NonStandardApplyVo
>>
getPage
(
PageQuery
pageQuery
)
{
LoginUser
loginUser
=
userService
.
getLoginUser
();
Assert
.
notNull
(
loginUser
,
"用户未登录!"
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"name"
,
name
);
params
.
put
(
"userId"
,
userId
);
params
.
put
(
"userId"
,
loginUser
.
getId
());
Page
<
NonStandardApplyVo
>
page
=
new
Page
<>(
pageQuery
.
getPageNo
(),
pageQuery
.
getPageSize
());
IPage
<
NonStandardApplyVo
>
pages
=
nonStandardApplyMapper
.
getPage
(
page
,
params
);
return
BaseResponse
.
okData
(
pages
);
...
...
@@ -140,18 +141,12 @@ public class NonStandardApplyServiceImpl extends ServiceImpl<NonStandardApplyMap
}
@Override
public
void
exportList
(
String
filename
,
Integer
userId
,
String
name
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
public
void
exportList
(
String
filename
,
HttpServletResponse
response
)
{
LoginUser
loginUser
=
userService
.
getLoginUser
();
Assert
.
notNull
(
loginUser
,
"用户未登录!"
);
if
(
loginUser
!=
null
){
if
(!
loginUser
.
getRoleList
().
getName
().
equals
(
"系统管理员"
)){
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"userId"
,
loginUser
.
getId
());
}
params
.
put
(
"name"
,
name
);
List
<
Map
<
String
,
Object
>>
list
=
nonStandardApplyMapper
.
exportList
(
params
);
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
...
...
@@ -181,7 +176,7 @@ public class NonStandardApplyServiceImpl extends ServiceImpl<NonStandardApplyMap
filename
==
null
||
filename
.
trim
().
length
()
<=
0
?
"非标产值申请"
:
filename
,
headers
,
datas
,
response
);
}
}
}
...
...
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