diff --git a/ruiyi-carpool/src/main/java/com/ruoyi/carpool/domain/PDriver.java b/ruiyi-carpool/src/main/java/com/ruoyi/carpool/domain/PDriver.java index 01415b488..acc95255b 100644 --- a/ruiyi-carpool/src/main/java/com/ruoyi/carpool/domain/PDriver.java +++ b/ruiyi-carpool/src/main/java/com/ruoyi/carpool/domain/PDriver.java @@ -38,6 +38,10 @@ public class PDriver extends BaseEntity @Excel(name = "年龄") private Integer age; + /** 车牌号 */ + @Excel(name = "车牌号") + private String numberPlate; + /** 手机号码 */ @Excel(name = "手机号码") private String phone; @@ -170,6 +174,14 @@ public class PDriver extends BaseEntity this.state = state; } + public String getNumberPlate() { + return numberPlate; + } + + public void setNumberPlate(String numberPlate) { + this.numberPlate = numberPlate; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) @@ -187,6 +199,7 @@ public class PDriver extends BaseEntity .append("createTime", getCreateTime()) .append("updateTime", getUpdateTime()) .append("state", getState()) + .append("numberPlate", getNumberPlate()) .toString(); } } diff --git a/ruiyi-carpool/src/main/resources/mapper/carpool/PDriverMapper.xml b/ruiyi-carpool/src/main/resources/mapper/carpool/PDriverMapper.xml index 5d83f73fa..8520c3bf2 100644 --- a/ruiyi-carpool/src/main/resources/mapper/carpool/PDriverMapper.xml +++ b/ruiyi-carpool/src/main/resources/mapper/carpool/PDriverMapper.xml @@ -13,6 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <result property="age" column="age" /> <result property="state" column="state" /> <result property="phone" column="phone" /> + <result property="numberPlate" column="number_plate" /> <result property="city" column="city" /> <result property="province" column="province" /> <result property="country" column="country" /> @@ -22,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" </resultMap> <sql id="selectPDriverVo"> - select id, driver_id, name, sex, id_card, age, phone, city,state, province, country, is_blacklist, create_time, update_time from p_driver + select id, driver_id, name, sex, id_card, age, phone,number_plate,city,state, province, country, is_blacklist, create_time, update_time from p_driver </sql> <select id="selectPDriverList" parameterType="PDriver" resultMap="PDriverResult"> @@ -31,6 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <if test="driverId != null and driverId != ''"> and driver_id = #{driverId}</if> <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> <if test="sex != null "> and sex = #{sex}</if> + <if test="numberPlate != null "> and number_plate = #{numberPlate}</if> <if test="state != null "> and state = #{state}</if> <if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if> <if test="age != null "> and age = #{age}</if> @@ -54,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <if test="driverId != null">driver_id,</if> <if test="name != null">name,</if> <if test="sex != null">sex,</if> + <if test="numberPlate != null">number_plate,</if> <if test="idCard != null">id_card,</if> <if test="age != null">age,</if> <if test="state != null">state,</if> @@ -70,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <if test="driverId != null">#{driverId},</if> <if test="name != null">#{name},</if> <if test="sex != null">#{sex},</if> + <if test="numberPlate != null">#{numberPlate},</if> <if test="state != null">#{state},</if> <if test="idCard != null">#{idCard},</if> <if test="age != null">#{age},</if> @@ -89,6 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <if test="driverId != null">driver_id = #{driverId},</if> <if test="name != null">name = #{name},</if> <if test="sex != null">sex = #{sex},</if> + <if test="numberPlate != null">number_plate = #{numberPlate},</if> <if test="state != null">state = #{state},</if> <if test="idCard != null">id_card = #{idCard},</if> <if test="age != null">age = #{age},</if> @@ -121,6 +126,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <if test="driverId != null and driverId != ''"> and driver_id = #{driverId}</if> <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> <if test="sex != null "> and sex = #{sex}</if> + <if test="numberPlate != null "> and number_plate = #{sex}</if> <if test="state != null "> and state = #{state}</if> <if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if> <if test="age != null "> and age = #{age}</if> diff --git a/ruoyi-ui/src/views/carpool/driver/index.vue b/ruoyi-ui/src/views/carpool/driver/index.vue index 9589d369d..57adc535e 100644 --- a/ruoyi-ui/src/views/carpool/driver/index.vue +++ b/ruoyi-ui/src/views/carpool/driver/index.vue @@ -64,6 +64,7 @@ <!-- <el-table-column label="身份证号码" align="center" prop="idCard" /> --> <el-table-column label="年龄" align="center" prop="age" /> <el-table-column label="手机号码" align="center" prop="phone" /> + <el-table-column label="车牌号" align="center" prop="numberPlate" /> <!-- <el-table-column label="所在城市" align="center" prop="city" /> --> <!-- <el-table-column label="所在省份" align="center" prop="province" /> --> <!-- <el-table-column label="所在国家" align="center" prop="country" /> --> @@ -103,6 +104,9 @@ <el-form-item label="手机号码" prop="phone"> <el-input v-model="form.phone" placeholder="请输入手机号码" /> </el-form-item> + <el-form-item label="车牌号" prop="numberPlate"> + <el-input v-model="form.numberPlate" placeholder="请输入车牌号" /> + </el-form-item> <!-- <el-form-item label="所在城市" prop="city"> <el-input v-model="form.city" placeholder="请输入所在城市" /> </el-form-item>