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