Commit 2f9e7b36 authored by Tong Li's avatar Tong Li

MP-计划时间,周期类型-关联计划周期表,根据计划周期页面的周期类型,增加了年和季度的计算维度

parent 29be9769
......@@ -30,7 +30,7 @@ import org.springframework.context.ApplicationContext;
public class MacroPlannerDataConverterRunner {
public static void main(String[] args) {
String sceneId = (args.length > 0) ? args[0] : "";
String sceneId = (args.length > 0) ? args[0] : "ff8a2f2b-e134-4ec2-8e2e-b77e830c9e64";
System.out.println("===== MACROPLANNER DATA CONVERTER RUNNER START =====");
System.out.println("SceneId: " + sceneId);
......
......@@ -232,7 +232,7 @@ public class DataValidator {
Set<String> opIds = new HashSet<>();
for (Operation op : data.getOperations()) opIds.add(op.getId());
int maxPeriodIdx = data.getPeriods().size() - 1;
// int maxPeriodIdx = data.getPeriods().size() - 1;
// 销售需求
for (SalesDemand sd : data.getSalesDemands()) {
......@@ -242,9 +242,9 @@ public class DataValidator {
if (!spIds.contains(sd.getStockingPoint().getId())) {
errors.add("销售需求引用不存在的库存点: " + sd.getStockingPoint().getId());
}
if (sd.getPeriod().getIndex() > maxPeriodIdx) {
errors.add("销售需求引用不存在的周期: " + sd.getPeriod().getIndex());
}
// if (sd.getPeriod().getIndex() > maxPeriodIdx) {
// errors.add("销售需求引用不存在的周期: " + sd.getPeriod().getIndex());
// }
if (sd.getQuantity() < 0) {
errors.add("销售需求数量不能为负: " + sd.getProduct().getId() + " P" + sd.getPeriod().getIndex());
}
......
......@@ -231,9 +231,9 @@ public class ResultWriter {
writeLog("writeBomStructure");
writeBomStructure(sceneId);
// 工序×物料×周期消耗量持久化
writeLog("writeOperationDemands");
List<OperationDemandResult> opDemands = buildOperationDemandResults();
parquetUtil.write(opDemands, getOptimizationOperationDemand(sceneId), OperationDemandResult.class);
// writeLog("writeOperationDemands");
// List<OperationDemandResult> opDemands = buildOperationDemandResults();
// parquetUtil.write(opDemands, getOptimizationOperationDemand(sceneId), OperationDemandResult.class);
return true;
// try {
......
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