于继渤 1 год назад
Родитель
Сommit
12217aee7f

+ 11 - 0
src/main/java/com/dk/mdm/controller/mac/ReceiptController.java

@@ -168,6 +168,17 @@ public class ReceiptController {
         return receiptService.getRpSupList(recPayQuery);
     }
 
+    /**
+     * @desc : 供应商收退款查询(供应商详情用)
+     * @author : 于继渤
+     * @date : 2024/7/5 10:36
+     */
+    @ApiOperation(value = "分页、关联、条件查询", notes = "分页、关联、条件查询")
+    @PostMapping({"get_rp_sup_list_detail"})
+    public ResponseResultVO<PageList<RecPayResponse>> getRpSupListDetail(@RequestBody RecPayQuery recPayQuery) {
+        return receiptService.getRpSupListDetail(recPayQuery);
+    }
+
 
     /**
      * @desc : 新建供应商收款

+ 15 - 0
src/main/java/com/dk/mdm/mapper/mac/RecPayMapper.java

@@ -98,6 +98,21 @@ public interface RecPayMapper extends BaseMapper<RecPay> {
      */
     Long getRpSupListCount(RecPayQuery recPayQuery);
 
+
+    /**
+     * @desc : 根据条件进行查询
+     * @author : 付斌
+     * @date : 2024-02-28 10:18
+     */
+    List<RecPayResponse> getRpSupListDetail(RecPayQuery recPayQuery);
+
+    /**
+     * @desc : 根据条件进行查询(数量)
+     * @author : 付斌
+     * @date : 2024-02-28 10:19
+     */
+    Long getRpSupListCountDetail(RecPayQuery recPayQuery);
+
     /**
      * @desc   : 根据条件查询
      * @date   : 2024/7/16 17:13

+ 91 - 2
src/main/java/com/dk/mdm/mapper/mac/RecPayMapper.xml

@@ -810,6 +810,96 @@
         t.flg_valid,
         t.cp_id,
         tma.receivable_residue,
+        tma.receipt_residue
+        from dkic_b.t_mac_rec_pay as t
+        left join dkic_b.t_mst_supplier tmsp on tmsp.sup_id = t.object_id
+        left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.rp_type
+        left join dkic_b.t_mst_org tmo on tmo.org_id = t.org_id
+        left join dkic_b.t_mst_staff tms on tms.staff_id = t.staff_id
+        left join dkic_b.t_mst_staff as makestaff on makestaff.staff_id = t.make_staff
+        LEFT JOIN  dkic_b.t_mac_account tma  on tma.object_id = t.object_id and tma.object_type in ('对象类型-供应商')
+        where t.rp_type in ('收付款类型-付款', '收付款类型-退付款')
+        <include refid="Condition_sup"/>
+        <if test="viewVoidedDocuments !=null and viewVoidedDocuments == false">
+            AND  t.flg_valid = true
+        </if>
+
+        <if test="searchText !=null and searchText != ''">
+            AND (  tmsp.contact_phone LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+            or tmsp.return_address LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+            or tmsp.sup_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+            or tmo.org_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+            or tms.staff_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+            or t.rp_no LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+            )
+        </if>
+        order by t.op_create_time desc
+        <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
+            limit #{end} offset #{start}
+        </if>
+    </select>
+
+    <!-- 查询表t_mac_rec_pay,(条件查询)个数 -->
+    <select id="getRpSupListCount" resultType="Long">
+        SELECT count(1)
+        from dkic_b.t_mac_rec_pay as t
+        left join dkic_b.t_mst_supplier tmsp on tmsp.sup_id = t.object_id
+        left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.rp_type
+        left join dkic_b.t_mst_org tmo on tmo.org_id = t.org_id
+        left join dkic_b.t_mst_staff tms on tms.staff_id = t.staff_id
+        left join dkic_b.t_mst_staff as makestaff on makestaff.staff_id = t.make_staff
+        where t.rp_type in ('收付款类型-付款', '收付款类型-退付款')
+        <include refid="Condition_sup"/>
+        <if test="searchText !=null and searchText != ''">
+            AND (  tmsp.contact_phone LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+            or tmsp.return_address LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+            or tmsp.sup_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+            or tmo.org_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+            or tms.staff_name LIKE concat('%',my_ex.likequery(#{searchText}),'%')
+            )
+        </if>
+    </select>
+
+
+    <select id="getRpSupListDetail" resultMap="BaseResultMapResponse">
+        select t.rp_id,
+        t.rp_no,
+        t.rp_type,
+        sys.f_get_name_i18n(tdk1.kind_name_i18n, #{i18n}) as "rpTypeName",
+        t.object_id,
+        tmsp.sup_id,
+        tmsp.sup_code,
+        tmsp.sup_name,
+        tmsp.sup_type,
+        tmsp.contact_name,
+        tmsp.contact_phone,
+        tmsp.return_address,
+        t.org_id,
+        tmo.org_name         as "orgName",
+        t.staff_id,
+        tms.staff_name       as "staffName",
+        t.sum_amt_rec,
+        t.sum_amt_pay,
+        t.sum_should_handle,
+        t.sum_use_receipt_residue,
+        t.sum_use_payment_residue,
+        t.sum_amt_receivable_handle,
+        t.sum_amt_payable_handle,
+        t.sum_waive_amt,
+        t.acc_date,
+        t.remarks,
+        t.annex_paths,
+        t.biznis_type,
+        t.biznis_id,
+        t.biznis_no,
+        t.flg_order_handle,
+        t.flg_lock,
+        t.make_staff,
+        makestaff.staff_name as "makeStaffName",
+        t.make_time,
+        t.flg_valid,
+        t.cp_id,
+        tma.receivable_residue,
         tma.receipt_residue,
         rpi.amt_pay,
         concat (tmma.mac_name ) AS "macNames"
@@ -844,7 +934,7 @@
     </select>
 
     <!-- 查询表t_mac_rec_pay,(条件查询)个数 -->
-    <select id="getRpSupListCount" resultType="Long">
+    <select id="getRpSupListCountDetail" resultType="Long">
         SELECT count(1)
         from dkic_b.t_mac_rec_pay as t
         left join dkic_b.t_mst_supplier tmsp on tmsp.sup_id = t.object_id
@@ -864,7 +954,6 @@
         </if>
     </select>
 
-
     <!--根据条件查询-->
     <select id="selectMessageByOtherCondition" resultMap="BaseResultMapResponse">
         select t.rp_id

+ 12 - 0
src/main/java/com/dk/mdm/service/mac/ReceiptService.java

@@ -758,6 +758,18 @@ public class ReceiptService extends BaseService<RecPay> {
     }
 
     /**
+     * @desc : 供应商收退款查询
+     * @author : 于继渤
+     * @date : 2024/7/5 10:36
+     */
+    @Pagination
+    public ResponseResultVO<PageList<RecPayResponse>> getRpSupListDetail(RecPayQuery recPayQuery) {
+        return super.mergeListWithCount(recPayQuery, recPayMapper.getRpSupListDetail(recPayQuery),
+                recPayMapper.getRpSupListCountDetail(recPayQuery));
+
+    }
+
+    /**
      * @desc : 新建供应商收款
      * @author : 于继渤
      * @date : 2024/7/5 10:48