123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- package org.springblade.modules.mall.vo;
- import io.swagger.annotations.ApiModelProperty;
- import lombok.Data;
- import org.springblade.common.enums.GoodsSourceEnum;
- import org.springblade.common.enums.ZoneTypeEnum;
- import java.math.BigDecimal;
- import java.util.Date;
- /**
- * 销售信息
- */
- @Data
- public class SalesVO {
- @ApiModelProperty(value = "日期")
- private String time;
- @ApiModelProperty(value = "创建时间")
- private Date createTime;
- @ApiModelProperty(value = "来源")
- private String source;
- @ApiModelProperty(value = "来源名称")
- private String sourceName;
- @ApiModelProperty(value = "品牌名称")
- private String brandName;
- @ApiModelProperty(value = "商品名称")
- private String goodsName;
- @ApiModelProperty(value = "规格Id")
- private String specId;
- @ApiModelProperty(value = "规格名称")
- private String goodsSpecNames;
- @ApiModelProperty(value = "名称字符串")
- private String nameStr;
- @ApiModelProperty(value = "销售价格")
- private String salePrice;
- @ApiModelProperty(value = "协议价格")
- private String agreementPrice;
- @ApiModelProperty(value = "销售数量")
- private String totalNum;
- @ApiModelProperty(value = "应收金额")
- private BigDecimal receivableAmount=BigDecimal.ZERO;
- @ApiModelProperty(value = "抵扣金额")
- private BigDecimal deductionAmount=BigDecimal.ZERO;
- @ApiModelProperty(value = "实收金额")
- private BigDecimal paidInAmount=BigDecimal.ZERO;
- @ApiModelProperty(value = "专区类型")
- private Integer zoneType;
- @ApiModelProperty(value = "专区类型名称")
- private String zoneTypeName;
- public String getNameStr() {
- StringBuilder sb = new StringBuilder();
- if (this.brandName != null) {
- sb.append(this.brandName);
- }
- if (this.goodsName != null) {
- sb.append(this.goodsName);
- }
- if (this.goodsSpecNames != null) {
- sb.append(this.goodsSpecNames);
- }
- return sb.toString();
- }
- public String getSourceName() {
- return GoodsSourceEnum.getNameByValue(source);
- }
- public String getZoneTypeName() {
- return ZoneTypeEnum.getNameByValue(zoneType);
- }
- public BigDecimal getPaidInAmount() {
- return receivableAmount.subtract(deductionAmount);
- }
- }
|