2024-07-02 朱宝民 获取充值记录接口增加:手机号、身份证号、余额
New file |
| | |
| | | package com.dy.pipIrrGlobal.voSe; |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-07-02 16:22 |
| | | * @LastEditTime 2024-07-02 16:22 |
| | | * @Description 命令日志视图 |
| | | */ |
| | | |
| | | @Data |
| | | public class VoCommand { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | private Long id; |
| | | |
| | | private String commandName; |
| | | |
| | | private String intakeName; |
| | | |
| | | private String rtuAddr; |
| | | |
| | | private String protocol; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date sendTime; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date resultTime; |
| | | |
| | | private String result; |
| | | |
| | | private String userName; |
| | | } |
| | |
| | | @Schema(title = "农户姓名") |
| | | private String clientName; |
| | | |
| | | private String phone; |
| | | |
| | | private String idCard; |
| | | |
| | | @Schema(title = "农户编号") |
| | | private String clientNum; |
| | | |
| | | private Float money; |
| | | |
| | | @Schema(title = "水卡编号") |
| | | private String cardNum; |
| | |
| | | private Float price; |
| | | |
| | | @Schema(title = "操作人") |
| | | private String operator; |
| | | private String opr; |
| | | |
| | | private String operateType; |
| | | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | |
| | | <!--根据指定条件获取充值记录--> |
| | | <select id="getRecharges" resultType="com.dy.pipIrrGlobal.voSe.VoRecharge"> |
| | | SELECT |
| | | CAST(ope.id AS char) AS id, |
| | | cli.name AS clientName, |
| | | cli.clientNum, |
| | | CAST(card.cardNum AS char) AS cardNum, |
| | | IFNULL(ope.trade_amount, 0) AS amount, |
| | | IFNULL(ope.refund_amount, 0) AS refundAmount, |
| | | (IFNULL(ope.money, 0) + IFNULL(ope.trade_amount, 0)) AS afterRecharge, |
| | | -- ope.payment_id AS paymentId, |
| | | pay.name AS paymentName, |
| | | ope.price, |
| | | us.name AS operator, |
| | | ope.operate_dt |
| | | CAST(ope.id AS char) AS id, |
| | | cli.name AS clientName, |
| | | cli.phone, |
| | | cli.idCard, |
| | | cli.clientNum, |
| | | card.money, |
| | | CAST(card.cardNum AS char) AS cardNum, |
| | | IFNULL(ope.trade_amount, 0) AS amount, |
| | | IFNULL(ope.refund_amount, 0) AS refundAmount, |
| | | (IFNULL(ope.money, 0) + IFNULL(ope.trade_amount, 0)) AS afterRecharge, |
| | | -- ope.payment_id AS paymentId, |
| | | pay.name AS paymentName, |
| | | ope.price, |
| | | us.name AS opr, |
| | | (CASE |
| | | WHEN ope.operate_type = 2 THEN "充值" |
| | | WHEN ope.operate_type = 5 THEN "返还" |
| | | END) AS operateType, |
| | | ope.operate_dt |
| | | FROM se_card_operate ope |
| | | INNER JOIN se_client_card card ON ope.card_id = card.id |
| | | INNER JOIN se_client cli ON ope.client_id = cli.id |
| | | INNER JOIN ba_user us ON ope.operator = us.id |
| | | Left JOIN se_payment_method pay ON ope.payment_id = pay.id |
| | | INNER JOIN se_client_card card ON ope.card_id = card.id |
| | | INNER JOIN se_client cli ON ope.client_id = cli.id |
| | | INNER JOIN ba_user us ON ope.operator = us.id |
| | | Left JOIN se_payment_method pay ON ope.payment_id = pay.id |
| | | <where> |
| | | AND ope.operate_type in(2, 5) |
| | | <if test = "clientName != null and clientName !=''"> |