Browse Source

大数字类型除法修复

master
dimengzhe 2 years ago
parent
commit
e771ba38c1
  1. 10
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java

10
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorder/BusSalesOrderService.java

@ -152,10 +152,8 @@ import com.yxt.anrui.portal.api.sysuser.SysUserVo;
import com.yxt.anrui.portal.api.sysuser.app.AppUserOrgInfoVo;
import com.yxt.anrui.portal.config.DictCommonType;
import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutions;
import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutionsDto;
import com.yxt.anrui.riskcenter.api.loansolutions.LoanSolutionsFeign;
import com.yxt.anrui.riskcenter.api.loansolutions.app.SolutionsDetailsVo;
import com.yxt.anrui.riskcenter.api.loansolutions.app.SolutionsDto;
import com.yxt.anrui.riskcenter.api.loansolutionsdetail.LoanSolutionsDetail;
import com.yxt.anrui.riskcenter.api.loansolutionsdetail.LoanSolutionsDetailFeign;
import com.yxt.anrui.riskcenter.api.loansolutionsotherpolicy.LoanSolutionsOtherpolicy;
@ -549,7 +547,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
}
if (StringUtils.isNotBlank(totalValue.toString())) {
if (busSalesOrderPriceDetailsVo != null) {
BigDecimal discountA = totalValue.divide(new BigDecimal(busSalesOrderPriceDetailsVo.getQuantity()));
BigDecimal discountA = totalValue.divide(new BigDecimal(busSalesOrderPriceDetailsVo.getQuantity()),BigDecimal.ROUND_CEILING);
bigDecimalSing = bigDecimalSing.add(discountA);
}
}
@ -3383,7 +3381,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
}
if (StringUtils.isNotBlank(vo.getTotaldiscount())) {
if (priceInfo != null) {
BigDecimal discountA = new BigDecimal(vo.getTotaldiscount()).divide(new BigDecimal(priceInfo.getNumber()));
BigDecimal discountA = new BigDecimal(vo.getTotaldiscount()).divide(new BigDecimal(priceInfo.getNumber()),BigDecimal.ROUND_CEILING);
bigDecimalSing = bigDecimalSing.add(discountA);
}
}
@ -3494,7 +3492,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
BigDecimal oneAll = BigDecimal.ZERO;
if (StringUtils.isNotBlank(vo.getTotaldiscount())) {
//总优惠/台数
oneAll = new BigDecimal(vo.getTotaldiscount()).divide(new BigDecimal(priceInfo.getNumber()));
oneAll = new BigDecimal(vo.getTotaldiscount()).divide(new BigDecimal(priceInfo.getNumber()),BigDecimal.ROUND_CEILING);
if (oneAll.compareTo(BigDecimal.ZERO) > 0) {
pkgPrice = "-¥" + oneAll.toString();
} else {
@ -4788,7 +4786,7 @@ public class BusSalesOrderService extends MybatisBaseService<BusSalesOrderMapper
if ("02".equals(key)) {
String makeUpAll = depositInfo.getMakeUpDeposit();
if (makeUpAll != null) {
bigDecimalKeyAll = bigDecimalKeyAll.add(new BigDecimal(makeUpAll).divide(new BigDecimal(num)));
bigDecimalKeyAll = bigDecimalKeyAll.add(new BigDecimal(makeUpAll).divide(new BigDecimal(num),BigDecimal.ROUND_CEILING));
}
} else {
bigDecimalKeyAll = bigDecimalKeyAll.add(new BigDecimal(depositInfo.getDeposit()));

Loading…
Cancel
Save