Commit 67c30386 authored by lisong's avatar lisong

更新

parent 43738f28
package com.yeejoin.amos.boot.module.ugp.api.dto;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.module.ugp.api.entity.Equipment;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -7,6 +8,7 @@ import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import java.util.List;
/**
* 设备信息表
......@@ -61,4 +63,10 @@ public class EquipmentDto extends BaseDto {
private String companyName;
/**
* 附件
*/
private List<JSONObject> files;
}
......@@ -300,6 +300,10 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
} else {
result = equipmentMapper.allBoundWelder(page, projectId, companySequenceNbr, name);
}
result.getRecords().forEach(item -> {
List<JSONObject> files = attachmentServiceImpl.getFilesBySourceId(item.getSequenceNbr());
item.setFiles(files);
});
return result;
}
}
\ No newline at end of file
......@@ -240,6 +240,11 @@ public class WelderServiceImpl {
map.put("sequenceNbr", item.getSequenceNbr());
List<Map<String, Object>> message = alertFormValueServiceImpl.getMessageMapByInstanceId(String.valueOf(item.getSequenceNbr()));
message.forEach(dataItem -> {
if (String.valueOf(dataItem.get("column")).equals("image") && !ObjectUtils.isEmpty(dataItem.get("column")) && !ObjectUtils.isEmpty(dataItem.get("value"))) {
String value1 = String.valueOf(dataItem.get("value"));
List<Map<String, Object>> imageMap = (List<Map<String, Object>>) JSON.parse(value1);
map.put("files", imageMap);
}
map.put(String.valueOf(dataItem.get("column")), dataItem.get("value"));
});
maps.add(map);
......
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