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 + +