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
ebb3d48c
Commit
ebb3d48c
authored
May 10, 2021
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导出-委托单进展统计 统计检测想数量
parent
7eb0d398
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
12 deletions
+1
-12
DataStatisticsServiceImpl.java
...ment/business/service/impl/DataStatisticsServiceImpl.java
+1
-12
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/DataStatisticsServiceImpl.java
View file @
ebb3d48c
...
...
@@ -399,16 +399,9 @@ public class DataStatisticsServiceImpl implements IDataStatisticsService {
QueryWrapper
<
Sample
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
in
(
"entrust_id"
,
queryList
);
List
<
Sample
>
sampleList
=
sampleService
.
list
(
queryWrapper
);
// List<Integer> sampleIdList = sampleList.stream().filter(x -> x.getCementCode().equals(x.getParallelCode())).map(Sample::getId).collect(Collectors.toList());
//todo 查询样品表里的检测项数量 进行统计
Map
<
Integer
,
List
<
Sample
>>
groupByEntrusteId
=
sampleList
.
stream
().
filter
(
x
->
x
.
getCementCode
().
equals
(
x
.
getParallelCode
())).
collect
(
Collectors
.
groupingBy
(
Sample:
:
getEntrustId
,
Collectors
.
toList
()));
//4.查询所有的派发检测项
// QueryWrapper<SampleDistribution> sdqueryWrapper = new QueryWrapper<>();
// sdqueryWrapper.in("entrust_id", queryList);
...
...
@@ -417,8 +410,6 @@ public class DataStatisticsServiceImpl implements IDataStatisticsService {
//5.分组并统计
// Map<Integer, List<SampleDistribution>> groupByEntrustId = sampleDistributions.stream().collect(Collectors.groupingBy(SampleDistribution::getEntrustId, Collectors.toList()));
//6.开始填充数据。首先填充表头
XSSFWorkbook
wb
=
new
XSSFWorkbook
();
XSSFSheet
sheet
=
wb
.
createSheet
();
...
...
@@ -465,7 +456,7 @@ public class DataStatisticsServiceImpl implements IDataStatisticsService {
}
}
//7.查询样品表里的检测项数量 进行统计
Map
<
String
,
Integer
>
teamNumsMap
=
new
HashMap
<>();
List
<
Sample
>
sampleMainList
=
groupByEntrusteId
.
get
(
entrustId
);
for
(
Sample
s
:
sampleMainList
){
...
...
@@ -478,10 +469,8 @@ public class DataStatisticsServiceImpl implements IDataStatisticsService {
}
}
}
if
(
teamNumsMap
!=
null
)
{
// Map<Integer, List<SampleDistribution>> sampleDistribuGroup = groupByEntrustId.get(entrustId).stream().collect(Collectors.groupingBy(SampleDistribution::getTeamId, Collectors.toList()));
//处理检测项总产值表头
for
(
int
i
=
infoHeader
.
size
();
i
<
teamList
.
size
()
+
infoHeader
.
size
();
i
++)
{
XSSFCell
tempCell
=
row0
.
createCell
(
i
);
...
...
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