} | } | ||||
} | } | ||||
inspectionFileHandleVo.setQuestionCode(inspectionFile.getQuestionCode()); | inspectionFileHandleVo.setQuestionCode(inspectionFile.getQuestionCode()); | ||||
inspectionFileHandleVo.setFileImage(CommonConfig.imageURL + inspectionFile.getFileImage()); | |||||
inspectionFileHandleVo.setFileThumbnail(CommonConfig.imageURL + inspectionFile.getFileThumbnail()); | inspectionFileHandleVo.setFileThumbnail(CommonConfig.imageURL + inspectionFile.getFileThumbnail()); | ||||
inspectionFileHandleVo.setFileOriginal(CommonConfig.imageURL + inspectionFile.getFileOriginal()); | inspectionFileHandleVo.setFileOriginal(CommonConfig.imageURL + inspectionFile.getFileOriginal()); | ||||
return inspectionFileHandleVo; | return inspectionFileHandleVo; |
if (null != questionType) { | if (null != questionType) { | ||||
inspectionFileDistributionListVo.setQuestionName(questionType.getContent()); | inspectionFileDistributionListVo.setQuestionName(questionType.getContent()); | ||||
} | } | ||||
if (StringUtils.isNotEmpty(inspectionFileDistributionListVo.getFileImage())) { | |||||
inspectionFileDistributionListVo.setFileImage(CommonConfig.imageURL + inspectionFileDistributionListVo.getFileImage()); | |||||
} | |||||
if (StringUtils.isNotEmpty(inspectionFileDistributionListVo.getFileThumbnail())) { | if (StringUtils.isNotEmpty(inspectionFileDistributionListVo.getFileThumbnail())) { | ||||
inspectionFileDistributionListVo.setFileThumbnail(CommonConfig.imageURL + inspectionFileDistributionListVo.getFileThumbnail()); | inspectionFileDistributionListVo.setFileThumbnail(CommonConfig.imageURL + inspectionFileDistributionListVo.getFileThumbnail()); | ||||
} | } |
* @return | * @return | ||||
*/ | */ | ||||
private List<InspectionFilePageListByInspectionIdVo> buildInspectionFilePageListVoList(List<InspectionFile> inspectionFileList) { | private List<InspectionFilePageListByInspectionIdVo> buildInspectionFilePageListVoList(List<InspectionFile> inspectionFileList) { | ||||
List<QuestionType> questionTypeList = questionTypeMapper.selectList(new LambdaQueryWrapper<QuestionType>() | |||||
.eq(QuestionType::getMark, MarkEnum.VALID.getCode())); | |||||
List<InspectionFilePageListByInspectionIdVo> inspectionFilePageListVoList = InspectionFileConverMapper.INSTANCE.fromInspectionFileListToInspectionFilePageByInspectionIdListVoList(inspectionFileList); | List<InspectionFilePageListByInspectionIdVo> inspectionFilePageListVoList = InspectionFileConverMapper.INSTANCE.fromInspectionFileListToInspectionFilePageByInspectionIdListVoList(inspectionFileList); | ||||
for (InspectionFilePageListByInspectionIdVo inspectionFilePageListVo : inspectionFilePageListVoList) { | for (InspectionFilePageListByInspectionIdVo inspectionFilePageListVo : inspectionFilePageListVoList) { | ||||
inspectionFilePageListVo.setFileImage(CommonConfig.imageURL + inspectionFilePageListVo.getFileImage()); | |||||
inspectionFilePageListVo.setFileThumbnail(CommonConfig.imageURL + inspectionFilePageListVo.getFileThumbnail()); | inspectionFilePageListVo.setFileThumbnail(CommonConfig.imageURL + inspectionFilePageListVo.getFileThumbnail()); | ||||
inspectionFilePageListVo.setFileOriginal(CommonConfig.imageURL + inspectionFilePageListVo.getFileOriginal()); | inspectionFilePageListVo.setFileOriginal(CommonConfig.imageURL + inspectionFilePageListVo.getFileOriginal()); | ||||
} | } |
inspectionFileHandleVo.setLatitude(inspectionFile.getLatitude()); | inspectionFileHandleVo.setLatitude(inspectionFile.getLatitude()); | ||||
inspectionFileHandleVo.setLongitude(inspectionFile.getLongitude()); | inspectionFileHandleVo.setLongitude(inspectionFile.getLongitude()); | ||||
inspectionFileHandleVo.setLocation(inspectionFile.getLocation()); | inspectionFileHandleVo.setLocation(inspectionFile.getLocation()); | ||||
inspectionFileHandleVo.setFileImage(CommonConfig.imageURL + inspectionFile.getFileImage()); | |||||
inspectionFileHandleVo.setFileThumbnail(CommonConfig.imageURL + inspectionFile.getFileThumbnail()); | inspectionFileHandleVo.setFileThumbnail(CommonConfig.imageURL + inspectionFile.getFileThumbnail()); | ||||
inspectionFileHandleVo.setFileOriginal(CommonConfig.imageURL + inspectionFile.getFileOriginal()); | inspectionFileHandleVo.setFileOriginal(CommonConfig.imageURL + inspectionFile.getFileOriginal()); | ||||
questionType = questionTypeMap.get(inspectionFile.getQuestionCode()); | questionType = questionTypeMap.get(inspectionFile.getQuestionCode()); |
private List<InspectionFilePageListVo> buildInspectionFilePageListVoList(List<InspectionFileExtend> inspectionFileExtendList) { | private List<InspectionFilePageListVo> buildInspectionFilePageListVoList(List<InspectionFileExtend> inspectionFileExtendList) { | ||||
Map<String, RoadInformation> roadMap = this.getRoadMap(inspectionFileExtendList); | Map<String, RoadInformation> roadMap = this.getRoadMap(inspectionFileExtendList); | ||||
Map<String, Dept> deptMap = this.getDeptMap(inspectionFileExtendList); | Map<String, Dept> deptMap = this.getDeptMap(inspectionFileExtendList); | ||||
// Map<String, QuestionType> questionTypeMap = this.getQuestionTypeMap(); | |||||
List<InspectionFilePageListVo> inspectionFilePageListVoList = InspectionFileConverMapper.INSTANCE.fromInspectionFileExtendListToInspectionFilePageListVoList(inspectionFileExtendList); | List<InspectionFilePageListVo> inspectionFilePageListVoList = InspectionFileConverMapper.INSTANCE.fromInspectionFileExtendListToInspectionFilePageListVoList(inspectionFileExtendList); | ||||
RoadInformation road; | RoadInformation road; | ||||
Dept dept; | Dept dept; | ||||
if (ObjectUtil.isNotNull(dept)) { | if (ObjectUtil.isNotNull(dept)) { | ||||
inspectionFilePageListVo.setDeptName(dept.getName()); | inspectionFilePageListVo.setDeptName(dept.getName()); | ||||
} | } | ||||
inspectionFilePageListVo.setFileImage(CommonConfig.imageURL + inspectionFilePageListVo.getFileImage()); | |||||
inspectionFilePageListVo.setFileThumbnail(CommonConfig.imageURL + inspectionFilePageListVo.getFileThumbnail()); | inspectionFilePageListVo.setFileThumbnail(CommonConfig.imageURL + inspectionFilePageListVo.getFileThumbnail()); | ||||
inspectionFilePageListVo.setFileOriginal(CommonConfig.imageURL + inspectionFilePageListVo.getFileOriginal()); | inspectionFilePageListVo.setFileOriginal(CommonConfig.imageURL + inspectionFilePageListVo.getFileOriginal()); | ||||
} | } | ||||
return deptMap; | return deptMap; | ||||
} | } | ||||
/** | |||||
* | |||||
* 获取问题类型列表,放到map,减少循环次数 | |||||
* | |||||
* @return | |||||
*/ | |||||
private Map<String, QuestionType> getQuestionTypeMap() { | |||||
List<QuestionType> questionTypeList = questionTypeMapper.selectList(new LambdaQueryWrapper<QuestionType>() | |||||
.eq(QuestionType::getMark, 1)); | |||||
Map<String, QuestionType> questionTypeMap = questionTypeList.stream().collect(Collectors.toMap(QuestionType::getId, Function.identity())); | |||||
return questionTypeMap; | |||||
} | |||||
} | } |
str = "问题图片"; | str = "问题图片"; | ||||
cell.add(new Paragraph(str, font)); | cell.add(new Paragraph(str, font)); | ||||
} else if (j == 6) { | } else if (j == 6) { | ||||
String imageUrl = inspectionFile.getFileOriginal(); | |||||
String imageUrl = inspectionFile.getFileImage(); | |||||
cell = this.getImageCell(imageUrl); | cell = this.getImageCell(imageUrl); | ||||
} | } | ||||
table.addCell(cell); | table.addCell(cell); |
List<String> handlerImageList = null; | List<String> handlerImageList = null; | ||||
for (InspectionFileReportVo inspectionFileReportVo : inspectionFileHandleVoList) { | for (InspectionFileReportVo inspectionFileReportVo : inspectionFileHandleVoList) { | ||||
inspectionFileHandle = inspectionFileHandleMap.get(inspectionFileReportVo.getId()); | inspectionFileHandle = inspectionFileHandleMap.get(inspectionFileReportVo.getId()); | ||||
inspectionFileReportVo.setFileImage(CommonConfig.imageURL + inspectionFileReportVo.getFileImage()); | |||||
inspectionFileReportVo.setFileThumbnail(CommonConfig.imageURL + inspectionFileReportVo.getFileThumbnail()); | inspectionFileReportVo.setFileThumbnail(CommonConfig.imageURL + inspectionFileReportVo.getFileThumbnail()); | ||||
inspectionFileReportVo.setFileOriginal(CommonConfig.imageURL + inspectionFileReportVo.getFileOriginal()); | inspectionFileReportVo.setFileOriginal(CommonConfig.imageURL + inspectionFileReportVo.getFileOriginal()); | ||||
if (null != inspectionFileHandle) { | if (null != inspectionFileHandle) { |
List<InspectionFileReportVo> inspectionFileHandleVoList = InspectionFileConverMapper.INSTANCE.fromInspectionFileListToInspectionFileHandleVoList(inspectionFileList); | List<InspectionFileReportVo> inspectionFileHandleVoList = InspectionFileConverMapper.INSTANCE.fromInspectionFileListToInspectionFileHandleVoList(inspectionFileList); | ||||
if (CollectionUtil.isNotEmpty(inspectionFileHandleVoList)) { | if (CollectionUtil.isNotEmpty(inspectionFileHandleVoList)) { | ||||
for (InspectionFileReportVo inspectionFileReportVo : inspectionFileHandleVoList) { | for (InspectionFileReportVo inspectionFileReportVo : inspectionFileHandleVoList) { | ||||
inspectionFileReportVo.setFileImage(CommonConfig.imageURL + inspectionFileReportVo.getFileImage()); | |||||
inspectionFileReportVo.setFileThumbnail(CommonConfig.imageURL + inspectionFileReportVo.getFileThumbnail()); | inspectionFileReportVo.setFileThumbnail(CommonConfig.imageURL + inspectionFileReportVo.getFileThumbnail()); | ||||
inspectionFileReportVo.setFileOriginal(CommonConfig.imageURL + inspectionFileReportVo.getFileOriginal()); | inspectionFileReportVo.setFileOriginal(CommonConfig.imageURL + inspectionFileReportVo.getFileOriginal()); | ||||
} | } |
*/ | */ | ||||
private String fileName; | private String fileName; | ||||
/** | |||||
* 标记图 | |||||
*/ | |||||
private String fileImage; | |||||
/** | /** | ||||
* 缩略图 | * 缩略图 | ||||
*/ | */ |
*/ | */ | ||||
private String fileName; | private String fileName; | ||||
/** | |||||
* 标记图 | |||||
*/ | |||||
private String fileImage; | |||||
/** | /** | ||||
* 缩略图 | * 缩略图 | ||||
*/ | */ |
*/ | */ | ||||
private String fileName; | private String fileName; | ||||
/** | |||||
* 标记图 | |||||
*/ | |||||
private String fileImage; | |||||
/** | /** | ||||
* 缩略图 | * 缩略图 | ||||
*/ | */ |
*/ | */ | ||||
private String fileName; | private String fileName; | ||||
/** | |||||
* 标记图 | |||||
*/ | |||||
private String fileImage; | |||||
/** | /** | ||||
* 缩略图 | * 缩略图 | ||||
*/ | */ |
*/ | */ | ||||
private String fileName; | private String fileName; | ||||
/** | |||||
* 标记图 | |||||
*/ | |||||
private String fileImage; | |||||
/** | /** | ||||
* 缩略图 | * 缩略图 | ||||
*/ | */ |