姜永辉 1 год назад
Родитель
Сommit
500dd76269

+ 2 - 0
src/main/java/com/dk/mdm/mapper/mac/RecPayItemMapper.xml

@@ -38,6 +38,7 @@
                 <result column="make_time" property="makeTime" typeHandler="TimestampTypeHandler"/>
                 <result column="flg_valid" property="flgValid"/>
                 <result column="cp_id" property="cpId"/>
+                <result column="macCode" property="macCode"/>
                 <result column="macReceiptCode" property="macReceiptCode"/>
                 <result column="macTypeName" property="macTypeName"/>
     </resultMap>
@@ -94,6 +95,7 @@
         SELECT t.item_id,
                t.rp_id,
                t.mac_id,
+                tmma.mac_code as "macCode",
                tmma.mac_name as "macName",
                tmma.mac_receipt_code as "macReceiptCode",
                  dd.data_value             AS "macTypeName",

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

@@ -324,8 +324,7 @@
                  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 ('收付款类型-收款', '收付款类型-退收款')
-          and t.rp_id = #{id}::uuid
+        where   t.rp_id = #{id}::uuid
     </select>
 
     <!-- 根据主键锁定表t_mac_rec_pay的一行数据 -->

+ 7 - 0
src/main/java/com/dk/mdm/model/response/mac/RecPayItemResponse.java

@@ -144,6 +144,13 @@ public class RecPayItemResponse extends PageInfo<RecPayItemResponse> implements
     @ApiModelProperty(value = "企业ID")
     private Integer cpId;
 
+    /**
+     * 资金账户编码
+     */
+    @Excel(name = "资金账户编码")
+    @ApiModelProperty(value = "资金账户编码")
+    private String macCode;
+
     @ApiModelProperty(value = "账号名称")
     private String macName;
 

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

@@ -296,6 +296,14 @@ public class RecPayResponse extends PageInfo<RecPayResponse> implements Serializ
     @ApiModelProperty(value = "供应商名称")
     private String supName;
 
+
+    /**
+     * 资金账户编码
+     */
+    @Excel(name = "资金账户编码")
+    @ApiModelProperty(value = "资金账户编码")
+    private String macCode;
+
     private static final long serialVersionUID = 1L;
 
 }

+ 22 - 0
src/main/java/com/dk/mdm/service/mac/PaymentService.java

@@ -114,6 +114,28 @@ public class PaymentService extends BaseService<RecPay> {
     }
 
     /**
+     * @desc : 查询收款明细
+     * @author : 付斌
+     * @date : 2024-02-28 13:25
+     */
+    @Pagination
+    public ResponseResultVO selectById(String id) {
+        Map<String, Object> result = new HashMap<>();
+        RecPayResponse recPayResponse = recPayMapper.selectById(id);
+        result.put("data", recPayResponse);
+        // 付款明细
+        List<RecPayItemResponse> recPayItem = recPayItemMapper.selectByCond(new RecPayItemQuery().setRpId(id));
+        result.put("recPayItem", recPayItem);
+
+        // 应付核销明细
+        List<RecPayHandleItemResponse> recPayHandleItem = recPayHandleItemMapper.selectByCond(new RecPayHandleItemQuery().setRpId(id));
+        result.put("recPayHandleItem", recPayHandleItem);
+
+        // 附件
+        return ResponseResultUtil.success(result);
+    }
+
+    /**
      * @desc : 查询付款明细
      * @author : 付斌
      * @date : 2024-02-28 13:25