添加考试记录详情查询功能

增加档案下载功能
dev
zhangyue 2026-02-02 10:50:02 +08:00
parent 166efd6025
commit d827f191e6
32 changed files with 1008 additions and 27 deletions

View File

@ -47,5 +47,11 @@ public class AppStudentExamRecordController {
public PageResponse<StudentExamRecordCO> page(@RequestBody StudentExamRecordPageQry qry) { public PageResponse<StudentExamRecordCO> page(@RequestBody StudentExamRecordPageQry qry) {
return studentExamRecordService.listPage(qry); return studentExamRecordService.listPage(qry);
} }
@ApiOperation("详情")
@GetMapping("/{id}")
public SingleResponse<StudentExamRecordCO> getInfoById(@PathVariable("id") Long id) {
return studentExamRecordService.getInfoById(id);
}
} }

View File

@ -0,0 +1,82 @@
package com.zcloud.edu.web.archives;
import com.alibaba.cola.dto.MultiResponse;
import com.alibaba.cola.dto.PageResponse;
import com.alibaba.cola.dto.Response;
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.archives.ArchivesPdfFileServiceI;
import com.zcloud.edu.dto.archives.ArchivesPdfFileAddCmd;
import com.zcloud.edu.dto.archives.ArchivesPdfFilePageQry;
import com.zcloud.edu.dto.archives.ArchivesPdfFileUpdateCmd;
import com.zcloud.edu.dto.clientobject.archives.ArchivesPdfFileCO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
/**
* web-adapter
*
* @Author zhangyue
* @Date 2026-02-02 10:32:41
*/
@Api(tags = "")
@RequestMapping("/${application.gateway}/archivesPdfFile")
@RestController
@AllArgsConstructor
public class ArchivesPdfFileController {
private final ArchivesPdfFileServiceI archivesPdfFileService;
@ApiOperation("新增")
@PostMapping("/save")
public SingleResponse<ArchivesPdfFileCO> add(@Validated @RequestBody ArchivesPdfFileAddCmd cmd) {
SSOUser ssoUser = AuthContext.getCurrentUser();
return archivesPdfFileService.add(cmd);
}
@ApiOperation("分页")
@PostMapping("/list")
public PageResponse<ArchivesPdfFileCO> page(@RequestBody ArchivesPdfFilePageQry qry) {
return archivesPdfFileService.listPage(qry);
}
@ApiOperation("所有数据")
@GetMapping("/listAll")
public MultiResponse<ArchivesPdfFileCO> listAll() {
return MultiResponse.of(new ArrayList<ArchivesPdfFileCO>());
}
@ApiOperation("详情")
@GetMapping("/{id}")
public SingleResponse<ArchivesPdfFileCO> getInfoById(@PathVariable("id") Long id) {
return SingleResponse.of(new ArchivesPdfFileCO());
}
@ApiOperation("删除")
@DeleteMapping("/{id}")
public Response remove(@PathVariable("id") Long id) {
archivesPdfFileService.remove(id);
return SingleResponse.buildSuccess();
}
@ApiOperation("删除多个")
@DeleteMapping("/ids")
public Response removeBatch(@RequestParam Long[] ids) {
archivesPdfFileService.removeBatch(ids);
return SingleResponse.buildSuccess();
}
@ApiOperation("修改")
@PutMapping("/edit")
public SingleResponse edit(@Validated @RequestBody ArchivesPdfFileUpdateCmd archivesPdfFileUpdateCmd) {
archivesPdfFileService.edit(archivesPdfFileUpdateCmd);
return SingleResponse.buildSuccess();
}
}

View File

@ -0,0 +1,40 @@
package com.zcloud.edu.command.archives;
import com.alibaba.cola.exception.BizException;
import com.zcloud.edu.domain.gateway.archives.ArchivesPdfFileGateway;
import com.zcloud.edu.domain.model.archives.ArchivesPdfFileE;
import com.zcloud.edu.dto.archives.ArchivesPdfFileAddCmd;
import lombok.AllArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
/**
* web-app
*
* @Author zhangyue
* @Date 2026-02-02 10:32:41
*/
@Component
@AllArgsConstructor
public class ArchivesPdfFileAddExe {
private final ArchivesPdfFileGateway archivesPdfFileGateway;
@Transactional(rollbackFor = Exception.class)
public boolean execute(ArchivesPdfFileAddCmd cmd) {
ArchivesPdfFileE archivesPdfFileE = new ArchivesPdfFileE();
BeanUtils.copyProperties(cmd, archivesPdfFileE);
boolean res = false;
try {
res = archivesPdfFileGateway.add(archivesPdfFileE);
} catch (Exception e) {
throw new RuntimeException(e);
}
if (!res) {
throw new BizException("保存失败");
}
return true;
}
}

