zxz 4 éve
szülő
commit
5a8374c6ec

+ 12 - 5
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/DriverViewInfoController.java

@@ -103,7 +103,7 @@ public class DriverViewInfoController {
     }
 
     /**
-     * 司机姓名下拉列表
+     * 司机姓名电话下拉列表
      */
     @GetMapping("/selectDriverName")
     public List<DriverViewInfo> selectDriverName(String compId){
@@ -111,12 +111,19 @@ public class DriverViewInfoController {
     }
 
     /**
-     * 司机电话下拉列表
+     * 根据姓名查电话
      */
-    @GetMapping("/selectDriverPhone")
-    public List<DriverViewInfo> selectDriverPhone(String id){
-        return driverViewInfoService.selectDriverPhone(id);
+    @GetMapping("/selectDriverPhoneByName")
+    public List<DriverViewInfo> selectDriverPhoneByName(String compId,String driverName){
+        return driverViewInfoService.selectDriverPhoneByName(compId,driverName);
     }
 
+    /**
+     * 根据电话查姓名
+     */
+    @GetMapping("/selectDriverNameByPhone")
+    public List<DriverViewInfo> selectDriverNameByPhone(String compId,String driverPhone){
+        return driverViewInfoService.selectDriverNameByPhone(compId,driverPhone);
+    }
 }
 

+ 13 - 3
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IDriverViewInfoService.java

@@ -59,11 +59,21 @@ public interface IDriverViewInfoService extends IService<DriverViewInfo> {
      * @return
      */
     List<DriverViewInfo> selectDriverName(String compId);
+
     /**
-     * 查看司机电话下拉列表
+     * 根据姓名查电话
      *
-     * @param id
+     * @param compId,driverName
      * @return
      */
-    List<DriverViewInfo> selectDriverPhone(String id);
+    List<DriverViewInfo> selectDriverPhoneByName(String compId,String driverName);
+
+    /**
+     * 根据电话查姓名
+     *
+     * @param compId,driverPhone
+     * @return
+     */
+    List<DriverViewInfo> selectDriverNameByPhone(String compId,String driverPhone);
+
 }

+ 19 - 7
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverViewInfoServiceImpl.java

@@ -225,7 +225,7 @@ public class DriverViewInfoServiceImpl extends ServiceImpl<DriverViewInfoMapper,
     }
 
     /**
-     * 司机姓名下拉列表
+     * 司机姓名电话下拉列表
      * @param compId
      * @return
      */
@@ -237,14 +237,26 @@ public class DriverViewInfoServiceImpl extends ServiceImpl<DriverViewInfoMapper,
     }
 
     /**
-     * 司机电话下拉列表
-     * @param id
+     * 根据姓名查电话
+     * @param compId,driverName
      * @return
      */
     @Override
-    public List<DriverViewInfo> selectDriverPhone(String id){
-        List<DriverViewInfo> driverViewInfoLists = this.selectList(new EntityWrapper<DriverViewInfo>()
-                .eq("id",id).eq("delete_flag", "0"));
-        return driverViewInfoLists;
+    public List<DriverViewInfo> selectDriverPhoneByName(String compId,String driverName){
+        List<DriverViewInfo> driverViewInfoList = this.selectList(new EntityWrapper<DriverViewInfo>()
+                .eq("comp_id",compId).eq("delete_flag", "0").eq("driver_name",driverName));
+        return driverViewInfoList;
+    }
+
+    /**
+     * 根据电话查姓名
+     * @param compId,driverPhone
+     * @return
+     */
+    @Override
+    public List<DriverViewInfo> selectDriverNameByPhone(String compId,String driverPhone){
+        List<DriverViewInfo> driverViewInfoList = this.selectList(new EntityWrapper<DriverViewInfo>()
+                .eq("comp_id",compId).eq("delete_flag", "0").eq("driver_phone",driverPhone));
+        return driverViewInfoList;
     }
 }