|
|
@@ -34,7 +34,7 @@ public class OutInRecordUtil {
|
|
|
String photoValue = (facePhoto != null && !facePhoto.equals("null")) ? facePhoto : "";
|
|
|
|
|
|
String sql = "INSERT INTO teacher_out_in_record(create_date, user_id, record_time, face_photo, eventId, status,delete_mark,enabled_mark, attendance_status) " +
|
|
|
- "select now(), '" + userId + "', '" + recordTime + "', '" +
|
|
|
+ "select now(), (SELECT source_id FROM hikvision_data WHERE hikvision_id = '" + userId + "' LIMIT 1), '" + recordTime + "', '" +
|
|
|
photoValue + "', '" + eventId + "', '" +status + "',0,1,'" + attendanceStatus + "'" +
|
|
|
" WHERE NOT EXISTS (SELECT 1 FROM teacher_out_in_record WHERE eventId = '" + eventId + "')";
|
|
|
SqlRunnerAdapter.db().insert(sql);
|
|
|
@@ -51,7 +51,7 @@ public class OutInRecordUtil {
|
|
|
String photoValue = (facePhoto != null && !facePhoto.equals("null")) ? facePhoto : "";
|
|
|
|
|
|
String sql = "INSERT INTO student_out_in_record(create_date, user_id, teacher_id, class_id, face_photo, record_time , eventId,status,delete_mark,enabled_mark, attendance_status) " +
|
|
|
- "select now(), " + userId + ", " + teacherId + ", " +
|
|
|
+ "select now(), (SELECT source_id FROM hikvision_data WHERE hikvision_id = '" + userId + "' LIMIT 1), " + teacherId + ", " +
|
|
|
classId + ", '" + photoValue + "', '" + recordTime + "', '" + eventId + "', '" + status + "',0,1,'" + attendanceStatus + "'" +
|
|
|
" WHERE NOT EXISTS (SELECT 1 FROM student_out_in_record WHERE eventId = '" + eventId + "')";
|
|
|
SqlRunnerAdapter.db().insert(sql);
|