Commit 1a784211 by baochunxin

#G:修改电子教师档案bug

parent da2e6b73
......@@ -79,6 +79,12 @@ public @interface Excel
public String defaultValue() default "";
/**
* 必填字段校验不能为null
*/
public boolean required() default false;
/**
* 提示信息
*/
public String prompt() default "";
......
......@@ -427,6 +427,14 @@ public class ExcelUtil<T>
else
{
String dateFormat = field.getAnnotation(Excel.class).dateFormat();
//注意实体类字段类型,除String类型外,其他类型会被解析为null值,所以要判断对象是否为null
boolean required = attr.required();
if(required)
if(StringUtils.isNull(val) || StringUtils.isEmpty(val.toString())) {
throw new Exception("必填项未填写!");
}
if (StringUtils.isNotEmpty(dateFormat))
{
val = parseDateToStr(dateFormat, val);
......@@ -444,6 +452,12 @@ public class ExcelUtil<T>
else if ((Long.TYPE == fieldType || Long.class == fieldType) && StringUtils.isNumeric(Convert.toStr(val)))
{
val = Convert.toLong(val);
//注意实体类字段类型,除String类型外,其他类型会被解析为null值,所以要判断对象是否为null
boolean required = attr.required();
if(required)
if(StringUtils.isNull(val) || StringUtils.isEmpty(val.toString())) {
throw new Exception("必填项未填写!");
}
}
else if (Double.TYPE == fieldType || Double.class == fieldType)
{
......
......@@ -117,7 +117,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.antMatchers( "/common/**").permitAll()
.antMatchers( "/dd/school/**").permitAll()
.antMatchers( "/teacher/basiclnformation/**","/aworkload/**","/wx/course/**","/assessment/**","/achievement/**","/school/award/**").permitAll()
// .antMatchers( "/teacher/basiclnformation/**","/aworkload/**","/wx/course/**","/assessment/**","/achievement/**","/school/award/**").permitAll()
//打印下载接口放行
.antMatchers("/school/student/queryOne/**","/school/studentStatus/proofStatus/**").permitAll()
......
......@@ -6,12 +6,15 @@ import com.itextpdf.text.*;
import com.itextpdf.text.pdf.BaseFont;
import com.itextpdf.text.pdf.PdfPCell;
import com.itextpdf.text.pdf.PdfPTable;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.pdf.PDFUtil;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.system.service.impl.SysDictDataServiceImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -26,7 +29,9 @@ import yangtz.cs.liu.campus.service.schoolNewTeacherDzdn.SchoolTeacherBasichlnfo
import yangtz.cs.liu.campus.vo.schoolNewTeacherDzdn.SchoolXteachingAchievementsVo;
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletResponse;
import java.awt.image.BufferedImage;
import java.io.*;
import java.text.SimpleDateFormat;
import java.util.*;
......@@ -76,9 +81,10 @@ public class SchoolTeacherBasiclnformationController extends BaseController {
String idCard = information.getIdCard();
LambdaQueryWrapper<SchoolTeacherBasicInformation> wrapper = Wrappers.lambdaQuery();
LambdaQueryWrapper<SchoolTeacherBasicInformation> eq = wrapper.eq(SchoolTeacherBasicInformation::getIdCard, idCard);
SchoolTeacherBasicInformation one = basichlnformationService.getOne(wrapper);
if (one != null){
return AjaxResult.error(information.getName()+"人员身份证已经存在,身份证重复信息不可录入");
List<SchoolTeacherBasicInformation> list = basichlnformationService.list(eq);
if (!list.isEmpty()){
return AjaxResult.error(
information.getName()+"人员身份证已经存在,身份证重复信息不可录入");
}
//出生年月日获取
String birthDayFromIdCard = IdCardNumberUtils.getBirthDayFromIdCard(information.getIdCard());
......@@ -86,6 +92,9 @@ public class SchoolTeacherBasiclnformationController extends BaseController {
//性别获取
Map<String, Object> sexFromIdCard = IdCardNumberUtils.getSexFromIdCard(information.getIdCard());
Integer sex = (Integer) sexFromIdCard.get(IdCardNumberUtils.SEX_BY_INT_MAP_KEY);
if (null == sex){
return AjaxResult.error("请输入正确的身份证号");
}
if (sex == 1){
information.setSex("0");
}else {
......@@ -100,7 +109,7 @@ public class SchoolTeacherBasiclnformationController extends BaseController {
@PutMapping("/update")
public AjaxResult update(@RequestBody SchoolTeacherBasicInformation information){
return AjaxResult.success(basichlnformationService.updateById(information));
return AjaxResult.success(basichlnformationService.updateInformationById(information));
}
/**
......@@ -266,13 +275,34 @@ public class SchoolTeacherBasiclnformationController extends BaseController {
ComperhensiveVo comprehensive = basichlnformationService.comprehensive(req);
return AjaxResult.success(comprehensive);
}
@Autowired
private ISysUserService userService;
/**
* 老师个人综合查询
*/
@GetMapping("/compre/{phoneNumber}")
public AjaxResult comprehensiveByPhoneNumber(@PathVariable("phoneNumber") String phoneNumber) throws Exception{
ComperhensiveVo comprehensive = basichlnformationService.comprehensiveByPhoneNumber(phoneNumber);
return AjaxResult.success(comprehensive);
}
/**
* pdf导出
*/
@PostMapping("/exportPDF")
public void exportPdf(HttpServletResponse response,ComprehensiveReq req) throws Exception{
ComperhensiveVo comprehensive = basichlnformationService.comprehensive(req);
ComperhensiveVo comprehensive = null;
if (StringUtils.isNotEmpty(req.getPhoneNumber())){
comprehensive = basichlnformationService.comprehensiveByPhoneNumber(req.getPhoneNumber());
}else {
comprehensive = basichlnformationService.comprehensive(req);
}
if (comprehensive==null){
throw new RuntimeException("当前用户未找到教师基本信息,请完善教师基本信息");
}
SchoolTeacherBasicInformationVo basicInformation = comprehensive.getBasicInformation();
try {
//创建文档
......@@ -321,14 +351,21 @@ public class SchoolTeacherBasiclnformationController extends BaseController {
PDFUtil.addPdfPTitleCell("年龄", cellFont, pdfCell, pdfPTable, 20);
PDFUtil.addPdfPCell(basicInformation.getAge().toString(), cellcoentFont, pdfCell, pdfPTable, 20);
Image img = Image.getInstance(basicInformation.getPhotoUrl());
//测试图片
// Image img = Image.getInstance("https://img.dahepiao.com/uploads/allimg/191010/10540H550-0.jpg");
//获取图片 /profile
Image img = null;
if (StringUtils.isNotEmpty(basicInformation.getPhotoUrl())){
String substring = basicInformation.getPhotoUrl().substring(15, basicInformation.getPhotoUrl().length());
String filePath = RuoYiConfig.getAvatarPath() + substring;
img = Image.getInstance(filePath);
//图片格式转换
img.setAlignment(Element.ALIGN_CENTER);
}
Font sonTitleFont = PDFUtil.getFont(baseFont, 11, Font.BOLD);
PdfPCell nameplateCell = PDFUtil.getColSpanPdfCell(PDFUtil.getPhrase(" 照片 ", sonTitleFont),
Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 15, Boolean.TRUE, 2,6);
// img.scaleToFit(135f, 1000);
img.setAlignment(Element.ALIGN_CENTER);
nameplateCell.setImage(img);
pdfPTable.addCell(nameplateCell);
......@@ -443,16 +480,18 @@ public class SchoolTeacherBasiclnformationController extends BaseController {
PDFUtil.addPdfPTitleCell("第一学历", cellFont, pdfCell, pdfPTable, 20);
PDFUtil.addPdfPCell(basicInformation.getFirstDegree(), cellcoentFont, pdfCell, pdfPTable, 20);
PDFUtil.addPdfPTitleCell("最后学历", cellFont, pdfCell, pdfPTable, 20);
PDFUtil.addPdfPCell(basicInformation.getLastDegree(), cellcoentFont, pdfCell, pdfPTable, 20);
PDFUtil.addPdfPTitleCell("学位", cellFont, pdfCell, pdfPTable, 20);
PDFUtil.addPdfPCell(basicInformation.getDegree(), cellcoentFont, pdfCell, pdfPTable, 20);
// PDFUtil.addPdfPCell(basicInformation.getDegree(), cellcoentFont, pdfCell, pdfPTable, 20);
PdfPCell xueweititle = PDFUtil.getColSpanPdfCell(PDFUtil.getPhrase(basicInformation.getDegree(), cellcoentFont),
Element.ALIGN_CENTER, Element.ALIGN_MIDDLE, 15, Boolean.TRUE, 3,0);
pdfPTable.addCell(xueweititle);
//将表格添加至文中
document.add(pdfPTable);
//2.表格 工作量信息
PdfPTable pdfPTablegz = PDFUtil.getPdfPTable(16, 100, 1500);
Chunk qtchunkgz = PDFUtil.getChunk("工作量信息",font);
......@@ -698,11 +737,10 @@ public class SchoolTeacherBasiclnformationController extends BaseController {
case "教学获奖": return sysDictDataService.selectDictLabel("award_categoriesjs",value);
case "成长类型": return sysDictDataService.selectDictLabel("award_categoriesjk",value);
case "论文论著": return sysDictDataService.selectDictLabel("award_categories",value);
case "课题研究": return sysDictDataService.selectDictLabel("project_research",value);
}
return "";
}
}
......@@ -24,4 +24,9 @@ public class ComprehensiveReq {
*/
private Long userId;
/**
* 手机号
*/
private String phoneNumber;
}
......@@ -19,35 +19,35 @@ public class SchoolAworkloadExport extends BaseEntity
private Long id;
/** 学年(下拉框) */
@Excel(name = "学年",dictType="yearda")
@Excel(name = "学年",dictType="yearda" ,required = true)
private String schoolYear;
/** 学期(下拉框) */
@Excel(name = "学期",dictType="semester_jsdzda")
@Excel(name = "学期",dictType="semester_jsdzda",required = true)
private String semester;
/** 届别(下拉框) */
@Excel(name = "届别",dictType = "rankda")
@Excel(name = "届别",dictType = "rankda",required = true)
private String year;
/** 年级(下拉框) */
@Excel(name = "年级",dictType="grade_da")
@Excel(name = "年级",dictType="grade_da",required = true)
private String grade;
/** 姓名 */
@Excel(name = "姓名")
@Excel(name = "姓名",required = true)
private String name;
/** 学科(下拉框) */
@Excel(name = "学科",dictType = "teaching_subjects")
@Excel(name = "学科",dictType = "teaching_subjects",required = true)
private String sub;
/** 身份证号 */
@Excel(name = "身份证号")
@Excel(name = "身份证号",required = true)
private String idCard;
/** 聘任岗位(下拉框) */
@Excel(name = "聘任岗位",dictType = "appointment_positions")
@Excel(name = "聘任岗位",dictType = "appointment_positions",required = true)
private String appointmentPost;
/** 聘任职务 */
......@@ -59,7 +59,7 @@ public class SchoolAworkloadExport extends BaseEntity
private String appointmentSituation;
/** 班级 */
@Excel(name = "班级",prompt="多个,中间用英文“,”间隔")
@Excel(name = "班级",prompt="多个,中间用英文“,”间隔",required = true)
private String className;
/** 班级类型 */
......@@ -67,15 +67,15 @@ public class SchoolAworkloadExport extends BaseEntity
private String classType;
/** 早读 */
@Excel(name = "早读")
@Excel(name = "早读",required = true)
private Long earlyReading;
/** 正课 */
@Excel(name = "正课")
@Excel(name = "正课",required = true)
private Long requiredCourses;
/** 晚自习 */
@Excel(name = "晚自习")
@Excel(name = "晚自习",required = true)
private Long eveningSelfStudy;
/**合计*/
......@@ -86,7 +86,7 @@ public class SchoolAworkloadExport extends BaseEntity
private Long userId;
/** 证明人 */
@Excel(name = "证明人")
@Excel(name = "证明人",required = true)
private String userName;
@Excel(name = "备注")
......
......@@ -265,6 +265,11 @@ public class SchoolTeacherBasicInformation extends BaseEntity {
* 钉钉手机号
*/
private String ddPhone;
/**
* 备注
*/
private String remark;
//
// /**
// * 出生日期临时查询参数
......
......@@ -26,6 +26,7 @@ public interface SchoolTeacherBasichlnformationService extends IService<SchoolT
* @return
*/
public ComperhensiveVo comprehensive(ComprehensiveReq req) throws Exception;
public ComperhensiveVo comprehensiveByPhoneNumber(String phoneNumber) throws Exception;
/*
......
......@@ -94,10 +94,10 @@ public class SchoolXteachingAchievementsVo {
private String delFlag;
/** 开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date startTime;
/** 结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date endTime;
}
......@@ -44,7 +44,7 @@
<if test="username != null and username != ''"> and user_name like concat('%', #{username}, '%')</if>
<if test="org != null and org != ''"> and org like concat('%', #{org}, '%')</if>
<if test="awardtime != null"> and award_time = #{awardtime}</if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != '' "> and award_time BETWEEN #{startTime} AND #{endTime}</if>
<if test="startTime != null and endTime != null "> and award_time BETWEEN #{startTime} AND #{endTime}</if>
</where>
order by create_time DESC
</select>
......
......@@ -35,6 +35,7 @@
<if test="awardtype != null and awardtype != ''"> and award_type = #{awardtype}</if>
<if test="awardrank != null and awardrank != ''"> and award_rank = #{awardrank}</if>
<if test="awardlevel != null and awardlevel != ''"> and award_level = #{awardlevel}</if>
<if test="coachingr != null and coachingr != ''"> and coaching_responsibilities = #{coachingr}</if>
<if test="competitionname != null and competitionname != ''"> and competition_name like concat('%', #{competitionname}, '%')</if>
<if test="guidanceteacher != null and guidanceteacher != ''"> and guidance_teacher like concat('%', #{guidanceteacher}, '%')</if>
<if test="auditstate != null and auditstate != ''"> and audit_state != #{auditstate}</if>
......@@ -42,7 +43,7 @@
<if test="username != null and username != ''"> and user_name like concat('%', #{username}, '%')</if>
<if test="org != null and org != ''"> and org like concat('%', #{org}, '%')</if>
<if test="awardtime != null"> and award_time = #{awardtime}</if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != '' "> and award_time BETWEEN #{startTime} AND #{endTime}</if>
<if test="startTime != null and endTime != null "> and award_time BETWEEN #{startTime} AND #{endTime}</if>
</where>
order by create_time DESC
</select>
......
......@@ -38,8 +38,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="year != null and year != ''"> and year = #{year}</if>
<if test="semester != null and semester != ''"> and semester = #{semester}</if>
<if test="grade != null and grade != ''"> and grade = #{grade}</if>
<if test="classType != null and classType != ''"> and class_type = #{classType}</if>
<if test="classType != null and classType != ''"> and class_type like concat('%', #{classType}, '%') </if>
<if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
<if test="sub != null and sub != ''"> and sub = #{sub}</if>
<if test="className != null and className != ''"> and class_name like concat('%', #{className}, '%')</if>
......@@ -68,9 +69,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="year != null and year != ''"> and year = #{year}</if>
<if test="semester != null and semester != ''"> and semester = #{semester}</if>
<if test="grade != null and grade != ''"> and grade = #{grade}</if>
<if test="classType != null and classType != ''"> and class_type = #{classType}</if>
<if test="classType != null and classType != ''"> and class_type like concat('%', #{classType}, '%') </if>
<if test="className != null and className != ''"> and class_name like concat('%', #{className}, '%')</if>
<if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
<if test="sub != null and sub != ''"> and sub = #{sub}</if>
<if test="moralEduCheckAchievement != null and moralEduCheckAchievement != ''"> and moral_edu_check_achievement = #{moralEduCheckAchievement}</if>
......
......@@ -34,9 +34,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="year != null and year != ''"> and year = #{year}</if>
<if test="userId != null and userId != ''"> and user_id = #{userId}</if>
<if test="sub != null and sub != ''"> and sub = #{sub}</if>
<if test="teacherName != null and teacherName != ''"> and teacher_name like concat('%', #{teacher_name}, '%') </if>
<if test="teacherName != null and teacherName != ''"> and teacher_name like concat('%', #{teacherName}, '%') </if>
<if test="teachingClassName != null and teachingClassName != ''"> and teaching_class_name = #{teachingClassName}</if>
<if test="classType != null and classType != ''"> and class_type = #{classType}</if>
<if test="classType != null and classType != ''"> and class_type like concat('%', #{classType}, '%')</if>
<if test="gkAppraising != null and gkAppraising != ''"> and gk_appraising = #{gkAppraising}</if>
</select>
......@@ -46,9 +46,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="year != null and year != ''"> and year = #{year}</if>
<if test="userId != null and userId != ''"> and user_id = #{userId}</if>
<if test="sub != null and sub != ''"> and sub = #{sub}</if>
<if test="teacherName != null and teacherName != ''"> and teacher_name like concat('%', #{teacher_name}, '%') </if>
<if test="teacherName != null and teacherName != ''"> and teacher_name like concat('%', #{teacherName}, '%') </if>
<if test="teachingClassName != null and teachingClassName != ''"> and teaching_class_name = #{teachingClassName}</if>
<if test="classType != null and classType != ''"> and class_type = #{classType}</if>
<if test="classType != null and classType != ''"> and class_type like concat('%', #{classType}, '%')</if>
<if test="gkAppraising != null and gkAppraising != ''"> and gk_appraising = #{gkAppraising}</if>
</select>
......
......@@ -8,7 +8,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="list" resultType="yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolTeacherBasicInformationVo" parameterType="yangtz.cs.liu.campus.domain.schoolNewTeacherDzdn.SchoolTeacherBasicInformationVo">
SELECT id,name,sex,id_card,file_birth_date,political_landscape,to_second_middle_school_time,current_professional_title,last_degree,on_duty_situation,dd_phone FROM school_teacher_basic_information where del_flag = 0
select id, name, id_card, sex, file_birth_date, birth_date, hometown, nation, political_landscape, party_membership_time, teaching_subject, current_professional_title, current_professional_title_time, current_hiring_professional_title, current_hiring_professional_title_time, current_position, current_job_level, current_job_level_appointment_time, duties, teacher_qualification_type, teacher_qualification_certificate_num, working_hours, to_second_middle_school_time, length_of_teacher_time, length_of_service_time, on_duty_situation, current_situation, graduation_institution1, major1, graduation_time1, graduation_institution2, major2, graduation_time2, graduation_institution3, major3, graduation_time3, first_degree, last_degree, degree, work_experience, remark, photo_name, photo_url, dd_phone, del_flag from school_teacher_basic_information
where del_flag = 0
<if test="teachingSubject != null "> and teaching_subject = #{teachingSubject}</if>
<if test="name != null ">
AND name like concat('%', #{name}, '%')
......@@ -30,10 +31,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
<if test="onDutySituation != null "> and on_duty_situation = #{onDutySituation}</if>
<if test="graduationInstitution1 != null ">
AND CONCAT(IFNULL(c.graduationInstitution1,''),IFNULL(c.graduationInstitution2,''),IFNULL(c.graduationInstitution3,'')) LIKE concat('%',#{graduationInstitution1},'%')}
AND CONCAT(IFNULL(graduation_institution1,''),IFNULL(graduation_institution2,''),IFNULL(graduation_institution3,'')) LIKE concat('%',#{graduationInstitution1},'%')
</if>
<if test="firstDegree != null ">
AND CONCAT(IFNULL(c.firstDegree,''),IFNULL(c.lastDegree,'')) LIKE concat('%',#{firstDegree},'%')}
AND CONCAT(IFNULL(first_degree,''),IFNULL(last_degree,'')) LIKE concat('%',#{firstDegree},'%')
</if>
</select>
......
......@@ -47,7 +47,7 @@
<if test="pictureName != null and pictureName != ''"> and picture_name like concat('%', #{pictureName}, '%')</if>
<if test="pictureUrl != null and pictureUrl != ''"> and picture_url = #{pictureUrl}</if>
<if test="auditState != null and auditState != ''"> and audit_state != #{auditState}</if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != '' "> and award_time BETWEEN #{startTime} AND #{endTime}</if>
<if test="startTime != null and endTime != null "> and award_time BETWEEN #{startTime} AND #{endTime}</if>
</where>
order by create_time DESC
</select>
......
......@@ -47,7 +47,7 @@
<if test="pictureName != null and pictureName != ''"> and picture_name like concat('%', #{pictureName}, '%')</if>
<if test="pictureUrl != null and pictureUrl != ''"> and picture_url = #{pictureUrl}</if>
<if test="auditState != null and auditState != ''"> and audit_state != #{auditState}</if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != '' "> and award_time BETWEEN #{startTime} AND #{endTime}</if>
<if test="startTime != null and endTime != null "> and award_time BETWEEN #{startTime} AND #{endTime}</if>
</where>
order by create_time DESC
</select>
......
......@@ -47,7 +47,7 @@
<if test="pictureName != null and pictureName != ''"> and picture_name like concat('%', #{pictureName}, '%')</if>
<if test="pictureUrl != null and pictureUrl != ''"> and picture_url = #{pictureUrl}</if>
<if test="auditState != null and auditState != ''"> and audit_state != #{auditState}</if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != '' "> and award_time BETWEEN #{startTime} AND #{endTime}</if>
<if test="startTime != null and endTime != null "> and award_time BETWEEN #{startTime} AND #{endTime}</if>
</where>
order by create_time DESC
</select>
......
......@@ -46,7 +46,7 @@
<if test="pictureName != null and pictureName != ''"> and picture_name like concat('%', #{pictureName}, '%')</if>
<if test="pictureUrl != null and pictureUrl != ''"> and picture_url = #{pictureUrl}</if>
<if test="auditState != null and auditState != ''"> and audit_state != #{auditState}</if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != '' "> and award_time BETWEEN #{startTime} AND #{endTime}</if>
<if test="startTime != null and endTime != null "> and award_time BETWEEN #{startTime} AND #{endTime}</if>
</where>
order by create_time DESC
</select>
......
......@@ -47,7 +47,7 @@
<if test="pictureName != null and pictureName != ''"> and picture_name like concat('%', #{pictureName}, '%')</if>
<if test="pictureUrl != null and pictureUrl != ''"> and picture_url = #{pictureUrl}</if>
<if test="auditState != null and auditState != ''"> and audit_state != #{auditState}</if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != '' "> and award_time BETWEEN #{startTime} AND #{endTime}</if>
<if test="startTime != null and endTime != null "> and award_time BETWEEN #{startTime} AND #{endTime}</if>
</where>
order by create_time DESC
</select>
......
......@@ -48,7 +48,7 @@
<if test="className != null and className != ''"> and class_name like concat('%', #{className}, '%')</if>
<if test="classType != null and classType != ''"> and class_type = #{classType}</if>
<if test="assessmentScore != null "> and assessment_score = #{assessmentScore}</if>
<if test="startTime != null and startTime != '' and endTime != null and endTime != '' "> and exam_time BETWEEN #{startTime} AND #{endTime}</if>
<if test="startTime != null and endTime != null "> and exam_time BETWEEN #{startTime} AND #{endTime}</if>
</where>
order by create_time DESC
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment