|
@@ -47,11 +47,13 @@ public class Out_In_RecordUtil {
|
|
|
db.execute(sql);
|
|
|
}
|
|
|
|
|
|
- private void vehicleInsertRecord(Db db, Long carMessageApplyId, String recordTime, int releaseReason, int category, String facePhoto, int status, String planNo, String crossRecordSyscode, int releaseResult, int releaseWay) throws SQLException {
|
|
|
- String sql = "INSERT INTO car_out_in_record(create_date, car_message_apply_id, record_time, face_photo, status,release_reason, plan_no, cross_record_syscode, release_result, release_way, category,delete_mark,enabled_mark) " +
|
|
|
+ private void vehicleInsertRecord(Db db, 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) throws SQLException {
|
|
|
+ String sql = "INSERT INTO car_out_in_record(create_date, car_message_apply_id, record_time, face_photo, status,release_reason, plan_no, " +
|
|
|
+ "cross_record_syscode, release_result, release_way, vehicle_type, phone, name, category,delete_mark,enabled_mark) " +
|
|
|
"VALUES(now(), '" + carMessageApplyId + "', '" +
|
|
|
recordTime + "', '" + facePhoto + "', '" + status + "', '" + releaseReason + "', '" + planNo + "', '" +
|
|
|
- crossRecordSyscode + "', '" + releaseResult + "', '" + releaseWay + "', '" + category + "',0,1)";
|
|
|
+ crossRecordSyscode + "', '" + releaseResult + "', '" + releaseWay + "', '" + vehicleType + "', '" + phone + "', '" + name + "', '" + category + "',0,1)";
|
|
|
db.execute(sql);
|
|
|
}
|
|
|
|
|
@@ -385,11 +387,21 @@ public class Out_In_RecordUtil {
|
|
|
releaseReasonInt = item.get("releaseReason").isJsonNull() ? null : item.get("releaseReason").getAsInt();
|
|
|
}
|
|
|
|
|
|
+ int vehicleType = item.get("vehicleType").isJsonNull() ? null : item.get("vehicleType").getAsInt();
|
|
|
String crossRecordSyscode = item.get("crossRecordSyscode").isJsonNull() ? null : item.get("crossRecordSyscode").getAsString();
|
|
|
String plateNo = item.get("plateNo").isJsonNull() ? null : item.get("plateNo").getAsString();
|
|
|
String eventTime = item.get("crossTime").isJsonNull() ? null : ChangeTime(item.get("crossTime").getAsString());
|
|
|
|
|
|
int status = item.get("vehicleOut").isJsonNull() ? null : item.get("vehicleOut").getAsInt();
|
|
|
+ int statusInt = 0;
|
|
|
+ switch (status){
|
|
|
+ case 0:
|
|
|
+ statusInt = 1;
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ statusInt = 0;
|
|
|
+ break;
|
|
|
+ }
|
|
|
|
|
|
JsonElement facePicUriElement = item.get("facePicUri");
|
|
|
String facePicUri;
|
|
@@ -400,9 +412,20 @@ public class Out_In_RecordUtil {
|
|
|
}
|
|
|
System.out.println(facePicUri + "haha");
|
|
|
|
|
|
+ String phone = faceImportMapper.GetPhoneNumberByPlanNum(plateNo);
|
|
|
+ if (phone == null){
|
|
|
+ phone = faceImportMapper.GetPhoneNumberByPlanNumView(plateNo);
|
|
|
+ }
|
|
|
+
|
|
|
+ String name = faceImportMapper.GetNameByPlanNum(plateNo);
|
|
|
+ if (name == null){
|
|
|
+ name = faceImportMapper.GetNameByPlanNumView(plateNo);
|
|
|
+ }
|
|
|
+
|
|
|
if(vehicle_id_list.contains(crossRecordSyscode)) continue;
|
|
|
|
|
|
- vehicleInsertRecord(use, carId, eventTime, releaseReasonInt, categoryInt, facePicUri, status, plateNo, crossRecordSyscode, releaseResultInt, releaseWayInt);
|
|
|
+ vehicleInsertRecord(use, carId, eventTime, releaseReasonInt, categoryInt, facePicUri, statusInt, plateNo,
|
|
|
+ crossRecordSyscode, releaseResultInt, releaseWayInt, vehicleType, phone, name);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -498,6 +521,7 @@ public class Out_In_RecordUtil {
|
|
|
}
|
|
|
|
|
|
String carAttributeName = dataObject.get("carAttributeName").getAsString().trim();
|
|
|
+ int vehicleType = dataObject.get("vehicleType").getAsInt();
|
|
|
int category = -1;
|
|
|
switch (carAttributeName){
|
|
|
case "临时车":
|
|
@@ -515,10 +539,29 @@ public class Out_In_RecordUtil {
|
|
|
}
|
|
|
|
|
|
int status = eventObject.get("status").getAsInt();
|
|
|
+ int statusInt = 0;
|
|
|
+ switch (status){
|
|
|
+ case 0:
|
|
|
+ statusInt = 1;
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ statusInt = 0;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ String phone = faceImportMapper.GetPhoneNumberByPlanNum(carNum);
|
|
|
+ if (phone == null){
|
|
|
+ phone = faceImportMapper.GetPhoneNumberByPlanNumView(carNum);
|
|
|
+ }
|
|
|
+
|
|
|
+ String name = faceImportMapper.GetNameByPlanNum(carNum);
|
|
|
+ if (name == null){
|
|
|
+ name = faceImportMapper.GetNameByPlanNumView(carNum);
|
|
|
+ }
|
|
|
|
|
|
if (vehicle_id_list.contains(eventIndex)) continue;
|
|
|
|
|
|
- vehicleInsertRecord(use, carId, eventTime, releaseReasonInt, category, ApiUtil.GetRedirectURL(facePicUri), status, carNum, eventIndex, releaseResultInt, releaseWayInt);
|
|
|
+ vehicleInsertRecord(use, carId, eventTime, releaseReasonInt, category, ApiUtil.GetRedirectURL(facePicUri), statusInt, carNum, eventIndex, releaseResultInt, releaseWayInt,vehicleType,phone,name);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
log.info(String.valueOf(e));
|