|
@@ -9199,7 +9199,24 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public List<Map<String, Object>> getTaskReportList(Integer taskId) {
|
|
public List<Map<String, Object>> getTaskReportList(Integer taskId) {
|
|
|
|
|
+ DateTimeFormatter df=DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
List<Map<String, Object>> reportList = reportMapper.getReportByTask(taskId);
|
|
List<Map<String, Object>> reportList = reportMapper.getReportByTask(taskId);
|
|
|
|
|
+ //增加展示附件的功能
|
|
|
|
|
+ List<Integer> batchIds = reportList.stream().filter(i->i.get("batchId")!=null&&!StringUtils.isEmpty(i.get("batchId"))).collect(Collectors.toList()).stream().map(i -> Integer.valueOf(String.valueOf(i.get("batchId")))).distinct().collect(Collectors.toList());
|
|
|
|
|
+ List<ReportBatch> batchList=new ArrayList<>();
|
|
|
|
|
+ if(batchIds.size()>0){
|
|
|
|
|
+ batchList = reportBatchMapper.selectList(new LambdaQueryWrapper<ReportBatch>().in(ReportBatch::getId, batchIds));
|
|
|
|
|
+ }
|
|
|
|
|
+ for (Map<String, Object> rpMap : reportList) {
|
|
|
|
|
+ if(null!=rpMap.get("batchId")&&!StringUtils.isEmpty(rpMap.get("batchId"))){
|
|
|
|
|
+ ReportBatch batch = batchList.stream().filter(i -> i.getId().equals(Integer.valueOf(String.valueOf(rpMap.get("batchId"))))).findFirst().orElse(null);
|
|
|
|
|
+ if(null!=batch){
|
|
|
|
|
+ rpMap.put("summaryTitle", df.format(batch.getStartDate())+"至"+df.format(batch.getEndDate())+"周总结:");
|
|
|
|
|
+ rpMap.put("summary", batch.getSummary());
|
|
|
|
|
+ rpMap.put("attachment", batch.getAttachment());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
return reportList;
|
|
return reportList;
|
|
|
}
|
|
}
|
|
|
|
|
|