Pārlūkot izejas kodu

移动端学生管理,学生详情插叙调整

dzx 11 mēneši atpakaļ
vecāks
revīzija
6000437cc4

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

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
+import com.xjrsoft.module.student.dto.BaseStudentInfoDetailDto;
 import com.xjrsoft.module.student.dto.BaseStudentInfoPageDto;
 import com.xjrsoft.module.student.dto.UpdateBaseStudentInfoDto;
 import com.xjrsoft.module.student.service.IBaseStudentSchoolRollService;
@@ -76,7 +77,9 @@ public class BaseStudentInfoController {
     @ApiOperation(value="根据id查询详情信息")
     @SaCheckPermission("room:detail")
     public RT<BaseStudentInfoDetailVo> info(@RequestParam Long id){
-        BaseStudentInfoDetailVo detailVo = baseStudentSchoolRollService.getInfoById(id);
+        BaseStudentInfoDetailDto dto = new BaseStudentInfoDetailDto();
+        dto.setId(id);
+        BaseStudentInfoDetailVo detailVo = baseStudentSchoolRollService.getInfoById(dto);
         if (detailVo == null) {
             return RT.error("找不到此数据!");
         }

+ 27 - 0
src/main/java/com/xjrsoft/module/student/dto/BaseStudentInfoDetailDto.java

@@ -0,0 +1,27 @@
+package com.xjrsoft.module.student.dto;
+
+import com.xjrsoft.common.page.PageInput;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+
+/**
+* @title: 学生职务设置分页查询入参
+* @Author dzx
+* @Date: 2023-11-13
+* @Version 1.0
+*/
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class BaseStudentInfoDetailDto {
+
+    @ApiModelProperty("学生userId")
+    private Long id;
+
+    @ApiModelProperty("最新一学期的编码")
+    private String beltcode;
+
+    @ApiModelProperty("学生身份证号")
+    private String credentialNumber;
+}

+ 2 - 1
src/main/java/com/xjrsoft/module/student/mapper/BaseStudentSchoolRollMapper.java

@@ -2,6 +2,7 @@ package com.xjrsoft.module.student.mapper;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.student.dto.BaseStudentInfoDetailDto;
 import com.xjrsoft.module.student.dto.BaseStudentInfoPageDto;
 import com.xjrsoft.module.student.dto.UpdateBaseStudentInfoDto;
 import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
@@ -24,7 +25,7 @@ public interface BaseStudentSchoolRollMapper extends MPJBaseMapper<BaseStudentSc
 
     Page<BaseStudentInfoPageVo> getMobilePage(Page<BaseStudentInfoPageVo> page, BaseStudentInfoPageDto dto);
 
-    BaseStudentInfoDetailVo getInfoById(Long id);
+    BaseStudentInfoDetailVo getInfoById(@Param("dto") BaseStudentInfoDetailDto dto);
 
     Boolean updateInfoByUserId(UpdateBaseStudentInfoDto dto, Long id);
 

+ 2 - 2
src/main/java/com/xjrsoft/module/student/service/IBaseStudentSchoolRollService.java

@@ -2,6 +2,7 @@ package com.xjrsoft.module.student.service;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.student.dto.BaseStudentInfoDetailDto;
 import com.xjrsoft.module.student.dto.BaseStudentInfoPageDto;
 import com.xjrsoft.module.student.dto.UpdateBaseStudentInfoDto;
 import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
@@ -30,10 +31,9 @@ public interface IBaseStudentSchoolRollService extends MPJBaseService<BaseStuden
 
     /**
      * 移动端查询学生详情信息
-     * @param id
      * @return
      */
-    BaseStudentInfoDetailVo getInfoById(Long id);
+    BaseStudentInfoDetailVo getInfoById(BaseStudentInfoDetailDto dto);
 
     /**
      * 统计学生信息

+ 5 - 2
src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentSchoolRollServiceImpl.java

@@ -11,6 +11,7 @@ import com.xjrsoft.module.base.entity.BaseClass;
 import com.xjrsoft.module.base.mapper.BaseClassMapper;
 import com.xjrsoft.module.room.mapper.RoomBedMapper;
 import com.xjrsoft.module.room.vo.RoomBedInfoVo;
+import com.xjrsoft.module.student.dto.BaseStudentInfoDetailDto;
 import com.xjrsoft.module.student.dto.BaseStudentInfoPageDto;
 import com.xjrsoft.module.student.dto.PbVXsxxsfytbDto;
 import com.xjrsoft.module.student.dto.UpdateBaseStudentInfoDto;
@@ -97,8 +98,10 @@ public class BaseStudentSchoolRollServiceImpl extends MPJBaseServiceImpl<BaseStu
     }
 
     @Override
-    public BaseStudentInfoDetailVo getInfoById(Long id) {
-        BaseStudentInfoDetailVo info = baseStudentSchoolRollMapper.getInfoById(id);
+    public BaseStudentInfoDetailVo getInfoById(BaseStudentInfoDetailDto dto) {
+        String lastBeltcode = pbSemesterConfigMapper.getLastBeltcode();
+        dto.setBeltcode(lastBeltcode);
+        BaseStudentInfoDetailVo info = baseStudentSchoolRollMapper.getInfoById(dto);
         RoomBedInfoVo bedInfoByUserId = roomBedMapper.getBedInfoByUserId(info.getId());
         if(bedInfoByUserId != null){
             info.setBedInfo(bedInfoByUserId.getBuildName() + " " + bedInfoByUserId.getRoomName() + " " + bedInfoByUserId.getBedNumber());

+ 5 - 5
src/main/resources/mapper/student/BaseStudentSchoolRollMapper.xml

@@ -72,7 +72,7 @@
         </if>
     </select>
 
-    <select id="getInfoById" resultType="com.xjrsoft.module.student.vo.BaseStudentInfoDetailVo">
+    <select id="getInfoById" parameterType="com.xjrsoft.module.student.dto.BaseStudentInfoDetailDto" resultType="com.xjrsoft.module.student.vo.BaseStudentInfoDetailVo">
         SELECT t2.id,
                t2.name AS student_name,
                t2.mobile AS phone,
@@ -99,9 +99,9 @@
                t3.stduy_status                                                                                               as stduyStatusCode,
                t3.roll_modality                                                                                              as rollModalityCode,
                 t12.name AS student_form,
-               replace(IFNULL((SELECT jfzt FROM pb_v_xsxxsfytb WHERE Studentcode = t2.credential_number AND feeitemcode LIKE '999010604%' AND beltcode = '202401'),'欠费'),'未缴费','欠费') AS jxf,
-               replace(IFNULL((SELECT jfzt FROM pb_v_xsxxsfytb WHERE Studentcode = t2.credential_number AND feeitemcode = 103042766003001 AND beltcode = '202401'),'欠费'),'未缴费','欠费') AS ssf,
-               replace(IFNULL((SELECT jfzt FROM pb_v_xsxxsfytb WHERE Studentcode = t2.credential_number AND feeitemcode LIKE '999010603%' AND beltcode = '202401'),'欠费'),'未缴费','欠费') AS jcf,
+               replace(IFNULL((SELECT jfzt FROM pb_v_xsxxsfytb WHERE Studentcode = t2.credential_number AND feeitemcode LIKE '999010604%' AND beltcode = #{dto.beltcode}),'欠费'),'未缴费','欠费') AS jxf,
+               replace(IFNULL((SELECT jfzt FROM pb_v_xsxxsfytb WHERE Studentcode = t2.credential_number AND feeitemcode = 103042766003001 AND beltcode = #{dto.beltcode}),'欠费'),'未缴费','欠费') AS ssf,
+               replace(IFNULL((SELECT jfzt FROM pb_v_xsxxsfytb WHERE Studentcode = t2.credential_number AND feeitemcode LIKE '999010603%' AND beltcode = #{dto.beltcode}),'欠费'),'未缴费','欠费') AS jcf,
                CONCAT(t17.name, ' ', t16.room_name, ' ', t15.bed_number) AS bed_info
         FROM base_student t1
                  INNER JOIN xjr_user t2 ON t1.user_id = t2.id
@@ -118,7 +118,7 @@
                  left join room_bed t15 on t15.student_user_id = t1.user_id
                  left join room t16 on t16.id = t15.room_id
                  left join base_office_build t17 on t17.id = t16.office_build_id
-        WHERE t2.id = #{id}
+        WHERE t2.id = #{dto.id}
     </select>
     <update id="updateInfoByUserId" parameterType="com.xjrsoft.module.student.dto.UpdateBaseStudentInfoDto">
         UPDATE base_student_school_roll SET delete_mark = delete_mark