Przeglądaj źródła

打印收据,返回公司名称

wangli 4 lat temu
rodzic
commit
36c132f1a8

+ 2 - 0
smart-city-platform/src/main/java/com/bz/smart_city/dto/pay/payfee/PrintInvoiceData.java

@@ -22,6 +22,8 @@ public class PrintInvoiceData {
 
     @ApiModelProperty(value = "收据类型:1充值 2缴费")
     private Integer printType ;
+    @ApiModelProperty(value = "客户名称(水司名称)")
+    private String customerName ;
     @ApiModelProperty(value = "交易流水号")
     private String payseriesno ;
     @ApiModelProperty(value = "票据号码")

+ 3 - 1
smart-city-platform/src/main/resources/mapper/pay/PayInvoiceMapper.xml

@@ -178,6 +178,7 @@
             ,account.accountnumber
             ,account.address
             ,u.name AS "createBy"
+            ,(select  customer_name from sc_customer where id=#{customerId}) as "customerName"
         from pay_pay_transactiondetails a
         left join pay_base_account account on account.id=a.account_id
         left join sc_user u on u.id=a.create_by
@@ -204,7 +205,8 @@
             max(amount.reading) as "reading",
             min(amount.lastreading) as "lastreading",
             max(reced.create_date) as "createDate",
-            (select name from sc_user where id=max(reced.create_by)) as "createBy"
+            (select name from sc_user where id=max(reced.create_by)) as "createBy",
+            (select  customer_name from sc_customer where id=#{customerId}) as "customerName"
         from pay_pay_received reced
         left join pay_pay_receivable rece on reced.receivable_id=rece.id
         left join pay_amount_waterusedamount amount on amount.id=rece.usedamount_id