Просмотр исходного кода

/student/schoolRollFurtherEducation/info 升学管理详情接口

phoenix 1 год назад
Родитель
Сommit
b0684b2ea7

+ 3 - 3
src/main/java/com/xjrsoft/module/student/controller/SchoolRollFurtherEducationController.java

@@ -59,11 +59,11 @@ public class SchoolRollFurtherEducationController {
     @ApiOperation(value="根据id查询升学管理信息")
     @SaCheckPermission("schoolrollfurthereducation:detail")
     public RT<SchoolRollFurtherEducationVo> info(@RequestParam Long id){
-        SchoolRollFurtherEducation schoolRollFurtherEducation = schoolRollFurtherEducationService.getById(id);
-        if (schoolRollFurtherEducation == null) {
+        SchoolRollFurtherEducationVo schoolRollFurtherEducationVo = schoolRollFurtherEducationService.getDetailById(id);
+        if (schoolRollFurtherEducationVo == null) {
            return RT.error("找不到此数据!");
         }
-        return RT.ok(BeanUtil.toBean(schoolRollFurtherEducation, SchoolRollFurtherEducationVo.class));
+        return RT.ok(schoolRollFurtherEducationVo);
     }
 
 

+ 8 - 0
src/main/java/com/xjrsoft/module/student/mapper/SchoolRollFurtherEducationMapper.java

@@ -10,6 +10,7 @@ import com.xjrsoft.module.student.dto.SchoolRollFurtherEducationPageDto;
 import com.xjrsoft.module.student.entity.SchoolRollFurtherEducation;
 import com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoPageVo;
 import com.xjrsoft.module.student.vo.SchoolRollFurtherEducationPageVo;
+import com.xjrsoft.module.student.vo.SchoolRollFurtherEducationVo;
 import org.apache.ibatis.annotations.Mapper;
 
 /**
@@ -27,4 +28,11 @@ public interface SchoolRollFurtherEducationMapper extends MPJBaseMapper<SchoolRo
      */
     Page<SchoolRollFurtherEducationPageVo> getPageListPc(IPage<SchoolRollFurtherEducationPageDto> page, SchoolRollFurtherEducationPageDto dto);
 
+    /**
+     * 根据id查询升学管理信息
+     * @param id
+     * @return
+     */
+    SchoolRollFurtherEducationVo getDetailById(Long id);
+
 }

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

@@ -7,6 +7,7 @@ import com.xjrsoft.module.student.dto.SchoolRollFurtherEducationPageDto;
 import com.xjrsoft.module.student.entity.SchoolRollFurtherEducation;
 import com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoPageVo;
 import com.xjrsoft.module.student.vo.SchoolRollFurtherEducationPageVo;
+import com.xjrsoft.module.student.vo.SchoolRollFurtherEducationVo;
 import lombok.Data;
 import java.util.List;
 
@@ -25,4 +26,11 @@ public interface ISchoolRollFurtherEducationService extends MPJBaseService<Schoo
      */
     IPage<SchoolRollFurtherEducationPageVo> getPageListPc(SchoolRollFurtherEducationPageDto dto);
 
+    /**
+     * 根据id查询升学管理信息
+     * @param id
+     * @return
+     */
+    SchoolRollFurtherEducationVo getDetailById(Long id);
+
 }

+ 12 - 0
src/main/java/com/xjrsoft/module/student/service/impl/SchoolRollFurtherEducationServiceImpl.java

@@ -10,6 +10,7 @@ import com.xjrsoft.module.student.mapper.SchoolRollFurtherEducationMapper;
 import com.xjrsoft.module.student.service.ISchoolRollFurtherEducationService;
 import com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoPageVo;
 import com.xjrsoft.module.student.vo.SchoolRollFurtherEducationPageVo;
+import com.xjrsoft.module.student.vo.SchoolRollFurtherEducationVo;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -39,4 +40,15 @@ public class SchoolRollFurtherEducationServiceImpl extends MPJBaseServiceImpl<Sc
         IPage<SchoolRollFurtherEducationPageVo> pageList = schoolRollFurtherEducationMapper.getPageListPc(ConventPage.getPage(dto),dto);
         return pageList;
     }
+
+    /**
+     * 根据id查询升学管理信息
+     * @param id
+     * @return
+     */
+    @Override
+    public SchoolRollFurtherEducationVo getDetailById(Long id) {
+        SchoolRollFurtherEducationVo schoolRollFurtherEducationVo = schoolRollFurtherEducationMapper.getDetailById(id);
+        return schoolRollFurtherEducationVo;
+    }
 }

+ 0 - 25
src/main/java/com/xjrsoft/module/student/service/impl/SchoolRollReasonServiceImpl.java.1701246165568.bak