View File

@ -0,0 +1,39 @@
package com.zcloud.edu.command.archives;
import com.alibaba.cola.exception.BizException;
import com.zcloud.edu.domain.gateway.archives.ArchivesPdfFileGateway;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
/**
* web-app
*
* @Author zhangyue
* @Date 2026-02-02 10:32:42
*/
@Component
@AllArgsConstructor
public class ArchivesPdfFileRemoveExe {
private final ArchivesPdfFileGateway archivesPdfFileGateway;
@Transactional(rollbackFor = Exception.class)
public boolean execute(Long id) {
boolean res = archivesPdfFileGateway.deletedArchivesPdfFileById(id);
if (!res) {
throw new BizException("删除失败");
}
return true;
}
@Transactional(rollbackFor = Exception.class)
public boolean execute(Long[] ids) {
boolean res = archivesPdfFileGateway.deletedArchivesPdfFileByIds(ids);
if (!res) {
throw new BizException("删除失败");
}
return true;
}
}

View File

@ -0,0 +1,34 @@
package com.zcloud.edu.command.archives;
import com.alibaba.cola.exception.BizException;
import com.zcloud.edu.domain.gateway.archives.ArchivesPdfFileGateway;
import com.zcloud.edu.domain.model.archives.ArchivesPdfFileE;
import com.zcloud.edu.dto.archives.ArchivesPdfFileUpdateCmd;
import lombok.AllArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
/**
* web-app
*
* @Author zhangyue
* @Date 2026-02-02 10:32:42
*/
@Component
@AllArgsConstructor
public class ArchivesPdfFileUpdateExe {
private final ArchivesPdfFileGateway archivesPdfFileGateway;
@Transactional(rollbackFor = Exception.class)
public void execute(ArchivesPdfFileUpdateCmd archivesPdfFileUpdateCmd) {
ArchivesPdfFileE archivesPdfFileE = new ArchivesPdfFileE();
BeanUtils.copyProperties(archivesPdfFileUpdateCmd, archivesPdfFileE);
boolean res = archivesPdfFileGateway.update(archivesPdfFileE);
if (!res) {
throw new BizException("修改失败");
}
}
}

View File

@ -0,0 +1,24 @@
package com.zcloud.edu.command.convertor.archives;
import com.zcloud.edu.dto.clientobject.archives.ArchivesPdfFileCO;
import com.zcloud.edu.persistence.dataobject.archives.ArchivesPdfFileDO;
import org.mapstruct.Mapper;
import java.util.List;
/**
* web-app
*
* @Author zhangyue
* @Date 2026-02-02 10:32:41
*/
@Mapper(componentModel = "spring")
public interface ArchivesPdfFileCoConvertor {
/**
* @param archivesPdfFileDOs
* @return
*/
List<ArchivesPdfFileCO> converDOsToCOs(List<ArchivesPdfFileDO> archivesPdfFileDOs);
}

View File

@ -0,0 +1,42 @@
package com.zcloud.edu.command.query.archives;
import com.alibaba.cola.dto.PageResponse;
import com.zcloud.edu.command.convertor.archives.ArchivesPdfFileCoConvertor;
import com.zcloud.edu.dto.archives.ArchivesPdfFilePageQry;
import com.zcloud.edu.dto.clientobject.archives.ArchivesPdfFileCO;
import com.zcloud.edu.persistence.dataobject.archives.ArchivesPdfFileDO;
import com.zcloud.edu.persistence.repository.archives.ArchivesPdfFileRepository;
import com.zcloud.gbscommon.utils.PageQueryHelper;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Map;
/**
* web-app
*
* @Author zhangyue
* @Date 2026-02-02 10:32:42
*/
@Component
@AllArgsConstructor
public class ArchivesPdfFileQueryExe {
private final ArchivesPdfFileRepository archivesPdfFileRepository;
private final ArchivesPdfFileCoConvertor archivesPdfFileCoConvertor;
/**
*
*
* @param archivesPdfFilePageQry
* @return
*/
public PageResponse<ArchivesPdfFileCO> execute(ArchivesPdfFilePageQry archivesPdfFilePageQry) {
Map<String, Object> params = PageQueryHelper.toHashMap(archivesPdfFilePageQry);
PageResponse<ArchivesPdfFileDO> pageResponse = archivesPdfFileRepository.listPage(params);
List<ArchivesPdfFileCO> examCenterCOS = archivesPdfFileCoConvertor.converDOsToCOs(pageResponse.getData());
return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());
}
}

View File

