|
|
@@ -229,7 +229,7 @@ public class VideoIntegrityCheckServiceImpl extends ServiceImpl<VideoIntegrityCh
|
|
|
}
|
|
|
videoIntegrityCheck.setUpdateTime(new Date());
|
|
|
videoIntegrityCheck.setChannelCode(videoIntegrityCheckDto.getChannelCode());
|
|
|
- videoIntegrityCheck.setChannelName(videoIntegrityCheckDto.getChannelName());
|
|
|
+ videoIntegrityCheck.setChannelName(channel.getDeviceName());
|
|
|
videoIntegrityCheck.setCheckSpan(dealSpan(videoIntegrityCheckDto.getCheckSpan()));
|
|
|
videoIntegrityCheck.setEquipmentCode(videoIntegrityCheckDto.getEquipmentCode());
|
|
|
videoIntegrityCheck.setLoseSpan(dealSpan(videoIntegrityCheckDto.getLoseSpan()));
|
|
|
@@ -253,6 +253,9 @@ public class VideoIntegrityCheckServiceImpl extends ServiceImpl<VideoIntegrityCh
|
|
|
//重新转换一次,之前的转换出来有转义符
|
|
|
private String dealSpan(List<String> spanList) {
|
|
|
List<JSONObject> list = new ArrayList<>();
|
|
|
+ if (ObjectUtil.isEmpty(spanList)) {
|
|
|
+ return JSON.toJSONString(list);
|
|
|
+ }
|
|
|
for (String string : spanList) {
|
|
|
Map parse = JSON.parseObject(string, Map.class);
|
|
|
if (parse.get("st") != null && parse.get("et") != null) {
|
|
|
@@ -291,10 +294,16 @@ public class VideoIntegrityCheckServiceImpl extends ServiceImpl<VideoIntegrityCh
|
|
|
JSONArray array = JSON.parseArray(loseSpan);
|
|
|
int min = 0;
|
|
|
for (Object object : array) {
|
|
|
- if (object instanceof String) {
|
|
|
- Map map = JSON.parseObject(object.toString(), Map.class);
|
|
|
+ if (object instanceof JSONObject) {
|
|
|
+ Map map = ((JSONObject) object).toJavaObject(Map.class);
|
|
|
final String st = (String) map.get("st");
|
|
|
final String et = (String) map.get("et");
|
|
|
+ if ("00:00:00".equals(st) && "23:59:59".equals(et)) {
|
|
|
+ min += 1440;
|
|
|
+ }
|
|
|
+ if (st.equals(et)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
final LocalTime startTime = LocalTime.parse(st);
|
|
|
final LocalTime endTime = LocalTime.parse(et);
|
|
|
final long l = ChronoUnit.MINUTES.between(startTime, endTime);
|