2 Commits b8ab668343 ... 6cc86abd37

Author SHA1 Message Date
  brealinxx 6cc86abd37 Merge branch 'dev' of https://git.yingcaibx.com/tl/api into dev 5 months ago
  brealinxx a7879faf81 考勤sql修改 5 months ago
1 changed files with 13 additions and 6 deletions
  1. 13 6
      src/main/java/com/xjrsoft/module/hikvision/util/OutInRecordUtil.java

+ 13 - 6
src/main/java/com/xjrsoft/module/hikvision/util/OutInRecordUtil.java

@@ -35,8 +35,10 @@ public class OutInRecordUtil {
         SqlRunnerAdapter.db().insert(sql);
 
         String updSql = "UPDATE attendance_user_relation SET " +
-                "attendance_status = '" + attendanceStatus + "', attendance_time = '" + recordTime + "' " +
-                "WHERE user_id = '" + userId + "', attendance_mode = '人脸' AND delete_mark = 0";
+                "attendance_status = '" + attendanceStatus + "', " +
+                "attendance_time = '" + recordTime + "', " +
+                "attendance_mode = '人脸' " +
+                "WHERE user_id = '" + userId + "' AND delete_mark = 0";
         SqlRunnerAdapter.db().update(updSql);
     }
 
@@ -49,8 +51,10 @@ public class OutInRecordUtil {
         SqlRunnerAdapter.db().insert(sql);
 
         String updSql = "UPDATE attendance_user_relation SET " +
-                "attendance_status = '" + attendanceStatus + "', attendance_time = '" + recordTime + "' " +
-                "WHERE user_id = '" + userId + "', attendance_mode = '人脸' AND delete_mark = 0";
+                "attendance_status = '" + attendanceStatus + "', " +
+                "attendance_time = '" + recordTime + "', " +
+                "attendance_mode = '人脸' " +
+                "WHERE user_id = '" + userId + "' AND delete_mark = 0";
         SqlRunnerAdapter.db().update(updSql);
     }
 
@@ -102,8 +106,11 @@ public class OutInRecordUtil {
             String attendanceStatus = discernTeacherStatus(recordTimeDate, status, userId);
 
             String updSql = "UPDATE attendance_user_relation SET " +
-                    "attendance_status = '" + attendanceStatus + "', attendance_time = '" + recordTime + "' " +
-                    "WHERE user_id = '" + userId + "' AND attendance_mode = '车辆' AND car_number = '" + planNo + "' AND delete_mark = 0";
+                    "attendance_status = '" + attendanceStatus + "', " +
+                    "attendance_time = '" + recordTime + "', " +
+                    "attendance_mode = '车辆', " +
+                    "car_number = '" + planNo + "' " +
+                    "WHERE user_id = '" + userId + "' AND delete_mark = 0";
             SqlRunnerAdapter.db().update(updSql);
         }
     }