xiaofei пре 6 дана
родитељ
комит
a563f76c59

+ 2 - 1
teachcloud-common/src/main/java/com/qmth/teachcloud/common/threadPool/DynamicMyThreadPool.java

@@ -108,7 +108,8 @@ public class DynamicMyThreadPool extends ThreadPoolTaskExecutor {
         if (Objects.isNull(dynamicThreadPoolTaskExecutor)) {
         if (Objects.isNull(dynamicThreadPoolTaskExecutor)) {
             log.info(">>>>>>>>>>>> thread-pool【{}】start init >>>>>>>>>>>>", this.getThreadNamePrefix());
             log.info(">>>>>>>>>>>> thread-pool【{}】start init >>>>>>>>>>>>", this.getThreadNamePrefix());
             this.dynamicThreadPoolTaskExecutor = new DynamicMyThreadPool();
             this.dynamicThreadPoolTaskExecutor = new DynamicMyThreadPool();
-            this.dynamicThreadPoolTaskExecutor.setCorePoolSize(initCoreSize);//核心线程数
+            int count = Math.abs(cpuNum / 2);
+            this.dynamicThreadPoolTaskExecutor.setCorePoolSize(count > 0 ? count : 1);//核心线程数
             this.dynamicThreadPoolTaskExecutor.setMaxPoolSize(this.dynamicThreadPoolTaskExecutor.getCorePoolSize() * 2);//最大线程数
             this.dynamicThreadPoolTaskExecutor.setMaxPoolSize(this.dynamicThreadPoolTaskExecutor.getCorePoolSize() * 2);//最大线程数
             this.dynamicThreadPoolTaskExecutor.setKeepAliveSeconds(SystemConstant.THREAD_POOL_KEEP_ALIVE_SECONDS);//线程空闲时间
             this.dynamicThreadPoolTaskExecutor.setKeepAliveSeconds(SystemConstant.THREAD_POOL_KEEP_ALIVE_SECONDS);//线程空闲时间
             this.dynamicThreadPoolTaskExecutor.setQueueCapacity(SystemConstant.THREAD_POOL_QUEUE_CAPACITY);//队列容量
             this.dynamicThreadPoolTaskExecutor.setQueueCapacity(SystemConstant.THREAD_POOL_QUEUE_CAPACITY);//队列容量

+ 0 - 1
teachcloud-common/src/main/java/com/qmth/teachcloud/common/util/Zip4jUtil.java

@@ -174,7 +174,6 @@ public class Zip4jUtil {
             parameters.setCompressionLevel(CompressionLevel.NORMAL);
             parameters.setCompressionLevel(CompressionLevel.NORMAL);
             // 生成的压缩文件
             // 生成的压缩文件
             ZipFile zipFile;
             ZipFile zipFile;
-            password = null;
             if (Objects.nonNull(password)) {
             if (Objects.nonNull(password)) {
                 parameters.setEncryptFiles(true);
                 parameters.setEncryptFiles(true);
                 parameters.setEncryptionMethod(EncryptionMethod.AES);
                 parameters.setEncryptionMethod(EncryptionMethod.AES);

+ 1 - 1
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkServiceImpl.java

@@ -1883,7 +1883,7 @@ public class MarkServiceImpl implements MarkService {
         if (CollectionUtils.isEmpty(markOcrStudentQuestionList)) {
         if (CollectionUtils.isEmpty(markOcrStudentQuestionList)) {
             return null;
             return null;
         }
         }
-        return markOcrStudentQuestionList.stream().filter(m -> StringUtils.isNotBlank(m.getOcrContent())).map(MarkOcrStudentQuestion::getOcrContent).collect(Collectors.joining(SystemConstant.COMMA_OF_CHINESE));
+        return markOcrStudentQuestionList.stream().filter(m -> StringUtils.isNotBlank(m.getOcrContent())).map(MarkOcrStudentQuestion::getOcrContent).collect(Collectors.joining(""));
     }
     }
 
 
     private void ocrStudentQuestionResult(BasicSchool basicSchool, Long studentId, Long questionId) {
     private void ocrStudentQuestionResult(BasicSchool basicSchool, Long studentId, Long questionId) {

+ 4 - 14
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkStudentServiceImpl.java

@@ -1537,20 +1537,10 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
             log.debug("导出Excel开始...");
             log.debug("导出Excel开始...");
             ExcelWriter writer = ExcelWriter.create(ExcelType.XLSX);
             ExcelWriter writer = ExcelWriter.create(ExcelType.XLSX);
             writer.writeDataArrays("成绩单", null, columnNames, columnValues.listIterator());
             writer.writeDataArrays("成绩单", null, columnNames, columnValues.listIterator());
-            FileOutputStream outputStream = new FileOutputStream(downloadFilePath + File.separator + new String((basicCourse.getName() + "-成绩单").getBytes("UTF-8"), "ISO-8859-1") + SystemConstant.EXCEL_PREFIX);
-//            Path filePath = Paths.get(downloadFilePath, "111" + SystemConstant.EXCEL_PREFIX);
-//            Path basePath = Paths.get(downloadFilePath);  // 纯ASCII路径
-//            Path filePath = basePath.resolve(basicCourse.getName() + "-成绩单" + SystemConstant.EXCEL_PREFIX);  // 添加中文部分
-//            System.out.println("LANG: " + System.getenv("LANG"));
-//            System.out.println("File Encoding: " + System.getProperty("file.encoding"));
-//            Path filePath = Paths.get(
-//                    downloadFilePath,
-//                    new String((basicCourse.getName() + "-成绩单" + SystemConstant.EXCEL_PREFIX).getBytes("UTF-8"), StandardCharsets.UTF_8)
-//            );
-//            OutputStream outputStream = Files.newOutputStream(filePath, StandardOpenOption.CREATE, StandardOpenOption.WRITE);
-            writer.output(outputStream);
-            outputStream.flush();
-            outputStream.close();
+            FileOutputStream fileOut = new FileOutputStream(downloadFilePath + File.separator + basicCourse.getName() + "-成绩单" + SystemConstant.EXCEL_PREFIX);
+            writer.output(fileOut);
+            fileOut.flush();
+            fileOut.close();
 
 
             // 通过教学班聚合
             // 通过教学班聚合
             Map<Object, List<CellValue[]>> listMap = columnValues.stream().collect(Collectors.groupingBy(m -> getCellValueFieldValue("value", m[3])));
             Map<Object, List<CellValue[]>> listMap = columnValues.stream().collect(Collectors.groupingBy(m -> getCellValueFieldValue("value", m[3])));