|
@@ -139,7 +139,7 @@ public class BizOrderServiceImpl extends ServiceImpl<BizOrderMapper, BizOrder> i
|
|
if(ObjectUtil.isNull(bizGoodsConf)){
|
|
if(ObjectUtil.isNull(bizGoodsConf)){
|
|
throw new CommonException("未查询到时间段信息!");
|
|
throw new CommonException("未查询到时间段信息!");
|
|
}
|
|
}
|
|
- if(bizOrderAddParam.getOrderWeight().multiply(new BigDecimal(1000)).compareTo(new BigDecimal(bizGoodsConf.getLastWeight())) > 0 ){
|
|
|
|
|
|
+ if(bizOrderAddParam.getOrderWeight().multiply(new BigDecimal(1000)).compareTo(bizGoodsConf.getLastWeight()) > 0 ){
|
|
throw new CommonException("当前时间段货品余量不足!");
|
|
throw new CommonException("当前时间段货品余量不足!");
|
|
}
|
|
}
|
|
BizOrder bizOrder = BeanUtil.toBean(bizOrderAddParam, BizOrder.class);
|
|
BizOrder bizOrder = BeanUtil.toBean(bizOrderAddParam, BizOrder.class);
|
|
@@ -152,7 +152,7 @@ public class BizOrderServiceImpl extends ServiceImpl<BizOrderMapper, BizOrder> i
|
|
this.save(bizOrder);
|
|
this.save(bizOrder);
|
|
|
|
|
|
//修改时段配置内物品重量
|
|
//修改时段配置内物品重量
|
|
- bizGoodsConfService.editUsedWeight(bizGoodsConf.getId(),bizOrderAddParam.getOrderWeight().multiply(new BigDecimal(1000)).doubleValue());
|
|
|
|
|
|
+ bizGoodsConfService.editUsedWeight(bizGoodsConf.getId(),bizOrderAddParam.getOrderWeight().multiply(new BigDecimal(1000)));
|
|
|
|
|
|
//修改销售订单状态
|
|
//修改销售订单状态
|
|
if(ObjectUtil.isNotEmpty(bizOrderAddParam.getSaleOrderInfo())){
|
|
if(ObjectUtil.isNotEmpty(bizOrderAddParam.getSaleOrderInfo())){
|
|
@@ -175,7 +175,7 @@ public class BizOrderServiceImpl extends ServiceImpl<BizOrderMapper, BizOrder> i
|
|
BizOrder bizOrder = this.queryEntity(bizOrderEditParam.getId());
|
|
BizOrder bizOrder = this.queryEntity(bizOrderEditParam.getId());
|
|
if(bizOrder.getOrderWeight().compareTo(bizOrderEditParam.getOrderWeight().multiply(new BigDecimal(1000))) != 0 ){
|
|
if(bizOrder.getOrderWeight().compareTo(bizOrderEditParam.getOrderWeight().multiply(new BigDecimal(1000))) != 0 ){
|
|
if(bizOrderEditParam.getOrderWeight().multiply(new BigDecimal(1000)).
|
|
if(bizOrderEditParam.getOrderWeight().multiply(new BigDecimal(1000)).
|
|
- compareTo(new BigDecimal(bizGoodsConf.getLastWeight()).add(bizOrder.getOrderWeight())) > 0 ){
|
|
|
|
|
|
+ compareTo(bizGoodsConf.getLastWeight().add(bizOrder.getOrderWeight())) > 0 ){
|
|
throw new CommonException("当前时间段货品余量不足!");
|
|
throw new CommonException("当前时间段货品余量不足!");
|
|
}
|
|
}
|
|
|
|
|
|
@@ -183,10 +183,10 @@ public class BizOrderServiceImpl extends ServiceImpl<BizOrderMapper, BizOrder> i
|
|
//旧的提货时段
|
|
//旧的提货时段
|
|
BizGoodsConf goodsConf = bizGoodsConfService.getById(bizOrder.getDeliveryTimeId());
|
|
BizGoodsConf goodsConf = bizGoodsConfService.getById(bizOrder.getDeliveryTimeId());
|
|
//修改时段配置内物品重量
|
|
//修改时段配置内物品重量
|
|
- bizGoodsConfService.editUsedWeight(goodsConf.getId(),bizOrder.getOrderWeight().negate().doubleValue());
|
|
|
|
|
|
+ bizGoodsConfService.editUsedWeight(goodsConf.getId(),bizOrder.getOrderWeight().negate());
|
|
|
|
|
|
//修改新时段
|
|
//修改新时段
|
|
- bizGoodsConfService.editUsedWeight(bizGoodsConf.getId(),bizOrderEditParam.getOrderWeight().multiply(new BigDecimal(1000)).doubleValue());
|
|
|
|
|
|
+ bizGoodsConfService.editUsedWeight(bizGoodsConf.getId(),bizOrderEditParam.getOrderWeight().multiply(new BigDecimal(1000)));
|
|
|
|
|
|
}else{
|
|
}else{
|
|
if(!StringUtils.equals(bizOrderEditParam.getDeliveryTimeId(),bizOrder.getDeliveryTimeId())){
|
|
if(!StringUtils.equals(bizOrderEditParam.getDeliveryTimeId(),bizOrder.getDeliveryTimeId())){
|
|
@@ -194,10 +194,10 @@ public class BizOrderServiceImpl extends ServiceImpl<BizOrderMapper, BizOrder> i
|
|
//旧的提货时段
|
|
//旧的提货时段
|
|
BizGoodsConf goodsConf = bizGoodsConfService.getById(bizOrder.getDeliveryTimeId());
|
|
BizGoodsConf goodsConf = bizGoodsConfService.getById(bizOrder.getDeliveryTimeId());
|
|
//修改时段配置内物品重量
|
|
//修改时段配置内物品重量
|
|
- bizGoodsConfService.editUsedWeight(goodsConf.getId(),bizOrder.getOrderWeight().negate().doubleValue());
|
|
|
|
|
|
+ bizGoodsConfService.editUsedWeight(goodsConf.getId(),bizOrder.getOrderWeight().negate());
|
|
|
|
|
|
//修改新时段
|
|
//修改新时段
|
|
- bizGoodsConfService.editUsedWeight(bizGoodsConf.getId(),bizOrderEditParam.getOrderWeight().multiply(new BigDecimal(1000)).doubleValue());
|
|
|
|
|
|
+ bizGoodsConfService.editUsedWeight(bizGoodsConf.getId(),bizOrderEditParam.getOrderWeight().multiply(new BigDecimal(1000)));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//判断是否修改订单
|
|
//判断是否修改订单
|
|
@@ -240,7 +240,7 @@ public class BizOrderServiceImpl extends ServiceImpl<BizOrderMapper, BizOrder> i
|
|
BizGoodsConf bizGoodsConf = bizGoodsConfService.getById(bizOrder.getDeliveryTimeId());
|
|
BizGoodsConf bizGoodsConf = bizGoodsConfService.getById(bizOrder.getDeliveryTimeId());
|
|
if(ObjectUtil.isNotNull(bizGoodsConf)){
|
|
if(ObjectUtil.isNotNull(bizGoodsConf)){
|
|
//修改时段配置内物品重量
|
|
//修改时段配置内物品重量
|
|
- bizGoodsConfService.editUsedWeight(bizGoodsConf.getId(),bizOrder.getOrderWeight().negate().doubleValue());
|
|
|
|
|
|
+ bizGoodsConfService.editUsedWeight(bizGoodsConf.getId(),bizOrder.getOrderWeight().negate());
|
|
}
|
|
}
|
|
|
|
|
|
//查询销售订单信息
|
|
//查询销售订单信息
|