pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voSe/VoReceipt.java
@@ -1,7 +1,8 @@ package com.dy.pipIrrGlobal.voSe; import com.alibaba.fastjson2.annotation.JSONField; import com.alibaba.fastjson2.writer.ObjectWriterImplToString; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -15,62 +16,103 @@ */ @Data @Schema(title = "收据视图对象") public class VoReceipt { private static final long serialVersionUID = 202402011037001L; @Schema(title = "收银员ID") /** * 收银员ID */ private String cashierId; @Schema(title = "订单号") private String orderNumber; /** * 订单号 */ @JSONField(serializeUsing= ObjectWriterImplToString.class) private Long orderNumber; @Schema(title = "镇名称") /** * 镇名称 */ private String townName; @Schema(title = "村名称") /** * 村名称 */ private String villageName; @Schema(title = "农户姓名") /** * 农户姓名 */ private String name; @Schema(title = "电话") /** * 电话 */ private String phone; @Schema(title = "农户编号") private String clientNum; /** * 农户编号 */ @JSONField(serializeUsing= ObjectWriterImplToString.class) private Long clientNum; @Schema(title = "水卡编号") private String cardNum; /** * 水卡编号 */ @JSONField(serializeUsing= ObjectWriterImplToString.class) private Long cardNum; @Schema(title = "业务类型") /** * 业务类型 */ private String operateType; @Schema(title = "购水金额") /** * 购水金额 */ private Double waterCost; @Schema(title = "购卡金额") /** * 赠送金额 */ private Double gift; /** * 购卡金额 */ private Double cardCost; @Schema(title = "收费金额") /** * 收费金额 */ private Double amount; @Schema(title = "水卡余额") /** * 水卡余额 */ private Double money; @Schema(title = "支付方式") /** * 支付方式 */ private String paymentName; @Schema(title = "操作人") /** * 操作人 */ private String operatorName; /** * 操作时间 */ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @Schema(title = "操作时间") private Date operateTime; /** * 当前时间 */ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @Schema(title = "当前时间") private Date currentTime; } pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeCardOperateMapper.xml
@@ -624,6 +624,14 @@ AND cli.name like CONCAT('%',#{clientName},'%') </if> <if test = "onlyGift != null and onlyGift ==true"> AND ope.gift > 0 </if> <if test = "cashierId != null and cashierId > 0"> AND ope.operator = #{cashierId} </if> <if test = "timeStart != null and timeStop != null"> AND ope.operate_dt BETWEEN #{timeStart} AND #{timeStop} </if> @@ -633,25 +641,26 @@ <!--根据指定条件获取收据列表--> <select id="getReceipts" resultType="com.dy.pipIrrGlobal.voSe.VoReceipt"> SELECT CAST(ope.id AS char) AS orderNumber, tow.name AS townName, vil.name AS villageName, cli.`name`, cli.phone, CAST(cli.clientNum AS char) AS clientNum, CAST(card.cardNum AS char) AS cardNum, (CASE WHEN ope.operate_type = 1 THEN '开卡' WHEN ope.operate_type = 2 THEN '充值' END) AS operateType, IFNULL(ope.trade_amount,0) AS waterCost, IFNULL(ope.card_cost,0) AS cardCost, (IFNULL(ope.trade_amount,0) + IFNULL(ope.card_cost,0)) AS amount, card.money, pay.`name` AS paymentName, us.`name` AS operatorName, ope.operate_dt AS operateTime, NOW() AS currentTime ope.id AS orderNumber, tow.name AS townName, vil.name AS villageName, cli.`name`, cli.phone, cli.clientNum, card.cardNum, (CASE WHEN ope.operate_type = 1 THEN '开卡' WHEN ope.operate_type = 2 THEN '充值' END) AS operateType, IFNULL(ope.trade_amount,0) AS waterCost, IFNULL(ope.gift,0) AS gift, IFNULL(ope.card_cost,0) AS cardCost, (IFNULL(ope.trade_amount,0) + IFNULL(ope.card_cost,0)) AS amount, card.money, pay.`name` AS paymentName, us.`name` AS operatorName, ope.operate_dt AS operateTime, NOW() AS currentTime FROM se_card_operate ope INNER JOIN se_client cli ON ope.client_id = cli.id INNER JOIN se_client_card card ON ope.card_id = card.id @@ -669,6 +678,14 @@ AND cli.name like CONCAT('%',#{clientName},'%') </if> <if test = "onlyGift != null and onlyGift ==true"> AND ope.gift > 0 </if> <if test = "cashierId != null and cashierId > 0"> AND ope.operator = #{cashierId} </if> <if test = "timeStart != null and timeStop != null"> AND ope.operate_dt BETWEEN #{timeStart} AND #{timeStop} </if> pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/qo/QoReceipt.java
@@ -25,4 +25,9 @@ @Schema(description = "充值机时间_结束") public String timeStop; /** * 是否仅存在赠送金额的 */ public Boolean onlyGift; }