Pārlūkot izejas kodu

Merge branch 'pre'

dzx 9 mēneši atpakaļ
vecāks
revīzija
9ab91669d0

+ 12 - 0
src/main/java/com/xjrsoft/module/banding/vo/BandingTaskClassSureListVo.java

@@ -51,5 +51,17 @@ public class BandingTaskClassSureListVo {
     @ApiModelProperty("走读人数")
     private Integer notStayCount;
 
+    @ApiModelProperty("男生住校人数")
+    private Integer maleStayCount;
+
+    @ApiModelProperty("男生走读人数")
+    private Integer maleNotStayCount;
+
+    @ApiModelProperty("女生住校人数")
+    private Integer femaleStayCount;
+
+    @ApiModelProperty("女生走读人数")
+    private Integer femaleNotStayCount;
+
 
 }

+ 13 - 0
src/main/java/com/xjrsoft/module/evaluate/service/impl/EvaluateObjectServiceImpl.java

@@ -516,6 +516,19 @@ public class EvaluateObjectServiceImpl extends MPJBaseServiceImpl<EvaluateObject
                 }
                 objectListVo.setExecuterCount(currentExecuterList.size());
                 objectListVo.setExecuterList(currentExecuterList);
+
+
+                Set<String> collect = currentExecuterList.stream().map(EvaluateExecuterVo::getExecuterId).collect(Collectors.toSet());
+                List<EvaluateExecuterVo> notExecuterList = new ArrayList<>();
+                List<User> notUserList = userList.stream().filter(x -> !collect.contains(x.getId().toString())).collect(Collectors.toList());
+                for (User user : notUserList) {
+                    EvaluateExecuterVo evaluateExecuterVo = new EvaluateExecuterVo();
+                    evaluateExecuterVo.setExecuterId(user.getId().toString());
+                    evaluateExecuterVo.setEvaluateObjectId(objectListVo.getObjectId());
+                    evaluateExecuterVo.setExecuterName(user.getName());
+                    notExecuterList.add(evaluateExecuterVo);
+                }
+                objectListVo.setNotExecuterList(notExecuterList);
             }
 
         }

+ 3 - 0
src/main/java/com/xjrsoft/module/evaluate/vo/EvaluateObjectListVo.java

