Commit bee1e435 by huluobin

记录周转命中规则id

parent d22cdb2b
...@@ -43,7 +43,6 @@ public class AutoTurnoverServiceImpl implements AutoTurnoverService { ...@@ -43,7 +43,6 @@ public class AutoTurnoverServiceImpl implements AutoTurnoverService {
//命中的预测规则 //命中的预测规则
DcAutoSalesForecastStageConfig dcAutoSalesForecastStageConfig = dcAutoSalesForecastStageConfigMapper.selectMatchStage(dcAutoTurnover.getBailunSku(), dcAutoTurnover.getWarehouseCode()); DcAutoSalesForecastStageConfig dcAutoSalesForecastStageConfig = dcAutoSalesForecastStageConfigMapper.selectMatchStage(dcAutoTurnover.getBailunSku(), dcAutoTurnover.getWarehouseCode());
dcAutoTurnover.setDcAutoSalesForecastConfigId(dcAutoSalesForecastStageConfig.getConfigId());
//周转天数 //周转天数
/* /*
...@@ -56,6 +55,7 @@ public class AutoTurnoverServiceImpl implements AutoTurnoverService { ...@@ -56,6 +55,7 @@ public class AutoTurnoverServiceImpl implements AutoTurnoverService {
if (dcAutoSalesForecastStageConfig != null) { if (dcAutoSalesForecastStageConfig != null) {
dcAutoTurnover.setDcAutoSalesForecastConfigId(dcAutoSalesForecastStageConfig.getConfigId());
log.info("匹配到一条规则 id:{}", dcAutoSalesForecastStageConfig.getConfigId()); log.info("匹配到一条规则 id:{}", dcAutoSalesForecastStageConfig.getConfigId());
...@@ -120,6 +120,9 @@ public class AutoTurnoverServiceImpl implements AutoTurnoverService { ...@@ -120,6 +120,9 @@ public class AutoTurnoverServiceImpl implements AutoTurnoverService {
} else { } else {
log.info("没有匹配销量预测规则,采用平均销量"); log.info("没有匹配销量预测规则,采用平均销量");
dcAutoTurnover.setDcAutoSalesForecastConfigId(-1);
for (int i = 0; i < turnoverDays; i++) { for (int i = 0; i < turnoverDays; i++) {
if (autoForecastDay >= forecastSalesDetails.size()) { if (autoForecastDay >= forecastSalesDetails.size()) {
forecastSalesDetails.offer(dcAutoTurnover.getDailyWeightedSales() == null ? BigDecimal.ZERO : dcAutoTurnover.getDailyWeightedSales()); forecastSalesDetails.offer(dcAutoTurnover.getDailyWeightedSales() == null ? BigDecimal.ZERO : dcAutoTurnover.getDailyWeightedSales());
......
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