Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dzx 1 year ago
parent
commit
0be5080e39
22 changed files with 1084 additions and 80 deletions
  1. 39 31
      src/main/java/com/xjrsoft/common/interceptor/MagicApiRequestInterceptor.java
  2. 0 31
      src/main/java/com/xjrsoft/module/liteflow/node/WfSkipGradeNode.java
  3. 101 0
      src/main/java/com/xjrsoft/module/student/controller/ClassHonorsController.java
  4. 68 0
      src/main/java/com/xjrsoft/module/student/dto/AddClassHonorsDto.java
  5. 40 0
      src/main/java/com/xjrsoft/module/student/dto/ClassHonorsPageDto.java
  6. 32 0
      src/main/java/com/xjrsoft/module/student/dto/UpdateClassHonorsDto.java
  7. 118 0
      src/main/java/com/xjrsoft/module/student/entity/ClassHonors.java
  8. 38 0
      src/main/java/com/xjrsoft/module/student/mapper/ClassHonorsMapper.java
  9. 44 0
      src/main/java/com/xjrsoft/module/student/service/IClassHonorsService.java
  10. 0 1
      src/main/java/com/xjrsoft/module/student/service/ISchoolRollFurtherEducationService.java
  11. 101 0
      src/main/java/com/xjrsoft/module/student/service/impl/ClassHonorsServiceImpl.java
  12. 68 0
      src/main/java/com/xjrsoft/module/student/vo/ClassHonorsPageVo.java
  13. 33 0
      src/main/java/com/xjrsoft/module/student/vo/ClassHonorsSemesterClassTreeVo.java
  14. 92 0
      src/main/java/com/xjrsoft/module/student/vo/ClassHonorsVo.java
  15. 6 10
      src/main/java/com/xjrsoft/module/system/service/impl/LoginServiceImpl.java
  16. 36 1
      src/main/java/com/xjrsoft/module/system/service/impl/SaOAuth2TemplateImpl.java
  17. 4 4
      src/main/resources/application-dev.yml
  18. 6 1
      src/main/resources/mapper/student/BaseStudentBehaviorManageMapper.xml
  19. 50 0
      src/main/resources/mapper/student/ClassHonorsMapper.xml
  20. 2 1
      src/main/resources/mapper/student/SchoolRollFurtherEducationMapper.xml
  21. 176 0
      src/main/resources/sqlScript/20231129_sql.sql
  22. 30 0
      src/test/java/com/xjrsoft/xjrsoftboot/FreeMarkerGeneratorTest.java

+ 39 - 31
src/main/java/com/xjrsoft/common/interceptor/MagicApiRequestInterceptor.java

@@ -4,9 +4,11 @@ import cn.dev33.satoken.exception.NotPermissionException;
 import cn.dev33.satoken.session.SaSession;
 import cn.dev33.satoken.stp.StpUtil;
 import cn.dev33.satoken.strategy.SaStrategy;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.xjrsoft.common.constant.GlobalConstant;
 import com.xjrsoft.common.enums.ResponseCode;
 import com.xjrsoft.common.model.result.R;
+import com.xjrsoft.module.organization.entity.UserRoleRelation;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Component;
 import org.ssssssss.magicapi.core.context.RequestEntity;
@@ -18,6 +20,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * magic-api 接口鉴权
@@ -28,40 +31,45 @@ import java.util.List;
 @Slf4j
 public class MagicApiRequestInterceptor implements RequestInterceptor {
 
-	/***
-	 * 接口请求之前
-	 * @param requestEntity
-	 * @return
-	 */
-	@Override
-	public Object preHandle(RequestEntity requestEntity) {
+    /***
+     * 接口请求之前
+     * @param requestEntity
+     * @return
+     */
+    @Override
+    public Object preHandle(RequestEntity requestEntity) {
 
-		if(!StpUtil.isLogin()){
-			return R.error(ResponseCode.UN_AUTHORIZED.getCode(),ResponseCode.UN_AUTHORIZED.getMessage());
-		}
-		SaSession tokenSession = StpUtil.getTokenSession();
-		List<Long> roleIds = tokenSession.get(GlobalConstant.LOGIN_USER_ROLE_ID_KEY, new ArrayList<>());
-		//非管理员需要进行权限验证
-		if(!roleIds.contains(GlobalConstant.SUPER_ADMIN_ROLE_ID)) {
-			if (!SaStrategy.me.hasElement.apply(tokenSession.get(GlobalConstant.LOGIN_USER_INTERFACE_AUTH_CODE_KEY, new ArrayList<>()), requestEntity.getApiInfo().getId())) {
-				return R.error(ResponseCode.MAGIC_API_UN_AUTHORIZED.getCode(), ResponseCode.MAGIC_API_UN_AUTHORIZED.getMessage());
-			}
-		}
-		return null;
-	}
+        if (!StpUtil.isLogin()) {
+            return R.error(ResponseCode.UN_AUTHORIZED.getCode(), ResponseCode.UN_AUTHORIZED.getMessage());
+        }
+        SaSession tokenSession = StpUtil.getTokenSession();
+        List<Long> roleIds = tokenSession.get(GlobalConstant.LOGIN_USER_ROLE_ID_KEY, new ArrayList<>());
+        if (roleIds.size() == 0) {
+            tokenSession = StpUtil.getSessionByLoginId(StpUtil.getLoginId());
+            roleIds = tokenSession.get(GlobalConstant.LOGIN_USER_ROLE_ID_KEY, new ArrayList<>());
+        }
+        //非管理员需要进行权限验证
+        if (!roleIds.contains(GlobalConstant.SUPER_ADMIN_ROLE_ID)) {
+            if (!SaStrategy.me.hasElement.apply(tokenSession.get(GlobalConstant.LOGIN_USER_INTERFACE_AUTH_CODE_KEY, new ArrayList<>()), requestEntity.getApiInfo().getId())) {
+                return R.error(ResponseCode.MAGIC_API_UN_AUTHORIZED.getCode(), ResponseCode.MAGIC_API_UN_AUTHORIZED.getMessage());
+            }
+        }
+        return null;
+    }
 
 
-	/**
-	 * 接口执行之后
-	 * @param requestEntity
-	 * @param returnValue
-	 * @return
-	 */
-	@Override
-	public Object postHandle(RequestEntity requestEntity, Object returnValue) {
-		log.info("{} 执行完毕,返回结果:{}", requestEntity.getApiInfo().getName(), returnValue);
-		return null;
-	}
+    /**
+     * 接口执行之后
+     *
+     * @param requestEntity
+     * @param returnValue
+     * @return
+     */
+    @Override
+    public Object postHandle(RequestEntity requestEntity, Object returnValue) {
+        log.info("{} 执行完毕,返回结果:{}", requestEntity.getApiInfo().getName(), returnValue);
+        return null;
+    }
 
 
 }

