|
@@ -42,7 +42,7 @@ public class SmartCarAccessServiceImpl extends ServiceImpl<SmartCarAccessMapper,
|
|
|
private Integer page = 0;
|
|
private Integer page = 0;
|
|
|
private Integer size = 20;
|
|
private Integer size = 20;
|
|
|
|
|
|
|
|
- @Scheduled(cron = "0 45 * * * ? ")
|
|
|
|
|
|
|
+ @Scheduled(cron = "0 42 * * * ? ")
|
|
|
@Async
|
|
@Async
|
|
|
public void car() {
|
|
public void car() {
|
|
|
if(scheduleConfig.getIsOpen().equals("1")) {
|
|
if(scheduleConfig.getIsOpen().equals("1")) {
|
|
@@ -82,6 +82,8 @@ public class SmartCarAccessServiceImpl extends ServiceImpl<SmartCarAccessMapper,
|
|
|
String startData = stateTime.format(dateTimeFormatter1);
|
|
String startData = stateTime.format(dateTimeFormatter1);
|
|
|
String endData = endTime.format(dateTimeFormatter1);
|
|
String endData = endTime.format(dateTimeFormatter1);
|
|
|
|
|
|
|
|
|
|
+ startData="2024-03-01 00:00:00";
|
|
|
|
|
+
|
|
|
// 开始时间
|
|
// 开始时间
|
|
|
jsonObject.put("startTime", startData);
|
|
jsonObject.put("startTime", startData);
|
|
|
// jsonObject.put("startTime", "2024-06-26 00:00:00");
|
|
// jsonObject.put("startTime", "2024-06-26 00:00:00");
|
|
@@ -124,17 +126,20 @@ public class SmartCarAccessServiceImpl extends ServiceImpl<SmartCarAccessMapper,
|
|
|
String enterTime = data.getString("enterTime");
|
|
String enterTime = data.getString("enterTime");
|
|
|
// 入口车道名称
|
|
// 入口车道名称
|
|
|
String enterGateName = data.getString("enterGateName");
|
|
String enterGateName = data.getString("enterGateName");
|
|
|
|
|
+// 图片
|
|
|
|
|
+ String enterImgPath = data.getString("enterImgPath");
|
|
|
|
|
|
|
|
smartCarAccess.setIndexId(indexId);
|
|
smartCarAccess.setIndexId(indexId);
|
|
|
smartCarAccess.setType("1");
|
|
smartCarAccess.setType("1");
|
|
|
smartCarAccess.setCarNo(carNo);
|
|
smartCarAccess.setCarNo(carNo);
|
|
|
- smartCarAccess.setEnterTime(enterTime);
|
|
|
|
|
- smartCarAccess.setEnterGateName(enterGateName);
|
|
|
|
|
|
|
+ smartCarAccess.setDataTime(enterTime);
|
|
|
|
|
+ smartCarAccess.setCarGateName(enterGateName);
|
|
|
|
|
+ smartCarAccess.setImage(enterImgPath);
|
|
|
|
|
|
|
|
// 判断是否已经添加
|
|
// 判断是否已经添加
|
|
|
LambdaQueryWrapper<SmartCarAccess> wrapper = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<SmartCarAccess> wrapper = new LambdaQueryWrapper<>();
|
|
|
wrapper.eq(SmartCarAccess::getCarNo,carNo)
|
|
wrapper.eq(SmartCarAccess::getCarNo,carNo)
|
|
|
- .eq(SmartCarAccess::getEnterTime, enterTime);
|
|
|
|
|
|
|
+ .eq(SmartCarAccess::getDataTime, enterTime);
|
|
|
List<SmartCarAccess> list = this.list(wrapper);
|
|
List<SmartCarAccess> list = this.list(wrapper);
|
|
|
|
|
|
|
|
if (ObjectUtils.isEmpty(list) && list.size() <= 0) {
|
|
if (ObjectUtils.isEmpty(list) && list.size() <= 0) {
|
|
@@ -179,6 +184,7 @@ public class SmartCarAccessServiceImpl extends ServiceImpl<SmartCarAccessMapper,
|
|
|
String startData = stateTime.format(dateTimeFormatter1);
|
|
String startData = stateTime.format(dateTimeFormatter1);
|
|
|
String endData = endTime.format(dateTimeFormatter1);
|
|
String endData = endTime.format(dateTimeFormatter1);
|
|
|
|
|
|
|
|
|
|
+ startData="2024-03-01 00:00:00";
|
|
|
|
|
|
|
|
// 开始时间
|
|
// 开始时间
|
|
|
jsonObject.put("startTime", startData);
|
|
jsonObject.put("startTime", startData);
|
|
@@ -216,24 +222,54 @@ public class SmartCarAccessServiceImpl extends ServiceImpl<SmartCarAccessMapper,
|
|
|
String carNo = data.getString("carNo");
|
|
String carNo = data.getString("carNo");
|
|
|
// 入场时间
|
|
// 入场时间
|
|
|
String enterTime = data.getString("enterTime");
|
|
String enterTime = data.getString("enterTime");
|
|
|
|
|
+// 出场时间
|
|
|
|
|
+ String outTime = data.getString("outTime");
|
|
|
|
|
+
|
|
|
// 入口车道名称
|
|
// 入口车道名称
|
|
|
String enterGateName = data.getString("enterGateName");
|
|
String enterGateName = data.getString("enterGateName");
|
|
|
|
|
+// 出口车道名称
|
|
|
|
|
+ String outOperatorName = data.getString("outGateName");
|
|
|
|
|
+
|
|
|
|
|
+ //图片
|
|
|
|
|
+ String outImgPath = data.getString("outImgPath");
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
smartCarAccess.setIndexId(indexId);
|
|
smartCarAccess.setIndexId(indexId);
|
|
|
smartCarAccess.setType("2");
|
|
smartCarAccess.setType("2");
|
|
|
smartCarAccess.setCarNo(carNo);
|
|
smartCarAccess.setCarNo(carNo);
|
|
|
- smartCarAccess.setEnterTime(enterTime);
|
|
|
|
|
- smartCarAccess.setEnterGateName(enterGateName);
|
|
|
|
|
|
|
+ smartCarAccess.setDataTime(outTime);
|
|
|
|
|
+ smartCarAccess.setCarGateName(outOperatorName);
|
|
|
|
|
+ smartCarAccess.setImage(outImgPath);
|
|
|
|
|
|
|
|
// 判断是否已经添加
|
|
// 判断是否已经添加
|
|
|
LambdaQueryWrapper<SmartCarAccess> wrapper = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<SmartCarAccess> wrapper = new LambdaQueryWrapper<>();
|
|
|
wrapper.eq(SmartCarAccess::getCarNo,carNo)
|
|
wrapper.eq(SmartCarAccess::getCarNo,carNo)
|
|
|
- .eq(SmartCarAccess::getEnterTime,enterTime);
|
|
|
|
|
|
|
+ .eq(SmartCarAccess::getDataTime,outTime);
|
|
|
List<SmartCarAccess> list = this.list(wrapper);
|
|
List<SmartCarAccess> list = this.list(wrapper);
|
|
|
|
|
|
|
|
if (ObjectUtils.isEmpty(list) && list.size() <= 0) {
|
|
if (ObjectUtils.isEmpty(list) && list.size() <= 0) {
|
|
|
this.save(smartCarAccess);
|
|
this.save(smartCarAccess);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ SmartCarAccess enterCar = new SmartCarAccess();
|
|
|
|
|
+ enterCar.setIndexId(indexId);
|
|
|
|
|
+ enterCar.setType("1");
|
|
|
|
|
+ enterCar.setCarNo(carNo);
|
|
|
|
|
+ enterCar.setDataTime(enterTime);
|
|
|
|
|
+ enterCar.setCarGateName(enterGateName);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ // 判断是否已经添加
|
|
|
|
|
+ LambdaQueryWrapper<SmartCarAccess> wrapper2 = new LambdaQueryWrapper<>();
|
|
|
|
|
+ wrapper2.eq(SmartCarAccess::getCarNo,carNo)
|
|
|
|
|
+ .eq(SmartCarAccess::getDataTime,enterTime);
|
|
|
|
|
+ List<SmartCarAccess> list2 = this.list(wrapper2);
|
|
|
|
|
+
|
|
|
|
|
+ if (ObjectUtils.isEmpty(list2) && list2.size() <= 0) {
|
|
|
|
|
+ this.save(enterCar);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|