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
6165377f
Commit
6165377f
authored
Oct 15, 2020
by
qinhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
质量导出---去掉null
parent
bc112b05
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
QualityApplyServiceImpl.java
...cement/business/service/impl/QualityApplyServiceImpl.java
+16
-8
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/QualityApplyServiceImpl.java
View file @
6165377f
...
@@ -82,7 +82,7 @@ public class QualityApplyServiceImpl extends ServiceImpl<QualityApplyMapper, Qua
...
@@ -82,7 +82,7 @@ public class QualityApplyServiceImpl extends ServiceImpl<QualityApplyMapper, Qua
List
<
QualityApply
>
list
=
this
.
list
(
qw
);
List
<
QualityApply
>
list
=
this
.
list
(
qw
);
//找到所有项目id归类
//找到所有项目id归类
Set
<
Integer
>
projectIds
=
list
.
stream
().
map
(
QualityApply:
:
getProjectId
).
collect
(
Collectors
.
toSet
());
Set
<
Integer
>
projectIds
=
list
.
stream
().
map
(
QualityApply:
:
getProjectId
).
collect
(
Collectors
.
toSet
());
String
[]
headers
=
n
ew
String
[
31
]
;
String
[]
headers
=
n
ull
;
List
<
Object
[]>
datas
=
new
ArrayList
<>();
List
<
Object
[]>
datas
=
new
ArrayList
<>();
//关联部门名字
//关联部门名字
Set
<
Integer
>
userIds
=
list
.
stream
()
Set
<
Integer
>
userIds
=
list
.
stream
()
...
@@ -113,12 +113,11 @@ public class QualityApplyServiceImpl extends ServiceImpl<QualityApplyMapper, Qua
...
@@ -113,12 +113,11 @@ public class QualityApplyServiceImpl extends ServiceImpl<QualityApplyMapper, Qua
userGroupMap
.
put
(
arg
.
getId
(),
opt
.
getName
());
userGroupMap
.
put
(
arg
.
getId
(),
opt
.
getName
());
}
}
}));
}));
if
(
userGroupMap
.
size
()
==
0
){
if
(
userGroupMap
.
size
()
==
0
)
{
return
;
return
;
}
}
for
(
Integer
projectId
:
projectIds
)
{
for
(
Integer
projectId
:
projectIds
)
{
//找到每个项目的检测组 以检测组归类
//找到每个项目的检测组 以检测组归类
Set
<
Integer
>
teamIds
=
list
.
stream
()
Set
<
Integer
>
teamIds
=
list
.
stream
()
...
@@ -149,7 +148,11 @@ public class QualityApplyServiceImpl extends ServiceImpl<QualityApplyMapper, Qua
...
@@ -149,7 +148,11 @@ public class QualityApplyServiceImpl extends ServiceImpl<QualityApplyMapper, Qua
objs
[
6
]
=
"部门"
;
objs
[
6
]
=
"部门"
;
objs
[
7
]
=
"分析"
;
objs
[
7
]
=
"分析"
;
for
(
int
i
=
0
;
i
<
teams
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
teams
.
size
();
i
++)
{
objs
[
8
+
i
]
=
teams
.
get
(
i
);
String
teamName
=
teams
.
get
(
i
);
if
(
teamName
.
contains
(
"\""
))
{
teamName
=
teamName
.
replace
(
"\""
,
""
);
}
objs
[
8
+
i
]
=
teamName
;
}
}
datas
.
add
(
objs
);
datas
.
add
(
objs
);
});
});
...
@@ -169,11 +172,16 @@ public class QualityApplyServiceImpl extends ServiceImpl<QualityApplyMapper, Qua
...
@@ -169,11 +172,16 @@ public class QualityApplyServiceImpl extends ServiceImpl<QualityApplyMapper, Qua
//添加名字
//添加名字
objs
[
7
]
=
arg
.
getUserName
();
objs
[
7
]
=
arg
.
getUserName
();
for
(
int
i
=
0
;
i
<
inputValus
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
inputValus
.
size
();
i
++)
{
objs
[
8
+
i
]
=
inputValus
.
get
(
i
);
String
value
=
inputValus
.
get
(
i
);
if
(
value
==
null
){
value
=
"0"
;
}
}
for
(
int
i
=
0
;
i
<
inputValus
.
size
();
i
++
)
{
if
(
value
.
contains
(
"\""
)
)
{
objs
[
8
+
i
]
=
inputValus
.
get
(
i
);
value
=
value
.
replace
(
"\""
,
""
);
}
}
objs
[
8
+
i
]
=
value
;
}
datas
.
add
(
objs
);
datas
.
add
(
objs
);
});
});
...
...
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