教职工Vo数据优化

This commit is contained in:
cjw 2024-05-30 15:42:09 +08:00
parent 4cd97ae5e3
commit 9c088c91d1
4 changed files with 19 additions and 4 deletions

View File

@ -74,7 +74,7 @@ public class SysTeacher extends TenantEntity {
/**
* 职务
*/
private String post;
private String postCode;
/**
* 用户性别0男 1女 2未知

View File

@ -79,7 +79,7 @@ public class SysTeacherBo extends BaseEntity {
* 职务
*/
@NotBlank(message = "职务不能为空", groups = { AddGroup.class, EditGroup.class })
private String post;
private String postCode;
/**
* 用户性别0男 1女 2未知

View File

@ -3,9 +3,12 @@ package org.dromara.file.domain.vo;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.github.linpeilie.annotations.AutoMapper;
import io.github.linpeilie.annotations.AutoMapping;
import lombok.Data;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;
import org.dromara.file.domain.SysTeacher;
import java.io.Serial;
@ -40,6 +43,10 @@ public class SysTeacherVo implements Serializable {
@ExcelProperty(value = "部门ID")
private Long deptId;
@Translation(type = TransConstant.DEPT_ID_TO_NAME)
@AutoMapping(target = "deptId")
private String deptName;
/**
* 教职工姓名
*/
@ -82,11 +89,19 @@ public class SysTeacherVo implements Serializable {
@ExcelProperty(value = "学科")
private String subjectCode;
@Translation(type = TransConstant.DICT_TYPE_TO_LABEL,other = "sys_subject")
@AutoMapping(target = "subjectCode")
private String subjectName;
/**
* 职务
*/
@ExcelProperty(value = "职务")
private String post;
private String postCode;
@Translation(type = TransConstant.DICT_TYPE_TO_LABEL,other = "sys_post")
@AutoMapping(target = "postCode")
private String postName;
/**
* 用户性别0男 1女 2未知

View File

@ -81,7 +81,7 @@ public class SysTeacherServiceImpl implements ISysTeacherService {
lqw.eq(StringUtils.isNotBlank(bo.getEducationCode()), SysTeacher::getEducationCode, bo.getEducationCode());
lqw.eq(StringUtils.isNotBlank(bo.getDegreeCode()), SysTeacher::getDegreeCode, bo.getDegreeCode());
lqw.eq(StringUtils.isNotBlank(bo.getSubjectCode()), SysTeacher::getSubjectCode, bo.getSubjectCode());
lqw.eq(StringUtils.isNotBlank(bo.getPost()), SysTeacher::getPost, bo.getPost());
lqw.eq(StringUtils.isNotBlank(bo.getPostCode()), SysTeacher::getPostCode, bo.getPostCode());
lqw.eq(StringUtils.isNotBlank(bo.getSex()), SysTeacher::getSex, bo.getSex());
lqw.eq(bo.getBirthday() != null, SysTeacher::getBirthday, bo.getBirthday());
return lqw;