Ver código fonte

basestudentpost

fanxp 2 anos atrás
pai
commit
6207d5d864

+ 1 - 1
src/main/java/com/xjrsoft/module/student/controller/BaseStudentAssessmentProjectController.java

@@ -62,7 +62,7 @@ public class BaseStudentAssessmentProjectController {
     @GetMapping(value = "/tree")
     @ApiOperation(value = "学生考核项目列表(树)")
     @SaCheckPermission("basestudentassessmentproject:detail")
-    public RT<List<BaseStudentAssessmentProjectTreeVo>> page() {
+    public RT<List<BaseStudentAssessmentProjectTreeVo>> tree() {
 
         List<BaseStudentAssessmentProjectTreeVo> voList = new ArrayList<>();
         baseStudentAssessmentCategoryService.list().forEach((node) -> {

+ 19 - 0
src/main/java/com/xjrsoft/module/student/controller/BaseStudentPostController.java

@@ -18,10 +18,13 @@ import com.xjrsoft.common.utils.VoToColumnUtil;
 import com.xjrsoft.module.erpModel.caseErpBom.entity.CaseErpBom;
 import com.xjrsoft.module.erpModel.caseErpBom.vo.CaseErpBomTreeVo;
 import com.xjrsoft.module.student.dto.AddBaseStudentPostDto;
+import com.xjrsoft.module.student.dto.BaseStudentPostListDto;
 import com.xjrsoft.module.student.dto.UpdateBaseStudentPostDto;
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import com.alibaba.excel.EasyExcel;
 import com.alibaba.excel.support.ExcelTypeEnum;
+import com.xjrsoft.module.student.entity.BaseStudentBehaviorProject;
+import com.xjrsoft.module.student.vo.BaseStudentPostListVo;
 import com.xjrsoft.module.student.vo.BaseStudentPostTreeVo;
 import org.springframework.http.ResponseEntity;
 import java.io.ByteArrayOutputStream;
@@ -57,6 +60,22 @@ public class BaseStudentPostController {
 
     private final IBaseStudentPostService baseStudentPostService;
 
+    @GetMapping(value = "/list")
+    @ApiOperation(value="学生职务设置列表(不分页)")
+    @SaCheckPermission("basestudentpost:detail")
+    public RT<List<BaseStudentPostListVo>> list(@Valid BaseStudentPostListDto dto){
+
+        LambdaQueryWrapper<BaseStudentPost> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper
+                .eq(ObjectUtil.isNotNull(dto.getLevel()), BaseStudentPost::getLevel, dto.getLevel())
+                .orderByDesc(BaseStudentPost::getId)
+                .select(BaseStudentPost.class,x -> VoToColumnUtil.fieldsToColumns(BaseStudentPostListVo.class).contains(x.getProperty()));
+
+        List<BaseStudentPost> list = baseStudentPostService.list(queryWrapper);
+        List<BaseStudentPostListVo> listVos = BeanUtil.copyToList(list, BaseStudentPostListVo.class);
+        return RT.ok(listVos);
+    }
+
     @GetMapping(value = "/page")
     @ApiOperation(value="学生职务设置列表(分页)")
     @SaCheckPermission("basestudentpost:detail")

+ 20 - 41
src/main/java/com/xjrsoft/module/student/controller/StudentManagerController.java

@@ -46,48 +46,27 @@ public class StudentManagerController {
     @SaCheckPermission("studentmanager:detail")
     public R page(@Valid BaseStudentUserPageDto dto) {
 
-//        MPJLambdaWrapper<BaseStudentUser> queryWrapper = new MPJLambdaWrapper<>();
-//        queryWrapper
-//                .disableSubLogicDel()
-//                .like(StrUtil.isNotBlank(dto.getUserName()), BaseStudentUser::getUserName, dto.getUserName())
-//                .like(StrUtil.isNotBlank(dto.getMobile()), BaseStudentUser::getMobile, dto.getMobile())
-//                .like(StrUtil.isNotBlank(dto.getName()), BaseStudentUser::getName, dto.getName())
-//                .like(StrUtil.isNotBlank(dto.getEmail()), BaseStudentUser::getEmail, dto.getEmail())
-//                .orderByDesc(BaseStudentUser::getId)
-//                .select(BaseStudentUser::getId)
-//                .select(BaseStudentUser.class, x -> VoToColumnUtil.fieldsToColumns(BaseStudentUserPageVo.class).contains(x.getProperty()))
-//                .select(BaseStudentSchoolRoll::getStudyYear)
-//                .select("a.`name` as grade_id")
-//                .select("b.`name` as major_set_id")
-//                .select("c.`name` as class_id")
-//                .innerJoin(BaseStudent.class, BaseStudent::getUserId, BaseStudentUser::getId)
-//                .leftJoin(BaseStudentSchoolRoll.class, BaseStudentSchoolRoll::getUserId, BaseStudentUser::getId)
-//                .leftJoin(DictionaryDetail.class, DictionaryDetail::getCode, BaseStudentSchoolRoll::getArchivesStatus, ext -> ext.selectAs(DictionaryDetail::getName, BaseStudentUserPageVo::getArchivesStatus))
-//                .leftJoin("base_grade a on a.id = t2.grade_id")
-//                .leftJoin("base_major_set b on b.id = t2.major_set_id")
-//                .leftJoin("base_class c on c.id = t2.class_id")
-//
-//                .selectAsClass(BaseStudent.class, BaseStudentUserPageVo.class);
-
-        IPage<BaseStudentUserPageVo> page =  studentManagerService.selectJoinListPage(ConventPage.getPage(dto),BaseStudentUserPageVo.class,
+        IPage<BaseStudentUserPageVo> page = studentManagerService.selectJoinListPage(ConventPage.getPage(dto), BaseStudentUserPageVo.class,
                 MPJWrappers.<BaseStudentUser>lambdaJoin()
-                .like(StrUtil.isNotBlank(dto.getUserName()), BaseStudentUser::getUserName, dto.getUserName())
-                .like(StrUtil.isNotBlank(dto.getMobile()), BaseStudentUser::getMobile, dto.getMobile())
-                .like(StrUtil.isNotBlank(dto.getName()), BaseStudentUser::getName, dto.getName())
-                .like(StrUtil.isNotBlank(dto.getEmail()), BaseStudentUser::getEmail, dto.getEmail())
-                .in((ObjectUtil.isNotNull(dto.getTokenType()) && dto.getTokenType() == 1), BaseClass::getTeacherId, StpUtil.getLoginIdAsLong())
-                .orderByDesc(BaseStudentUser::getId)
-                .select(BaseStudentUser::getId)
-                .select(BaseStudentUser.class, x -> VoToColumnUtil.fieldsToColumns(BaseStudentUserPageVo.class).contains(x.getProperty()))
-                .select(BaseStudentSchoolRoll::getStudyYear)
-                .select("a.`name` as grade_id")
-                .select("b.`name` as major_set_id")
-                .selectAs(BaseClass::getName, BaseStudentUserPageVo::getClassId)
-                .innerJoin(BaseStudent.class, BaseStudent::getUserId, BaseStudentUser::getId)
-                .leftJoin(BaseStudentSchoolRoll.class, BaseStudentSchoolRoll::getUserId, BaseStudentUser::getId)
-                .leftJoin("base_grade a on a.id = t2.grade_id")
-                .leftJoin("base_major_set b on b.id = t2.major_set_id")
-                .leftJoin(BaseClass.class, BaseClass::getId, BaseStudentSchoolRoll::getClassId));
+                        .like(StrUtil.isNotBlank(dto.getUserName()), BaseStudentUser::getUserName, dto.getUserName())
+                        .like(StrUtil.isNotBlank(dto.getMobile()), BaseStudentUser::getMobile, dto.getMobile())
+                        .like(StrUtil.isNotBlank(dto.getName()), BaseStudentUser::getName, dto.getName())
+                        .like(StrUtil.isNotBlank(dto.getEmail()), BaseStudentUser::getEmail, dto.getEmail())
+                        .in((ObjectUtil.isNotNull(dto.getTokenType()) && dto.getTokenType() == 1), BaseClass::getTeacherId, StpUtil.getLoginIdAsLong())
+                        .orderByDesc(BaseStudentUser::getId)
+                        .select(BaseStudentUser::getId)
+                        .select(BaseStudent::getStudentId)
+                        .select(BaseStudentSchoolRoll.class, x -> VoToColumnUtil.fieldsToColumns(BaseStudentUserPageVo.class).contains(x.getProperty()))
+                        .select(BaseStudentUser.class, x -> VoToColumnUtil.fieldsToColumns(BaseStudentUserPageVo.class).contains(x.getProperty()))
+                        .select(BaseStudentSchoolRoll::getStudyYear)
+                        .select("a.`name` as grade_name")
+                        .select("b.`name` as major_set_name")
+                        .selectAs(BaseClass::getName, BaseStudentUserPageVo::getClassName)
+                        .innerJoin(BaseStudent.class, BaseStudent::getUserId, BaseStudentUser::getId)
+                        .leftJoin(BaseStudentSchoolRoll.class, BaseStudentSchoolRoll::getUserId, BaseStudentUser::getId)
+                        .leftJoin("base_grade a on a.id = t2.grade_id")
+                        .leftJoin("base_major_set b on b.id = t2.major_set_id")
+                        .leftJoin(BaseClass.class, BaseClass::getId, BaseStudentSchoolRoll::getClassId));
 
         PageOutput<BaseStudentUserPageVo> pageOutput = ConventPage.getPageOutput(page, BaseStudentUserPageVo.class);
         return R.ok(pageOutput);

+ 29 - 0
src/main/java/com/xjrsoft/module/student/dto/BaseStudentPostListDto.java

@@ -0,0 +1,29 @@
+package com.xjrsoft.module.student.dto;
+
+import com.xjrsoft.common.page.ListInput;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.time.LocalTime;
+import java.time.LocalDateTime;
+import java.math.BigDecimal;
+import java.util.Date;
+
+
+/**
+* @title: 学生职务设置列表查询入参
+* @Author dzx
+* @Date: 2023-11-16
+* @Version 1.0
+*/
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class BaseStudentPostListDto extends ListInput {
+    /**
+     * 职务级别
+     */
+    @ApiModelProperty("职务级别")
+    private String level;
+}

+ 118 - 0
src/main/java/com/xjrsoft/module/student/vo/BaseStudentPostListVo.java

@@ -0,0 +1,118 @@
+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 dzx
+* @Date: 2023-11-16
+* @Version 1.0
+*/
+@Data
+public class BaseStudentPostListVo {
+
+    /**
+    * 主键编号
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("主键编号")
+    @ApiModelProperty("主键编号")
+    private String id;
+    /**
+    * 创建人
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("创建人")
+    @ApiModelProperty("创建人")
+    private Long createUserId;
+    /**
+    * 创建时间
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("创建时间")
+    @ApiModelProperty("创建时间")
+    private Date createDate;
+    /**
+    * 修改人
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("修改人")
+    @ApiModelProperty("修改人")
+    private Long modifyUserId;
+    /**
+    * 修改时间
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("修改时间")
+    @ApiModelProperty("修改时间")
+    private Date modifyDate;
+    /**
+    * 删除标记
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("删除标记")
+    @ApiModelProperty("删除标记")
+    private Integer deleteMark;
+    /**
+    * 有效标志
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("有效标志")
+    @ApiModelProperty("有效标志")
+    private Integer enabledMark;
+    /**
+    * 序号
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("序号")
+    @ApiModelProperty("序号")
+    private Integer sortCode;
+    /**
+    * 职务
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("职务")
+    @ApiModelProperty("职务")
+    private String post;
+    /**
+    * 职务级别
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("职务级别")
+    @ApiModelProperty("职务级别")
+    private String level;
+    /**
+    * 是否允许德育检查(1:是 0:否)
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("是否允许德育检查(1:是 0:否)")
+    @ApiModelProperty("是否允许德育检查(1:是 0:否)")
+    private Integer isAllowedCheck;
+    /**
+    * 职责描述
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("职责描述")
+    @ApiModelProperty("职责描述")
+    private String explains;
+    /**
+    * 是否启用(1:是 0:否)
+    */
+    @ContentStyle(dataFormat = 49)
+    @ExcelProperty("是否启用(1:是 0:否)")
+    @ApiModelProperty("是否启用(1:是 0:否)")
+    private Integer status;
+
+}

+ 17 - 2
src/main/java/com/xjrsoft/module/student/vo/BaseStudentUserPageVo.java

@@ -62,21 +62,36 @@ public class BaseStudentUserPageVo {
      */
     @ApiModelProperty("班级年级")
     private String gradeId;
+    /**
+     * 班级名称
+     */
+    @ApiModelProperty("班级名称")
+    private String gradeName;
     /**
      * 招生类型
      */
     @ApiModelProperty("招生类型")
     private String enrollType;
+    /**
+     * 班级编号
+     */
+    @ApiModelProperty("班级编号")
+    private String classId;
     /**
      * 班级名称
      */
     @ApiModelProperty("班级名称")
-    private String classId;
+    private String className;
     /**
      * 专业方向
      */
-    @ApiModelProperty("班级名称")
+    @ApiModelProperty("专业方向编号")
     private String majorSetId;
+    /**
+     * 专业方向
+     */
+    @ApiModelProperty("专业方向名称")
+    private String majorSetName;
     /**
      * 学制
      */

+ 2 - 2
src/test/java/com/xjrsoft/xjrsoftboot/FreeMarkerGeneratorTest.java

@@ -484,10 +484,10 @@ public class FreeMarkerGeneratorTest {
         params.setAuthor("dzx");//作者名称
         params.setPackageName("student");//包名
         params.setTableConfigs(tableConfigs);
-        params.setPage(true);//是否生成分页接口
+        params.setPage(false);//是否生成分页接口
         params.setImport(false);//是否生成导入接口
         params.setExport(true);//是否生成导出接口
-        params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
+        params.setOutMainDir(false);//是否生成在主目录,前期测试可设置成false
         params.setDs(ds);