fix (farm): 设备中心, 农事记录

- 获取image,imageList
- 农事记录新增bug
This commit is contained in:
达富斌
2025-09-21 22:41:03 +08:00
parent 844383c84c
commit 570e342038
2 changed files with 13 additions and 3 deletions

View File

@@ -5,6 +5,8 @@ import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @description: 设备详情 请求实体
* @author: binda
@@ -40,12 +42,17 @@ public class DeviceInfoDetailV2RespVO {
@Schema(description = "设备坐标")
private String point;
private String image;
private List<String> imageList;
@Schema(description = "基地iD")
private String baseId;
private String baseName;
@Schema(description = "基地坐标")
private String basePoint;
@Schema(description = "地块ID")
private String plotId;
private String plotName;
@Schema(description = "地块坐标")
private String plotPoint;

View File

@@ -103,9 +103,12 @@ private void validateDeviceInfoExists(String id) {
DeviceInfoDO deviceInfo = deviceInfoMapper.selectById(id);
if (deviceInfo != null) {
// 触发图片集合转换,确保返回的DO对象包含转换后的图片集合
deviceInfo.getImageList();
deviceInfo.getAlarmImageList();
deviceInfo.getOfflineImageList();
// deviceInfo.getImageList();
// deviceInfo.getAlarmImageList();
// deviceInfo.getOfflineImageList();
DeviceClassifyDO dc = deviceClassifyMapper.selectOne(DeviceClassifyDO::getId, deviceInfo.getDeviceType());
deviceInfo.setImage(dc.getImage());
deviceInfo.setImageList(dc.getImageList());
}
return deviceInfo;
}