@ -55,5 +55,15 @@ public class StudentExamRecordQueryExe {
studentExamRecordCO.setExamRecordItemList(recordCoList); studentExamRecordCO.setExamRecordItemList(recordCoList);
return SingleResponse.of(studentExamRecordCO); return SingleResponse.of(studentExamRecordCO);
} }
public SingleResponse<StudentExamRecordCO> executeGetInfoById(Long id){
StudentExamRecordDO studentExamRecordDO = studentExamRecordRepository.getInfoById(id);
StudentExamRecordCO studentExamRecordCO = new StudentExamRecordCO();
BeanUtils.copyProperties(studentExamRecordDO, studentExamRecordCO);
List<StudentExamRecordItemDO> recordList = studentExamRecordItemRepository.listByExamRecordId(studentExamRecordDO.getStudentExamRecordId());
List<StudentExamRecordItemCO> recordCoList = studentExamRecordItemCoConvertor.converDOsToCOs(recordList);
studentExamRecordCO.setExamRecordItemList(recordCoList);
return SingleResponse.of(studentExamRecordCO);
}
} }

View File

@ -0,0 +1,59 @@
package com.zcloud.edu.service.archives;
import com.alibaba.cola.dto.PageResponse;
import com.alibaba.cola.dto.SingleResponse;
import com.zcloud.edu.api.archives.ArchivesPdfFileServiceI;
import com.zcloud.edu.command.archives.ArchivesPdfFileAddExe;
import com.zcloud.edu.command.archives.ArchivesPdfFileRemoveExe;
import com.zcloud.edu.command.archives.ArchivesPdfFileUpdateExe;
import com.zcloud.edu.command.query.archives.ArchivesPdfFileQueryExe;
import com.zcloud.edu.dto.archives.ArchivesPdfFileAddCmd;
import com.zcloud.edu.dto.archives.ArchivesPdfFilePageQry;
import com.zcloud.edu.dto.archives.ArchivesPdfFileUpdateCmd;
import com.zcloud.edu.dto.clientobject.archives.ArchivesPdfFileCO;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
/**
* web-app
*
* @Author zhangyue
* @Date 2026-02-02 10:32:42
*/
@Service
@AllArgsConstructor
public class ArchivesPdfFileServiceImpl implements ArchivesPdfFileServiceI {
private final ArchivesPdfFileAddExe archivesPdfFileAddExe;
private final ArchivesPdfFileUpdateExe archivesPdfFileUpdateExe;
private final ArchivesPdfFileRemoveExe archivesPdfFileRemoveExe;
private final ArchivesPdfFileQueryExe archivesPdfFileQueryExe;
@Override
public PageResponse<ArchivesPdfFileCO> listPage(ArchivesPdfFilePageQry qry) {
return archivesPdfFileQueryExe.execute(qry);
}
@Override
public SingleResponse add(ArchivesPdfFileAddCmd cmd) {
archivesPdfFileAddExe.execute(cmd);
return SingleResponse.buildSuccess();
}
@Override
public void edit(ArchivesPdfFileUpdateCmd archivesPdfFileUpdateCmd) {
archivesPdfFileUpdateExe.execute(archivesPdfFileUpdateCmd);
}
@Override
public void remove(Long id) {
archivesPdfFileRemoveExe.execute(id);
}
@Override
public void removeBatch(Long[] ids) {
archivesPdfFileRemoveExe.execute(ids);
}
}

View File

@ -61,5 +61,10 @@ public class StudentExamRecordServiceImpl implements StudentExamRecordServiceI {
public SingleResponse<StudentExamRecordCO> getInfoByStudentId(String studentId) { public SingleResponse<StudentExamRecordCO> getInfoByStudentId(String studentId) {
return studentExamRecordQueryExe.executeGetInfoByStudentId(studentId); return studentExamRecordQueryExe.executeGetInfoByStudentId(studentId);
} }
@Override
public SingleResponse<StudentExamRecordCO> getInfoById(Long id) {
return studentExamRecordQueryExe.executeGetInfoById(id);
}
} }

View File

@ -0,0 +1,27 @@
package com.zcloud.edu.api.archives;
import com.alibaba.cola.dto.PageResponse;
import com.alibaba.cola.dto.SingleResponse;
import com.zcloud.edu.dto.archives.ArchivesPdfFileAddCmd;
import com.zcloud.edu.dto.archives.ArchivesPdfFilePageQry;
import com.zcloud.edu.dto.archives.ArchivesPdfFileUpdateCmd;
import com.zcloud.edu.dto.clientobject.archives.ArchivesPdfFileCO;
/**
* web-client
*
* @Author zhangyue
* @Date 2026-02-02 10:32:42
*/
public interface ArchivesPdfFileServiceI {
PageResponse<ArchivesPdfFileCO> listPage(ArchivesPdfFilePageQry qry);
SingleResponse<ArchivesPdfFileCO> add(ArchivesPdfFileAddCmd cmd);
void edit(ArchivesPdfFileUpdateCmd cmd);
void remove(Long id);
void removeBatch(Long[] ids);
}

