Browse Source

签到功能调整

shuzhan 2 năm trước cách đây
mục cha
commit
ec8edaa172

+ 4 - 0
common/src/main/resources/mapper/base/RollcallLog.xml

@@ -130,6 +130,7 @@
 		select cal.rollcall_time rollcallTime
 		from t_rollcall_log cal
 		where cal.student_id=#{studentId} and cal.class_id=#{classId} and date_format(cal.rollcall_time,'%Y-%m-%d')=date_format(#{queryDate},'%Y-%m-%d')
+        and cal.del_if = 0
 	</select>
 
     <select id="findByClassIdAndDateAndResult" resultMap="RollcallLogMap">
@@ -137,6 +138,7 @@
 		from t_rollcall_log cal
 		where cal.class_id=#{classId} and date_format(cal.rollcall_time,'%Y-%m-%d')=date_format(#{queryDate},'%Y-%m-%d')
 		and cal.rollcall_result = #{result}
+        and cal.del_if = 0
 	</select>
 
     <select id="findBySheetIdAndResult" resultMap="RollcallLogMap">
@@ -144,6 +146,7 @@
         from t_rollcall_log a
         where a.rollcall_result = #{result}
         and a.sheet_id = #{sheetId}
+        and a.del_if = 0
     </select>
 
     <select id="findByStudentIdAndSheetId" resultMap="RollcallLogMap">
@@ -151,6 +154,7 @@
 		from t_rollcall_log a
 		where a.student_id = #{studentId}
 		and a.sheet_id = #{sheetId}
+        and a.del_if = 0
 		limit 1
 	</select>
     <select id="monthRollCallLogStatistical" resultType="java.util.HashMap">

+ 5 - 5
web/src/main/java/com/jpsoft/education/modules/mobile/controller/TeacherApiController.java

@@ -119,19 +119,19 @@ public class TeacherApiController {
                 ss.setStudentNum(buyLogList.size());
 
                 //点名结果:1正常出勤、2请假、3旷课,4补课,5停课
-                List<RollcallLog> dkList = rollcallLogService.findByClassIdAndDateAndResult(ss.getClassId(),ss.getCourseDate(),"1");
+                List<RollcallLog> dkList = rollcallLogService.findBySheetIdAndResult(ss.getSheetId(),"1");
                 ss.setDkNum(dkList.size());
 
-                List<RollcallLog> qjList = rollcallLogService.findByClassIdAndDateAndResult(ss.getClassId(),ss.getCourseDate(),"2");
+                List<RollcallLog> qjList = rollcallLogService.findBySheetIdAndResult(ss.getSheetId(),"2");
                 ss.setQjNum(qjList.size());
 
-                List<RollcallLog> kkList = rollcallLogService.findByClassIdAndDateAndResult(ss.getClassId(),ss.getCourseDate(),"3");
+                List<RollcallLog> kkList = rollcallLogService.findBySheetIdAndResult(ss.getSheetId(),"3");
                 ss.setKkNum(kkList.size());
 
-                List<RollcallLog> bkList = rollcallLogService.findByClassIdAndDateAndResult(ss.getClassId(),ss.getCourseDate(),"4");
+                List<RollcallLog> bkList = rollcallLogService.findBySheetIdAndResult(ss.getSheetId(),"4");
                 ss.setBkNum(bkList.size());
 
-                List<RollcallLog> tkList = rollcallLogService.findByClassIdAndDateAndResult(ss.getClassId(),ss.getCourseDate(),"5");
+                List<RollcallLog> tkList = rollcallLogService.findBySheetIdAndResult(ss.getSheetId(),"5");
                 ss.setTkNum(tkList.size());
             }