@@ -1,25 +0,0 @@
-package com.xjrsoft.module.student.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.github.yulichang.base.MPJBaseServiceImpl;
-import com.xjrsoft.module.student.entity.SchoolRollReason;
-import com.xjrsoft.module.student.mapper.SchoolRollReasonMapper;
-import com.xjrsoft.module.student.service.ISchoolRollReasonService;
-import lombok.AllArgsConstructor;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import java.util.List;
-import java.util.Objects;
-import java.util.stream.Collectors;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-
-/**
-* @title: 学籍异动原因
-* @Author szs
-* @Date: 2023-11-29
-* @Version 1.0
-*/
-@Service
-@AllArgsConstructor
-public class SchoolRollReasonServiceImpl extends MPJBaseServiceImpl<SchoolRollReasonMapper, SchoolRollReason> implements ISchoolRollReasonService {
-}

+ 11 - 0
src/main/java/com/xjrsoft/module/student/vo/SchoolRollFurtherEducationPageVo.java

@@ -30,6 +30,11 @@ public class SchoolRollFurtherEducationPageVo {
      */
     @ApiModelProperty("序号")
     private Integer sortCode;
+    /**
+     * 学生编号对应的(学生user_id)
+     */
+    @ApiModelProperty("学生编号(学生user_id)")
+    private String studentId;
     /**
      * 学生编号对应的姓名(学生user_id)
      */
@@ -75,4 +80,10 @@ public class SchoolRollFurtherEducationPageVo {
     */
     @ApiModelProperty("有效标志")
     private Integer enabledMark;
+    /**
+     * 状态
+     */
+    @ApiModelProperty("状态")
+    private Integer status;
+
 }

+ 35 - 2
src/main/java/com/xjrsoft/module/student/vo/SchoolRollFurtherEducationVo.java

@@ -94,6 +94,39 @@ public class SchoolRollFurtherEducationVo {
     @ApiModelProperty("状态(1:结束 0:未结束)")
     private Integer status;
 
-
-
+    /**
+     * 学生编号对应的姓名(学生user_id)
+     */
+    @ApiModelProperty("学生编号姓名(学生user_id)")
+    private String studentIdCN;
+    /**
+     * 学生证件号码
+     */
+    @ApiModelProperty("证件号码")
+    private String credentialNumber;
+    /**
+     * 异动前专业方向中文(base_major_set)
+     */
+    @ApiModelProperty("异动前专业方向中文(base_major_set)")
+    private String beforeMajorSetIdCN;
+    /**
+     * 异动前班级中文(base_class)
+     */
+    @ApiModelProperty("异动前班级中文(base_class)")
+    private String beforeClassIdCN;
+    /**
+     * 异动后班级中文(base_class)
+     */
+    @ApiModelProperty("异动后班级中文(base_class)")
+    private String backClassIdCN;
+    /**
+     * 异动后专业方向中文(base_major_set)
+     */
+    @ApiModelProperty("异动后专业方向中文(base_major_set)")
+    private String backMajorSetIdCN;
+    /**
+     * 申请人(操作人)姓名
+     */
+    @ApiModelProperty("申请人姓名")
+    private String applicantUserIdCN;
 }

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

@@ -8,6 +8,7 @@
         SELECT
             t.id,
             t.sort_code,
+            t.student_id AS studentId,
             t1.name AS studentIdCN,
             t1.credential_number AS credentialNumber,
             t2.name AS beforeMajorSetIdCN,
@@ -24,7 +25,7 @@
                  LEFT JOIN base_class t4 ON (t.back_class_id = t4.id)
                  LEFT JOIN base_major_set t5 ON (t.back_major_set_id = t5.id)
                  LEFT JOIN xjr_user t6 ON (t.applicant_user_id = t6.id)
-        WHERE t.delete_mark = 0
+        WHERE t.delete_mark = 0 AND t.status = 1
         <if test="dto.studentIdCN != null and dto.studentIdCN != ''">
             and t1.name like concat('%',#{dto.studentIdCN},'%')
         </if>
@@ -39,4 +40,25 @@
         </if>
         ORDER BY t.id DESC;
     </select>
+
+    <select id="getDetailById"
+            resultType="com.xjrsoft.module.student.vo.SchoolRollFurtherEducationVo">
+        SELECT
+            t.*,
+            t1.name AS studentIdCN,
+            t1.credential_number AS credentialNumber,
+            t2.name AS beforeMajorSetIdCN,
+            t3.name AS beforeClassIdCN,
+            t4.name AS backClassIdCN,
+            t5.name AS backMajorSetIdCN,
+            t6.name AS applicantUserIdCN
+        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)
+                 LEFT JOIN base_class t3 ON (t.before_class_id = t3.id)
+                 LEFT JOIN base_class t4 ON (t.back_class_id = t4.id)
+                 LEFT JOIN base_major_set t5 ON (t.back_major_set_id = t5.id)
+                 LEFT JOIN xjr_user t6 ON (t.applicant_user_id = t6.id)
+        WHERE t.id = #{id} AND t.delete_mark = 0 AND t.status = 1;
+    </select>
 </mapper>