|
@@ -12,16 +12,14 @@ import com.xjrsoft.module.attendance.entity.AttendanceRuleDetails;
|
|
|
import com.xjrsoft.module.teacher.mapper.FaceImportMapper;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.sql.Types;
|
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.Objects;
|
|
|
+import java.util.*;
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
|
|
|
|
|
@@ -65,7 +63,7 @@ public class OutInRecordUtil {
|
|
|
}
|
|
|
|
|
|
private void vehicleInsertRecord(Long carMessageApplyId, String recordTime, int releaseReason, int category, String facePhoto, int status, String planNo, String crossRecordSyscode,
|
|
|
- int releaseResult, int releaseWay, int vehicleType, String phone, String name){
|
|
|
+ int releaseResult, int releaseWay, int vehicleType, String phone, String name){
|
|
|
String phoneValue = (phone != null && !phone.equals("null")) ? phone : "";
|
|
|
String nameValue = (name != null && !name.equals("null")) ? name : "";
|
|
|
String photoValue = (facePhoto != null && !facePhoto.equals("null")) ? facePhoto : "";
|
|
@@ -95,16 +93,17 @@ public class OutInRecordUtil {
|
|
|
if(carMessageApplyId != 0){
|
|
|
String selectTable = "car_message_apply";
|
|
|
Entity selectWhere = Entity.create(selectTable);
|
|
|
- selectWhere.set("car_message_apply_id", carMessageApplyId);
|
|
|
- selectWhere.set("plan_no", planNo);
|
|
|
+ selectWhere.set("id", carMessageApplyId);
|
|
|
+ selectWhere.set("car_number", planNo);
|
|
|
Map<String, Object> objectMap = SqlRunnerAdapter.db().dynamicSelectOne(selectTable, selectWhere);
|
|
|
Long userId = Long.parseLong(objectMap.get("user_id").toString());
|
|
|
- LocalDateTime recordTimeDate = LocalDateTime.parse(recordTime);
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
+ LocalDateTime recordTimeDate = LocalDateTime.parse(recordTime, formatter);
|
|
|
String attendanceStatus = discernTeacherStatus(recordTimeDate, status, userId);
|
|
|
|
|
|
String updSql = "UPDATE attendance_user_relation SET " +
|
|
|
"attendance_status = '" + attendanceStatus + "', attendance_time = '" + recordTime + "' " +
|
|
|
- "WHERE user_id = '" + userId + "', attendance_mode = '车辆', car_number = '" + planNo + "' AND delete_mark = 0";
|
|
|
+ "WHERE user_id = '" + userId + "' AND attendance_mode = '车辆' AND car_number = '" + planNo + "' AND delete_mark = 0";
|
|
|
SqlRunnerAdapter.db().update(updSql);
|
|
|
}
|
|
|
}
|
|
@@ -430,8 +429,8 @@ public class OutInRecordUtil {
|
|
|
JsonObject paramJson = new JsonObject();
|
|
|
paramJson.addProperty("pageNo", pageNo.getAndIncrement());
|
|
|
paramJson.addProperty("pageSize", pageSize);
|
|
|
-// paramJson.addProperty("startTime", "2024-06-18T00:00:00+08:00");
|
|
|
-// paramJson.addProperty("endTime", "2024-06-19T16:00:00+08:00");
|
|
|
+// paramJson.addProperty("startTime", "2024-06-20T00:00:00+08:00");
|
|
|
+// paramJson.addProperty("endTime", "2024-06-21T16:00:00+08:00");
|
|
|
|
|
|
String response = apiUtil.doPost(apiPath, String.valueOf(paramJson), null);
|
|
|
JsonElement responseElement = new Gson().fromJson(response, JsonElement.class);
|