View File

@ -25,5 +25,7 @@ public interface StudentExamRecordServiceI {
void removeBatch(Long[] ids); void removeBatch(Long[] ids);
SingleResponse<StudentExamRecordCO> getInfoByStudentId(String studentId); SingleResponse<StudentExamRecordCO> getInfoByStudentId(String studentId);
SingleResponse<StudentExamRecordCO> getInfoById(Long id);
} }

View File

@ -0,0 +1,61 @@
package com.zcloud.edu.dto.archives;
import com.alibaba.cola.dto.Command;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
/**
* web-client
*
* @Author zhangyue
* @Date 2026-02-02 10:32:41
*/
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ArchivesPdfFileAddCmd extends Command {
@ApiModelProperty(value = "业务id", name = "archivesPdfFileId", required = true)
@NotEmpty(message = "业务id不能为空")
private String archivesPdfFileId;
@ApiModelProperty(value = "关联表名称", name = "tableName", required = true)
@NotEmpty(message = "关联表名称不能为空")
private String tableName;
@ApiModelProperty(value = "关联表id", name = "tableId", required = true)
@NotEmpty(message = "关联表id不能为空")
private String tableId;
@ApiModelProperty(value = "文件路径", name = "filePath", required = true)
@NotEmpty(message = "文件路径不能为空")
private String filePath;
@ApiModelProperty(value = "档案类型 1 一人一档 2一期一档", name = "type", required = true)
@NotNull(message = "档案类型 1 一人一档 2一期一档不能为空")
private Integer type;
@ApiModelProperty(value = "上传状态 0-上传中 1-上传成功 -1 - 上传失败 -2 已删除", name = "status", required = true)
@NotNull(message = "上传状态 0-上传中 1-上传成功 -1 - 上传失败 -2 已删除不能为空")
private Integer status;
@ApiModelProperty(value = "上传失败错误原因(上传成功则不传)", name = "errormsg", required = true)
@NotEmpty(message = "上传失败错误原因(上传成功则不传)不能为空")
private String errormsg;
@ApiModelProperty(value = "方法名称", name = "methodName", required = true)
@NotEmpty(message = "方法名称不能为空")
private String methodName;
@ApiModelProperty(value = "参数", name = "param", required = true)
@NotEmpty(message = "参数不能为空")
private String param;
}

View File

@ -0,0 +1,28 @@
package com.zcloud.edu.dto.archives;
import com.alibaba.cola.dto.PageQuery;
import lombok.Data;
/**
* web-client
*
* @Author zhangyue
* @Date 2026-02-02 10:32:42
*/
@Data
public class ArchivesPdfFilePageQry extends PageQuery {
/**
* ,
* - `like`: SQLLIKE
* - `eq`: SQL=
* - `gt`:
* - `lt`:
* - `ge`:
* - `le`:
* - `ne`: SQL!=
*/
private String likeArchivesPdfFileId;
}

View File

@ -0,0 +1,55 @@
package com.zcloud.edu.dto.archives;
import com.alibaba.cola.dto.Command;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
/**
* web-client
*
* @Author zhangyue
* @Date 2026-02-02 10:32:42
*/
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ArchivesPdfFileUpdateCmd extends Command {
@ApiModelProperty(value = "主键id", name = "id", required = true)
@NotNull(message = "主键id不能为空")
private Long id;
@ApiModelProperty(value = "业务id", name = "archivesPdfFileId", required = true)
@NotEmpty(message = "业务id不能为空")
private String archivesPdfFileId;
@ApiModelProperty(value = "关联表名称", name = "tableName", required = true)
@NotEmpty(message = "关联表名称不能为空")
private String tableName;
@ApiModelProperty(value = "关联表id", name = "tableId", required = true)
@NotEmpty(message = "关联表id不能为空")
private String tableId;
@ApiModelProperty(value = "文件路径", name = "filePath", required = true)
@NotEmpty(message = "文件路径不能为空")
private String filePath;
@ApiModelProperty(value = "档案类型 1 一人一档 2一期一档", name = "type", required = true)
@NotNull(message = "档案类型 1 一人一档 2一期一档不能为空")
private Integer type;
@ApiModelProperty(value = "上传状态 0-上传中 1-上传成功 -1 - 上传失败 -2 已删除", name = "status", required = true)
@NotNull(message = "上传状态 0-上传中 1-上传成功 -1 - 上传失败 -2 已删除不能为空")
private Integer status;
@ApiModelProperty(value = "上传失败错误原因(上传成功则不传)", name = "errormsg", required = true)
@NotEmpty(message = "上传失败错误原因(上传成功则不传)不能为空")
private String errormsg;
@ApiModelProperty(value = "方法名称", name = "methodName", required = true)
@NotEmpty(message = "方法名称不能为空")
private String methodName;
@ApiModelProperty(value = "参数", name = "param", required = true)
@NotEmpty(message = "参数不能为空")
private String param;
}

