Merge remote-tracking branch 'origin/master'

# Conflicts:
#	ruoyi-ui/src/views/basecar/car/index.vue
master
夜笙歌 2 years ago
commit fc7fea0b7a

@ -6,8 +6,10 @@ import javax.validation.Valid;
import com.ruoyi.basetyre.domain.BaseCarQueue; import com.ruoyi.basetyre.domain.BaseCarQueue;
import com.ruoyi.basetyre.domain.BaseCarType; import com.ruoyi.basetyre.domain.BaseCarType;
import com.ruoyi.basetyre.domain.BaseDevice;
import com.ruoyi.basetyre.service.IBaseCarQueueService; import com.ruoyi.basetyre.service.IBaseCarQueueService;
import com.ruoyi.basetyre.service.IBaseCarTypeService; import com.ruoyi.basetyre.service.IBaseCarTypeService;
import com.ruoyi.basetyre.service.IBaseDeviceService;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -43,7 +45,8 @@ public class BaseCarController extends BaseController
private IBaseCarQueueService baseCarQueueService; private IBaseCarQueueService baseCarQueueService;
@Autowired @Autowired
private IBaseCarTypeService baseCarTypeService; private IBaseCarTypeService baseCarTypeService;
@Autowired
private IBaseDeviceService baseDeviceService;
/** /**
* *
*/ */
@ -52,7 +55,7 @@ public class BaseCarController extends BaseController
public TableDataInfo list(BaseCar baseCar) public TableDataInfo list(BaseCar baseCar)
{ {
startPage(); startPage();
List<BaseCar> list = baseCarService.selectBaseCarList(baseCar); List<BaseCar> list = baseCarService.queryList(baseCar);
return getDataTable(list); return getDataTable(list);
} }
@ -128,4 +131,14 @@ public class BaseCarController extends BaseController
ajaxResult.put("CarTypeList",baseCarTypeList); ajaxResult.put("CarTypeList",baseCarTypeList);
return ajaxResult; return ajaxResult;
} }
@GetMapping("/getDeviceList")
public TableDataInfo getDeviceList(String deviceId){
BaseDevice baseDevice = new BaseDevice();
baseDevice.setState((long) 0);
baseDevice.setInternetThingsNo(deviceId);
List<BaseDevice> baseDeviceList = baseDeviceService.selectBaseDeviceList(baseDevice);
return getDataTable(baseDeviceList);
}
} }

@ -58,4 +58,6 @@ public interface BaseCarMapper
* @return * @return
*/ */
public int deleteBaseCarByIds(String[] ids); public int deleteBaseCarByIds(String[] ids);
List<BaseCar> queryList(BaseCar baseCar);
} }

@ -27,6 +27,14 @@ public interface IBaseCarService
*/ */
public List<BaseCar> selectBaseCarList(BaseCar baseCar); public List<BaseCar> selectBaseCarList(BaseCar baseCar);
/**
*
* @param baseCar
* @return
*/
public List<BaseCar> queryList(BaseCar baseCar);
/** /**
* *
* *

@ -48,6 +48,11 @@ public class BaseCarServiceImpl implements IBaseCarService
return baseCarMapper.selectBaseCarList(baseCar); return baseCarMapper.selectBaseCarList(baseCar);
} }
@Override
public List<BaseCar> queryList(BaseCar baseCar) {
return baseCarMapper.queryList(baseCar);
}
/** /**
* *
* *

@ -37,10 +37,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectBaseCarVo"> <sql id="selectBaseCarVo">
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 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
</sql> </sql>
<select id="queryList" parameterType="BaseCar" resultMap="BaseCarResult">
SELECT
bc.id,
bcq.title car_queue_id,
bct.title car_type_id,
bc.car_license,
bc.device_id,
bc.device_bind_time,
bc.create_time,
bc.create_by,
bc.create_name
FROM
base_car bc
LEFT JOIN base_car_queue bcq ON bc.car_queue_id = bcq.id
LEFT JOIN base_car_type bct ON bct.id = bc.car_type_id
<where>
<if test="carLicense != null and carLicense != ''"> and bc.car_license = #{carLicense}</if>
</where>
</select>
<select id="selectBaseCarList" parameterType="BaseCar" resultMap="BaseCarResult"> <select id="selectBaseCarList" parameterType="BaseCar" resultMap="BaseCarResult">
<include refid="selectBaseCarVo"/> <include refid="selectBaseCarVo"/>
<where> <where>
<if test="companyCode != null and companyCode != ''"> and company_code = #{companyCode}</if> <if test="companyCode != null and companyCode != ''"> and company_code = #{companyCode}</if>
<if test="carQueueId != null and carQueueId != ''"> and car_queue_id = #{carQueueId}</if> <if test="carQueueId != null and carQueueId != ''"> and car_queue_id = #{carQueueId}</if>
<if test="carTypeId != null and carTypeId != ''"> and car_type_id = #{carTypeId}</if> <if test="carTypeId != null and carTypeId != ''"> and car_type_id = #{carTypeId}</if>

@ -34,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where> <where>
<if test="tyreFacCode != null and tyreFacCode != ''"> and tyre_fac_code = #{tyreFacCode}</if> <if test="tyreFacCode != null and tyreFacCode != ''"> and tyre_fac_code = #{tyreFacCode}</if>
<if test="companyCode != null and companyCode != ''"> and company_code = #{companyCode}</if> <if test="companyCode != null and companyCode != ''"> and company_code = #{companyCode}</if>
<if test="internetThingsNo != null and internetThingsNo != ''"> and internet_things_no = #{internetThingsNo}</if> <if test="internetThingsNo != null and internetThingsNo != ''"> and internet_things_no like concat('%', #{internetThingsNo}, '%') </if>
<if test="simCode != null and simCode != ''"> and sim_code = #{simCode}</if> <if test="simCode != null and simCode != ''"> and sim_code = #{simCode}</if>
<if test="deviceType != null "> and device_type = #{deviceType}</if> <if test="deviceType != null "> and device_type = #{deviceType}</if>
<if test="state != null "> and state = #{state}</if> <if test="state != null "> and state = #{state}</if>

Loading…
Cancel
Save