فهرست منبع

学生考勤接口调整

dzx 1 سال پیش
والد
کامیت
bcaea2fd03

+ 7 - 4
src/main/java/com/xjrsoft/module/attendance/controller/StudentStatisticsController.java

@@ -1,6 +1,7 @@
 package com.xjrsoft.module.attendance.controller;
 
 import cn.dev33.satoken.annotation.SaCheckPermission;
+import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -9,6 +10,7 @@ import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
 import com.xjrsoft.module.attendance.dto.AttendanceStatisticDto;
+import com.xjrsoft.module.attendance.dto.StudentDetailsDto;
 import com.xjrsoft.module.attendance.vo.ClassStatisticsVo;
 import com.xjrsoft.module.attendance.vo.StudentStatisticsPageVo;
 import com.xjrsoft.module.base.entity.BaseClass;
@@ -136,14 +138,18 @@ public class StudentStatisticsController {
     @GetMapping(value = "/student-details")
     @ApiOperation(value="学生考勤")
     @SaCheckPermission("statistics:detail")
-    public RT<PageOutput<StudentStatisticsPageVo>> studentDetails(@Valid AttendanceStatisticDto dto){
+    public RT<PageOutput<StudentStatisticsPageVo>> studentDetails(@Valid StudentDetailsDto dto){
         MPJLambdaWrapper<User> queryUser = new MPJLambdaWrapper<>();
         queryUser.disableSubLogicDel().distinct()
+                .like(StrUtil.isNotEmpty(dto.getName()), User::getName, dto.getName())
+                .like(StrUtil.isNotEmpty(dto.getCredentialNumber()), User::getCredentialNumber, dto.getCredentialNumber())
+                .eq(StrUtil.isNotEmpty(dto.getStduyStatus()), BaseStudentSchoolRoll::getStduyStatus, dto.getStduyStatus())
                 .selectAs(BaseClass::getName, StudentStatisticsPageVo::getClassName)
                 .select("t3.name", StudentStatisticsPageVo::getTeacherName)
                 .selectAs(User::getName, StudentStatisticsPageVo::getStudentName)
                 .selectAs(User::getId, StudentStatisticsPageVo::getUserId)
                 .selectAs(DictionaryDetail::getName, StudentStatisticsPageVo::getStduyStatusCn)
+                .selectAs(User::getCredentialNumber, StudentStatisticsPageVo::getCredentialNumber)
                 .innerJoin(BaseStudentSchoolRoll.class, BaseStudentSchoolRoll::getUserId, User::getId)
                 .innerJoin(BaseClass.class, BaseClass::getId, BaseStudentSchoolRoll::getClassId)
                 .leftJoin(User.class, User::getId, BaseClass::getTeacherId)
@@ -165,9 +171,6 @@ public class StudentStatisticsController {
                 startTime = queryDate.atTime(0, 0, 0);
                 endTime = queryDate.atTime(23, 59, 59);
             }
-            LocalDateTime lastSundayStart = startTime.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY)).plusDays(-1);
-            LocalDateTime lastSundayEnd = endTime.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY)).plusDays(-1);
-
             //查询当前时间段存在请假的学生
             Map<Long, StudentLeave> leaveList = studentLeaveService.getLeaveList(startTime, endTime);
             //查询进入记录

+ 26 - 0
src/main/java/com/xjrsoft/module/attendance/dto/StudentDetailsDto.java

@@ -0,0 +1,26 @@
+package com.xjrsoft.module.attendance.dto;
+
+import com.xjrsoft.common.page.PageInput;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class StudentDetailsDto extends PageInput {
+
+    @ApiModelProperty("时间段(1:上午 2:下午)")
+    private Integer timePeriod;
+
+    @ApiModelProperty("查询时间")
+    private String date;
+
+    @ApiModelProperty("姓名")
+    private String name;
+
+    @ApiModelProperty("证件号码")
+    private String credentialNumber;
+
+    @ApiModelProperty("就读方式")
+    private String stduyStatus;
+}

+ 1 - 1
src/main/java/com/xjrsoft/module/outint/entity/StudentOutInRecord.java

@@ -95,7 +95,7 @@ public class StudentOutInRecord implements Serializable {
     * 人脸照片
     */
     @ApiModelProperty("人脸照片")
-    private Long facePhoto;
+    private String facePhoto;
     /**
     * 进出状态(0:进 1:出)
     */