View File

@ -0,0 +1,88 @@
package com.zcloud.edu.dto.clientobject.archives;
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 zhangyue
* @Date 2026-02-02 10:32:41
*/
@Data
public class ArchivesPdfFileCO extends ClientObject {
//主键id
@ApiModelProperty(value = "主键id")
private Long id;
//业务id
@ApiModelProperty(value = "业务id")
private String archivesPdfFileId;
//关联表名称
@ApiModelProperty(value = "关联表名称")
private String tableName;
//关联表id
@ApiModelProperty(value = "关联表id")
private String tableId;
//文件路径
@ApiModelProperty(value = "文件路径")
private String filePath;
//档案类型 1 一人一档 2一期一档
@ApiModelProperty(value = "档案类型 1 一人一档 2一期一档")
private Integer type;
//上传状态 0-上传中 1-上传成功 -1 - 上传失败 -2 已删除
@ApiModelProperty(value = "上传状态 0-上传中 1-上传成功 -1 - 上传失败 -2 已删除")
private Integer status;
//上传失败错误原因(上传成功则不传)
@ApiModelProperty(value = "上传失败错误原因(上传成功则不传)")
private String errormsg;
//方法名称
@ApiModelProperty(value = "方法名称")
private String methodName;
//参数
@ApiModelProperty(value = "参数")
private String param;
//环境
@ApiModelProperty(value = "环境")
private String env;
//删除标识true false
@ApiModelProperty(value = "删除标识true false")
private String deleteEnum;
//备注
@ApiModelProperty(value = "备注")
private String remarks;
//创建人姓名
@ApiModelProperty(value = "创建人姓名")
private String createName;
//更新人姓名
@ApiModelProperty(value = "更新人姓名")
private String updateName;
//租户id
@ApiModelProperty(value = "租户id")
private Long tenantId;
//单位id
@ApiModelProperty(value = "单位id")
private Long orgId;
//版本
@ApiModelProperty(value = "版本")
private Integer version;
//创建时间
@ApiModelProperty(value = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDateTime createTime;
//修改时间
@ApiModelProperty(value = "修改时间")
@JsonFormat(pattern = "yyyy-MM-dd")
private LocalDateTime updateTime;
//创建人id
@ApiModelProperty(value = "创建人id")
private Long createId;
//修改人id
@ApiModelProperty(value = "修改人id")
private Long updateId;
}

View File

@ -24,9 +24,18 @@ public class StudentCO extends ClientObject {
//学员userid //学员userid
@ApiModelProperty(value = "学员userid") @ApiModelProperty(value = "学员userid")
private Integer userId; private Integer userId;
//学员uuid
@ApiModelProperty(value = "学员uuid")
@TableField(exist = false)
private String userIdUuid;
//班级id //班级id
@ApiModelProperty(value = "班级id") @ApiModelProperty(value = "班级id")
private String classId; private String classId;
//班级id(雪花)
@ApiModelProperty(value = "班级id(雪花)")
private String clzId;
//学员姓名 //学员姓名
@ApiModelProperty(value = "学员姓名") @ApiModelProperty(value = "学员姓名")
private String name; private String name;
@ -188,6 +197,22 @@ public class StudentCO extends ClientObject {
// 年龄
@ApiModelProperty(value = "年龄")
@TableField(exist = false)
private Integer age;
//生日
@ApiModelProperty(value = "生日")
@TableField(exist = false)
private String birthday;
// 性别
@ApiModelProperty(value = "性别")
@TableField(exist = false)
private String sex;
//环境 //环境
@ApiModelProperty(value = "环境") @ApiModelProperty(value = "环境")
private String env; private String env;

View File

@ -0,0 +1,31 @@
package com.zcloud.edu.domain.gateway.archives;
import com.zcloud.edu.domain.model.archives.ArchivesPdfFileE;
/**
* web-domain
*
* @Author zhangyue
* @Date 2026-02-02 10:32:42
*/
public interface ArchivesPdfFileGateway {
/**
*
*/
Boolean add(ArchivesPdfFileE archivesPdfFileE);
/**
*
*/
Boolean update(ArchivesPdfFileE archivesPdfFileE);
/**
*
*/
Boolean deletedArchivesPdfFileById(Long id);
Boolean deletedArchivesPdfFileByIds(Long[] id);
}

View File

@ -0,0 +1,61 @@
package com.zcloud.edu.domain.model.archives;
import com.jjb.saas.framework.domain.model.BaseE;
import lombok.Data;
import java.time.LocalDateTime;
/**
* web-domain
*
* @Author zhangyue
* @Date 2026-02-02 10:32:41
*/
@Data
public class ArchivesPdfFileE extends BaseE {
//主键id
private Long id;
//业务id
private String archivesPdfFileId;
//关联表名称
private String tableName;
//关联表id
private String tableId;
//文件路径
private String filePath;
//档案类型 1 一人一档 2一期一档
private Integer type;
//上传状态 0-上传中 1-上传成功 -1 - 上传失败 -2 已删除
private Integer status;
//上传失败错误原因(上传成功则不传)
private String errormsg;
//方法名称
private String methodName;
//参数
private String param;
//环境
private String env;
//删除标识true false
private String deleteEnum;
//备注
private String remarks;
//创建人姓名
private String createName;
//更新人姓名
private String updateName;
//租户id
private Long tenantId;
//单位id
private Long orgId;
//版本
private Integer version;
//创建时间
private LocalDateTime createTime;
//修改时间
private LocalDateTime updateTime;
//创建人id
private Long createId;
//修改人id
private Long updateId;
}

View File

@ -0,0 +1,50 @@
package com.zcloud.edu.gatewayimpl.archives;
import com.zcloud.edu.domain.gateway.archives.ArchivesPdfFileGateway;
import com.zcloud.edu.domain.model.archives.ArchivesPdfFileE;
import com.zcloud.edu.persistence.dataobject.archives.ArchivesPdfFileDO;
import com.zcloud.edu.persistence.repository.archives.ArchivesPdfFileRepository;
import lombok.AllArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import java.util.Collections;
/**
* web-infrastructure
*
* @Author zhangyue
* @Date 2026-02-02 10:32:42
*/
@Service
@AllArgsConstructor
public class ArchivesPdfFileGatewayImpl implements ArchivesPdfFileGateway {
private final ArchivesPdfFileRepository archivesPdfFileRepository;
@Override
public Boolean add(ArchivesPdfFileE archivesPdfFileE) {
ArchivesPdfFileDO d = new ArchivesPdfFileDO();
BeanUtils.copyProperties(archivesPdfFileE, d);
archivesPdfFileRepository.save(d);
return true;
}
@Override
public Boolean update(ArchivesPdfFileE archivesPdfFileE) {
ArchivesPdfFileDO d = new ArchivesPdfFileDO();
BeanUtils.copyProperties(archivesPdfFileE, d);
archivesPdfFileRepository.updateById(d);
return true;
}
@Override
public Boolean deletedArchivesPdfFileById(Long id) {
return archivesPdfFileRepository.removeById(id);
}
@Override
public Boolean deletedArchivesPdfFileByIds(Long[] ids) {
return archivesPdfFileRepository.removeByIds(Collections.singletonList(ids));
}
}

View File

@ -0,0 +1,51 @@
package com.zcloud.edu.persistence.dataobject.archives;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jjb.saas.framework.repository.basedo.BaseDO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* web-infrastructure
*
* @Author zhangyue
* @Date 2026-02-02 10:32:42
*/
@Data
@TableName("archives_pdf_file")
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class ArchivesPdfFileDO extends BaseDO {
//业务id
@ApiModelProperty(value = "业务id")
private String archivesPdfFileId;
//关联表名称
@ApiModelProperty(value = "关联表名称")
private String tableName;
//关联表id
@ApiModelProperty(value = "关联表id")
private String tableId;
//文件路径
@ApiModelProperty(value = "文件路径")
private String filePath;
//档案类型 1 一人一档 2一期一档
@ApiModelProperty(value = "档案类型 1 一人一档 2一期一档")
private Integer type;
//上传状态 0-上传中 1-上传成功 -1 - 上传失败 -2 已删除
@ApiModelProperty(value = "上传状态 0-上传中 1-上传成功 -1 - 上传失败 -2 已删除")
private Integer status;
//上传失败错误原因(上传成功则不传)
@ApiModelProperty(value = "上传失败错误原因(上传成功则不传)")
private String errormsg;
//方法名称
@ApiModelProperty(value = "方法名称")
private String methodName;
//参数
@ApiModelProperty(value = "参数")
private String param;
}

View File

@ -24,9 +24,19 @@ public class StudentDO extends BaseDO {
//学员userid //学员userid
@ApiModelProperty(value = "学员userid") @ApiModelProperty(value = "学员userid")
private Integer userId; private Integer userId;
//学员uuid
@ApiModelProperty(value = "学员uuid")
@TableField(exist = false)
private String userIdUuid;
//班级id //班级id
@ApiModelProperty(value = "班级id") @ApiModelProperty(value = "班级id")
private String classId; private String classId;
//班级id(雪花)
@ApiModelProperty(value = "班级id(雪花)")
private String clzId;
//学员姓名 //学员姓名
@ApiModelProperty(value = "学员姓名") @ApiModelProperty(value = "学员姓名")
private String name; private String name;
@ -178,5 +188,22 @@ public class StudentDO extends BaseDO {
@TableField(exist = false) @TableField(exist = false)
private Integer numberofexams; private Integer numberofexams;
// 年龄
@ApiModelProperty(value = "年龄")
@TableField(exist = false)
private Integer age;
//生日
@ApiModelProperty(value = "生日")
@TableField(exist = false)
private String birthday;
// 性别
@ApiModelProperty(value = "性别")
@TableField(exist = false)
private String sex;
} }

View File

@ -0,0 +1,17 @@
package com.zcloud.edu.persistence.mapper.archives;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zcloud.edu.persistence.dataobject.archives.ArchivesPdfFileDO;
import org.apache.ibatis.annotations.Mapper;
/**
* web-infrastructure
*
* @Author zhangyue
* @Date 2026-02-02 10:32:42
*/
@Mapper
public interface ArchivesPdfFileMapper extends BaseMapper<ArchivesPdfFileDO> {
}

View File

@ -18,6 +18,8 @@ import org.apache.ibatis.annotations.Param;
public interface StudentExamRecordMapper extends BaseMapper<StudentExamRecordDO> { public interface StudentExamRecordMapper extends BaseMapper<StudentExamRecordDO> {
StudentExamRecordDO getInfoByStudentId(@Param("studentId") String studentId); StudentExamRecordDO getInfoByStudentId(@Param("studentId") String studentId);
StudentExamRecordDO getInfoById(@Param("id") Long id);
Integer countByStudentId(@Param("studentId") String studentId); Integer countByStudentId(@Param("studentId") String studentId);
IPage<StudentExamRecordDO> listPage(IPage<StudentExamRecordDO> page, @Param("ew") QueryWrapper<StudentExamRecordDO> queryWrapper, String menuPerms); IPage<StudentExamRecordDO> listPage(IPage<StudentExamRecordDO> page, @Param("ew") QueryWrapper<StudentExamRecordDO> queryWrapper, String menuPerms);

View File

@ -0,0 +1,18 @@
package com.zcloud.edu.persistence.repository.archives;
import com.alibaba.cola.dto.PageResponse;
import com.jjb.saas.framework.repository.repo.BaseRepository;
import com.zcloud.edu.persistence.dataobject.archives.ArchivesPdfFileDO;
import java.util.Map;
/**
* web-infrastructure
*
* @Author zhangyue
* @Date 2026-02-02 10:32:42
*/
public interface ArchivesPdfFileRepository extends BaseRepository<ArchivesPdfFileDO> {
PageResponse<ArchivesPdfFileDO> listPage(Map<String, Object> params);
}

View File

@ -0,0 +1,39 @@
package com.zcloud.edu.persistence.repository.impl.archives;
import com.alibaba.cola.dto.PageResponse;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jjb.saas.framework.repository.common.PageHelper;
import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl;
import com.zcloud.edu.persistence.dataobject.archives.ArchivesPdfFileDO;
import com.zcloud.edu.persistence.mapper.archives.ArchivesPdfFileMapper;
import com.zcloud.edu.persistence.repository.archives.ArchivesPdfFileRepository;
import com.zcloud.gbscommon.utils.PageQueryHelper;
import com.zcloud.gbscommon.utils.Query;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* web-infrastructure
*
* @Author zhangyue
* @Date 2026-02-02 10:32:42
*/
@Service
@RequiredArgsConstructor
public class ArchivesPdfFileRepositoryImpl extends BaseRepositoryImpl<ArchivesPdfFileMapper, ArchivesPdfFileDO> implements ArchivesPdfFileRepository {
private final ArchivesPdfFileMapper archivesPdfFileMapper;
@Override
public PageResponse<ArchivesPdfFileDO> listPage(Map<String, Object> params) {
IPage<ArchivesPdfFileDO> iPage = new Query<ArchivesPdfFileDO>().getPage(params);
QueryWrapper<ArchivesPdfFileDO> queryWrapper = new QueryWrapper<>();
queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, params);
queryWrapper.orderByDesc("create_time");
IPage<ArchivesPdfFileDO> result = archivesPdfFileMapper.selectPage(iPage, queryWrapper);
return PageHelper.pageToResponse(result, result.getRecords());
}
}

View File

@ -73,5 +73,10 @@ public class StudentExamRecordRepositoryImpl extends BaseRepositoryImpl<StudentE
public Integer countByStudentId(String studentId) { public Integer countByStudentId(String studentId) {
return studentExamRecordMapper.countByStudentId(studentId); return studentExamRecordMapper.countByStudentId(studentId);
} }
@Override
public StudentExamRecordDO getInfoById(Long id) {
return studentExamRecordMapper.getInfoById(id);
}
} }

View File

@ -98,10 +98,7 @@ public class StudentRepositoryImpl extends BaseRepositoryImpl<StudentMapper, Stu
@Override @Override
public StudentDO findInfoByStudentId(String studentId) { public StudentDO findInfoByStudentId(String studentId) {
QueryWrapper<StudentDO> queryWrapper = new QueryWrapper<>(); return studentMapper.findInfoByStudentId(studentId);
queryWrapper.eq("student_id", studentId);
queryWrapper.eq("delete_enum", "FALSE");
return studentMapper.selectOne(queryWrapper);
} }
@Override @Override

View File

@ -25,5 +25,7 @@ public interface StudentExamRecordRepository extends BaseRepository<StudentExamR
StudentExamRecordDO getInfoByStudentId(String studentId); StudentExamRecordDO getInfoByStudentId(String studentId);
Integer countByStudentId(String studentId); Integer countByStudentId(String studentId);
StudentExamRecordDO getInfoById(Long id);
} }

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zcloud.edu.persistence.mapper.archives.ArchivesPdfFileMapper">
</mapper>

