From 373be9bd89da2c6105a212abdce9286de3adcf82 Mon Sep 17 00:00:00 2001 From: bai <1643359946@qq.com> Date: Sat, 6 Jul 2024 18:14:39 +0800 Subject: [PATCH] =?UTF-8?q?2024=E5=B9=B47=E6=9C=886=E6=97=A5=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/BlStuAnswerController.java | 8 ++++- .../service/impl/BlStuAnswerServiceImpl.java | 29 +++++++++++++------ .../jeecg/modules/tools/word/ExportWord.java | 4 +++ 3 files changed, 31 insertions(+), 10 deletions(-) diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/blStuAnswer/controller/BlStuAnswerController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/blStuAnswer/controller/BlStuAnswerController.java index 12eaabb..8b5b5b6 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/blStuAnswer/controller/BlStuAnswerController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/blStuAnswer/controller/BlStuAnswerController.java @@ -184,6 +184,12 @@ public class BlStuAnswerController extends JeecgController map){ + return getRadarChart(map, "100", "单位:%"); + } + public String getRadarChart(Map map) { return getRadarChart(map, "5", "单位:分"); @@ -703,7 +707,14 @@ public class BlStuAnswerServiceImpl extends ServiceImpl { + let l = String(v).split('');let r = ''; + l.forEach((x,i) => { if((i+1) %% 12 == 0){ r += x + '\\n'; } else { r += x; } }); + return r; + } + }, }, series: [ { @@ -1170,7 +1181,7 @@ public class BlStuAnswerServiceImpl extends ServiceImpl result, String id) { var list = baseMapper.i2_6(id); if(list != null && !list.isEmpty()){ - String imagePath = getRadarChart(list.get(0)); + String imagePath = getRadarChart100(list.get(0)); result.put("i2_6", imagePath); } } @@ -1342,7 +1353,7 @@ public class BlStuAnswerServiceImpl extends ServiceImpl result, String id) { var list = baseMapper.i2_18(id); if(list != null && !list.isEmpty()){ - String imagePath = getRadarChart(list.get(0)); + String imagePath = getRadarChart100(list.get(0)); result.put("i2_18", imagePath); } } @@ -1413,7 +1424,7 @@ public class BlStuAnswerServiceImpl extends ServiceImpl result, String id) { var list = baseMapper.i2_23(id); if(list != null && !list.isEmpty()){ - String imagePath = getRadarChart(list.get(0)); + String imagePath = getRadarChart100(list.get(0)); result.put("i2_23", imagePath); } } @@ -1471,7 +1482,7 @@ public class BlStuAnswerServiceImpl extends ServiceImpl result, String id) { var list = baseMapper.i2_27(id); if(list != null && !list.isEmpty()){ - String imagePath = getRadarChart(list.get(0)); + String imagePath = getRadarChart100(list.get(0)); result.put("i2_27", imagePath); } } @@ -1565,7 +1576,7 @@ public class BlStuAnswerServiceImpl extends ServiceImpl result, String id) { var list = baseMapper.i2_34(id); if(list != null && !list.isEmpty()){ - String imagePath = getRadarChart(list.get(0)); + String imagePath = getRadarChart100(list.get(0)); result.put("i2_34", imagePath); } } @@ -1621,7 +1632,7 @@ public class BlStuAnswerServiceImpl extends ServiceImpl result, String id) { var list = baseMapper.i3_2(id); if(list != null && !list.isEmpty()){ - String imagePath = getRadarChart(list.get(0)); + String imagePath = getRadarChart100(list.get(0)); result.put("i3_2", imagePath); } } @@ -1892,7 +1903,7 @@ public class BlStuAnswerServiceImpl extends ServiceImpl result, String id) { var list = baseMapper.i4_9(id); if(list != null && !list.isEmpty()){ - String imagePath = getRadarChart(list.get(0)); + String imagePath = getRadarChart100(list.get(0)); result.put("i4_9", imagePath); } } @@ -1953,7 +1964,7 @@ public class BlStuAnswerServiceImpl extends ServiceImpl result, String id) { var list = baseMapper.i4_13(id); if(list != null && !list.isEmpty()){ - String imagePath = getRadarChart(list.get(0)); + String imagePath = getRadarChart100(list.get(0)); result.put("i4_13", imagePath); } } diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/tools/word/ExportWord.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/tools/word/ExportWord.java index 05bcb68..c5ac178 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/tools/word/ExportWord.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/tools/word/ExportWord.java @@ -73,6 +73,10 @@ public class ExportWord { return new WordOperator(is); } +// public static String getWordPathToLocalFile(String biz){ +// +// } + /** * 下载生成的word文档 * @param request 请求