Commit 6c475b9bf660fcd659146fb065b7e46cb845a9a0
1 parent
79de0fd0
fix: 获取用户列表
Showing
6 changed files
with
48 additions
and
11 deletions
ruoyi-admin/src/main/java/com/ruoyi/driver/controller/DriverController.java
| @@ -65,6 +65,18 @@ public class DriverController extends BaseController { | @@ -65,6 +65,18 @@ public class DriverController extends BaseController { | ||
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | /** | 67 | /** |
| 68 | + * 获取驾驶员信息列表 | ||
| 69 | + * @param driver | ||
| 70 | + * @return | ||
| 71 | + */ | ||
| 72 | + @GetMapping("/getDrivers") | ||
| 73 | + @ApiOperation(value = "查询驾驶员信息列表", notes = "查询驾驶员信息列表") | ||
| 74 | + public AjaxResult getDrivers(Driver driver) { | ||
| 75 | + return AjaxResult.success(driverService.getDrivers(driver)); | ||
| 76 | + } | ||
| 77 | + | ||
| 78 | + | ||
| 79 | + /** | ||
| 68 | * 导出驾驶员信息列表 | 80 | * 导出驾驶员信息列表 |
| 69 | */ | 81 | */ |
| 70 | // @PreAuthorize("@ss.hasPermi('driver:driver:export')") | 82 | // @PreAuthorize("@ss.hasPermi('driver:driver:export')") |
| @@ -120,16 +132,6 @@ public class DriverController extends BaseController { | @@ -120,16 +132,6 @@ public class DriverController extends BaseController { | ||
| 120 | return toAjax(driverService.deleteDriverByIds(ids)); | 132 | return toAjax(driverService.deleteDriverByIds(ids)); |
| 121 | } | 133 | } |
| 122 | 134 | ||
| 123 | - /** | ||
| 124 | - * 获取用户信息列表 | ||
| 125 | - * @param driver | ||
| 126 | - * @return | ||
| 127 | - */ | ||
| 128 | - @GetMapping("/getDrivers") | ||
| 129 | - @ApiOperation(value = "查询驾驶员信息列表", notes = "查询驾驶员信息列表") | ||
| 130 | - public AjaxResult getDrivers(Driver driver) { | ||
| 131 | - return AjaxResult.success(driverService.selectDriverList(driver)); | ||
| 132 | - } | ||
| 133 | 135 | ||
| 134 | /** | 136 | /** |
| 135 | * 校验工号 | 137 | * 校验工号 |
ruoyi-admin/src/main/java/com/ruoyi/driver/domain/Driver.java
| @@ -130,7 +130,7 @@ public class Driver extends BaseEntity { | @@ -130,7 +130,7 @@ public class Driver extends BaseEntity { | ||
| 130 | * 是否人脸注册 | 130 | * 是否人脸注册 |
| 131 | */ | 131 | */ |
| 132 | @Excel(name = "是否人脸注册") | 132 | @Excel(name = "是否人脸注册") |
| 133 | - @ApiModelProperty("是否人脸注册 0 注册 1 未注册 2 注册过期") | 133 | + @ApiModelProperty("是否人脸注册 0 注册 1 未注册 2 注册过期更新") |
| 134 | private Integer faceSignIn; | 134 | private Integer faceSignIn; |
| 135 | /** | 135 | /** |
| 136 | * 大头像 | 136 | * 大头像 |
ruoyi-admin/src/main/java/com/ruoyi/driver/mapper/DriverMapper.java
| @@ -94,4 +94,6 @@ public interface DriverMapper | @@ -94,4 +94,6 @@ public interface DriverMapper | ||
| 94 | Integer jobCodeIsEmpty(@Param("jobCode") String jobCode); | 94 | Integer jobCodeIsEmpty(@Param("jobCode") String jobCode); |
| 95 | 95 | ||
| 96 | String getDriverInfoByJobCode(@Param("jobCode") String jobCode); | 96 | String getDriverInfoByJobCode(@Param("jobCode") String jobCode); |
| 97 | + | ||
| 98 | + List<Driver> getDrivers(Driver driver); | ||
| 97 | } | 99 | } |
ruoyi-admin/src/main/java/com/ruoyi/driver/service/IDriverService.java
| @@ -85,4 +85,5 @@ public interface IDriverService | @@ -85,4 +85,5 @@ public interface IDriverService | ||
| 85 | 85 | ||
| 86 | void downloadHeadImage(String jobCode, HttpServletResponse response); | 86 | void downloadHeadImage(String jobCode, HttpServletResponse response); |
| 87 | 87 | ||
| 88 | + List<Driver> getDrivers(Driver driver); | ||
| 88 | } | 89 | } |
ruoyi-admin/src/main/java/com/ruoyi/driver/service/impl/DriverServiceImpl.java
| @@ -228,6 +228,13 @@ public class DriverServiceImpl implements IDriverService { | @@ -228,6 +228,13 @@ public class DriverServiceImpl implements IDriverService { | ||
| 228 | } | 228 | } |
| 229 | } | 229 | } |
| 230 | 230 | ||
| 231 | + @Override | ||
| 232 | + public List<Driver> getDrivers(Driver driver) { | ||
| 233 | + // TODO 人事比对 | ||
| 234 | + List<Driver> drivers = driverMapper.getDrivers(driver); | ||
| 235 | + return drivers; | ||
| 236 | + } | ||
| 237 | + | ||
| 231 | private File getLocationFile(String jobCode) { | 238 | private File getLocationFile(String jobCode) { |
| 232 | String image = driverMapper.getDriverInfoByJobCode(jobCode); | 239 | String image = driverMapper.getDriverInfoByJobCode(jobCode); |
| 233 | 240 |
ruoyi-admin/src/main/resources/mapper/driver/DriverMapper.xml
| @@ -113,6 +113,31 @@ | @@ -113,6 +113,31 @@ | ||
| 113 | select image from driver | 113 | select image from driver |
| 114 | where job_code = #{jobCode} | 114 | where job_code = #{jobCode} |
| 115 | </select> | 115 | </select> |
| 116 | + <select id="getDrivers" resultType="com.ruoyi.driver.domain.Driver"> | ||
| 117 | + <include refid="selectDriverVo"/> | ||
| 118 | + <where> | ||
| 119 | + <if test="jobCode != null and jobCode != ''">and job_code = #{jobCode}</if> | ||
| 120 | + <if test="companyCode != null and companyCode != ''">and company_code = #{companyCode}</if> | ||
| 121 | + <if test="brancheCompanyCode != null and brancheCompanyCode != ''">and branche_company_code = | ||
| 122 | + #{brancheCompanyCode} | ||
| 123 | + </if> | ||
| 124 | + <if test="personnelName != null and personnelName != ''">and personnel_name like concat('%', | ||
| 125 | + #{personnelName}, '%') | ||
| 126 | + </if> | ||
| 127 | + <if test="papersCode != null and papersCode != ''">and papers_code = #{papersCode}</if> | ||
| 128 | + <if test="icCardCode != null and icCardCode != ''">and ic_card_code = #{icCardCode}</if> | ||
| 129 | + <if test="personnelType != null and personnelType != ''">and personnel_type = #{personnelType}</if> | ||
| 130 | + <if test="posts != null and posts != ''">and posts = #{posts}</if> | ||
| 131 | + <if test="card != null and card != ''">and card = #{card}</if> | ||
| 132 | + <if test="telphone != null and telphone != ''">and telphone = #{telphone}</if> | ||
| 133 | + <if test="icRfid != null and icRfid != ''">and ic_rfid = #{icRfid}</if> | ||
| 134 | + <if test="idRfid != null and idRfid != ''">and id_rfid = #{idRfid}</if> | ||
| 135 | + <if test="tagRfid != null and tagRfid != ''">and tag_rfid = #{tagRfid}</if> | ||
| 136 | + <if test="lineName != null and lineName != ''">and line_name like concat('%', #{lineName}, '%')</if> | ||
| 137 | + <if test="lineCode != null and lineCode != ''">and line_code = #{lineCode}</if> | ||
| 138 | + <if test="faceSignIn != null and faceSignIn != ''">and face_sign_in = #{faceSignIn}</if> | ||
| 139 | + </where> | ||
| 140 | + </select> | ||
| 116 | 141 | ||
| 117 | <insert id="insertDriver" parameterType="Driver" useGeneratedKeys="true" keyProperty="id"> | 142 | <insert id="insertDriver" parameterType="Driver" useGeneratedKeys="true" keyProperty="id"> |
| 118 | insert into driver | 143 | insert into driver |