package com.matrix.system.hive.statistics; import com.matrix.core.anotations.Extend; import com.matrix.core.tools.DateUtil; import io.swagger.annotations.ApiModelProperty; import org.springframework.format.annotation.DateTimeFormat; import java.math.BigDecimal; import java.util.Date; /** * @author wzy * @date 2021-01-15 **/ public class DailySaleVo { private String dataTime; private String shopName; private BigDecimal shouldPay; private BigDecimal totalPay; private BigDecimal cashPay; private BigDecimal cardPay; private BigDecimal arrearsPay; private BigDecimal refundCashPay; private BigDecimal refundCardPay; private BigDecimal productAchieve; private BigDecimal cardAchieve; private BigDecimal refund; private BigDecimal perCustomCnt; private BigDecimal customGoodsCnt; private BigDecimal perCustomPrice; private BigDecimal cost; private BigDecimal grossProfit; private BigDecimal grossProfitRate; private BigDecimal consumePay; private BigDecimal freeConsumePay; private BigDecimal peopleCnt; private BigDecimal projConsumeCnt; private BigDecimal timeLength; /** * 当天销售总数量 */ private Integer totalSaleCnt; /** * 家居产品成本 */ private BigDecimal goodsCost; /** * 除家具产品以外成本 */ private BigDecimal otherCost; private BigDecimal wechat; private BigDecimal alipay; private BigDecimal cash; private BigDecimal bankCard; private BigDecimal tuan; private BigDecimal cardBj; private BigDecimal cardFree; private BigDecimal arrears; @Extend @DateTimeFormat(pattern = DateUtil.DATE_FORMAT_DD) private Date beginTime; @Extend @DateTimeFormat(pattern = DateUtil.DATE_FORMAT_DD) private Date endTime; private Long shopId; public BigDecimal getShouldPay() { return shouldPay; } public void setShouldPay(BigDecimal shouldPay) { this.shouldPay = shouldPay; } public BigDecimal getWechat() { return wechat; } public void setWechat(BigDecimal wechat) { this.wechat = wechat; } public BigDecimal getAlipay() { return alipay; } public void setAlipay(BigDecimal alipay) { this.alipay = alipay; } public BigDecimal getCash() { return cash; } public void setCash(BigDecimal cash) { this.cash = cash; } public BigDecimal getBankCard() { return bankCard; } public void setBankCard(BigDecimal bankCard) { this.bankCard = bankCard; } public BigDecimal getTuan() { return tuan; } public void setTuan(BigDecimal tuan) { this.tuan = tuan; } public BigDecimal getCardBj() { return cardBj; } public void setCardBj(BigDecimal cardBj) { this.cardBj = cardBj; } public BigDecimal getCardFree() { return cardFree; } public void setCardFree(BigDecimal cardFree) { this.cardFree = cardFree; } public BigDecimal getArrears() { return arrears; } public void setArrears(BigDecimal arrears) { this.arrears = arrears; } public String getShopName() { return shopName; } public void setShopName(String shopName) { this.shopName = shopName; } public Date getBeginTime() { return beginTime; } public void setBeginTime(Date beginTime) { this.beginTime = beginTime; } public Date getEndTime() { return endTime; } public void setEndTime(Date endTime) { this.endTime = endTime; } public Long getShopId() { return shopId; } public void setShopId(Long shopId) { this.shopId = shopId; } public Integer getTotalSaleCnt() { return totalSaleCnt; } public void setTotalSaleCnt(Integer totalSaleCnt) { this.totalSaleCnt = totalSaleCnt; } public BigDecimal getGoodsCost() { return goodsCost; } public void setGoodsCost(BigDecimal goodsCost) { this.goodsCost = goodsCost; } public BigDecimal getOtherCost() { return otherCost; } public void setOtherCost(BigDecimal otherCost) { this.otherCost = otherCost; } public String getDataTime() { return DateUtil.dateToString(DateUtil.stringToDate(dataTime, DateUtil.DATE_FORMAT_DD),DateUtil.DATE_FORMAT_DD); } public void setDataTime(String dataTime) { this.dataTime = dataTime; } public BigDecimal getTotalPay() { return totalPay; } public void setTotalPay(BigDecimal totalPay) { this.totalPay = totalPay; } public BigDecimal getCashPay() { return cashPay; } public void setCashPay(BigDecimal cashPay) { this.cashPay = cashPay; } public BigDecimal getCardPay() { return cardPay; } public void setCardPay(BigDecimal cardPay) { this.cardPay = cardPay; } public BigDecimal getArrearsPay() { return arrearsPay; } public void setArrearsPay(BigDecimal arrearsPay) { this.arrearsPay = arrearsPay; } public BigDecimal getFreeConsumePay() { return freeConsumePay; } public void setFreeConsumePay(BigDecimal freeConsumePay) { this.freeConsumePay = freeConsumePay; } public BigDecimal getConsumePay() { return consumePay; } public void setConsumePay(BigDecimal consumePay) { this.consumePay = consumePay; } public BigDecimal getRefundCashPay() { return refundCashPay; } public void setRefundCashPay(BigDecimal refundCashPay) { this.refundCashPay = refundCashPay; } public BigDecimal getRefundCardPay() { return refundCardPay; } public void setRefundCardPay(BigDecimal refundCardPay) { this.refundCardPay = refundCardPay; } public BigDecimal getProductAchieve() { return productAchieve; } public void setProductAchieve(BigDecimal productAchieve) { this.productAchieve = productAchieve; } public BigDecimal getCardAchieve() { return cardAchieve; } public void setCardAchieve(BigDecimal cardAchieve) { this.cardAchieve = cardAchieve; } public BigDecimal getRefund() { return refund; } public void setRefund(BigDecimal refund) { this.refund = refund; } public BigDecimal getPerCustomCnt() { return perCustomCnt; } public void setPerCustomCnt(BigDecimal perCustomCnt) { this.perCustomCnt = perCustomCnt; } public BigDecimal getCustomGoodsCnt() { if (BigDecimal.ZERO.compareTo(perCustomCnt) != 0) { return new BigDecimal(totalSaleCnt).divide(perCustomCnt, 2, BigDecimal.ROUND_DOWN); } else { return BigDecimal.ZERO; } } public void setCustomGoodsCnt(BigDecimal customGoodsCnt) { this.customGoodsCnt = customGoodsCnt; } public BigDecimal getPerCustomPrice() { if (perCustomCnt.compareTo(BigDecimal.ZERO) != 0) { return totalPay.divide(perCustomCnt, 2, BigDecimal.ROUND_DOWN); } else { return BigDecimal.ZERO; } } public void setPerCustomPrice(BigDecimal perCustomPrice) { this.perCustomPrice = perCustomPrice; } public BigDecimal getCost() { return goodsCost.add(otherCost); } public void setCost(BigDecimal cost) { this.cost = cost; } public BigDecimal getGrossProfit() { return totalPay.subtract(getCost()); } public void setGrossProfit(BigDecimal grossProfit) { this.grossProfit = grossProfit; } public BigDecimal getGrossProfitRate() { if (totalPay.compareTo(BigDecimal.ZERO) != 0) { return getGrossProfit().divide(totalPay, 2, BigDecimal.ROUND_DOWN); } else { return BigDecimal.ZERO; } } public void setGrossProfitRate(BigDecimal grossProfitRate) { this.grossProfitRate = grossProfitRate; } public BigDecimal getPeopleCnt() { return peopleCnt; } public void setPeopleCnt(BigDecimal peopleCnt) { this.peopleCnt = peopleCnt; } public BigDecimal getProjConsumeCnt() { return projConsumeCnt; } public void setProjConsumeCnt(BigDecimal projConsumeCnt) { this.projConsumeCnt = projConsumeCnt; } public BigDecimal getTimeLength() { return timeLength; } public void setTimeLength(BigDecimal timeLength) { this.timeLength = timeLength; } }