|
@@ -2,6 +2,7 @@ package org.springblade.manager.service.impl;
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
+import cn.hutool.system.SystemUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -4480,8 +4481,8 @@ public class WbsTreeContractServiceImpl extends BaseServiceImpl<WbsTreeContractM
|
|
|
|
|
|
@Override
|
|
|
public ResponseEntity<Resource> exportTree(Long contractId, HttpServletResponse response) throws IOException, InvalidFormatException {
|
|
|
- //String templatePath = "/mnt/sdc/Users/hongchuangyanfa/Desktop/excel/gcdcTemplate.xlsx";
|
|
|
- String templatePath = "C:\\upload\\excel\\gcdc.xlsx";
|
|
|
+ String templatePath = "/mnt/sdc/Users/hongchuangyanfa/Desktop/excel/gcdcTemplate.xlsx";
|
|
|
+ //String templatePath = "C:\\upload\\excel\\gcdc.xlsx";
|
|
|
// 查询数据
|
|
|
String sql = "select *,CONCAT(ancestors_p_id, ',', p_key_id) AS ancestors_p_id from m_wbs_tree_contract where contract_id = " + contractId +
|
|
|
" and is_deleted = 0 and type = 1 and node_type != 6 and p_id != 0";
|
|
@@ -4552,8 +4553,8 @@ public class WbsTreeContractServiceImpl extends BaseServiceImpl<WbsTreeContractM
|
|
|
}
|
|
|
|
|
|
//保存文件到本地(本地测试放开,正式环境不需要)
|
|
|
- String outputPath = "C:\\upload\\excel\\111.xlsx";
|
|
|
- saveWorkbookToFile(workbook, outputPath);
|
|
|
+ //String outputPath = "C:\\upload\\excel\\111.xlsx";
|
|
|
+ //saveWorkbookToFile(workbook, outputPath);
|
|
|
|
|
|
// 同时返回给浏览器下载
|
|
|
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
|