From 79795e34dd1e0259815b67c2d3468caef1054137 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E4=B8=87=E9=87=8C?= <7374215+wanli_yang@user.noreply.gitee.com> Date: Tue, 14 Feb 2023 16:27:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E8=AE=BE=E5=A4=87=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/BaseCarController.java | 17 ++++++++++++-- .../ruoyi/basetyre/mapper/BaseCarMapper.java | 2 ++ .../basetyre/service/IBaseCarService.java | 8 +++++++ .../service/impl/BaseCarServiceImpl.java | 5 +++++ .../mapper/basetyre/BaseCarMapper.xml | 22 ++++++++++++++++++- .../mapper/basetyre/BaseDeviceMapper.xml | 2 +- ruoyi-ui/src/views/basecar/car/index.vue | 13 +++++------ 7 files changed, 58 insertions(+), 11 deletions(-) diff --git a/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/controller/BaseCarController.java b/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/controller/BaseCarController.java index b851632..61907ba 100644 --- a/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/controller/BaseCarController.java +++ b/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/controller/BaseCarController.java @@ -6,8 +6,10 @@ import javax.validation.Valid; import com.ruoyi.basetyre.domain.BaseCarQueue; import com.ruoyi.basetyre.domain.BaseCarType; +import com.ruoyi.basetyre.domain.BaseDevice; import com.ruoyi.basetyre.service.IBaseCarQueueService; import com.ruoyi.basetyre.service.IBaseCarTypeService; +import com.ruoyi.basetyre.service.IBaseDeviceService; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -43,7 +45,8 @@ public class BaseCarController extends BaseController private IBaseCarQueueService baseCarQueueService; @Autowired private IBaseCarTypeService baseCarTypeService; - + @Autowired + private IBaseDeviceService baseDeviceService; /** * 查询车辆基础信息列表 */ @@ -52,7 +55,7 @@ public class BaseCarController extends BaseController public TableDataInfo list(BaseCar baseCar) { startPage(); - List list = baseCarService.selectBaseCarList(baseCar); + List list = baseCarService.queryList(baseCar); return getDataTable(list); } @@ -128,4 +131,14 @@ public class BaseCarController extends BaseController ajaxResult.put("CarTypeList",baseCarTypeList); return ajaxResult; } + + @GetMapping("/getDeviceList") + public TableDataInfo getDeviceList(String deviceId){ + BaseDevice baseDevice = new BaseDevice(); + baseDevice.setState((long) 0); + baseDevice.setInternetThingsNo(deviceId); + List baseDeviceList = baseDeviceService.selectBaseDeviceList(baseDevice); + return getDataTable(baseDeviceList); + } + } diff --git a/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/mapper/BaseCarMapper.java b/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/mapper/BaseCarMapper.java index bad3214..606c367 100644 --- a/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/mapper/BaseCarMapper.java +++ b/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/mapper/BaseCarMapper.java @@ -58,4 +58,6 @@ public interface BaseCarMapper * @return 结果 */ public int deleteBaseCarByIds(String[] ids); + + List queryList(BaseCar baseCar); } diff --git a/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/service/IBaseCarService.java b/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/service/IBaseCarService.java index 8a604a8..dd49c8e 100644 --- a/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/service/IBaseCarService.java +++ b/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/service/IBaseCarService.java @@ -27,6 +27,14 @@ public interface IBaseCarService */ public List selectBaseCarList(BaseCar baseCar); + /** + * + * @param baseCar + * @return + */ + + public List queryList(BaseCar baseCar); + /** * 新增车辆基础信息 * diff --git a/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/service/impl/BaseCarServiceImpl.java b/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/service/impl/BaseCarServiceImpl.java index 3f606b8..de9f8a0 100644 --- a/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/service/impl/BaseCarServiceImpl.java +++ b/ruoyi-basetyre/src/main/java/com/ruoyi/basetyre/service/impl/BaseCarServiceImpl.java @@ -48,6 +48,11 @@ public class BaseCarServiceImpl implements IBaseCarService return baseCarMapper.selectBaseCarList(baseCar); } + @Override + public List queryList(BaseCar baseCar) { + return baseCarMapper.queryList(baseCar); + } + /** * 新增车辆基础信息 * diff --git a/ruoyi-basetyre/src/main/resources/mapper/basetyre/BaseCarMapper.xml b/ruoyi-basetyre/src/main/resources/mapper/basetyre/BaseCarMapper.xml index 1193226..3ccf932 100644 --- a/ruoyi-basetyre/src/main/resources/mapper/basetyre/BaseCarMapper.xml +++ b/ruoyi-basetyre/src/main/resources/mapper/basetyre/BaseCarMapper.xml @@ -37,10 +37,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select id, company_code, car_queue_id, car_type_id, car_license, car_license_in, car_license_parent, car_id_parent, user_id, user_name, device_id, device_bind_time, first_change_date, trailer_num, is_hand_device, is_has_device, longitude, latitude, tires_total, is_delete, create_time, create_id, create_by, create_name, modify_time, modify_id, modify_by from base_car + +