Commit d16de264 authored by Tong Li's avatar Tong Li

MP

parent 2275c355
This diff is collapsed.
This diff is collapsed.
...@@ -10,14 +10,21 @@ public class SalesDemand { ...@@ -10,14 +10,21 @@ public class SalesDemand {
private final Period period; private final Period period;
private final double quantity; // 需求总量 private final double quantity; // 需求总量
private final double priority; // 需求优先级 private final double priority; // 需求优先级
private final String demandOrderId; // 来源订单ID (ApsDemandOrder.id), 可空
public SalesDemand(Product product, StockingPoint stockingPoint, Period period, public SalesDemand(Product product, StockingPoint stockingPoint, Period period,
double quantity, double priority) { double quantity, double priority) {
this(product, stockingPoint, period, quantity, priority, null);
}
public SalesDemand(Product product, StockingPoint stockingPoint, Period period,
double quantity, double priority, String demandOrderId) {
this.product = product; this.product = product;
this.stockingPoint = stockingPoint; this.stockingPoint = stockingPoint;
this.period = period; this.period = period;
this.quantity = quantity; this.quantity = quantity;
this.priority = priority; this.priority = priority;
this.demandOrderId = demandOrderId;
} }
public Product getProduct() { return product; } public Product getProduct() { return product; }
...@@ -25,6 +32,7 @@ public class SalesDemand { ...@@ -25,6 +32,7 @@ public class SalesDemand {
public Period getPeriod() { return period; } public Period getPeriod() { return period; }
public double getQuantity() { return quantity; } public double getQuantity() { return quantity; }
public double getPriority() { return priority; } public double getPriority() { return priority; }
public String getDemandOrderId() { return demandOrderId; }
public String getKey() { public String getKey() {
return product.getId() + "_" + stockingPoint.getId() + "_" + period.getIndex(); return product.getId() + "_" + stockingPoint.getId() + "_" + period.getIndex();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment