1
0
xiatian 8 часов назад
Родитель
Сommit
de2d1977e0
30 измененных файлов с 499 добавлено и 441 удалено
  1. 2 0
      install/mysql/init/stmms_ft.sql
  2. 2 0
      install/mysql/upgrade/2.0.0.sql
  3. 20 0
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/enums/ExportColsType.java
  4. 1 1
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/impl/ExamStudentServiceImpl.java
  5. 2 2
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/impl/ExamSubjectServiceImpl.java
  6. 1 1
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/impl/ScoreVerifyServiceImpl.java
  7. 0 70
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exception/StatusException.java
  8. 336 312
      stmms-biz/src/main/java/cn/com/qmth/stmms/biz/user/model/User.java
  9. 2 2
      stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/ScoreVerifyController.java
  10. 19 9
      stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/BaseApiController.java
  11. 1 1
      stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/ArbitrateController.java
  12. 1 1
      stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/ImageCheckController.java
  13. 1 1
      stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/InspectImportController.java
  14. 1 1
      stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/InspectedController.java
  15. 1 1
      stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/LibraryController.java
  16. 1 1
      stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/MarkQualityController.java
  17. 1 1
      stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/MarkerController.java
  18. 1 1
      stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/ProblemTypeController.java
  19. 1 1
      stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/RejectController.java
  20. 1 1
      stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/RejectTypeController.java
  21. 1 1
      stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/RoleController.java
  22. 1 1
      stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/SchoolController.java
  23. 1 1
      stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/ScoreController.java
  24. 1 1
      stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/ScoreVerifyController.java
  25. 1 1
      stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/SystemAuthController.java
  26. 1 1
      stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/SystemConfigController.java
  27. 21 17
      stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/SystemController.java
  28. 1 1
      stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/TrialController.java
  29. 72 6
      stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/UserController.java
  30. 4 4
      stmms-web/src/main/java/cn/com/qmth/stmms/common/StatusResponse.java

+ 2 - 0
install/mysql/init/stmms_ft.sql

@@ -106,6 +106,8 @@ CREATE TABLE `b_user`
     `description`               varchar(128) DEFAULT NULL COMMENT '描述',
     `empno`                     varchar(128) DEFAULT NULL COMMENT '工号',
     `random_password`           varchar(64)  DEFAULT NULL COMMENT '随机密码',
+    `student_export_cols`        varchar(500) DEFAULT NULL COMMENT '学生列表导出表头',
+    `score_export_cols`        varchar(500) DEFAULT NULL COMMENT '成绩列表导出表头',
     PRIMARY KEY (`id`),
     UNIQUE KEY `index1` (`login_name`),
     UNIQUE KEY `index2` (`school_id`, `related_account`),

+ 2 - 0
install/mysql/upgrade/2.0.0.sql

@@ -9,6 +9,8 @@ ALTER TABLE eb_exam ADD COLUMN `barcode_ai_check` tinyint(1)  NOT NULL DEFAULT 0
 ALTER TABLE eb_exam ADD COLUMN `answer_ai_check` tinyint(1)  NOT NULL DEFAULT 0 COMMENT '启用题卡作答AI检测';
 ALTER TABLE eb_exam ADD COLUMN `ai_check_finish_time`           datetime     DEFAULT NULL COMMENT 'AI检测完成时间';
 
+ALTER TABLE b_user ADD COLUMN   `student_export_cols`        varchar(500) DEFAULT NULL COMMENT '学生列表导出表头',
+ALTER TABLE b_user ADD COLUMN   `score_export_cols`        varchar(500) DEFAULT NULL COMMENT '成绩列表导出表头',
 
 ALTER TABLE eb_marker ADD COLUMN `wait_arbitrate_count` int(11)     DEFAULT NULL COMMENT '待仲裁数';
 

+ 20 - 0
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/enums/ExportColsType.java

@@ -0,0 +1,20 @@
+package cn.com.qmth.stmms.biz.exam.enums;
+
+/**
+ * 导出表头类型
+ */
+public enum ExportColsType {
+
+    STUDENT("考生表头"), SCORE("成绩表头"),;
+
+    private String name;
+
+    private ExportColsType(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+}

+ 1 - 1
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/impl/ExamStudentServiceImpl.java

@@ -55,7 +55,7 @@ import cn.com.qmth.stmms.biz.exam.service.ExamService;
 import cn.com.qmth.stmms.biz.exam.service.ExamStudentService;
 import cn.com.qmth.stmms.biz.exam.service.ExamSubjectService;
 import cn.com.qmth.stmms.biz.exam.service.MarkGroupService;
-import cn.com.qmth.stmms.biz.exception.StatusException;
+import com.qmth.boot.core.exception.StatusException;
 import cn.com.qmth.stmms.biz.mark.dao.HeaderTagDao;
 import cn.com.qmth.stmms.biz.mark.dao.HeaderTrackDao;
 import cn.com.qmth.stmms.biz.mark.model.HeaderTag;

+ 2 - 2
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/impl/ExamSubjectServiceImpl.java

@@ -40,7 +40,7 @@ import cn.com.qmth.stmms.biz.exam.service.ExamStudentService;
 import cn.com.qmth.stmms.biz.exam.service.ExamSubjectService;
 import cn.com.qmth.stmms.biz.exam.service.MarkGroupService;
 import cn.com.qmth.stmms.biz.exam.service.query.ExamSubjectSearchQuery;
-import cn.com.qmth.stmms.biz.exception.StatusException;
+import com.qmth.boot.core.exception.StatusException;
 import cn.com.qmth.stmms.biz.file.enums.FormatType;
 import cn.com.qmth.stmms.biz.mark.model.PictureConfigItem;
 import cn.com.qmth.stmms.biz.utils.DoubleUtil;
@@ -452,7 +452,7 @@ public class ExamSubjectServiceImpl extends BaseQueryService<ExamSubject> implem
         try {
             disposeSplit(schoolId, examId, list);
         } catch (StatusException e) {
-            err.append(e.getDesc());
+            err.append(e.getMessage());
             TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
         } catch (Exception e) {
             err.append("导入出错:" + e.getMessage());

+ 1 - 1
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exam/service/impl/ScoreVerifyServiceImpl.java

@@ -28,7 +28,7 @@ import cn.com.qmth.stmms.biz.exam.query.ScoreVerifyQuery;
 import cn.com.qmth.stmms.biz.exam.service.ExamService;
 import cn.com.qmth.stmms.biz.exam.service.ExamStudentService;
 import cn.com.qmth.stmms.biz.exam.service.ScoreVerifyService;
-import cn.com.qmth.stmms.biz.exception.StatusException;
+import com.qmth.boot.core.exception.StatusException;
 import cn.com.qmth.stmms.biz.file.service.FileService;
 import cn.com.qmth.stmms.biz.utils.Calculator;
 import cn.com.qmth.stmms.biz.utils.ScoreItem;

+ 0 - 70
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/exception/StatusException.java

@@ -1,70 +0,0 @@
-package cn.com.qmth.stmms.biz.exception;
-
-public class StatusException extends RuntimeException {
-
-    private static final long serialVersionUID = 5003047488500388819L;
-
-    private static final String DEF_CODE = "500";
-
-    /**
-     * 追踪ID
-     */
-    private String traceId;
-
-    /**
-     * 状态码
-     */
-    private String code;
-
-    /**
-     * 状态描述
-     */
-    private String desc;
-
-    /**
-     * 构造函数
-     */
-    public StatusException(String code, String desc) {
-        super("[code: " + code + "; desc: " + desc + "]");
-        this.code = code;
-        this.desc = desc;
-    }
-
-    /**
-     * 构造函数
-     */
-    public StatusException(String code, String desc, Throwable cause) {
-        super("[code: " + code + "; desc: " + desc + "]", cause);
-        this.code = code;
-        this.desc = desc;
-    }
-
-    public StatusException(String desc) {
-        super("[code: " + DEF_CODE + "; desc: " + desc + "]");
-        this.code = DEF_CODE;
-        this.desc = desc;
-    }
-
-    public StatusException(String desc, Throwable cause) {
-        super("[code: " + DEF_CODE + "; desc: " + desc + "]", cause);
-        this.code = DEF_CODE;
-        this.desc = desc;
-    }
-
-    public String getCode() {
-        return code;
-    }
-
-    public String getDesc() {
-        return desc;
-    }
-
-    public String getTraceId() {
-        return traceId;
-    }
-
-    public void setTraceId(String traceId) {
-        this.traceId = traceId;
-    }
-
-}

+ 336 - 312
stmms-biz/src/main/java/cn/com/qmth/stmms/biz/user/model/User.java

@@ -1,312 +1,336 @@
-package cn.com.qmth.stmms.biz.user.model;
-
-import java.io.Serializable;
-import java.util.Calendar;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import javax.persistence.Transient;
-
-import cn.com.qmth.stmms.common.annotation.ExcelField;
-import cn.com.qmth.stmms.common.enums.Role;
-import cn.com.qmth.stmms.common.enums.UserSource;
-import cn.com.qmth.stmms.common.utils.AccessControlUtils;
-
-@Entity
-@Table(name = "b_user")
-public class User implements Serializable {
-
-    private static final long serialVersionUID = -2094897723165518198L;
-
-    public static final int ACCESS_TOKEN_EXPIRE_SECOND = 3600 * 24;
-
-    /**
-     * 主键
-     */
-    @Id
-    @GeneratedValue
-    private Integer id;
-
-    /**
-     * 登录名
-     */
-    @ExcelField(title = "登录名", align = 2, sort = 10)
-    @Column(name = "login_name", length = 64, nullable = false)
-    private String loginName;
-
-    /**
-     * 名称
-     */
-    @ExcelField(title = "名称", align = 2, sort = 20)
-    @Column(name = "name", length = 64, nullable = false)
-    private String name;
-
-    /**
-     * 密码
-     */
-    @Column(name = "password", length = 64, nullable = false)
-    private String password;
-
-    /**
-     * 角色
-     */
-    @Column(name = "role", length = 16, nullable = false)
-    @Enumerated(EnumType.STRING)
-    private Role role;
-
-    /**
-     * 来源
-     */
-    @Column(name = "source", length = 16, nullable = false)
-    @Enumerated(EnumType.STRING)
-    private UserSource source;
-
-    /**
-     * 状态
-     */
-    @Column(name = "enable", nullable = false)
-    private boolean enable;
-
-    /**
-     * 所属学校ID
-     */
-    @Column(name = "school_id", nullable = false)
-    private Integer schoolId;
-
-    /**
-     * 关联的外部用户标识
-     */
-    @Column(name = "related_account", length = 64, nullable = true)
-    private String relatedAccount;
-
-    /**
-     * 最后一次登录时间
-     */
-    @Column(name = "last_login_time", nullable = true)
-    private Date lastLoginTime;
-
-    /**
-     * 最后一次登录IP
-     */
-    @Column(name = "last_login_ip", length = 64, nullable = true)
-    private String lastLoginIp;
-
-    @Column(name = "created_time", nullable = false)
-    private Date createdTime;
-
-    @Column(name = "updated_time", nullable = false)
-    private Date updatedTime;
-
-    /**
-     * 访问令牌
-     */
-    @Column(name = "access_token", length = 64, nullable = true)
-    private String accessToken;
-
-    /**
-     * 访问令牌的刷新时间
-     */
-    @Column(name = "access_token_refresh_time", nullable = true)
-    private Date accessTokenRefreshTime;
-
-    @Column(name = "scan_token", length = 64, nullable = true)
-    private String scanToken;
-
-    @Column(name = "scan_token_invalid_time", nullable = true)
-    private Date scanTokenInvalidTime;
-
-    @Column(name = "description", length = 128, nullable = true)
-    private String description;
-
-    /**
-     * 随机密码
-     */
-    @Column(name = "random_password", length = 64, nullable = true)
-    private String randomPassword;
-
-    /**
-     * 工号
-     */
-    @Column(name = "empno", length = 64, nullable = true)
-    private String empno;
-
-    @ExcelField(title = "角色", align = 2, sort = 30)
-    @Transient
-    private String roleName;
-
-    public Integer getId() {
-        return id;
-    }
-
-    public void setId(Integer id) {
-        this.id = id;
-    }
-
-    public String getLoginName() {
-        return loginName;
-    }
-
-    public void setLoginName(String loginName) {
-        this.loginName = loginName;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    public void setPassword(String password) {
-        this.password = password;
-    }
-
-    public Role getRole() {
-        return role;
-    }
-
-    public void setRole(Role role) {
-        this.role = role;
-    }
-
-    public Integer getSchoolId() {
-        return schoolId;
-    }
-
-    public void setSchoolId(Integer schoolId) {
-        this.schoolId = schoolId;
-    }
-
-    public Date getLastLoginTime() {
-        return lastLoginTime;
-    }
-
-    public void setLastLoginTime(Date lastLoginTime) {
-        this.lastLoginTime = lastLoginTime;
-    }
-
-    public String getLastLoginIp() {
-        return lastLoginIp;
-    }
-
-    public void setLastLoginIp(String lastLoginIp) {
-        this.lastLoginIp = lastLoginIp;
-    }
-
-    public Date getCreatedTime() {
-        return createdTime;
-    }
-
-    public void setCreatedTime(Date createdTime) {
-        this.createdTime = createdTime;
-    }
-
-    public Date getUpdatedTime() {
-        return updatedTime;
-    }
-
-    public void setUpdatedTime(Date updatedTime) {
-        this.updatedTime = updatedTime;
-    }
-
-    public UserSource getSource() {
-        return source;
-    }
-
-    public void setSource(UserSource source) {
-        this.source = source;
-    }
-
-    public String getRelatedAccount() {
-        return relatedAccount;
-    }
-
-    public void setRelatedAccount(String relatedAccount) {
-        this.relatedAccount = relatedAccount;
-    }
-
-    public boolean isEnable() {
-        return enable;
-    }
-
-    public void setEnable(boolean enable) {
-        this.enable = enable;
-    }
-
-    public String getAccessToken() {
-        return accessToken;
-    }
-
-    public Date getAccessTokenRefreshTime() {
-        return accessTokenRefreshTime;
-    }
-
-    public void refreshAccessToken() {
-        this.accessToken = AccessControlUtils.randomString();
-        this.accessTokenRefreshTime = new Date();
-    }
-
-    public String getAccount() {
-        return source == UserSource.INTERNAL ? loginName : relatedAccount;
-    }
-
-    public String getRoleName() {
-        return roleName;
-    }
-
-    public void setRoleName(String roleName) {
-        this.roleName = roleName;
-    }
-
-    public String getScanToken() {
-        return scanToken;
-    }
-
-    public Date getScanTokenInvalidTime() {
-        return scanTokenInvalidTime;
-    }
-
-    public void refreshScanToken() {
-        this.scanToken = AccessControlUtils.randomString();
-        Calendar rightNow = Calendar.getInstance();
-        rightNow.setTime(new Date());
-        rightNow.add(Calendar.DAY_OF_YEAR, +2);
-        this.scanTokenInvalidTime = rightNow.getTime();
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public String getRandomPassword() {
-        return randomPassword;
-    }
-
-    public void setRandomPassword(String randomPassword) {
-        this.randomPassword = randomPassword;
-    }
-
-    public String getEmpno() {
-        return empno;
-    }
-
-    public void setEmpno(String empno) {
-        this.empno = empno;
-    }
-
-}
+package cn.com.qmth.stmms.biz.user.model;
+
+import java.io.Serializable;
+import java.util.Calendar;
+import java.util.Date;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.EnumType;
+import javax.persistence.Enumerated;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+
+import cn.com.qmth.stmms.common.annotation.ExcelField;
+import cn.com.qmth.stmms.common.enums.Role;
+import cn.com.qmth.stmms.common.enums.UserSource;
+import cn.com.qmth.stmms.common.utils.AccessControlUtils;
+
+@Entity
+@Table(name = "b_user")
+public class User implements Serializable {
+
+    private static final long serialVersionUID = -2094897723165518198L;
+
+    public static final int ACCESS_TOKEN_EXPIRE_SECOND = 3600 * 24;
+
+    /**
+     * 主键
+     */
+    @Id
+    @GeneratedValue
+    private Integer id;
+
+    /**
+     * 登录名
+     */
+    @ExcelField(title = "登录名", align = 2, sort = 10)
+    @Column(name = "login_name", length = 64, nullable = false)
+    private String loginName;
+
+    /**
+     * 名称
+     */
+    @ExcelField(title = "名称", align = 2, sort = 20)
+    @Column(name = "name", length = 64, nullable = false)
+    private String name;
+
+    /**
+     * 密码
+     */
+    @Column(name = "password", length = 64, nullable = false)
+    private String password;
+
+    /**
+     * 角色
+     */
+    @Column(name = "role", length = 16, nullable = false)
+    @Enumerated(EnumType.STRING)
+    private Role role;
+
+    /**
+     * 来源
+     */
+    @Column(name = "source", length = 16, nullable = false)
+    @Enumerated(EnumType.STRING)
+    private UserSource source;
+
+    /**
+     * 状态
+     */
+    @Column(name = "enable", nullable = false)
+    private boolean enable;
+
+    /**
+     * 所属学校ID
+     */
+    @Column(name = "school_id", nullable = false)
+    private Integer schoolId;
+
+    /**
+     * 关联的外部用户标识
+     */
+    @Column(name = "related_account", length = 64, nullable = true)
+    private String relatedAccount;
+
+    /**
+     * 最后一次登录时间
+     */
+    @Column(name = "last_login_time", nullable = true)
+    private Date lastLoginTime;
+
+    /**
+     * 最后一次登录IP
+     */
+    @Column(name = "last_login_ip", length = 64, nullable = true)
+    private String lastLoginIp;
+
+    @Column(name = "created_time", nullable = false)
+    private Date createdTime;
+
+    @Column(name = "updated_time", nullable = false)
+    private Date updatedTime;
+
+    /**
+     * 访问令牌
+     */
+    @Column(name = "access_token", length = 64, nullable = true)
+    private String accessToken;
+
+    /**
+     * 访问令牌的刷新时间
+     */
+    @Column(name = "access_token_refresh_time", nullable = true)
+    private Date accessTokenRefreshTime;
+
+    @Column(name = "scan_token", length = 64, nullable = true)
+    private String scanToken;
+
+    @Column(name = "scan_token_invalid_time", nullable = true)
+    private Date scanTokenInvalidTime;
+
+    @Column(name = "description", length = 128, nullable = true)
+    private String description;
+
+    /**
+     * 随机密码
+     */
+    @Column(name = "random_password", length = 64, nullable = true)
+    private String randomPassword;
+
+    /**
+     * 工号
+     */
+    @Column(name = "empno", length = 64, nullable = true)
+    private String empno;
+
+    // 学生列表导出表头
+    @Column(name = "student_export_cols")
+    private String studentExportCols;
+
+    // 成绩列表导出表头
+    @Column(name = "score_export_cols")
+    private String scoreExportCols;
+
+    @ExcelField(title = "角色", align = 2, sort = 30)
+    @Transient
+    private String roleName;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getLoginName() {
+        return loginName;
+    }
+
+    public void setLoginName(String loginName) {
+        this.loginName = loginName;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public Role getRole() {
+        return role;
+    }
+
+    public void setRole(Role role) {
+        this.role = role;
+    }
+
+    public Integer getSchoolId() {
+        return schoolId;
+    }
+
+    public void setSchoolId(Integer schoolId) {
+        this.schoolId = schoolId;
+    }
+
+    public Date getLastLoginTime() {
+        return lastLoginTime;
+    }
+
+    public void setLastLoginTime(Date lastLoginTime) {
+        this.lastLoginTime = lastLoginTime;
+    }
+
+    public String getLastLoginIp() {
+        return lastLoginIp;
+    }
+
+    public void setLastLoginIp(String lastLoginIp) {
+        this.lastLoginIp = lastLoginIp;
+    }
+
+    public Date getCreatedTime() {
+        return createdTime;
+    }
+
+    public void setCreatedTime(Date createdTime) {
+        this.createdTime = createdTime;
+    }
+
+    public Date getUpdatedTime() {
+        return updatedTime;
+    }
+
+    public void setUpdatedTime(Date updatedTime) {
+        this.updatedTime = updatedTime;
+    }
+
+    public UserSource getSource() {
+        return source;
+    }
+
+    public void setSource(UserSource source) {
+        this.source = source;
+    }
+
+    public String getRelatedAccount() {
+        return relatedAccount;
+    }
+
+    public void setRelatedAccount(String relatedAccount) {
+        this.relatedAccount = relatedAccount;
+    }
+
+    public boolean isEnable() {
+        return enable;
+    }
+
+    public void setEnable(boolean enable) {
+        this.enable = enable;
+    }
+
+    public String getAccessToken() {
+        return accessToken;
+    }
+
+    public Date getAccessTokenRefreshTime() {
+        return accessTokenRefreshTime;
+    }
+
+    public void refreshAccessToken() {
+        this.accessToken = AccessControlUtils.randomString();
+        this.accessTokenRefreshTime = new Date();
+    }
+
+    public String getAccount() {
+        return source == UserSource.INTERNAL ? loginName : relatedAccount;
+    }
+
+    public String getRoleName() {
+        return roleName;
+    }
+
+    public void setRoleName(String roleName) {
+        this.roleName = roleName;
+    }
+
+    public String getScanToken() {
+        return scanToken;
+    }
+
+    public Date getScanTokenInvalidTime() {
+        return scanTokenInvalidTime;
+    }
+
+    public void refreshScanToken() {
+        this.scanToken = AccessControlUtils.randomString();
+        Calendar rightNow = Calendar.getInstance();
+        rightNow.setTime(new Date());
+        rightNow.add(Calendar.DAY_OF_YEAR, +2);
+        this.scanTokenInvalidTime = rightNow.getTime();
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public String getRandomPassword() {
+        return randomPassword;
+    }
+
+    public void setRandomPassword(String randomPassword) {
+        this.randomPassword = randomPassword;
+    }
+
+    public String getEmpno() {
+        return empno;
+    }
+
+    public void setEmpno(String empno) {
+        this.empno = empno;
+    }
+
+    public String getStudentExportCols() {
+        return studentExportCols;
+    }
+
+    public void setStudentExportCols(String studentExportCols) {
+        this.studentExportCols = studentExportCols;
+    }
+
+    public String getScoreExportCols() {
+        return scoreExportCols;
+    }
+
+    public void setScoreExportCols(String scoreExportCols) {
+        this.scoreExportCols = scoreExportCols;
+    }
+
+}

+ 2 - 2
stmms-web/src/main/java/cn/com/qmth/stmms/admin/exam/ScoreVerifyController.java

@@ -29,7 +29,7 @@ import cn.com.qmth.stmms.biz.exam.service.ExamService;
 import cn.com.qmth.stmms.biz.exam.service.ExamStudentService;
 import cn.com.qmth.stmms.biz.exam.service.ExamSubjectService;
 import cn.com.qmth.stmms.biz.exam.service.ScoreVerifyService;
-import cn.com.qmth.stmms.biz.exception.StatusException;
+import com.qmth.boot.core.exception.StatusException;
 import cn.com.qmth.stmms.biz.file.service.FileService;
 import cn.com.qmth.stmms.biz.mark.model.Task;
 import cn.com.qmth.stmms.biz.mark.service.TaskService;
@@ -146,7 +146,7 @@ public class ScoreVerifyController extends BaseExamController {
                 model.addAttribute("needVerifyCount", 0);
             }
         } catch (StatusException e) {
-            model.addAttribute("errmsg", e.getDesc());
+            model.addAttribute("errmsg", e.getMessage());
             model.addAttribute("showType", "query");
             return "modules/exam/scoreVerify";
         }

+ 19 - 9
stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/BaseApiController.java

@@ -24,12 +24,13 @@ import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.ExceptionHandler;
 import org.springframework.web.bind.annotation.ResponseBody;
 
+import com.qmth.boot.core.exception.StatusException;
+
 import cn.com.qmth.stmms.admin.utils.SessionExamUtils;
 import cn.com.qmth.stmms.api.exception.ApiException;
 import cn.com.qmth.stmms.biz.exam.bean.ResultMessage;
 import cn.com.qmth.stmms.biz.exam.model.ExamSubject;
 import cn.com.qmth.stmms.biz.exam.service.ExamSubjectService;
-import cn.com.qmth.stmms.biz.exception.StatusException;
 import cn.com.qmth.stmms.biz.school.model.School;
 import cn.com.qmth.stmms.biz.school.service.SchoolService;
 import cn.com.qmth.stmms.common.StatusResponse;
@@ -42,6 +43,8 @@ public class BaseApiController extends BaseController {
 
     protected static final Logger log = LoggerFactory.getLogger(BaseApiController.class);
 
+    private static final String ERROR_MESSAGE_HEADER_KEY = "error-info";
+
     @Autowired
     private SchoolService schoolService;
 
@@ -51,23 +54,30 @@ public class BaseApiController extends BaseController {
     @ResponseBody
     @ExceptionHandler(Exception.class)
     public ResponseEntity<StatusResponse> handleException(Exception e, HttpServletRequest request) {
-        StatusResponse body = new StatusResponse("500", "系统异常");
+        StatusResponse body = new StatusResponse(500, "系统异常");
         return asResult(e, body, request);
     }
 
     @ResponseBody
     @ExceptionHandler(RuntimeException.class)
-    public ResponseEntity<StatusResponse> handleException(RuntimeException e, HttpServletRequest request) {
+    public ResponseEntity<StatusResponse> handleException(RuntimeException e, HttpServletRequest request,
+            HttpServletResponse response) {
         StatusResponse body = null;
 
         if (e instanceof StatusException) {
             StatusException se = (StatusException) e;
-            body = new StatusResponse(se.getCode(), se.getDesc());
-        } else if (e instanceof com.qmth.boot.core.exception.StatusException) {
-            com.qmth.boot.core.exception.StatusException se = (com.qmth.boot.core.exception.StatusException) e;
-            body = new StatusResponse(se.getCode() + "", se.getMessage());
+            body = new StatusResponse(se.getCode(), se.getMessage());
+        } else if (e instanceof ApiException) {
+            response.addHeader(ERROR_MESSAGE_HEADER_KEY, StringUtils.trimToEmpty(e.getMessage()));
+            ApiException teme = (ApiException) e;
+            try {
+                response.sendError(teme.getCode());
+                body = new StatusResponse(teme.getCode(), teme.getMessage());
+            } catch (IOException e1) {
+                log.error("api response senderror", e);
+            }
         } else {
-            body = new StatusResponse("500", "系统异常");
+            body = new StatusResponse(500, "系统异常");
         }
 
         return asResult(e, body, request);
@@ -75,7 +85,7 @@ public class BaseApiController extends BaseController {
 
     private ResponseEntity<StatusResponse> asResult(Throwable err, StatusResponse body, HttpServletRequest request) {
 
-        HttpStatus httpStatus = HttpStatus.SERVICE_UNAVAILABLE;
+        HttpStatus httpStatus = HttpStatus.INTERNAL_SERVER_ERROR;
 
         log.error(err.getMessage(), err);
 

+ 1 - 1
stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/ArbitrateController.java

@@ -25,7 +25,7 @@ import cn.com.qmth.stmms.biz.exam.model.ExamSubject;
 import cn.com.qmth.stmms.biz.exam.model.MarkGroup;
 import cn.com.qmth.stmms.biz.exam.service.ExamQuestionService;
 import cn.com.qmth.stmms.biz.exam.service.MarkGroupService;
-import cn.com.qmth.stmms.biz.exception.StatusException;
+import com.qmth.boot.core.exception.StatusException;
 import cn.com.qmth.stmms.biz.mark.model.ArbitrateHistory;
 import cn.com.qmth.stmms.biz.mark.query.ArbitrateHistorySearchQuery;
 import cn.com.qmth.stmms.biz.mark.service.ArbitrateHistoryService;

+ 1 - 1
stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/ImageCheckController.java

@@ -29,7 +29,7 @@ import cn.com.qmth.stmms.biz.exam.model.ExamSubject;
 import cn.com.qmth.stmms.biz.exam.query.ExamStudentSearchQuery;
 import cn.com.qmth.stmms.biz.exam.service.ExamService;
 import cn.com.qmth.stmms.biz.exam.service.ExamStudentService;
-import cn.com.qmth.stmms.biz.exception.StatusException;
+import com.qmth.boot.core.exception.StatusException;
 import cn.com.qmth.stmms.biz.file.service.FileService;
 import cn.com.qmth.stmms.biz.utils.PageUtil;
 import cn.com.qmth.stmms.common.annotation.Logging;

+ 1 - 1
stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/InspectImportController.java

@@ -31,7 +31,7 @@ import cn.com.qmth.stmms.biz.exam.model.ImportQuery;
 import cn.com.qmth.stmms.biz.exam.query.ExamStudentSearchQuery;
 import cn.com.qmth.stmms.biz.exam.service.ExamStudentService;
 import cn.com.qmth.stmms.biz.exam.service.ImportQueryService;
-import cn.com.qmth.stmms.biz.exception.StatusException;
+import com.qmth.boot.core.exception.StatusException;
 import cn.com.qmth.stmms.biz.utils.PageUtil;
 import cn.com.qmth.stmms.common.annotation.Logging;
 import cn.com.qmth.stmms.common.domain.ApiUser;

+ 1 - 1
stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/InspectedController.java

@@ -49,7 +49,7 @@ import cn.com.qmth.stmms.biz.exam.service.InspectHistoryService;
 import cn.com.qmth.stmms.biz.exam.service.InspectedService;
 import cn.com.qmth.stmms.biz.exam.service.OperationLogService;
 import cn.com.qmth.stmms.biz.exam.service.query.ExamSubjectSearchQuery;
-import cn.com.qmth.stmms.biz.exception.StatusException;
+import com.qmth.boot.core.exception.StatusException;
 import cn.com.qmth.stmms.biz.lock.LockService;
 import cn.com.qmth.stmms.biz.utils.PageUtil;
 import cn.com.qmth.stmms.common.annotation.Logging;

+ 1 - 1
stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/LibraryController.java

@@ -26,7 +26,7 @@ import cn.com.qmth.stmms.biz.exam.model.MarkGroup;
 import cn.com.qmth.stmms.biz.exam.model.Marker;
 import cn.com.qmth.stmms.biz.exam.service.MarkGroupService;
 import cn.com.qmth.stmms.biz.exam.service.MarkerService;
-import cn.com.qmth.stmms.biz.exception.StatusException;
+import com.qmth.boot.core.exception.StatusException;
 import cn.com.qmth.stmms.biz.lock.LockService;
 import cn.com.qmth.stmms.biz.mark.model.MarkLibrary;
 import cn.com.qmth.stmms.biz.mark.query.MarkLibrarySearchQuery;

+ 1 - 1
stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/MarkQualityController.java

@@ -39,7 +39,7 @@ import cn.com.qmth.stmms.biz.exam.service.ExamQuestionService;
 import cn.com.qmth.stmms.biz.exam.service.ExamSubjectService;
 import cn.com.qmth.stmms.biz.exam.service.MarkGroupService;
 import cn.com.qmth.stmms.biz.exam.service.MarkerService;
-import cn.com.qmth.stmms.biz.exception.StatusException;
+import com.qmth.boot.core.exception.StatusException;
 import cn.com.qmth.stmms.biz.lock.LockService;
 import cn.com.qmth.stmms.biz.mark.service.MarkLibraryService;
 import cn.com.qmth.stmms.biz.mark.thread.MarkQualityThread;

+ 1 - 1
stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/MarkerController.java

@@ -44,7 +44,7 @@ import cn.com.qmth.stmms.biz.exam.service.ExamSubjectService;
 import cn.com.qmth.stmms.biz.exam.service.MarkGroupService;
 import cn.com.qmth.stmms.biz.exam.service.MarkerClassService;
 import cn.com.qmth.stmms.biz.exam.service.MarkerService;
-import cn.com.qmth.stmms.biz.exception.StatusException;
+import com.qmth.boot.core.exception.StatusException;
 import cn.com.qmth.stmms.biz.lock.LockService;
 import cn.com.qmth.stmms.biz.mark.service.MarkLibraryService;
 import cn.com.qmth.stmms.biz.mark.service.MarkService;

+ 1 - 1
stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/ProblemTypeController.java

@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 
 import cn.com.qmth.stmms.api.controller.BaseApiController;
-import cn.com.qmth.stmms.biz.exception.StatusException;
+import com.qmth.boot.core.exception.StatusException;
 import cn.com.qmth.stmms.biz.mark.model.ProblemType;
 import cn.com.qmth.stmms.biz.mark.service.ProblemHistoryService;
 import cn.com.qmth.stmms.biz.mark.service.ProblemTypeService;

+ 1 - 1
stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/RejectController.java

@@ -32,7 +32,7 @@ import cn.com.qmth.stmms.biz.exam.service.ExamQuestionService;
 import cn.com.qmth.stmms.biz.exam.service.ExamSubjectService;
 import cn.com.qmth.stmms.biz.exam.service.MarkGroupService;
 import cn.com.qmth.stmms.biz.exam.service.MarkerService;
-import cn.com.qmth.stmms.biz.exception.StatusException;
+import com.qmth.boot.core.exception.StatusException;
 import cn.com.qmth.stmms.biz.mark.model.RejectHistory;
 import cn.com.qmth.stmms.biz.mark.query.RejectHistorySearchQuery;
 import cn.com.qmth.stmms.biz.mark.service.RejectHistoryService;

+ 1 - 1
stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/RejectTypeController.java

@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 
 import cn.com.qmth.stmms.api.controller.BaseApiController;
-import cn.com.qmth.stmms.biz.exception.StatusException;
+import com.qmth.boot.core.exception.StatusException;
 import cn.com.qmth.stmms.biz.mark.model.RejectType;
 import cn.com.qmth.stmms.biz.mark.service.ProblemHistoryService;
 import cn.com.qmth.stmms.biz.mark.service.RejectTypeService;

+ 1 - 1
stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/RoleController.java

@@ -24,7 +24,7 @@ import cn.com.qmth.stmms.biz.basic.service.PrivilegeService;
 import cn.com.qmth.stmms.biz.basic.service.RoleInfoService;
 import cn.com.qmth.stmms.biz.basic.service.RolePrivilegeService;
 import cn.com.qmth.stmms.biz.exam.bean.ResultMessage;
-import cn.com.qmth.stmms.biz.exception.StatusException;
+import com.qmth.boot.core.exception.StatusException;
 import cn.com.qmth.stmms.biz.utils.PageUtil;
 import cn.com.qmth.stmms.common.domain.ApiUser;
 import io.swagger.annotations.Api;

+ 1 - 1
stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/SchoolController.java

@@ -25,7 +25,7 @@ import cn.com.qmth.stmms.biz.exam.bean.ResultMessage;
 import cn.com.qmth.stmms.biz.exam.bean.SchoolDomain;
 import cn.com.qmth.stmms.biz.exam.bean.SchoolStatusVo;
 import cn.com.qmth.stmms.biz.exam.bean.SchoolVo;
-import cn.com.qmth.stmms.biz.exception.StatusException;
+import com.qmth.boot.core.exception.StatusException;
 import cn.com.qmth.stmms.biz.lock.LockService;
 import cn.com.qmth.stmms.biz.school.model.School;
 import cn.com.qmth.stmms.biz.school.query.SchoolSearchQuery;

+ 1 - 1
stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/ScoreController.java

@@ -35,7 +35,7 @@ import cn.com.qmth.stmms.biz.exam.service.ExamQuestionService;
 import cn.com.qmth.stmms.biz.exam.service.ExamService;
 import cn.com.qmth.stmms.biz.exam.service.ExamStudentService;
 import cn.com.qmth.stmms.biz.exam.service.ExamSubjectService;
-import cn.com.qmth.stmms.biz.exception.StatusException;
+import com.qmth.boot.core.exception.StatusException;
 import cn.com.qmth.stmms.biz.file.service.FileService;
 import cn.com.qmth.stmms.biz.utils.PageUtil;
 import cn.com.qmth.stmms.common.annotation.Logging;

+ 1 - 1
stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/ScoreVerifyController.java

@@ -19,7 +19,7 @@ import cn.com.qmth.stmms.biz.exam.bean.ResultMessage;
 import cn.com.qmth.stmms.biz.exam.bean.ScoreVerifyVo;
 import cn.com.qmth.stmms.biz.exam.query.ScoreVerifyQuery;
 import cn.com.qmth.stmms.biz.exam.service.ScoreVerifyService;
-import cn.com.qmth.stmms.biz.exception.StatusException;
+import com.qmth.boot.core.exception.StatusException;
 import cn.com.qmth.stmms.biz.utils.PageUtil;
 import cn.com.qmth.stmms.common.domain.ApiUser;
 import cn.com.qmth.stmms.common.utils.ExportExcel;

+ 1 - 1
stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/SystemAuthController.java

@@ -28,7 +28,7 @@ import cn.com.qmth.stmms.biz.config.service.SystemAuthService;
 import cn.com.qmth.stmms.biz.config.service.impl.SystemCache;
 import cn.com.qmth.stmms.biz.exam.bean.ResultMessage;
 import cn.com.qmth.stmms.biz.exam.bean.SystemAuthVo;
-import cn.com.qmth.stmms.biz.exception.StatusException;
+import com.qmth.boot.core.exception.StatusException;
 import cn.com.qmth.stmms.biz.school.service.SchoolService;
 import cn.com.qmth.stmms.biz.utils.AppLicenseUtil;
 import cn.com.qmth.stmms.biz.utils.SolarHttpUtil;

+ 1 - 1
stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/SystemConfigController.java

@@ -15,7 +15,7 @@ import cn.com.qmth.stmms.biz.config.model.SystemConfig;
 import cn.com.qmth.stmms.biz.config.service.SystemConfigService;
 import cn.com.qmth.stmms.biz.exam.bean.ResultMessage;
 import cn.com.qmth.stmms.biz.exam.bean.SystemConfigVo;
-import cn.com.qmth.stmms.biz.exception.StatusException;
+import com.qmth.boot.core.exception.StatusException;
 import cn.com.qmth.stmms.common.annotation.Logging;
 import cn.com.qmth.stmms.common.enums.ConfigType;
 import cn.com.qmth.stmms.common.enums.LogType;

+ 21 - 17
stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/SystemController.java

@@ -1,23 +1,11 @@
 package cn.com.qmth.stmms.api.controller.admin;
 
 import java.text.SimpleDateFormat;
-import java.util.Calendar;
 import java.util.Date;
-import java.util.List;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import cn.com.qmth.stmms.admin.utils.SessionExamUtils;
-import cn.com.qmth.stmms.biz.exam.model.Exam;
-import cn.com.qmth.stmms.biz.exam.model.MarkGroup;
-import cn.com.qmth.stmms.biz.exam.model.Marker;
-import cn.com.qmth.stmms.biz.exam.service.ExamService;
-import cn.com.qmth.stmms.biz.exam.service.MarkGroupService;
-import cn.com.qmth.stmms.biz.exam.service.MarkerService;
-import cn.com.qmth.stmms.biz.exam.service.SubjectUserService;
-import cn.com.qmth.stmms.common.domain.ApiUser;
-import cn.com.qmth.stmms.common.enums.MarkStatus;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -28,17 +16,28 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 
+import com.qmth.boot.core.exception.StatusException;
+
+import cn.com.qmth.stmms.admin.utils.SessionExamUtils;
 import cn.com.qmth.stmms.api.controller.BaseApiController;
 import cn.com.qmth.stmms.biz.config.service.impl.SystemCache;
 import cn.com.qmth.stmms.biz.exam.bean.ResultMessage;
 import cn.com.qmth.stmms.biz.exam.bean.SystemStatusVo;
-import cn.com.qmth.stmms.biz.exception.StatusException;
+import cn.com.qmth.stmms.biz.exam.model.Exam;
+import cn.com.qmth.stmms.biz.exam.model.MarkGroup;
+import cn.com.qmth.stmms.biz.exam.model.Marker;
+import cn.com.qmth.stmms.biz.exam.service.ExamService;
+import cn.com.qmth.stmms.biz.exam.service.MarkGroupService;
+import cn.com.qmth.stmms.biz.exam.service.MarkerService;
+import cn.com.qmth.stmms.biz.exam.service.SubjectUserService;
 import cn.com.qmth.stmms.biz.file.service.FileService;
 import cn.com.qmth.stmms.biz.user.model.User;
 import cn.com.qmth.stmms.biz.user.service.UserService;
 import cn.com.qmth.stmms.common.annotation.Logging;
+import cn.com.qmth.stmms.common.domain.ApiUser;
 import cn.com.qmth.stmms.common.domain.WebUser;
 import cn.com.qmth.stmms.common.enums.LogType;
+import cn.com.qmth.stmms.common.enums.MarkStatus;
 import cn.com.qmth.stmms.common.enums.Role;
 import cn.com.qmth.stmms.common.session.model.StmmsSession;
 import cn.com.qmth.stmms.common.session.service.SessionService;
@@ -48,7 +47,6 @@ import cn.com.qmth.stmms.common.utils.RequestUtils;
 import cn.com.qmth.stmms.common.utils.VersionInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import org.springframework.web.servlet.ModelAndView;
 
 @Api(tags = "系统配置和登录")
 @Controller("sysController")
@@ -62,6 +60,7 @@ public class SystemController extends BaseApiController {
 
     @Autowired
     private UserService userService;
+
     @Autowired
     private SubjectUserService subjectUserService;
 
@@ -70,10 +69,13 @@ public class SystemController extends BaseApiController {
 
     @Autowired
     private SessionService sessionService;
+
     @Autowired
     private ExamService examService;
+
     @Autowired
     private MarkerService markerService;
+
     @Autowired
     private MarkGroupService groupService;
 
@@ -124,7 +126,7 @@ public class SystemController extends BaseApiController {
                 && u.getRole() != Role.SYS_ADMIN) {
             throw new StatusException("系统授权已过期");
         }
-        if( u.getRole() == Role.SCHOOL_DEV ||u.getRole() == Role.SCANNER ||u.getRole() == Role.SCAN_ADMIN){
+        if (u.getRole() == Role.SCHOOL_DEV || u.getRole() == Role.SCANNER || u.getRole() == Role.SCAN_ADMIN) {
             throw new StatusException("用户角色不正确");
         }
         u.setLastLoginTime(new Date());
@@ -142,6 +144,7 @@ public class SystemController extends BaseApiController {
 
         return u;
     }
+
     @ApiOperation(value = "考试选择")
     @RequestMapping(value = "select/exam", method = RequestMethod.POST)
     @ResponseBody
@@ -154,7 +157,8 @@ public class SystemController extends BaseApiController {
     @ApiOperation(value = "分组选择")
     @RequestMapping(value = "select/group", method = RequestMethod.POST)
     @ResponseBody
-    public ResultMessage select(HttpServletRequest request, HttpServletResponse response, @RequestParam Integer markerId) {
+    public ResultMessage select(HttpServletRequest request, HttpServletResponse response,
+            @RequestParam Integer markerId) {
         Marker marker = markerService.findById(markerId);
         if (marker == null) {
             throw new StatusException("评卷分组不存在");
@@ -166,7 +170,7 @@ public class SystemController extends BaseApiController {
             SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
             String start = exam.getStartTime() == null ? "" : " 开始时间:" + sdf.format(exam.getStartTime());
             String end = exam.getEndTime() == null ? "" : " 结束时间:" + sdf.format(exam.getEndTime());
-            throw new StatusException("message", "不在评卷时间范围 " + start + " " + end);
+            throw new StatusException("不在评卷时间范围 " + start + " " + end);
         }
         MarkGroup group = groupService.findOne(marker.getExamId(), marker.getSubjectCode(), marker.getGroupNumber());
         if (group == null) {

+ 1 - 1
stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/TrialController.java

@@ -27,7 +27,7 @@ import cn.com.qmth.stmms.biz.exam.model.MarkGroup;
 import cn.com.qmth.stmms.biz.exam.model.Marker;
 import cn.com.qmth.stmms.biz.exam.query.MarkerSearchQuery;
 import cn.com.qmth.stmms.biz.exam.service.*;
-import cn.com.qmth.stmms.biz.exception.StatusException;
+import com.qmth.boot.core.exception.StatusException;
 import cn.com.qmth.stmms.biz.file.service.FileService;
 import cn.com.qmth.stmms.biz.lock.LockService;
 import cn.com.qmth.stmms.biz.mark.model.TrialLibrary;

+ 72 - 6
stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/admin/UserController.java

@@ -1,7 +1,15 @@
 package cn.com.qmth.stmms.api.controller.admin;
 
 import java.io.ByteArrayInputStream;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -31,21 +39,42 @@ import cn.com.qmth.stmms.biz.config.service.SystemAuthService;
 import cn.com.qmth.stmms.biz.exam.bean.AddStudentInfo;
 import cn.com.qmth.stmms.biz.exam.bean.ResultMessage;
 import cn.com.qmth.stmms.biz.exam.bean.UserStudentVo;
-import cn.com.qmth.stmms.biz.exam.model.*;
+import cn.com.qmth.stmms.biz.exam.enums.ExportColsType;
+import cn.com.qmth.stmms.biz.exam.model.ExamSubject;
+import cn.com.qmth.stmms.biz.exam.model.MarkGroup;
+import cn.com.qmth.stmms.biz.exam.model.Marker;
+import cn.com.qmth.stmms.biz.exam.model.MarkerClass;
+import cn.com.qmth.stmms.biz.exam.model.SubjectUser;
 import cn.com.qmth.stmms.biz.exam.query.MarkerSearchQuery;
-import cn.com.qmth.stmms.biz.exam.service.*;
+import cn.com.qmth.stmms.biz.exam.service.ExamQuestionService;
+import cn.com.qmth.stmms.biz.exam.service.ExamStudentService;
+import cn.com.qmth.stmms.biz.exam.service.ExamSubjectService;
+import cn.com.qmth.stmms.biz.exam.service.MarkGroupService;
+import cn.com.qmth.stmms.biz.exam.service.MarkerClassService;
+import cn.com.qmth.stmms.biz.exam.service.MarkerService;
+import cn.com.qmth.stmms.biz.exam.service.SubjectUserService;
+import cn.com.qmth.stmms.biz.exam.service.UserExamService;
+import cn.com.qmth.stmms.biz.exam.service.UserStudentService;
 import cn.com.qmth.stmms.biz.user.model.User;
 import cn.com.qmth.stmms.biz.user.service.UserService;
 import cn.com.qmth.stmms.biz.user.service.query.UserSearchQuery;
 import cn.com.qmth.stmms.biz.utils.PageUtil;
 import cn.com.qmth.stmms.common.annotation.Logging;
 import cn.com.qmth.stmms.common.domain.ApiUser;
-import cn.com.qmth.stmms.common.enums.*;
-import cn.com.qmth.stmms.common.utils.*;
+import cn.com.qmth.stmms.common.enums.LogType;
+import cn.com.qmth.stmms.common.enums.MarkerExcelError;
+import cn.com.qmth.stmms.common.enums.Role;
+import cn.com.qmth.stmms.common.enums.SystemAuthType;
+import cn.com.qmth.stmms.common.enums.UserSource;
+import cn.com.qmth.stmms.common.utils.Encodes;
+import cn.com.qmth.stmms.common.utils.EncryptUtils;
+import cn.com.qmth.stmms.common.utils.ExportExcel;
+import cn.com.qmth.stmms.common.utils.ImportExcel;
+import cn.com.qmth.stmms.common.utils.RequestIPUtil;
+import cn.com.qmth.stmms.common.utils.RequestUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import net.sf.json.JSONObject;
-import org.springframework.web.servlet.ModelAndView;
 
 @Api(tags = "用户管理")
 @Controller("adminUserController")
@@ -94,6 +123,43 @@ public class UserController extends BaseApiController {
     @Autowired
     private UserExamService userExamService;
 
+    @ApiOperation(value = "导出列表表头获取")
+    @RequestMapping(value = "export/cols/info", method = RequestMethod.POST)
+    @ResponseBody
+    public Set<String> exportColsInfo(@RequestParam ExportColsType type) {
+        ApiUser user = getApiUser();
+        Set<String> ret = new HashSet<>();
+        User u = userService.findById(user.getId());
+        if (ExportColsType.STUDENT.equals(type)) {
+            if (StringUtils.isBlank(u.getStudentExportCols())) {
+                return ret;
+            } else {
+                String[] ss = u.getStudentExportCols().split(",");
+                Collections.addAll(ret, ss);
+            }
+        } else if (ExportColsType.SCORE.equals(type)) {
+            if (StringUtils.isBlank(u.getScoreExportCols())) {
+                return ret;
+            } else {
+                String[] ss = u.getScoreExportCols().split(",");
+                Collections.addAll(ret, ss);
+            }
+        }
+        return ret;
+    }
+
+    @ApiOperation(value = "导出列表表头保存")
+    @RequestMapping(value = "export/cols/save", method = RequestMethod.POST)
+    @ResponseBody
+    public ResultMessage exportColsSave(@RequestParam ExportColsType type, @RequestParam Set<String> cols) {
+        ApiUser user = getApiUser();
+        if (ExportColsType.STUDENT.equals(type)) {
+            // userService.updateStudentCols(user.getId(), cols);
+        } else if (ExportColsType.SCORE.equals(type)) {
+        }
+        return resultOk();
+    }
+
     @ApiOperation(value = "用户查询")
     @RequestMapping(value = "/query", method = RequestMethod.POST)
     @ResponseBody

+ 4 - 4
stmms-web/src/main/java/cn/com/qmth/stmms/common/StatusResponse.java

@@ -7,7 +7,7 @@ public class StatusResponse implements JsonSerializable {
     private static final long serialVersionUID = 8393074113722405560L;
 
     @ApiModelProperty(value = "响应编码", example = "xxx", required = true)
-    private String code;
+    private int code;
 
     @ApiModelProperty(value = "响应描述", example = "具体描述信息", required = true)
     private String desc;
@@ -25,17 +25,17 @@ public class StatusResponse implements JsonSerializable {
      * @param code
      * @param desc
      */
-    public StatusResponse(String code, String desc) {
+    public StatusResponse(int code, String desc) {
         super();
         this.code = code;
         this.desc = desc;
     }
 
-    public String getCode() {
+    public int getCode() {
         return code;
     }
 
-    public void setCode(String code) {
+    public void setCode(int code) {
         this.code = code;
     }