From 79fa8b52083a5d005fb283b1ef439263903bf104 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Thu, 25 Apr 2019 18:44:18 +0800 Subject: [PATCH] =?UTF-8?q?[BUG][ID1001405][=E4=BA=91=E7=AB=AF=EF=BC=9Aver?= =?UTF-8?q?sion:.978.1416=E5=95=86=E9=93=BA=E7=89=A9=E4=B8=9A=E5=92=8C?= =?UTF-8?q?=E5=A4=9A=E7=BB=8F=E7=9A=84=E7=A7=9F=E8=B5=81=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E6=95=B0=E8=BF=87=E5=A4=A7=E4=BC=9A=E6=88=90=E8=B4=9F=E6=95=B0?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E9=99=90=E5=88=B6]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WxPropertyContractServiceImpl.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java index c6c51838d..3747f59a5 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java @@ -194,10 +194,10 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService if (null == record.getDeposit()) { return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "押金不能为空"); } - if (record.getPrice().intValue() <= 0) { + if (record.getPrice().longValue() <= 0) { return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "物业费要大于0"); } - if (record.getDeposit().intValue() <= 0) { + if (record.getDeposit().longValue() <= 0) { return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "押金要大于0"); } @@ -440,7 +440,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService double priceD = price; for (int i = 1; i < size; i++) { priceD = priceD + priceD * integers.get(i) / 10000.0; - priceArr[i] = new BigDecimal(priceD).setScale(0, RoundingMode.HALF_EVEN).intValue(); + priceArr[i] = new BigDecimal(priceD).setScale(0, RoundingMode.HALF_EVEN).longValue(); } int month = 12; int divide = lease / month; @@ -551,7 +551,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService instance.add(dayType, extralease); instance.add(Calendar.DAY_OF_MONTH, -1); wxBillProperty.setEndtime(instance.getTime()); - needpay = price * extralease; + needpay = new BigDecimal(price).multiply(new BigDecimal(extralease)).longValue(); } //自然月,开始日期、缴款日,结束日期 @@ -597,7 +597,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService } } DecimalFormat format = new DecimalFormat("0"); - needpay = Integer.parseInt(format.format(needPayDouble)); //分做四舍五入 + needpay = Long.parseLong(format.format(needPayDouble)); //分做四舍五入 }else if(i < paycount - 1){//中间周期 Date receiveDate = DateUtils.getFirstDayOfNextMonth(startdate,receivePeriod * i); wxBillProperty.setReceiveDate(receiveDate); @@ -671,7 +671,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService } } DecimalFormat format = new DecimalFormat("0"); - needpay = Integer.parseInt(format.format(needPayDouble)); //分做四舍五入 + needpay = Long.parseLong(format.format(needPayDouble)); //分做四舍五入 } }