+ 0 - 31
src/main/java/com/xjrsoft/module/liteflow/node/WfSkipGradeNode.java

@@ -1,31 +0,0 @@
-package com.xjrsoft.module.liteflow.node;
-
-import cn.hutool.core.convert.Convert;
-import com.xjrsoft.module.student.service.IBaseStudentBehaviorClassRelationService;
-import com.yomahub.liteflow.core.NodeComponent;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.Map;
-
-/**
- * 学生跳级流程结束处理
- */
-@Component("Wf_skip_grade_node")
-public class WfSkipGradeNode extends NodeComponent {
-
-    @Autowired
-    private IBaseStudentBehaviorClassRelationService behaviorClassRelationService;
-
-    @Override
-    public void process() throws Exception {
-//        // 获取表单中数据编号
-//        Map<String, Object> params = this.getFirstContextBean();
-//        Object value = util.getFormDatKey(params,"id");
-//        Long formId = Convert.toLong(value);
-//        if (formId != null) {
-//            // 数据处理
-//            behaviorClassRelationService.dataCache(formId);
-//        }
-    }
-}

+ 101 - 0
src/main/java/com/xjrsoft/module/student/controller/ClassHonorsController.java

@@ -0,0 +1,101 @@
+package com.xjrsoft.module.student.controller;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.xjrsoft.common.page.ConventPage;
+import com.xjrsoft.common.page.PageOutput;
+import com.xjrsoft.common.model.result.RT;
+import com.xjrsoft.common.utils.VoToColumnUtil;
+import com.xjrsoft.module.student.dto.AddClassHonorsDto;
+import com.xjrsoft.module.student.dto.UpdateClassHonorsDto;
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import com.alibaba.excel.EasyExcel;
+import org.springframework.web.multipart.MultipartFile;
+import java.io.IOException;
+
+import com.xjrsoft.module.student.dto.ClassHonorsPageDto;
+import com.xjrsoft.module.student.entity.ClassHonors;
+import com.xjrsoft.module.student.service.IClassHonorsService;
+import com.xjrsoft.module.student.vo.ClassHonorsPageVo;
+
+import com.xjrsoft.module.student.vo.ClassHonorsVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+* @title: 班级荣誉
+* @Author szs
+* @Date: 2023-12-06
+* @Version 1.0
+*/
+@RestController
+@RequestMapping("/student" + "/classHonors")
+@Api(value = "/student"  + "/classHonors",tags = "班级荣誉代码")
+@AllArgsConstructor
+public class ClassHonorsController {
+
+
+    private final IClassHonorsService classHonorsService;
+
+    @GetMapping(value = "/page")
+    @ApiOperation(value="班级荣誉列表(分页)")
+    @SaCheckPermission("classhonors:detail")
+    public RT<PageOutput<ClassHonorsPageVo>> page(@Valid ClassHonorsPageDto dto){
+        IPage<ClassHonorsPageVo> page = classHonorsService.getPagePC(dto);
+        PageOutput<ClassHonorsPageVo> pageOutput = ConventPage.getPageOutput(page, ClassHonorsPageVo.class);
+        return RT.ok(pageOutput);
+    }
+
+    @GetMapping(value = "/info")
+    @ApiOperation(value="根据id查询班级荣誉信息")
+    @SaCheckPermission("classhonors:detail")
+    public RT<ClassHonorsVo> info(@RequestParam Long id){
+        ClassHonorsVo classHonorsVo = classHonorsService.getInfoById(id);
+        if (classHonorsVo == null) {
+           return RT.error("找不到此数据!");
+        }
+        return RT.ok(classHonorsVo);
+    }
+
+
+    @PostMapping
+    @ApiOperation(value = "新增班级荣誉")
+    @SaCheckPermission("classhonors:add")
+    public RT<Boolean> add(@Valid @RequestBody AddClassHonorsDto dto){
+        ClassHonors classHonors = BeanUtil.toBean(dto, ClassHonors.class);
+        boolean isSuccess = classHonorsService.save(classHonors);
+    return RT.ok(isSuccess);
+    }
+
+    @PutMapping
+    @ApiOperation(value = "修改班级荣誉")
+    @SaCheckPermission("classhonors:edit")
+    public RT<Boolean> update(@Valid @RequestBody UpdateClassHonorsDto dto){
+
+        ClassHonors classHonors = BeanUtil.toBean(dto, ClassHonors.class);
+        return RT.ok(classHonorsService.updateById(classHonors));
+
+    }
+
+    @DeleteMapping
+    @ApiOperation(value = "删除班级荣誉")
+    @SaCheckPermission("classhonors:delete")
+    public RT<Boolean> delete(@Valid @RequestBody List<Long> ids){
+        return RT.ok(classHonorsService.removeBatchByIds(ids));
+
+    }
+    @PostMapping("/import")
+    @ApiOperation(value = "导入")
+    public RT<Boolean> importData(@RequestParam MultipartFile file) throws IOException {
+        List<ClassHonorsPageVo> savedDataList = EasyExcel.read(file.getInputStream()).head(ClassHonorsPageVo.class).sheet().doReadSync();
+        Boolean result = classHonorsService.saveBatch(BeanUtil.copyToList(savedDataList, ClassHonors.class));
+        return RT.ok(result);
+    }
+
+}

+ 68 - 0
src/main/java/com/xjrsoft/module/student/dto/AddClassHonorsDto.java

@@ -0,0 +1,68 @@
+package com.xjrsoft.module.student.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Date;
+
+
+
+/**
+* @title: 班级荣誉
+* @Author szs
+* @Date: 2023-12-06
+* @Version 1.0
+*/
+@Data
+public class AddClassHonorsDto implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 序号
+    */
+    @ApiModelProperty("序号")
+    private Integer sortCode;
+    /**
+    * 学期ID(base_semester)
+    */
+    @ApiModelProperty("学期ID(base_semester)")
+    private Long baseSemesterId;
+    /**
+    * 班级id
+    */
+    @ApiModelProperty("班级id")
+    private Long classId;
+    /**
+    * 荣誉级别(xjr_dictionary_item[honors_level])
+    */
+    @ApiModelProperty("荣誉级别(xjr_dictionary_item[honors_level])")
+    private String honorsLevel;
+    /**
+    * 荣誉等级(xjr_dictionary_item[honors_grade])
+    */
+    @ApiModelProperty("荣誉等级(xjr_dictionary_item[honors_grade])")
+    private String honorsGrade;
+    /**
+    * 荣誉名称
+    */
+    @ApiModelProperty("荣誉名称")
+    private String name;
+    /**
+    * 获奖日期
+    */
+    @ApiModelProperty("获奖日期")
+    private Date awardDate;
+    /**
+    * 附件文件id
+    */
+    @ApiModelProperty("附件文件id")
+    private Long fileId;
+
+}

