8 Commits 3663474106 ... a7ac0cdbb4

Author SHA1 Message Date
  superb a7ac0cdbb4 档案进三个数据库,但是代码是屎山,等待优化中 1 year ago
  superb a2fedf54dc Merge remote-tracking branch 'origin/wheng' into superb 1 year ago
  superb c150d9c3c3 档案 1 year ago
  wuheng a330df139f 保存档案 1 year ago
  wuheng 18c8178b43 完善 上传文件处理 1 year ago
  wuheng be50a3c29b 完善文件管理类 1 year ago
  wuheng 0ab301b5bf date 1 year ago
  zengzhuoyue 122f65fe82 Merge branch 'superb' of wuheng/eas-system into master 1 year ago
44 changed files with 991 additions and 285 deletions
  1. 31 0
      common/src/main/java/com/koobietech/eas/common/constant/FileType.java
  2. 31 0
      common/src/main/java/com/koobietech/eas/common/constant/FileTypeExt.java
  3. 20 0
      common/src/main/java/com/koobietech/eas/common/utils/DateUtils.java
  4. 287 37
      common/src/main/java/com/koobietech/eas/common/utils/FileManager.java
  5. 4 1
      common/src/test/java/com/koobietech/eas/common/utils/PasswordManagerTest.java
  6. 3 6
      controller/src/main/java/com/koobietech/eas/controller/EasStuProfileController.java
  7. 3 1
      controller/src/main/resources/application-dev.yaml
  8. 2 0
      controller/src/main/resources/application-local.yaml
  9. 2 0
      controller/src/main/resources/application-wheng.yaml
  10. 2 0
      controller/src/main/resources/application.yaml
  11. BIN
      controller/src/main/resources/temp/StuRegistTemp.docx
  12. BIN
      controller/src/main/resources/temp/~$uRegistTemp.docx
  13. 15 8
      controller/src/test/java/com/koobietech/eas/controller/ControllerApplicationTests.java
  14. 19 0
      dao/src/main/java/com/koobietech/eas/dao/dto/ArchivesDto.java
  15. 4 3
      mbg/src/main/java/com/koobietech/eas/mbg/CommentGenerator.java
  16. 15 15
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasArcArchives.java
  17. 34 24
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasArcArchivesExample.java
  18. 7 7
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasArcArctype.java
  19. 7 7
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasArcTlsAttendance.java
  20. 5 5
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasArcTlsScores.java
  21. 32 15
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasArcTlsStudents.java
  22. 70 0
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasArcTlsStudentsExample.java
  23. 5 5
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasEduCategory.java
  24. 2 2
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasEduClaRelation.java
  25. 4 4
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasEduClass.java
  26. 7 7
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasEduClassroom.java
  27. 2 2
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasEduCltRelation.java
  28. 5 5
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasEduSchedule.java
  29. 5 5
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasEduSubjects.java
  30. 1 1
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasSysDepRelation.java
  31. 8 8
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasSysDepartment.java
  32. 5 5
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasSysLogs.java
  33. 5 5
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasSysPermission.java
  34. 1 1
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasSysPesRelation.java
  35. 11 11
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasSysStudent.java
  36. 2 2
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasSysUniversity.java
  37. 9 9
      mbg/src/main/java/com/koobietech/eas/mbg/model/EasSysUserinfo.java
  38. 14 14
      mbg/src/main/resources/com/koobietech/eas/mbg/mapper/EasArcArchivesMapper.xml
  39. 20 5
      mbg/src/main/resources/com/koobietech/eas/mbg/mapper/EasArcTlsStudentsMapper.xml
  40. 9 1
      mbg/src/main/resources/generatorConfig.xml
  41. 62 0
      service/src/main/java/com/koobietech/eas/service/EasArchivesFilesService.java
  42. 1 1
      service/src/main/java/com/koobietech/eas/service/EasStuProfileService.java
  43. 79 0
      service/src/main/java/com/koobietech/eas/service/impl/EasArchivesFilesServiceImpl.java
  44. 141 63
      service/src/main/java/com/koobietech/eas/service/impl/EasStuProfileServiceImpl.java

+ 31 - 0
common/src/main/java/com/koobietech/eas/common/constant/FileType.java

