*/ | */ | ||||
private InspectionFileHandleVo buildInspectionFileHandleVo(InspectionFile inspectionFile, InspectionFileHandle inspectionFileHandle) { | private InspectionFileHandleVo buildInspectionFileHandleVo(InspectionFile inspectionFile, InspectionFileHandle inspectionFileHandle) { | ||||
InspectionFileHandleVo inspectionFileHandleVo; | InspectionFileHandleVo inspectionFileHandleVo; | ||||
List<String> handlerImageList = null; | |||||
String handlerImages = ""; | |||||
if (null != inspectionFileHandle) { | if (null != inspectionFileHandle) { | ||||
inspectionFileHandleVo = InspectionFileHandleConverMapper.INSTANCE.fromInspectionFileHandleToInspectionFileHandleVo(inspectionFileHandle); | inspectionFileHandleVo = InspectionFileHandleConverMapper.INSTANCE.fromInspectionFileHandleToInspectionFileHandleVo(inspectionFileHandle); | ||||
if (!StringUtils.isEmpty(inspectionFileHandle.getHandlerImage())) { | if (!StringUtils.isEmpty(inspectionFileHandle.getHandlerImage())) { | ||||
handlerImageList = new ArrayList<>(); | |||||
String[] arr = inspectionFileHandle.getHandlerImage().split(","); | String[] arr = inspectionFileHandle.getHandlerImage().split(","); | ||||
List<String> list = Arrays.stream(arr).map(String::toString).collect(Collectors.toList()); | List<String> list = Arrays.stream(arr).map(String::toString).collect(Collectors.toList()); | ||||
for (String str : list) { | for (String str : list) { | ||||
handlerImageList.add(CommonConfig.imageURL + str); | |||||
handlerImages += CommonConfig.imageURL + str + ","; | |||||
} | } | ||||
} | } | ||||
} else { | } else { | ||||
inspectionFileHandleVo = new InspectionFileHandleVo(); | inspectionFileHandleVo = new InspectionFileHandleVo(); | ||||
} | } | ||||
if (StringUtils.isNotEmpty(handlerImages)) { | |||||
handlerImages = handlerImages.substring(0, handlerImages.length() - 1); | |||||
inspectionFileHandleVo.setHandlerImages(handlerImages); | |||||
} | |||||
QuestionType questionType = questionTypeMapper.selectOne(new LambdaQueryWrapper<QuestionType>() | QuestionType questionType = questionTypeMapper.selectOne(new LambdaQueryWrapper<QuestionType>() | ||||
.eq(QuestionType::getId, inspectionFile.getQuestionId()) | .eq(QuestionType::getId, inspectionFile.getQuestionId()) | ||||
.eq(QuestionType::getMark, 1)); | .eq(QuestionType::getMark, 1)); | ||||
} | } | ||||
inspectionFileHandleVo.setQuestionId(inspectionFile.getQuestionId()); | inspectionFileHandleVo.setQuestionId(inspectionFile.getQuestionId()); | ||||
inspectionFileHandleVo.setFileThumbnail(CommonConfig.imageURL + inspectionFile.getFileThumbnail()); | inspectionFileHandleVo.setFileThumbnail(CommonConfig.imageURL + inspectionFile.getFileThumbnail()); | ||||
inspectionFileHandleVo.setHandlerImageList(handlerImageList); | |||||
return inspectionFileHandleVo; | return inspectionFileHandleVo; | ||||
} | } | ||||
} | } |
InspectionFileHandleVo inspectionFileHandleVo; | InspectionFileHandleVo inspectionFileHandleVo; | ||||
User user; | User user; | ||||
QuestionType questionType; | QuestionType questionType; | ||||
List<String> handlerImageList = null; | |||||
String handlerImages = ""; | |||||
InspectionFileHandle inspectionFileHandle; | InspectionFileHandle inspectionFileHandle; | ||||
for (InspectionFile inspectionFile : inspectionFileList) { | for (InspectionFile inspectionFile : inspectionFileList) { | ||||
inspectionFileHandleVo = new InspectionFileHandleVo(); | inspectionFileHandleVo = new InspectionFileHandleVo(); | ||||
if (ObjectUtil.isNotNull(inspectionFileHandleMap)) { | if (ObjectUtil.isNotNull(inspectionFileHandleMap)) { | ||||
inspectionFileHandle = inspectionFileHandleMap.get(inspectionFile.getId()); | inspectionFileHandle = inspectionFileHandleMap.get(inspectionFile.getId()); | ||||
if (null != inspectionFileHandle) { | if (null != inspectionFileHandle) { | ||||
if (!StringUtils.isEmpty(inspectionFileHandle.getHandlerImage())) { | |||||
handlerImageList = new ArrayList<>(); | |||||
String[] arr = inspectionFileHandle.getHandlerImage().split(","); | |||||
List<String> list = Arrays.stream(arr).map(String::toString).collect(Collectors.toList()); | |||||
for (String str : list) { | |||||
handlerImageList.add(CommonConfig.imageURL + str); | |||||
} | |||||
} | |||||
if (ObjectUtil.isNotNull(inspectionFileHandleUserMap)) { | if (ObjectUtil.isNotNull(inspectionFileHandleUserMap)) { | ||||
user = inspectionFileHandleUserMap.get(inspectionFileHandle.getHandlerUser()); | user = inspectionFileHandleUserMap.get(inspectionFileHandle.getHandlerUser()); | ||||
if (null != user) { | if (null != user) { | ||||
inspectionFileHandleVo.setHandlerUsername(user.getRealname()); | inspectionFileHandleVo.setHandlerUsername(user.getRealname()); | ||||
} | } | ||||
inspectionFileHandleVo.setHandlerUser(inspectionFileHandle.getHandlerUser()); | |||||
inspectionFileHandleVo.setHandlerImageList(handlerImageList); | |||||
inspectionFileHandleVo.setHandlerTime(inspectionFileHandle.getHandlerTime()); | |||||
inspectionFileHandleVo.setHandlerResult(inspectionFileHandle.getHandlerResult()); | |||||
} | } | ||||
if (StringUtils.isNotEmpty(inspectionFileHandle.getHandlerImage())) { | |||||
String[] arr = inspectionFileHandle.getHandlerImage().split(","); | |||||
List<String> list = Arrays.stream(arr).map(String::toString).collect(Collectors.toList()); | |||||
for (String str : list) { | |||||
handlerImages += CommonConfig.imageURL + str + ","; | |||||
} | |||||
} | |||||
if (StringUtils.isNotEmpty(handlerImages)) { | |||||
handlerImages = handlerImages.substring(0, handlerImages.length() - 1); | |||||
inspectionFileHandleVo.setHandlerImages(handlerImages); | |||||
} | |||||
inspectionFileHandleVo.setHandlerUser(inspectionFileHandle.getHandlerUser()); | |||||
inspectionFileHandleVo.setHandlerTime(inspectionFileHandle.getHandlerTime()); | |||||
inspectionFileHandleVo.setHandlerResult(inspectionFileHandle.getHandlerResult()); | |||||
} | } | ||||
} | } | ||||
inspectionFileHandleVoList.add(inspectionFileHandleVo); | inspectionFileHandleVoList.add(inspectionFileHandleVo); |
private String handlerUsername; | private String handlerUsername; | ||||
/** | /** | ||||
* 处理后图片列表 | |||||
* 处理后图片列表,多个用","隔开 | |||||
*/ | */ | ||||
private List<String> handlerImageList; | |||||
private String handlerImages; | |||||
/** | /** | ||||
* 处理结果 | * 处理结果 |