Przeglądaj źródła

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

# Conflicts:
#	src/test/java/com/xjrsoft/xjrsoftboot/FreeMarkerGeneratorTest.java
phoenix 1 rok temu
rodzic
commit
38d87356e5

+ 3 - 6
src/main/java/com/xjrsoft/module/evaluate/controller/EvaluateManageController.java

@@ -66,12 +66,9 @@ public class EvaluateManageController {
     @PostMapping(value = "/release")
     @ApiOperation(value="发布")
     @SaCheckPermission("evaluatemanage:detail")
-    public RT<EvaluateManageVo> release(@RequestParam Long id){
-        EvaluateManage evaluateManage = evaluateManageService.getByIdDeep(id);
-        if (evaluateManage == null) {
-            return RT.error("找不到此数据!");
-        }
-        return RT.ok(BeanUtil.toBean(evaluateManage, EvaluateManageVo.class));
+    public RT<Boolean> release(@RequestParam Long id){
+        Boolean release = evaluateManageService.release(id);
+        return RT.ok(release);
     }
 
 

+ 34 - 0
src/main/java/com/xjrsoft/module/schedule/vo/ClassroomJianyuekbVo.java

@@ -0,0 +1,34 @@
+package com.xjrsoft.module.schedule.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+* @title: 学生职务设置表单出参
+* @Author dzx
+* @Date: 2023-11-13
+* @Version 1.0
+*/
+@Data
+public class ClassroomJianyuekbVo {
+
+    @ApiModelProperty("学号")
+    private String name;
+
+
+    @ApiModelProperty("姓名")
+    private String peopleCount;
+
+
+    @ApiModelProperty("年级id")
+    private Long location;
+
+
+    @ApiModelProperty("别名")
+    private String floor;
+
+
+    @ApiModelProperty("创建扩展id")
+    private String extendId;
+
+}

+ 48 - 0
src/main/java/com/xjrsoft/module/schedule/vo/StudentJianyuekbVo.java

@@ -0,0 +1,48 @@
+package com.xjrsoft.module.schedule.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+* @title: 学生职务设置表单出参
+* @Author dzx
+* @Date: 2023-11-13
+* @Version 1.0
+*/
+@Data
+public class StudentJianyuekbVo {
+
+    /**
+    * 主键编号
+    */
+    @ApiModelProperty("学号")
+    private String registerNo;
+    /**
+    * 序号
+    */
+    @ApiModelProperty("姓名")
+    private String realName;
+    /**
+    * 职务
+    */
+    @ApiModelProperty("年级id")
+    private Long gradeSerialNo;
+    /**
+    * 职务级别
+    */
+    @ApiModelProperty("别名")
+    private String alias;
+    /**
+    * 是否允许德育检查(1:是 0:否)
+    */
+    @ApiModelProperty("性别:1男,2女")
+    private Integer gender;
+    /**
+    * 职责描述
+    */
+    @ApiModelProperty("创建扩展id")
+    private String extendId;
+
+}

+ 5 - 0
src/main/java/com/xjrsoft/module/student/mapper/BaseStudentMapper.java

@@ -1,10 +1,13 @@
 package com.xjrsoft.module.student.mapper;
 
 import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.schedule.vo.StudentJianyuekbVo;
 import com.xjrsoft.module.student.entity.BaseStudent;
 import com.xjrsoft.module.student.vo.StudentInfoVo;
 import org.apache.ibatis.annotations.Mapper;
 
+import java.util.List;
+
 /**
  * @title: mapper
  * @Author 管理员
@@ -18,4 +21,6 @@ public interface BaseStudentMapper extends MPJBaseMapper<BaseStudent> {
      * @return
      */
     StudentInfoVo getStudentInfo(Long userId);
+
+    List<StudentJianyuekbVo> getJianyueStudentList();
 }

+ 9 - 0
src/main/resources/mapper/student/BaseStudentMapper.xml

@@ -12,4 +12,13 @@
         LEFT JOIN base_major_set t6 ON t3.major_set_id = t6.id
         where  t1.delete_mark=0 and t2.delete_mark=0 and t1.user_id=#{userId};
     </select>
+    <!--姓名和性别,测试阶段采用姓名第一个字拼接user_id的方式脱敏-->
+    <select id="getJianyueStudentList" resultType="com.xjrsoft.module.schedule.vo.StudentJianyuekbVo">
+        SELECT t1.id AS registerNo, CONCAT(SUBSTRING(t2.name,1,1),t2.id) AS realName,t3.grade_id AS gradeSerialNo,CONCAT(SUBSTRING(t2.name,1,1),t2.id) AS alias,t2.gender,t2.id AS extendId FROM base_student t1
+        INNER JOIN xjr_user t2 ON t1.user_id = t2.id
+        INNER JOIN base_student_school_roll t3 ON t1.user_id = t3.user_id
+        WHERE t1.delete_mark = 0 AND t2.delete_mark = 0
+        AND t1.student_id IS NOT NULL AND t1.student_id != ''
+        AND t3.archives_status = 'FB2901';
+    </select>
 </mapper>

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

@@ -1970,6 +1970,54 @@ public class FreeMarkerGeneratorTest {
 
     }
 
+    /**
+     * 评价项
+     * @throws IOException
+     */
+    @Test
+    public void gcEvaluateManage() throws IOException {
+        List<TableConfig> tableConfigs = new ArrayList<>();
+        TableConfig mainTable = new TableConfig();
+        mainTable.setTableName("evaluate_manage");//init_sql中的表名
+        mainTable.setIsMain(true);//是否是主表,一般默认为true
+        mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
+        mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
+        tableConfigs.add(mainTable);
+
+        mainTable = new TableConfig();
+        mainTable.setTableName("evaluate_object");//init_sql中的表名
+        mainTable.setIsMain(false);//是否是主表,一般默认为true
+        mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
+        mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
+        mainTable.setRelationField("evaluate_manage_id");//设置外键
+        mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
+        tableConfigs.add(mainTable);
+
+        mainTable = new TableConfig();
+        mainTable.setTableName("evaluate_executer");//init_sql中的表名
+        mainTable.setIsMain(false);//是否是主表,一般默认为true
+        mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
+        mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
+        mainTable.setRelationField("evaluate_manage_id");//设置外键
+        mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
+        tableConfigs.add(mainTable);
+
+        ApiGenerateCodesDto params = new ApiGenerateCodesDto();
+        params.setAuthor("dzx");//作者名称
+        params.setPackageName("evaluate");//包名
+        params.setTableConfigs(tableConfigs);
+        params.setPage(true);//是否生成分页接口
+        params.setImport(false);//是否生成导入接口
+        params.setExport(false);//是否生成导出接口
+        params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
+        params.setDs(ds);
+
+        IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
+
+        apiGeneratorService.generateCodes(params);
+
+    }
+
     /**
      * 评价结果
      * @throws IOException