+ 40 - 0
src/main/java/com/xjrsoft/module/student/dto/ClassHonorsPageDto.java

@@ -0,0 +1,40 @@
+package com.xjrsoft.module.student.dto;
+
+import com.xjrsoft.common.page.PageInput;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import java.util.Date;
+
+
+/**
+* @title: 班级荣誉分页查询入参
+* @Author szs
+* @Date: 2023-12-06
+* @Version 1.0
+*/
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class ClassHonorsPageDto extends PageInput {
+
+    /**
+     * 荣誉级别(xjr_dictionary_item[honors_level])
+     */
+    @ApiModelProperty("荣誉级别(xjr_dictionary_item[honors_level])")
+    private String honorsLevel;
+    /**
+     * 荣誉等级(xjr_dictionary_item[honors_grade])
+     */
+    @ApiModelProperty("荣誉等级(xjr_dictionary_item[honors_grade])")
+    private String honorsGrade;
+    /**
+     * 获奖日期
+     */
+    @ApiModelProperty("获奖日期")
+    private Date awardDate;
+    /**
+     * 荣誉名称
+     */
+    @ApiModelProperty("荣誉名称")
+    private String name;
+}

+ 32 - 0
src/main/java/com/xjrsoft/module/student/dto/UpdateClassHonorsDto.java

@@ -0,0 +1,32 @@
+package com.xjrsoft.module.student.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.io.Serializable;
+
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import java.util.List;
+import java.util.Date;
+
+
+
+/**
+* @title: 班级荣誉
+* @Author szs
+* @Date: 2023-12-06
+* @Version 1.0
+*/
+@Data
+public class UpdateClassHonorsDto extends AddClassHonorsDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 主键编号
+    */
+    @ApiModelProperty("主键编号")
+    private Long id;
+}

+ 118 - 0
src/main/java/com/xjrsoft/module/student/entity/ClassHonors.java

@@ -0,0 +1,118 @@
+package com.xjrsoft.module.student.entity;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.github.yulichang.annotation.EntityMapping;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.io.Serializable;
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Date;
+
+
+/**
+* @title: 班级荣誉
+* @Author szs
+* @Date: 2023-12-06
+* @Version 1.0
+*/
+@Data
+@TableName("class_honors")
+@ApiModel(value = "class_honors", description = "班级荣誉")
+public class ClassHonors implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 主键编号
+    */
+    @ApiModelProperty("主键编号")
+    @TableId
+    private Long id;
+    /**
+    * 创建人
+    */
+    @ApiModelProperty("创建人")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+    /**
+    * 创建时间
+    */
+    @ApiModelProperty("创建时间")
+    @TableField(fill = FieldFill.INSERT)
+    private Date createDate;
+    /**
+    * 修改人
+    */
+    @ApiModelProperty("修改人")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long modifyUserId;
+    /**
+    * 修改时间
+    */
+    @ApiModelProperty("修改时间")
+    @TableField(fill = FieldFill.UPDATE)
+    private Date modifyDate;
+    /**
+    * 删除标记
+    */
+    @ApiModelProperty("删除标记")
+    @TableField(fill = FieldFill.INSERT)
+    @TableLogic
+    private Integer deleteMark;
+    /**
+    * 有效标志
+    */
+    @ApiModelProperty("有效标志")
+    @TableField(fill = FieldFill.INSERT)
+    private Integer enabledMark;
+    /**
+    * 序号
+    */
+    @ApiModelProperty("序号")
+    private Integer sortCode;
+    /**
+    * 学期ID(base_semester)
+    */
+    @ApiModelProperty("学期ID(base_semester)")
+    private Long baseSemesterId;
+    /**
+    * 班级id
+    */
+    @ApiModelProperty("班级id")
+    private Long classId;
+    /**
+    * 荣誉级别(xjr_dictionary_item[honors_level])
+    */
+    @ApiModelProperty("荣誉级别(xjr_dictionary_item[honors_level])")
+    private String honorsLevel;
+    /**
+    * 荣誉等级(xjr_dictionary_item[honors_grade])
+    */
+    @ApiModelProperty("荣誉等级(xjr_dictionary_item[honors_grade])")
+    private String honorsGrade;
+    /**
+    * 荣誉名称
+    */
+    @ApiModelProperty("荣誉名称")
+    private String name;
+    /**
+    * 获奖日期
+    */
+    @ApiModelProperty("获奖日期")
+    private Date awardDate;
+    /**
+    * 附件文件id
+    */
+    @ApiModelProperty("附件文件id")
+    private Long fileId;
+
+
+}

+ 38 - 0
src/main/java/com/xjrsoft/module/student/mapper/ClassHonorsMapper.java

@@ -0,0 +1,38 @@
+package com.xjrsoft.module.student.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.student.dto.BaseStudentPunishmentInfoPageDto;
+import com.xjrsoft.module.student.dto.ClassHonorsPageDto;
+import com.xjrsoft.module.student.entity.ClassHonors;
+import com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoPageVo;
+import com.xjrsoft.module.student.vo.ClassHonorsPageVo;
+import com.xjrsoft.module.student.vo.ClassHonorsVo;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @title: 班级荣誉
+* @Author szs
+* @Date: 2023-12-06
+* @Version 1.0
+*/
+@Mapper
+public interface ClassHonorsMapper extends MPJBaseMapper<ClassHonors> {
+
+    /**
+     * 班级荣誉列表(分页)PC端
+     * @param dto
+     * @return
+     */
+    IPage<ClassHonorsPageVo> getPagePC(IPage<ClassHonorsPageDto> page, ClassHonorsPageDto dto);
+
+    /**
+     * 根据id查询班级荣誉信息
+     * @param id
+     * @return
+     */
+    ClassHonorsVo getInfoById(Long id);
+
+}

+ 44 - 0
src/main/java/com/xjrsoft/module/student/service/IClassHonorsService.java

@@ -0,0 +1,44 @@
+package com.xjrsoft.module.student.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.student.dto.ClassHonorsPageDto;
+import com.xjrsoft.module.student.entity.ClassHonors;
+import com.xjrsoft.module.student.vo.ClassHonorsPageVo;
+import com.xjrsoft.module.student.vo.ClassHonorsSemesterClassTreeVo;
+import com.xjrsoft.module.student.vo.ClassHonorsVo;
+import lombok.Data;
+import java.util.List;
+
+/**
+* @title: 班级荣誉
+* @Author szs
+* @Date: 2023-12-06
+* @Version 1.0
+*/
+
+public interface IClassHonorsService extends MPJBaseService<ClassHonors> {
+
+    /**
+     * 班级荣誉列表(分页)PC端
+     * @param dto
+     * @return
+     */
+    IPage<ClassHonorsPageVo> getPagePC(ClassHonorsPageDto dto);
+
+    /**
+     * 根据id查询班级荣誉信息
+     * @param id
+     * @return
+     */
+    ClassHonorsVo getInfoById(Long id);
+
+    /**
+     * 将所有班级荣誉的学期和班级构成树
+     * @return
+     */
+    List<ClassHonorsSemesterClassTreeVo> getSemesterClassTree();
+
+
+}

