From e0c71e43f22a81c57720c7ab3595564c5a8e3aee Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: 星期二, 31 十月 2023 17:26:44 +0800
Subject: [PATCH] 清淤管理
---
ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdOilWallServiceImpl.java | 5 ++
ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdSyCarLockServiceImpl.java | 8 ++++
ard-work/src/main/java/com/ruoyi/sy/controller/OilWallController.java | 52 +++++--------------------
ard-work/src/main/java/com/ruoyi/sy/service/ArdAccessFenceService.java | 4 ++
ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdAccessFenceServiceImpl.java | 14 +++++++
ard-work/src/main/java/com/ruoyi/sy/controller/ArdSyCarLockController.java | 25 ++++++++++++
ard-work/src/main/java/com/ruoyi/sy/service/ArdOilWallService.java | 1
ard-work/src/main/java/com/ruoyi/sy/gps31/PushClientImplPosition.java | 5 ++
ard-work/src/main/java/com/ruoyi/sy/service/ArdSyCarLockService.java | 1
ard-work/src/main/java/com/ruoyi/sy/domain/ArdAccessFence.java | 2 +
10 files changed, 76 insertions(+), 41 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/sy/controller/ArdSyCarLockController.java b/ard-work/src/main/java/com/ruoyi/sy/controller/ArdSyCarLockController.java
index 2ae1af3..fc95160 100644
--- a/ard-work/src/main/java/com/ruoyi/sy/controller/ArdSyCarLockController.java
+++ b/ard-work/src/main/java/com/ruoyi/sy/controller/ArdSyCarLockController.java
@@ -1,10 +1,14 @@
package com.ruoyi.sy.controller;
import com.alibaba.fastjson.JSONObject;
+import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.sy.domain.ArdAccessFence;
import com.ruoyi.sy.domain.ArdSyCarLock;
import com.ruoyi.sy.domain.ArdSyCarRtu;
import com.ruoyi.sy.domain.ArdSyUser;
+import com.ruoyi.sy.mapper.ArdAccessFenceMapper;
+import com.ruoyi.sy.service.ArdAccessFenceService;
import com.ruoyi.sy.service.ArdSyCarLockService;
import com.ruoyi.sy.service.IArdSyCarService;
import com.ruoyi.sy.service.IArdSyUserService;
@@ -36,6 +40,8 @@
private IArdSyCarService ardSyCarService;
@Autowired
private ArdSyCarLockService ardSyCarLockService;
+ @Autowired
+ private ArdAccessFenceService ardAccessFenceService;
@GetMapping("/car")
@ApiOperation("鏌ヨ鎵�鏈夋湭鎸傞攣鐨勮溅杈�")
@@ -150,4 +156,23 @@
return list;
}
+ @GetMapping("/addCar")
+ @ApiOperation("娓呮筏鎵嬪姩娣诲姞杞﹁締鏌ヨ")
+ public AjaxResult queryCar(){
+ List<ArdAccessFence> ardAccessFences = ardAccessFenceService.all();
+ List<String> carIdList = new ArrayList<>();
+ for (int i = 0; i < ardAccessFences.size(); i++) {
+ String carId = ardAccessFences.get(i).getCarId();
+ carIdList.add(carId);
+ }
+ List<CarVo> list = ardSyCarLockService.queryCar(carIdList);
+ analysis(list);
+ return AjaxResult.success(list);
+ }
+
+ @PostMapping("/addCar")
+ @ApiOperation("娓呮筏鎵嬪姩娣诲姞杞﹁締淇濆瓨")
+ public AjaxResult queryCar(@RequestBody CarVo carVo){
+ return AjaxResult.success(ardAccessFenceService.addCar(carVo));
+ }
}
diff --git a/ard-work/src/main/java/com/ruoyi/sy/controller/OilWallController.java b/ard-work/src/main/java/com/ruoyi/sy/controller/OilWallController.java
index c254d34..7923a60 100644
--- a/ard-work/src/main/java/com/ruoyi/sy/controller/OilWallController.java
+++ b/ard-work/src/main/java/com/ruoyi/sy/controller/OilWallController.java
@@ -4,24 +4,16 @@
import com.github.pagehelper.PageInfo;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.SecurityUtils;
-import com.ruoyi.common.utils.spring.SpringUtils;
import com.ruoyi.common.utils.uuid.UUID;
import com.ruoyi.sy.domain.*;
-import com.ruoyi.sy.mapper.ArdAccessNumMapper;
import com.ruoyi.sy.param.OilWallParam;
import com.ruoyi.sy.service.*;
-import com.ruoyi.sy.service.impl.ArdAccessFenceServiceImpl;
-import com.ruoyi.sy.service.impl.ArdOilWallServiceImpl;
import com.ruoyi.system.service.ISysConfigService;
-import com.ruoyi.utils.gps.GeoTools;
-import com.ruoyi.utils.result.Results;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
-import java.awt.geom.Point2D;
-import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -35,15 +27,6 @@
@Autowired
private ArdOilWallService ardOilWallService;
-
- @Autowired
- private IArdSyCarService carService;
-
- @Autowired
- private IArdSyUserService iArdSyUserService;
-
- @Autowired
- private ISysConfigService sysConfigService;
@Autowired
private ArdAccessFenceService ardAccessFenceService;
@@ -81,8 +64,8 @@
}
@GetMapping("/query")
- @ApiOperation("鏌ヨ鎵�鏈夌數瀛愬洿鏍�")
- public AjaxResult query(OilWallParam oilWallParam){
+ @ApiOperation("鏉′欢鏌ヨ鎵�鏈夌數瀛愬洿鏍忓垎椤�")
+ public AjaxResult queryPage(OilWallParam oilWallParam){
if(oilWallParam.getPageNum()==null || oilWallParam.getPageNum() == 0){
oilWallParam.setPageNum(1);
}
@@ -94,25 +77,16 @@
return AjaxResult.success(new PageInfo<>(list));
}
+ @GetMapping("/query")
+ @ApiOperation("鏌ヨ鎵�鏈夌數瀛愬洿鏍�")
+ public AjaxResult query(){
+ List<ArdOilWall> list = ardOilWallService.all();
+ return AjaxResult.success(list);
+ }
+
@GetMapping("/wallCar")
@ApiOperation("鎵�鏈夎繘鍏ュ洿鏍忕殑杞﹁締")
public AjaxResult wallCar(){
- //鏌ヨ鎵�鏈夊凡鎸傝浇鐨勮溅杈�
- List<ArdSyCar> carList = carService.all();
- //鑾峰彇杞﹁締浣嶇疆
- String usersId = SecurityUtils.getUserId();
- ArdSyUser ardSyUser = iArdSyUserService.userById(usersId);
- String syURL = sysConfigService.getSYURL();
- for (int i = 0; i < carList.size(); i++) {
- String carId = carList.get(i).getCarId();
- carService.getCarGPSBycarId(usersId,carId,syURL,ardSyUser);
- }
- return AjaxResult.success();
- }
-
- @GetMapping("/accessAll")
- @ApiOperation("鏌ヨ鎵�鏈夌數瀛愬洿鏍�")
- public AjaxResult accessAll(){
return AjaxResult.success(ardAccessFenceService.all());
}
@@ -122,15 +96,11 @@
return AjaxResult.success(ardAccessNumService.queryNum());
}
- @GetMapping("/updTime")
+ @PostMapping("/updTime")
@ApiOperation("淇濆瓨鏃堕棿姝ラ暱")
public AjaxResult updTime(@RequestBody ArdAccessNum ardAccessNum){
return AjaxResult.success(ardAccessNumService.add(ardAccessNum));
}
-// @GetMapping("/addCar")
-// @ApiOperation("鎵嬪姩娣诲姞杞﹁締")
-// public AjaxResult addCar(@RequestBody ArdAccessNum ardAccessNum){
-// return AjaxResult.success();
-// }
+
}
diff --git a/ard-work/src/main/java/com/ruoyi/sy/domain/ArdAccessFence.java b/ard-work/src/main/java/com/ruoyi/sy/domain/ArdAccessFence.java
index bb14e25..2f25e20 100644
--- a/ard-work/src/main/java/com/ruoyi/sy/domain/ArdAccessFence.java
+++ b/ard-work/src/main/java/com/ruoyi/sy/domain/ArdAccessFence.java
@@ -20,4 +20,6 @@
private String intoUnloadTime;
private String outShipmentId;
private String outShipmentTime;
+ private String isWarning;
+ private String isDel;
}
diff --git a/ard-work/src/main/java/com/ruoyi/sy/gps31/PushClientImplPosition.java b/ard-work/src/main/java/com/ruoyi/sy/gps31/PushClientImplPosition.java
index 630efeb..0e4fbcf 100644
--- a/ard-work/src/main/java/com/ruoyi/sy/gps31/PushClientImplPosition.java
+++ b/ard-work/src/main/java/com/ruoyi/sy/gps31/PushClientImplPosition.java
@@ -121,6 +121,9 @@
}
}
}else {
+ //濡傛灉杞﹁締鏈夋暟鎹垽鏂槸鍚︽湁杩涘叆鍥存爮ID锛屽鏋滄病鏈夋洿鏂版垨璧嬪�肩粡绾害锛屽垽鏂槸鍚﹁繘鍏ュ洿鏍�
+
+ //濡傛灉鏈夎繘鍏ュ洿鏍廔D锛屽垽鏂槸鍚﹀紑鍑鸿娌圭偣
String out = ardAccessFence.getOutShipmentId();
if(out == null){
//杞﹁締鏈紑鍑鸿娌圭偣
@@ -169,6 +172,8 @@
}
if(isRoad){
//濡傛灉鍦ㄨ矾涓婇渶瑕佽褰曟瘡娆″潗鏍囦笌涓婃鏄惁鐩稿悓锛屽鏋滀竴鏍锋洿鏂板仠鐣欐椂闂�
+
+
}
}else {
//杞﹁締宸茬粡杩涘叆鍗告补鐐癸紝鍒ゆ柇鏄惁宸茬粡寮�鍑哄嵏娌圭偣
diff --git a/ard-work/src/main/java/com/ruoyi/sy/service/ArdAccessFenceService.java b/ard-work/src/main/java/com/ruoyi/sy/service/ArdAccessFenceService.java
index 6291daf..8d752cd 100644
--- a/ard-work/src/main/java/com/ruoyi/sy/service/ArdAccessFenceService.java
+++ b/ard-work/src/main/java/com/ruoyi/sy/service/ArdAccessFenceService.java
@@ -1,6 +1,8 @@
package com.ruoyi.sy.service;
import com.ruoyi.sy.domain.ArdAccessFence;
+import com.ruoyi.sy.param.OilWallParam;
+import com.ruoyi.sy.vo.CarVo;
import java.util.List;
@@ -15,4 +17,6 @@
int delAccess(String carId);
List<ArdAccessFence> all();
+
+ int addCar(CarVo carVo);
}
diff --git a/ard-work/src/main/java/com/ruoyi/sy/service/ArdOilWallService.java b/ard-work/src/main/java/com/ruoyi/sy/service/ArdOilWallService.java
index 3b549c9..4b19d9d 100644
--- a/ard-work/src/main/java/com/ruoyi/sy/service/ArdOilWallService.java
+++ b/ard-work/src/main/java/com/ruoyi/sy/service/ArdOilWallService.java
@@ -15,6 +15,7 @@
int updOilWall(ArdOilWall ardOilWall);
ArdOilWall one(String id);
List<ArdOilWall> query(OilWallParam oilWallParam);
+ List<ArdOilWall> all();
List<ArdOilWall> accessAll();
List<ArdOilWall> uploadAll();
}
diff --git a/ard-work/src/main/java/com/ruoyi/sy/service/ArdSyCarLockService.java b/ard-work/src/main/java/com/ruoyi/sy/service/ArdSyCarLockService.java
index a045f08..841ea2b 100644
--- a/ard-work/src/main/java/com/ruoyi/sy/service/ArdSyCarLockService.java
+++ b/ard-work/src/main/java/com/ruoyi/sy/service/ArdSyCarLockService.java
@@ -34,5 +34,6 @@
RtuVo updRtu(String carId);
int updRtuCar(ArdSyCarRtu ardSyCarRtu);
+ List<CarVo> queryCar(List<String> list);
}
diff --git a/ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdAccessFenceServiceImpl.java b/ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdAccessFenceServiceImpl.java
index 3c34866..1f53ad3 100644
--- a/ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdAccessFenceServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdAccessFenceServiceImpl.java
@@ -3,11 +3,14 @@
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.sy.domain.ArdAccessFence;
import com.ruoyi.sy.mapper.ArdAccessFenceMapper;
+import com.ruoyi.sy.param.OilWallParam;
import com.ruoyi.sy.service.ArdAccessFenceService;
+import com.ruoyi.sy.vo.CarVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
+import java.util.UUID;
@Service
public class ArdAccessFenceServiceImpl implements ArdAccessFenceService {
@@ -52,4 +55,15 @@
return ardAccessFenceMapper.selectList(null);
}
+ @Override
+ public int addCar(CarVo carVo) {
+ ArdAccessFence ardAccessFence = new ArdAccessFence();
+ ardAccessFence.setId(String.valueOf(UUID.randomUUID()));
+ ardAccessFence.setCarId(carVo.getCarId());
+ ardAccessFence.setCarName(carVo.getCarPlate());
+ ardAccessFence.setDeptId(carVo.getDeptId());
+ ardAccessFence.setDeptName(carVo.getDeptName());
+ return ardAccessFenceMapper.insert(ardAccessFence);
+ }
+
}
diff --git a/ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdOilWallServiceImpl.java b/ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdOilWallServiceImpl.java
index ff5e26a..d1a98ea 100644
--- a/ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdOilWallServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdOilWallServiceImpl.java
@@ -48,6 +48,11 @@
}
@Override
+ public List<ArdOilWall> all() {
+ return ardOilWallMapper.selectList(null);
+ }
+
+ @Override
public List<ArdOilWall> accessAll() {
QueryWrapper<ArdOilWall> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("type","1");
diff --git a/ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdSyCarLockServiceImpl.java b/ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdSyCarLockServiceImpl.java
index 631a1d0..9b0600d 100644
--- a/ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdSyCarLockServiceImpl.java
+++ b/ard-work/src/main/java/com/ruoyi/sy/service/impl/ArdSyCarLockServiceImpl.java
@@ -163,6 +163,14 @@
return ardSyCarMapper.updateById(ardSyCar);
}
+ @Override
+ public List<CarVo> queryCar(List<String> list) {
+ QueryWrapper<ArdSyCar> queryWrapper = new QueryWrapper<>();
+ queryWrapper.ne("reserved_1","").ne("car_id",list);
+ List<ArdSyCar> ardSyCars = ardSyCarMapper.selectList(queryWrapper);
+ return carAnalysis(ardSyCars);
+ }
+
public List<CarVo> carAnalysis(List<ArdSyCar> ardSyCars){
List<CarVo> list = new ArrayList<>();
--
Gitblit v1.9.3