|
|
@ -5,6 +5,7 @@ import com.ruoyi.api.mapper.DapingMapper; |
|
|
|
import com.ruoyi.api.service.DapingService; |
|
|
|
import com.ruoyi.api.service.DapingService; |
|
|
|
import com.ruoyi.code.camera.domain.WaterPhotoInfo; |
|
|
|
import com.ruoyi.code.camera.domain.WaterPhotoInfo; |
|
|
|
import com.ruoyi.common.core.page.R; |
|
|
|
import com.ruoyi.common.core.page.R; |
|
|
|
|
|
|
|
import com.ruoyi.common.utils.StringUtils; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
@ -23,8 +24,10 @@ public class DapingServiceImpl extends ServiceImpl<DapingMapper, WaterPhotoInfo> |
|
|
|
public List<WaterPhotoInfo> getStationInfo() { |
|
|
|
public List<WaterPhotoInfo> getStationInfo() { |
|
|
|
return baseMapper.selectStationInfo().stream().filter(waterPhotoInfo -> { |
|
|
|
return baseMapper.selectStationInfo().stream().filter(waterPhotoInfo -> { |
|
|
|
String imgName = waterPhotoInfo.getImgName(); |
|
|
|
String imgName = waterPhotoInfo.getImgName(); |
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(imgName)) { |
|
|
|
String img = imgName.replace("\\", "/"); |
|
|
|
String img = imgName.replace("\\", "/"); |
|
|
|
waterPhotoInfo.setImgName(img); |
|
|
|
waterPhotoInfo.setImgName(img); |
|
|
|
|
|
|
|
} |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
} |
|
|
@ -57,10 +60,18 @@ public class DapingServiceImpl extends ServiceImpl<DapingMapper, WaterPhotoInfo> |
|
|
|
} |
|
|
|
} |
|
|
|
valueList = new ArrayList<>(); |
|
|
|
valueList = new ArrayList<>(); |
|
|
|
valMap = new HashMap<>(); |
|
|
|
valMap = new HashMap<>(); |
|
|
|
for (WaterPhotoInfo waterPhotoInfo : waterPhotoInfos) { |
|
|
|
for (int i = 0; i < waterPhotoInfos.size(); i++) { |
|
|
|
valueList.add(waterPhotoInfo.getValue()); |
|
|
|
if(waterPhotoInfos.get(i).getId() != null){ |
|
|
|
if(!tmList.contains(waterPhotoInfo.getTm())){ |
|
|
|
valueList.add(waterPhotoInfos.get(i).getValue()); |
|
|
|
tmList.add(waterPhotoInfo.getTm()); |
|
|
|
}else{ |
|
|
|
|
|
|
|
if(i > 0){ |
|
|
|
|
|
|
|
valueList.add(valueList.get(i-1)); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
valueList.add(waterPhotoInfos.get(i).getValue()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(!tmList.contains(waterPhotoInfos.get(i).getTm())){ |
|
|
|
|
|
|
|
tmList.add(waterPhotoInfos.get(i).getTm()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|