fix(smart-cam-car-data): 修复车牌号匹配逻辑

- 将重量数据中的 planNumber替换为 plateNo,以匹配 carInfoMap 中的键
- 更新 CarInfo 对象的 number 字段赋值逻辑
- 修复了车牌号不一致的问题
This commit is contained in:
2025-04-24 21:54:51 +08:00
parent 0623b1006d
commit f51e3a5eb6

View File

@@ -125,9 +125,9 @@ public class SmartCamCarDataService
for (WeightDeviceDataEntity weightDatum : weightData) {
if (carInfoMap.containsKey(weightDatum.getPlanNumber())) {
if (carInfoMap.containsKey(weightDatum.getPlateNo())) {
CompareResult.CarInfo carInfo = carInfoMap.get(weightDatum.getPlanNumber());
CompareResult.CarInfo carInfo = carInfoMap.get(weightDatum.getPlateNo());
if (weightDatum.getYcgbTIme() != null) {
carInfo.setWeightEntryCnt(carInfo.getWeightEntryCnt() + 1);
@@ -139,10 +139,10 @@ public class SmartCamCarDataService
} else {
CompareResult.CarInfo value = new CompareResult.CarInfo();
value.setNumber(weightDatum.getPlanNumber());
value.setNumber(weightDatum.getPlateNo());
value.setWeightEntryCnt(weightDatum.getYcgbTIme() != null ? 1 : 0);
value.setWeightExitCnt(weightDatum.getEcgbTime() != null ? 1 : 0);
carInfoMap.put(weightDatum.getPlanNumber(), value);
carInfoMap.put(weightDatum.getPlateNo(), value);
}
}