浏览代码

考勤sql修改

brealinxx 5 月之前
父节点
当前提交
a7879faf81
共有 1 个文件被更改,包括 13 次插入6 次删除
  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);
         }
     }