消除[报表列表]接口中的魔法值
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package com.adc.da.report.service.impl;
|
package com.adc.da.report.service.impl;
|
||||||
|
|
||||||
import com.adc.da.login.util.CommonUtils;
|
import com.adc.da.login.util.CommonUtils;
|
||||||
|
import com.adc.da.report.constant.ReportConstants;
|
||||||
import com.adc.da.report.dao.mysql.FileDao;
|
import com.adc.da.report.dao.mysql.FileDao;
|
||||||
import com.adc.da.report.dao.mysql.ReportDao;
|
import com.adc.da.report.dao.mysql.ReportDao;
|
||||||
import com.adc.da.report.dao.mysql.ReportLabelDao;
|
import com.adc.da.report.dao.mysql.ReportLabelDao;
|
||||||
@@ -228,15 +229,17 @@ public class IReportServiceImpl extends ServiceImpl<ReportDao, ReportEntity>
|
|||||||
c.setFileType(null);
|
c.setFileType(null);
|
||||||
}
|
}
|
||||||
//ppt文件
|
//ppt文件
|
||||||
else if ("ppt".equals(fileEntity.getFileType().toLowerCase()) || "pptx".equals(fileEntity.getFileType())) {
|
else if (ReportConstants.FILE_EXTENSIONS_PPT.equalsIgnoreCase(fileEntity.getFileType()) ||
|
||||||
|
ReportConstants.FILE_EXTENSIONS_PPTX.equalsIgnoreCase(fileEntity.getFileType())) {
|
||||||
c.setFileType("1");
|
c.setFileType("1");
|
||||||
}
|
}
|
||||||
//excel文件
|
//excel文件
|
||||||
else if ("xls".equals(fileEntity.getFileType().toLowerCase()) || "xlsx".equals(fileEntity.getFileType())) {
|
else if (ReportConstants.FILE_EXTENSIONS_XLS.equalsIgnoreCase(fileEntity.getFileType()) ||
|
||||||
|
ReportConstants.FILE_EXTENSIONS_XLSX.equalsIgnoreCase(fileEntity.getFileType())) {
|
||||||
c.setFileType("2");
|
c.setFileType("2");
|
||||||
}
|
}
|
||||||
//pdf文件
|
//pdf文件
|
||||||
else if ("pdf".equals(fileEntity.getFileType().toLowerCase())) {
|
else if (ReportConstants.FILE_EXTENSIONS_PDF.equalsIgnoreCase(fileEntity.getFileType())) {
|
||||||
c.setFileType("3");
|
c.setFileType("3");
|
||||||
}
|
}
|
||||||
//word文件
|
//word文件
|
||||||
@@ -258,6 +261,12 @@ public class IReportServiceImpl extends ServiceImpl<ReportDao, ReportEntity>
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 找出报告的所有标签中最长的那条路径
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
private List<String> findLabelList(String id) {
|
private List<String> findLabelList(String id) {
|
||||||
LambdaQueryWrapper<ReportLabelEntity> wrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ReportLabelEntity> wrapper = new LambdaQueryWrapper<>();
|
||||||
wrapper.eq(ReportLabelEntity::getReportId, id);
|
wrapper.eq(ReportLabelEntity::getReportId, id);
|
||||||
|
|||||||
Reference in New Issue
Block a user