@@ -0,0 +1,31 @@
+package com.koobietech.eas.common.constant;
+
+public enum FileType {
+    IMAGE("20"),
+    VIDEO("30"),
+    AUDIO("40"),
+    XLSX("50"),
+    DOCX("51"),
+    PNG("21"),
+    JPEG("22"),
+    ZIP("60"),
+    RAR("61"),
+    MP4("41"),
+    MP3("42"),
+    PDF("80"),
+    FILE("70");
+
+    private String value;
+
+    FileType(String value) {
+        this.value = value;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+}

+ 31 - 0
common/src/main/java/com/koobietech/eas/common/constant/FileTypeExt.java

@@ -0,0 +1,31 @@
+package com.koobietech.eas.common.constant;
+
+public enum FileTypeExt {
+    IMAGE(".jpeg"),
+    VIDEO(".mp4"),
+    AUDIO(".mp3"),
+    XLSX(".xlsx"),
+    DOCX(".docx"),
+    PNG(".png"),
+    JPEG(".jpeg"),
+    ZIP(".zip"),
+    RAR(".rar"),
+    MP4(".mp4"),
+    MP3(".mp3"),
+    PDF(".pdf"),
+    FILE(".file");
+
+    private String value;
+
+    FileTypeExt(String value) {
+        this.value = value;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+}

+ 20 - 0
common/src/main/java/com/koobietech/eas/common/utils/DateUtils.java

@@ -0,0 +1,20 @@
+package com.koobietech.eas.common.utils;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+public class DateUtils {
+    public static String convertToYearMonthDay(Date date) {
+        SimpleDateFormat outputFormat = new SimpleDateFormat("yyyy-MM-dd");
+        return outputFormat.format(date);
+    }
+
+    public static Date convertToYearMonthDayToDate(Date date) {
+        SimpleDateFormat outputFormat = new SimpleDateFormat("yyyy-MM-dd");
+        try {
+            return outputFormat.parse(outputFormat.format(date));
+        } catch (ParseException e) {}
+        return null;
+    }
+}

+ 287 - 37
common/src/main/java/com/koobietech/eas/common/utils/FileManager.java

@@ -1,10 +1,176 @@
 package com.koobietech.eas.common.utils;
 
 import org.apache.poi.xwpf.usermodel.XWPFDocument;
+import org.springframework.stereotype.Component;
 
 import java.io.*;
+import java.nio.channels.FileChannel;
+import java.nio.file.*;
+import java.text.DecimalFormat;
 
+@Component
 public class FileManager {
+
+    String separator = File.separator ;
+
+    /**********************************
+     * 文件夹 操作 工具类
+     ***********************************/
+
+    /**
+     * 获取文件夹大小
+     */
+    public Double getFolderSize(String sizePath) {
+        Double size = 0.0;
+        Path folderPath = Paths.get(sizePath);
+        try {
+            DirectoryStream<Path> stream = Files.newDirectoryStream(folderPath);
+            for (Path path : stream) {
+                if (Files.isRegularFile(path)) {
+                    size += Files.size(path);
+                } else if (Files.isDirectory(path)) {
+                    size += getFolderSize(path.toFile().getAbsolutePath());
+                }
+            }
+        } catch (IOException e) {}
+        if ( size > 0  ) {
+            size = size / 1024 / 1024 ;
+            DecimalFormat df = new DecimalFormat("#.####");
+            String result = df.format(size);
+            return Double.valueOf(result);
+        } else {
+            return  0.0;
+        }
+    }
+
+    /**
+     * 移动文件夹
+     * @param oldPath 源文件夹路径
+     * @param newPath 目标文件夹路径
+     */
+    public boolean moveFolder(String oldPath, String newPath) {
+        File sourceFolder = new File(oldPath);
+        //把源文件转移到目标文件夹下
+        File targetFolder = new File(newPath, sourceFolder.getName());
+        if (!sourceFolder.exists() || sourceFolder.isFile()) {
+            return false;
+        }
+        if (sourceFolder.isDirectory()) {
+            if (!targetFolder.exists()) {
+                targetFolder.mkdir();
+            }
+            File[] files = sourceFolder.listFiles();
+            if (files != null) {
+                for (File file : files) {
+                    if ( file.isFile() ) {
+                        try {
+                            FileChannel sourceChannel = new FileInputStream(file).getChannel();
+                            FileChannel destChannel = new FileOutputStream(new File(targetFolder.getPath(), file.getName())).getChannel();
+                            destChannel.transferFrom(sourceChannel, 0, sourceChannel.size());
+                            sourceChannel.close();
+                            file.delete();
+                        } catch (IOException e) {
+                            e.printStackTrace();
+                        }
+                    } else {
+                        moveFolder(file.getPath(), new File(targetFolder.getPath(), file.getName()).getPath());
+                    }
+                }
+            }
+            sourceFolder.delete();
+        }
+        return true;
+    }
+
+    /**
+     * 复制文件夹
+     * @param oldPath
+     * @param newPath
+     * @return
+     */
+    public boolean copyFolder(String oldPath, String newPath, Boolean replaceFile) {
+        File sourceFolder = new File(oldPath);
+        File destFolder = new File(newPath);
+        if (sourceFolder.isFile()) {
+            return false;
+        }
+        if (!sourceFolder.exists()) {
+            return false;
+        }
+        if (!destFolder.exists()) {
+            destFolder.mkdir();
+        }
+        File[] files = sourceFolder.listFiles();
+        if (files != null) {
+            for (File file : files) {
+                if (file.isFile()) {
+                    copyFile(file.getPath(), new File(newPath, file.getName()).getPath(), replaceFile);
+                } else if (file.isDirectory()) {
+                    copyFolder(file.getPath(), new File(newPath + separator + file.getName()).getPath(), replaceFile);
+                }
+            }
+        }
+        return true;
+    }
+
+    /**
+     * 创建文件夹
+     * @param path
+     * @return
+     */
+    public boolean createPath(String path){
+        File file = new File(path);
+        if (!file.exists()){
+            file.mkdirs();
+        }
+        return true;
+    }
+
+    /**
+     * 判断文件夹是否存在
+     * @param folderPath
+     * @return
+     */
+    public boolean isFolderExists(String folderPath){
+        return isFileExists(folderPath);
+    }
+
+    /**
+     * 删除文件夹
+     * @param folderPath
+     * @return
+     */
+    public boolean deleteFolder(String folderPath){
+        File fileFolder = new File(folderPath);
+        if ( fileFolder != null && fileFolder.exists() ){
+            if ( fileFolder.isDirectory() ){
+                File[] files = fileFolder.listFiles();
+                for (File file : files) {
+                    if ( file.isDirectory() ){
+                        deleteFolder(file.getAbsolutePath());
+                    } else {
+                        file.delete();
+                    }
+                }
+            }
+            fileFolder.delete();
+        } else {
+            return false;
+        }
+        return true;
+    }
+
+
+    /**********************************
+     * Document 操作 工具类
+     ***********************************/
+
+    /**
+     * 保存 Document 文档
+     * @param document
+     * @param savePath
+     * @return
+     */
     public boolean saveDocument(XWPFDocument document, String savePath){
         boolean ret = true;
         FileOutputStream fileOutputStream = null;
@@ -21,18 +187,68 @@ public class FileManager {
         return ret;
     }
 
+    /**
+     * 保存 Document 文档
+     * @param document
+     * @param savePath
+     * @param fileName
+     * @return
+     */
     public boolean saveDocument(XWPFDocument document, String savePath, String fileName){
         return saveDocument(document, savePath + fileName);
     }
 
-    public boolean createPath(String path){
-        File file = new File(path);
-        if (!file.exists()){
-            file.mkdirs();
-        }
-        return true;
+    /**********************************
+     * 文件 操作 工具类
+     ***********************************/
+
+    /**
+     * 判断文件是否可读
+     * @param filePath
+     * @return
+     */
+    public boolean isFileCanRead(String filePath){
+        File file = new File(filePath);
+        return file.canRead();
+    }
+
+    /**
+     * 判断文件是否可写
+     * @param filePath
+     * @return
+     */
+    public boolean isFileCanWrite(String filePath){
+        File file = new File(filePath);
+        return file.canWrite();
     }
 
+    /**
+     * 判断文件是否存在
+     * @param filePath
+     * @return
+     */
+    public boolean isFileExists(String filePath){
+        File file = new File(filePath);
+        return file.exists();
+    }
+
+    /**
+     * 保存 文件
+     * @param stream
+     * @param savePath
+     * @param fileName
+     * @return
+     */
+    public boolean saveFile(InputStream  stream, String savePath, String fileName) {
+        return saveFile(stream, savePath + fileName);
+    }
+
+    /**
+     * 保存 文件
+     * @param stream
+     * @param savePath
+     * @return
+     */
     public boolean saveFile(InputStream stream, String savePath){
         FileOutputStream fileOutputStream = null;
         try {
@@ -43,7 +259,7 @@ public class FileManager {
                 fileOutputStream.write(bytesRead);
             }
         } catch (IOException e) {
-            e.printStackTrace();
+            return  false;
         } finally {
             try {
                 fileOutputStream.close();
@@ -52,44 +268,78 @@ public class FileManager {
         return true;
     }
 
-    public boolean saveFile(InputStream  stream, String savePath, String fileName) {
-        return saveFile(stream, savePath + fileName);
-    }
-
-    public boolean isFileExists(String filePath){
-        File file = new File(filePath);
-        return file.exists();
-    }
-
+    /**
+     * 删除文件
+     * @param filePath
+     * @return
+     */
     public boolean deleteFile(String filePath){
         File file = new File(filePath);
         return file.delete();
     }
 
-    public boolean isFolderExists(String folderPath){
-        File file = new File(folderPath);
-        return file.exists();
-    }
-
-    public boolean createFolder(String folderPath){
-        File file = new File(folderPath);
-        return file.mkdirs();
-    }
-
-    public boolean deleteFolder(String folderPath){
-        File file = new File(folderPath);
-        return file.delete();
+    /**
+     * 复制文件
+     * @param srcFile 源文件路径
+     * @param destFile 目标文件路径
+     * @return
+     */
+    public boolean copyFile(String srcFile, String destFile, Boolean replaceFile){
+        Path srcFilePath = Paths.get(srcFile);
+        Path destFilePath = Paths.get(destFile);
+        try {
+            if (replaceFile) {
+                Files.copy(srcFilePath, destFilePath, StandardCopyOption.REPLACE_EXISTING);
+            } else {
+                Files.copy(srcFilePath, destFilePath, StandardCopyOption.COPY_ATTRIBUTES);
+            }
+        } catch (IOException e) {
+            return false;
+        }
+        return true;
     }
 
-    public boolean copyFile(String srcFilePath, String destFilePath){
-        File srcFile = new File(srcFilePath);
-        File destFile = new File(destFilePath);
-        return srcFile.renameTo(destFile);
+    /**
+     * 移动文件
+     * @param srcFilePath 源文件路径
+     * @param destFilePath 目标文件路径
+     * @return
+     */
+    public boolean moveFile(String srcFilePath, String destFilePath, Boolean replaceFile){
+        Path srcFile = Paths.get(srcFilePath);
+        Path destFile = Paths.get(destFilePath);
+        try {
+            if (replaceFile) {
+                Files.move(srcFile, destFile, StandardCopyOption.REPLACE_EXISTING);
+            } else {
+                Files.move(srcFile, destFile, StandardCopyOption.REPLACE_EXISTING);
+            }
+        } catch (IOException e) {
+            return false;
+        }
+        return true;
     }
 
-    public boolean moveFile(String srcFilePath, String destFilePath){
-        File srcFile = new File(srcFilePath);
-        File destFile = new File(destFilePath);
-        return srcFile.renameTo(destFile);
+    /**
+     * 获取文件大小
+     * @param filePath 文件路径
+     * @return
+     */
+    public Double getFileSize(String filePath) {
+        Double size = 0.0;
+        Path folderPath = Paths.get(filePath);
+        if (Files.isRegularFile(folderPath)) {
+            try {
+                size += Files.size(folderPath);
+            } catch (IOException e) {}
+        }
+        if ( size > 0.0  ) {
+            size = size / 1024 / 1024 ;
+            DecimalFormat df = new DecimalFormat("#.####");
+            String result = df.format(size);
+            return Double.valueOf(result);
+        } else {
+            return  0.0;
+        }
     }
 }

+ 4 - 1
common/src/test/java/com/koobietech/eas/common/utils/PasswordManagerTest.java

@@ -1,13 +1,16 @@
 package com.koobietech.eas.common.utils;
 
 
+import java.util.Date;
+
 class PasswordManagerTest {
 
 
 
     public static void main(String[] args) {
 
-
+        String property = System.getProperty("user.dir");
+        System.out.println( property );
 
     }
 

+ 3 - 6
controller/src/main/java/com/koobietech/eas/controller/EasStuProfileController.java

@@ -4,10 +4,7 @@ package com.koobietech.eas.controller;
 import com.koobietech.eas.common.result.JsonResult;
 import com.koobietech.eas.mbg.model.EasArcTlsStudents;
 import com.koobietech.eas.service.EasStuProfileService;
-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;
+import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import java.io.FileNotFoundException;
@@ -19,9 +16,9 @@ public class EasStuProfileController {
     private EasStuProfileService easStuProfileService;
 
     @PostMapping("/StuProfileDownload")
-    public JsonResult StuProfileDownload(@RequestBody  EasArcTlsStudents easArcTlsStudents) throws FileNotFoundException {
+    public JsonResult StuProfileDownload(@RequestBody  EasArcTlsStudents easArcTlsStudents,@RequestParam Integer manager_id) throws FileNotFoundException {
 
-        return easStuProfileService.StuProfileDownload(easArcTlsStudents);
+        return easStuProfileService.StuProfileDownload(easArcTlsStudents,manager_id);
     }
 
 

+ 3 - 1
controller/src/main/resources/application-dev.yaml

@@ -27,4 +27,6 @@ knife4j:
     language: zh_cn
 logging:
   level:
-    com.koobietech.eas.*: TRACE
+    com.koobietech.eas.*: TRACE
+project:
+  path: ${user.home}/archivesFiles

+ 2 - 0
controller/src/main/resources/application-local.yaml

@@ -28,3 +28,5 @@ knife4j:
 logging:
   level:
     com.koobietech.eas.*: TRACE
+project:
+  path: ${user.home}/archivesFiles

+ 2 - 0
controller/src/main/resources/application-wheng.yaml

@@ -28,3 +28,5 @@ knife4j:
 logging:
   level:
     com.koobietech.eas.*: TRACE
+project:
+  path: ${user.home}/archivesFiles

+ 2 - 0
controller/src/main/resources/application.yaml

@@ -51,3 +51,5 @@ aj:
     req-get-minute-limit: 30
     req-check-minute-limit: 60
     req-verify-minute-limit: 60
+project:
+  path: ${user.home}/archivesFiles

BIN
controller/src/main/resources/temp/StuRegistTemp.docx


BIN
controller/src/main/resources/temp/~$uRegistTemp.docx


+ 15 - 8
controller/src/test/java/com/koobietech/eas/controller/ControllerApplicationTests.java

@@ -31,19 +31,26 @@ import java.util.*;
 @SpringBootTest
 class ControllerApplicationTests {
 
+    @Value("${project.path}")
+    String archivesSavePath;
 
     @Test
     void test() {
-        System.out.println(StudentArchiveGenerator.generateStudentCode(
-                "2211",
-                "232126198703194770", "12016", "2020"
-        ));
+
         System.out.println(
-                StudentArchiveGenerator.generateArchiveCode(
-                        "ST2211XE6EE36M202412016",
-                        "20"
-                )
+                archivesSavePath
         );
+
+//        System.out.println(StudentArchiveGenerator.generateStudentCode(
+//                "2211",
+//                "232126198703194770", "12016", "2020"
+//        ));
+//        System.out.println(
+//                StudentArchiveGenerator.generateArchiveCode(
+//                        "ST2211XE6EE36M202412016",
+//                        "20"
+//                )
+//        );
     }
 
 

+ 19 - 0
dao/src/main/java/com/koobietech/eas/dao/dto/ArchivesDto.java

@@ -0,0 +1,19 @@
+package com.koobietech.eas.dao.dto;
+
+import lombok.Data;
+
+@Data
+public class ArchivesDto {
+    private String archiveCode;
+    private String path;
+    private boolean status;
+
+    private String fileType;
+
+    public ArchivesDto(String path, boolean status, String archiveCode, String fileType) {
+        this.archiveCode = archiveCode;
+        this.path = path;
+        this.status = status;
+        this.fileType = fileType;
+    }
+}

+ 4 - 3
mbg/src/main/java/com/koobietech/eas/mbg/CommentGenerator.java

@@ -18,7 +18,7 @@ public class CommentGenerator extends DefaultCommentGenerator {
     private static final String EXAMPLE_SUFFIX="Example";
     private static final String API_MODEL_PROPERTY_FULL_CLASS_NAME="io.swagger.v3.oas.annotations.media.Schema";
 
-    private static final String COM_FASTERXML_JACKSON_NAME="com.fasterxml.jackson.annotation.JsonFormat";
+    private static final String API_DATE_TIME_FORMAT="com.fasterxml.jackson.annotation.JsonFormat";
 
     /**
      * 设置用户配置的参数
@@ -46,8 +46,9 @@ public class CommentGenerator extends DefaultCommentGenerator {
             //给model的字段添加swagger注解
             field.addJavaDocLine("@Schema(description = \""+remarks+"\")");
             //如果字段是时间类型 则加JsonFormat注解
+            System.out.println("字段类型:"+field.getType().getFullyQualifiedName());
             if("java.util.Date".equals(field.getType().getFullyQualifiedName())){
-                field.addJavaDocLine("@JsonFormat(pattern = \"yyyy-MM-dd HH:mm:ss\", timezone = \"GMT+8\")");
+                field.addJavaDocLine("@JsonFormat(pattern = \"yyyy-MM-dd HH:mm\", timezone = \"GMT+8\")");
             }
         }
     }
@@ -73,7 +74,7 @@ public class CommentGenerator extends DefaultCommentGenerator {
         //只在model中添加swagger注解类的导入
         if(!compilationUnit.getType().getFullyQualifiedName().contains(EXAMPLE_SUFFIX)){
             compilationUnit.addImportedType(new FullyQualifiedJavaType(API_MODEL_PROPERTY_FULL_CLASS_NAME));
-            compilationUnit.addImportedType(new FullyQualifiedJavaType(COM_FASTERXML_JACKSON_NAME));
+            compilationUnit.addImportedType(new FullyQualifiedJavaType(API_DATE_TIME_FORMAT));
         }
     }
 }

+ 15 - 15
mbg/src/main/java/com/koobietech/eas/mbg/model/EasArcArchives.java

@@ -33,12 +33,12 @@ public class EasArcArchives implements Serializable {
     private String filePath;
 
     /**
-     * 文件类型Id
+     * 文件类型
      *
      * @mbg.generated
      */
-    @Schema(description = "文件类型Id")
-    private Integer arctypeId;
+    @Schema(description = "文件类型")
+    private String arctype;
 
     /**
      * 创建时间
@@ -46,7 +46,7 @@ public class EasArcArchives implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "创建时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date createTime;
 
     /**
@@ -55,7 +55,7 @@ public class EasArcArchives implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "修改时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date modifyTime;
 
     /**
@@ -64,7 +64,7 @@ public class EasArcArchives implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "档案有效期截至时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date validityTime;
 
     /**
@@ -81,7 +81,7 @@ public class EasArcArchives implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "档案创建时间, 用于文件归档用")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date createDate;
 
     /**
@@ -107,7 +107,7 @@ public class EasArcArchives implements Serializable {
     }
 
     public void setArchiveNumber(String archiveNumber) {
-        this.archiveNumber = archiveNumber;
+        this.archiveNumber = archiveNumber == null ? null : archiveNumber.trim();
     }
 
     public String getStudentNumber() {
@@ -115,7 +115,7 @@ public class EasArcArchives implements Serializable {
     }
 
     public void setStudentNumber(String studentNumber) {
-        this.studentNumber = studentNumber;
+        this.studentNumber = studentNumber == null ? null : studentNumber.trim();
     }
 
     public String getFilePath() {
@@ -123,15 +123,15 @@ public class EasArcArchives implements Serializable {
     }
 
     public void setFilePath(String filePath) {
-        this.filePath = filePath;
+        this.filePath = filePath == null ? null : filePath.trim();
     }
 
-    public Integer getArctypeId() {
-        return arctypeId;
+    public String getArctype() {
+        return arctype;
     }
 
-    public void setArctypeId(Integer arctypeId) {
-        this.arctypeId = arctypeId;
+    public void setArctype(String arctype) {
+        this.arctype = arctype == null ? null : arctype.trim();
     }
 
     public Date getCreateTime() {
@@ -192,7 +192,7 @@ public class EasArcArchives implements Serializable {
         sb.append(", archiveNumber=").append(archiveNumber);
         sb.append(", studentNumber=").append(studentNumber);
         sb.append(", filePath=").append(filePath);
-        sb.append(", arctypeId=").append(arctypeId);
+        sb.append(", arctype=").append(arctype);
         sb.append(", createTime=").append(createTime);
         sb.append(", modifyTime=").append(modifyTime);
         sb.append(", validityTime=").append(validityTime);

+ 34 - 24
mbg/src/main/java/com/koobietech/eas/mbg/model/EasArcArchivesExample.java

@@ -402,63 +402,73 @@ public class EasArcArchivesExample {
             return (Criteria) this;
         }
 
-        public Criteria andArctypeIdIsNull() {
-            addCriterion("arctype_id is null");
+        public Criteria andArctypeIsNull() {
+            addCriterion("arctype is null");
             return (Criteria) this;
         }
 
-        public Criteria andArctypeIdIsNotNull() {
-            addCriterion("arctype_id is not null");
+        public Criteria andArctypeIsNotNull() {
+            addCriterion("arctype is not null");
             return (Criteria) this;
         }
 
-        public Criteria andArctypeIdEqualTo(Integer value) {
-            addCriterion("arctype_id =", value, "arctypeId");
+        public Criteria andArctypeEqualTo(String value) {
+            addCriterion("arctype =", value, "arctype");
             return (Criteria) this;
         }
 
-        public Criteria andArctypeIdNotEqualTo(Integer value) {
-            addCriterion("arctype_id <>", value, "arctypeId");
+        public Criteria andArctypeNotEqualTo(String value) {
+            addCriterion("arctype <>", value, "arctype");
             return (Criteria) this;
         }
 
-        public Criteria andArctypeIdGreaterThan(Integer value) {
-            addCriterion("arctype_id >", value, "arctypeId");
+        public Criteria andArctypeGreaterThan(String value) {
+            addCriterion("arctype >", value, "arctype");
             return (Criteria) this;
         }
 
-        public Criteria andArctypeIdGreaterThanOrEqualTo(Integer value) {
-            addCriterion("arctype_id >=", value, "arctypeId");
+        public Criteria andArctypeGreaterThanOrEqualTo(String value) {
+            addCriterion("arctype >=", value, "arctype");
             return (Criteria) this;
         }
 
-        public Criteria andArctypeIdLessThan(Integer value) {
-            addCriterion("arctype_id <", value, "arctypeId");
+        public Criteria andArctypeLessThan(String value) {
+            addCriterion("arctype <", value, "arctype");
             return (Criteria) this;
         }
 
-        public Criteria andArctypeIdLessThanOrEqualTo(Integer value) {
-            addCriterion("arctype_id <=", value, "arctypeId");
+        public Criteria andArctypeLessThanOrEqualTo(String value) {
+            addCriterion("arctype <=", value, "arctype");
             return (Criteria) this;
         }
 
-        public Criteria andArctypeIdIn(List<Integer> values) {
-            addCriterion("arctype_id in", values, "arctypeId");
+        public Criteria andArctypeLike(String value) {
+            addCriterion("arctype like", value, "arctype");
             return (Criteria) this;
         }
 
-        public Criteria andArctypeIdNotIn(List<Integer> values) {
-            addCriterion("arctype_id not in", values, "arctypeId");
+        public Criteria andArctypeNotLike(String value) {
+            addCriterion("arctype not like", value, "arctype");
             return (Criteria) this;
         }
 
-        public Criteria andArctypeIdBetween(Integer value1, Integer value2) {
-            addCriterion("arctype_id between", value1, value2, "arctypeId");
+        public Criteria andArctypeIn(List<String> values) {
+            addCriterion("arctype in", values, "arctype");
             return (Criteria) this;
         }
 
-        public Criteria andArctypeIdNotBetween(Integer value1, Integer value2) {
-            addCriterion("arctype_id not between", value1, value2, "arctypeId");
+        public Criteria andArctypeNotIn(List<String> values) {
+            addCriterion("arctype not in", values, "arctype");
+            return (Criteria) this;
+        }
+
+        public Criteria andArctypeBetween(String value1, String value2) {
+            addCriterion("arctype between", value1, value2, "arctype");
+            return (Criteria) this;
+        }
+
+        public Criteria andArctypeNotBetween(String value1, String value2) {
+            addCriterion("arctype not between", value1, value2, "arctype");
             return (Criteria) this;
         }
 

+ 7 - 7
mbg/src/main/java/com/koobietech/eas/mbg/model/EasArcArctype.java

@@ -54,7 +54,7 @@ public class EasArcArctype implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "创建时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date createTime;
 
     /**
@@ -63,7 +63,7 @@ public class EasArcArctype implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "修改时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date modifyTime;
 
     /**
@@ -89,7 +89,7 @@ public class EasArcArctype implements Serializable {
     }
 
     public void setName(String name) {
-        this.name = name;
+        this.name = name == null ? null : name.trim();
     }
 
     public String getIsViews() {
@@ -97,7 +97,7 @@ public class EasArcArctype implements Serializable {
     }
 
     public void setIsViews(String isViews) {
-        this.isViews = isViews;
+        this.isViews = isViews == null ? null : isViews.trim();
     }
 
     public String getTemplate() {
@@ -105,7 +105,7 @@ public class EasArcArctype implements Serializable {
     }
 
     public void setTemplate(String template) {
-        this.template = template;
+        this.template = template == null ? null : template.trim();
     }
 
     public String getBackup() {
@@ -113,7 +113,7 @@ public class EasArcArctype implements Serializable {
     }
 
     public void setBackup(String backup) {
-        this.backup = backup;
+        this.backup = backup == null ? null : backup.trim();
     }
 
     public String getSuffix() {
@@ -121,7 +121,7 @@ public class EasArcArctype implements Serializable {
     }
 
     public void setSuffix(String suffix) {
-        this.suffix = suffix;
+        this.suffix = suffix == null ? null : suffix.trim();
     }
 
     public Date getCreateTime() {

+ 7 - 7
mbg/src/main/java/com/koobietech/eas/mbg/model/EasArcTlsAttendance.java

@@ -14,7 +14,7 @@ public class EasArcTlsAttendance implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "签到日期")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date checkinDate;
 
     /**
@@ -79,7 +79,7 @@ public class EasArcTlsAttendance implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "创建时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date createTime;
 
     /**
@@ -88,7 +88,7 @@ public class EasArcTlsAttendance implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "修改时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date modifyTime;
 
     private static final long serialVersionUID = 1L;
@@ -130,7 +130,7 @@ public class EasArcTlsAttendance implements Serializable {
     }
 
     public void setMorning(String morning) {
-        this.morning = morning;
+        this.morning = morning == null ? null : morning.trim();
     }
 
     public String getAfternoon() {
@@ -138,7 +138,7 @@ public class EasArcTlsAttendance implements Serializable {
     }
 
     public void setAfternoon(String afternoon) {
-        this.afternoon = afternoon;
+        this.afternoon = afternoon == null ? null : afternoon.trim();
     }
 
     public String getStudentName() {
@@ -146,7 +146,7 @@ public class EasArcTlsAttendance implements Serializable {
     }
 
     public void setStudentName(String studentName) {
-        this.studentName = studentName;
+        this.studentName = studentName == null ? null : studentName.trim();
     }
 
     public String getStudentNumber() {
@@ -154,7 +154,7 @@ public class EasArcTlsAttendance implements Serializable {
     }
 
     public void setStudentNumber(String studentNumber) {
-        this.studentNumber = studentNumber;
+        this.studentNumber = studentNumber == null ? null : studentNumber.trim();
     }
 
     public Integer getCreateUid() {

+ 5 - 5
mbg/src/main/java/com/koobietech/eas/mbg/model/EasArcTlsScores.java

@@ -45,7 +45,7 @@ public class EasArcTlsScores implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "考试时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date testDate;
 
     /**
@@ -78,7 +78,7 @@ public class EasArcTlsScores implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "创建时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date createTime;
 
     /**
@@ -87,7 +87,7 @@ public class EasArcTlsScores implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "修改时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date modifyTime;
 
     /**
@@ -121,7 +121,7 @@ public class EasArcTlsScores implements Serializable {
     }
 
     public void setStudentNumber(String studentNumber) {
-        this.studentNumber = studentNumber;
+        this.studentNumber = studentNumber == null ? null : studentNumber.trim();
     }
 
     public Integer getCategoryId() {
@@ -201,7 +201,7 @@ public class EasArcTlsScores implements Serializable {
     }
 
     public void setComment(String comment) {
-        this.comment = comment;
+        this.comment = comment == null ? null : comment.trim();
     }
 
     @Override

+ 32 - 15
mbg/src/main/java/com/koobietech/eas/mbg/model/EasArcTlsStudents.java

@@ -52,7 +52,7 @@ public class EasArcTlsStudents implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "学生出生日期")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date birthdate;
 
     /**
@@ -85,7 +85,7 @@ public class EasArcTlsStudents implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "学生入学进入培训班日期")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date enrollmentDate;
 
     /**
@@ -94,7 +94,7 @@ public class EasArcTlsStudents implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "学生在培训班毕业日期")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date graduationDate;
 
     /**
@@ -135,7 +135,7 @@ public class EasArcTlsStudents implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "创建时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date createTime;
 
     /**
@@ -144,7 +144,7 @@ public class EasArcTlsStudents implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "修改时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date modifyTime;
 
     /**
@@ -171,6 +171,14 @@ public class EasArcTlsStudents implements Serializable {
     @Schema(description = "创建用户ID")
     private Integer createUid;
 
+    /**
+     * 学生身份证号
+     *
+     * @mbg.generated
+     */
+    @Schema(description = "学生身份证号")
+    private String studentIdnumber;
+
     private static final long serialVersionUID = 1L;
 
     public Integer getId() {
@@ -186,7 +194,7 @@ public class EasArcTlsStudents implements Serializable {
     }
 
     public void setArchiveNumber(String archiveNumber) {
-        this.archiveNumber = archiveNumber;
+        this.archiveNumber = archiveNumber == null ? null : archiveNumber.trim();
     }
 
     public String getStudentNumber() {
@@ -194,7 +202,7 @@ public class EasArcTlsStudents implements Serializable {
     }
 
     public void setStudentNumber(String studentNumber) {
-        this.studentNumber = studentNumber;
+        this.studentNumber = studentNumber == null ? null : studentNumber.trim();
     }
 
     public String getStudentName() {
@@ -202,7 +210,7 @@ public class EasArcTlsStudents implements Serializable {
     }
 
     public void setStudentName(String studentName) {
-        this.studentName = studentName;
+        this.studentName = studentName == null ? null : studentName.trim();
     }
 
     public String getGender() {
@@ -210,7 +218,7 @@ public class EasArcTlsStudents implements Serializable {
     }
 
     public void setGender(String gender) {
-        this.gender = gender;
+        this.gender = gender == null ? null : gender.trim();
     }
 
     public Date getBirthdate() {
@@ -226,7 +234,7 @@ public class EasArcTlsStudents implements Serializable {
     }
 
     public void setAddress(String address) {
-        this.address = address;
+        this.address = address == null ? null : address.trim();
     }
 
     public String getPhone() {
@@ -234,7 +242,7 @@ public class EasArcTlsStudents implements Serializable {
     }
 
     public void setPhone(String phone) {
-        this.phone = phone;
+        this.phone = phone == null ? null : phone.trim();
     }
 
     public String getEmail() {
@@ -242,7 +250,7 @@ public class EasArcTlsStudents implements Serializable {
     }
 
     public void setEmail(String email) {
-        this.email = email;
+        this.email = email == null ? null : email.trim();
     }
 
     public Date getEnrollmentDate() {
@@ -274,7 +282,7 @@ public class EasArcTlsStudents implements Serializable {
     }
 
     public void setMajor(String major) {
-        this.major = major;
+        this.major = major == null ? null : major.trim();
     }
 
     public String getMinor() {
@@ -282,7 +290,7 @@ public class EasArcTlsStudents implements Serializable {
     }
 
     public void setMinor(String minor) {
-        this.minor = minor;
+        this.minor = minor == null ? null : minor.trim();
     }
 
     public String getUniversity() {
@@ -290,7 +298,7 @@ public class EasArcTlsStudents implements Serializable {
     }
 
     public void setUniversity(String university) {
-        this.university = university;
+        this.university = university == null ? null : university.trim();
     }
 
     public Date getCreateTime() {
@@ -333,6 +341,14 @@ public class EasArcTlsStudents implements Serializable {
         this.createUid = createUid;
     }
 
+    public String getStudentIdnumber() {
+        return studentIdnumber;
+    }
+
+    public void setStudentIdnumber(String studentIdnumber) {
+        this.studentIdnumber = studentIdnumber == null ? null : studentIdnumber.trim();
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -359,6 +375,7 @@ public class EasArcTlsStudents implements Serializable {
         sb.append(", admissionsId=").append(admissionsId);
         sb.append(", managerId=").append(managerId);
         sb.append(", createUid=").append(createUid);
+        sb.append(", studentIdnumber=").append(studentIdnumber);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 70 - 0
mbg/src/main/java/com/koobietech/eas/mbg/model/EasArcTlsStudentsExample.java

@@ -1431,6 +1431,76 @@ public class EasArcTlsStudentsExample {
             addCriterion("create_uid not between", value1, value2, "createUid");
             return (Criteria) this;
         }
+
+        public Criteria andStudentIdnumberIsNull() {
+            addCriterion("student_idnumber is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStudentIdnumberIsNotNull() {
+            addCriterion("student_idnumber is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStudentIdnumberEqualTo(String value) {
+            addCriterion("student_idnumber =", value, "studentIdnumber");
+            return (Criteria) this;
+        }
+
+        public Criteria andStudentIdnumberNotEqualTo(String value) {
+            addCriterion("student_idnumber <>", value, "studentIdnumber");
+            return (Criteria) this;
+        }
+
+        public Criteria andStudentIdnumberGreaterThan(String value) {
+            addCriterion("student_idnumber >", value, "studentIdnumber");
+            return (Criteria) this;
+        }
+
+        public Criteria andStudentIdnumberGreaterThanOrEqualTo(String value) {
+            addCriterion("student_idnumber >=", value, "studentIdnumber");
+            return (Criteria) this;
+        }
+
+        public Criteria andStudentIdnumberLessThan(String value) {
+            addCriterion("student_idnumber <", value, "studentIdnumber");
+            return (Criteria) this;
+        }
+
+        public Criteria andStudentIdnumberLessThanOrEqualTo(String value) {
+            addCriterion("student_idnumber <=", value, "studentIdnumber");
+            return (Criteria) this;
+        }
+
+        public Criteria andStudentIdnumberLike(String value) {
+            addCriterion("student_idnumber like", value, "studentIdnumber");
+            return (Criteria) this;
+        }
+
+        public Criteria andStudentIdnumberNotLike(String value) {
+            addCriterion("student_idnumber not like", value, "studentIdnumber");
+            return (Criteria) this;
+        }
+
+        public Criteria andStudentIdnumberIn(List<String> values) {
+            addCriterion("student_idnumber in", values, "studentIdnumber");
+            return (Criteria) this;
+        }
+
+        public Criteria andStudentIdnumberNotIn(List<String> values) {
+            addCriterion("student_idnumber not in", values, "studentIdnumber");
+            return (Criteria) this;
+        }
+
+        public Criteria andStudentIdnumberBetween(String value1, String value2) {
+            addCriterion("student_idnumber between", value1, value2, "studentIdnumber");
+            return (Criteria) this;
+        }
+
+        public Criteria andStudentIdnumberNotBetween(String value1, String value2) {
+            addCriterion("student_idnumber not between", value1, value2, "studentIdnumber");
+            return (Criteria) this;
+        }
     }
 
     public static class Criteria extends GeneratedCriteria {

+ 5 - 5
mbg/src/main/java/com/koobietech/eas/mbg/model/EasEduCategory.java

@@ -30,7 +30,7 @@ public class EasEduCategory implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "创建时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date createTime;
 
     /**
@@ -39,7 +39,7 @@ public class EasEduCategory implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "修改时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date modifyTime;
 
     /**
@@ -73,7 +73,7 @@ public class EasEduCategory implements Serializable {
     }
 
     public void setName(String name) {
-        this.name = name;
+        this.name = name == null ? null : name.trim();
     }
 
     public String getDescription() {
@@ -81,7 +81,7 @@ public class EasEduCategory implements Serializable {
     }
 
     public void setDescription(String description) {
-        this.description = description;
+        this.description = description == null ? null : description.trim();
     }
 
     public Date getCreateTime() {
@@ -113,7 +113,7 @@ public class EasEduCategory implements Serializable {
     }
 
     public void setDisabled(String disabled) {
-        this.disabled = disabled;
+        this.disabled = disabled == null ? null : disabled.trim();
     }
 
     @Override

+ 2 - 2
mbg/src/main/java/com/koobietech/eas/mbg/model/EasEduClaRelation.java

@@ -46,7 +46,7 @@ public class EasEduClaRelation implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "创建时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date createTime;
 
     /**
@@ -55,7 +55,7 @@ public class EasEduClaRelation implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "修改时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date modifyTime;
 
     /**

+ 4 - 4
mbg/src/main/java/com/koobietech/eas/mbg/model/EasEduClass.java

@@ -44,7 +44,7 @@ public class EasEduClass implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "创建时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date createTime;
 
     /**
@@ -53,7 +53,7 @@ public class EasEduClass implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "修改时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date modifyTime;
 
     /**
@@ -87,7 +87,7 @@ public class EasEduClass implements Serializable {
     }
 
     public void setName(String name) {
-        this.name = name;
+        this.name = name == null ? null : name.trim();
     }
 
     public Integer getManageId() {
@@ -135,7 +135,7 @@ public class EasEduClass implements Serializable {
     }
 
     public void setDisabled(String disabled) {
-        this.disabled = disabled;
+        this.disabled = disabled == null ? null : disabled.trim();
     }
 
     @Override

+ 7 - 7
mbg/src/main/java/com/koobietech/eas/mbg/model/EasEduClassroom.java

@@ -78,7 +78,7 @@ public class EasEduClassroom implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "创建时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date createTime;
 
     /**
@@ -87,7 +87,7 @@ public class EasEduClassroom implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "修改时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date modifyTime;
 
     /**
@@ -113,7 +113,7 @@ public class EasEduClassroom implements Serializable {
     }
 
     public void setName(String name) {
-        this.name = name;
+        this.name = name == null ? null : name.trim();
     }
 
     public Integer getManagerId() {
@@ -129,7 +129,7 @@ public class EasEduClassroom implements Serializable {
     }
 
     public void setAddress(String address) {
-        this.address = address;
+        this.address = address == null ? null : address.trim();
     }
 
     public String getManager() {
@@ -137,7 +137,7 @@ public class EasEduClassroom implements Serializable {
     }
 
     public void setManager(String manager) {
-        this.manager = manager;
+        this.manager = manager == null ? null : manager.trim();
     }
 
     public Integer getFloor() {
@@ -161,7 +161,7 @@ public class EasEduClassroom implements Serializable {
     }
 
     public void setComment(String comment) {
-        this.comment = comment;
+        this.comment = comment == null ? null : comment.trim();
     }
 
     public String getDisabled() {
@@ -169,7 +169,7 @@ public class EasEduClassroom implements Serializable {
     }
 
     public void setDisabled(String disabled) {
-        this.disabled = disabled;
+        this.disabled = disabled == null ? null : disabled.trim();
     }
 
     public Date getCreateTime() {

+ 2 - 2
mbg/src/main/java/com/koobietech/eas/mbg/model/EasEduCltRelation.java

@@ -30,7 +30,7 @@ public class EasEduCltRelation implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "创建时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date createTime;
 
     /**
@@ -39,7 +39,7 @@ public class EasEduCltRelation implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "修改时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date modifyTime;
 
     /**

+ 5 - 5
mbg/src/main/java/com/koobietech/eas/mbg/model/EasEduSchedule.java

@@ -22,7 +22,7 @@ public class EasEduSchedule implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "起始时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date startTime;
 
     /**
@@ -31,7 +31,7 @@ public class EasEduSchedule implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "结束时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date endTime;
 
     /**
@@ -88,7 +88,7 @@ public class EasEduSchedule implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "创建时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date createTime;
 
     /**
@@ -97,7 +97,7 @@ public class EasEduSchedule implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "修改时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date modifyTime;
 
     /**
@@ -227,7 +227,7 @@ public class EasEduSchedule implements Serializable {
     }
 
     public void setDisabled(String disabled) {
-        this.disabled = disabled;
+        this.disabled = disabled == null ? null : disabled.trim();
     }
 
     @Override

+ 5 - 5
mbg/src/main/java/com/koobietech/eas/mbg/model/EasEduSubjects.java

@@ -38,7 +38,7 @@ public class EasEduSubjects implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "创建时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date createTime;
 
     /**
@@ -47,7 +47,7 @@ public class EasEduSubjects implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "修改时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date modifyTime;
 
     /**
@@ -81,7 +81,7 @@ public class EasEduSubjects implements Serializable {
     }
 
     public void setName(String name) {
-        this.name = name;
+        this.name = name == null ? null : name.trim();
     }
 
     public String getDescription() {
@@ -89,7 +89,7 @@ public class EasEduSubjects implements Serializable {
     }
 
     public void setDescription(String description) {
-        this.description = description;
+        this.description = description == null ? null : description.trim();
     }
 
     public Integer getCategoryId() {
@@ -129,7 +129,7 @@ public class EasEduSubjects implements Serializable {
     }
 
     public void setDisabled(String disabled) {
-        this.disabled = disabled;
+        this.disabled = disabled == null ? null : disabled.trim();
     }
 
     @Override

+ 1 - 1
mbg/src/main/java/com/koobietech/eas/mbg/model/EasSysDepRelation.java

@@ -44,7 +44,7 @@ public class EasSysDepRelation implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "创建时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date createTime;
 
     /**

+ 8 - 8
mbg/src/main/java/com/koobietech/eas/mbg/model/EasSysDepartment.java

@@ -54,7 +54,7 @@ public class EasSysDepartment implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "创建时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date createTime;
 
     /**
@@ -63,7 +63,7 @@ public class EasSysDepartment implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "修改时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date modifyTime;
 
     /**
@@ -97,7 +97,7 @@ public class EasSysDepartment implements Serializable {
     }
 
     public void setDepname(String depname) {
-        this.depname = depname;
+        this.depname = depname == null ? null : depname.trim();
     }
 
     public String getAddress() {
@@ -105,7 +105,7 @@ public class EasSysDepartment implements Serializable {
     }
 
     public void setAddress(String address) {
-        this.address = address;
+        this.address = address == null ? null : address.trim();
     }
 
     public String getPhone() {
@@ -113,7 +113,7 @@ public class EasSysDepartment implements Serializable {
     }
 
     public void setPhone(String phone) {
-        this.phone = phone;
+        this.phone = phone == null ? null : phone.trim();
     }
 
     public String getEmail() {
@@ -121,7 +121,7 @@ public class EasSysDepartment implements Serializable {
     }
 
     public void setEmail(String email) {
-        this.email = email;
+        this.email = email == null ? null : email.trim();
     }
 
     public String getManager() {
@@ -129,7 +129,7 @@ public class EasSysDepartment implements Serializable {
     }
 
     public void setManager(String manager) {
-        this.manager = manager;
+        this.manager = manager == null ? null : manager.trim();
     }
 
     public Date getCreateTime() {
@@ -161,7 +161,7 @@ public class EasSysDepartment implements Serializable {
     }
 
     public void setDisabled(String disabled) {
-        this.disabled = disabled;
+        this.disabled = disabled == null ? null : disabled.trim();
     }
 
     @Override

+ 5 - 5
mbg/src/main/java/com/koobietech/eas/mbg/model/EasSysLogs.java

@@ -20,7 +20,7 @@ public class EasSysLogs implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "记录日志的时间戳")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date timestamp;
 
     /**
@@ -78,7 +78,7 @@ public class EasSysLogs implements Serializable {
     }
 
     public void setLevel(String level) {
-        this.level = level;
+        this.level = level == null ? null : level.trim();
     }
 
     public String getLogger() {
@@ -86,7 +86,7 @@ public class EasSysLogs implements Serializable {
     }
 
     public void setLogger(String logger) {
-        this.logger = logger;
+        this.logger = logger == null ? null : logger.trim();
     }
 
     public String getMessage() {
@@ -94,7 +94,7 @@ public class EasSysLogs implements Serializable {
     }
 
     public void setMessage(String message) {
-        this.message = message;
+        this.message = message == null ? null : message.trim();
     }
 
     public String getException() {
@@ -102,7 +102,7 @@ public class EasSysLogs implements Serializable {
     }
 
     public void setException(String exception) {
-        this.exception = exception;
+        this.exception = exception == null ? null : exception.trim();
     }
 
     @Override

+ 5 - 5
mbg/src/main/java/com/koobietech/eas/mbg/model/EasSysPermission.java

@@ -44,7 +44,7 @@ public class EasSysPermission implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "创建时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date createTime;
 
     /**
@@ -53,7 +53,7 @@ public class EasSysPermission implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "修改时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date modifyTime;
 
     /**
@@ -87,7 +87,7 @@ public class EasSysPermission implements Serializable {
     }
 
     public void setName(String name) {
-        this.name = name;
+        this.name = name == null ? null : name.trim();
     }
 
     public String getDescription() {
@@ -95,7 +95,7 @@ public class EasSysPermission implements Serializable {
     }
 
     public void setDescription(String description) {
-        this.description = description;
+        this.description = description == null ? null : description.trim();
     }
 
     public Byte getIsActive() {
@@ -135,7 +135,7 @@ public class EasSysPermission implements Serializable {
     }
 
     public void setDisabled(String disabled) {
-        this.disabled = disabled;
+        this.disabled = disabled == null ? null : disabled.trim();
     }
 
     @Override

+ 1 - 1
mbg/src/main/java/com/koobietech/eas/mbg/model/EasSysPesRelation.java

@@ -36,7 +36,7 @@ public class EasSysPesRelation implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "创建时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date createTime;
 
     /**

+ 11 - 11
mbg/src/main/java/com/koobietech/eas/mbg/model/EasSysStudent.java

@@ -54,7 +54,7 @@ public class EasSysStudent implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "学生入学日期")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date enrollmentDate;
 
     /**
@@ -79,7 +79,7 @@ public class EasSysStudent implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "创建时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date createTime;
 
     /**
@@ -88,7 +88,7 @@ public class EasSysStudent implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "修改时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date modifyTime;
 
     /**
@@ -138,7 +138,7 @@ public class EasSysStudent implements Serializable {
     }
 
     public void setStudentNumber(String studentNumber) {
-        this.studentNumber = studentNumber;
+        this.studentNumber = studentNumber == null ? null : studentNumber.trim();
     }
 
     public String getStudentName() {
@@ -146,7 +146,7 @@ public class EasSysStudent implements Serializable {
     }
 
     public void setStudentName(String studentName) {
-        this.studentName = studentName;
+        this.studentName = studentName == null ? null : studentName.trim();
     }
 
     public String getGender() {
@@ -154,7 +154,7 @@ public class EasSysStudent implements Serializable {
     }
 
     public void setGender(String gender) {
-        this.gender = gender;
+        this.gender = gender == null ? null : gender.trim();
     }
 
     public String getPhone() {
@@ -162,7 +162,7 @@ public class EasSysStudent implements Serializable {
     }
 
     public void setPhone(String phone) {
-        this.phone = phone;
+        this.phone = phone == null ? null : phone.trim();
     }
 
     public String getEmail() {
@@ -170,7 +170,7 @@ public class EasSysStudent implements Serializable {
     }
 
     public void setEmail(String email) {
-        this.email = email;
+        this.email = email == null ? null : email.trim();
     }
 
     public Date getEnrollmentDate() {
@@ -186,7 +186,7 @@ public class EasSysStudent implements Serializable {
     }
 
     public void setPasswd(String passwd) {
-        this.passwd = passwd;
+        this.passwd = passwd == null ? null : passwd.trim();
     }
 
     public String getAvatar() {
@@ -194,7 +194,7 @@ public class EasSysStudent implements Serializable {
     }
 
     public void setAvatar(String avatar) {
-        this.avatar = avatar;
+        this.avatar = avatar == null ? null : avatar.trim();
     }
 
     public Date getCreateTime() {
@@ -242,7 +242,7 @@ public class EasSysStudent implements Serializable {
     }
 
     public void setDisabled(String disabled) {
-        this.disabled = disabled;
+        this.disabled = disabled == null ? null : disabled.trim();
     }
 
     @Override

+ 2 - 2
mbg/src/main/java/com/koobietech/eas/mbg/model/EasSysUniversity.java

@@ -28,7 +28,7 @@ public class EasSysUniversity implements Serializable {
     }
 
     public void setUniversityCode(String universityCode) {
-        this.universityCode = universityCode;
+        this.universityCode = universityCode == null ? null : universityCode.trim();
     }
 
     public String getUniversityTitle() {
@@ -36,7 +36,7 @@ public class EasSysUniversity implements Serializable {
     }
 
     public void setUniversityTitle(String universityTitle) {
-        this.universityTitle = universityTitle;
+        this.universityTitle = universityTitle == null ? null : universityTitle.trim();
     }
 
     @Override

+ 9 - 9
mbg/src/main/java/com/koobietech/eas/mbg/model/EasSysUserinfo.java

@@ -68,7 +68,7 @@ public class EasSysUserinfo implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "创建时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date createTime;
 
     /**
@@ -77,7 +77,7 @@ public class EasSysUserinfo implements Serializable {
      * @mbg.generated
      */
     @Schema(description = "修改时间")
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private Date modifyTime;
 
     /**
@@ -111,7 +111,7 @@ public class EasSysUserinfo implements Serializable {
     }
 
     public void setUsername(String username) {
-        this.username = username;
+        this.username = username == null ? null : username.trim();
     }
 
     public String getPasswd() {
@@ -119,7 +119,7 @@ public class EasSysUserinfo implements Serializable {
     }
 
     public void setPasswd(String passwd) {
-        this.passwd = passwd;
+        this.passwd = passwd == null ? null : passwd.trim();
     }
 
     public String getEmail() {
@@ -127,7 +127,7 @@ public class EasSysUserinfo implements Serializable {
     }
 
     public void setEmail(String email) {
-        this.email = email;
+        this.email = email == null ? null : email.trim();
     }
 
     public String getRelname() {
@@ -135,7 +135,7 @@ public class EasSysUserinfo implements Serializable {
     }
 
     public void setRelname(String relname) {
-        this.relname = relname;
+        this.relname = relname == null ? null : relname.trim();
     }
 
     public String getPhone() {
@@ -143,7 +143,7 @@ public class EasSysUserinfo implements Serializable {
     }
 
     public void setPhone(String phone) {
-        this.phone = phone;
+        this.phone = phone == null ? null : phone.trim();
     }
 
     public String getAddress() {
@@ -151,7 +151,7 @@ public class EasSysUserinfo implements Serializable {
     }
 
     public void setAddress(String address) {
-        this.address = address;
+        this.address = address == null ? null : address.trim();
     }
 
     public Date getCreateTime() {
@@ -183,7 +183,7 @@ public class EasSysUserinfo implements Serializable {
     }
 
     public void setDisabled(String disabled) {
-        this.disabled = disabled;
+        this.disabled = disabled == null ? null : disabled.trim();
     }
 
     @Override

+ 14 - 14
mbg/src/main/resources/com/koobietech/eas/mbg/mapper/EasArcArchivesMapper.xml

@@ -6,7 +6,7 @@
     <result column="archive_number" jdbcType="VARCHAR" property="archiveNumber" />
     <result column="student_number" jdbcType="VARCHAR" property="studentNumber" />
     <result column="file_path" jdbcType="VARCHAR" property="filePath" />
-    <result column="arctype_id" jdbcType="INTEGER" property="arctypeId" />
+    <result column="arctype" jdbcType="VARCHAR" property="arctype" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
     <result column="validity_time" jdbcType="TIMESTAMP" property="validityTime" />
@@ -73,7 +73,7 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    id, archive_number, student_number, file_path, arctype_id, create_time, modify_time, 
+    id, archive_number, student_number, file_path, arctype, create_time, modify_time, 
     validity_time, manager_id, create_date, create_uid
   </sql>
   <select id="selectByExample" parameterType="com.koobietech.eas.mbg.model.EasArcArchivesExample" resultMap="BaseResultMap">
@@ -111,11 +111,11 @@
       SELECT LAST_INSERT_ID()
     </selectKey>
     insert into eas_arc_archives (archive_number, student_number, file_path, 
-      arctype_id, create_time, modify_time, 
+      arctype, create_time, modify_time, 
       validity_time, manager_id, create_date, 
       create_uid)
     values (#{archiveNumber,jdbcType=VARCHAR}, #{studentNumber,jdbcType=VARCHAR}, #{filePath,jdbcType=VARCHAR}, 
-      #{arctypeId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{modifyTime,jdbcType=TIMESTAMP}, 
+      #{arctype,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{modifyTime,jdbcType=TIMESTAMP}, 
       #{validityTime,jdbcType=TIMESTAMP}, #{managerId,jdbcType=INTEGER}, #{createDate,jdbcType=DATE}, 
       #{createUid,jdbcType=INTEGER})
   </insert>
@@ -134,8 +134,8 @@
       <if test="filePath != null">
         file_path,
       </if>
-      <if test="arctypeId != null">
-        arctype_id,
+      <if test="arctype != null">
+        arctype,
       </if>
       <if test="createTime != null">
         create_time,
@@ -166,8 +166,8 @@
       <if test="filePath != null">
         #{filePath,jdbcType=VARCHAR},
       </if>
-      <if test="arctypeId != null">
-        #{arctypeId,jdbcType=INTEGER},
+      <if test="arctype != null">
+        #{arctype,jdbcType=VARCHAR},
       </if>
       <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
@@ -210,8 +210,8 @@
       <if test="record.filePath != null">
         file_path = #{record.filePath,jdbcType=VARCHAR},
       </if>
-      <if test="record.arctypeId != null">
-        arctype_id = #{record.arctypeId,jdbcType=INTEGER},
+      <if test="record.arctype != null">
+        arctype = #{record.arctype,jdbcType=VARCHAR},
       </if>
       <if test="record.createTime != null">
         create_time = #{record.createTime,jdbcType=TIMESTAMP},
@@ -242,7 +242,7 @@
       archive_number = #{record.archiveNumber,jdbcType=VARCHAR},
       student_number = #{record.studentNumber,jdbcType=VARCHAR},
       file_path = #{record.filePath,jdbcType=VARCHAR},
-      arctype_id = #{record.arctypeId,jdbcType=INTEGER},
+      arctype = #{record.arctype,jdbcType=VARCHAR},
       create_time = #{record.createTime,jdbcType=TIMESTAMP},
       modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
       validity_time = #{record.validityTime,jdbcType=TIMESTAMP},
@@ -265,8 +265,8 @@
       <if test="filePath != null">
         file_path = #{filePath,jdbcType=VARCHAR},
       </if>
-      <if test="arctypeId != null">
-        arctype_id = #{arctypeId,jdbcType=INTEGER},
+      <if test="arctype != null">
+        arctype = #{arctype,jdbcType=VARCHAR},
       </if>
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
@@ -294,7 +294,7 @@
     set archive_number = #{archiveNumber,jdbcType=VARCHAR},
       student_number = #{studentNumber,jdbcType=VARCHAR},
       file_path = #{filePath,jdbcType=VARCHAR},
-      arctype_id = #{arctypeId,jdbcType=INTEGER},
+      arctype = #{arctype,jdbcType=VARCHAR},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       modify_time = #{modifyTime,jdbcType=TIMESTAMP},
       validity_time = #{validityTime,jdbcType=TIMESTAMP},

+ 20 - 5
mbg/src/main/resources/com/koobietech/eas/mbg/mapper/EasArcTlsStudentsMapper.xml

@@ -22,6 +22,7 @@
     <result column="admissions_id" jdbcType="INTEGER" property="admissionsId" />
     <result column="manager_id" jdbcType="INTEGER" property="managerId" />
     <result column="create_uid" jdbcType="INTEGER" property="createUid" />
+    <result column="student_idnumber" jdbcType="VARCHAR" property="studentIdnumber" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <where>
@@ -84,7 +85,7 @@
   <sql id="Base_Column_List">
     id, archive_number, student_number, student_name, gender, birthdate, address, phone, 
     email, enrollment_date, graduation_date, grade, major, minor, university, create_time, 
-    modify_time, admissions_id, manager_id, create_uid
+    modify_time, admissions_id, manager_id, create_uid, student_idnumber
   </sql>
   <select id="selectByExample" parameterType="com.koobietech.eas.mbg.model.EasArcTlsStudentsExample" resultMap="BaseResultMap">
     select
@@ -126,14 +127,14 @@
       graduation_date, grade, major, 
       minor, university, create_time, 
       modify_time, admissions_id, manager_id, 
-      create_uid)
+      create_uid, student_idnumber)
     values (#{archiveNumber,jdbcType=VARCHAR}, #{studentNumber,jdbcType=VARCHAR}, #{studentName,jdbcType=VARCHAR}, 
       #{gender,jdbcType=CHAR}, #{birthdate,jdbcType=DATE}, #{address,jdbcType=VARCHAR}, 
       #{phone,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{enrollmentDate,jdbcType=DATE}, 
       #{graduationDate,jdbcType=DATE}, #{grade,jdbcType=INTEGER}, #{major,jdbcType=VARCHAR}, 
       #{minor,jdbcType=VARCHAR}, #{university,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
       #{modifyTime,jdbcType=TIMESTAMP}, #{admissionsId,jdbcType=INTEGER}, #{managerId,jdbcType=INTEGER}, 
-      #{createUid,jdbcType=INTEGER})
+      #{createUid,jdbcType=INTEGER}, #{studentIdnumber,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.koobietech.eas.mbg.model.EasArcTlsStudents">
     <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
@@ -198,6 +199,9 @@
       <if test="createUid != null">
         create_uid,
       </if>
+      <if test="studentIdnumber != null">
+        student_idnumber,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="archiveNumber != null">
@@ -257,6 +261,9 @@
       <if test="createUid != null">
         #{createUid,jdbcType=INTEGER},
       </if>
+      <if test="studentIdnumber != null">
+        #{studentIdnumber,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.koobietech.eas.mbg.model.EasArcTlsStudentsExample" resultType="java.lang.Long">
@@ -328,6 +335,9 @@
       <if test="record.createUid != null">
         create_uid = #{record.createUid,jdbcType=INTEGER},
       </if>
+      <if test="record.studentIdnumber != null">
+        student_idnumber = #{record.studentIdnumber,jdbcType=VARCHAR},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -354,7 +364,8 @@
       modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
       admissions_id = #{record.admissionsId,jdbcType=INTEGER},
       manager_id = #{record.managerId,jdbcType=INTEGER},
-      create_uid = #{record.createUid,jdbcType=INTEGER}
+      create_uid = #{record.createUid,jdbcType=INTEGER},
+      student_idnumber = #{record.studentIdnumber,jdbcType=VARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -419,6 +430,9 @@
       <if test="createUid != null">
         create_uid = #{createUid,jdbcType=INTEGER},
       </if>
+      <if test="studentIdnumber != null">
+        student_idnumber = #{studentIdnumber,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=INTEGER}
   </update>
@@ -442,7 +456,8 @@
       modify_time = #{modifyTime,jdbcType=TIMESTAMP},
       admissions_id = #{admissionsId,jdbcType=INTEGER},
       manager_id = #{managerId,jdbcType=INTEGER},
-      create_uid = #{createUid,jdbcType=INTEGER}
+      create_uid = #{createUid,jdbcType=INTEGER},
+      student_idnumber = #{studentIdnumber,jdbcType=VARCHAR}
     where id = #{id,jdbcType=INTEGER}
   </update>
 </mapper>

+ 9 - 1
mbg/src/main/resources/generatorConfig.xml

@@ -27,6 +27,10 @@
             <property name="suppressDate" value="true"/>
             <!-- 是否添加数据库内的注释 true:是 : false:否 -->
             <property name="addRemarkComments" value="true"/>
+            <!-- 生成注释的作者 -->
+            <property name="author" value="koobietech"/>
+            <!-- 生成注释的日期格式 -->
+            <property name="dateFormat" value="yyyy-MM-dd HH:mm:ss"/>
         </commentGenerator>
 
         <jdbcConnection driverClass="${jdbc.driverClass}"
@@ -36,7 +40,11 @@
             <property name="nullCatalogMeansCurrent" value="true" />
         </jdbcConnection>
 
-        <javaModelGenerator targetPackage="com.koobietech.eas.mbg.model" targetProject="mbg/src/main/java"/>
+        <javaModelGenerator targetPackage="com.koobietech.eas.mbg.model" targetProject="mbg/src/main/java">
+            <property name="dateType" value="java.util.Date"/>
+            <property name="datetimeType" value="java.util.DateTime"/>
+            <property name="trimStrings" value="true"/>
+        </javaModelGenerator>
 
         <sqlMapGenerator targetPackage="com.koobietech.eas.mbg.mapper" targetProject="mbg/src/main/resources"/>
 

+ 62 - 0
service/src/main/java/com/koobietech/eas/service/EasArchivesFilesService.java

@@ -0,0 +1,62 @@
+package com.koobietech.eas.service;
+
+import com.koobietech.eas.dao.dto.ArchivesDto;
+import org.apache.poi.xwpf.usermodel.XWPFDocument;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+
+public interface EasArchivesFilesService {
+    /**
+     * 获取学生档案文件
+     * @param studentNumber 学号
+     * @return 学生档案文件
+     */
+    ArchivesDto getArchiveStudentsFile(String studentNumber);
+
+    /**
+     * 保存学生考勤文件
+     * @param studentNumber
+     * @param document
+     * @return
+     */
+    ArchivesDto saveArchiveAttendanceFile(String studentNumber, XWPFDocument document);
+    /**
+     * 保存学生评测文件
+     * @param studentNumber
+     * @param document
+     * @return
+     */
+    ArchivesDto saveArchiveScoresFile(String studentNumber, XWPFDocument document);
+
+    /**
+     * 保存学生档案文件
+     * @param studentNumber
+     * @param document
+     * @return
+     */
+    ArchivesDto saveArchiveStudentsFile(String studentNumber, XWPFDocument document);
+
+    /**
+     * 保存其他档案文件
+     * @param studentNumber
+     * @param stream
+     * @param type
+     * @return
+     */
+    ArchivesDto saveArchiveFile(String studentNumber, InputStream stream, String type);
+
+    /**
+     * 获取文件
+     * @param filePath
+     * @return
+     */
+    OutputStream getArchiveFile(String filePath);
+
+    /**
+     * 删除文件
+     * @param filePath
+     * @return
+     */
+    boolean deleteArchiveFile(String filePath);
+}

+ 1 - 1
service/src/main/java/com/koobietech/eas/service/EasStuProfileService.java

@@ -6,5 +6,5 @@ import com.koobietech.eas.mbg.model.EasArcTlsStudents;
 import java.io.FileNotFoundException;
 
 public interface EasStuProfileService {
-    JsonResult StuProfileDownload(EasArcTlsStudents easArcTlsStudents) throws FileNotFoundException;
+    JsonResult StuProfileDownload(EasArcTlsStudents easArcTlsStudents,Integer manager_id) throws FileNotFoundException;
 }

+ 79 - 0
service/src/main/java/com/koobietech/eas/service/impl/EasArchivesFilesServiceImpl.java

@@ -0,0 +1,79 @@
+package com.koobietech.eas.service.impl;
+
+import com.koobietech.eas.common.constant.FileType;
+import com.koobietech.eas.common.constant.FileTypeExt;
+import com.koobietech.eas.common.utils.FileManager;
+import com.koobietech.eas.common.utils.StudentArchiveGenerator;
+import com.koobietech.eas.dao.dto.ArchivesDto;
+import com.koobietech.eas.service.EasArchivesFilesService;
+import org.apache.poi.xwpf.usermodel.XWPFDocument;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.io.File;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Date;
+
+@Service
+public class EasArchivesFilesServiceImpl implements EasArchivesFilesService {
+
+    @Value("${project.path}")
+    String archivesSavePath;
+
+    @Resource
+    FileManager fileManager;
+
+    String separator = File.separator;
+
+    @Override
+    public ArchivesDto getArchiveStudentsFile(String studentNumber) {
+        return null;
+    }
+
+    @Override
+    public ArchivesDto saveArchiveAttendanceFile(String studentNumber, XWPFDocument document) {
+        String archiveCode = StudentArchiveGenerator.generateArchiveCode(studentNumber, FileType.XLSX.getValue());
+        String path = getArchivePath(studentNumber, archiveCode);
+        if ( fileManager.isFileExists(path) ) {
+            fileManager.moveFile( path,  path + (new Date()).getTime() + ".back", true );
+        }
+        boolean status = fileManager.saveDocument(document, path);
+        return new ArchivesDto(path, status, archiveCode, FileType.XLSX.getValue());
+    }
+
+    private String getArchivePath(String studentNumber, String archiveCode) {
+        String path = archivesSavePath + separator + studentNumber;
+        fileManager.createPath(path);
+        return path + separator + archiveCode + FileTypeExt.DOCX.getValue();
+    }
+
+    @Override
+    public ArchivesDto saveArchiveScoresFile(String studentNumber, XWPFDocument document) {
+        return null;
+    }
+
+    @Override
+    public ArchivesDto saveArchiveStudentsFile(String studentNumber, XWPFDocument document) {
+        String archiveCode = StudentArchiveGenerator.generateArchiveCode(studentNumber, FileType.DOCX.getValue());
+        String path = getArchivePath(studentNumber, archiveCode);
+        boolean status = fileManager.saveDocument(document, path);
+        return new ArchivesDto(path, status, archiveCode, FileType.DOCX.getValue());
+    }
+
+    @Override
+    public ArchivesDto saveArchiveFile(String studentNumber, InputStream stream, String type) {
+        return null;
+    }
+
+    @Override
+    public OutputStream getArchiveFile(String filePath) {
+        return null;
+    }
+
+    @Override
+    public boolean deleteArchiveFile(String filePath) {
+        return false;
+    }
+}

+ 141 - 63
service/src/main/java/com/koobietech/eas/service/impl/EasStuProfileServiceImpl.java

@@ -1,20 +1,33 @@
 package com.koobietech.eas.service.impl;
 
+import com.koobietech.eas.common.constant.FileType;
 import com.koobietech.eas.common.result.JsonResult;
+import com.koobietech.eas.common.utils.DateUtils;
 import com.koobietech.eas.common.utils.StudentArchiveGenerator;
+import com.koobietech.eas.dao.dto.ArchivesDto;
+import com.koobietech.eas.mbg.mapper.EasArcArchivesMapper;
+import com.koobietech.eas.mbg.mapper.EasArcTlsStudentsMapper;
+import com.koobietech.eas.mbg.mapper.EasSysStudentMapper;
+import com.koobietech.eas.mbg.model.EasArcArchives;
 import com.koobietech.eas.mbg.model.EasArcTlsStudents;
+import com.koobietech.eas.mbg.model.EasSysStudent;
+import com.koobietech.eas.service.EasArchivesFilesService;
 import com.koobietech.eas.service.EasStuProfileService;
 import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
+import org.apache.poi.util.Units;
 import org.apache.poi.xwpf.usermodel.XWPFDocument;
 import org.apache.poi.xwpf.usermodel.XWPFTable;
 import org.apache.poi.xwpf.usermodel.XWPFTableCell;
 import org.apache.poi.xwpf.usermodel.XWPFTableRow;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.apache.poi.util.Units;
+import org.springframework.beans.BeanUtils;
+import org.springframework.security.crypto.password.PasswordEncoder;
 import org.springframework.stereotype.Service;
 
-import java.io.*;
+import javax.annotation.Resource;
+import java.io.IOException;
+import java.io.InputStream;
 import java.util.*;
 
 @Service
@@ -23,56 +36,115 @@ public class EasStuProfileServiceImpl implements EasStuProfileService {
     private static final Logger LOGGER = LoggerFactory.getLogger(EasStuProfileServiceImpl.class);
     private static final String TEMPLATE_PATH = "temp/StuRegistTemp.docx";
     private static final String PHOTO_PATH = "temp/kun.jpeg";
-    private static final String OUTPUT_PATH = "D:\\myDesk\\test.docx";
+
+    @Resource
+    private EasArcTlsStudentsMapper easArcTlsStudentsMapper;
+
+    @Resource
+    private PasswordEncoder passwordEncoder;
+
+    @Resource
+    private EasSysStudentMapper easSysStudentMapper;
+
+    @Resource
+    private EasArcArchivesMapper easArcArchivesMapper;
+
+    @Resource
+    private EasArchivesFilesService easArchivesFilesService;
 
     @Override
-    public JsonResult StuProfileDownload(EasArcTlsStudents easArcTlsStudents) {
+    public JsonResult StuProfileDownload(EasArcTlsStudents easArcTlsStudents,Integer manager_id) {
         LOGGER.info("开始学员档案导出:{}", easArcTlsStudents);
 
         try (InputStream wordStream = getClass().getClassLoader().getResourceAsStream(TEMPLATE_PATH)) {
             assert wordStream != null;
-            XWPFDocument doc = new XWPFDocument(wordStream);
-
-            Map<String, Object> map = new HashMap<>();
-            map.put("student_name", easArcTlsStudents.getStudentName());
-            map.put("gender", easArcTlsStudents.getGender());
-            map.put("major", easArcTlsStudents.getMajor());
-            map.put("grade", easArcTlsStudents.getGrade());
-            map.put("enrollment_date", easArcTlsStudents.getEnrollmentDate());
-            map.put("phone", easArcTlsStudents.getPhone());
-            map.put("university", easArcTlsStudents.getUniversity());
-
-            InputStream photo = getClass().getClassLoader().getResourceAsStream(PHOTO_PATH);
-            System.out.println( photo );
-            map.put("avatar", photo);
-
-            /**
-             public static String generateStudentCode(String studentNumber, String studentId, String schoolName, String enrollmentDate) {
-             LocalDate localDateEnrollmentDate = LocalDate.of(Integer.parseInt(enrollmentDate), 1, 1);
-             String studentAge = String.valueOf(getStudentAge(studentId));
-             String studentNum = getStudentNum(studentNumber);
-             String studentGender = getStudentGender(studentId).substring(0, 1); // 取性别代码的首字母
-             String graduationDate = String.valueOf(getStudentGraduationDate(localDateEnrollmentDate).getYear());
-
-             String studentCode = STUDENT_CODE_PEREFIX + studentNum + studentAge +
-             studentGender + graduationDate + schoolName;
-
-             // 如果生成的档案编码长度不足,用UUID填充
-             if (studentCode.length() < STUDENT_CODE_LENGTH) {
-             studentCode += UUID.randomUUID().toString()
-             .substring(0, STUDENT_CODE_LENGTH - studentCode.length());
-             }
-             return studentCode;
-             }
-             */
-            //使用工具类生成学员档案号
-            String student_number = StudentArchiveGenerator.generateStudentCode(
-                    "", "232126199003194781", "11273", "2023");
-
-
-            replacePlaceholders(doc, map);
-
-            saveDocument(doc);
+            try (XWPFDocument doc = new XWPFDocument(wordStream)) {
+
+                Map<String, Object> map = new HashMap<>();
+                map.put("student_name", easArcTlsStudents.getStudentName());
+
+                //调用内部类方法 把MF转换成 男女
+                map.put("gender", convertToGender(easArcTlsStudents.getGender()));
+
+                map.put("major", easArcTlsStudents.getMajor());
+                map.put("grade", easArcTlsStudents.getGrade());
+
+                //调用自定义的时间格式转换器 把前端传过来的带时分秒时间转换成 2019年12月12日
+                map.put("enrollment_date", DateUtils.convertToYearMonthDay(easArcTlsStudents.getEnrollmentDate()));
+
+                map.put("phone", easArcTlsStudents.getPhone());
+                map.put("university", easArcTlsStudents.getUniversity());
+                map.put("student_idnumber", easArcTlsStudents.getStudentIdnumber());
+                map.put("avatar", getClass().getClassLoader().getResourceAsStream(PHOTO_PATH));
+
+                //调用内部类方法 生成学号
+                String studentNumber = generateStudentNumber(easArcTlsStudents);
+                map.put("student_number", studentNumber);
+
+                replacePlaceholders(doc, map);
+                //saveDocument(doc);
+
+                //将easArcTlsStudents 保存到数据库
+                easArcTlsStudentsMapper.insert(easArcTlsStudents);
+
+                //使用BeanUtils 将easArcTlsStudents 转换成 eassysstudent
+                EasSysStudent easSysStudents = new EasSysStudent();
+                BeanUtils.copyProperties(easArcTlsStudents,easSysStudents);
+                //设置初始密码 使用 passwordEncoder 设置初始密码为123456
+                easSysStudents.setPasswd(passwordEncoder.encode("123456"));
+                easSysStudents.setDisabled("N");
+
+                easSysStudentMapper.insert(easSysStudents);
+
+                //组合成档案对象 保存到数据库
+                /**
+                 CREATE TABLE `eas_arc_archives` (
+            1     `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+            1     `archive_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '文件电子档案号',
+            1     `student_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '当前电子档案归属那一个学员档案下',
+            1     `file_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '文件存储的路径',
+            1     `arctype` int(11) DEFAULT NULL COMMENT '文件类型Id',
+            1     `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+            1     `modify_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
+            1     `validity_time` datetime DEFAULT NULL COMMENT '档案有效期截至时间',
+            1     `manager_id` int(11) DEFAULT NULL COMMENT '档案归属负责人',
+            ?     `create_date` date DEFAULT NULL COMMENT '档案创建时间, 用于文件归档用',
+            ?     `create_uid` int(11) DEFAULT NULL COMMENT '创建用户ID',
+                 PRIMARY KEY (`id`) USING BTREE
+                 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='文件档案表';
+                 */
+                String archiveCode = StudentArchiveGenerator.generateArchiveCode(studentNumber, String.valueOf(FileType.DOCX));
+                ArchivesDto archivesDto = easArchivesFilesService.saveArchiveStudentsFile(easArcTlsStudents.getStudentIdnumber(), doc);
+                String filePath = archivesDto.getPath();
+                String arctype = archivesDto.getFileType();
+                Date creat_time = DateUtils.convertToYearMonthDayToDate(new Date());
+                Date modify_time = new Date();
+
+                //validity_time 暂且设置成create_date + 1年
+                Calendar calendar = Calendar.getInstance();
+                calendar.setTime(creat_time);
+                calendar.add(Calendar.YEAR, 1);
+                Date create_date = calendar.getTime();
+
+                int create_uid = 0;
+
+                EasArcArchives easArcArchives = new EasArcArchives();
+                easArcArchives.setArchiveNumber(archiveCode);
+                easArcArchives.setStudentNumber(studentNumber);
+                easArcArchives.setFilePath(filePath);
+                easArcArchives.setArctype(arctype);
+                easArcArchives.setCreateTime(creat_time);
+                easArcArchives.setModifyTime(modify_time);
+                easArcArchives.setValidityTime(create_date);
+                easArcArchives.setManagerId(manager_id);
+                easArcArchives.setCreateUid(create_uid);
+                easArcArchives.setCreateDate(new Date());
+
+                easArcArchivesMapper.insert(easArcArchives);
+
+
+
+            }
         } catch (IOException e) {
             LOGGER.error("学员档案导出失败:{}", e.getMessage(), e);
             return JsonResult.fail("学员档案导出失败!");
@@ -82,16 +154,29 @@ public class EasStuProfileServiceImpl implements EasStuProfileService {
         return JsonResult.ok("学员档案导出成功!");
     }
 
+    private String generateStudentNumber(EasArcTlsStudents easArcTlsStudents) {
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(easArcTlsStudents.getEnrollmentDate());
+        String year = String.valueOf(calendar.get(Calendar.YEAR));
+
+        return StudentArchiveGenerator.generateStudentCode(
+                "", easArcTlsStudents.getStudentIdnumber(), easArcTlsStudents.getUniversity(), year);
+    }
+
+    private String convertToGender(String gender) {
+        if (gender.equals("M")) {
+            return "男";
+        } else if (gender.equals("F")) {
+            return "女";
+        } else {
+            return "未知";
+        }
+    }
+
     private void replacePlaceholders(XWPFDocument document, Map<String, Object> map) {
-        Iterator<XWPFTable> it = document.getTablesIterator();
-
-        while (it.hasNext()) {
-            XWPFTable table = it.next();
-            int rcount = table.getNumberOfRows();
-            for (int n = 0; n < rcount; n++) {
-                XWPFTableRow wrow = table.getRow(n);
-                List<XWPFTableCell> cells = wrow.getTableCells();
-                for (XWPFTableCell cell : cells) {
+        for (XWPFTable table : document.getTables()) {
+            for (XWPFTableRow row : table.getRows()) {
+                for (XWPFTableCell cell : row.getTableCells()) {
                     String cellText = cell.getText();
                     if (!cellText.contains("${")) {
                         continue;
@@ -102,7 +187,6 @@ public class EasStuProfileServiceImpl implements EasStuProfileService {
                             try {
                                 cell.removeParagraph(0);
                                 if (value instanceof InputStream) {
-                                    //如果是放置图片的单元格,在这里添加一个计算图片合适大小的方法,按比例
                                     cell.addParagraph().createRun().addPicture((InputStream) value,
                                             XWPFDocument.PICTURE_TYPE_JPEG, "avatar.jpg",
                                             Units.pixelToEMU(110), Units.pixelToEMU(140));
@@ -118,12 +202,6 @@ public class EasStuProfileServiceImpl implements EasStuProfileService {
             }
         }
     }
-
-    private void saveDocument(XWPFDocument document) throws IOException {
-        try (FileOutputStream outputStream = new FileOutputStream(OUTPUT_PATH)) {
-            document.write(outputStream);
-        }
-    }
+}
 
 
-}