+ 0 - 1
src/main/java/com/xjrsoft/module/student/service/ISchoolRollFurtherEducationService.java

@@ -32,5 +32,4 @@ public interface ISchoolRollFurtherEducationService extends MPJBaseService<Schoo
      * @return
      */
     SchoolRollFurtherEducationVo getDetailById(Long id);
-
 }

+ 101 - 0
src/main/java/com/xjrsoft/module/student/service/impl/ClassHonorsServiceImpl.java

@@ -0,0 +1,101 @@
+package com.xjrsoft.module.student.service.impl;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.github.yulichang.wrapper.MPJLambdaWrapper;
+import com.xjrsoft.common.exception.MyException;
+import com.xjrsoft.common.page.ConventPage;
+import com.xjrsoft.common.utils.VoToColumnUtil;
+import com.xjrsoft.module.base.service.IBaseSemesterService;
+import com.xjrsoft.module.student.dto.ClassHonorsPageDto;
+import com.xjrsoft.module.student.entity.BaseStudentAssessmentCategory;
+import com.xjrsoft.module.student.entity.BaseStudentBehaviorProject;
+import com.xjrsoft.module.student.entity.ClassHonors;
+import com.xjrsoft.module.student.mapper.ClassHonorsMapper;
+import com.xjrsoft.module.student.service.IClassHonorsService;
+import com.xjrsoft.module.student.vo.*;
+import com.xjrsoft.module.system.entity.DictionaryDetail;
+import com.xjrsoft.module.system.entity.File;
+import com.xjrsoft.module.system.service.IFileService;
+import lombok.AllArgsConstructor;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+* @title: 班级荣誉
+* @Author szs
+* @Date: 2023-12-06
+* @Version 1.0
+*/
+@Service
+@AllArgsConstructor
+public class ClassHonorsServiceImpl extends MPJBaseServiceImpl<ClassHonorsMapper, ClassHonors> implements IClassHonorsService {
+
+
+    private final ClassHonorsMapper classHonorsMapper;
+    private final IFileService fileService;
+    /**
+     * 班级荣誉列表(分页)PC端
+     * @param dto
+     * @return
+     */
+    @Override
+    public IPage<ClassHonorsPageVo> getPagePC(ClassHonorsPageDto dto) {
+        return classHonorsMapper.getPagePC(ConventPage.getPage(dto),dto);
+    }
+
+    /**
+     * 根据id查询班级荣誉信息
+     * @param id
+     * @return
+     */
+    @Override
+    public ClassHonorsVo getInfoById(Long id) {
+        ClassHonorsVo classHonorsVo = classHonorsMapper.getInfoById(id);
+        if(ObjectUtil.isNull(classHonorsVo)){
+            throw new MyException("该数据不存在");
+        }
+
+        // 添加文件列表
+        classHonorsVo.setFileList(fileService.list(Wrappers.<File>query().lambda().eq(File::getFolderId, classHonorsVo.getFileId())));
+        return classHonorsVo;
+    }
+
+    @Override
+    public List<ClassHonorsSemesterClassTreeVo> getSemesterClassTree() {
+        List<ClassHonorsSemesterClassTreeVo> treeVoList = new ArrayList<>();
+
+        //获取所有的学期id
+        LambdaQueryWrapper<ClassHonors> queryWrapper1 = new LambdaQueryWrapper<>();
+        queryWrapper1
+                .select(ClassHonors::getBaseSemesterId)
+                .groupBy(ClassHonors::getBaseSemesterId)
+                .orderByDesc(ClassHonors::getId);
+        List<ClassHonors> classHonorsList = this.list(queryWrapper1);
+        List<Long> semesterIds = new ArrayList<>();
+        for (ClassHonors c : classHonorsList){
+            semesterIds.add(c.getBaseSemesterId());
+        }
+
+        //获取所有的班级id
+        LambdaQueryWrapper<ClassHonors> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper
+                .select(ClassHonors::getBaseSemesterId)
+                .groupBy(ClassHonors::getBaseSemesterId)
+                .orderByDesc(ClassHonors::getId);
+        List<ClassHonors> classHonorsList_all = this.list(queryWrapper);
+        List<Long> classIds = new ArrayList<>();
+        for (ClassHonors c : classHonorsList){
+            semesterIds.add(c.getBaseSemesterId());
+        }
+
+        return null;
+    }
+}

+ 68 - 0
src/main/java/com/xjrsoft/module/student/vo/ClassHonorsPageVo.java

@@ -0,0 +1,68 @@
+package com.xjrsoft.module.student.vo;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.write.style.ContentStyle;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import com.xjrsoft.common.annotation.Trans;
+import com.xjrsoft.common.enums.TransType;
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+* @title: 班级荣誉分页列表出参
+* @Author szs
+* @Date: 2023-12-06
+* @Version 1.0
+*/
+@Data
+public class ClassHonorsPageVo {
+
+    /**
+     * 主键编号
+     */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("主键编号")
+    @ApiModelProperty("主键编号")
+    private String id;
+    /**
+     * 序号
+     */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("序号")
+    @ApiModelProperty("序号")
+    private Integer sortCode;
+    /**
+     * 荣誉级别中文(xjr_dictionary_item[honors_level])
+     */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("荣誉级别中文(xjr_dictionary_item[honors_level])")
+    @ApiModelProperty("荣誉级别中文(xjr_dictionary_item[honors_level])")
+    private String honorsLevelCN;
+    /**
+     * 荣誉等级中文(xjr_dictionary_item[honors_grade])
+     */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("荣誉等级中文(xjr_dictionary_item[honors_grade])")
+    @ApiModelProperty("荣誉等级中文(xjr_dictionary_item[honors_grade])")
+    private String honorsGradeCN;
+    /**
+     * 荣誉名称
+     */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("荣誉名称")
+    @ApiModelProperty("荣誉名称")
+    private String name;
+    /**
+     * 获奖日期
+     */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("获奖日期")
+    @ApiModelProperty("获奖日期")
+    private Date awardDate;
+}

+ 33 - 0
src/main/java/com/xjrsoft/module/student/vo/ClassHonorsSemesterClassTreeVo.java