@@ -52,6 +52,9 @@ public class EvaluateObjectListVo {
     @ApiModelProperty("参与评价的人")
     private List<EvaluateExecuterVo> executerList;
 
+    @ApiModelProperty("待选参与评价的人")
+    private List<EvaluateExecuterVo> notExecuterList;
+
     /**
      * 被评价对象id
      */

+ 2 - 0
src/main/java/com/xjrsoft/module/student/controller/BaseStudentInfoController.java

@@ -6,6 +6,7 @@ import cn.hutool.core.bean.BeanUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.xjrsoft.common.annotation.XjrLog;
+import com.xjrsoft.common.enums.ArchivesStatusEnum;
 import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
@@ -105,6 +106,7 @@ public class BaseStudentInfoController {
     @SaCheckPermission("room:detail")
     @XjrLog(value = "根据姓名或者身份证号查询详情信息")
     public RT<List<BaseStudentSompleInfoVo>> info(@Valid BaseStudentSimpleInfoDto dto) {
+        dto.setArchivesStatus(ArchivesStatusEnum.FB2901.getCode());
         List<BaseStudentSompleInfoVo> infos = baseStudentSchoolRollService.getInfosByParam(dto);
         return RT.ok(infos);
     }

+ 49 - 7
src/main/java/com/xjrsoft/module/student/controller/StudentManagerController.java

@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.wrapper.MPJLambdaWrapper;
 import com.xjrsoft.common.annotation.XjrLog;
+import com.xjrsoft.common.enums.ArchivesStatusEnum;
 import com.xjrsoft.common.enums.DeleteMark;
 import com.xjrsoft.common.enums.GenderDictionaryEnum;
 import com.xjrsoft.common.exception.MyException;
@@ -27,25 +28,40 @@ import com.xjrsoft.module.base.entity.BaseGrade;
 import com.xjrsoft.module.base.service.IBaseClassService;
 import com.xjrsoft.module.base.service.IBaseGradeService;
 import com.xjrsoft.module.concat.service.IXjrUserService;
-import com.xjrsoft.module.feedback.entity.FeedbackItem;
 import com.xjrsoft.module.hikvision.util.DataUtil;
 import com.xjrsoft.module.organization.entity.UserDeptRelation;
 import com.xjrsoft.module.organization.service.IUserDeptRelationService;
 import com.xjrsoft.module.room.service.IRoomBedService;
 import com.xjrsoft.module.student.dto.AddBaseStudentUserDto;
+import com.xjrsoft.module.student.dto.BaseStudentInfoDetailDto;
+import com.xjrsoft.module.student.dto.BaseStudentSimpleInfoDto;
 import com.xjrsoft.module.student.dto.BaseStudentUserPageDto;
 import com.xjrsoft.module.student.dto.MajorGradeClassDto;
 import com.xjrsoft.module.student.dto.UpdateBaseStudentUserDto;
 import com.xjrsoft.module.student.entity.BaseStudent;
 import com.xjrsoft.module.student.entity.BaseStudentUser;
+import com.xjrsoft.module.student.service.IBaseStudentSchoolRollService;
 import com.xjrsoft.module.student.service.IStudentManagerService;
-import com.xjrsoft.module.student.vo.*;
+import com.xjrsoft.module.student.vo.BaseDepMajorGradeClassStudenTreeVo;
+import com.xjrsoft.module.student.vo.BaseStudentInfoDetailVo;
+import com.xjrsoft.module.student.vo.BaseStudentSchoolRollVo;
+import com.xjrsoft.module.student.vo.BaseStudentSompleInfoVo;
+import com.xjrsoft.module.student.vo.BaseStudentTreeVo;
+import com.xjrsoft.module.student.vo.BaseStudentUserPageVo;
+import com.xjrsoft.module.student.vo.BaseStudentUserVo;
 import com.xjrsoft.module.teacher.entity.XjrUser;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 import org.apache.commons.lang3.StringUtils;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.validation.Valid;
@@ -53,7 +69,16 @@ import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.text.ParseException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Base64;
+import java.util.Comparator;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 import java.util.stream.Collectors;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
@@ -65,6 +90,7 @@ import java.util.zip.ZipFile;
 public class StudentManagerController {
 
     private final IStudentManagerService studentManagerService;
+    private final IBaseStudentSchoolRollService schoolRollService;
     private final IBaseGradeService baseGradeService;
     private final IBaseClassService baseClassService;
     private final IXjrUserService xjrUserService;
@@ -213,6 +239,19 @@ public class StudentManagerController {
         return R.ok(studentManagerService.add(dto));
     }
 
+    @GetMapping(value = "/find-student-exist")
+    @ApiOperation(value = "新增前判断学生是否存在")
+    @SaCheckPermission("studentmanager:detail")
+    @XjrLog(value = "新增前判断学生是否存在")
+    public RT<BaseStudentSompleInfoVo> info(@Valid BaseStudentSimpleInfoDto dto) {
+        List<BaseStudentSompleInfoVo> infos = schoolRollService.getInfosByParam(dto);
+        if(infos.isEmpty()){
+            return RT.ok();
+        }
+        return RT.ok(infos.get(0));
+    }
+
+
     @PostMapping("upload-image")
     @ApiOperation(value = "上传学生学籍照片")
     @SaCheckPermission("studentmanager:add")
@@ -252,10 +291,13 @@ public class StudentManagerController {
     @PostMapping("/import")
     @ApiOperation(value = "导入学生信息")
     @XjrLog(value = "导入学生信息", saveRequestData = false, saveResponseData = true)
-    public RT<Boolean> importData(@RequestParam("file") MultipartFile file) throws IOException, ParseException {
+    public RT<List<BaseStudentSompleInfoVo>> importData(@RequestParam("file") MultipartFile file) throws IOException, ParseException {
         List<Map<Integer, Object>> excelDataList = EasyExcel.read(file.getInputStream()).sheet().headRowNumber(3).doReadSync();
-
-        return RT.ok(studentManagerService.importStudentData(excelDataList));
+        List<BaseStudentSompleInfoVo> result = studentManagerService.importStudentData(excelDataList);
+        if(!result.isEmpty()){
+            return RT.ok(result);
+        }
+        return RT.ok(null);
     }
 
 

+ 8 - 0
src/main/java/com/xjrsoft/module/student/dto/BaseStudentSimpleInfoDto.java

@@ -1,8 +1,11 @@
 package com.xjrsoft.module.student.dto;
 
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import java.util.List;
+
 /**
  * @author dzx
  * @date 2024/7/9
@@ -23,4 +26,9 @@ public class BaseStudentSimpleInfoDto {
 
     @ApiModelProperty("学籍状态")
     private String archivesStatus;
+
+    private List<String> idNumberList;
+
+    @JsonIgnore
+    private Integer findNewStudent = 1;
 }

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

@@ -50,16 +50,16 @@ public interface BaseStudentSchoolRollMapper extends MPJBaseMapper<BaseStudentSc
 
 
     @Update("UPDATE base_student_school_roll SET class_id = #{classId},major_set_id=#{majorSetId} where user_id = #{userId}")
-    Boolean updateStudentClass1(Long classId, Long majorSetId, Long userId);
+    Boolean updateStudentClass1(@Param("classId") Long classId, @Param("majorSetId") Long majorSetId, @Param("userId") Long userId);
 
     @Update("UPDATE base_student_school_roll SET class_id = #{classId} where user_id = #{userId}")
-    Boolean updateStudentClass(Long classId, Long userId);
+    Boolean updateStudentClass(@Param("classId") Long classId, @Param("userId") Long userId);
 
     @Update("UPDATE base_student_school_roll SET class_id = #{classId},major_set_id=#{majorSetId},grade_id=#{gradeId} where user_id = #{userId}")
-    Boolean updateStudentClass(Long classId, Long gradeId, Long majorSetId, Long userId);
+    Boolean updateStudentClass(@Param("classId") Long classId, @Param("gradeId") Long gradeId, @Param("majorSetId") Long majorSetId, @Param("userId") Long userId);
 
     @Update("UPDATE base_student_school_roll SET class_id = #{classId},major_set_id=#{majorSetId},grade_id=#{gradeId},stduy_status=#{stduyStatus} where user_id = #{userId}")
-    Boolean updateStudentClassGradeMajorStduyStatus(Long classId, Long gradeId, Long majorSetId, String stduyStatus, Long userId);
+    Boolean updateStudentClassGradeMajorStduyStatus(@Param("classId") Long classId, @Param("gradeId") Long gradeId, @Param("majorSetId") Long majorSetId, @Param("stduyStatus") String stduyStatus, @Param("userId") Long userId);
 
 
     String getClassNameByUserId(@Param("userId") Long userId);

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

@@ -9,6 +9,7 @@ import com.xjrsoft.module.student.dto.UpdateBaseStudentUserDto;
 import com.xjrsoft.module.student.entity.BaseStudentUser;
 import com.xjrsoft.module.student.vo.BaseDepMajorGradeClassStudenTreeVo;
 import com.xjrsoft.module.student.vo.BaseStudentClassVo;
+import com.xjrsoft.module.student.vo.BaseStudentSompleInfoVo;
 import com.xjrsoft.module.student.vo.BaseStudentUserPageVo;
 import com.xjrsoft.module.student.vo.PersonalPortraitPersonalInfoVo;
 import org.springframework.web.multipart.MultipartFile;
@@ -60,7 +61,7 @@ public interface IStudentManagerService extends MPJBaseService<BaseStudentUser>
      */
     PersonalPortraitPersonalInfoVo getPersonalInfo(Long userId);
 
-    Boolean importStudentData(List<Map<Integer, Object>> excelDataList) throws ParseException;
+    List<BaseStudentSompleInfoVo> importStudentData(List<Map<Integer, Object>> excelDataList) throws ParseException;
 
 
     Page<BaseStudentUserPageVo> getStudentPage(Page<BaseStudentUserPageVo> page, BaseStudentUserPageDto dto);

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

@@ -274,9 +274,8 @@ public class BaseStudentSchoolRollServiceImpl extends MPJBaseServiceImpl<BaseStu
 
     @Override
     public List<BaseStudentSompleInfoVo> getInfosByParam(BaseStudentSimpleInfoDto dto) {
-        dto.setArchivesStatus(ArchivesStatusEnum.FB2901.getCode());
         List<BaseStudentSompleInfoVo> userList = userMapper.getInfosByParam(dto);
-        if(userList.isEmpty()){
+        if(userList.isEmpty() && dto.getFindNewStudent() == 1){
             userList = newStudentMapper.getInfosByParam(dto);
         }
         return userList;

+ 27 - 9
src/main/java/com/xjrsoft/module/student/service/impl/StudentManagerServiceImpl.java

@@ -32,11 +32,13 @@ import com.xjrsoft.module.organization.entity.User;
 import com.xjrsoft.module.organization.entity.UserDeptRelation;
 import com.xjrsoft.module.organization.entity.UserRoleRelation;
 import com.xjrsoft.module.organization.mapper.UserDeptRelationMapper;
+import com.xjrsoft.module.organization.mapper.UserMapper;
 import com.xjrsoft.module.organization.mapper.UserRoleRelationMapper;
 import com.xjrsoft.module.organization.service.IDepartmentService;
 import com.xjrsoft.module.organization.service.IUserDeptRelationService;
 import com.xjrsoft.module.organization.service.IUserService;
 import com.xjrsoft.module.student.dto.AddBaseStudentUserDto;
+import com.xjrsoft.module.student.dto.BaseStudentSimpleInfoDto;
 import com.xjrsoft.module.student.dto.BaseStudentUserPageDto;
 import com.xjrsoft.module.student.dto.MajorGradeClassDto;
 import com.xjrsoft.module.student.dto.UpdateBaseStudentUserDto;
@@ -75,7 +77,7 @@ import java.util.stream.Collectors;
 @Service
 @AllArgsConstructor
 public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUserMapper, BaseStudentUser> implements IStudentManagerService {
-    private final com.xjrsoft.module.student.mapper.BaseStudentUserMapper studentbaseManagerBaseStudentUserMapper;
+    private final com.xjrsoft.module.student.mapper.BaseStudentUserMapper baseStudentUserMapper;
 
     private final IBaseStudentService baseStudentService;
     private final BaseClassMapper baseClassMapper;
@@ -109,6 +111,7 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
     private final IBaseGradeService baseGradeService;
     private final IStudentChangeRecordService recordService;
     private IDictionarydetailService dictionarydetailService;
+    private final UserMapper userMapper;
 
     @Override
     @Transactional(rollbackFor = Exception.class)
@@ -119,7 +122,7 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
 
         // 用户身份证后6位作为默认密码
         baseStudentUser.setPassword(BCrypt.hashpw(propertiesConfig.getDefaultPassword(), BCrypt.gensalt()));
-        studentbaseManagerBaseStudentUserMapper.insert(baseStudentUser);
+        baseStudentUserMapper.insert(baseStudentUser);
         for (BaseStudent baseStudent : baseStudentUser.getBaseStudentList()) {
 
             baseStudent.setUserId(baseStudentUser.getId());
@@ -203,11 +206,18 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
     @Override
     @Transactional(rollbackFor = Exception.class)
     public Boolean update(UpdateBaseStudentUserDto dto) {
-
+        List<BaseStudentUser> studentUserList = baseStudentUserMapper.selectList(
+                new QueryWrapper<BaseStudentUser>().lambda()
+                        .eq(BaseStudentUser::getCredentialNumber, dto.getCredentialNumber())
+                        .ne(BaseStudentUser::getId, dto.getId())
+        );
+        if(!studentUserList.isEmpty()){
+            throw new MyException("该身份证已被其他人占用,请检查是否正确");
+        }
         BaseStudentUser baseStudentUser = BeanUtil.toBean(dto, BaseStudentUser.class);
         baseStudentUser.setCode(dto.getUserName());
 
-        studentbaseManagerBaseStudentUserMapper.updateById(baseStudentUser);
+        baseStudentUserMapper.updateById(baseStudentUser);
 
         //先删除再新增
         userDeptRelationService.remove(Wrappers.<UserDeptRelation>query().lambda().eq(UserDeptRelation::getUserId, baseStudentUser.getId()));
@@ -428,7 +438,7 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
     @Override
     @Transactional(rollbackFor = Exception.class)
     public Boolean delete(List<Long> ids) {
-        studentbaseManagerBaseStudentUserMapper.deleteBatchIds(ids);
+        baseStudentUserMapper.deleteBatchIds(ids);
         baseStudentService.remove(Wrappers.lambdaQuery(BaseStudent.class).in(BaseStudent::getUserId, ids));
         studentContactService.remove(Wrappers.lambdaQuery(BaseStudentContact.class).in(BaseStudentContact::getUserId, ids));
         familyMapper.delete(Wrappers.lambdaQuery(BaseStudentFamily.class).in(BaseStudentFamily::getUserId, ids));
@@ -481,11 +491,19 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
     }
 
     @Override
-    public Boolean importStudentData(List<Map<Integer, Object>> excelDataList) throws ParseException {
+    public List<BaseStudentSompleInfoVo> importStudentData(List<Map<Integer, Object>> excelDataList) throws ParseException {
         List<String> idNumbers = new ArrayList<>();
         for (Map<Integer, Object> integerObjectMap : excelDataList) {
             idNumbers.add(integerObjectMap.get(0).toString());
         }
+
+        List<BaseStudentSompleInfoVo> infos = userMapper.getInfosByParam(new BaseStudentSimpleInfoDto() {{
+            setIdNumberList(idNumbers);
+        }});
+        if(!infos.isEmpty()){
+           return infos;
+        }
+
         //查询所有学生的用户信息,组装起来备用
         List<BaseStudentUser> studentUsers = this.selectJoinList(BaseStudentUser.class,
                 new MPJLambdaWrapper<BaseStudentUser>()
@@ -998,7 +1016,7 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
         if (!insertContactList.isEmpty()) {
             studentContactService.saveBatch(insertContactList);
         }
-        return true;
+        return new ArrayList<>();
     }
 
     @Override
@@ -1008,7 +1026,7 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
 
     @Override
     public Boolean uploadImage(Long userId, MultipartFile file) throws IOException {
-        BaseStudentUser studentUser = studentbaseManagerBaseStudentUserMapper.selectById(userId);
+        BaseStudentUser studentUser = baseStudentUserMapper.selectById(userId);
         String[] imgSuffix = new String[]{"png", "jpg", "jpeg"};
         String suffix = StringUtils.substringAfterLast(file.getOriginalFilename(), StringPool.DOT);
         if (!Arrays.asList(imgSuffix).contains(suffix)) {
@@ -1024,7 +1042,7 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
             }
         };
         studentUser.setAvatar(map.get(suffix) + base64String);
-        studentbaseManagerBaseStudentUserMapper.updateById(studentUser);
+        baseStudentUserMapper.updateById(studentUser);
         return true;
     }
 

+ 3 - 0
src/main/java/com/xjrsoft/module/student/vo/BaseStudentSompleInfoVo.java

@@ -72,6 +72,9 @@ public class BaseStudentSompleInfoVo {
     @ApiModelProperty("学籍状态")
     private String archivesStatus;
 
+    @ApiModelProperty("学籍状态-中文")
+    private String archivesStatusCn;
+
     @ApiModelProperty("年级id")
     private Long gradeId;
 

+ 18 - 6
src/main/resources/mapper/banding/BandingTaskClassMapper.xml

@@ -54,20 +54,32 @@
         SELECT t1.id, t1.major_set_id,t2.name AS major_set_name, t1.name,t1.sort_code,
         (SELECT COUNT(*) FROM base_new_student a1
         INNER JOIN banding_task_class_student a2 ON a1.id = a2.new_student_id
-        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id and a1.is_can_banding = 1) AS number,
+        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id AND a1.is_can_banding = 1) AS NUMBER,
         (SELECT COUNT(*) FROM base_new_student a1
         INNER JOIN banding_task_class_student a2 ON a1.id = a2.new_student_id
-        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id and a1.is_can_banding = 1 AND a1.gender = 'SB10001') AS male_count,
+        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id AND a1.is_can_banding = 1 AND a1.gender = 'SB10001') AS male_count,
         (SELECT COUNT(*) FROM base_new_student a1
         INNER JOIN banding_task_class_student a2 ON a1.id = a2.new_student_id
-        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id and a1.is_can_banding = 1 AND a1.gender = 'SB10002') AS female_count,
+        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id AND a1.is_can_banding = 1 AND a1.gender = 'SB10002') AS female_count,
         (SELECT COUNT(*) FROM base_new_student a1
         INNER JOIN banding_task_class_student a2 ON a1.id = a2.new_student_id
-        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id and a1.is_can_banding = 1 AND a1.stduy_status = 'FB3001') AS not_stay_count,
+        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id AND a1.is_can_banding = 1 AND a1.stduy_status = 'FB3001') AS not_stay_count,
         (SELECT COUNT(*) FROM base_new_student a1
         INNER JOIN banding_task_class_student a2 ON a1.id = a2.new_student_id
-        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id and a1.is_can_banding = 1 AND a1.stduy_status = 'FB3002') AS stay_count,
-        t3.name AS teacher_name,t4.name as classroom_name, t1.is_order_class FROM banding_task_class t1
+        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id AND a1.is_can_banding = 1 AND a1.stduy_status = 'FB3002') AS stay_count,
+        (SELECT COUNT(*) FROM base_new_student a1
+        INNER JOIN banding_task_class_student a2 ON a1.id = a2.new_student_id
+        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id AND a1.is_can_banding = 1 AND a1.stduy_status = 'FB3001' AND a1.gender = 'SB10001') AS male_not_stay_count,
+        (SELECT COUNT(*) FROM base_new_student a1
+        INNER JOIN banding_task_class_student a2 ON a1.id = a2.new_student_id
+        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id AND a1.is_can_banding = 1 AND a1.stduy_status = 'FB3002' AND a1.gender = 'SB10001') AS male_stay_count,
+        (SELECT COUNT(*) FROM base_new_student a1
+        INNER JOIN banding_task_class_student a2 ON a1.id = a2.new_student_id
+        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id AND a1.is_can_banding = 1 AND a1.stduy_status = 'FB3001' AND a1.gender = 'SB10002') AS female_not_stay_count,
+        (SELECT COUNT(*) FROM base_new_student a1
+        INNER JOIN banding_task_class_student a2 ON a1.id = a2.new_student_id
+        WHERE a1.delete_mark = 0 AND a2.delete_mark = 0 AND a2.banding_task_class_id = t1.id AND a1.is_can_banding = 1 AND a1.stduy_status = 'FB3002' AND a1.gender = 'SB10002') AS female_stay_count,
+        t3.name AS teacher_name,t4.name AS classroom_name, t1.is_order_class FROM banding_task_class t1
         LEFT JOIN base_major_set t2 ON t1.major_set_id = t2.id
         LEFT JOIN xjr_user t3 ON t1.teacher_id = t3.id
         LEFT JOIN base_classroom t4 ON t1.classroom_id = t4.id

+ 12 - 1
src/main/resources/mapper/organization/UserMapper.xml

@@ -29,7 +29,7 @@
         (SELECT name FROM base_student_family_member WHERE delete_mark = 0 AND user_id = t1.id ORDER BY create_date ASC LIMIT 0,1) as parent_name,
         (SELECT mobile FROM base_student_family_member WHERE delete_mark = 0 AND user_id = t1.id ORDER BY create_date ASC LIMIT 0,1) as parent_mobile,
         t1.gender,t4.id as class_id, t4.teacher_id,t6.name as teacher_name,t6.user_name as teacher_user_name,t6.mobile as teacher_mobile,t5.name as classroom_name,
-        t3.archives_status,t7.id as grade_id,t7.name as grade_name
+        t3.archives_status,t7.id as grade_id,t7.name as grade_name,t8.name as archives_status_cn
         FROM xjr_user t1
         INNER JOIN base_student t2 ON t1.id = t2.user_id
         INNER JOIN base_student_school_roll t3 ON t1.id = t3.user_id
@@ -37,6 +37,7 @@
         left join base_classroom t5 on t4.classroom_id = t5.id
         left join xjr_user t6 on t4.teacher_id = t6.id
         left join base_grade t7 on t4.grade_id = t7.id
+        left join xjr_dictionary_detail t8 on t3.archives_status = t8.code
         WHERE t1.delete_mark = 0
         <if test="dto.keyword != null and dto.keyword != ''">
             AND (t1.name like concat('%', #{dto.keyword}, '%') OR t1.credential_number like concat('%', #{dto.keyword}, '%'))
@@ -44,12 +45,22 @@
         <if test="dto.name != null and dto.name != '' and dto.idNumber != null and dto.idNumber != ''">
             AND t1.name = #{dto.name} and t1.credential_number = #{dto.idNumber}
         </if>
+        <if test="dto.idNumber != null and dto.idNumber != ''">
+            and t1.credential_number = #{dto.idNumber}
+        </if>
         <if test="dto.userId != null">
             AND t1.id = #{dto.userId}
         </if>
         <if test="dto.archivesStatus != null and dto.archivesStatus != ''">
             AND t3.archives_status = #{dto.archivesStatus}
         </if>
+        <if test="dto.idNumberList != null">
+            and t1.credential_number in
+            <foreach item="idNumber" index="index" collection="dto.idNumberList" open="(" close=")"
+                     separator=",">
+                #{idNumber}
+            </foreach>
+        </if>
     </select>
     <select id="personPage" parameterType="com.xjrsoft.module.organization.dto.PersonPageDto" resultType="com.xjrsoft.module.organization.vo.PersonPageVo">
         SELECT t1.id,t1.name,t1.user_name,t1.mobile,t3.name AS gender_cn,t2.employ_type,t2.employ_way FROM xjr_user t1