Quellcode durchsuchen

修改根据工单ID获取问题列表返回结果中问题图片的类型,list改为string

tags/v1.0.0^2
wanjing vor 1 Jahr
Ursprung
Commit
58cae81a9c
3 geänderte Dateien mit 24 neuen und 21 gelöschten Zeilen
  1. +7
    -4
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/handle/QueryInspectionFileHandleByInspectionFileIdService.java
  2. +15
    -15
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/query/QueryInspectionFilePageListByWorkOrderIdService.java
  3. +2
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionFileHandleVo.java

+ 7
- 4
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/handle/QueryInspectionFileHandleByInspectionFileIdService.java Datei anzeigen

@@ -91,21 +91,25 @@ public class QueryInspectionFileHandleByInspectionFileIdService {
*/
private InspectionFileHandleVo buildInspectionFileHandleVo(InspectionFile inspectionFile, InspectionFileHandle inspectionFileHandle) {
InspectionFileHandleVo inspectionFileHandleVo;
List<String> handlerImageList = null;
String handlerImages = "";
if (null != inspectionFileHandle) {
inspectionFileHandleVo = InspectionFileHandleConverMapper.INSTANCE.fromInspectionFileHandleToInspectionFileHandleVo(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);
handlerImages += CommonConfig.imageURL + str + ",";
}
}
} else {
inspectionFileHandleVo = new InspectionFileHandleVo();
}
if (StringUtils.isNotEmpty(handlerImages)) {
handlerImages = handlerImages.substring(0, handlerImages.length() - 1);
inspectionFileHandleVo.setHandlerImages(handlerImages);
}

QuestionType questionType = questionTypeMapper.selectOne(new LambdaQueryWrapper<QuestionType>()
.eq(QuestionType::getId, inspectionFile.getQuestionId())
.eq(QuestionType::getMark, 1));
@@ -115,7 +119,6 @@ public class QueryInspectionFileHandleByInspectionFileIdService {
}
inspectionFileHandleVo.setQuestionId(inspectionFile.getQuestionId());
inspectionFileHandleVo.setFileThumbnail(CommonConfig.imageURL + inspectionFile.getFileThumbnail());
inspectionFileHandleVo.setHandlerImageList(handlerImageList);
return inspectionFileHandleVo;
}
}

+ 15
- 15
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspectionfile/query/QueryInspectionFilePageListByWorkOrderIdService.java Datei anzeigen

@@ -142,7 +142,7 @@ public class QueryInspectionFilePageListByWorkOrderIdService {
InspectionFileHandleVo inspectionFileHandleVo;
User user;
QuestionType questionType;
List<String> handlerImageList = null;
String handlerImages = "";
InspectionFileHandle inspectionFileHandle;
for (InspectionFile inspectionFile : inspectionFileList) {
inspectionFileHandleVo = new InspectionFileHandleVo();
@@ -164,26 +164,26 @@ public class QueryInspectionFilePageListByWorkOrderIdService {
if (ObjectUtil.isNotNull(inspectionFileHandleMap)) {
inspectionFileHandle = inspectionFileHandleMap.get(inspectionFile.getId());
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)) {
user = inspectionFileHandleUserMap.get(inspectionFileHandle.getHandlerUser());
if (null != user) {
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);

+ 2
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/inspection/InspectionFileHandleVo.java Datei anzeigen

@@ -52,9 +52,9 @@ public class InspectionFileHandleVo {
private String handlerUsername;

/**
* 处理后图片列表
* 处理后图片列表,多个用","隔开
*/
private List<String> handlerImageList;
private String handlerImages;

/**
* 处理结果

Laden…
Abbrechen
Speichern