|
@@ -176,13 +176,13 @@ public class AttendanceMessageTask {
|
|
|
.leftJoin(BaseTeacher.class, BaseTeacher::getUserId, XjrUser::getId)
|
|
|
);
|
|
|
//查询进入记录,就是实际到校的人数
|
|
|
- long outInRecords = teachertOutInRecordService.count(
|
|
|
+ List<TeacherOutInRecord> outInRecords = teachertOutInRecordService.list(
|
|
|
new MPJLambdaWrapper<TeacherOutInRecord>()
|
|
|
.le(TeacherOutInRecord::getRecordTime, recentlyTime)
|
|
|
.eq(TeacherOutInRecord::getStatus, 1)
|
|
|
- .eq("DATE_FORMAT(record_time, '%Y-%m-%d')" , recentlyTime.toLocalDate())
|
|
|
- .groupBy(TeacherOutInRecord::getUserId)
|
|
|
+ .eq("DATE_FORMAT(record_time, '%Y-%m-%d')", recentlyTime.toLocalDate())
|
|
|
);
|
|
|
+ List<Long> collect = outInRecords.stream().map(TeacherOutInRecord::getUserId).collect(Collectors.toList());
|
|
|
|
|
|
WeChatSendMessageDto weChatSendMessageDto = new WeChatSendMessageDto();
|
|
|
weChatSendMessageDto.setTemplateId(wechatTemplate);
|
|
@@ -201,7 +201,7 @@ public class AttendanceMessageTask {
|
|
|
paramJson.put("const23", const23);
|
|
|
|
|
|
JSONObject character_string18 = new JSONObject();
|
|
|
- character_string18.put("value", teacherCout - outInRecords);
|
|
|
+ character_string18.put("value", teacherCout - collect.size());
|
|
|
paramJson.put("character_string18", character_string18);
|
|
|
|
|
|
JSONObject character_string16 = new JSONObject();
|