- 新增
-
-
+ 新增
+
+
-
+
-
+
-
+
编辑
-
+
-
+
删除
-
+
-
+
-
+
-
@@ -69,7 +70,7 @@ export default {
props: {
formData: Array
},
- data () {
+ data() {
return {
predefineColors: [
"#ff4500",
@@ -86,21 +87,21 @@ export default {
indexEditor: -1 // 编辑第几个数据
};
},
- mounted () { },
+ mounted() {},
methods: {
// 弹出框关闭
- handleClose () {
+ handleClose() {
this.dialogVisible = false;
this.colorValue = "";
},
// 新增
- handleAddClick () {
+ handleAddClick() {
this.colorValue = "";
this.flag = true;
this.dialogVisible = true;
},
// 确定
- handleSaveClick () {
+ handleSaveClick() {
if (this.flag) {
// 新增
const obj = {
@@ -114,17 +115,20 @@ export default {
this.dialogVisible = false;
}
this.$emit("input", this.formData);
+ this.$emit("change", this.formData);
},
// 编辑
- handleEditorClick (index, row) {
+ handleEditorClick(index, row) {
this.flag = false;
this.colorValue = row.color;
this.dialogVisible = true;
this.indexEditor = index;
},
// 删除
- handleDeleteClick (index) {
+ handleDeleteClick(index) {
this.formData.splice(index, 1);
+ this.$emit("input", this.formData);
+ this.$emit("change", this.formData);
}
}
};
diff --git a/report-ui/src/views/report/bigscreen/designer/form/dynamicForm.vue b/report-ui/src/views/report/bigscreen/designer/form/dynamicForm.vue
index 6a0c6251..ddc80007 100644
--- a/report-ui/src/views/report/bigscreen/designer/form/dynamicForm.vue
+++ b/report-ui/src/views/report/bigscreen/designer/form/dynamicForm.vue
@@ -1,4 +1,3 @@
-/* eslint-disable vue/valid-v-for */
-
- org.springframework.boot
- spring-boot-starter-freemarker
-
-
-
-
-
-
-
-
-
-
-
-
-
com.baomidou
mybatis-plus-boot-starter
@@ -98,31 +81,16 @@
-
- com.alibaba
- druid
- 1.1.22
+ org.apache.httpcomponents
+ httpclient
+ 4.5.2
-
- owinfo
- impalajdbc41
- 1.0.0
- system
- ${project.basedir}/src/main/resources/lib/ImpalaJDBC41.jar
-
-
- org.apache.hive
- hive-jdbc
- 1.2.1
-
-
- org.eclipse.jetty.aggregate
- jetty-all
-
-
+ org.apache.httpcomponents
+ httpcore
+ 4.4.5
diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/report/service/impl/ReportServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/report/service/impl/ReportServiceImpl.java
index 838315c7..2efbc378 100644
--- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/report/service/impl/ReportServiceImpl.java
+++ b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/report/service/impl/ReportServiceImpl.java
@@ -5,11 +5,6 @@ import com.anjiplus.template.gaea.business.modules.report.controller.dto.ReportD
import com.anjiplus.template.gaea.business.modules.report.dao.ReportMapper;
import com.anjiplus.template.gaea.business.modules.report.dao.entity.Report;
import com.anjiplus.template.gaea.business.modules.report.service.ReportService;
-import com.anjiplus.template.gaea.business.modules.reportexcel.dao.ReportExcelMapper;
-import com.anjiplus.template.gaea.business.modules.reportexcel.dao.entity.ReportExcel;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -22,13 +17,9 @@ import org.springframework.stereotype.Service;
@Service
public class ReportServiceImpl implements ReportService {
- private Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
private ReportMapper reportMapper;
- @Autowired
- private ReportExcelMapper reportExcelMapper;
-
@Override
public GaeaBaseMapper getMapper() {
return reportMapper;
@@ -38,8 +29,5 @@ public class ReportServiceImpl implements ReportService {
@Override
public void delReport(ReportDto reportDto) {
deleteById(reportDto.getId());
- QueryWrapper queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("report_code" , reportDto.getReportCode());
- reportExcelMapper.delete(queryWrapper);
}
}
diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/ReportExcelController.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/ReportExcelController.java
deleted file mode 100644
index 5ab7457d..00000000
--- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/ReportExcelController.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package com.anjiplus.template.gaea.business.modules.reportexcel.controller;
-
-import com.anji.plus.gaea.annotation.Permission;
-import com.anji.plus.gaea.annotation.log.GaeaAuditLog;
-import com.anji.plus.gaea.bean.ResponseBean;
-import com.anji.plus.gaea.code.ResponseCode;
-import com.anji.plus.gaea.curd.controller.GaeaBaseController;
-import com.anji.plus.gaea.curd.service.GaeaBaseService;
-import com.anjiplus.template.gaea.business.modules.reportexcel.controller.dto.ReportExcelDto;
-import com.anjiplus.template.gaea.business.modules.reportexcel.controller.param.ReportExcelParam;
-import com.anjiplus.template.gaea.business.modules.reportexcel.dao.entity.ReportExcel;
-import com.anjiplus.template.gaea.business.modules.reportexcel.service.ReportExcelService;
-import io.swagger.annotations.Api;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-/**
- * @author chenkening
- * @date 2021/4/13 15:12
- */
-@RestController
-@Api(tags = "报表表格管理")
-@RequestMapping("/reportExcel")
-public class ReportExcelController extends GaeaBaseController {
-
- @Autowired
- private ReportExcelService reportExcelService;
-
- @Override
- public GaeaBaseService getService() {
- return reportExcelService;
- }
-
- @Override
- public ReportExcel getEntity() {
- return new ReportExcel();
- }
-
- @Override
- public ReportExcelDto getDTO() {
- return new ReportExcelDto();
- }
-
- @GetMapping("/detailByReportCode/{reportCode}")
- @Permission(
- code = "DETAIL",
- name = "详情"
- )
- @GaeaAuditLog(
- pageTitle = "详情"
- )
- public ResponseBean detailByReportCode(@PathVariable String reportCode) {
- ReportExcelDto reportExcelDto = reportExcelService.detailByReportCode(reportCode);
- return ResponseBean.builder().data(reportExcelDto).build();
- }
-
- @PostMapping("/preview")
- @Permission(
- code = "DETAIL",
- name = "预览"
- )
- @GaeaAuditLog(
- pageTitle = "预览"
- )
- public ResponseBean preview(@RequestBody ReportExcelDto reportExcelDto) {
- ReportExcelDto result = reportExcelService.preview(reportExcelDto);
- return ResponseBean.builder().data(result).build();
- }
-
-
- @PostMapping("/exportExcel")
- @Permission(
- code = "IMPORT",
- name = "导出"
- )
- @GaeaAuditLog(
- pageTitle = "报表导出"
- )
- public ResponseBean exportExcel(@RequestBody ReportExcelDto reportExcelDto) {
-
- return ResponseBean.builder().code(ResponseCode.SUCCESS_CODE)
- .data(reportExcelService.exportExcel(reportExcelDto))
- .message("导出成功,请稍后在下载中心查看").build();
- }
-
-// @PostMapping("/exportPdf")
-// public ResponseBean exportPdf(@RequestBody ReportExcelDto reportExcelDto) {
-// reportExcelService.exportPdf(reportExcelDto);
-// return ResponseBean.builder().code(ResponseCode.SUCCESS_CODE)
-// .build();
-// }
-}
diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/dto/ReportExcelDto.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/dto/ReportExcelDto.java
deleted file mode 100644
index 22c273e7..00000000
--- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/dto/ReportExcelDto.java
+++ /dev/null
@@ -1,43 +0,0 @@
-
-package com.anjiplus.template.gaea.business.modules.reportexcel.controller.dto;
-
-import com.anji.plus.gaea.curd.dto.GaeaBaseDTO;
-import lombok.Data;
-
-import java.io.Serializable;
-
-
-/**
- * @author chenkening
- * @date 2021/4/13 15:12
- */
-@Data
-public class ReportExcelDto extends GaeaBaseDTO implements Serializable {
- /** 报表名称 */
- private String reportName;
-
- /** 报表编码 */
- private String reportCode;
-
- /**数据集编码,以|分割*/
- private String setCodes;
-
- /** 分组 */
- private String reportGroup;
-
- /** 数据集查询参数 */
- private String setParam;
-
- /** 报表json字符串 */
- private String jsonStr;
-
- /** 报表类型 */
- private String reportType;
-
- /** 数据总计 */
- private long total;
-
- /**导出类型*/
- private String exportType;
-
-}
diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/param/ReportExcelParam.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/param/ReportExcelParam.java
deleted file mode 100644
index e4d85806..00000000
--- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/controller/param/ReportExcelParam.java
+++ /dev/null
@@ -1,18 +0,0 @@
-
-package com.anjiplus.template.gaea.business.modules.reportexcel.controller.param;
-
-import com.anji.plus.gaea.curd.params.PageParam;
-import lombok.Data;
-
-import java.io.Serializable;
-
-
-/**
- * @author chenkening
- * @date 2021/4/13 15:12
- */
-@Data
-public class ReportExcelParam extends PageParam implements Serializable{
-
-
-}
diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/dao/ReportExcelMapper.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/dao/ReportExcelMapper.java
deleted file mode 100644
index 422b83f8..00000000
--- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/dao/ReportExcelMapper.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package com.anjiplus.template.gaea.business.modules.reportexcel.dao;
-
-import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper;
-import com.anjiplus.template.gaea.business.modules.reportexcel.dao.entity.ReportExcel;
-
-/**
- * @author chenkening
- * @date 2021/4/13 15:11
- */
-public interface ReportExcelMapper extends GaeaBaseMapper {
-}
diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/dao/entity/ReportExcel.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/dao/entity/ReportExcel.java
deleted file mode 100644
index ea55d556..00000000
--- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/dao/entity/ReportExcel.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package com.anjiplus.template.gaea.business.modules.reportexcel.dao.entity;
-
-import com.anji.plus.gaea.curd.entity.GaeaBaseEntity;
-import com.baomidou.mybatisplus.annotation.TableName;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-/**
- * @author chenkening
- * @date 2021/4/13 15:11
- */
-@TableName(value="gaea_report_excel")
-@Data
-public class ReportExcel extends GaeaBaseEntity {
-
- @ApiModelProperty(value = "报表编码")
- private String reportCode;
-
- @ApiModelProperty(value = "数据集编码,以|分割")
- private String setCodes;
-
- @ApiModelProperty(value = "数据集查询参数")
- private String setParam;
-
- @ApiModelProperty(value = "报表json字符串")
- private String jsonStr;
-
- @ApiModelProperty(value = "0--已禁用 1--已启用 DIC_NAME=ENABLE_FLAG")
- private Integer enableFlag;
-
- @ApiModelProperty(value = "0--未删除 1--已删除 DIC_NAME=DELETE_FLAG")
- private Integer deleteFlag;
-}
diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/ReportExcelService.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/ReportExcelService.java
deleted file mode 100644
index 883899b6..00000000
--- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/ReportExcelService.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package com.anjiplus.template.gaea.business.modules.reportexcel.service;
-
-import com.anji.plus.gaea.curd.service.GaeaBaseService;
-import com.anjiplus.template.gaea.business.modules.reportexcel.controller.dto.ReportExcelDto;
-import com.anjiplus.template.gaea.business.modules.reportexcel.controller.param.ReportExcelParam;
-import com.anjiplus.template.gaea.business.modules.reportexcel.dao.entity.ReportExcel;
-
-/**
- * TODO
- *
- * @author chenkening
- * @date 2021/4/13 15:14
- */
-public interface ReportExcelService extends GaeaBaseService {
-
- /**
- * 根据报表编码查询详情
- * @param reportCode
- * @return
- */
- ReportExcelDto detailByReportCode(String reportCode);
-
- /**
- * 报表预览
- * @param reportExcelDto
- * @return
- */
- ReportExcelDto preview(ReportExcelDto reportExcelDto);
-
-
- /**
- * 导出为excel
- * @param reportExcelDto
- * @return
- */
- Boolean exportExcel(ReportExcelDto reportExcelDto);
-
-// Boolean exportPdf(ReportExcelDto reportExcelDto);
-}
diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/impl/ReportExcelServiceImpl.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/impl/ReportExcelServiceImpl.java
deleted file mode 100644
index 3295e64c..00000000
--- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/service/impl/ReportExcelServiceImpl.java
+++ /dev/null
@@ -1,146 +0,0 @@
-package com.anjiplus.template.gaea.business.modules.reportexcel.service.impl;
-
-import com.alibaba.fastjson.JSONObject;
-import com.anji.plus.gaea.constant.BaseOperationEnum;
-import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper;
-import com.anji.plus.gaea.exception.BusinessException;
-import com.anji.plus.gaea.export.enums.ExportTypeEnum;
-import com.anji.plus.gaea.export.utils.ExportUtil;
-import com.anji.plus.gaea.export.vo.ExportOperation;
-import com.anji.plus.gaea.holder.UserContentHolder;
-import com.anji.plus.gaea.utils.GaeaAssert;
-import com.anji.plus.gaea.utils.GaeaBeanUtils;
-import com.anjiplus.template.gaea.business.code.ResponseCode;
-import com.anjiplus.template.gaea.business.modules.report.dao.ReportMapper;
-import com.anjiplus.template.gaea.business.modules.report.dao.entity.Report;
-import com.anjiplus.template.gaea.business.modules.reportexcel.controller.dto.ReportExcelDto;
-import com.anjiplus.template.gaea.business.modules.reportexcel.dao.ReportExcelMapper;
-import com.anjiplus.template.gaea.business.modules.reportexcel.dao.entity.ReportExcel;
-import com.anjiplus.template.gaea.business.modules.reportexcel.service.ReportExcelService;
-import com.anjiplus.template.gaea.business.modules.reportexcel.util.ReportUtil;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
-import org.springframework.stereotype.Service;
-
-import java.time.LocalDateTime;
-
-/**
- * TODO
- *
- * @author chenkening
- * @date 2021/4/13 15:14
- */
-@Service
-public class ReportExcelServiceImpl implements ReportExcelService {
-
- private Logger logger = LoggerFactory.getLogger(this.getClass());
- @Autowired
- private ReportExcelMapper reportExcelMapper;
-
- @Autowired
- private ThreadPoolTaskExecutor threadPoolExportExecutor;
-
- @Autowired
- private ReportMapper reportMapper;
-
- @Value("${file.dist-path:''}")
- private String dictPath;
-
- @Autowired
- private ReportUtil reportUtil;
-
- @Override
- public GaeaBaseMapper getMapper() {
- return reportExcelMapper;
- }
-
- @Override
- public ReportExcelDto detailByReportCode(String reportCode) {
- QueryWrapper queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("report_code" , reportCode);
- ReportExcel reportExcel = reportExcelMapper.selectOne(queryWrapper);
- if(reportExcel != null){
- ReportExcelDto dto = new ReportExcelDto();
- BeanUtils.copyProperties(reportExcel , dto);
- return dto;
- }
- return null;
- }
-
- /**
- * 操作前处理
- *
- * @param entity 前端传递的对象
- * @param operationEnum 操作类型
- * @throws BusinessException 阻止程序继续执行或回滚事务
- */
- @Override
- public void processBeforeOperation(ReportExcel entity, BaseOperationEnum operationEnum) throws BusinessException {
- if (operationEnum.equals(BaseOperationEnum.INSERT)) {
- String reportCode = entity.getReportCode();
- ReportExcel report = this.selectOne("report_code", reportCode);
- if (null != report) {
- this.deleteById(report.getId());
- }
- }
- }
-
- /**
- * 报表预览
- */
- @Override
- public ReportExcelDto preview(ReportExcelDto reportExcelDto) {
- // 根据id查询 报表详情
- ReportExcel reportExcel = selectOne("report_code", reportExcelDto.getReportCode());
- QueryWrapper queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("report_code" , reportExcelDto.getReportCode());
- Report report = reportMapper.selectOne(queryWrapper);
- GaeaAssert.notNull(reportExcel, ResponseCode.RULE_CONTENT_NOT_EXIST, "reportExcel");
- String setParam = reportExcelDto.getSetParam();
-
- GaeaBeanUtils.copyAndFormatter(reportExcel , reportExcelDto);
- if(StringUtils.isNotBlank(setParam)){
- reportExcelDto.setSetParam(setParam);
- }
- reportExcelDto.setReportName(report.getReportName());
- JSONObject jsonObject = reportUtil.reportParse(reportExcelDto);
- reportExcelDto.setJsonStr(JSONObject.toJSONString(jsonObject));
- reportExcelDto.setTotal(jsonObject.getJSONObject("rows").size());
- return reportExcelDto;
- }
-
- @Override
- public Boolean exportExcel(ReportExcelDto reportExcelDto) {
- ExportOperation exportOperation = new ExportOperation();
- //指明导出数据查询到结果开始时间
- exportOperation.setResultStartTime(LocalDateTime.now());
- ReportExcelDto result = preview(reportExcelDto);
- //指明导出数据查询到结果结束时间
- exportOperation.setResultEndTime(LocalDateTime.now());
- //指明导出数据查询到结果条数
- exportOperation.setResultSize(result.getTotal());
- //指明采用什么模式导出
- exportOperation.setExportType(StringUtils.isBlank(reportExcelDto.getExportType())
- ? ExportTypeEnum.GAEA_TEMPLATE_EXCEL.getCodeValue() : reportExcelDto.getExportType());
- //设置导出的文件名
- exportOperation.setFileTitle(result.getReportName());
- //设置导出的文件存放目录
- exportOperation.setFilePath(dictPath);
- //设置导出的数据jsonStr
- exportOperation.setJsonStr(result.getJsonStr());
- //保存当前操作人
- exportOperation.setCreaterUsername(UserContentHolder.getContext().getUsername());
- //调用盖亚组件实现导出文件
- threadPoolExportExecutor.execute(() -> {
- ExportUtil.getInstance().exportByFilePathSimple(exportOperation, null);
- });
- return true;
- }
-
-}
diff --git a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/util/ReportUtil.java b/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/util/ReportUtil.java
deleted file mode 100644
index bcebc34a..00000000
--- a/report-core/src/main/java/com/anjiplus/template/gaea/business/modules/reportexcel/util/ReportUtil.java
+++ /dev/null
@@ -1,1109 +0,0 @@
-package com.anjiplus.template.gaea.business.modules.reportexcel.util;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.alibaba.fastjson.parser.Feature;
-import com.anji.plus.gaea.export.utils.QrCodeOrBarCodeUtil;
-import com.anjiplus.template.gaea.business.modules.dataSet.controller.dto.DataSetDto;
-import com.anjiplus.template.gaea.business.modules.dataSet.controller.dto.OriginalDataDto;
-import com.anjiplus.template.gaea.business.modules.dataSet.service.DataSetService;
-import com.anjiplus.template.gaea.business.modules.report.constant.ExpConstant;
-import com.anjiplus.template.gaea.business.modules.reportexcel.controller.dto.ReportExcelDto;
-import freemarker.template.Configuration;
-import freemarker.template.Template;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.poi.ddf.EscherClientAnchorRecord;
-import org.apache.poi.hssf.usermodel.HSSFDataFormat;
-import org.apache.poi.ss.usermodel.BorderStyle;
-import org.apache.poi.ss.usermodel.Cell;
-import org.apache.poi.ss.usermodel.CellType;
-import org.apache.poi.ss.usermodel.ClientAnchor;
-import org.apache.poi.ss.usermodel.CreationHelper;
-import org.apache.poi.ss.usermodel.DataFormat;
-import org.apache.poi.ss.usermodel.FillPatternType;
-import org.apache.poi.ss.usermodel.HorizontalAlignment;
-import org.apache.poi.ss.usermodel.Picture;
-import org.apache.poi.ss.usermodel.Row;
-import org.apache.poi.ss.usermodel.VerticalAlignment;
-import org.apache.poi.ss.usermodel.Workbook;
-import org.apache.poi.ss.util.CellRangeAddress;
-import org.apache.poi.ss.util.RegionUtil;
-import org.apache.poi.xssf.usermodel.XSSFCellStyle;
-import org.apache.poi.xssf.usermodel.XSSFColor;
-import org.apache.poi.xssf.usermodel.XSSFDataFormat;
-import org.apache.poi.xssf.usermodel.XSSFDrawing;
-import org.apache.poi.xssf.usermodel.XSSFFont;
-import org.apache.poi.xssf.usermodel.XSSFRow;
-import org.apache.poi.xssf.usermodel.XSSFSheet;
-import org.apache.poi.xssf.usermodel.XSSFWorkbook;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-import org.springframework.util.CollectionUtils;
-
-import java.io.ByteArrayOutputStream;
-import java.io.FileOutputStream;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.math.BigDecimal;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-import java.util.OptionalDouble;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-/**
- * TODO
- *
- * @author chenkening
- * @date 2021/3/26 10:30
- */
-@Component
-public class ReportUtil {
-
- /**
- * 记录日志
- */
- protected static Logger logger = LoggerFactory.getLogger(ReportUtil.class);
-
- @Autowired
- private DataSetService dataSetService;
-
-
- public JSONObject reportParse(ReportExcelDto reportExcelDto) {
-
- // 取第一个sheet
- JSONObject jsonObject = JSONObject.parseObject(reportExcelDto.getJsonStr(), Feature.OrderedField).getJSONArray("sheet").getJSONObject(0);
-// JSONObject jsonObject = JSONObject.parseObject(reportExcelDto.getJsonStr());
-
- logger.info("excelJSON信息:{}\n", jsonObject);
- JSONObject rowsJsonObject = jsonObject.getJSONObject("rows");
- // 所有的样式数组。
- JSONArray styles = jsonObject.getJSONArray("styles");
-// System.out.println(styles);
- logger.info("需要解析的JSON {}", rowsJsonObject);
-
- //用于存储语法解析后的json
- JSONObject syntaxJsonObject = new JSONObject(true);
-
- Map dataSetMap = new HashMap<>();
-
- Map> map = new HashMap<>();
- rowsJsonObject.remove("len");
- for (String s : rowsJsonObject.keySet()) {
- List
-