update申请开票

This commit is contained in:
2023-04-15 17:01:27 +08:00
parent 97a9affb6c
commit 208338dd6d
3 changed files with 62 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ import com.jsowell.common.core.domain.ykc.RealTimeMonitorData;
import com.jsowell.common.core.domain.ykc.TransactionRecordsData;
import com.jsowell.common.core.page.PageResponse;
import com.jsowell.common.core.redis.RedisCache;
import com.jsowell.common.enums.InvoiceRecordEnum;
import com.jsowell.common.enums.MemberWalletEnum;
import com.jsowell.common.enums.ykc.ActionTypeEnum;
import com.jsowell.common.enums.ykc.OrderPayModeEnum;
@@ -1090,7 +1091,11 @@ public class OrderService {
for (OrderInvoiceRecord orderInvoiceRecord : orderInvoiceRecords) {
volist.add(
InvoiceRecordVO.builder()
.status(InvoiceRecordEnum.getLabel(orderInvoiceRecord.getStatus()))
.totalAmount(orderInvoiceRecord.getTotalAmount())
.totalElecAmount(orderInvoiceRecord.getTotalElecAmount())
.totalServiceAmount(orderInvoiceRecord.getTotalServiceAmount())
.createTime(DateUtils.formatDateTime(orderInvoiceRecord.getCreateTime()))
.build()
);
}

View File

@@ -0,0 +1,39 @@
package com.jsowell.common.enums;
public enum InvoiceRecordEnum {
NOT_INVOICED("0", "未开票"),
INVOICED("1", "已开票"),
;
private String value;
private String label;
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
InvoiceRecordEnum(String value, String label) {
this.value = value;
this.label = label;
}
public static String getLabel(String value) {
for (InvoiceRecordEnum titleTypeEnum : InvoiceRecordEnum.values()) {
if (titleTypeEnum.getValue().equals(value)) {
return titleTypeEnum.getLabel();
}
}
return "";
}
}

View File

@@ -5,9 +5,26 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class InvoiceRecordVO {
private String status;
private BigDecimal totalAmount;
/**
* 总服务费金额
*/
private BigDecimal totalServiceAmount;
/**
* 总电费金额
*/
private BigDecimal totalElecAmount;
private String createTime;
}