lisai17@sina.com 2021-03-16 15:02:34 +08:00
parent 84ca081cf3
commit 08a19b9645
1 changed files with 2 additions and 2 deletions

View File

@ -722,7 +722,7 @@ public class OrderclusterSyncService extends BaseSyncService {
// 客户在所有砂站的未完成的配额中,未执行完成的总金额 // 客户在所有砂站的未完成的配额中,未执行完成的总金额
BigDecimal undo_price = OrderclusterService.me.undoPrice(oldobj.getCustomerId()); BigDecimal undo_price = OrderclusterService.me.undoPrice(oldobj.getCustomerId());
BigDecimal surplus_weight = model.getTotalWeight().subtract(overweight); // 本次修改增加的重量 BigDecimal surplus_weight = model.getTotalWeight().subtract(oldobj.getTotalWeight()); // 本次修改增加的重量
BigDecimal add_total_price = surplus_weight.multiply(oldobj.getUnitPrice()); // 本次修改增加的价格 BigDecimal add_total_price = surplus_weight.multiply(oldobj.getUnitPrice()); // 本次修改增加的价格
BigDecimal plan_total_price = add_total_price.add(undo_price); // 剩余未完成金额加上本次增加的金额 BigDecimal plan_total_price = add_total_price.add(undo_price); // 剩余未完成金额加上本次增加的金额
@ -943,7 +943,7 @@ public class OrderclusterSyncService extends BaseSyncService {
// 客户在所有砂站的未完成的配额中,未执行完成的总金额 // 客户在所有砂站的未完成的配额中,未执行完成的总金额
BigDecimal undo_price = OrderclusterService.me.undoPrice(oldobj.getCustomerId()); BigDecimal undo_price = OrderclusterService.me.undoPrice(oldobj.getCustomerId());
BigDecimal plan_total_price = total_weight.subtract(over_weight).multiply(oldobj.getUnitPrice()).add(undo_price); // 本次转结的量,减去已完成量 BigDecimal plan_total_price = total_weight.subtract(oldobj.getTotalWeight()).multiply(oldobj.getUnitPrice()).add(undo_price); // 本次转结的量,减去已完成量
if (plan_total_price.compareTo(prepayCustomer.getSurplus()) > 0) { if (plan_total_price.compareTo(prepayCustomer.getSurplus()) > 0) {
return Result.failedstr("共计总配额达 %.2f元,客户余额(%.2f元)不足", plan_total_price, prepayCustomer.getSurplus()); return Result.failedstr("共计总配额达 %.2f元,客户余额(%.2f元)不足", plan_total_price, prepayCustomer.getSurplus());