Browse Source

Merge branch 'pre'

dzx 1 năm trước cách đây
mục cha
commit
cf4a8f5f19

+ 1 - 4
src/main/java/com/xjrsoft/module/attendance/controller/TeacherAttendanceRecordController.java

@@ -101,17 +101,15 @@ public class TeacherAttendanceRecordController {
     public RT<Boolean> add(@Valid @RequestBody AddTeacherAttendanceRecordDto dto){
         TeacherAttendanceRecord teacherAttendanceRecord = BeanUtil.toBean(dto, TeacherAttendanceRecord.class);
         boolean isSuccess = teacherAttendanceRecordService.save(teacherAttendanceRecord);
-    return RT.ok(isSuccess);
+        return RT.ok(isSuccess);
     }
 
     @PutMapping
     @ApiOperation(value = "修改教师考勤记录")
     @SaCheckPermission("teacherattendancerecord:edit")
     public RT<Boolean> update(@Valid @RequestBody UpdateTeacherAttendanceRecordDto dto){
-
         TeacherAttendanceRecord teacherAttendanceRecord = BeanUtil.toBean(dto, TeacherAttendanceRecord.class);
         return RT.ok(teacherAttendanceRecordService.updateById(teacherAttendanceRecord));
-
     }
 
     @DeleteMapping
@@ -119,7 +117,6 @@ public class TeacherAttendanceRecordController {
     @SaCheckPermission("teacherattendancerecord:delete")
     public RT<Boolean> delete(@Valid @RequestBody List<Long> ids){
         return RT.ok(teacherAttendanceRecordService.removeBatchByIds(ids));
-
     }
 
 }

+ 4 - 4
src/main/java/com/xjrsoft/module/databoard/controller/DataboardController.java

@@ -453,11 +453,11 @@ public class DataboardController {
         int personCount = 0;
 
         for (Map<String, Object> objectMap : list) {
-            Object statusObj = objectMap.get("status");
-            if(statusObj == null){
-                uncompleteCount ++;
-            }else{
+            Object statusObj = objectMap.get("maintenance_feedback");
+            if(statusObj != null && !statusObj.toString().isEmpty()){
                 completeCount ++;
+            }else{
+                uncompleteCount ++;
             }
             if(objectMap.get("status") != null && "是".equals(objectMap.get("status").toString())){
                 personCount ++;

+ 5 - 0
src/main/java/com/xjrsoft/module/job/AttendanceRecordTask.java

@@ -235,6 +235,11 @@ public class AttendanceRecordTask {
         }
 
         if(!insertList.isEmpty()){
+            recordService.remove(
+                    new QueryWrapper<TeacherAttendanceRecord>().lambda()
+                            .eq(TeacherAttendanceRecord::getTimeInterval, timePeriod)
+                            .eq(TeacherAttendanceRecord::getAttendanceDate, queryDate)
+            );
             recordService.saveBatch(insertList);
         }
     }

+ 120 - 0
src/main/java/com/xjrsoft/module/job/StudentLeaveNoticeTask.java

@@ -0,0 +1,120 @@
+package com.xjrsoft.module.job;
+
+import cn.hutool.core.util.IdUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.github.yulichang.wrapper.MPJLambdaWrapper;
+import com.xjrsoft.common.enums.DeleteMark;
+import com.xjrsoft.common.enums.OutInStatusEnum;
+import com.xjrsoft.common.utils.VoToColumnUtil;
+import com.xjrsoft.module.base.entity.BaseUserStudent;
+import com.xjrsoft.module.organization.dto.WeChatSendMessageDto;
+import com.xjrsoft.module.organization.entity.User;
+import com.xjrsoft.module.organization.service.IUserService;
+import com.xjrsoft.module.organization.service.IWeChatService;
+import com.xjrsoft.module.outint.entity.StudentOutInRecord;
+import com.xjrsoft.module.outint.service.IStudentOutInRecordService;
+import com.xjrsoft.module.student.service.IStudentLeaveService;
+import com.xjrsoft.module.student.vo.NoBackStudentInfoVo;
+import lombok.extern.slf4j.Slf4j;
+import me.zhyd.oauth.log.Log;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author dzx
+ * @date 2024/9/2
+ */
+@Component
+@Slf4j
+public class StudentLeaveNoticeTask {
+
+    @Autowired
+    private IStudentLeaveService studentLeaveService;
+
+    @Autowired
+    private IUserService userService;
+
+    @Autowired
+    private IStudentOutInRecordService recordService;
+
+    @Autowired
+    private IWeChatService weChatService;
+
+    private final static String wechatTemplate = "KsSLrcCaFC5LUNo3Y68AnrFBBu4xg9-Ab8QiFW82rDw";
+
+    @Scheduled(cron = "0 */15 * * * ?")
+    public void execute() {
+        doExecute();
+    }
+
+    public void doExecute(){
+        List<NoBackStudentInfoVo> noBackList = studentLeaveService.getNoBackStudentInfo();
+
+        List<Long> updateList = new ArrayList<>();
+        for (NoBackStudentInfoVo studentLeave : noBackList) {
+            //1、查询这些学生是否有进入记录
+            List<StudentOutInRecord> recordList = recordService.list(
+                    new QueryWrapper<StudentOutInRecord>().lambda()
+                            .eq(StudentOutInRecord::getStatus, OutInStatusEnum.goOut.getCode())
+                            .eq(StudentOutInRecord::getUserId, studentLeave.getStudentUserId())
+                            .between(StudentOutInRecord::getRecordTime, studentLeave.getStartDate(), studentLeave.getEndDate())
+                            .eq(StudentOutInRecord::getDeleteMark, DeleteMark.NODELETE.getCode())
+            );
+            if(!recordList.isEmpty()){
+                continue;
+            }
+            try {
+                WeChatSendMessageDto weChatSendMessageDto = new WeChatSendMessageDto();
+                weChatSendMessageDto.setTemplateId(wechatTemplate);
+                weChatSendMessageDto.setMsgId(IdUtil.getSnowflakeNextId() + "");
+                JSONObject paramJson = new JSONObject();
+
+                JSONObject thing1 = new JSONObject();
+                thing1.put("value", studentLeave.getClassName());
+                paramJson.put("thing1", thing1);
+
+                JSONObject thing2 = new JSONObject();
+                thing2.put("value", studentLeave.getName());
+                paramJson.put("thing2", thing2);
+
+                JSONObject time3 = new JSONObject();
+                time3.put("value", studentLeave.getEndDateStr());
+                paramJson.put("time3", time3);
+
+                weChatSendMessageDto.setContent(paramJson);
+                if(studentLeave.getOpenId() != null){
+                    weChatSendMessageDto.setUserId(studentLeave.getOpenId());
+                    weChatService.sendTemplateMessage(weChatSendMessageDto);
+                }
+
+                //查询家长
+                List<User> parentList = userService.list(
+                        new MPJLambdaWrapper<User>()
+                                .select(User::getId)
+                                .select(User.class, x -> VoToColumnUtil.fieldsToColumns(User.class).contains(x.getProperty()))
+                                .innerJoin(BaseUserStudent.class, BaseUserStudent::getUserId, User::getId)
+                                .eq(BaseUserStudent::getStudentId, studentLeave.getStudentUserId())
+                                .isNotNull(User::getOpenId)
+                );
+                for (User user : parentList) {
+                    weChatSendMessageDto.setUserId(user.getOpenId());
+                    weChatService.sendTemplateMessage(weChatSendMessageDto);
+                }
+                updateList.add(studentLeave.getId());
+            }catch (Exception e){
+                Log.error(e.getMessage(), e);
+            }
+        }
+
+        if(!updateList.isEmpty()){
+            studentLeaveService.updateIsNotice(updateList);
+        }
+    }
+
+}
+

+ 6 - 2
src/main/java/com/xjrsoft/module/student/entity/StudentLeave.java

@@ -11,6 +11,7 @@ import lombok.Data;
 
 import java.io.Serializable;
 import java.time.LocalDate;
+import java.time.LocalDateTime;
 import java.util.Date;
 
 
@@ -78,10 +79,10 @@ public class StudentLeave implements Serializable {
     private Long classId;
 
     @ApiModelProperty("开始时间")
-    private LocalDate startDate;
+    private LocalDateTime startDate;
 
     @ApiModelProperty("开始时间")
-    private LocalDate endDate;
+    private LocalDateTime endDate;
 
     @ApiModelProperty("请假原因")
     private String reason;
@@ -106,4 +107,7 @@ public class StudentLeave implements Serializable {
 
     @ApiModelProperty("海康接口返回信息")
     private String hikvisionResult;
+
+    @ApiModelProperty("是否已通知班主任和家长(0:否 1:是)")
+    private Integer isNotice;
 }

+ 5 - 0
src/main/java/com/xjrsoft/module/student/mapper/StudentLeaveMapper.java

@@ -6,6 +6,7 @@ import com.xjrsoft.module.attendance.dto.AttendanceStatisticDto;
 import com.xjrsoft.module.outint.vo.IdCountVo;
 import com.xjrsoft.module.student.dto.StudentLeavePageDto;
 import com.xjrsoft.module.student.entity.StudentLeave;
+import com.xjrsoft.module.student.vo.NoBackStudentInfoVo;
 import com.xjrsoft.module.student.vo.StudentLeavePageVo;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
@@ -30,4 +31,8 @@ public interface StudentLeaveMapper extends MPJBaseMapper<StudentLeave> {
     List<StudentLeave> getLeaveList(@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);
 
     Page<StudentLeavePageVo> getLeavePage(Page<StudentLeavePageVo> page, StudentLeavePageDto dto);
+
+    List<NoBackStudentInfoVo> getNoBackStudentInfo();
+
+    void updateIsNotice(@Param("ids") List<Long> ids);
 }

+ 6 - 0
src/main/java/com/xjrsoft/module/student/service/IStudentLeaveService.java

@@ -5,10 +5,12 @@ import com.github.yulichang.base.MPJBaseService;
 import com.xjrsoft.module.attendance.dto.AttendanceStatisticDto;
 import com.xjrsoft.module.student.dto.StudentLeavePageDto;
 import com.xjrsoft.module.student.entity.StudentLeave;
+import com.xjrsoft.module.student.vo.NoBackStudentInfoVo;
 import com.xjrsoft.module.student.vo.StudentLeavePageVo;
 import org.apache.ibatis.annotations.Param;
 
 import java.time.LocalDateTime;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -32,4 +34,8 @@ public interface IStudentLeaveService extends MPJBaseService<StudentLeave> {
     Page<StudentLeavePageVo> getLeavePage(Page<StudentLeavePageVo> page, StudentLeavePageDto dto);
 
     Boolean noticeParents(Long id);
+
+    List<NoBackStudentInfoVo> getNoBackStudentInfo();
+
+    void updateIsNotice(List<Long> ids);
 }

+ 69 - 64
src/main/java/com/xjrsoft/module/student/service/impl/BaseStudentAssessmentInspectionServiceImpl.java

@@ -681,75 +681,80 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
 
     @Override
     public Boolean noticeTeacher(Long id) {
-        BaseStudentAssessmentInspection inspection = this.getById(id);
-        String classIds = inspection.getClassIds();
-        BaseClass baseClass = baseClassMapper.selectById(classIds);
-        User user = userService.getById(baseClass.getTeacherId());
-        String wechatTemplate = "Xb21V8au0Ur9puQs4hIDJTl8LP6GTgVOHQtOeie1Oco";
-
-        WeChatSendMessageDto weChatSendMessageDto = new WeChatSendMessageDto();
-        weChatSendMessageDto.setUserId(user.getOpenId());
-        weChatSendMessageDto.setTemplateId(wechatTemplate);
-        weChatSendMessageDto.setMsgId(IdUtil.getSnowflakeNextId() + "");
-
-        JSONObject data = new JSONObject();
-        String thing4 = "";
-        String thing1 = "";
-        if(AssessmentTypeEnum.CLASS.getCode().equals(inspection.getAssessmentType())){
-            data.put("const3", new JSONObject() {{
-                put("value", AssessmentTypeEnum.CLASS.getValue());
-            }});
+        try {
+            BaseStudentAssessmentInspection inspection = this.getById(id);
+            String classIds = inspection.getClassIds();
+            BaseClass baseClass = baseClassMapper.selectById(classIds);
+            User user = userService.getById(baseClass.getTeacherId());
+            String wechatTemplate = "Xb21V8au0Ur9puQs4hIDJTl8LP6GTgVOHQtOeie1Oco";
+
+            WeChatSendMessageDto weChatSendMessageDto = new WeChatSendMessageDto();
+            weChatSendMessageDto.setUserId(user.getOpenId());
+            weChatSendMessageDto.setTemplateId(wechatTemplate);
+            weChatSendMessageDto.setMsgId(IdUtil.getSnowflakeNextId() + "");
+
+            JSONObject data = new JSONObject();
+            String thing4 = "";
+            String thing1 = "";
+            if(AssessmentTypeEnum.CLASS.getCode().equals(inspection.getAssessmentType())){
+                data.put("const3", new JSONObject() {{
+                    put("value", AssessmentTypeEnum.CLASS.getValue());
+                }});
+
+                BaseStudentAssessmentProject project = projectMapper.selectById(inspection.getBaseStudentAssessmentProjectId());
+                thing4 = project.getName();
+
+            }else if(AssessmentTypeEnum.PERSONAL.getCode().equals(inspection.getAssessmentType())){
+                data.put("const3", new JSONObject() {{
+                    put("value", AssessmentTypeEnum.PERSONAL.getValue());
+                }});
+                String[] studentUsers = inspection.getPersonalStudentUserIds().split(",");
+                List<String> studentIds = new ArrayList<>();
+                for (String studentUser : studentUsers) {
+                    studentIds.add(studentUser.trim());
+                }
+                List<User> userList = userService.listByIds(studentIds);
+                for (int i = 0; i < userList.size(); i ++){
+                    if(i > 0){
+                        thing1 += ",";
+                    }
+                    thing1 += userList.get(i).getName();
+                }
+                if(thing1.length() > 20){
+                    thing1 = thing1.substring(0, 16) + "...";
+                }
 
-            BaseStudentAssessmentProject project = projectMapper.selectById(inspection.getBaseStudentAssessmentProjectId());
-            thing4 = project.getName();
+                BaseStudentAssessmentCategory category = categoryMapper.selectById(inspection.getBaseStudentAssessmentCategoryId());
+                thing4 = category.getName();
+            }
+            //得分
+            JSONObject thing4Json = new JSONObject();
+            thing4Json.put("value", thing4);
+            data.put("thing4", thing4Json);
+
+            //学生
+            JSONObject thing1Json = new JSONObject();
+            thing1Json.put("value", thing1);
+            data.put("thing1", thing1Json);
+
+            //得分
+            data.put("character_string5", new JSONObject() {{
+                put("value", inspection.getScore());
+            }});
 
-        }else if(AssessmentTypeEnum.PERSONAL.getCode().equals(inspection.getAssessmentType())){
-            data.put("const3", new JSONObject() {{
-                put("value", AssessmentTypeEnum.PERSONAL.getValue());
+            //考核时间
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
+            data.put("time2", new JSONObject() {{
+                put("value", sdf.format(inspection.getAssessmentDate()));
             }});
-            String[] studentUsers = inspection.getPersonalStudentUserIds().split(",");
-            List<String> studentIds = new ArrayList<>();
-            for (String studentUser : studentUsers) {
-                studentIds.add(studentUser.trim());
-            }
-            List<User> userList = userService.listByIds(studentIds);
-            for (int i = 0; i < userList.size(); i ++){
-                if(i > 0){
-                    thing1 += ",";
-                }
-                thing1 += userList.get(i).getName();
-            }
-            if(thing1.length() > 20){
-                thing1 = thing1.substring(0, 16) + "...";
-            }
 
-            BaseStudentAssessmentCategory category = categoryMapper.selectById(inspection.getBaseStudentAssessmentCategoryId());
-            thing4 = category.getName();
+            weChatSendMessageDto.setContent(data);
+            weChatService.sendTemplateMessage(weChatSendMessageDto);
+            return true;
+        }catch (Exception e){
+            Log.error(e.getMessage(), e);
+            return false;
         }
-        //得分
-        JSONObject thing4Json = new JSONObject();
-        thing4Json.put("value", thing4);
-        data.put("thing4", thing4Json);
-
-        //学生
-        JSONObject thing1Json = new JSONObject();
-        thing1Json.put("value", thing1);
-        data.put("thing1", thing1Json);
-
-        //得分
-        data.put("character_string5", new JSONObject() {{
-            put("value", inspection.getScore());
-        }});
-
-        //考核时间
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日");
-        data.put("time2", new JSONObject() {{
-            put("value", sdf.format(inspection.getAssessmentDate()));
-        }});
-
-        weChatSendMessageDto.setContent(data);
-        weChatService.sendTemplateMessage(weChatSendMessageDto);
-        return true;
     }
 
     @Override

+ 12 - 2
src/main/java/com/xjrsoft/module/student/service/impl/StudentLeaveServiceImpl.java

@@ -26,6 +26,7 @@ import com.xjrsoft.module.student.entity.StudentLeave;
 import com.xjrsoft.module.student.mapper.StudentLeaveMapper;
 import com.xjrsoft.module.student.service.IBaseStudentSchoolRollService;
 import com.xjrsoft.module.student.service.IStudentLeaveService;
+import com.xjrsoft.module.student.vo.NoBackStudentInfoVo;
 import com.xjrsoft.module.student.vo.StudentLeavePageVo;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
@@ -69,8 +70,8 @@ public class StudentLeaveServiceImpl extends MPJBaseServiceImpl<StudentLeaveMapp
         DateTimeFormatter formatter = DateTimeFormatter.ofPattern(outputFormat);
         JsonObject paramJson = new JsonObject();
 
-        paramJson.addProperty("startTime", studentLeave.getStartDate().atStartOfDay().format(formatter));
-        paramJson.addProperty("endTime", studentLeave.getEndDate().atTime(23,59,59).format(formatter));
+        paramJson.addProperty("startTime", studentLeave.getStartDate().toLocalDate().atStartOfDay().format(formatter));
+        paramJson.addProperty("endTime", studentLeave.getEndDate().toLocalDate().atTime(23,59,59).format(formatter));
 
         //组装人员数据
         JsonArray personDatas = new JsonArray();
@@ -212,4 +213,13 @@ public class StudentLeaveServiceImpl extends MPJBaseServiceImpl<StudentLeaveMapp
 
         return resourceInfos;
     }
+
+    public List<NoBackStudentInfoVo> getNoBackStudentInfo(){
+        return this.baseMapper.getNoBackStudentInfo();
+    }
+
+
+    public void updateIsNotice(List<Long> ids) {
+        baseMapper.updateIsNotice(ids);
+    }
 }

+ 45 - 0
src/main/java/com/xjrsoft/module/student/vo/NoBackStudentInfoVo.java

@@ -0,0 +1,45 @@
+package com.xjrsoft.module.student.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+/**
+* @title: 学生请假未归通知
+* @Author dzx
+* @Date: 2024年11月1日
+* @Version 1.0
+*/
+@Data
+public class NoBackStudentInfoVo {
+
+    @ApiModelProperty("主键编号")
+    private Long id;
+
+    @ApiModelProperty("学生id")
+    private Long studentUserId;
+
+    @ApiModelProperty("学生姓名")
+    private String name;
+
+    @ApiModelProperty("请假开始时间")
+    private LocalDateTime startDate;
+
+    @ApiModelProperty("请假结束时间")
+    private LocalDateTime endDate;
+
+    @ApiModelProperty("班级名称")
+    private String className;
+
+    @ApiModelProperty("班主任名称")
+    private String teacherName;
+
+    @ApiModelProperty("班主任openId")
+    private String openId;
+
+    @ApiModelProperty("请假到期时间")
+    private String endDateStr;
+
+
+}

+ 11 - 0
src/main/java/com/xjrsoft/module/teacher/dto/TeacherAwardStatisticsPageDto.java

@@ -4,6 +4,9 @@ import com.xjrsoft.common.page.PageInput;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.time.LocalDate;
 
 
 /**
@@ -24,4 +27,12 @@ public class TeacherAwardStatisticsPageDto extends PageInput {
 
     @ApiModelProperty(value = "部门id")
     private Long deptId;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty("获奖日期-开始")
+    private LocalDate awardDateStart;
+
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty("获奖日期-结束")
+    private LocalDate awardDateEnd;
 }

+ 4 - 0
src/main/java/com/xjrsoft/module/teacher/entity/TeacherAward.java

@@ -11,6 +11,7 @@ import lombok.Data;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
+import java.time.LocalDate;
 import java.util.Date;
 
 
@@ -171,4 +172,7 @@ public class TeacherAward implements Serializable {
      */
     @ApiModelProperty("完整的奖项名称")
     private String wholeCompetitionName;
+
+    @ApiModelProperty("获奖日期")
+    private LocalDate awardDate;
 }

+ 4 - 0
src/main/java/com/xjrsoft/module/teacher/vo/TeacherAwardDetailPageVo.java

@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.math.BigDecimal;
+import java.time.LocalDate;
 import java.util.Date;
 
 /**
@@ -125,4 +126,7 @@ public class TeacherAwardDetailPageVo {
      */
     @ApiModelProperty("是否论文(1:是 0:否)")
     private Integer isThesis;
+
+    @ApiModelProperty("获奖日期")
+    private LocalDate awardDate;
 }

+ 19 - 0
src/main/resources/mapper/student/StudentLeaveMapper.xml

@@ -59,4 +59,23 @@
             )
         </if>
     </select>
+
+    <select id="getNoBackStudentInfo" resultType="com.xjrsoft.module.student.vo.NoBackStudentInfoVo">
+        SELECT t1.id,t1.student_user_id,t2.name,t1.start_date,t1.end_date,t5.name AS class_name,
+        t6.name AS teacher_name,t6.open_id,DATE_FORMAT(t1.end_date, '%Y年%m月%d日 %H:%i') AS end_date_str FROM student_leave t1
+        INNER JOIN xjr_user t2 ON t1.student_user_id = t2.id
+        INNER JOIN xjr_workflow_form_relation t3 ON t3.form_key_value = t1.id
+        LEFT JOIN base_student_school_roll t4 ON t1.student_user_id = t4.user_id
+        LEFT JOIN base_class t5 ON t4.class_id = t5.id
+        LEFT JOIN xjr_user t6 ON t6.id = t5.teacher_id
+        WHERE t1.delete_mark = 0 AND t1.enabled_mark = 1
+        AND t3.current_state = 'COMPLETED' AND t1.is_notice = 0
+        AND NOW() > t1.end_date
+    </select>
+    <update id="updateIsNotice" parameterType="java.lang.Long">
+        update student_leave set is_notice = 1 where id in
+        <foreach item="id" index="index" collection="ids" open="(" close=")" separator=",">
+            #{id}
+        </foreach>
+    </update>
 </mapper>

+ 4 - 0
src/main/resources/mapper/teacher/TeacherAwardItemMapper.xml

@@ -9,6 +9,9 @@
         INNER JOIN teacher_award_item a2 ON a1.teacher_award_item_id = a2.id
         WHERE a1.status = 1 AND a1.delete_mark = 0 AND a2.delete_mark = 0
         AND a1.applicant_user_id = t1.id
+        <if test="dto.awardDateStart != null and dto.awardDateEnd != null">
+            and a1.award_date between #{dto.awardDateStart} and #{dto.awardDateEnd}
+        </if>
         ) AS score FROM xjr_user t1
         INNER JOIN base_teacher t2 ON t1.id = t2.user_id
         left join xjr_user_dept_relation t4 on t4.user_id = t1.id
@@ -23,5 +26,6 @@
         <if test="dto.deptId != null">
             and t4.dept_id = #{dto.deptId}
         </if>
+
     </select>
 </mapper>