姜永辉 пре 2 година
родитељ
комит
c2bb56acea

+ 6 - 1
src/main/java/com/dk/mdm/mapper/mac/RecPayMapper.xml

@@ -60,6 +60,8 @@
             <result column="cp_id" property="cpId"/>
             <result column="cp_id" property="cpId"/>
         <result column="receivable_residue" property="receivableResidue"/>
         <result column="receivable_residue" property="receivableResidue"/>
         <result column="receipt_residue" property="receiptResidue"/>
         <result column="receipt_residue" property="receiptResidue"/>
+        <result column="payable_residue" property="payableResidue"/>
+        <result column="payment_residue" property="paymentResidue"/>
     </resultMap>
     </resultMap>
 
 
     <!-- 通用条件列 -->
     <!-- 通用条件列 -->
@@ -405,13 +407,16 @@
                makestaff.staff_name as "makeStaffName",
                makestaff.staff_name as "makeStaffName",
                t.make_time,
                t.make_time,
                t.flg_valid,
                t.flg_valid,
-               t.cp_id
+               t.cp_id,
+               tma.payable_residue,
+               tma.payment_residue
         from dkic_b.t_mac_rec_pay as t
         from dkic_b.t_mac_rec_pay as t
                  Left join dkic_b.t_mst_supplier tmp on tmp.sup_id = t.object_id
                  Left join dkic_b.t_mst_supplier tmp on tmp.sup_id = t.object_id
                  left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.rp_type
                  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_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 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_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 ('收付款类型-付款', '收付款类型-退付款')
         where t.rp_type in ('收付款类型-付款', '收付款类型-退付款')
         <include refid="Condition"/>
         <include refid="Condition"/>
         <if test="searchText !=null and searchText != ''">
         <if test="searchText !=null and searchText != ''">

+ 5 - 0
src/main/java/com/dk/mdm/mapper/mst/SupplierMapper.xml

@@ -42,6 +42,8 @@
         <result column="op_app_code" property="opAppCode"/>
         <result column="op_app_code" property="opAppCode"/>
         <result column="op_timestamp" property="opTimestamp" typeHandler="TimestampTypeHandler"/>
         <result column="op_timestamp" property="opTimestamp" typeHandler="TimestampTypeHandler"/>
         <result column="op_db_user" property="opDbUser"/>
         <result column="op_db_user" property="opDbUser"/>
+        <result column="payable_residue" property="payableResidue"/>
+        <result column="payment_residue" property="paymentResidue"/>
     </resultMap>
     </resultMap>
 
 
     <!-- 通用条件列 -->
     <!-- 通用条件列 -->
@@ -202,10 +204,13 @@
         ) AS "brandName"
         ) AS "brandName"
         ,tmo.org_name
         ,tmo.org_name
         ,tmo.org_code
         ,tmo.org_code
+        ,tma.payable_residue
+        ,tma.payment_residue
         FROM dkic_b.t_mst_supplier msl
         FROM dkic_b.t_mst_supplier msl
         LEFT JOIN dkic_b.t_mst_staff  tms   ON tms.staff_id = msl.staff_id
         LEFT JOIN dkic_b.t_mst_staff  tms   ON tms.staff_id = msl.staff_id
         LEFT JOIN dkic_b.t_mst_org  tmo   ON tmo.org_id = msl.org_id
         LEFT JOIN dkic_b.t_mst_org  tmo   ON tmo.org_id = msl.org_id
         LEFT JOIN sys.t_data_kind tdk   ON tdk.kind_code = msl.sup_type
         LEFT JOIN sys.t_data_kind tdk   ON tdk.kind_code = msl.sup_type
+        LEFT JOIN  dkic_b.t_mac_account tma  on tma.object_id = msl.sup_id and tma.object_type in ('对象类型-供应商')
         <include refid="msl_Condition"/>
         <include refid="msl_Condition"/>
         ORDER BY  msl.op_create_time desc
         ORDER BY  msl.op_create_time desc
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">

+ 6 - 0
src/main/java/com/dk/mdm/model/response/mac/RecPayResponse.java

@@ -269,6 +269,12 @@ public class RecPayResponse extends PageInfo<RecPayResponse> implements Serializ
     @ApiModelProperty(value = "总收款可退金额 (总收款金额-总应收收款金额+总应收优惠金额(现金池))")
     @ApiModelProperty(value = "总收款可退金额 (总收款金额-总应收收款金额+总应收优惠金额(现金池))")
     private BigDecimal receiptResidue;
     private BigDecimal receiptResidue;
 
 
+    @ApiModelProperty(value = "总剩余应付 (总应付账款-总应付核销金额)")
+    private BigDecimal payableResidue ;
+
+    @ApiModelProperty(value = "总付款金额-(总应付核销金额-总应付优惠金额)")
+    private BigDecimal paymentResidue;
+
     @ApiModelProperty(value = "供应商编码")
     @ApiModelProperty(value = "供应商编码")
     private String supCode;
     private String supCode;
 
 

+ 5 - 0
src/main/java/com/dk/mdm/model/response/mst/SpplierResponse.java

@@ -18,6 +18,7 @@ package com.dk.mdm.model.response.mst;
         import io.swagger.annotations.ApiModelProperty;
         import io.swagger.annotations.ApiModelProperty;
         import com.alibaba.fastjson.JSONObject;
         import com.alibaba.fastjson.JSONObject;
 
 
+        import java.math.BigDecimal;
         import java.util.Arrays;
         import java.util.Arrays;
         import java.util.HashSet;
         import java.util.HashSet;
         import java.util.List;
         import java.util.List;
@@ -257,7 +258,11 @@ public class SpplierResponse extends PageInfo<SpplierResponse> implements Serial
      * 相关属性
      * 相关属性
      * @TableField(exist = false)
      * @TableField(exist = false)
      */
      */
+    @ApiModelProperty(value = "总剩余应付 (总应付账款-总应付核销金额)")
+    private BigDecimal payableResidue ;
 
 
+    @ApiModelProperty(value = "总付款金额-(总应付核销金额-总应付优惠金额)")
+    private BigDecimal paymentResidue;
     /*
     /*
      * 关联属性 + 查询条件
      * 关联属性 + 查询条件
      * @TableField(exist = false)
      * @TableField(exist = false)