@@ -0,0 +1,33 @@
+package com.xjrsoft.module.student.vo;
+
+import com.xjrsoft.common.model.tree.ITreeNode;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+* @title: 班级荣誉分页列表学期班级树出参
+* @Author szs
+* @Date: 2023-12-06
+* @Version 1.0
+*/
+@Data
+public class ClassHonorsSemesterClassTreeVo implements ITreeNode<ClassHonorsSemesterClassTreeVo,Long>, Serializable {
+
+    private static final long serialVersionUID = 1L;
+    /**
+     * 班级id
+     */
+    @ApiModelProperty("班级id")
+    private Long id;
+
+    @ApiModelProperty("名字")
+    private String name;
+
+    @ApiModelProperty("父级id-学期id")
+    private Long parentId;
+
+    private List<ClassHonorsSemesterClassTreeVo> children;
+}

+ 92 - 0
src/main/java/com/xjrsoft/module/student/vo/ClassHonorsVo.java

@@ -0,0 +1,92 @@
+package com.xjrsoft.module.student.vo;
+
+import com.xjrsoft.module.system.entity.File;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Date;
+
+/**
+* @title: 班级荣誉表单出参
+* @Author szs
+* @Date: 2023-12-06
+* @Version 1.0
+*/
+@Data
+public class ClassHonorsVo {
+
+    /**
+    * 主键编号
+    */
+    @ApiModelProperty("主键编号")
+    private Long id;
+    /**
+    * 序号
+    */
+    @ApiModelProperty("序号")
+    private Integer sortCode;
+    /**
+    * 学期ID(base_semester)
+    */
+    @ApiModelProperty("学期ID(base_semester)")
+    private Long baseSemesterId;
+    /**
+     * 学期ID中文(base_semester)
+     */
+    @ApiModelProperty("学期ID中文(base_semester)")
+    private Long baseSemesterIdCN;
+    /**
+    * 班级id
+    */
+    @ApiModelProperty("班级id")
+    private Long classId;
+    /**
+     * 班级id中文
+     */
+    @ApiModelProperty("班级id中文")
+    private Long classIdCN;
+    /**
+    * 荣誉级别(xjr_dictionary_item[honors_level])
+    */
+    @ApiModelProperty("荣誉级别(xjr_dictionary_item[honors_level])")
+    private String honorsLevel;
+    /**
+     * 荣誉级别中文(xjr_dictionary_item[honors_level])
+     */
+    @ApiModelProperty("荣誉级别中文(xjr_dictionary_item[honors_level])")
+    private String honorsLevelCN;
+    /**
+    * 荣誉等级(xjr_dictionary_item[honors_grade])
+    */
+    @ApiModelProperty("荣誉等级(xjr_dictionary_item[honors_grade])")
+    private String honorsGrade;
+    /**
+     * 荣誉等级中文(xjr_dictionary_item[honors_grade])
+     */
+    @ApiModelProperty("荣誉等级中文(xjr_dictionary_item[honors_grade])")
+    private String honorsGradeCN;
+    /**
+    * 荣誉名称
+    */
+    @ApiModelProperty("荣誉名称")
+    private String name;
+    /**
+    * 获奖日期
+    */
+    @ApiModelProperty("获奖日期")
+    private Date awardDate;
+    /**
+    * 附件文件id
+    */
+    @ApiModelProperty("附件文件id")
+    private Long fileId;
+    /**
+     * 该处分信息下的文件集合
+     */
+    @ApiModelProperty("文件集合")
+    private List<File> fileList;
+}

+ 6 - 10
src/main/java/com/xjrsoft/module/system/service/impl/LoginServiceImpl.java

@@ -17,28 +17,24 @@ import com.xjrsoft.common.constant.GlobalConstant;
 import com.xjrsoft.common.enums.EnabledMark;
 import com.xjrsoft.common.enums.RoleEnum;
 import com.xjrsoft.common.exception.MyException;
-import com.xjrsoft.common.utils.FixedArithmeticCaptcha;
-import com.xjrsoft.common.utils.RSAUtil;
-import com.xjrsoft.common.utils.RedisUtil;
-import com.xjrsoft.common.utils.WeChatUtil;
+import com.xjrsoft.common.utils.*;
 import com.xjrsoft.config.CommonPropertiesConfig;
 import com.xjrsoft.config.LicenseConfig;
-import com.xjrsoft.module.organization.entity.Department;
-import com.xjrsoft.module.organization.entity.Post;
-import com.xjrsoft.module.organization.entity.User;
-import com.xjrsoft.module.organization.entity.UserDeptRelation;
-import com.xjrsoft.module.organization.entity.UserPostRelation;
-import com.xjrsoft.module.organization.entity.UserRoleRelation;
+import com.xjrsoft.module.magicapi.service.impl.InterfaceAuthServiceImpl;
+import com.xjrsoft.module.organization.entity.*;
+import com.xjrsoft.module.organization.mapper.RoleMapper;
 import com.xjrsoft.module.organization.mapper.UserRoleRelationMapper;
 import com.xjrsoft.module.organization.service.IDepartmentService;
 import com.xjrsoft.module.organization.service.IPostService;
 import com.xjrsoft.module.organization.service.IUserDeptRelationService;
 import com.xjrsoft.module.organization.service.IUserPostRelationService;
 import com.xjrsoft.module.organization.service.IUserService;
+import com.xjrsoft.module.organization.vo.UserRoleVo;
 import com.xjrsoft.module.system.dto.CreateTokenDto;
 import com.xjrsoft.module.system.dto.LoginByCodeDto;
 import com.xjrsoft.module.system.dto.LoginCaptchaDto;
 import com.xjrsoft.module.system.dto.LoginDto;
+import com.xjrsoft.module.system.service.IAuthorizeService;
 import com.xjrsoft.module.system.service.ILoginService;
 import com.xjrsoft.module.system.vo.CreateTokenVo;
 import com.xjrsoft.module.system.vo.ImgCaptchaVo;

+ 36 - 1
src/main/java/com/xjrsoft/module/system/service/impl/SaOAuth2TemplateImpl.java

@@ -2,16 +2,27 @@ package com.xjrsoft.module.system.service.impl;
 
 import cn.dev33.satoken.oauth2.logic.SaOAuth2Template;
 import cn.dev33.satoken.oauth2.model.SaClientModel;
+import cn.dev33.satoken.session.SaSession;
 import cn.dev33.satoken.stp.StpUtil;
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.xjrsoft.common.constant.GlobalConstant;
 import com.xjrsoft.common.exception.MyException;
+import com.xjrsoft.common.utils.VoToColumnUtil;
+import com.xjrsoft.module.organization.entity.Role;
+import com.xjrsoft.module.organization.entity.UserRoleRelation;
+import com.xjrsoft.module.organization.mapper.RoleMapper;
+import com.xjrsoft.module.organization.mapper.UserRoleRelationMapper;
+import com.xjrsoft.module.organization.vo.UserRoleVo;
 import com.xjrsoft.module.system.entity.Datasource;
 import com.xjrsoft.module.system.entity.OauthClientDetails;
 import com.xjrsoft.module.system.service.IOauthClientDetailsService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
