From 17c650c40ba77e112eb40a1278c151e1d61fdcdb Mon Sep 17 00:00:00 2001 From: zhangyue Date: Tue, 7 Apr 2026 17:30:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=9F=B9=E8=AE=AD=E4=BA=BA?= =?UTF-8?q?=E5=91=98=E6=9F=A5=E8=AF=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../edu/web/study/StudentController.java | 7 +++ .../command/query/study/StudentQueryExe.java | 12 ++++ .../edu/service/study/StudentServiceImpl.java | 11 ++-- .../zcloud/edu/api/study/StudentServiceI.java | 8 +-- .../clientobject/study/EducationUserCO.java | 47 ++++++++++++++ .../edu/dto/study/EducationUserQry.java | 48 ++++++++++++++ web-infrastructure/pom.xml | 4 ++ .../mapper/study/StudentMapper.java | 5 ++ .../impl/study/StudentRepositoryImpl.java | 13 ++++ .../repository/study/StudentRepository.java | 3 + .../resources/mapper/study/StudentMapper.xml | 63 +++++++++++++++++++ 11 files changed, 213 insertions(+), 8 deletions(-) create mode 100644 web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/EducationUserCO.java create mode 100644 web-client/src/main/java/com/zcloud/edu/dto/study/EducationUserQry.java diff --git a/web-adapter/src/main/java/com/zcloud/edu/web/study/StudentController.java b/web-adapter/src/main/java/com/zcloud/edu/web/study/StudentController.java index fde89c9..9046380 100644 --- a/web-adapter/src/main/java/com/zcloud/edu/web/study/StudentController.java +++ b/web-adapter/src/main/java/com/zcloud/edu/web/study/StudentController.java @@ -8,6 +8,7 @@ import com.alibaba.cola.dto.SingleResponse; import com.jjb.saas.framework.auth.model.SSOUser; import com.jjb.saas.framework.auth.utils.AuthContext; import com.zcloud.edu.api.study.StudentServiceI; +import com.zcloud.edu.dto.clientobject.study.EducationUserCO; import com.zcloud.edu.dto.clientobject.study.StudentCO; import com.zcloud.edu.dto.study.*; import io.swagger.annotations.Api; @@ -46,6 +47,12 @@ public class StudentController { return studentService.listPage(qry); } + @ApiOperation("获取培训人员") + @PostMapping("/educationUserList") + public PageResponse educationUserList(@RequestBody EducationUserQry qry) { + return studentService.educationUserList(qry); + } + @ApiOperation("一人一档分页") diff --git a/web-app/src/main/java/com/zcloud/edu/command/query/study/StudentQueryExe.java b/web-app/src/main/java/com/zcloud/edu/command/query/study/StudentQueryExe.java index 4b4b983..1f289a9 100644 --- a/web-app/src/main/java/com/zcloud/edu/command/query/study/StudentQueryExe.java +++ b/web-app/src/main/java/com/zcloud/edu/command/query/study/StudentQueryExe.java @@ -9,15 +9,18 @@ import com.zcloud.edu.domain.model.archives.ClassArchivesE; import com.zcloud.edu.domain.model.archives.PersonArchivesE; import com.zcloud.edu.domain.model.study.*; import com.zcloud.edu.dto.archives.ClassArchivesQry; +import com.zcloud.edu.dto.clientobject.study.EducationUserCO; import com.zcloud.edu.dto.clientobject.study.StudentCO; import com.zcloud.edu.dto.clientobject.study.StudentSignCO; import com.zcloud.edu.dto.data.archives.ClassArchivesDTO; import com.zcloud.edu.dto.data.archives.PersonArchivesDTO; +import com.zcloud.edu.dto.study.EducationUserQry; import com.zcloud.edu.dto.study.StudentCountQry; import com.zcloud.edu.dto.study.StudentPageQry; import com.zcloud.edu.persistence.dataobject.study.*; import com.zcloud.edu.persistence.repository.study.*; import com.zcloud.gbscommon.utils.PageQueryHelper; +import com.zcloud.gbscommon.utils.Tools; import lombok.AllArgsConstructor; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; @@ -244,5 +247,14 @@ public class StudentQueryExe { StudentCO studentCO = BeanUtil.copyProperties(studentDO, StudentCO.class); return SingleResponse.of(studentCO); } + + public PageResponse educationUserList(EducationUserQry qry) { + Map params = PageQueryHelper.toHashMap(qry); + if (!Tools.isEmpty(params.get("likePhone"))) { + params.put("phoneArr",String.valueOf(params.get("likePhone")).split(",")); + } + PageResponse pageResponse = studentRepository.educationUserList(params); + return pageResponse; + } } diff --git a/web-app/src/main/java/com/zcloud/edu/service/study/StudentServiceImpl.java b/web-app/src/main/java/com/zcloud/edu/service/study/StudentServiceImpl.java index ea433ac..68a3a4d 100644 --- a/web-app/src/main/java/com/zcloud/edu/service/study/StudentServiceImpl.java +++ b/web-app/src/main/java/com/zcloud/edu/service/study/StudentServiceImpl.java @@ -9,13 +9,11 @@ import com.zcloud.edu.command.study.StudentAddExe; import com.zcloud.edu.command.study.StudentRemoveExe; import com.zcloud.edu.command.study.StudentUpdateExe; import com.zcloud.edu.dto.archives.ClassArchivesQry; +import com.zcloud.edu.dto.clientobject.study.EducationUserCO; import com.zcloud.edu.dto.clientobject.study.StudentCO; import com.zcloud.edu.dto.data.archives.ClassArchivesDTO; import com.zcloud.edu.dto.data.archives.PersonArchivesDTO; -import com.zcloud.edu.dto.study.StudentAddCmd; -import com.zcloud.edu.dto.study.StudentCountQry; -import com.zcloud.edu.dto.study.StudentPageQry; -import com.zcloud.edu.dto.study.StudentUpdateCmd; +import com.zcloud.edu.dto.study.*; import lombok.AllArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.web.multipart.MultipartFile; @@ -118,5 +116,10 @@ public class StudentServiceImpl implements StudentServiceI { public SingleResponse getInfoByStudentId(String studentId) { return studentQueryExe.executeGetInfoByStudentId(studentId); } + + @Override + public PageResponse educationUserList(EducationUserQry qry) { + return studentQueryExe.educationUserList(qry); + } } diff --git a/web-client/src/main/java/com/zcloud/edu/api/study/StudentServiceI.java b/web-client/src/main/java/com/zcloud/edu/api/study/StudentServiceI.java index 3068666..acf1f8f 100644 --- a/web-client/src/main/java/com/zcloud/edu/api/study/StudentServiceI.java +++ b/web-client/src/main/java/com/zcloud/edu/api/study/StudentServiceI.java @@ -4,13 +4,11 @@ import com.alibaba.cola.dto.MultiResponse; import com.alibaba.cola.dto.PageResponse; import com.alibaba.cola.dto.SingleResponse; import com.zcloud.edu.dto.archives.ClassArchivesQry; +import com.zcloud.edu.dto.clientobject.study.EducationUserCO; import com.zcloud.edu.dto.clientobject.study.StudentCO; import com.zcloud.edu.dto.data.archives.ClassArchivesDTO; import com.zcloud.edu.dto.data.archives.PersonArchivesDTO; -import com.zcloud.edu.dto.study.StudentAddCmd; -import com.zcloud.edu.dto.study.StudentCountQry; -import com.zcloud.edu.dto.study.StudentPageQry; -import com.zcloud.edu.dto.study.StudentUpdateCmd; +import com.zcloud.edu.dto.study.*; import org.springframework.web.multipart.MultipartFile; import java.util.List; @@ -52,5 +50,7 @@ public interface StudentServiceI { MultiResponse listStudentCount(StudentCountQry qry); SingleResponse getInfoByStudentId(String studentId); + + PageResponse educationUserList(EducationUserQry qry); } diff --git a/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/EducationUserCO.java b/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/EducationUserCO.java new file mode 100644 index 0000000..c48ac9f --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/dto/clientobject/study/EducationUserCO.java @@ -0,0 +1,47 @@ +package com.zcloud.edu.dto.clientobject.study; + +import com.alibaba.cola.dto.ClientObject; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.time.LocalDateTime; + + +/** +* web-client +* @Author zhy +* @Date 2025-11-25 15:46:08 +*/ +@Data +public class EducationUserCO extends ClientObject { + @ApiModelProperty(value = "所属相关方id") + private String corpinfoId; + @ApiModelProperty(value = "所属相关方名称") + private String corpinfoName; + @ApiModelProperty(value = "所属项目id") + private String projectId; + @ApiModelProperty(value = "所属项目名称") + private String projectName; + @ApiModelProperty(value = "用户岗位名称") + private String postName; + @ApiModelProperty(value = "用户部门名称") + private String deptName; + @ApiModelProperty(value = "用户名称") + private String name; + @ApiModelProperty(value = "手机号") + private String phone; + @ApiModelProperty(value = "身份证") + private String userIdCard; + @ApiModelProperty(value = "申请状态") + private Integer applyStatus; + @ApiModelProperty(value = "开始时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private LocalDateTime startTime; + @ApiModelProperty(value = "结束时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private LocalDateTime endTime; + @ApiModelProperty(value = "审核状态") + private String examineStatus; +} + diff --git a/web-client/src/main/java/com/zcloud/edu/dto/study/EducationUserQry.java b/web-client/src/main/java/com/zcloud/edu/dto/study/EducationUserQry.java new file mode 100644 index 0000000..bbfd589 --- /dev/null +++ b/web-client/src/main/java/com/zcloud/edu/dto/study/EducationUserQry.java @@ -0,0 +1,48 @@ +package com.zcloud.edu.dto.study; + +import com.alibaba.cola.dto.PageQuery; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + + +/** + * web-client + * + * @Author zhy + * @Date 2025-11-25 15:46:08 + */ +@Data +public class EducationUserQry extends PageQuery { + + /** + * 查询条件操作前缀,支持以下几种数据库查询操作: + * - `like`: 模糊匹配查询,对应SQL的LIKE操作符 + * - `eq`: 等值查询,对应SQL的=操作符 + * - `gt`: 大于比较查询 + * - `lt`: 小于比较查询 + * - `ge`: 大于等于比较查询 + * - `le`: 小于等于比较查询 + * - `ne`: 不等比较查询,对应SQL的!=操作符 + */ + @ApiModelProperty(value = "项目所属相关方") + private String eqProjectXgfCorpInfoId; + @ApiModelProperty(value = "项目申请相关方") + private String eqApplicationProjectCorpInfoId; + @ApiModelProperty(value = "申请状态") + private String eqApplyStatus; + @ApiModelProperty(value = "是否在有效期") + private Integer isValid; + @ApiModelProperty(value = "用户所属相关方") + private String eqUserCorpInfoId; + @ApiModelProperty(value = "项目所属相关方") + private String eqProjectCorpInfoId; + @ApiModelProperty(value = "用户名称") + private String likeName; + @ApiModelProperty(value = "用户手机号") + private String likePhone; + @ApiModelProperty(value = "项目名称") + private String likeProjectName; + private Integer endTimeStatus; + private String menuPath; +} + diff --git a/web-infrastructure/pom.xml b/web-infrastructure/pom.xml index 8fcd41e..e25633d 100644 --- a/web-infrastructure/pom.xml +++ b/web-infrastructure/pom.xml @@ -39,5 +39,9 @@ com.jjb.saas jjb-saas-framework-facade + + com.zcloud.edu + web-client + diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/StudentMapper.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/StudentMapper.java index 24c6662..cb2513c 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/StudentMapper.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/mapper/study/StudentMapper.java @@ -3,8 +3,10 @@ package com.zcloud.edu.persistence.mapper.study; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.jjb.saas.framework.datascope.annotation.DataScope; import com.jjb.saas.framework.datascope.annotation.DataScopes; +import com.zcloud.edu.dto.clientobject.study.EducationUserCO; import com.zcloud.edu.persistence.dataobject.study.ClassDO; import com.zcloud.edu.persistence.dataobject.study.StudentDO; import com.zcloud.edu.persistence.mapper.po.study.StudentCountPO; @@ -48,5 +50,8 @@ public interface StudentMapper extends BaseMapper { List listStudentCount(@Param("params") Map params); StudentDO findInfoByStudentId(@Param("studentId") String studentId); + + + IPage educationUserList(Page> page, Map params, String menuPerms); } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/StudentRepositoryImpl.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/StudentRepositoryImpl.java index d2146e1..2893630 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/StudentRepositoryImpl.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/impl/study/StudentRepositoryImpl.java @@ -4,9 +4,11 @@ import com.alibaba.cola.dto.PageResponse; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.jjb.saas.framework.repository.common.PageHelper; import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl; import com.zcloud.edu.domain.enums.MenuEnum; +import com.zcloud.edu.dto.clientobject.study.EducationUserCO; import com.zcloud.edu.persistence.dataobject.study.ClassDO; import com.zcloud.edu.persistence.dataobject.study.StudentDO; import com.zcloud.edu.persistence.mapper.po.study.StudentCountPO; @@ -136,5 +138,16 @@ public class StudentRepositoryImpl extends BaseRepositoryImpl educationUserList(Map params) { + Page> page = new Page<>(Integer.parseInt(params.get("pageIndex").toString()), Integer.parseInt(params.get("pageSize").toString())); + String menuPerms = ""; + if (!org.springframework.util.ObjectUtils.isEmpty(params.get("menuPath"))) { + menuPerms = MenuEnum.getMenuKeyByPath(params.get("menuPath").toString()); + } + IPage iPage = studentMapper.educationUserList(page, params,menuPerms); + return PageHelper.pageToResponse(iPage, iPage.getRecords()); + } + } diff --git a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/StudentRepository.java b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/StudentRepository.java index 3c1189a..af7665a 100644 --- a/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/StudentRepository.java +++ b/web-infrastructure/src/main/java/com/zcloud/edu/persistence/repository/study/StudentRepository.java @@ -2,6 +2,7 @@ package com.zcloud.edu.persistence.repository.study; import com.alibaba.cola.dto.PageResponse; import com.jjb.saas.framework.repository.repo.BaseRepository; +import com.zcloud.edu.dto.clientobject.study.EducationUserCO; import com.zcloud.edu.persistence.dataobject.study.ClassDO; import com.zcloud.edu.persistence.dataobject.study.StudentDO; import com.zcloud.edu.persistence.mapper.po.study.StudentCountPO; @@ -46,5 +47,7 @@ public interface StudentRepository extends BaseRepository { List countStudentByCorpId(Map params); List listStudentCount(Map params); + + PageResponse educationUserList(Map params); } diff --git a/web-infrastructure/src/main/resources/mapper/study/StudentMapper.xml b/web-infrastructure/src/main/resources/mapper/study/StudentMapper.xml index 00247a8..5cb88b0 100644 --- a/web-infrastructure/src/main/resources/mapper/study/StudentMapper.xml +++ b/web-infrastructure/src/main/resources/mapper/study/StudentMapper.xml @@ -420,5 +420,68 @@ group by s.student_id + +