|
|
@@ -21,6 +21,7 @@ import com.xjrsoft.module.organization.service.IUserService;
|
|
|
import com.xjrsoft.module.outint.entity.StudentOutInRecord;
|
|
|
import com.xjrsoft.module.outint.service.IStudentOutInRecordService;
|
|
|
import com.xjrsoft.module.outint.vo.StudentOutInRecordVo;
|
|
|
+import com.xjrsoft.module.student.entity.BaseStudentFamily;
|
|
|
import com.xjrsoft.module.student.entity.BaseStudentSchoolRoll;
|
|
|
import com.xjrsoft.module.student.entity.StudentLeave;
|
|
|
import com.xjrsoft.module.student.service.IStudentLeaveService;
|
|
|
@@ -93,9 +94,7 @@ public class StudentStatisticsController {
|
|
|
LocalDateTime lastSundayEnd = endTime.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY)).plusDays(-1);
|
|
|
|
|
|
//查询每个班的走读生实到人数
|
|
|
- Map<Long, List<StudentOutInRecordVo>> notStayMap = studentOutInRecordService.getNotStayList(startTime, endTime, classIds);
|
|
|
- //查询住校生的实到情况
|
|
|
- Map<Long, List<StudentOutInRecordVo>> stayMap = studentOutInRecordService.getStayList(lastSundayStart, lastSundayEnd, classIds);
|
|
|
+ Map<Long, List<StudentOutInRecordVo>> notStayMap = studentOutInRecordService.getList(startTime, endTime, classIds);
|
|
|
|
|
|
//查询各班的请假人数
|
|
|
Map<Long, Integer> classLeaveCount = studentLeaveService.getClassLeaveCount(startTime, endTime);
|
|
|
@@ -106,7 +105,7 @@ public class StudentStatisticsController {
|
|
|
leaveCount = classLeaveCount.get(record.getId());
|
|
|
}
|
|
|
record.setLeaveCount(leaveCount);
|
|
|
- record.setActualCount(notStayMap.get(record.getId()).size() + stayMap.get(record.getId()).size());
|
|
|
+ record.setActualCount(notStayMap.get(record.getId()).size());
|
|
|
|
|
|
Integer lateCount = 0;
|
|
|
for (StudentOutInRecordVo outInRecord : notStayMap.get(record.getId())) {
|
|
|
@@ -117,14 +116,6 @@ public class StudentStatisticsController {
|
|
|
lateCount ++;
|
|
|
}
|
|
|
}
|
|
|
- for (StudentOutInRecordVo outInRecord : stayMap.get(record.getId())) {
|
|
|
- if(outInRecord.getStatus() == 0){
|
|
|
- continue;
|
|
|
- }
|
|
|
- if("迟到".equals(outInRecord.getAttendanceStatus())){
|
|
|
- lateCount ++;
|
|
|
- }
|
|
|
- }
|
|
|
record.setLateCount(lateCount);
|
|
|
|
|
|
//最后通过总人数-实到人数-请假人数计算出缺勤人数
|
|
|
@@ -153,12 +144,15 @@ public class StudentStatisticsController {
|
|
|
.selectAs(BaseClass::getName, StudentStatisticsPageVo::getClassName)
|
|
|
.select("t3.name", StudentStatisticsPageVo::getTeacherName)
|
|
|
.selectAs(User::getName, StudentStatisticsPageVo::getStudentName)
|
|
|
+ .selectAs(User::getMobile, StudentStatisticsPageVo::getMobile)
|
|
|
.selectAs(User::getId, StudentStatisticsPageVo::getUserId)
|
|
|
+ .selectAs(BaseStudentFamily::getTelephone, StudentStatisticsPageVo::getGuardianPhone)
|
|
|
.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)
|
|
|
+ .leftJoin(BaseStudentFamily.class, BaseStudentFamily::getUserId, User::getId)
|
|
|
.leftJoin(DictionaryDetail.class, DictionaryDetail::getCode, BaseStudentSchoolRoll::getStduyStatus);
|
|
|
IPage<StudentStatisticsPageVo> voIPage = xjrUserService.selectJoinListPage(ConventPage.getPage(dto), StudentStatisticsPageVo.class, queryUser);
|
|
|
|