+import java.util.List;
+import java.util.stream.Collectors;
+
 /**
  * Sa-Token OAuth2.0 整合实现
  */
@@ -21,6 +32,12 @@ public class SaOAuth2TemplateImpl extends SaOAuth2Template {
     @Autowired
     private IOauthClientDetailsService oauthClientDetailsService;
 
+    @Autowired
+    private RoleMapper roleMapper;
+
+    @Autowired
+    private UserRoleRelationMapper userRoleRelationMapper;
+
     // 根据 id 获取 Client 信息
     @Override
     public SaClientModel getClientModel(String clientId) {
@@ -42,7 +59,6 @@ public class SaOAuth2TemplateImpl extends SaOAuth2Template {
     // 根据ClientId 和 LoginId 获取openid
     @Override
     public String getOpenid(String clientId, Object loginId) {
-        // 此为模拟数据,真实环境需要从数据库查询
         return "";
     }
 
@@ -50,6 +66,25 @@ public class SaOAuth2TemplateImpl extends SaOAuth2Template {
     @Override
     public String randomAccessToken(String clientId, Object loginId, String scope) {
         String tokenValue = StpUtil.createLoginSession(loginId);
+
+        // 手动授权
+        // 获取用户类型(根据固定角色进行匹配)
+        List<UserRoleRelation> relations = userRoleRelationMapper.selectList(Wrappers.lambdaQuery(UserRoleRelation.class)
+                .select(UserRoleRelation::getRoleId)
+                .eq(UserRoleRelation::getUserId, loginId));
+
+        List<Long> relationIds = relations.stream().map(UserRoleRelation::getRoleId).collect(Collectors.toList());
+
+        List<Role> roleList = roleMapper.selectList(Wrappers.lambdaQuery(Role.class)
+                .select(Role.class, x -> VoToColumnUtil.fieldsToColumns(UserRoleVo.class).contains(x.getColumn()))
+                .in(relationIds.size() > 0, Role::getId, relationIds));
+
+        List<String> roleCodeList = roleList.stream().map(Role::getCode).collect(Collectors.toList());
+        List<Long> roleIdList = roleList.stream().map(Role::getId).collect(Collectors.toList());
+        SaSession tokenSession = StpUtil.getSessionByLoginId(loginId);
+        tokenSession.set(GlobalConstant.LOGIN_USER_ROLE_CODE_KEY, roleCodeList);
+        tokenSession.set(GlobalConstant.LOGIN_USER_ROLE_ID_KEY, roleIdList);
+
         return tokenValue;
     }
 }

+ 4 - 4
src/main/resources/application-dev.yml

@@ -61,10 +61,10 @@ xjrsoft:
     druid-account: admin # druid 监控账户
     druid-password: admin # druid 监控密码
     default-password: "cqtlzjzx2023" #默认密码(用户重置密码后为该密码)
-#    domain-api: https://test.tl.web.yingcaibx.com/api #api域名地址
-#    domain-web: https://test.tl.web.yingcaibx.com #web域名地址
-    domain-api: http://127.0.0.1:9000/api #api域名地址
-    domain-web: http://127.0.0.1:9000 #web域名地址
+    domain-api: http://10.150.10.139:8888/api #api域名地址
+    domain-web: http://10.150.10.139:8888 #web域名地址
+#    domain-api: http://127.0.0.1:9000/api #api域名地址
+#    domain-web: http://127.0.0.1:9000 #web域名地址
     white-list:
       - 192.168.0.139
     exclude-urls:

+ 6 - 1
src/main/resources/mapper/student/BaseStudentBehaviorManageMapper.xml

@@ -67,7 +67,12 @@
 
     <select id="getMobilePage" parameterType="com.xjrsoft.module.student.dto.BaseStudentBehaviorManageMobilePageDto" resultType="com.xjrsoft.module.student.vo.BaseStudentBehaviorManageMobilePageVo">
         SELECT t1.sort_code,t1.name,t1.class_name,t.assessment_date,
-        t3.name AS categoryName,t4.name AS projectName,t.score,t4.score_type  FROM base_student_behavior_manage t
+        t3.name AS categoryName,t4.name AS projectName,t.score,t4.score_type,
+        t2.name AS assessmentUserName,
+        t.assessment_address,
+        t3.name AS behaviorCategoryName,
+        t4.name AS behaviorProjectName
+        FROM base_student_behavior_manage t
         INNER JOIN base_student_behavior_student_relation t1 ON t1.base_student_behavior_manage_id = t.id
         <if test="dto.studentName != null and dto.studentName != ''">
             and t1.name like concat('%',#{dto.studentName},'%')

+ 50 - 0
src/main/resources/mapper/student/ClassHonorsMapper.xml

@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xjrsoft.module.student.mapper.ClassHonorsMapper">
+    <select id="getPagePC" parameterType="com.xjrsoft.module.student.dto.ClassHonorsPageDto" resultType="com.xjrsoft.module.student.vo.ClassHonorsPageVo">
+        SELECT
+            t.id,
+            t.sort_code,
+            t1.name AS honorsLevelCN,
+            t2.name AS honorsGradeCN,
+            t.name,
+            t.award_date
+        FROM class_honors t
+            LEFT JOIN xjr_dictionary_detail t1 ON t1.code = t.honors_level
+            LEFT JOIN xjr_dictionary_detail t2 ON t2.code = t.honors_grade
+        WHERE
+            t.delete_mark = 0
+            <if test="dto.honorsLevel != null and dto.honorsLevel != ''">
+                and t.honors_level = #{dto.honorsLevel}
+            </if>
+            <if test="dto.honorsGrade != null and dto.honorsGrade != ''">
+                and t.honors_grade = #{dto.honorsGrade}
+            </if>
+            <if test="dto.awardDate != null and dto.awardDate != ''">
+                and t.award_date = #{dto.awardDate}
+            </if>
+            <if test="dto.name != null and dto.name != ''">
+                and t.name like concat('%',#{dto.name},'%')
+            </if>
+        ORDER BY
+            t.id DESC;
+    </select>
+    <select id="getInfoById"
+            resultType="com.xjrsoft.module.student.vo.ClassHonorsVo">
+        SELECT
+            t.*,
+            t1.name AS honorsLevelCN,
+            t2.name AS honorsGradeCN,
+            t3.name AS baseSemesterIdCN,
+            t4.name AS classIdCN,
+        FROM class_honors t
+            LEFT JOIN xjr_dictionary_detail t1 ON t1.code = t.honors_level
+            LEFT JOIN xjr_dictionary_detail t2 ON t2.code = t.honors_grade
+            LEFT JOIN base_semester t3 ON t3.id = t.base_semester_id
+            LEFT JOIN base_class t4 ON t4.id = t.class_id
+        WHERE
+            t.id = #{id} AND t.delete_mark = 0;
+    </select>
+</mapper>

+ 2 - 1
src/main/resources/mapper/student/SchoolRollFurtherEducationMapper.xml

@@ -17,7 +17,8 @@
             t5.name AS backMajorSetIdCN,
             t6.name AS applicantUserIdCN,
             t.reason,
-            t.enabled_mark AS enabledMark
+            t.enabled_mark AS enabledMark,
+            t.status
         FROM school_roll_further_education t
                  LEFT JOIN xjr_user t1 ON (t.student_id = t1.id)
                  LEFT JOIN base_major_set t2 ON (t.before_major_set_id = t2.id)

+ 176 - 0
src/main/resources/sqlScript/20231129_sql.sql

@@ -194,6 +194,182 @@ CREATE TABLE school_roll_further_education
 
 ALTER TABLE base_punishment_type ADD COLUMN `validity_period_day` INT NULL DEFAULT NULL COMMENT '有效期(天)' AFTER punishment_level;
 
+-- ------------------------------------------------------------------班主任请假--------------------------------------------------------------------
+-- ----------------------------
+-- 班主任事项请假
+-- ----------------------------
+DROP TABLE IF EXISTS wf_head_teacher_leave;
+CREATE TABLE wf_head_teacher_leave
+(
+    id BIGINT NOT NULL COMMENT '主键编号',
+    `create_user_id` BIGINT NULL DEFAULT NULL COMMENT '创建人',
+    `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
+    `modify_user_id` BIGINT NULL DEFAULT NULL COMMENT '修改人',
+    `modify_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
+    `delete_mark` INT NOT NULL COMMENT '删除标记',
+    `enabled_mark` INT NOT NULL COMMENT '有效标志',
+    `sort_code` INT NULL DEFAULT NULL COMMENT '序号',
+    `applicant_user_id` bigint NULL DEFAULT NULL COMMENT '申请人',
+    `leave_reason`varchar(20) NULL DEFAULT NULL COMMENT '请假原因(xjr_dictionary_item[leave_reason])',
+    `start_time` date NULL DEFAULT NULL COMMENT '开始时间',
+    `end_time` date NULL DEFAULT NULL COMMENT '结束时间',
+    `is_substitute` INT NOT NULL default 0 COMMENT '是否有替班教师(1:是 0:否)',
+    `substitute_user_id` bigint NULL DEFAULT NULL COMMENT '替换教师',
+    `remark` varchar(1000) COMMENT '备注',
+    `status` int not null default 0 COMMENT '状态(1:结束 0:未结束)',
+    PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT '班主任事项请假';
+-- ------------------------------------------------------------------班主任请假--------------------------------------------------------------------
+
+-- ------------------------------------------------------------------荣誉--------------------------------------------------------------------
+-- ----------------------------
+-- 班级荣誉
+-- ----------------------------
+DROP TABLE IF EXISTS class_honors;
+CREATE TABLE class_honors
+(
+    id BIGINT NOT NULL COMMENT '主键编号',
+    `create_user_id` BIGINT NULL DEFAULT NULL COMMENT '创建人',
+    `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
+    `modify_user_id` BIGINT NULL DEFAULT NULL COMMENT '修改人',
+    `modify_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
+    `delete_mark` INT NOT NULL COMMENT '删除标记',
+    `enabled_mark` INT NOT NULL COMMENT '有效标志',
+    `sort_code` INT NULL DEFAULT NULL COMMENT '序号',
+    `base_semester_id` BIGINT COMMENT '学期ID(base_semester)',
+    `class_id` BIGINT NULL DEFAULT NULL COMMENT '班级id',
+    `honors_level` varchar(20) NULL DEFAULT NULL COMMENT '荣誉级别(xjr_dictionary_item[honors_level])',
+    `honors_grade`varchar(20) NULL DEFAULT NULL COMMENT '荣誉等级(xjr_dictionary_item[honors_grade])',
+    `name` varchar(1000) NULL DEFAULT NULL COMMENT '荣誉名称',
+    `award_date` date NULL DEFAULT NULL COMMENT '获奖日期',
+    `file_id` BIGINT NULL DEFAULT NULL COMMENT '附件文件id',
+    PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT '班级荣誉';
+
+-- ----------------------------
+-- 学生荣誉
+-- ----------------------------
+DROP TABLE IF EXISTS student_honors;
+CREATE TABLE student_honors
+(
+    id BIGINT NOT NULL COMMENT '主键编号',
+    `create_user_id` BIGINT NULL DEFAULT NULL COMMENT '创建人',
+    `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
+    `modify_user_id` BIGINT NULL DEFAULT NULL COMMENT '修改人',
+    `modify_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
+    `delete_mark` INT NOT NULL COMMENT '删除标记',
+    `enabled_mark` INT NOT NULL COMMENT '有效标志',
+    `sort_code` INT NULL DEFAULT NULL COMMENT '序号',
+    `applicant_user_id` bigint NULL DEFAULT NULL COMMENT '申请人',
+    `data_entry_method` int NULL DEFAULT 1 COMMENT '数据录入方式 1=推荐 2=登记',
+    `base_semester_id` BIGINT COMMENT '学期ID(base_semester)',
+    `class_id` BIGINT NULL DEFAULT NULL COMMENT '班级id',
+    `student_user_id` BIGINT NULL DEFAULT NULL COMMENT '学生用户编号',
+    `student_id` VARCHAR(30) NULL DEFAULT NULL COMMENT '学号',
+    `major_name` VARCHAR(50) NULL DEFAULT NULL COMMENT '所学专业',
+    `honors_level` varchar(20) NULL DEFAULT NULL COMMENT '荣誉级别(xjr_dictionary_item[honors_level])',
+    `honors_grade`varchar(20) NULL DEFAULT NULL COMMENT '荣誉等级(xjr_dictionary_item[honors_grade])',
+    `honors_type`varchar(20) NULL DEFAULT NULL COMMENT '荣誉类型(xjr_dictionary_item[honors_type])',
+    `name` varchar(1000) NULL DEFAULT NULL COMMENT '荣誉名称',
+    `award_date` date NULL DEFAULT NULL COMMENT '获奖日期',
+    `file_id` BIGINT NULL DEFAULT NULL COMMENT '附件文件id',
+    `status` int not null default 0 COMMENT '状态(1:结束 0:未结束)',
+    PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT '学生荣誉';
+-- ------------------------------------------------------------------荣誉--------------------------------------------------------------------
+
+
+-- ------------------------------------------------------------------公文--------------------------------------------------------------------
+-- ----------------------------
+-- 公文收文
+-- ----------------------------
+DROP TABLE IF EXISTS official_document_received;
+CREATE TABLE official_document_received
+(
+    id BIGINT NOT NULL COMMENT '主键编号',
+    `create_user_id` BIGINT NULL DEFAULT NULL COMMENT '创建人',
+    `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
+    `modify_user_id` BIGINT NULL DEFAULT NULL COMMENT '修改人',
+    `modify_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
+    `delete_mark` INT NOT NULL COMMENT '删除标记',
+    `enabled_mark` INT NOT NULL COMMENT '有效标志',
+    `sort_code` INT NULL DEFAULT NULL COMMENT '序号',
+    `received_title` varchar(200) NULL DEFAULT NULL COMMENT '收文标题',
+    `received_number` varchar(200) NULL DEFAULT NULL COMMENT '收文文号',
+    `received_date` date NULL DEFAULT NULL COMMENT '收文时间',
+    `communication_org` varchar(200) NULL DEFAULT NULL COMMENT '来文机构',
+    `communication_number` varchar(200) NULL DEFAULT NULL COMMENT '来文文号',
+    `checkout_time` date NULL DEFAULT NULL COMMENT '办结时间',
+    `document_level`varchar(20) NULL DEFAULT NULL COMMENT '文件密级(xjr_dictionary_item[document_level])',
+    `emergency_level`varchar(20) NULL DEFAULT NULL COMMENT '紧急程度(xjr_dictionary_item[emergency_level])',
+    `file_id` BIGINT NULL DEFAULT NULL COMMENT '附件文件id',
+    PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT '公文收文';
+
+-- ----------------------------
+-- 公文发文
+-- ----------------------------
+DROP TABLE IF EXISTS official_document_post;
+CREATE TABLE official_document_post
+(
+    id BIGINT NOT NULL COMMENT '主键编号',
+    `create_user_id` BIGINT NULL DEFAULT NULL COMMENT '创建人',
+    `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
+    `modify_user_id` BIGINT NULL DEFAULT NULL COMMENT '修改人',
+    `modify_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
+    `delete_mark` INT NOT NULL COMMENT '删除标记',
+    `enabled_mark` INT NOT NULL COMMENT '有效标志',
+    `sort_code` INT NULL DEFAULT NULL COMMENT '序号',
+    `post_title` varchar(200) NULL DEFAULT NULL COMMENT '发文标题',
+    `post_number` varchar(200) NULL DEFAULT NULL COMMENT '发文文号(发文文号自动生成,年+三位数字(三位数字从001开始)如2023001、2023002,依次生成)',
+    `post_date` date NULL DEFAULT NULL COMMENT '发文时间',
+    `post_department_id` bigint NOT NULL COMMENT '发文所属机构(xjr_department)',
+    `file_id` BIGINT NULL DEFAULT NULL COMMENT '附件文件id',
+    PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT '公文发文';
+-- ------------------------------------------------------------------公文--------------------------------------------------------------------
+
+-- ------------------------------------------------------------------教师获奖登记--------------------------------------------------------------------
+-- ----------------------------
+-- 教师获奖登记
+-- ----------------------------
+DROP TABLE IF EXISTS teacher_award;
+CREATE TABLE teacher_award
+(
+    id BIGINT NOT NULL COMMENT '主键编号',
+    `create_user_id` BIGINT NULL DEFAULT NULL COMMENT '创建人',
+    `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
+    `modify_user_id` BIGINT NULL DEFAULT NULL COMMENT '修改人',
+    `modify_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
+    `delete_mark` INT NOT NULL COMMENT '删除标记',
+    `enabled_mark` INT NOT NULL COMMENT '有效标志',
+    `sort_code` INT NULL DEFAULT NULL COMMENT '序号',
+    `applicant_user_id` bigint NULL DEFAULT NULL COMMENT '申请人',
+    `award_type` varchar(20) NULL DEFAULT NULL COMMENT '获奖类型(xjr_dictionary_item[award_type])',
+
+    `award_level` varchar(20) NULL DEFAULT NULL COMMENT '奖项级别(xjr_dictionary_item[honors_level])',
+    `competition_name`varchar(200) NULL DEFAULT NULL COMMENT '赛项名称',
+    `award_grade`varchar(200) NULL DEFAULT NULL COMMENT '获奖等级(一等奖、二等奖、三等奖、指导奖一等奖、指导奖二等奖、指导奖三等奖)',
+    `award_group`varchar(200) NULL DEFAULT NULL COMMENT '组别(职工、师生同赛)',
+
+    `paper_name`varchar(200) NULL DEFAULT NULL COMMENT '论文名称',
+    `journal_name`varchar(200) NULL DEFAULT NULL COMMENT '期刊名称',
+    `journal_number`varchar(200) NULL DEFAULT NULL COMMENT '期刊号',
+    `journal_level`varchar(200) NULL DEFAULT NULL COMMENT '期刊级别(国家级、省级)',
+    `issue_date` date NULL DEFAULT NULL COMMENT '发表时间',
+
+    `honors_type`varchar(200) NULL DEFAULT NULL COMMENT '荣誉类型(骨干老师、双师型教师)',
+    `identify_date`date NULL DEFAULT NULL COMMENT '认定时间',
+    `certificate_file_id` BIGINT NULL DEFAULT NULL COMMENT '证书文件id',
+    `policy_file_id` BIGINT NULL DEFAULT NULL COMMENT '政策文件id',
+
+    `approval_user_id` bigint NULL DEFAULT NULL COMMENT '审核人',
+    `remark` varchar(1000) COMMENT '备注',
+    `file_id` BIGINT NULL DEFAULT NULL COMMENT '附件文件id',
+    `status` int not null default 0 COMMENT '状态(1:结束 0:未结束)',
+    PRIMARY KEY (`id`)
+) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT '教师获奖登记';
+-- ------------------------------------------------------------------教师获奖登记--------------------------------------------------------------------
 
 
 

+ 30 - 0
src/test/java/com/xjrsoft/xjrsoftboot/FreeMarkerGeneratorTest.java

@@ -921,4 +921,34 @@ public class FreeMarkerGeneratorTest {
         apiGeneratorService.generateCodes(params);
     }
 
+    /**
+     * 班级荣誉
+     *
+     */
+    @Test
+    public void gcClassHonors() throws IOException {
+        List<TableConfig> tableConfigs = new ArrayList<>();
+        TableConfig mainTable = new TableConfig();
+        mainTable.setTableName("class_honors");//init_sql中的表名
+        mainTable.setIsMain(true);//是否是主表,一般默认为true
+        mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
+        mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
+        tableConfigs.add(mainTable);
+
+
+        ApiGenerateCodesDto params = new ApiGenerateCodesDto();
+        params.setAuthor("szs");//作者名称
+        params.setPackageName("student");//包名
+        params.setTableConfigs(tableConfigs);
+        params.setPage(true);//是否生成分页接口
+        params.setImport(true);//是否生成导入接口
+        params.setExport(false);//是否生成导出接口
+        params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
+        params.setDs(ds);
+
+
+        IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
+
+        apiGeneratorService.generateCodes(params);
+    }
 }