|
@@ -1751,6 +1751,7 @@ public class ExportServiceImpl implements ExportService {
|
|
|
}
|
|
|
List<JSONObject> orderItemList = JSONObject.parseArray(JSONObject.parseObject(row.getGoodsJson()).getString("orderItemList"), JSONObject.class);
|
|
|
BigDecimal balanceAmount = row.getBalancePaymentAmount();
|
|
|
+ BigDecimal divide = balanceAmount.divide(row.getExpectAmount(), 6, BigDecimal.ROUND_HALF_UP);
|
|
|
BigDecimal subBalanceAmount = balanceAmount;
|
|
|
for (int i = 0; i < orderItemList.size(); i++) {
|
|
|
JSONObject json = orderItemList.get(i);
|
|
@@ -1763,7 +1764,6 @@ public class ExportServiceImpl implements ExportService {
|
|
|
BigDecimal realAmount = new BigDecimal(json.get("realAmount").toString());
|
|
|
//处理余额部分
|
|
|
if(balanceAmount.compareTo(BigDecimal.ZERO) > 0){
|
|
|
- BigDecimal divide = realAmount.divide(balanceAmount, 6, BigDecimal.ROUND_HALF_UP);
|
|
|
BigDecimal decimal = realAmount.multiply(divide).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
subBalanceAmount = subBalanceAmount.subtract(decimal);
|
|
|
realAmount = realAmount.subtract(decimal);
|