|
@@ -15,6 +15,9 @@ import com.jeesite.modules.report.dto.ResearchReportMarketDrivenDto;
|
|
|
import com.jeesite.modules.report.dto.ResearchReportMarketScaleDto;
|
|
|
import com.jeesite.modules.report.entity.ResearchReport;
|
|
|
import com.jeesite.modules.report.service.ResearchReportService;
|
|
|
+import com.jeesite.modules.sys.entity.DictData;
|
|
|
+import com.jeesite.modules.sys.service.DictDataService;
|
|
|
+import com.jeesite.modules.sys.service.DictTypeService;
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
import org.dom4j.DocumentException;
|
|
|
import org.jsoup.Jsoup;
|
|
@@ -58,6 +61,7 @@ public class ResearchReportController extends BaseController {
|
|
|
private ResearchReportService researchReportService;
|
|
|
@Resource
|
|
|
private ResearchReportAsyncService researchReportAsyncService;
|
|
|
+
|
|
|
@Value("${file.baseDir}")
|
|
|
private String basePath;
|
|
|
private static final String TEMP_PATH = "/temp";
|
|
@@ -346,6 +350,7 @@ public class ResearchReportController extends BaseController {
|
|
|
listExcel = list.stream().map(vo -> {
|
|
|
vo.setReportScopeHtml(convertMarket(vo.getMarketScale(), vo.getMarketDriven(), vo.getLang()) + lineStr + lineStr + Html2PlainTxtUtils.convert(vo.getReportScopeHtml()));
|
|
|
vo.setDirectoryHtml(Html2PlainTxtUtils.convert(vo.getDirectoryHtml()));
|
|
|
+ vo.setMarketType(convertMarketType(vo.getMarketType(), vo.getLang()));
|
|
|
return vo;
|
|
|
}).collect(Collectors.toList());
|
|
|
}
|
|
@@ -456,4 +461,18 @@ public class ResearchReportController extends BaseController {
|
|
|
sb.append("\\n\\n");
|
|
|
return Html2PlainTxtUtils.convert(sb.toString());
|
|
|
}
|
|
|
+
|
|
|
+ private String convertMarketType(String marketTypeValue, String lang) {
|
|
|
+ if (StringUtils.isEmpty(marketTypeValue) && StringUtils.isEmpty(marketTypeValue)) {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ String dictType = "reports_category";
|
|
|
+ if (Constants.lang.ZH_CH.equals(lang)) {
|
|
|
+ dictType = "reports_category";
|
|
|
+ } else {
|
|
|
+ dictType = "reports_category_en";
|
|
|
+ }
|
|
|
+ DictData dictData = researchReportService.getDictDataByType(dictType,marketTypeValue);
|
|
|
+ return null!=dictData ?dictData.getDictLabel():"";
|
|
|
+ }
|
|
|
}
|