Browse Source

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

dzx 1 year ago
parent
commit
9a5e6ea0ba

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

@@ -27,6 +27,8 @@ import com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoDetailVo;
 import com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoMobileDetailVo;
 import com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoMobilePageVo;
 import com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoPageVo;
+import com.xjrsoft.module.system.entity.File;
+import com.xjrsoft.module.system.service.IFileService;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -50,6 +52,9 @@ public class BaseStudentPunishmentInfoServiceImpl extends MPJBaseServiceImpl<Bas
 
     IBasePunishStudentRelationService basePunishStudentRelationService;
 
+    private final IFileService fileService;
+
+
     /**
      * 学生处分信息管理列表(分页)
      * @param dto 处分管理信息前端请求实体对象
@@ -93,6 +98,9 @@ public class BaseStudentPunishmentInfoServiceImpl extends MPJBaseServiceImpl<Bas
 
         baseStudentPunishmentInfoDetailVo.setStudentList(studentList);
 
+        // 添加文件列表
+        baseStudentPunishmentInfoDetailVo.setFileList(fileService.list(Wrappers.<File>query().lambda().eq(File::getFolderId, baseStudentPunishmentInfoDetailVo.getFileId())));
+
         return baseStudentPunishmentInfoDetailVo;
     }
 

+ 13 - 0
src/main/java/com/xjrsoft/module/student/vo/BaseStudentPunishmentInfoDetailVo.java

@@ -3,6 +3,7 @@ package com.xjrsoft.module.student.vo;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.xjrsoft.module.student.entity.BasePunishmentStudentRelation;
 import com.xjrsoft.module.student.entity.BaseStudentPunishmentInfo;
+import com.xjrsoft.module.system.entity.File;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
@@ -24,4 +25,16 @@ public class BaseStudentPunishmentInfoDetailVo extends BaseStudentPunishmentInfo
     @ApiModelProperty("学生集合")
     private List<BasePunishmentStudentRelation> studentList;
 
+
+    /**
+     * 文件id
+     */
+    @ApiModelProperty("文件id")
+    private Long fileId;
+
+    /**
+     * 该处分信息下的文件集合
+     */
+    @ApiModelProperty("文件集合")
+    private List<File> fileList;
 }

+ 4 - 1
src/main/resources/mapper/student/BaseStudentPunishmentInfoMapper.xml

@@ -63,6 +63,7 @@
             and t.name like concat('$',#{dto.studentName},'%')
         </if>
     </select>
+
     <select id="getMobileInfo" parameterType="com.xjrsoft.module.student.dto.BaseStudentPunishmentInfoMobileDetailDto" resultType="com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoMobileDetailVo">
         SELECT t.id,t3.name as student_name,t3.gender,t3.credential_number,t4.punishment_type,t1.reason,t1.start_time,t5.student_id,
         t.adjust_date,t.adjust_type,t.adjust_reason,t.modify_date,t1.create_date,t1.is_publicity,t1.end_time,t.class_name,t.major FROM base_punishment_student_relation t
@@ -74,6 +75,7 @@
         WHERE t1.status = 1 AND t1.delete_mark = 0 AND t3.delete_mark = 0 AND t2.delete_mark = 0
         and t.id = #{dto.id}
     </select>
+
     <select id="getInfo"
             resultType="com.xjrsoft.module.student.vo.BaseStudentPunishmentInfoDetailVo">
         SELECT
@@ -85,7 +87,8 @@
         t.end_time,
         t.is_publicity,
         t.push_message_object,
-        t.reason
+        t.reason,
+        t.file_id
         FROM base_student_punishment_info t
         INNER JOIN base_semester t1 ON (t1.id = t.base_semester_id)
         INNER JOIN base_punishment_type t2 ON (t2.id = t.punishment_type_id)