|
|
@@ -256,9 +256,9 @@ public class DecisionTaskServiceImpl implements DecisionTaskService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public String getWordReport(List<DecisionDetailsVo> analyseResultList,String reportPath) {
|
|
|
+ public String getWordReport(DecisionTask decisionTask , List<DecisionDetailsVo> analyseResultList,String reportPath) {
|
|
|
try {
|
|
|
- createWordReport(analyseResultList,reportPath);
|
|
|
+ createWordReport(decisionTask ,analyseResultList,reportPath);
|
|
|
} catch (Exception e) {
|
|
|
throw new RuntimeException(e);
|
|
|
}
|
|
|
@@ -273,7 +273,7 @@ public class DecisionTaskServiceImpl implements DecisionTaskService {
|
|
|
* @param reportPath
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
- private void createWordReport(List<DecisionDetailsVo> analyseResultList, String reportPath) throws Exception {
|
|
|
+ private void createWordReport(DecisionTask decisionTask,List<DecisionDetailsVo> analyseResultList, String reportPath) throws Exception {
|
|
|
if (CollectionUtils.isEmpty(analyseResultList)) {
|
|
|
throw new ServiceException("分析结果为空,无法生成报告");
|
|
|
}
|
|
|
@@ -290,22 +290,8 @@ public class DecisionTaskServiceImpl implements DecisionTaskService {
|
|
|
DecisionDetailsVo firstVo = analyseResultList.get(0);
|
|
|
// 从dataList中获取第一个数据的node_id,用于获取分析范围的geom
|
|
|
String geom = null;
|
|
|
- Double shapeArea = null;
|
|
|
- String analyseName = null;
|
|
|
-
|
|
|
- if (CollectionUtils.isNotEmpty(firstVo.getDataList())) {
|
|
|
- Map<String, Object> firstData = firstVo.getDataList().get(0);
|
|
|
- String nodeId = (String) firstData.get("node_id");
|
|
|
- if (StringUtils.isNotBlank(nodeId)) {
|
|
|
- // 根据nodeId查询任务信息获取geom和shapeArea
|
|
|
- DecisionTask task = decisionTaskMapper.get(nodeId);
|
|
|
- if (task != null) {
|
|
|
- geom = task.getGeom();
|
|
|
- shapeArea = task.getShapeArea() != null ? task.getShapeArea().doubleValue() : null;
|
|
|
- analyseName = task.getName();
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ BigDecimal shapeArea = decisionTask.getShapeArea();
|
|
|
+ String analyseName = decisionTask.getName();
|
|
|
|
|
|
// 3. 生成分析信息段落
|
|
|
addParagraph(document, "\t分析名称:" + (StringUtils.isNotBlank(analyseName) ? analyseName : ""));
|