Browse Source

收据打印修改

wangli 4 years ago
parent
commit
48de89d264

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

@@ -24,7 +24,7 @@ public class PrintInvoiceData {
     private Integer printType ;
     @ApiModelProperty(value = "票据号码")
     private String invoiceNo ;
-    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
     @ApiModelProperty(value = "充值日期" ,hidden = true)
     private LocalDateTime createDate;	//充值日期
     @ApiModelProperty(value = "本期余额")
@@ -45,14 +45,14 @@ public class PrintInvoiceData {
     private BigDecimal reading;	//抄表止度
     @ApiModelProperty(value = "收费日期")
     private String paydate;	//收费日期
-    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
     @ApiModelProperty(value = "抄表日期" ,hidden = true)
     private LocalDateTime recorddate;	//抄表日期
     @ApiModelProperty(value = "应收金额")
     private BigDecimal receivablefee;	//应收金额
     @ApiModelProperty(value = "上期止度")
     private BigDecimal lastreading;	//上期止度
-    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
     @ApiModelProperty(value = "上期抄表日期", hidden = true)
     private LocalDateTime lastrecorddate;	//上期抄表日期
     @ApiModelProperty(value = "收费账期区间")

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

@@ -24,6 +24,8 @@ public class PrintReceivedInfo {
     private String ladderlevel;
     @ApiModelProperty(value = "阶梯标签")
     private String ladderlevelname;
+    @ApiModelProperty(value = "项目名称")
+    private String itemname;
     @ApiModelProperty(value = "水量")
     private BigDecimal payamount;
     @ApiModelProperty(value = "单价")

+ 43 - 33
smart-city-platform/src/main/resources/mapper/pay/PayInvoiceMapper.xml

@@ -223,40 +223,50 @@
     </select>
 
     <select id="getPayfeeInfoPrint" resultType="com.bz.smart_city.dto.pay.payfee.PrintReceivedInfo">
-        select * from (
         select
-        a.account_id as "accountId",
-        re.feetypename,
-        re.ladderlevel,
-        (case when re.ladderlevel = 1 then '一阶'
-        when re.ladderlevel = 2 then '二阶'
-        when re.ladderlevel = 3 then '三阶'
-        when re.ladderlevel = 4 then '四阶'
-        else '' end) as "ladderlevelname",
-        re.payamount,
-        re.waterbasicprice,
-        sum(case when payway != 4 then reced.receivedamount else 0 end ) receivedamount,
-        sum(case when payway = 4 then reced.receivedamount else 0 end ) autoReceivedamount
-        from pay_amount_waterusedamount a
-        left join pay_pay_receivable re on a.id=re.usedamount_id
-        left join pay_pay_received reced on reced.receivable_id=re.id
-        where  re.feetype=1   and a.`year`*12+a.`month` >= #{minPeriod} and a.`year`*12+a.`month` &lt;= #{maxPeriod} and  a.account_id=#{accountId}
-        group by a.account_id, re.feetypename,re.ladderlevel,re.payamount,re.waterbasicprice
-        union all
-        select
-        a.account_id,
-        re.feetypename,
-        '' as "ladderlevel",
-        '' as "ladderlevelname",
-        sum(re.payamount) as "payamount",
-        max(re.waterbasicprice) as "waterbasicprice",
-        sum(case when payway != 4 then reced.receivedamount else 0 end ) receivedamount,
-        sum(case when payway = 4 then reced.receivedamount else 0 end ) autoReceivedamount
-        from pay_amount_waterusedamount a
-        left join pay_pay_receivable re on a.id=re.usedamount_id
-        left join pay_pay_received reced on reced.receivable_id=re.id
-        where  re.feetype !=1  and a.`year`*12+a.`month` >= #{minPeriod} and a.`year`*12+a.`month` &lt;= #{maxPeriod} and  a.account_id=#{accountId}
-        group by  a.account_id,re.feetypename
+            accountId ,
+            feetypename,
+            ladderlevel,
+            ladderlevelname,
+            feetypename+ladderlevelname as "itemname",
+            payamount,
+            waterbasicprice,
+            receivedamount,
+            autoReceivedamount
+        from (
+            select
+            a.account_id as "accountId",
+            re.feetypename,
+            re.ladderlevel,
+            (case when re.ladderlevel = 1 then '一阶'
+            when re.ladderlevel = 2 then '二阶'
+            when re.ladderlevel = 3 then '三阶'
+            when re.ladderlevel = 4 then '四阶'
+            else '' end) as "ladderlevelname",
+            re.payamount,
+            re.waterbasicprice,
+            sum(case when payway != 4 then reced.receivedamount else 0 end ) receivedamount,
+            sum(case when payway = 4 then reced.receivedamount else 0 end ) autoReceivedamount
+            from pay_amount_waterusedamount a
+            left join pay_pay_receivable re on a.id=re.usedamount_id
+            left join pay_pay_received reced on reced.receivable_id=re.id
+            where  re.feetype=1   and a.`year`*12+a.`month` >= #{minPeriod} and a.`year`*12+a.`month` &lt;= #{maxPeriod} and  a.account_id=#{accountId}
+            group by a.account_id, re.feetypename,re.ladderlevel,re.payamount,re.waterbasicprice
+            union all
+            select
+            a.account_id,
+            re.feetypename,
+            '' as "ladderlevel",
+            '' as "ladderlevelname",
+            sum(re.payamount) as "payamount",
+            max(re.waterbasicprice) as "waterbasicprice",
+            sum(case when payway != 4 then reced.receivedamount else 0 end ) receivedamount,
+            sum(case when payway = 4 then reced.receivedamount else 0 end ) autoReceivedamount
+            from pay_amount_waterusedamount a
+            left join pay_pay_receivable re on a.id=re.usedamount_id
+            left join pay_pay_received reced on reced.receivable_id=re.id
+            where  re.feetype !=1  and a.`year`*12+a.`month` >= #{minPeriod} and a.`year`*12+a.`month` &lt;= #{maxPeriod} and  a.account_id=#{accountId}
+            group by  a.account_id,re.feetypename
         )s
         order by s.accountId,s.feetypename,s.ladderlevel
     </select>