Quellcode durchsuchen

学生实习记录

dzx vor 5 Monaten
Ursprung
Commit
141e672de8

+ 3 - 3
src/main/java/com/xjrsoft/module/internship/controller/InternshipPlanManageParticipantController.java

@@ -12,6 +12,7 @@ import com.xjrsoft.module.internship.dto.InternshipPlanManageParticipantPageDto;
 import com.xjrsoft.module.internship.dto.UpdateInternshipPlanManageParticipantDto;
 import com.xjrsoft.module.internship.entity.InternshipPlanManageParticipant;
 import com.xjrsoft.module.internship.service.IInternshipPlanManageParticipantService;
+import com.xjrsoft.module.internship.vo.InternshipPlanManageParticipantPageVo;
 import com.xjrsoft.module.internship.vo.InternshipPlanManageParticipantVo;
 import com.xjrsoft.module.student.vo.BaseStudentInfoPageVo;
 import io.swagger.annotations.Api;
@@ -58,9 +59,8 @@ public class InternshipPlanManageParticipantController {
     @ApiOperation(value="实习学生选择列表(分页)")
     @SaCheckPermission("internshipplanmanageparticipant:detail")
     @XjrLog(value = "实习学生选择列表(分页)")
-    public RT<PageOutput<BaseStudentInfoPageVo>> studentPage(@Valid InternshipPlanManageParticipantPageDto dto){
-        Page<BaseStudentInfoPageVo> page = internshipPlanManageParticipantService.getChooseStudentPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
-        PageOutput<BaseStudentInfoPageVo> pageOutput = ConventPage.getPageOutput(page, BaseStudentInfoPageVo.class);
+    public RT<PageOutput<InternshipPlanManageParticipantPageVo>> studentPage(@Valid InternshipPlanManageParticipantPageDto dto){
+        PageOutput<InternshipPlanManageParticipantPageVo> pageOutput = internshipPlanManageParticipantService.getChooseStudentPage(new Page<>(dto.getLimit(), dto.getSize()), dto);
         return RT.ok(pageOutput);
     }
 

+ 3 - 1
src/main/java/com/xjrsoft/module/internship/service/IInternshipPlanManageParticipantService.java

@@ -2,9 +2,11 @@ package com.xjrsoft.module.internship.service;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.common.page.PageOutput;
 import com.xjrsoft.module.internship.dto.AddInternshipPlanManageParticipantDto;
 import com.xjrsoft.module.internship.dto.InternshipPlanManageParticipantPageDto;
 import com.xjrsoft.module.internship.entity.InternshipPlanManageParticipant;
+import com.xjrsoft.module.internship.vo.InternshipPlanManageParticipantPageVo;
 import com.xjrsoft.module.student.vo.BaseStudentInfoPageVo;
 
 /**
@@ -20,7 +22,7 @@ public interface IInternshipPlanManageParticipantService extends MPJBaseService<
 
     Boolean removeStudent(AddInternshipPlanManageParticipantDto dto);
 
-    Page<BaseStudentInfoPageVo> getChooseStudentPage(Page<BaseStudentInfoPageVo> page, InternshipPlanManageParticipantPageDto dto);
+    PageOutput<InternshipPlanManageParticipantPageVo> getChooseStudentPage(Page<BaseStudentInfoPageVo> page, InternshipPlanManageParticipantPageDto dto);
 
     Page<BaseStudentInfoPageVo> getTeamStudentPage(Page<BaseStudentInfoPageVo> page, InternshipPlanManageParticipantPageDto dto);
 }

+ 25 - 3
src/main/java/com/xjrsoft/module/internship/service/impl/InternshipPlanManageParticipantServiceImpl.java

@@ -7,6 +7,8 @@ import com.github.yulichang.base.MPJBaseServiceImpl;
 import com.github.yulichang.wrapper.MPJLambdaWrapper;
 import com.xjrsoft.common.enums.DeleteMark;
 import com.xjrsoft.common.mybatis.SqlRunnerAdapter;
+import com.xjrsoft.common.page.ConventPage;
+import com.xjrsoft.common.page.PageOutput;
 import com.xjrsoft.module.base.entity.BaseClass;
 import com.xjrsoft.module.base.mapper.BaseClassMapper;
 import com.xjrsoft.module.internship.dto.AddInternshipPlanManageParticipantDto;
@@ -20,6 +22,7 @@ import com.xjrsoft.module.internship.mapper.InternshipPlanManageMapper;
 import com.xjrsoft.module.internship.mapper.InternshipPlanManageParticipantMapper;
 import com.xjrsoft.module.internship.mapper.InternshipPlanTeacherMapper;
 import com.xjrsoft.module.internship.service.IInternshipPlanManageParticipantService;
+import com.xjrsoft.module.internship.vo.InternshipPlanManageParticipantPageVo;
 import com.xjrsoft.module.student.dto.BaseStudentInfoPageDto;
 import com.xjrsoft.module.student.dto.BaseStudentUserPageDto;
 import com.xjrsoft.module.student.mapper.BaseStudentSchoolRollMapper;
@@ -34,6 +37,7 @@ import org.springframework.transaction.annotation.Transactional;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 import java.util.stream.Collectors;
 
 /**
@@ -105,7 +109,7 @@ public class InternshipPlanManageParticipantServiceImpl extends MPJBaseServiceIm
     }
 
     @Override
-    public Page<BaseStudentInfoPageVo> getChooseStudentPage(Page<BaseStudentInfoPageVo> page, InternshipPlanManageParticipantPageDto dto) {
+    public PageOutput<InternshipPlanManageParticipantPageVo> getChooseStudentPage(Page<BaseStudentInfoPageVo> page, InternshipPlanManageParticipantPageDto dto) {
         //查询自主实习和特异体质的学生
         String sql = "SELECT t1.* FROM student_internship_alone_apply t1" +
                 " INNER JOIN xjr_workflow_form_relation t2 ON t1.id = CAST(t2.form_key_value AS SIGNED)" +
@@ -139,7 +143,7 @@ public class InternshipPlanManageParticipantServiceImpl extends MPJBaseServiceIm
                         .eq(BaseClass::getDeleteMark, DeleteMark.NODELETE.getCode())
         );
         if(classList.isEmpty()){
-            return new Page<>();
+            return new PageOutput<>();
         }
         if (roleList.size() == 2 && roleList.contains("CLASSTE")) {
             studentInfoPageDto.setTeacherId(teacherId);
@@ -148,8 +152,25 @@ public class InternshipPlanManageParticipantServiceImpl extends MPJBaseServiceIm
                 studentInfoPageDto.setClassId(classList.get(0).getId());
             }
         }
+        studentInfoPageDto.setKeyWord(dto.getKeyword());
+        Page<BaseStudentInfoPageVo> mobilePage = baseStudentSchoolRollMapper.getMobilePage(page, studentInfoPageDto);
 
-        return baseStudentSchoolRollMapper.getMobilePage(page, studentInfoPageDto);
+        List<InternshipPlanManageParticipant> participantList = this.list(
+                new QueryWrapper<InternshipPlanManageParticipant>().lambda()
+                        .eq(InternshipPlanManageParticipant::getInternshipPlanManageId, dto.getInternshipPlanManageId())
+                        .eq(InternshipPlanManageParticipant::getDeleteMark, DeleteMark.NODELETE.getCode())
+        );
+        Set<Long> selectedStudents = participantList.stream().map(InternshipPlanManageParticipant::getParticipantUserId).collect(Collectors.toSet());
+
+        PageOutput<InternshipPlanManageParticipantPageVo> pageOutput = ConventPage.getPageOutput(mobilePage, InternshipPlanManageParticipantPageVo.class);
+        for (InternshipPlanManageParticipantPageVo vo : pageOutput.getList()) {
+            if(selectedStudents.contains(Long.parseLong(vo.getStudentId()))){
+                vo.setIsSelected(1);
+            }else{
+                vo.setIsSelected(0);
+            }
+        }
+        return pageOutput;
     }
 
     /**
@@ -169,6 +190,7 @@ public class InternshipPlanManageParticipantServiceImpl extends MPJBaseServiceIm
         );
         BaseStudentInfoPageDto studentInfoPageDto = new BaseStudentInfoPageDto();
         studentInfoPageDto.setInIds(list.stream().map(InternshipPlanManageParticipant::getParticipantUserId).collect(Collectors.toList()));
+        studentInfoPageDto.setKeyWord(dto.getKeyword());
         return baseStudentSchoolRollService.getMobilePage(page, studentInfoPageDto);
     }
 }

+ 90 - 85
src/main/java/com/xjrsoft/module/internship/vo/InternshipPlanManageParticipantPageVo.java

@@ -1,9 +1,11 @@
 package com.xjrsoft.module.internship.vo;
 
+import com.alibaba.excel.annotation.write.style.ContentStyle;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.time.LocalDateTime;
+import java.util.Date;
 
 /**
 * @title: 实习计划参与人表分页列表出参
@@ -14,95 +16,98 @@ import java.time.LocalDateTime;
 @Data
 public class InternshipPlanManageParticipantPageVo {
 
-    /**
-    * 主键编号
-    */
     @ApiModelProperty("主键编号")
-    private String id;
-    /**
-    * 创建人
-    */
-    @ApiModelProperty("创建人")
-    private Long createUserId;
-    /**
-    * 创建时间
-    */
-    @ApiModelProperty("创建时间")
-    private LocalDateTime createDate;
-    /**
-    * 修改人
-    */
-    @ApiModelProperty("修改人")
-    private Long modifyUserId;
-    /**
-    * 修改时间
-    */
-    @ApiModelProperty("修改时间")
-    private LocalDateTime modifyDate;
-    /**
-    * 删除标记
-    */
-    @ApiModelProperty("删除标记")
-    private Integer deleteMark;
-    /**
-    * 有效标志
-    */
-    @ApiModelProperty("有效标志")
-    private Integer enabledMark;
-    /**
-    * 序号
-    */
+    private Long id;
+
+    @ContentStyle(dataFormat = 49)
     @ApiModelProperty("序号")
     private Integer sortCode;
-    /**
-    * 实习计划id
-    */
-    @ApiModelProperty("实习计划id")
-    private Long internshipPlanManageId;
-    /**
-    * 实习参与人id
-    */
-    @ApiModelProperty("实习参与人id")
-    private Long participantUserId;
-    /**
-    * 实习参与人学号
-    */
-    @ApiModelProperty("实习参与人学号")
-    private String participantUserStudentId;
-    /**
-    * 实习参与人姓名
-    */
-    @ApiModelProperty("实习参与人姓名")
-    private String participantUserName;
-    /**
-    * 所属专业id(base_major)
-    */
-    @ApiModelProperty("所属专业id(base_major)")
-    private Long baseMajorId;
-    /**
-    * 所属专业名称
-    */
-    @ApiModelProperty("所属专业名称")
-    private String baseMajorName;
-    /**
-    * 班级id(base_class)
-    */
-    @ApiModelProperty("班级id(base_class)")
-    private Long classId;
-    /**
-    * 班级名称
-    */
+
+    @ContentStyle(dataFormat = 49)
+    @ApiModelProperty("学生姓名")
+    private String studentName;
+
+    @ContentStyle(dataFormat = 49)
+    @ApiModelProperty("学号")
+    private String studentId;
+
+    @ContentStyle(dataFormat = 49)
+    @ApiModelProperty("本人电话")
+    private String phone;
+
+    @ContentStyle(dataFormat = 49)
+    @ApiModelProperty("监护人电话")
+    private String guardianPhone;
+
+    @ContentStyle(dataFormat = 49)
+    @ApiModelProperty("班主任名称")
+    private String teacherName;
+
+    @ContentStyle(dataFormat = 49)
+    @ApiModelProperty("班主任电话")
+    private String teacherPhone;
+
+    @ContentStyle(dataFormat = 49)
     @ApiModelProperty("班级名称")
     private String className;
-    /**
-    * 带队老师(xjr_user)
-    */
-    @ApiModelProperty("带队老师(xjr_user)")
-    private Long teacherId;
-    /**
-    * 实习结果评价
-    */
-    @ApiModelProperty("实习结果评价")
-    private String result;
+
+    @ApiModelProperty("学习形式")
+    private String rollModality;
+
+    @ApiModelProperty("学习形式")
+    private String rollModalityCode;
+
+    @ApiModelProperty("学籍状态(xjr_dictionary_item[archives_status])")
+    private String archivesStatus;
+
+    @ApiModelProperty("学籍状态(xjr_dictionary_item[archives_status])")
+    private String archivesStatusCode;
+
+    @ApiModelProperty("就读方式(xjr_dictionary_item[stduy_status])")
+    private String stduyStatus;
+
+    @ApiModelProperty("就读方式(xjr_dictionary_item[stduy_status])")
+    private String stduyStatusCode;
+
+    @ApiModelProperty("床位信息")
+    private String bedInfo;
+
+    @ApiModelProperty("头像")
+    private String avatar;
+
+    @ApiModelProperty("出生日期")
+    private Date birthDate;
+
+    @ApiModelProperty("民族")
+    private String nation;
+
+    private String majorSetName;
+
+    @ApiModelProperty("性别")
+    private String gender;
+
+    @ApiModelProperty("性别中文")
+    private String genderCn;
+
+    @ApiModelProperty("军训费")
+    private String jxf;
+
+    @ApiModelProperty("教材费")
+    private String jcf;
+
+    @ApiModelProperty("宿舍费")
+    private String ssf;
+
+    @ApiModelProperty("学生类别")
+    private String studentForm;
+
+    @ApiModelProperty("身份证号")
+    private String credentialNumber;
+
+    @ApiModelProperty("实习状态")
+    private String internshipStateCn;
+
+    @ApiModelProperty("是否已被选择(1:是 0:否)")
+    private Integer isSelected;
 
 }