Commit ebb3d48c authored by 竹天卫's avatar 竹天卫

导出-委托单进展统计 统计检测想数量

parent 7eb0d398
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment