车辆的人员的考勤
This commit is contained in:
parent
b1e32f0946
commit
6f084af0eb
@ -506,7 +506,8 @@ public class HikvisionCall {
|
||||
}
|
||||
carPassRecordMapper.insert(carPassRecord);
|
||||
//车进场后,意味着绑定的司机走过了人脸机,统计为在场人员。车辆出场后,在场人员随之减少
|
||||
if (carInfos.size() != 0 && carInfos.get(0) != null && StringUtils.isNotEmpty(carInfos.get(0).getDriverWorkerId())) {
|
||||
if (carInfos.size() != 0 && carInfos.get(0) != null
|
||||
&& (StringUtils.isNotEmpty(carInfos.get(0).getDriverWorkerId()) || StringUtils.isNotEmpty(carInfos.get(0).getOutsideDriverIdCard()))) {
|
||||
log.info("保存车辆绑定的司机的通行数据,车牌号:{}", carInfos.get(0).getCarNumber());
|
||||
carPassRecordService.saveDriverPassData(carPassRecord, carInfos.get(0));
|
||||
}
|
||||
@ -700,9 +701,6 @@ public class HikvisionCall {
|
||||
log.error("err:", e);
|
||||
return;
|
||||
}
|
||||
if (StringUtils.isBlank(projectParkCode)) {
|
||||
continue;
|
||||
}
|
||||
param.put("parkSyscode", projectParkCode);
|
||||
Integer total = 0;
|
||||
JSONArray listJa = new JSONArray();
|
||||
@ -736,10 +734,10 @@ public class HikvisionCall {
|
||||
log.info("海康车辆相机设备不存在:CameraId:{}", roadwaySyscode);
|
||||
continue;
|
||||
}
|
||||
CarPassRecord entity = new CarPassRecord();
|
||||
entity.setCarNumber(plateNo);
|
||||
entity.setType(getPassType(carCamera.getPassType()));
|
||||
entity.setPassTime(time);
|
||||
CarPassRecord carPassRecord = new CarPassRecord();
|
||||
carPassRecord.setCarNumber(plateNo);
|
||||
carPassRecord.setType(getPassType(carCamera.getPassType()));
|
||||
carPassRecord.setPassTime(time);
|
||||
LambdaQueryWrapper<CarPassRecord> queryWrapper = new LambdaQueryWrapper<CarPassRecord>()
|
||||
.eq(CarPassRecord::getCarNumber, plateNo)
|
||||
.eq(CarPassRecord::getPassTime, time);
|
||||
@ -750,28 +748,34 @@ public class HikvisionCall {
|
||||
}
|
||||
try {
|
||||
//车牌
|
||||
entity.setImageUrl(saveToLocal(getHikvisionEventsPicture(new HikvisionEventsPictureRq(aswSyscode, plateNoPicUri), project.getArtemisConfigHost(), project.getArtemisConfigAppKey(), project.getArtemisConfigAppSecret())));
|
||||
entity.setPanoramaUrl(saveToLocal(getHikvisionEventsPicture(new HikvisionEventsPictureRq(aswSyscode, vehiclePicUri), project.getArtemisConfigHost(), project.getArtemisConfigAppKey(), project.getArtemisConfigAppSecret())));
|
||||
carPassRecord.setImageUrl(saveToLocal(getHikvisionEventsPicture(new HikvisionEventsPictureRq(aswSyscode, plateNoPicUri), project.getArtemisConfigHost(), project.getArtemisConfigAppKey(), project.getArtemisConfigAppSecret())));
|
||||
carPassRecord.setPanoramaUrl(saveToLocal(getHikvisionEventsPicture(new HikvisionEventsPictureRq(aswSyscode, vehiclePicUri), project.getArtemisConfigHost(), project.getArtemisConfigAppKey(), project.getArtemisConfigAppSecret())));
|
||||
} catch (Exception e) {
|
||||
log.error("error:", e);
|
||||
}
|
||||
|
||||
entity.setCarColor(getCarColor(listJo.getInteger("plateColor")));
|
||||
entity.setLocation(carCamera.getCameraName());
|
||||
entity.setProjectSn(carCamera.getProjectSn());
|
||||
entity.setColor(getColor(listJo.getInteger("vehicleColor")));
|
||||
entity.setCameraId(roadwaySyscode);
|
||||
carPassRecord.setCarColor(getCarColor(listJo.getInteger("plateColor")));
|
||||
carPassRecord.setLocation(carCamera.getCameraName());
|
||||
carPassRecord.setProjectSn(carCamera.getProjectSn());
|
||||
carPassRecord.setColor(getColor(listJo.getInteger("vehicleColor")));
|
||||
carPassRecord.setCameraId(roadwaySyscode);
|
||||
List<CarInfo> carInfos = carInfoMapper.selectList(new LambdaQueryWrapper<CarInfo>()
|
||||
.eq(CarInfo::getProjectSn, carCamera.getProjectSn())
|
||||
.eq(CarInfo::getCarNumber, plateNo)
|
||||
.eq(CarInfo::getIsBlack, 0)
|
||||
);
|
||||
if (CollUtil.isNotEmpty(carInfos)) {
|
||||
entity.setIsOpen(1);
|
||||
carPassRecord.setIsOpen(1);
|
||||
} else {
|
||||
entity.setIsOpen(0);
|
||||
carPassRecord.setIsOpen(0);
|
||||
}
|
||||
carPassRecordMapper.insert(carPassRecord);
|
||||
//车进场后,意味着绑定的司机走过了人脸机,统计为在场人员。车辆出场后,在场人员随之减少
|
||||
if (carInfos.size() != 0 && carInfos.get(0) != null
|
||||
&& (StringUtils.isNotEmpty(carInfos.get(0).getDriverWorkerId()) || StringUtils.isNotEmpty(carInfos.get(0).getOutsideDriverIdCard()))) {
|
||||
log.info("保存车辆绑定的司机的通行数据,车牌号:{}", carInfos.get(0).getCarNumber());
|
||||
carPassRecordService.saveDriverPassData(carPassRecord, carInfos.get(0));
|
||||
}
|
||||
carPassRecordMapper.insert(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user