浏览代码

LY 删除无用文件

ly 2 年之前
父节点
当前提交
36d3173a61

+ 24 - 70
master/pom.xml

@@ -216,25 +216,6 @@
 			<version>${oshi.version}</version>
 		</dependency>
 
-		<!-- excel工具 -->
-		<dependency>
-			<groupId>org.apache.poi</groupId>
-			<artifactId>poi-ooxml</artifactId>
-<!--			<version>${poi.version}</version>-->
-			<version>4.1.2</version>
-		</dependency>
-
-		<dependency>
-			<groupId>org.jxls</groupId>
-			<artifactId>jxls</artifactId>
-			<version>${jxls.version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.jxls</groupId>
-			<artifactId>jxls-poi</artifactId>
-			<version>${jxls-poi.version}</version>
-		</dependency>
-
 		<!--velocity代码生成使用模板 -->
 		<dependency>
 			<groupId>org.apache.velocity</groupId>
@@ -242,18 +223,6 @@
 			<version>${velocity.version}</version>
 		</dependency>
 
-        <!-- 定时任务 -->
-		<!--<dependency>
-			<groupId>org.quartz-scheduler</groupId>
-			<artifactId>quartz</artifactId>
-			<exclusions>
-				<exclusion>
-					<groupId>com.mchange</groupId>
-					<artifactId>c3p0</artifactId>
-				</exclusion>
-			</exclusions>
-		</dependency>-->
-
 		<!--验证码 -->
 		<dependency>
 			<groupId>com.github.penggle</groupId>
@@ -267,12 +236,6 @@
 			</exclusions>
 		</dependency>
 
-		<!--lombok-->
-		<dependency>
-			<groupId>org.projectlombok</groupId>
-			<artifactId>lombok</artifactId>
-			<version>${lombok.version}</version>
-		</dependency>
 
 		<!--mybatisplus-->
 		<dependency>
@@ -292,26 +255,23 @@
 			<artifactId>spring-boot-starter-mail</artifactId>
 		</dependency>
 
-		<dependency>
-			<groupId>com.github.ulisesbocchio</groupId>
-			<artifactId>jasypt-spring-boot-starter</artifactId>
-			<version>2.1.0</version>
-		</dependency>
 		<dependency>
 			<groupId>org.apache.poi</groupId>
 			<artifactId>poi</artifactId>
-			<version>4.1.2</version>
+<!--			<version>4.1.2</version>-->
+			<version>5.2.2</version>
 		</dependency>
 		<dependency>
 			<groupId>com.deepoove</groupId>
 			<artifactId>poi-tl</artifactId>
-			<version>1.10.2</version>
-		</dependency>
-		<dependency>
-			<groupId>fr.opensagres.xdocreport</groupId>
-			<artifactId>fr.opensagres.poi.xwpf.converter.pdf-gae</artifactId>
-			<version>2.0.2</version>
+<!--			<version>1.10.2</version>-->
+			<version>1.12.1</version>
 		</dependency>
+<!--		<dependency>-->
+<!--			<groupId>fr.opensagres.xdocreport</groupId>-->
+<!--			<artifactId>fr.opensagres.poi.xwpf.converter.pdf-gae</artifactId>-->
+<!--			<version>2.0.2</version>-->
+<!--		</dependency>-->
 
 		<dependency>
 			<groupId>org.jodconverter</groupId>
@@ -373,16 +333,16 @@
 			<artifactId>itextpdf</artifactId>
 			<version>5.4.2</version>
 		</dependency>
-		<dependency>
-			<groupId>com.itextpdf.tool</groupId>
-			<artifactId>xmlworker</artifactId>
-			<version>5.4.1</version>
-		</dependency>
-		<dependency>
-			<groupId>com.itextpdf</groupId>
-			<artifactId>itext-asian</artifactId>
-			<version>5.2.0</version>
-		</dependency>
+<!--		<dependency>-->
+<!--			<groupId>com.itextpdf.tool</groupId>-->
+<!--			<artifactId>xmlworker</artifactId>-->
+<!--			<version>5.4.1</version>-->
+<!--		</dependency>-->
+<!--		<dependency>-->
+<!--			<groupId>com.itextpdf</groupId>-->
+<!--			<artifactId>itext-asian</artifactId>-->
+<!--			<version>5.2.0</version>-->
+<!--		</dependency>-->
 		<dependency>
 			<groupId>org.xhtmlrenderer</groupId>
 			<artifactId>flying-saucer-pdf</artifactId>
@@ -394,19 +354,13 @@
 			<artifactId>jpinyin</artifactId>
 			<version>1.1.8</version>
 		</dependency>
-		<!-- jfreechart -->
-		<dependency>
-			<groupId>org.jfree</groupId>
-			<artifactId>jfreechart</artifactId>
-			<version>1.5.0</version>
-		</dependency>
 
 		<!-- pinyin4j 汉语转拼音 -->
-		<dependency>
-			<groupId>com.belerweb</groupId>
-			<artifactId>pinyin4j</artifactId>
-			<version>2.5.1</version>
-		</dependency>
+<!--		<dependency>-->
+<!--			<groupId>com.belerweb</groupId>-->
+<!--			<artifactId>pinyin4j</artifactId>-->
+<!--			<version>2.5.1</version>-->
+<!--		</dependency>-->
 		<!-- log4j日志组件 -->
 		<dependency>
 			<groupId>org.apache.logging.log4j</groupId>

+ 0 - 364
master/src/main/java/com/ruoyi/common/utils/document/ChartUtil.java

@@ -1,364 +0,0 @@
-package com.ruoyi.common.utils.document;
-
-import org.jfree.chart.ChartFactory;
-import org.jfree.chart.JFreeChart;
-import org.jfree.chart.StandardChartTheme;
-import org.jfree.chart.axis.CategoryLabelPositions;
-import org.jfree.chart.axis.ValueAxis;
-import org.jfree.chart.block.BlockBorder;
-import org.jfree.chart.labels.ItemLabelAnchor;
-import org.jfree.chart.labels.ItemLabelPosition;
-import org.jfree.chart.labels.StandardCategoryItemLabelGenerator;
-import org.jfree.chart.labels.StandardPieSectionLabelGenerator;
-import org.jfree.chart.plot.*;
-import org.jfree.chart.renderer.category.LineAndShapeRenderer;
-import org.jfree.chart.renderer.category.StandardBarPainter;
-import org.jfree.chart.renderer.xy.StandardXYBarPainter;
-import org.jfree.chart.ui.RectangleInsets;
-import org.jfree.chart.ui.TextAnchor;
-import org.jfree.data.category.DefaultCategoryDataset;
-import org.jfree.data.general.DefaultPieDataset;
-
-import java.awt.*;
-import java.io.File;
-import java.text.NumberFormat;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-
-public class ChartUtil {
-    private static String NO_DATA_MSG = "暂无数据";
-    private static Font FONT = new Font("宋体", Font.PLAIN, 20);
-    public static Color[] CHART_COLORS = {
-            new Color(31,129,188), new Color(92,92,97), new Color(144,237,125), new Color(255,188,117),
-            new Color(153,158,255), new Color(255,117,153), new Color(253,236,109), new Color(128,133,232),
-            new Color(158,90,102),new Color(255, 204, 102) };// 颜色
-
-    static{
-        setChartTheme();
-    }
-    /**
-     * 中文主题样式 解决乱码
-     */
-    public static void setChartTheme() {
-        // 设置中文主题样式 解决乱码
-        StandardChartTheme chartTheme = new StandardChartTheme("CN");
-        // 设置标题字体
-        chartTheme.setExtraLargeFont(FONT);
-        // 设置图例的字体
-        chartTheme.setRegularFont(FONT);
-        // 设置轴向的字体
-        chartTheme.setLargeFont(FONT);
-        chartTheme.setSmallFont(FONT);
-        chartTheme.setTitlePaint(new Color(51, 51, 51));
-        chartTheme.setSubtitlePaint(new Color(85, 85, 85));
-
-        chartTheme.setLegendBackgroundPaint(Color.WHITE);// 设置标注
-        chartTheme.setLegendItemPaint(Color.BLACK);//
-        chartTheme.setChartBackgroundPaint(Color.WHITE);
-        // 绘制颜色绘制颜色.轮廓供应商
-        // paintSequence,outlinePaintSequence,strokeSequence,outlineStrokeSequence,shapeSequence
-
-        Paint[] OUTLINE_PAINT_SEQUENCE = new Paint[] { Color.WHITE };
-        // 绘制器颜色源
-        DefaultDrawingSupplier drawingSupplier = new DefaultDrawingSupplier(CHART_COLORS, CHART_COLORS, OUTLINE_PAINT_SEQUENCE,
-                DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE, DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE,
-                DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE);
-        chartTheme.setDrawingSupplier(drawingSupplier);
-
-        chartTheme.setPlotBackgroundPaint(Color.WHITE);// 绘制区域
-        chartTheme.setPlotOutlinePaint(Color.WHITE);// 绘制区域外边框
-        chartTheme.setLabelLinkPaint(new Color(8, 55, 114));// 链接标签颜色
-        chartTheme.setLabelLinkStyle(PieLabelLinkStyle.CUBIC_CURVE);
-
-        chartTheme.setAxisOffset(new RectangleInsets(5, 12, 5, 12));
-        chartTheme.setDomainGridlinePaint(new Color(192, 208, 224));// X坐标轴垂直网格颜色
-        chartTheme.setRangeGridlinePaint(new Color(192, 192, 192));// Y坐标轴水平网格颜色
-
-        chartTheme.setBaselinePaint(Color.WHITE);
-        chartTheme.setCrosshairPaint(Color.BLUE);// 不确定含义
-        chartTheme.setAxisLabelPaint(new Color(51, 51, 51));// 坐标轴标题文字颜色
-        chartTheme.setTickLabelPaint(new Color(67, 67, 72));// 刻度数字
-        chartTheme.setBarPainter(new StandardBarPainter());// 设置柱状图渲染
-        chartTheme.setXYBarPainter(new StandardXYBarPainter());// XYBar 渲染
-
-        chartTheme.setItemLabelPaint(Color.black);
-        chartTheme.setThermometerPaint(Color.white);// 温度计
-
-        ChartFactory.setChartTheme(chartTheme);
-    }
-    /**
-     * 必须设置文本抗锯齿
-     */
-    public static void setAntiAlias(JFreeChart chart) {
-        chart.setTextAntiAlias(false);
-
-    }
-
-    /**
-     * 设置图例无边框,默认黑色边框
-     */
-    public static void setLegendEmptyBorder(JFreeChart chart) {
-        chart.getLegend().setFrame(new BlockBorder(Color.WHITE));
-
-    }
-
-    /**
-     * 提供静态方法:获取报表图形1:饼状图
-     * @param title    标题
-     * @param datas    数据
-     * @param url    字体
-     */
-    public static void createPiePort(String title, Map<String,Double> datas, String url){
-        try {
-            // 如果不使用Font,中文将显示不出来
-            DefaultPieDataset pds = new DefaultPieDataset();
-
-            // 获取迭代器:
-            Set<Entry<String, Double>> set =  datas.entrySet();
-            Iterator iterator=(Iterator) set.iterator();
-            Entry entry=null;
-            while(iterator.hasNext()){
-                entry=(Entry) iterator.next();
-                pds.setValue(entry.getKey().toString(),Double.parseDouble(entry.getValue().toString()));
-            }
-            /**
-             * 生成一个饼图的图表
-             * 分别是:显示图表的标题、需要提供对应图表的DateSet对象、是否显示图例、是否生成贴士以及是否生成URL链接
-             */
-            JFreeChart chart = ChartFactory.createPieChart(title, pds, true, true, true);
-            setPieRender((PiePlot) chart.getPlot());
-
-            //将内存中的图片写到本地硬盘
-            org.jfree.chart.ChartUtils.saveChartAsPNG(new File(url), chart,800,500);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    /**
-     * 提供静态方法:获取报表图形1:饼状图
-     * @param title    标题
-     * @param datas    数据
-     * @param url    字体
-     */
-    public static void createBarPort(String title, Map<String,Double> datas, String url){
-        try {
-            // 如果不使用Font,中文将显示不出来
-            DefaultCategoryDataset  pds = new DefaultCategoryDataset();
-
-            // 获取迭代器:
-            Set<Entry<String, Double>> set =  datas.entrySet();
-            Iterator iterator=(Iterator) set.iterator();
-            Entry entry=null;
-            while(iterator.hasNext()){
-                entry=(Entry) iterator.next();
-                pds.setValue(Double.parseDouble(entry.getValue().toString()),entry.getKey().toString(),entry.getKey().toString());
-            }
-            /**
-             * 生成一个饼图的图表
-             * 分别是:显示图表的标题、需要提供对应图表的DateSet对象、是否显示图例、是否生成贴士以及是否生成URL链接
-             */
-            JFreeChart chart = ChartFactory.createBarChart(title,"分类","数量", pds, PlotOrientation.VERTICAL, true, true, false);
-
-            //将内存中的图片写到本地硬盘
-            org.jfree.chart.ChartUtils.saveChartAsPNG(new File(url), chart,800,500);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-
-
-
-    /**
-     * 提供静态方法:获取报表图形3:折线图
-     * @param title        标题
-     * @param datas        数据
-     * @param xName        分类(第一季,第二季.....)
-     * @param yName    柱状图的数量单位
-     * @param url        字体
-     */
-    public static void createLinePort(String title,Map<String,Double> datas,String xName,String yName,String url){
-        try {
-            //种类数据集
-            DefaultCategoryDataset dataset = new DefaultCategoryDataset();
-            //获取迭代器:
-            Set<Entry<String, Double>> set =  datas.entrySet();
-            Iterator iterator=(Iterator) set.iterator();
-            Entry entry=null;
-            while(iterator.hasNext()){
-                entry=(Entry) iterator.next();
-                dataset.setValue(Double.parseDouble(entry.getValue().toString()),//y
-                        title,                         //名称
-                        entry.getKey().toString());      //x
-            }
-            //创建折线图,折线图分水平显示和垂直显示两种
-            JFreeChart chart = ChartFactory.createLineChart(title, xName, yName, dataset,//2D折线图
-                    PlotOrientation.VERTICAL,
-                    false, // 是否显示图例(对于简单的柱状图必须是false)
-                    true, // 是否生成工具
-                    true);// 是否生成URL链接
-            //得到绘图区
-            setLineRender((CategoryPlot)chart.getPlot(),true,true);
-            org.jfree.chart.ChartUtils.saveChartAsPNG(new File(url), chart, 1000,600);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    /**
-     * 提供静态方法:获取报表图形3:折线图
-     * @param title        标题
-     * @param datas        数据
-     * @param xName        分类(第一季,第二季.....)
-     * @param yName    柱状图的数量单位
-     * @param url        字体
-     */
-    public static void createLinePort(String title,DefaultCategoryDataset datas,String xName,String yName,String url){
-        try {
-            //创建折线图,折线图分水平显示和垂直显示两种
-            JFreeChart chart = ChartFactory.createLineChart(title, xName, yName, datas,//2D折线图
-                    PlotOrientation.VERTICAL,
-                    true, // 是否显示图例(对于简单的柱状图必须是false)
-                    true, // 是否生成工具
-                    true);// 是否生成URL链接
-            //得到绘图区
-            setLineRender((CategoryPlot)chart.getPlot(),true,true);
-            org.jfree.chart.ChartUtils.saveChartAsPNG(new File(url), chart, 1000,600);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    /**
-     * 设置折线图样式
-     *
-     * @param plot
-     * @param isShowDataLabels
-     *            是否显示数据标签
-     */
-    public static void setLineRender(CategoryPlot plot, boolean isShowDataLabels, boolean isShapesVisible) {
-        plot.setNoDataMessage(NO_DATA_MSG);
-        plot.setInsets(new RectangleInsets(10, 10, 0, 10), false);
-        LineAndShapeRenderer lasp = (LineAndShapeRenderer) plot.getRenderer();
-
-        LineAndShapeRenderer renderer = (LineAndShapeRenderer) plot.getRenderer();
-         renderer.setSeriesPaint(1, Color.RED);//红色
-        renderer.setSeriesPaint(0, Color.BLUE);//蓝色
-        renderer.setDefaultStroke(new BasicStroke(1.5F));
-        if (isShowDataLabels) {
-            renderer.setDefaultItemLabelsVisible(true);
-            renderer.setDefaultItemLabelGenerator(new StandardCategoryItemLabelGenerator(StandardCategoryItemLabelGenerator.DEFAULT_LABEL_FORMAT_STRING,
-                    NumberFormat.getInstance()));
-            renderer.setDefaultPositiveItemLabelPosition(new ItemLabelPosition(ItemLabelAnchor.OUTSIDE1, TextAnchor.BOTTOM_CENTER));// weizhi
-        }
-        renderer.setDefaultShapesVisible(isShapesVisible);// 数据点绘制形状
-        setXAixs(plot);
-        setYAixs(plot);
-
-    }
-    /**
-     * 设置饼状图渲染
-     */
-    public static void setBarRender(Plot plot) {
-
-//        CategoryAxis categoryAxis=plot.getDomainAxis();//获得横坐标
-//        categoryAxis.setLabelFont(new Font("微软雅黑",Font.BOLD,12));//设置横坐标字体
-    }
-    /**
-     * 设置饼状图渲染
-     */
-    public static void setPieRender(Plot plot) {
-
-        plot.setNoDataMessage(NO_DATA_MSG);
-        plot.setInsets(new RectangleInsets(10, 10, 5, 10));
-        PiePlot piePlot = (PiePlot) plot;
-        piePlot.setInsets(new RectangleInsets(0, 0, 0, 0));
-        piePlot.setCircular(true);// 圆形
-
-        // piePlot.setSimpleLabels(true);// 简单标签
-        piePlot.setLabelGap(0.01);
-        piePlot.setInteriorGap(0.05D);
-        piePlot.setLegendItemShape(new Rectangle(10, 10));// 图例形状
-        piePlot.setIgnoreNullValues(true);
-        piePlot.setLabelBackgroundPaint(null);// 去掉背景色
-        piePlot.setLabelShadowPaint(null);// 去掉阴影
-        piePlot.setLabelOutlinePaint(null);// 去掉边框
-        piePlot.setShadowPaint(null);
-        // 0:category 1:value:2 :percentage
-        piePlot.setLabelGenerator(new StandardPieSectionLabelGenerator("{0}:{2}"));// 显示标签数据
-    }
-
-    /**
-     * 设置类别图表(CategoryPlot) X坐标轴线条颜色和样式
-     *
-     * @param plot
-     */
-    public static void setXAixs(CategoryPlot plot) {
-        Color lineColor = new Color(31, 121, 170);
-        plot.getDomainAxis().setCategoryLabelPositions(CategoryLabelPositions.UP_45);
-        plot.getDomainAxis().setAxisLinePaint(lineColor);// X坐标轴颜色
-        plot.getDomainAxis().setTickMarkPaint(lineColor);// X坐标轴标记|竖线颜色
-
-    }
-
-    /**
-     * 设置类别图表(CategoryPlot) Y坐标轴线条颜色和样式 同时防止数据无法显示
-     *
-     * @param plot
-     */
-    public static void setYAixs(CategoryPlot plot) {
-//      Color lineColor = new Color(192, 208, 224);
-        Color lineColor = new Color(31, 121, 170);
-        ValueAxis axis = plot.getRangeAxis();
-        axis.setAxisLinePaint(lineColor);// Y坐标轴颜色
-        axis.setTickMarkPaint(lineColor);// Y坐标轴标记|竖线颜色
-        // false隐藏Y刻度
-        axis.setAxisLineVisible(true);
-        axis.setTickMarksVisible(true);
-        // Y轴网格线条
-        plot.setRangeGridlinePaint(new Color(192, 192, 192));
-        plot.setRangeGridlineStroke(new BasicStroke(1));
-
-        plot.getRangeAxis().setUpperMargin(0.1);// 设置顶部Y坐标轴间距,防止数据无法显示
-        plot.getRangeAxis().setLowerMargin(0.1);// 设置底部Y坐标轴间距
-
-    }
-
-    /**
-     * 设置XY图表(XYPlot) X坐标轴线条颜色和样式
-     *
-     * @param plot
-     */
-    public static void setXY_XAixs(XYPlot plot) {
-        Color lineColor = new Color(31, 121, 170);
-        plot.getDomainAxis().setAxisLinePaint(lineColor);// X坐标轴颜色
-        plot.getDomainAxis().setTickMarkPaint(lineColor);// X坐标轴标记|竖线颜色
-
-    }
-
-    /**
-     * 设置XY图表(XYPlot) Y坐标轴线条颜色和样式 同时防止数据无法显示
-     *
-     * @param plot
-     */
-    public static void setXY_YAixs(XYPlot plot) {
-        Color lineColor = new Color(192, 208, 224);
-        ValueAxis axis = plot.getRangeAxis();
-        axis.setAxisLinePaint(lineColor);// X坐标轴颜色
-        axis.setTickMarkPaint(lineColor);// X坐标轴标记|竖线颜色
-        // 隐藏Y刻度
-        axis.setAxisLineVisible(false);
-        axis.setTickMarksVisible(false);
-        // Y轴网格线条
-        plot.setRangeGridlinePaint(new Color(192, 192, 192));
-        plot.setRangeGridlineStroke(new BasicStroke(1));
-        plot.setDomainGridlinesVisible(false);
-
-        plot.getRangeAxis().setUpperMargin(0.12);// 设置顶部Y坐标轴间距,防止数据无法显示
-        plot.getRangeAxis().setLowerMargin(0.12);// 设置底部Y坐标轴间距
-
-    }
-}

+ 74 - 74
master/src/main/java/com/ruoyi/common/utils/export/JxlsView.java

@@ -1,74 +1,74 @@
-package com.ruoyi.common.utils.export;
-
-import org.jxls.common.Context;
-import org.jxls.util.JxlsHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.web.servlet.view.AbstractView;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Map;
-
-/**
- * Created by xk on 2017/12/4 0004.
- */
-public class JxlsView extends AbstractView {
-    private static Logger log = LoggerFactory.getLogger(JxlsView.class);
-
-    private JxlsTemplate template;
-
-    private Object data;
-    private Object sheetdata;
-
-    public JxlsView() {
-        this.setContentType("application/vnd.ms-excel");
-    }
-
-    public JxlsView(JxlsTemplate template, Object data) {
-        this();
-        this.template = template;
-        this.data = data;
-    }
-
-    public JxlsView(JxlsTemplate template, Object data, Object sheetdata) {
-        this();
-        this.template = template;
-        this.data = data;
-        this.sheetdata = sheetdata;
-    }
-
-    protected boolean generatesDownloadContent() {
-        return true;
-    }
-
-    protected final void renderMergedOutputModel(Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception {
-        response.setContentType(this.getContentType());
-        response.setHeader("Content-Disposition", "attachment;filename="
-                + EncodeTools.encodeFileNameByBrowser(template.getName(), request));
-        InputStream is = null;
-        try {
-            is = JxlsView.class.getResourceAsStream(template.getPath());
-            Context context = new Context();
-            context.putVar("data", data);
-            context.putVar("sheetNames", sheetdata);
-            logger.info("data" + data);
-            logger.info("is" + is);
-            logger.info("getOutputStream" + response.getOutputStream());
-            JxlsHelper.getInstance().processTemplate(is, response.getOutputStream(), context);
-        } catch (Exception e) {
-            log.error("导出失败", e);
-        } finally {
-            if (is != null) {
-                try {
-                    is.close();
-                } catch (IOException e) {
-                    log.error("is关闭失败", e);
-                }
-            }
-        }
-
-    }
-}
+//package com.ruoyi.common.utils.export;
+//
+//import org.jxls.common.Context;
+//import org.jxls.util.JxlsHelper;
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//import org.springframework.web.servlet.view.AbstractView;
+//
+//import javax.servlet.http.HttpServletRequest;
+//import javax.servlet.http.HttpServletResponse;
+//import java.io.IOException;
+//import java.io.InputStream;
+//import java.util.Map;
+//
+///**
+// * Created by xk on 2017/12/4 0004.
+// */
+//public class JxlsView extends AbstractView {
+//    private static Logger log = LoggerFactory.getLogger(JxlsView.class);
+//
+//    private JxlsTemplate template;
+//
+//    private Object data;
+//    private Object sheetdata;
+//
+//    public JxlsView() {
+//        this.setContentType("application/vnd.ms-excel");
+//    }
+//
+//    public JxlsView(JxlsTemplate template, Object data) {
+//        this();
+//        this.template = template;
+//        this.data = data;
+//    }
+//
+//    public JxlsView(JxlsTemplate template, Object data, Object sheetdata) {
+//        this();
+//        this.template = template;
+//        this.data = data;
+//        this.sheetdata = sheetdata;
+//    }
+//
+//    protected boolean generatesDownloadContent() {
+//        return true;
+//    }
+//
+//    protected final void renderMergedOutputModel(Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception {
+//        response.setContentType(this.getContentType());
+//        response.setHeader("Content-Disposition", "attachment;filename="
+//                + EncodeTools.encodeFileNameByBrowser(template.getName(), request));
+//        InputStream is = null;
+//        try {
+//            is = JxlsView.class.getResourceAsStream(template.getPath());
+//            Context context = new Context();
+//            context.putVar("data", data);
+//            context.putVar("sheetNames", sheetdata);
+//            logger.info("data" + data);
+//            logger.info("is" + is);
+//            logger.info("getOutputStream" + response.getOutputStream());
+//            JxlsHelper.getInstance().processTemplate(is, response.getOutputStream(), context);
+//        } catch (Exception e) {
+//            log.error("导出失败", e);
+//        } finally {
+//            if (is != null) {
+//                try {
+//                    is.close();
+//                } catch (IOException e) {
+//                    log.error("is关闭失败", e);
+//                }
+//            }
+//        }
+//
+//    }
+//}

+ 2 - 2
master/src/main/java/com/ruoyi/common/utils/file/ExcelUtils.java

@@ -2,7 +2,7 @@ package com.ruoyi.common.utils.file;
 
 import org.apache.commons.lang.time.DateFormatUtils;
 import org.apache.poi.hssf.usermodel.HSSFDataFormat;
-import org.apache.poi.hssf.usermodel.HSSFDateUtil;
+import org.apache.poi.ss.usermodel.DateUtil;
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.apache.poi.ss.usermodel.*;
 import org.apache.poi.ss.util.CellRangeAddress;
@@ -141,7 +141,7 @@ public class ExcelUtils {
      */
     public static String stringDateProcess(Cell cell) {
         String result = new String();
-        if (HSSFDateUtil.isCellDateFormatted(cell)) {// 处理日期格式、时间格式
+        if (DateUtil.isCellDateFormatted(cell)) {// 处理日期格式、时间格式
             SimpleDateFormat sdf = null;
             if (cell.getCellStyle().getDataFormat() == HSSFDataFormat.getBuiltinFormat("h:mm")) {
                 sdf = new SimpleDateFormat("HH:mm");

+ 0 - 89
master/src/main/java/com/ruoyi/common/utils/poi/CustomXWPFDocument.java

@@ -1,89 +0,0 @@
-package com.ruoyi.common.utils.poi;
-
-import org.apache.poi.openxml4j.opc.OPCPackage;
-import org.apache.poi.xwpf.usermodel.XWPFDocument;
-import org.apache.poi.xwpf.usermodel.XWPFParagraph;
-import org.apache.xmlbeans.XmlException;
-import org.apache.xmlbeans.XmlToken;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D;
-import org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.CTInline;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-public class CustomXWPFDocument  extends XWPFDocument {
-    public CustomXWPFDocument(InputStream in) throws IOException {
-        super(in);
-    }
-
-    public CustomXWPFDocument(OPCPackage pkg) throws IOException {
-        super(pkg);
-    }
-
-    public void createPicture(String blipId,int id, int width, int height, XWPFParagraph paragraph)
-    {
-        final int EMU = 9525;
-        width *= EMU;
-        height *= EMU;
-        //String blipId = getAllPictures().get(id).getPackageRelationship().getId();
-
-//        CTInline inline = createParagraph().createRun().getCTR().addNewDrawing().addNewInline();
-        //给段落插入图片
-        CTInline inline = paragraph.createRun().getCTR().addNewDrawing().addNewInline();
-
-        String picXml = "" +
-                "<a:graphic xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\">" +
-                "   <a:graphicData uri=\"http://schemas.openxmlformats.org/drawingml/2006/picture\">" +
-                "      <pic:pic xmlns:pic=\"http://schemas.openxmlformats.org/drawingml/2006/picture\">" +
-                "         <pic:nvPicPr>" +
-                "            <pic:cNvPr id=\"" + id + "\" name=\"Generated\"/>" +
-                "            <pic:cNvPicPr/>" +
-                "         </pic:nvPicPr>" +
-                "         <pic:blipFill>" +
-                "            <a:blip r:embed=\"" + blipId + "\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\"/>" +
-                "            <a:stretch>" +
-                "               <a:fillRect/>" +
-                "            </a:stretch>" +
-                "         </pic:blipFill>" +
-                "         <pic:spPr>" +
-                "            <a:xfrm>" +
-                "               <a:off x=\"0\" y=\"0\"/>" +
-                "               <a:ext cx=\"" + width + "\" cy=\"" + height + "\"/>" +
-                "            </a:xfrm>" +
-                "            <a:prstGeom prst=\"rect\">" +
-                "               <a:avLst/>" +
-                "            </a:prstGeom>" +
-                "         </pic:spPr>" +
-                "      </pic:pic>" +
-                "   </a:graphicData>" +
-                "</a:graphic>";
-
-        //CTGraphicalObjectData graphicData = inline.addNewGraphic().addNewGraphicData();
-        XmlToken xmlToken = null;
-        try
-        {
-            xmlToken = XmlToken.Factory.parse(picXml);
-        }
-        catch(XmlException xe)
-        {
-            xe.printStackTrace();
-        }
-        inline.set(xmlToken);
-        //graphicData.set(xmlToken);
-
-        inline.setDistT(0);
-        inline.setDistB(0);
-        inline.setDistL(0);
-        inline.setDistR(0);
-
-        CTPositiveSize2D extent = inline.addNewExtent();
-        extent.setCx(width);
-        extent.setCy(height);
-
-        CTNonVisualDrawingProps docPr = inline.addNewDocPr();
-        docPr.setId(id);
-        docPr.setName("Picture " + id);
-        docPr.setDescr("Generated");
-    }
-}

+ 6 - 6
master/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java

@@ -18,7 +18,7 @@ import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
 import java.util.stream.Collectors;
-import org.apache.poi.hssf.usermodel.HSSFDateUtil;
+import org.apache.poi.ss.usermodel.DateUtil;
 import org.apache.poi.ss.usermodel.BorderStyle;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.CellStyle;
@@ -1173,10 +1173,10 @@ public class ExcelUtil<T>
             Cell cell = row.getCell(column);
             if (StringUtils.isNotNull(cell))
             {
-                if (cell.getCellTypeEnum() == CellType.NUMERIC || cell.getCellTypeEnum() == CellType.FORMULA)
+                if (cell.getCellType() == CellType.NUMERIC || cell.getCellType() == CellType.FORMULA)
                 {
                     val = cell.getNumericCellValue();
-                    if (HSSFDateUtil.isCellDateFormatted(cell))
+                    if (DateUtil.isCellDateFormatted(cell))
                     {
                         val = DateUtil.getJavaDate((Double) val); // POI Excel 日期格式转换
                     }
@@ -1192,15 +1192,15 @@ public class ExcelUtil<T>
                         }
                     }
                 }
-                else if (cell.getCellTypeEnum() == CellType.STRING)
+                else if (cell.getCellType() == CellType.STRING)
                 {
                     val = cell.getStringCellValue();
                 }
-                else if (cell.getCellTypeEnum() == CellType.BOOLEAN)
+                else if (cell.getCellType() == CellType.BOOLEAN)
                 {
                     val = cell.getBooleanCellValue();
                 }
-                else if (cell.getCellTypeEnum() == CellType.ERROR)
+                else if (cell.getCellType() == CellType.ERROR)
                 {
                     val = cell.getErrorCellValue();
                 }

+ 0 - 39
master/src/main/java/com/ruoyi/common/utils/poi/POIConstants.java

@@ -1,39 +0,0 @@
-package com.ruoyi.common.utils.poi;
-/**
- * poi常量
- * @author bzm
- * 2020-8-25
- */
-public class POIConstants {
-
-	//字体
-	public static final String FONT_NAME ="微软雅黑";
-
-	//字体大小
-	public static final String FONT_SIAZE ="7";
-	//字体大小
-	public static final String MT_FONT_SIZE ="10";
-	//字体大小 0:不加粗,1:加粗
-	public static final Integer FONT_BOLD = 0;
-
-	//字体大小 0:不加粗,1:加粗
-	public static final Integer FONT_BOLD_C = 1;
-	//单元格对齐方式-横向
-	public static final String ALIGNMENT ="center";
-
-	//单元格对齐方式-垂直方向
-	public static final String VERTICAL ="center";
-
-	//字体颜色
-	public static final String FONT_COLOR ="#000000";
-
-	//表格标题背景颜色
-	public static final String BG_TITLE_COLOR ="#80bdf9";
-	public static final String MT_BG_TITLE_COLOR ="#FFFFFF";
-	//表格内容背景颜色
-	public static final String BG_COLOR ="#FFFFFF";
-
-	//单元格宽度:Set the width to the value "auto", an integer value (20ths of a point), or a percentage ("nn.nn%")
-	public static final String CELL_WIDTH ="auto";
-
-}

+ 0 - 30
master/src/main/java/com/ruoyi/common/utils/poi/PoiWordTitle.java

@@ -1,30 +0,0 @@
-package com.ruoyi.common.utils.poi;
-
-import org.openxmlformats.schemas.drawingml.x2006.chart.CTChart;
-import org.openxmlformats.schemas.drawingml.x2006.chart.CTTitle;
-import org.openxmlformats.schemas.drawingml.x2006.chart.CTTx;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTRegularTextRun;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTTextBody;
-import org.openxmlformats.schemas.drawingml.x2006.main.CTTextParagraph;
-
-import java.util.List;
-
-/**
- * 更新图表的标题
- */
-public class PoiWordTitle {
-
-    public static void setBarTitle(CTChart ctChart, String title) {
-        CTTitle ctTitle = ctChart.getTitle();
-        CTTx ctTx = ctTitle.getTx();
-        if (null != ctTx) {
-            CTTextBody ctTextBody = ctTx.getRich();
-            List<CTTextParagraph> ctTextParagraphslist = ctTextBody.getPList();
-            CTTextParagraph ctTextParagraph1 = ctTextParagraphslist.get(0);
-            List<CTRegularTextRun> ctRegularTextRunslist = ctTextParagraph1.getRList();
-            ctRegularTextRunslist.get(0).setT(title);  // 设置标题
-        }
-
-
-    }
-}

+ 0 - 777
master/src/main/java/com/ruoyi/common/utils/poi/PoiWordTools.java

@@ -1,777 +0,0 @@
-package com.ruoyi.common.utils.poi;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.poi.ooxml.POIXMLDocumentPart;
-import org.apache.poi.ss.usermodel.*;
-import org.apache.poi.ss.util.CellRangeAddress;
-import org.apache.poi.xssf.streaming.SXSSFWorkbook;
-import org.apache.poi.xssf.usermodel.XSSFWorkbook;
-import org.apache.poi.xwpf.usermodel.*;
-import org.openxmlformats.schemas.drawingml.x2006.chart.*;
-import org.openxmlformats.schemas.wordprocessingml.x2006.main.*;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.util.List;
-import java.util.Map;
-
-/**
- * poi生成word的工具类
- * 针对于模板中的图表是静态的,也就是模板中的图表长什么样子不会根据数据而改变
- * https://blog.csdn.net/u014427811/article/details/100771314
- */
-public class PoiWordTools {
-
-    private static final BigDecimal bd2 = new BigDecimal("2");
-
-
-    /**
-     * 调用替换雷达图数据
-     */
-    public static void replaceRadarCharts(POIXMLDocumentPart poixmlDocumentPart,
-                                          List<String> titleArr, List<String> fldNameArr, List<Map<String, String>> listItemsByType) {
-        XWPFChart chart = (XWPFChart) poixmlDocumentPart;
-        chart.getCTChart();
-
-        //根据属性第一列名称切换数据类型
-        CTChart ctChart = chart.getCTChart();
-        CTPlotArea plotArea = ctChart.getPlotArea();
-
-        // 设置标题
-        // PoiWordTitle.setBarTitle(ctChart, "我是雷达图标题");
-
-        CTRadarChart radarChart = plotArea.getRadarChartArray(0);
-        List<CTRadarSer> radarList = radarChart.getSerList();  // 获取雷达图单位
-
-        //刷新内置excel数据
-        PoiWordTools.refreshExcel(chart, listItemsByType, fldNameArr, titleArr);
-        //刷新页面显示数据
-        refreshRadarStrGraphContent(radarChart, radarList, listItemsByType, fldNameArr, 1);
-
-
-    }
-
-
-    /**
-     * 调用替换柱状图数据
-     */
-    public static void replaceBarCharts(POIXMLDocumentPart poixmlDocumentPart,
-                                        List<String> titleArr, List<String> fldNameArr, List<Map<String, String>> listItemsByType) {
-        XWPFChart chart = (XWPFChart) poixmlDocumentPart;
-        chart.getCTChart();
-
-        //根据属性第一列名称切换数据类型
-        CTChart ctChart = chart.getCTChart();
-        CTPlotArea plotArea = ctChart.getPlotArea();
-
-        // 设置标题
-       // PoiWordTitle.setBarTitle(ctChart, "我是修改后的标题");
-
-        CTBarChart barChart = plotArea.getBarChartArray(0);
-        List<CTBarSer> BarSerList = barChart.getSerList();  // 获取柱状图单位
-
-        //刷新内置excel数据
-        PoiWordTools.refreshExcel(chart, listItemsByType, fldNameArr, titleArr);
-        //刷新页面显示数据
-        refreshBarStrGraphContent(barChart, BarSerList, listItemsByType, fldNameArr, 1);
-
-
-    }
-
-
-    /**
-     * 调用替换折线图数据
-     */
-    public static void replaceLineCharts(POIXMLDocumentPart poixmlDocumentPart,
-                                         List<String> titleArr, List<String> fldNameArr, List<Map<String, String>> listItemsByType) {
-        XWPFChart chart = (XWPFChart) poixmlDocumentPart;
-        chart.getCTChart();
-
-        //根据属性第一列名称切换数据类型
-        CTChart ctChart = chart.getCTChart();
-        CTPlotArea plotArea = ctChart.getPlotArea();
-
-        CTLineChart lineChart = plotArea.getLineChartArray(0);
-        List<CTLineSer> lineSerList = lineChart.getSerList();   // 获取折线图单位
-
-        //刷新内置excel数据
-         PoiWordTools.refreshExcel(chart, listItemsByType, fldNameArr, titleArr);
-        //刷新页面显示数据
-        PoiWordTools.refreshLineStrGraphContent(lineChart, lineSerList, listItemsByType, fldNameArr, 1);
-
-    }
-
-
-    /**
-     * 调用替换饼图数据
-     */
-    public static void replacePieCharts(POIXMLDocumentPart poixmlDocumentPart,
-                                        List<String> titleArr, List<String> fldNameArr, List<Map<String, String>> listItemsByType) {
-        XWPFChart chart = (XWPFChart) poixmlDocumentPart;
-        chart.getCTChart();
-
-        //根据属性第一列名称切换数据类型
-        CTChart ctChart = chart.getCTChart();
-        CTPlotArea plotArea = ctChart.getPlotArea();
-
-        CTPieChart pieChart = plotArea.getPieChartArray(0);
-        List<CTPieSer> pieSerList = pieChart.getSerList();  // 获取饼图单位
-
-        //刷新内置excel数据
-        PoiWordTools.refreshExcel(chart, listItemsByType, fldNameArr, titleArr);
-        //刷新页面显示数据
-        PoiWordTools.refreshPieStrGraphContent(pieChart, pieSerList, listItemsByType, fldNameArr, 1);
-
-    }
-
-
-    /**
-     *  调用替换柱状图、折线图组合数据
-     *  eg:3项(2柱状,1折线)
-     * @param poixmlDocumentPart
-     * @param titleArr
-     * @param fldNameArr
-     * @param listItemsByType
-     * @param barPos 柱状图数据起始位置
-     * @param linePos 折线图数据起始位置
-     */
-    public static void replaceCombinationCharts(POIXMLDocumentPart poixmlDocumentPart,
-                                                List<String> titleArr, List<String> fldNameArr, List<Map<String, String>> listItemsByType,
-                                                int barPos,int linePos) {
-        XWPFChart chart = (XWPFChart) poixmlDocumentPart;
-        chart.getCTChart();
-        //根据属性第一列名称切换数据类型
-        CTChart ctChart = chart.getCTChart();
-        CTPlotArea plotArea = ctChart.getPlotArea();
-        CTBarChart barChart = plotArea.getBarChartArray(0);
-        List<CTBarSer> barSerList = barChart.getSerList();  // 获取柱状图单位
-        //刷新内置excel数据
-        PoiWordTools.refreshExcel(chart, listItemsByType, fldNameArr, titleArr);
-        //刷新页面显示数据   数据中下标1开始的是柱状图数据,所以这个是1
-        refreshBarStrGraphContent(barChart, barSerList, listItemsByType, fldNameArr, barPos);
-        CTLineChart lineChart = plotArea.getLineChartArray(0);
-        List<CTLineSer> lineSerList = lineChart.getSerList();   // 获取折线图单位
-        //刷新内置excel数据   有一个就可以了    有一个就可以了    有一个就可以了
-        //PoiWordTools.refreshExcel(chart, listItemsByType, fldNameArr, titleArr);
-        //刷新页面显示数据   数据中下标3开始的是折线图的数据,所以这个是3
-        PoiWordTools.refreshLineStrGraphContent(lineChart, lineSerList, listItemsByType, fldNameArr, linePos);
-
-    }
-
-
-    /**
-     * 刷新折线图数据方法
-     *
-     * @param typeChart
-     * @param serList
-     * @param dataList
-     * @param fldNameArr
-     * @param position
-     * @return
-     */
-    @SuppressWarnings("unused")
-	public static boolean refreshLineStrGraphContent(Object typeChart,
-                                                     List<?> serList, List<Map<String, String>> dataList, List<String> fldNameArr, int position) {
-
-        boolean result = true;
-        //更新数据区域
-        for (int i = 0; i < serList.size(); i++) {
-            CTAxDataSource cat = null;
-            CTNumDataSource val = null;
-            CTLineSer ser = ((CTLineChart) typeChart).getSerArray(i);
-            // 设置标题
-            CTSerTx tx = ser.getTx();
-         //   tx.getStrRef().getStrCache().getPtList().get(0).setV("阿里嘎痛"); // wps和office都能打开
-
-            // Category Axis Data
-            cat = ser.getCat();
-            // 获取图表的值
-            val = ser.getVal();
-            // strData.set
-            CTStrData strData = cat.getStrRef().getStrCache();
-            CTNumData numData = val.getNumRef().getNumCache();
-            strData.setPtArray((CTStrVal[]) null); // unset old axis text
-            numData.setPtArray((CTNumVal[]) null); // unset old values
-
-            // set model
-            long idx = 0;
-            for (int j = 0; j < dataList.size(); j++) {
-                //判断获取的值是否为空
-                String value = "0";
-                String cc =dataList.get(j).get(fldNameArr.get(i + position)) == null ? "0" :dataList.get(j).get(fldNameArr.get(i + position));
-                value = new BigDecimal(cc).toString();
-              //  if (!"0".equals(value)) {
-                    CTNumVal numVal = numData.addNewPt();//序列值
-                    numVal.setIdx(idx);
-                    numVal.setV(value);
-               // }
-                CTStrVal sVal = strData.addNewPt();//序列名称
-                sVal.setIdx(idx);
-                sVal.setV(dataList.get(j).get(fldNameArr.get(0)));
-                idx++;
-            }
-            numData.getPtCount().setVal(idx);
-            strData.getPtCount().setVal(idx);
-
-
-            //赋值横坐标数据区域
-            String axisDataRange = new CellRangeAddress(1, dataList.size(), 0, 0)
-                    .formatAsString("Sheet1", false);
-            cat.getStrRef().setF(axisDataRange);
-
-            //数据区域
-            String numDataRange = new CellRangeAddress(1, dataList.size(), i + position, i + position)
-                    .formatAsString("Sheet1", false);
-            val.getNumRef().setF(numDataRange);
-
-            // 设置系列生成方向
-
-
-        }
-        return result;
-    }
-
-
-    /**
-     * 刷新柱状图数据方法
-     *
-     * @param typeChart
-     * @param serList
-     * @param dataList
-     * @param fldNameArr
-     * @param position
-     * @return
-     */
-    @SuppressWarnings("unused")
-	public static boolean refreshBarStrGraphContent(Object typeChart,
-                                                    List<?> serList, List<Map<String, String>> dataList, List<String> fldNameArr, int position) {
-        boolean result = true;
-        //更新数据区域
-        for (int i = 0; i < serList.size(); i++) {
-            CTAxDataSource cat = null;
-            CTNumDataSource val = null;
-            CTBarSer ser = ((CTBarChart) typeChart).getSerArray(i);
-
-            // 设置标题 用以下这个方式,可以兼容office和wps
-            CTSerTx tx = ser.getTx();
-          //  tx.getStrRef().getStrCache().getPtList().get(0).setV("柱状图1");//设置图例
-            // Category Axis Data
-            cat = ser.getCat();
-            // 获取图表的值
-            val = ser.getVal();
-            // strData.set
-            CTStrData strData = cat.getStrRef().getStrCache();
-            CTNumData numData = val.getNumRef().getNumCache();
-            strData.setPtArray((CTStrVal[]) null); // unset old axis text
-            numData.setPtArray((CTNumVal[]) null); // unset old values
-
-            // set model
-            long idx = 0;
-            for (int j = 0; j < dataList.size(); j++) {
-                //判断获取的值是否为空
-                String value = "0";
-                if (new BigDecimal(dataList.get(j).get(fldNameArr.get(i + position))) != null) {
-                    value = new BigDecimal(dataList.get(j).get(fldNameArr.get(i + position))).toString();
-                }
-                if (!"0".equals(value)) {
-                    CTNumVal numVal = numData.addNewPt();//序列值
-                    numVal.setIdx(idx);
-                    numVal.setV(value);
-                }
-                CTStrVal sVal = strData.addNewPt();//序列名称
-                sVal.setIdx(idx);
-                sVal.setV(dataList.get(j).get(fldNameArr.get(0)));
-                idx++;
-            }
-            numData.getPtCount().setVal(idx);
-            strData.getPtCount().setVal(idx);
-
-
-            //赋值横坐标数据区域
-            String axisDataRange = new CellRangeAddress(1, dataList.size(), 0, 0)
-                    .formatAsString("Sheet1", true);
-            cat.getStrRef().setF(axisDataRange);
-
-            //数据区域
-            String numDataRange = new CellRangeAddress(1, dataList.size(), i + position, i + position)
-                    .formatAsString("Sheet1", true);
-            val.getNumRef().setF(numDataRange);
-
-
-        }
-        return result;
-    }
-
-
-    /**
-     * 刷新饼图数据方法
-     *
-     * @param typeChart
-     * @param serList
-     * @param dataList
-     * @param fldNameArr
-     * @param position
-     * @return
-     */
-    public static boolean refreshPieStrGraphContent(Object typeChart,
-                                                    List<?> serList, List<Map<String, String>> dataList, List<String> fldNameArr, int position) {
-
-        boolean result = true;
-        //更新数据区域
-        for (int i = 0; i < serList.size(); i++) {
-            //CTSerTx tx=null;
-            CTAxDataSource cat = null;
-            CTNumDataSource val = null;
-            CTPieSer ser = ((CTPieChart) typeChart).getSerArray(i);
-
-            //tx.getStrRef().getStrCache().getPtList().get(0).setV("阿里嘎痛");
-            // Category Axis Data
-            cat = ser.getCat();
-            // 获取图表的值
-            val = ser.getVal();
-            // strData.set
-            CTStrData strData = cat.getStrRef().getStrCache();
-            CTNumData numData = val.getNumRef().getNumCache();
-            strData.setPtArray((CTStrVal[]) null); // unset old axis text
-            numData.setPtArray((CTNumVal[]) null); // unset old values
-
-            // set model
-            long idx = 0;
-            for (int j = 0; j < dataList.size(); j++) {
-                //判断获取的值是否为空
-                String value = "0";
-                if (new BigDecimal(dataList.get(j).get(fldNameArr.get(i + position))) != null) {
-                    value = new BigDecimal(dataList.get(j).get(fldNameArr.get(i + position))).toString();
-                }
-                if (!"0".equals(value)) {
-                    CTNumVal numVal = numData.addNewPt();//序列值
-                    numVal.setIdx(idx);
-                    numVal.setV(value);
-                }
-                CTStrVal sVal = strData.addNewPt();//序列名称
-                sVal.setIdx(idx);
-                sVal.setV(dataList.get(j).get(fldNameArr.get(0)));
-                idx++;
-            }
-            numData.getPtCount().setVal(idx);
-            strData.getPtCount().setVal(idx);
-
-
-            //赋值横坐标数据区域
-            String axisDataRange = new CellRangeAddress(1, dataList.size(), 0, 0)
-                    .formatAsString("Sheet1", true);
-            cat.getStrRef().setF(axisDataRange);
-
-            //数据区域
-            String numDataRange = new CellRangeAddress(1, dataList.size(), i + position, i + position)
-                    .formatAsString("Sheet1", true);
-            val.getNumRef().setF(numDataRange);
-        }
-        return result;
-    }
-
-
-    /**
-     * 刷新内置excel数据
-     *
-     * @param chart
-     * @param dataList
-     * @param fldNameArr
-     * @param titleArr
-     * @return
-     */
-    public static boolean refreshExcel(XWPFChart chart,
-                                       List<Map<String, String>> dataList, List<String> fldNameArr, List<String> titleArr) {
-        boolean result = true;
-        Workbook wb = new SXSSFWorkbook(1000);
-        Sheet sheet = wb.createSheet("Sheet1");
-        //根据数据创建excel第一行标题行
-        for (int i = 0; i < titleArr.size(); i++) {
-            if (sheet.getRow(0) == null) {
-                sheet.createRow(0).createCell(i).setCellValue(titleArr.get(i) == null ? "" : titleArr.get(i));
-            } else {
-                sheet.getRow(0).createCell(i).setCellValue(titleArr.get(i) == null ? "" : titleArr.get(i));
-            }
-        }
-
-        //遍历数据行
-        for (int i = 0; i < dataList.size(); i++) {
-            Map<String, String> baseFormMap = dataList.get(i);//数据行
-            //fldNameArr字段属性
-            for (int j = 0; j < fldNameArr.size(); j++) {
-                if (sheet.getRow(i + 1) == null) {
-                    if (j == 0) {
-                        try {
-                            sheet.createRow(i + 1).createCell(j).setCellValue(baseFormMap.get(fldNameArr.get(j)) == null ? "" : baseFormMap.get(fldNameArr.get(j)));
-                        } catch (Exception e) {
-                            if (baseFormMap.get(fldNameArr.get(j)) == null) {
-                                sheet.createRow(i + 1).createCell(j).setCellValue("");
-                            } else {
-                                sheet.createRow(i + 1).createCell(j).setCellValue(baseFormMap.get(fldNameArr.get(j)));
-                            }
-                        }
-                    }
-                } else {
-                    BigDecimal b = new BigDecimal(baseFormMap.get(fldNameArr.get(j)) == null ? "0" :baseFormMap.get(fldNameArr.get(j)));
-                    double value = 0d;
-                    if (b != null) {
-                        value = b.doubleValue();
-                    }
-                    if (value == 0) {
-                        sheet.getRow(i + 1).createCell(j);
-                    } else {
-                        sheet.getRow(i + 1).createCell(j).setCellValue(b.doubleValue());
-                    }
-                }
-            }
-
-        }
-        // 更新嵌入的workbook
-        POIXMLDocumentPart xlsPart = chart.getRelations().get(0);
-        OutputStream xlsOut = xlsPart.getPackagePart().getOutputStream();
-
-        try {
-            wb.write(xlsOut);
-            xlsOut.close();
-        } catch (IOException e) {
-            e.printStackTrace();
-            result = false;
-        } finally {
-            if (wb != null) {
-                try {
-                    wb.close();
-                } catch (IOException e) {
-                    e.printStackTrace();
-                    result = false;
-                }
-            }
-        }
-        return result;
-    }
-
-
-    /**
-     * 设置表格样式
-     *
-     * @param cell
-     * @param fontName
-     * @param fontSize
-     * @param fontBlod
-     * @param alignment
-     * @param vertical
-     * @param fontColor
-     * @param bgColor
-     * @param cellWidth
-     * @param content
-     */
-    public static void setWordCellSelfStyle(XWPFTableCell cell, String fontName, String fontSize, int fontBlod,
-                                            String alignment, String vertical, String fontColor,
-                                            String bgColor, String cellWidth, String content) {
-
-        //poi对字体大小设置特殊,不支持小数,但对原word字体大小做了乘2处理
-        BigInteger bFontSize = new BigInteger("24");
-        if (fontSize != null && !fontSize.equals("")) {
-            //poi对字体大小设置特殊,不支持小数,但对原word字体大小做了乘2处理
-            BigDecimal fontSizeBD = new BigDecimal(fontSize);
-            fontSizeBD = bd2.multiply(fontSizeBD);
-            fontSizeBD = fontSizeBD.setScale(0, BigDecimal.ROUND_HALF_UP);//这里取整
-            bFontSize = new BigInteger(fontSizeBD.toString());// 字体大小
-        }
-
-        // 设置单元格宽度
-        cell.setWidth(cellWidth);
-
-        //=====获取单元格
-        CTTc tc = cell.getCTTc();
-        //====tcPr开始====》》》》
-        CTTcPr tcPr = tc.getTcPr();//获取单元格里的<w:tcPr>
-        if (tcPr == null) {//没有<w:tcPr>,创建
-            tcPr = tc.addNewTcPr();
-        }
-
-         //  --vjc开始-->>
-        CTVerticalJc vjc = tcPr.getVAlign();//获取<w:tcPr>  的<w:vAlign w:val="center"/>
-        if (vjc == null) {//没有<w:w:vAlign/>,创建
-            vjc = tcPr.addNewVAlign();
-        }
-        //设置单元格对齐方式
-        vjc.setVal(vertical.equals("top") ? STVerticalJc.TOP : vertical.equals("bottom") ? STVerticalJc.BOTTOM : STVerticalJc.CENTER); //垂直对齐
-
-        CTShd shd = tcPr.getShd();//获取<w:tcPr>里的<w:shd w:val="clear" w:color="auto" w:fill="C00000"/>
-        if (shd == null) {//没有<w:shd>,创建
-            shd = tcPr.addNewShd();
-        }
-        // 设置背景颜色
-        shd.setFill(bgColor.substring(1));
-        //《《《《====tcPr结束====
-
-        //====p开始====》》》》
-        CTP p = tc.getPList().get(0);//获取单元格里的<w:p w:rsidR="00C36068" w:rsidRPr="00B705A0" w:rsidRDefault="00C36068" w:rsidP="00C36068">
-
-        //---ppr开始--->>>
-        CTPPr ppr = p.getPPr();//获取<w:p>里的<w:pPr>
-        if (ppr == null) {//没有<w:pPr>,创建
-            ppr = p.addNewPPr();
-        }
-        //  --jc开始-->>
-        CTJc jc = ppr.getJc();//获取<w:pPr>里的<w:jc w:val="left"/>
-        if (jc == null) {//没有<w:jc/>,创建
-            jc = ppr.addNewJc();
-        }
-        //设置单元格对齐方式
-        jc.setVal(alignment.equals("left") ? STJc.LEFT : alignment.equals("right") ? STJc.RIGHT : STJc.CENTER); //水平对齐
-        //  <<--jc结束--
-        //  --pRpr开始-->>
-        CTParaRPr pRpr = ppr.getRPr(); //获取<w:pPr>里的<w:rPr>
-        if (pRpr == null) {//没有<w:rPr>,创建
-            pRpr = ppr.addNewRPr();
-        }
-        CTFonts pfont = pRpr.getRFonts();//获取<w:rPr>里的<w:rFonts w:ascii="宋体" w:eastAsia="宋体" w:hAnsi="宋体"/>
-        if (pfont == null) {//没有<w:rPr>,创建
-            pfont = pRpr.addNewRFonts();
-        }
-        //设置字体
-        pfont.setAscii(fontName);
-        pfont.setEastAsia(fontName);
-        pfont.setHAnsi(fontName);
-
-        CTOnOff pb = pRpr.getB();//获取<w:rPr>里的<w:b/>
-        if (pb == null) {//没有<w:b/>,创建
-            pb = pRpr.addNewB();
-        }
-        //设置字体是否加粗
-        pb.setVal(fontBlod == 1 ? STOnOff.ON : STOnOff.OFF);
-
-        CTHpsMeasure psz = pRpr.getSz();//获取<w:rPr>里的<w:sz w:val="32"/>
-        if (psz == null) {//没有<w:sz w:val="32"/>,创建
-            psz = pRpr.addNewSz();
-        }
-        // 设置单元格字体大小
-        psz.setVal(bFontSize);
-        CTHpsMeasure pszCs = pRpr.getSzCs();//获取<w:rPr>里的<w:szCs w:val="32"/>
-        if (pszCs == null) {//没有<w:szCs w:val="32"/>,创建
-            pszCs = pRpr.addNewSzCs();
-        }
-        // 设置单元格字体大小
-        pszCs.setVal(bFontSize);
-        //  <<--pRpr结束--
-        //<<<---ppr结束---
-
-        //---r开始--->>>
-        List<CTR> rlist = p.getRList(); //获取<w:p>里的<w:r w:rsidRPr="00B705A0">
-        CTR r = null;
-        if (rlist != null && rlist.size() > 0) {//获取第一个<w:r>
-            r = rlist.get(0);
-        } else {//没有<w:r>,创建
-            r = p.addNewR();
-        }
-        //--rpr开始-->>
-        CTRPr rpr = r.getRPr();//获取<w:r w:rsidRPr="00B705A0">里的<w:rPr>
-        if (rpr == null) {//没有<w:rPr>,创建
-            rpr = r.addNewRPr();
-        }
-        //->-
-        CTFonts font = rpr.getRFonts();//获取<w:rPr>里的<w:rFonts w:ascii="宋体" w:eastAsia="宋体" w:hAnsi="宋体" w:hint="eastAsia"/>
-        if (font == null) {//没有<w:rFonts>,创建
-            font = rpr.addNewRFonts();
-        }
-        //设置字体
-        font.setAscii(fontName);
-        font.setEastAsia(fontName);
-        font.setHAnsi(fontName);
-
-        CTOnOff b = rpr.getB();//获取<w:rPr>里的<w:b/>
-        if (b == null) {//没有<w:b/>,创建
-            b = rpr.addNewB();
-        }
-        //设置字体是否加粗
-        b.setVal(fontBlod == 1 ? STOnOff.ON : STOnOff.OFF);
-        CTColor color = rpr.getColor();//获取<w:rPr>里的<w:color w:val="FFFFFF" w:themeColor="background1"/>
-        if (color == null) {//没有<w:color>,创建
-            color = rpr.addNewColor();
-        }
-        if(StringUtils.isNotEmpty(content)){
-    	// 设置字体颜色
-           if (content.contains("↓")) {
-               color.setVal("43CD80");
-           } else if (content.contains("↑")) {
-               color.setVal("943634");
-           } else {
-               color.setVal(fontColor.substring(1));
-           }
-        }else {
-            color.setVal(fontColor.substring(1));
-        }
-        CTHpsMeasure sz = rpr.getSz();
-        if (sz == null) {
-            sz = rpr.addNewSz();
-        }
-        sz.setVal(bFontSize);
-        CTHpsMeasure szCs = rpr.getSzCs();
-        if (szCs == null) {
-            szCs = rpr.addNewSz();
-        }
-        szCs.setVal(bFontSize);
-        //-<-
-        //<<--rpr结束--
-        List<CTText> tlist = r.getTList();
-        CTText t = null;
-        if (tlist != null && tlist.size() > 0) {//获取第一个<w:r>
-            t = tlist.get(0);
-        } else {//没有<w:r>,创建
-            t = r.addNewT();
-        }
-        content = (content != null && !content.equals("null"))? content :"";
-        t.setStringValue(content);
-        //<<<---r结束---
-    }
-
-
-    /**
-     * 获取内置表格数据,拿到第一行第一列格子数据
-     * 有时候模板设计太复杂,对于图表不能精准定位,可以通过设置图表表格数据的第一行第一列格子数据来区分,这个数据不影响图表显示,所以用来区分每个图表
-     */
-    @SuppressWarnings({ "deprecation", "resource" })
-	public static String getZeroData(POIXMLDocumentPart poixmlDocumentPart) {
-        String text = "";
-        try {
-            XWPFChart chart = (XWPFChart) poixmlDocumentPart;
-            chart.getCTChart();
-
-            POIXMLDocumentPart xlsPart = chart.getRelations().get(0);
-            InputStream xlsin = xlsPart.getPackagePart().getInputStream();
-
-            Workbook workbook = new XSSFWorkbook(xlsin);
-            // 获取第一个sheet
-            Sheet sheet = workbook.getSheetAt(0);
-            // 第一行
-            Row row = sheet.getRow(0);
-            // 第一列
-            Cell cell = row.getCell(0);
-
-            cell.setCellType(CellType.STRING);  // 设置一下格子类型为字符串,不然如果是数字或者时间的话,获取很麻烦
-            text = cell.getStringCellValue();   // 获取格子内容
-
-            System.out.println("(0,0)格子值:" + text);
-
-            // 关闭流
-            xlsin.close();
-
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-
-
-        return text;
-    }
-
-
-    /**
-     * 刷新雷达图数据方法
-     *
-     * @param typeChart
-     * @param serList
-     * @param dataList
-     * @param fldNameArr
-     * @param position
-     * @return
-     */
-    public static boolean refreshRadarStrGraphContent(Object typeChart,
-                                                      List<?> serList, List<Map<String, String>> dataList, List<String> fldNameArr, int position) {
-        boolean result = true;
-        //更新数据区域
-        for (int i = 0; i < serList.size(); i++) {
-            CTAxDataSource cat = null;
-            CTNumDataSource val = null;
-            CTRadarSer ser = ((CTRadarChart) typeChart).getSerArray(i);
-
-
-            // 设置标题 用以下这个方式,可以兼容office和wps
-            CTSerTx tx = ser.getTx();
-            tx.getStrRef().getStrCache().getPtList().get(0).setV("嘿嘿嘿");
-
-            // Category Axis Data
-            cat = ser.getCat();
-            // 获取图表的值
-            val = ser.getVal();
-
-            // strData.set
-            if (null != cat.getNumRef()) {
-                cat.unsetNumRef();
-            }
-            if (null != cat.getStrRef()) {
-                cat.unsetStrRef();
-            }
-            cat.addNewStrRef().addNewStrCache();
-
-            CTStrData strData = cat.getStrRef().getStrCache();
-            CTNumData numData = val.getNumRef().getNumCache();
-            strData.setPtArray((CTStrVal[]) null); // unset old axis text
-            numData.setPtArray((CTNumVal[]) null); // unset old values
-
-            // set model
-            long idx = 0;
-            for (int j = 0; j < dataList.size(); j++) {
-                //判断获取的值是否为空
-                String value = "0";
-                if (new BigDecimal(dataList.get(j).get(fldNameArr.get(i + position))) != null) {
-                    value = new BigDecimal(dataList.get(j).get(fldNameArr.get(i + position))).toString();
-                }
-                if (!"0".equals(value)) {
-                    CTNumVal numVal = numData.addNewPt();//序列值
-                    numVal.setIdx(idx);
-                    numVal.setV(value);
-                }
-                CTStrVal sVal = strData.addNewPt();//序列名称
-                sVal.setIdx(idx);
-                sVal.setV(dataList.get(j).get(fldNameArr.get(0)));
-                idx++;
-            }
-            strData.addNewPtCount().setVal(idx);
-            numData.getPtCount().setVal(idx);
-
-
-            //赋值横坐标数据区域
-            String axisDataRange = new CellRangeAddress(1, dataList.size(), 0, 0)
-                    .formatAsString("Sheet1", true);
-            cat.getStrRef().setF(axisDataRange);
-
-            //数据区域
-            String numDataRange = new CellRangeAddress(1, dataList.size(), i + position, i + position)
-                    .formatAsString("Sheet1", true);
-            val.getNumRef().setF(numDataRange);
-
-
-        }
-        return result;
-    }
-    /**
-     * 将输入流中的数据写入字节数组
-     * @param in
-     * @return
-     */
-    public static byte[] inputStream2ByteArray(InputStream in, boolean isClose){
-        byte[] byteArray = null;
-        try {
-            int total = in.available();
-            byteArray = new byte[total];
-            in.read(byteArray);
-        } catch (IOException e) {
-            e.printStackTrace();
-        }finally{
-            if(isClose){
-                try {
-                    in.close();
-                } catch (Exception e2) {
-                    System.out.println("关闭流失败");
-                }
-            }
-        }
-        return byteArray;
-    }
-
-}

+ 0 - 2
master/src/main/java/com/ruoyi/project/common/CommonController.java

@@ -3,8 +3,6 @@ package com.ruoyi.project.common;
 import com.alibaba.fastjson.JSON;
 import com.ruoyi.common.constant.Constants;
 import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.common.utils.export.JxlsTemplateEnum;
-import com.ruoyi.common.utils.export.JxlsView;
 import com.ruoyi.common.utils.file.FileUploadUtils;
 import com.ruoyi.common.utils.file.FileUtils;
 import com.ruoyi.framework.config.RuoYiConfig;

+ 1 - 31
master/src/main/java/com/ruoyi/project/ehs/service/impl/TJobticketServiceImpl.java

@@ -1,8 +1,6 @@
 package com.ruoyi.project.ehs.service.impl;
 
-import com.ruoyi.common.utils.DateUtils;
-import com.ruoyi.common.utils.poi.POIConstants;
-import com.ruoyi.common.utils.poi.PoiWordTools;
+
 import com.ruoyi.project.ehs.domain.TJobticket;
 import com.ruoyi.project.ehs.mapper.TJobticketMapper;
 import com.ruoyi.project.ehs.service.ITJobticketService;
@@ -109,32 +107,4 @@ public class TJobticketServiceImpl implements ITJobticketService
         return tJobticketMapper.selectTJobticketSameData(tJobticket);
     }
 
-    public void dealJobticket(XWPFDocument doc, XWPFParagraph paragraph, XWPFRun run) {
-        run.setText("", 0);
-        XmlCursor cursor = paragraph.getCTP().newCursor();
-        XWPFTable tableOne = doc.insertNewTbl(cursor);// ---这个是关键
-        // 设置表格宽度,第一行宽度就可以了,这个值的单位,目前我也还不清楚,还没来得及研究
-        tableOne.setWidth(8500);
-        // 表格第一行,对于每个列,必须使用createCell(),而不是getCell(),因为第一行嘛,肯定是属于创建的,没有create哪里来的get呢
-        XWPFTableRow tableOneRowOne = tableOne.getRow(0);// 行
-        PoiWordTools.setWordCellSelfStyle(tableOneRowOne.getCell(0), POIConstants.FONT_NAME, POIConstants.FONT_SIAZE, POIConstants.FONT_BOLD, POIConstants.ALIGNMENT, POIConstants.VERTICAL,POIConstants.FONT_COLOR, POIConstants.BG_TITLE_COLOR, POIConstants.CELL_WIDTH, "序号");
-        PoiWordTools.setWordCellSelfStyle(tableOneRowOne.createCell(), POIConstants.FONT_NAME, POIConstants.FONT_SIAZE, POIConstants.FONT_BOLD, POIConstants.ALIGNMENT,POIConstants.VERTICAL, POIConstants.FONT_COLOR, POIConstants.BG_TITLE_COLOR, POIConstants.CELL_WIDTH, "开票日期");
-        PoiWordTools.setWordCellSelfStyle(tableOneRowOne.createCell(), POIConstants.FONT_NAME, POIConstants.FONT_SIAZE, POIConstants.FONT_BOLD, POIConstants.ALIGNMENT,POIConstants.VERTICAL, POIConstants.FONT_COLOR, POIConstants.BG_TITLE_COLOR, POIConstants.CELL_WIDTH, "新票(续票)");
-        PoiWordTools.setWordCellSelfStyle(tableOneRowOne.createCell(), POIConstants.FONT_NAME, POIConstants.FONT_SIAZE, POIConstants.FONT_BOLD, POIConstants.ALIGNMENT,POIConstants.VERTICAL, POIConstants.FONT_COLOR, POIConstants.BG_TITLE_COLOR, POIConstants.CELL_WIDTH, "签发班组");
-        PoiWordTools.setWordCellSelfStyle(tableOneRowOne.createCell(), POIConstants.FONT_NAME, POIConstants.FONT_SIAZE, POIConstants.FONT_BOLD, POIConstants.ALIGNMENT,POIConstants.VERTICAL, POIConstants.FONT_COLOR, POIConstants.BG_TITLE_COLOR, POIConstants.CELL_WIDTH, "签发人");
-        PoiWordTools.setWordCellSelfStyle(tableOneRowOne.createCell(), POIConstants.FONT_NAME, POIConstants.FONT_SIAZE, POIConstants.FONT_BOLD, POIConstants.ALIGNMENT,POIConstants.VERTICAL, POIConstants.FONT_COLOR, POIConstants.BG_TITLE_COLOR, POIConstants.CELL_WIDTH, "作业票状态");
-        List<TJobticket> list = tJobticketMapper.selectTJobticketList(new TJobticket());
-        if (CollectionUtils.isNotEmpty(list)) {
-            for (int i = 0; i < list.size(); i++) {
-                // 表格第二行
-                XWPFTableRow tableOneRowTwo = tableOne.createRow();// 行
-                PoiWordTools.setWordCellSelfStyle(tableOneRowTwo.getCell(0), POIConstants.FONT_NAME, POIConstants.FONT_SIAZE, POIConstants.FONT_BOLD, POIConstants.ALIGNMENT,POIConstants.VERTICAL, POIConstants.FONT_COLOR, POIConstants.BG_COLOR, POIConstants.CELL_WIDTH, String.valueOf(i + 1));
-                PoiWordTools.setWordCellSelfStyle(tableOneRowTwo.getCell(1), POIConstants.FONT_NAME, POIConstants.FONT_SIAZE, POIConstants.FONT_BOLD, POIConstants.ALIGNMENT,POIConstants.VERTICAL, POIConstants.FONT_COLOR, POIConstants.BG_COLOR, POIConstants.CELL_WIDTH, DateUtils.parseDateToStr("yyyy-MM-dd",list.get(i).getKprq()));
-                PoiWordTools.setWordCellSelfStyle(tableOneRowTwo.getCell(2), POIConstants.FONT_NAME, POIConstants.FONT_SIAZE, POIConstants.FONT_BOLD, POIConstants.ALIGNMENT,POIConstants.VERTICAL, POIConstants.FONT_COLOR, POIConstants.BG_COLOR, POIConstants.CELL_WIDTH, list.get(i).getXpxp());
-                PoiWordTools.setWordCellSelfStyle(tableOneRowTwo.getCell(3), POIConstants.FONT_NAME, POIConstants.FONT_SIAZE, POIConstants.FONT_BOLD, POIConstants.ALIGNMENT,POIConstants.VERTICAL, POIConstants.FONT_COLOR, POIConstants.BG_COLOR, POIConstants.CELL_WIDTH, list.get(i).getQfbz());
-                PoiWordTools.setWordCellSelfStyle(tableOneRowTwo.getCell(4), POIConstants.FONT_NAME, POIConstants.FONT_SIAZE, POIConstants.FONT_BOLD, POIConstants.ALIGNMENT,POIConstants.VERTICAL, POIConstants.FONT_COLOR, POIConstants.BG_COLOR, POIConstants.CELL_WIDTH, list.get(i).getQfr());
-                PoiWordTools.setWordCellSelfStyle(tableOneRowTwo.getCell(5), POIConstants.FONT_NAME, POIConstants.FONT_SIAZE, POIConstants.FONT_BOLD, POIConstants.ALIGNMENT,POIConstants.VERTICAL, POIConstants.FONT_COLOR, POIConstants.BG_COLOR, POIConstants.CELL_WIDTH, list.get(i).getZypzt());
-            }
-        }
-    }
 }

二进制
master/src/main/resources/static/word/ticket.docx