Commit 60cb1218 by wutong

自动周转加权日均销量不乘以倍数.

parent c74cfd01
...@@ -1063,9 +1063,9 @@ public class AutoTurnoverJob extends PointJob { ...@@ -1063,9 +1063,9 @@ public class AutoTurnoverJob extends PointJob {
dcAutoConfigSafeInventory = autoConfigSafeInventoryMapper.selectOneByExample(DcAutoConfigSafeInventoryExample.newAndCreateCriteria().andVariableCodeEqualTo("").andWarehouseCodeEqualTo(warehouseCode).andStatusEqualTo(1).andTypeEqualTo(3).example()); dcAutoConfigSafeInventory = autoConfigSafeInventoryMapper.selectOneByExample(DcAutoConfigSafeInventoryExample.newAndCreateCriteria().andVariableCodeEqualTo("").andWarehouseCodeEqualTo(warehouseCode).andStatusEqualTo(1).andTypeEqualTo(3).example());
if (dcAutoConfigSafeInventory != null) { if (dcAutoConfigSafeInventory != null) {
weightingAvgSales = caculateWeightingAvgSales(dcAutoConfigSafeInventory.getWeightingCoefficientSeven(), dcAutoConfigSafeInventory.getWeightingCoefficientFourteen(), dcAutoConfigSafeInventory.getWeightingCoefficientThirty(), historyThirtySalesList); weightingAvgSales = caculateWeightingAvgSales(dcAutoConfigSafeInventory.getWeightingCoefficientSeven(), dcAutoConfigSafeInventory.getWeightingCoefficientFourteen(), dcAutoConfigSafeInventory.getWeightingCoefficientThirty(), historyThirtySalesList);
//进来这里就存一份 乘倍数后的加权日均销量,小于0.8就置0 0.8-1 之间就置1
weightingAvgSales = weightingAvgSales.multiply(dcAutoConfigSafeInventory.getParam()).setScale(3, RoundingMode.HALF_EVEN);
dcAutoTurnover.setDailyWeightedSales(weightingAvgSales); dcAutoTurnover.setDailyWeightedSales(weightingAvgSales);
//乘倍数后的加权日均销量,小于0.8就置0 0.8-1 之间就置1
weightingAvgSales = weightingAvgSales.multiply(dcAutoConfigSafeInventory.getParam()).setScale(3, RoundingMode.HALF_EVEN);
if (weightingAvgSales.compareTo(BigDecimal.valueOf(0.8)) == -1 ){ if (weightingAvgSales.compareTo(BigDecimal.valueOf(0.8)) == -1 ){
weightingAvgSales = BigDecimal.ZERO; weightingAvgSales = BigDecimal.ZERO;
} else if (weightingAvgSales.compareTo(BigDecimal.ONE) <= 0){ } else if (weightingAvgSales.compareTo(BigDecimal.ONE) <= 0){
......
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