Merge branch 'test' into dev
# Conflicts: # eladmin-system/src/main/java/cn/ysk/cashier/repository/order/TbOrderDetailRepository.java
This commit is contained in:
@@ -13,6 +13,8 @@ public class ShopTableSaleInfoVo {
|
||||
|
||||
private Object tableId;
|
||||
|
||||
private String tableCode;
|
||||
|
||||
private Object tableName;
|
||||
|
||||
private Object areaId;
|
||||
@@ -24,11 +26,12 @@ public class ShopTableSaleInfoVo {
|
||||
private Object orderAmount;
|
||||
|
||||
|
||||
public ShopTableSaleInfoVo(Integer id, Object shopId, Object tableId, Object tableName,
|
||||
public ShopTableSaleInfoVo(Integer id, Object shopId, Object tableId, String tableCode, Object tableName,
|
||||
Object areaId, Object areaName, Object orderCount, Object orderAmount) {
|
||||
this.id = id;
|
||||
this.shopId = shopId;
|
||||
this.tableId = tableId;
|
||||
this.tableCode = tableCode;
|
||||
this.tableName = tableName;
|
||||
this.areaId = areaId;
|
||||
this.areaName = areaName;
|
||||
|
||||
@@ -266,10 +266,10 @@ public class StockV2Vo {
|
||||
this.type = "称重商品";
|
||||
break;
|
||||
case "currentPrice":
|
||||
this.type = "套餐商品/团购卷";
|
||||
this.type = "时价商品";
|
||||
break;
|
||||
case "group":
|
||||
this.type = "时价商品";
|
||||
this.type = "套餐商品/团购卷";
|
||||
break;
|
||||
default:
|
||||
this.type = type;
|
||||
|
||||
@@ -48,10 +48,10 @@ public class StockVo {
|
||||
this.type = "称重商品";
|
||||
break;
|
||||
case "currentPrice":
|
||||
this.type = "套餐商品/团购卷";
|
||||
this.type = "时价商品";
|
||||
break;
|
||||
case "group":
|
||||
this.type = "时价商品";
|
||||
this.type = "套餐商品/团购卷";
|
||||
break;
|
||||
default:
|
||||
this.type = type;
|
||||
|
||||
@@ -152,11 +152,21 @@ public class TbOrderSalesCountByDayVo {
|
||||
count();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public TbOrderSalesCountByDayVo(Long salesNum, Long refNum, Long num, BigDecimal salesAmount, BigDecimal refAmount) {
|
||||
this.salesNum = salesNum;
|
||||
this.refNum = refNum;
|
||||
this.salesAmount = salesAmount;
|
||||
this.refAmount = refAmount;
|
||||
this.num = num;
|
||||
count();
|
||||
}
|
||||
|
||||
public void count(){
|
||||
salesNum=salesNum-refNum;
|
||||
salesAmount=salesAmount.subtract(refAmount);
|
||||
if (salesNum == null) salesNum = 0l;
|
||||
if (refNum == null) refNum = 0l;
|
||||
salesNum = salesNum - refNum;
|
||||
if (salesAmount == null) salesAmount = BigDecimal.ZERO;
|
||||
if (refAmount == null) refAmount = BigDecimal.ZERO;
|
||||
salesAmount = salesAmount.subtract(refAmount);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
package cn.ysk.cashier.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author GYJ
|
||||
*/
|
||||
@Data
|
||||
public class TbOrderSalesCountByTable {
|
||||
private String productName;
|
||||
private String productSkuName;
|
||||
private String cateName;
|
||||
private String unitName;
|
||||
private BigDecimal price;
|
||||
private Long salesNum;
|
||||
private Long refNum;
|
||||
private BigDecimal salesAmount;
|
||||
private BigDecimal refAmount;
|
||||
private Long num;
|
||||
private Integer productId;
|
||||
private Integer productSkuId;
|
||||
private String tableId;
|
||||
|
||||
public TbOrderSalesCountByTable(String productName, String productSkuName, String cateName,String unitName,BigDecimal price,
|
||||
Long salesNum, Long refNum, Long num, BigDecimal salesAmount, BigDecimal refAmount) {
|
||||
this.productName = productName;
|
||||
this.productSkuName = productSkuName;
|
||||
this.cateName = cateName;
|
||||
this.unitName = unitName;
|
||||
this.price = price;
|
||||
this.salesNum = salesNum;
|
||||
this.refNum = refNum;
|
||||
this.salesAmount = salesAmount;
|
||||
this.refAmount = refAmount;
|
||||
this.num = num;
|
||||
count();
|
||||
}
|
||||
|
||||
public TbOrderSalesCountByTable(String productName, String productSkuName, String cateName,String unitName,BigDecimal price,
|
||||
Long salesNum, Long refNum, Long num, BigDecimal salesAmount, BigDecimal refAmount,
|
||||
Integer productId, Integer productSkuId, String tableId) {
|
||||
this.productName = productName;
|
||||
this.productSkuName = productSkuName;
|
||||
this.cateName = cateName;
|
||||
this.unitName = unitName;
|
||||
this.price = price;
|
||||
this.salesNum = salesNum;
|
||||
this.refNum = refNum;
|
||||
this.salesAmount = salesAmount;
|
||||
this.refAmount = refAmount;
|
||||
this.num = num;
|
||||
this.productId = productId;
|
||||
this.productSkuId = productSkuId;
|
||||
this.tableId = tableId;
|
||||
count();
|
||||
}
|
||||
|
||||
public void count(){
|
||||
salesNum=salesNum-refNum;
|
||||
salesAmount=salesAmount.subtract(refAmount);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user