View File

@ -34,6 +34,34 @@
limit 1 limit 1
</select> </select>
<select id="getInfoById" resultType="com.zcloud.edu.persistence.dataobject.study.StudentExamRecordDO">
SELECT
er.id,
er.student_exam_record_id,
er.user_id,
er.student_id,
er.class_id,
er.corpinfo_id,
er.student_sign_id,
er.class_exam_paper_id,
er.exam_paper_id,
er.exam_time_begin,
er.exam_time_end,
er.exam_question_num,
er.exam_question_right,
er.exam_question_wrong,
er.exam_score,
er.result,
ss.sign_url
FROM
student_exam_record er
left join student_sign ss on ss.student_sign_id = er.student_sign_id
<where>
er.delete_enum = 'FALSE'
and er.id = #{id}
</where>
</select>
<select id="countByStudentId" resultType="java.lang.Integer"> <select id="countByStudentId" resultType="java.lang.Integer">
SELECT SELECT
count(1) count(1)

View File

@ -169,11 +169,13 @@
</where> </where>
group by s.phone group by s.phone
</select> </select>
<select id="listPageClassByStudent" resultType="com.zcloud.edu.persistence.dataobject.study.StudentDO"> <select id="listPageClassByStudent" resultType="com.zcloud.edu.persistence.dataobject.study.StudentDO">
select select
s.id, s.id,
s.student_id, s.student_id,
s.user_id, s.user_id,
c.id clz_id,
s.class_id, s.class_id,
s.name, s.name,
s.class_corpinfo_id, s.class_corpinfo_id,
@ -244,6 +246,7 @@
s.name, s.name,
s.class_corpinfo_id, s.class_corpinfo_id,
s.phone, s.phone,
s.user_id,
s.user_id_card, s.user_id_card,
s.nation, s.nation,
s.nation_name, s.nation_name,
@ -265,12 +268,27 @@
s.project_ids, s.project_ids,
s.project_names, s.project_names,
u.user_avatar_url, u.user_avatar_url,
u.usse_id u.user_id user_id_uuid,
CASE
WHEN LENGTH(FROM_BASE64(s.user_id_card)) > 0
AND MOD(SUBSTRING(FROM_BASE64(s.user_id_card), 17, 1), 2) = 1 THEN
'男'
WHEN LENGTH(FROM_BASE64(s.user_id_card)) > 0
AND MOD(SUBSTRING(FROM_BASE64(s.user_id_card), 17, 1), 2) = 0 THEN
'女'
END AS sex,
CASE
WHEN LENGTH(FROM_BASE64(s.user_id_card)) > 0 THEN
(YEAR(NOW()) - SUBSTRING(FROM_BASE64(s.user_id_card), 7, 4)) ELSE NULL
END AS age,
cast(substring(FROM_BASE64(s.user_id_card), 7, 8) AS DATE) AS birthday
from from
student s student s
left join user u on u.phone = s.phone left join user u on u.phone = s.phone
<where> <where>
s.student_id = #{params.studentId} s.student_id = #{studentId}
</where> </where>
group by s.student_id group by s.student_id
</select> </select>