|
@@ -139,19 +139,19 @@ public class IposFeignController extends BaseFeignController {
|
|
|
|
|
|
|
|
//平台金额
|
|
//平台金额
|
|
|
BigDecimal ptDecimal = new BigDecimal(split).multiply(new BigDecimal(detail.getPrice()));
|
|
BigDecimal ptDecimal = new BigDecimal(split).multiply(new BigDecimal(detail.getPrice()));
|
|
|
- BigDecimal valDecimal = new BigDecimal(1);
|
|
|
|
|
|
|
+ BigDecimal valDecimal = new BigDecimal("1");
|
|
|
if(ptDecimal.longValue() > 0){
|
|
if(ptDecimal.longValue() > 0){
|
|
|
valDecimal = ptDecimal;
|
|
valDecimal = ptDecimal;
|
|
|
}
|
|
}
|
|
|
price = price.subtract(valDecimal);
|
|
price = price.subtract(valDecimal);
|
|
|
- ptAmount.add(valDecimal);
|
|
|
|
|
|
|
+ ptAmount = ptAmount.add(valDecimal);
|
|
|
|
|
|
|
|
//团长金额
|
|
//团长金额
|
|
|
if (StringUtil.isNotEmpty(detail.getGroupLeaderMerchantId())) {
|
|
if (StringUtil.isNotEmpty(detail.getGroupLeaderMerchantId())) {
|
|
|
tz.setMerchantId(detail.getGroupLeaderMerchantId());
|
|
tz.setMerchantId(detail.getGroupLeaderMerchantId());
|
|
|
BigDecimal tbd = detail.getGroupCommission().multiply(new BigDecimal(detail.getPrice()));
|
|
BigDecimal tbd = detail.getGroupCommission().multiply(new BigDecimal(detail.getPrice()));
|
|
|
price = price.subtract(tbd);
|
|
price = price.subtract(tbd);
|
|
|
- tzAmount.add(tbd);
|
|
|
|
|
|
|
+ tzAmount = tzAmount.add(tbd);
|
|
|
}
|
|
}
|
|
|
detail.setPrice(price.longValue());
|
|
detail.setPrice(price.longValue());
|
|
|
}
|
|
}
|
|
@@ -172,7 +172,7 @@ public class IposFeignController extends BaseFeignController {
|
|
|
supplierOne.setMerchantId(s);
|
|
supplierOne.setMerchantId(s);
|
|
|
for (SplitDetail detail : oneMaps.get(s)) {
|
|
for (SplitDetail detail : oneMaps.get(s)) {
|
|
|
supplierOneAmount = supplierOneAmount.add(new BigDecimal(detail.getConsignmentPrice()).multiply(proportion));
|
|
supplierOneAmount = supplierOneAmount.add(new BigDecimal(detail.getConsignmentPrice()).multiply(proportion));
|
|
|
- detail.setPrice(detail.getPrice() - detail.getConsignmentPrice());
|
|
|
|
|
|
|
+ detail.setPrice(new BigDecimal(detail.getPrice()).subtract(new BigDecimal(detail.getConsignmentPrice()).multiply(proportion)).longValue());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (supplierOneAmount.compareTo(BigDecimal.ZERO) == 1) {
|
|
if (supplierOneAmount.compareTo(BigDecimal.ZERO) == 1) {
|
|
@@ -210,7 +210,8 @@ public class IposFeignController extends BaseFeignController {
|
|
|
supplier.setMerchantId(s);
|
|
supplier.setMerchantId(s);
|
|
|
for (SplitDetail detail : maps.get(s)) {
|
|
for (SplitDetail detail : maps.get(s)) {
|
|
|
supplierAmount = supplierAmount.add(new BigDecimal(detail.getSettlementPrice()).multiply(proportion));
|
|
supplierAmount = supplierAmount.add(new BigDecimal(detail.getSettlementPrice()).multiply(proportion));
|
|
|
- detail.setPrice(detail.getPrice() - detail.getSettlementPrice());
|
|
|
|
|
|
|
+ detail.setPrice(new BigDecimal(detail.getPrice()).subtract(new BigDecimal(detail.getSettlementPrice()).multiply(proportion)).longValue());
|
|
|
|
|
+ // detail.setPrice(detail.getPrice() - detail.getSettlementPrice());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (supplierAmount.compareTo(BigDecimal.ZERO) == 1) {
|
|
if (supplierAmount.compareTo(BigDecimal.ZERO) == 1) {
|