施工进度详情
This commit is contained in:
@@ -6,7 +6,7 @@ import com.ruoyi.common.annotation.ExcelDictFormat;
|
|||||||
import com.ruoyi.common.convert.ExcelDictConvert;
|
import com.ruoyi.common.convert.ExcelDictConvert;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -66,6 +66,13 @@ public class OaReportDetailVo {
|
|||||||
@ExcelDictFormat(readConverterExp = "逗=号分隔")
|
@ExcelDictFormat(readConverterExp = "逗=号分隔")
|
||||||
private String ossIds;
|
private String ossIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联图像 OSS URL 列表
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "关联图像 OSS URL 列表", converter = ExcelDictConvert.class)
|
||||||
|
private String images;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import com.ruoyi.oa.domain.OaReportDetail;
|
|||||||
import com.ruoyi.oa.mapper.OaReportDetailMapper;
|
import com.ruoyi.oa.mapper.OaReportDetailMapper;
|
||||||
import com.ruoyi.oa.service.IOaReportDetailService;
|
import com.ruoyi.oa.service.IOaReportDetailService;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@@ -36,6 +37,7 @@ public class OaReportDetailServiceImpl implements IOaReportDetailService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public OaReportDetailVo queryById(Long id){
|
public OaReportDetailVo queryById(Long id){
|
||||||
|
|
||||||
return baseMapper.selectVoById(id);
|
return baseMapper.selectVoById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,6 +48,25 @@ public class OaReportDetailServiceImpl implements IOaReportDetailService {
|
|||||||
public TableDataInfo<OaReportDetailVo> queryPageList(OaReportDetailBo bo, PageQuery pageQuery) {
|
public TableDataInfo<OaReportDetailVo> queryPageList(OaReportDetailBo bo, PageQuery pageQuery) {
|
||||||
LambdaQueryWrapper<OaReportDetail> lqw = buildQueryWrapper(bo);
|
LambdaQueryWrapper<OaReportDetail> lqw = buildQueryWrapper(bo);
|
||||||
Page<OaReportDetailVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
Page<OaReportDetailVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
|
||||||
|
for(OaReportDetailVo item : result.getRecords()) {
|
||||||
|
String ossIds = item.getOssIds();
|
||||||
|
// 分离拿出ossIds
|
||||||
|
String[] ossIdArray = new String[0];
|
||||||
|
if (StringUtils.isNotBlank(ossIds)) {
|
||||||
|
ossIdArray = ossIds.split(",");
|
||||||
|
}
|
||||||
|
// 准备images数组
|
||||||
|
List<String> images = new ArrayList<>();
|
||||||
|
// 遍历ossIdArray,添加到images中
|
||||||
|
for (String ossId : ossIdArray) {
|
||||||
|
// 查出图片地址
|
||||||
|
String url = baseMapper.selectImageUrlByOssId(ossId);
|
||||||
|
images.add(url);
|
||||||
|
}
|
||||||
|
// 设置images属性,将images打成,分割的字符串
|
||||||
|
item.setImages(String.join(",", images));
|
||||||
|
}
|
||||||
return TableDataInfo.build(result);
|
return TableDataInfo.build(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,6 +76,25 @@ public class OaReportDetailServiceImpl implements IOaReportDetailService {
|
|||||||
@Override
|
@Override
|
||||||
public List<OaReportDetailVo> queryList(OaReportDetailBo bo) {
|
public List<OaReportDetailVo> queryList(OaReportDetailBo bo) {
|
||||||
LambdaQueryWrapper<OaReportDetail> lqw = buildQueryWrapper(bo);
|
LambdaQueryWrapper<OaReportDetail> lqw = buildQueryWrapper(bo);
|
||||||
|
List<OaReportDetailVo> result = baseMapper.selectVoList(lqw);
|
||||||
|
for(OaReportDetailVo item : result) {
|
||||||
|
String ossIds = item.getOssIds();
|
||||||
|
// 分离拿出ossIds
|
||||||
|
String[] ossIdArray = new String[0];
|
||||||
|
if (StringUtils.isNotBlank(ossIds)) {
|
||||||
|
ossIdArray = ossIds.split(",");
|
||||||
|
}
|
||||||
|
// 准备images数组
|
||||||
|
List<String> images = new ArrayList<>();
|
||||||
|
// 遍历ossIdArray,添加到images中
|
||||||
|
for (String ossId : ossIdArray) {
|
||||||
|
// 查出图片地址
|
||||||
|
String url = baseMapper.selectImageUrlByOssId(ossId);
|
||||||
|
images.add(url);
|
||||||
|
}
|
||||||
|
// 设置images属性,将images打成,分割的字符串
|
||||||
|
item.setImages(String.join(",", images));
|
||||||
|
}
|
||||||
return baseMapper.selectVoList(lqw);
|
return baseMapper.selectVoList(lqw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user