|
|
|
@ -17,6 +17,8 @@ import org.springframework.stereotype.Service; |
|
|
|
|
import java.time.LocalDateTime; |
|
|
|
|
import java.time.format.DateTimeFormatter; |
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.HashMap; |
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 说明: |
|
|
|
@ -253,17 +255,26 @@ public class AccessServiceImpl implements AccessService { |
|
|
|
|
for (int i = 0; i < jarrRecords.size(); i++) { |
|
|
|
|
JsonNode rec = jarrRecords.get(i); |
|
|
|
|
int recordtype = rec.get("记录类型").asInt(); |
|
|
|
|
String info = ""; |
|
|
|
|
info += String.format("索引位 = %d,", rec.get("索引位").asInt()); |
|
|
|
|
info += String.format("时间 = %s,", rec.get("时间").asText()); |
|
|
|
|
info += String.format("描述 = %s,", rec.get("描述").asText()); |
|
|
|
|
info += String.format("卡号 = %d,", rec.get("卡号").asLong()); |
|
|
|
|
info += String.format("门号 = %d,", rec.get("门号").asInt()); |
|
|
|
|
info += String.format("进出 = %s,", rec.get("进出").asText()); |
|
|
|
|
info += String.format("有效 = %s,", rec.get("有效").asText()); |
|
|
|
|
|
|
|
|
|
if (!info.isEmpty()) |
|
|
|
|
arrSwipeRecords.add(info); |
|
|
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
|
|
map.put("sn",rec.get("索引位").asInt()); |
|
|
|
|
map.put("time",rec.get("时间").asText()); |
|
|
|
|
map.put("describe",rec.get("描述").asText()); |
|
|
|
|
map.put("idCard",rec.get("卡号").asLong()); |
|
|
|
|
map.put("doorId", rec.get("门号").asInt()); |
|
|
|
|
map.put("inOut",rec.get("进出").asText()); |
|
|
|
|
map.put("effective",rec.get("有效").asText()); |
|
|
|
|
// String info = "";
|
|
|
|
|
// info += String.format("索引位 = %d,", rec.get("索引位").asInt());
|
|
|
|
|
// info += String.format("时间 = %s,", rec.get("时间").asText());
|
|
|
|
|
// info += String.format("描述 = %s,", rec.get("描述").asText());
|
|
|
|
|
// info += String.format("卡号 = %d,", rec.get("卡号").asLong());
|
|
|
|
|
// info += String.format("门号 = %d,", rec.get("门号").asInt());
|
|
|
|
|
// info += String.format("进出 = %s,", rec.get("进出").asText());
|
|
|
|
|
// info += String.format("有效 = %s,", rec.get("有效").asText());
|
|
|
|
|
//
|
|
|
|
|
arrSwipeRecords.add(map); |
|
|
|
|
// if (!info.isEmpty())
|
|
|
|
|
// arrSwipeRecords.add(info);
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (gotnum < 1000) { |
|
|
|
@ -322,14 +333,14 @@ public class AccessServiceImpl implements AccessService { |
|
|
|
|
throw new RuntimeException(e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
WgWebapi.logInfo("显示最后20条记录...."); |
|
|
|
|
int start = 0; |
|
|
|
|
if (arrSwipeRecords.size()>20){ |
|
|
|
|
start =arrSwipeRecords.size()-20; |
|
|
|
|
} |
|
|
|
|
for (;start<arrSwipeRecords.size(); start++){ |
|
|
|
|
WgWebapi.logInfoWithTime((String) (arrSwipeRecords.get(start)),false); |
|
|
|
|
} |
|
|
|
|
// WgWebapi.logInfo("显示最后20条记录....");
|
|
|
|
|
// int start = 0;
|
|
|
|
|
// if (arrSwipeRecords.size()>20){
|
|
|
|
|
// start =arrSwipeRecords.size()-20;
|
|
|
|
|
// }
|
|
|
|
|
// for (;start<arrSwipeRecords.size(); start++){
|
|
|
|
|
// WgWebapi.logInfoWithTime((String) (arrSwipeRecords.get(start)),false);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
return AjaxResult.success(arrSwipeRecords); |
|
|
|
|