ソースを参照

实习管理增加查询字段

dzx 5 ヶ月 前
コミット
470f204837

+ 12 - 0
src/main/java/com/xjrsoft/module/internship/dto/InternshipPlanManageParticipantPageDto.java

@@ -18,4 +18,16 @@ public class InternshipPlanManageParticipantPageDto extends PageInput {
 
     @ApiModelProperty("实习计划id")
     private Long internshipPlanManageId;
+
+    @ApiModelProperty("姓名")
+    private String name;
+
+    @ApiModelProperty("手机号")
+    private String mobile;
+
+    @ApiModelProperty("班级名称")
+    private String className;
+
+    @ApiModelProperty("身份证号")
+    private String credentialNumber;
 }

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

@@ -1,6 +1,7 @@
 package com.xjrsoft.module.internship.service.impl;
 
 import cn.dev33.satoken.stp.StpUtil;
+import cn.hutool.core.bean.BeanUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.base.MPJBaseServiceImpl;
@@ -128,7 +129,7 @@ public class InternshipPlanManageParticipantServiceImpl extends MPJBaseServiceIm
             notInIds.add(Long.parseLong(objectMap.get("id").toString()));
         }
 
-        BaseStudentInfoPageDto studentInfoPageDto = new BaseStudentInfoPageDto();
+        BaseStudentInfoPageDto studentInfoPageDto = BeanUtil.toBean(dto, BaseStudentInfoPageDto.class);
         studentInfoPageDto.setNotInIds(notInIds);
 
         List<String> roleList = StpUtil.getRoleList();
@@ -191,7 +192,7 @@ public class InternshipPlanManageParticipantServiceImpl extends MPJBaseServiceIm
 
         Map<Long, String> collect = list.stream().filter(x -> x.getResult() != null).collect(Collectors.toMap(InternshipPlanManageParticipant::getParticipantUserId, InternshipPlanManageParticipant::getResult));
 
-        BaseStudentInfoPageDto studentInfoPageDto = new BaseStudentInfoPageDto();
+        BaseStudentInfoPageDto studentInfoPageDto = BeanUtil.toBean(dto, BaseStudentInfoPageDto.class);
         studentInfoPageDto.setInIds(list.stream().map(InternshipPlanManageParticipant::getParticipantUserId).collect(Collectors.toList()));
         studentInfoPageDto.setKeyWord(dto.getKeyword());
 
@@ -212,7 +213,7 @@ public class InternshipPlanManageParticipantServiceImpl extends MPJBaseServiceIm
 
         Map<Long, String> collect = list.stream().filter(x -> x.getResult() != null).collect(Collectors.toMap(InternshipPlanManageParticipant::getParticipantUserId, InternshipPlanManageParticipant::getResult));
 
-        BaseStudentInfoPageDto studentInfoPageDto = new BaseStudentInfoPageDto();
+        BaseStudentInfoPageDto studentInfoPageDto = BeanUtil.toBean(dto, BaseStudentInfoPageDto.class);
         studentInfoPageDto.setInIds(list.stream().map(InternshipPlanManageParticipant::getParticipantUserId).collect(Collectors.toList()));
         studentInfoPageDto.setKeyWord(dto.getKeyword());
 

+ 12 - 0
src/main/java/com/xjrsoft/module/student/dto/BaseStudentInfoPageDto.java

@@ -55,4 +55,16 @@ public class BaseStudentInfoPageDto extends PageInput {
 
     @ApiModelProperty("包含的学生id")
     private List<Long> inIds;
+
+    @ApiModelProperty("姓名")
+    private String name;
+
+    @ApiModelProperty("手机号")
+    private String mobile;
+
+    @ApiModelProperty("班级名称")
+    private String className;
+
+    @ApiModelProperty("身份证号")
+    private String credentialNumber;
 }

+ 13 - 0
src/main/resources/mapper/student/BaseStudentSchoolRollMapper.xml

@@ -73,6 +73,19 @@
             OR t2.mobile LIKE concat('%', #{dto.keyWord}, '%')
             )
         </if>
+
+        <if test="dto.name != null and dto.name != ''">
+            AND t2.name LIKE concat('%', #{dto.name}, '%')
+        </if>
+        <if test="dto.mobile != null and dto.mobile != ''">
+            AND t2.mobile LIKE concat('%', #{dto.mobile}, '%')
+        </if>
+        <if test="dto.className != null and dto.className != ''">
+            AND t4.name LIKE concat('%', #{dto.className}, '%')
+        </if>
+        <if test="dto.credentialNumber != null and dto.credentialNumber != ''">
+            AND t2.credential_number LIKE concat('%', #{dto.credentialNumber}, '%')
+        </if>
         <if test="dto.notInIds != null and dto.notInIds.size() > 0">
             and t2.id in
             <foreach item="notInId" index="index" collection="dto.notInIds" open="(" close=")" separator=",">