bug修复
This commit is contained in:
parent
b85aa415ee
commit
e8a044b1de
@ -219,22 +219,18 @@ public class HikvisionCall {
|
||||
entity.setCarNumber(plateNo);
|
||||
entity.setType(getPassType(carCamera.getPassType()));
|
||||
entity.setPassTime(time);
|
||||
Integer count = carPassRecordMapper.selectCount(new LambdaQueryWrapper<CarPassRecord>()
|
||||
.eq(CarPassRecord::getCarNumber, plateNo)
|
||||
.eq(CarPassRecord::getPassTime, time)
|
||||
);
|
||||
if (count != 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
//车牌
|
||||
JSONObject picUrlJo = dataJo.getJSONObject("picUrl");
|
||||
String svrIndex = dataJo.getString("svrIndex");
|
||||
String vehiclePicUrl = picUrlJo.getString("vehiclePicUrl");
|
||||
String platePicUrl = picUrlJo.getString("platePicUrl");
|
||||
entity.setImageUrl(saveToLocal(getHikvisionEventsPicture(new HikvisionEventsPictureRq(svrIndex, platePicUrl), project.getArtemisConfigHost(), project.getArtemisConfigAppKey(), project.getArtemisConfigAppSecret())));
|
||||
entity.setPanoramaUrl(saveToLocal(getHikvisionEventsPicture(new HikvisionEventsPictureRq(svrIndex, vehiclePicUrl), project.getArtemisConfigHost(), project.getArtemisConfigAppKey(), project.getArtemisConfigAppSecret())));
|
||||
if (StringUtils.isNotBlank(platePicUrl)) {
|
||||
entity.setImageUrl(saveToLocal(getHikvisionEventsPicture(new HikvisionEventsPictureRq(svrIndex, platePicUrl), project.getArtemisConfigHost(), project.getArtemisConfigAppKey(), project.getArtemisConfigAppSecret())));
|
||||
}
|
||||
if (StringUtils.isNotBlank(vehiclePicUrl)) {
|
||||
entity.setPanoramaUrl(saveToLocal(getHikvisionEventsPicture(new HikvisionEventsPictureRq(svrIndex, vehiclePicUrl), project.getArtemisConfigHost(), project.getArtemisConfigAppKey(), project.getArtemisConfigAppSecret())));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -254,7 +250,15 @@ public class HikvisionCall {
|
||||
} else {
|
||||
entity.setIsOpen(0);
|
||||
}
|
||||
carPassRecordMapper.insert(entity);
|
||||
LambdaQueryWrapper<CarPassRecord> queryWrapper = new LambdaQueryWrapper<CarPassRecord>()
|
||||
.eq(CarPassRecord::getCarNumber, plateNo)
|
||||
.eq(CarPassRecord::getPassTime, time);
|
||||
Integer count = carPassRecordMapper.selectCount(queryWrapper);
|
||||
if (count != 0) {
|
||||
carPassRecordMapper.update(entity, queryWrapper);
|
||||
} else {
|
||||
carPassRecordMapper.insert(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user