5
0

2 Commits b8ab668343 ... 6cc86abd37

Autor SHA1 Mensaje Fecha
  brealinxx 6cc86abd37 Merge branch 'dev' of https://git.yingcaibx.com/tl/api into dev hace 5 meses
  brealinxx a7879faf81 考勤sql修改 hace 5 meses

+ 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);
         }
     }