Forráskód Böngészése

添加费用确认查询结算单位接口

阿伏兔 4 éve
szülő
commit
1e5ff1eeb3

+ 8 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/basicData/TCorpsController.java

@@ -45,6 +45,14 @@ public class TCorpsController extends BaseController {
     }
 
     /**
+     * 车队使用,查询客户、司机信息
+     */
+    @GetMapping("/selectCorpList/{fId}")
+    public List<TCorps> selectCustomerDriverList (@PathVariable("fId") Long fId) {
+        return tCorpsService.selectCustomerDriverList(fId);
+    }
+
+    /**
      * 导出客户详情列表
      */
     @PreAuthorize("@ss.hasPermi('basicdata:corps:export')")

+ 7 - 1
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/mapper/TCorpsMapper.java

@@ -3,7 +3,6 @@ package com.ruoyi.basicData.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.ruoyi.basicData.domain.TCorps;
-import com.ruoyi.basicData.domain.TCorps;
 
 import java.util.List;
 import java.util.Map;
@@ -104,4 +103,11 @@ public interface TCorpsMapper extends BaseMapper<TCorps> {
      * @return  结果
      */
     public TCorps selectTCorpsByFTel(String phonenumber);
+
+    /**
+     *  车队使用,查询客户、司机信息
+     * @param fId
+     * @return
+     */
+    public List<TCorps> selectCustomerDriverList(Long fId);
 }

+ 7 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/ITCorpsService.java

@@ -93,4 +93,11 @@ public interface ITCorpsService {
      * @return
      */
     public List<Map<String, Object>> selectFleetDriverMsgListMap(TCorps tCorps);
+
+    /**
+     *  车队使用,查询客户、司机信息
+     * @param fId
+     * @return
+     */
+    public List<TCorps> selectCustomerDriverList(Long fId);
 }

+ 11 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/service/impl/TCorpsServiceImpl.java

@@ -77,6 +77,16 @@ public class TCorpsServiceImpl implements ITCorpsService {
     }
 
     /**
+     *  车队使用,查询客户、司机信息
+     * @param fId
+     * @return
+     */
+    @Override
+    public List<TCorps> selectCustomerDriverList(Long fId) {
+        return tCorpsMapper.selectCustomerDriverList(fId);
+    }
+
+    /**
      * 新增客户详情
      *
      * @param tCorps            客户详情
@@ -224,4 +234,5 @@ public class TCorpsServiceImpl implements ITCorpsService {
     public List<Map<String, Object>> selectFleetDriverMsgListMap(TCorps tCorps) {
         return tCorpsMapper.selectFleetDriverMsgListMap(tCorps);
     }
+
 }

+ 17 - 1
ruoyi-warehouse/src/main/resources/mapper/basicData/TCorpsMapper.xml

@@ -129,6 +129,22 @@
         where f_id = #{fId}
     </select>
 
+    <select id="selectCustomerDriverList" parameterType="long" resultMap="TCorpsResult">
+        SELECT
+            c.f_id,
+            c.f_pid,
+            c.f_typeid,
+            c.f_no,
+            c.f_name
+        FROM
+            t_corps c
+            LEFT JOIN F_TMSORDERBILLSCARS car ON car.driver_tel = c.f_tel
+        WHERE
+            c.f_typeid != '[\"100\"]'
+            AND c.f_typeid != '[\"102\"]'
+            OR car.id = #{fId}
+    </select>
+
     <select id="selectFleetDriverMsgListMap" parameterType="TCorps" resultType="Map">
         SELECT
             c.f_id AS id,
@@ -161,7 +177,7 @@
             <if test="fName != null  and fName != ''"> and c.f_name like concat('%', #{fName}, '%')</if>
             <if test="fCname != null  and fCname != ''"> and c.f_cname like concat('%', #{fCname}, '%')</if>
             <if test="fEname != null  and fEname != ''"> and c.f_ename like concat('%', #{fEname}, '%')</if>
-            <if test="fTel != null  and fTel != ''"> and c.f_tel = #{fTel}</if>
+            <if test="fTel != null  and fTel != ''"> and c.f_tel like concat('%', #{fTel}, '%')</if>
             <if test="fFax != null  and fFax != ''"> and c.f_fax = #{fFax}</if>
             <if test="fEmail != null  and fEmail != ''"> and c.f_email = #{fEmail}</if>
             <if test="fManage != null  and fManage != ''"> and c.f_manage = #{fManage}</if>