| @@ -194,10 +194,10 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||||
| if (null == record.getDeposit()) { | if (null == record.getDeposit()) { | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "押金不能为空"); | 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"); | 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"); | return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "押金要大于0"); | ||||
| } | } | ||||
| @@ -440,7 +440,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||||
| double priceD = price; | double priceD = price; | ||||
| for (int i = 1; i < size; i++) { | for (int i = 1; i < size; i++) { | ||||
| priceD = priceD + priceD * integers.get(i) / 10000.0; | 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 month = 12; | ||||
| int divide = lease / month; | int divide = lease / month; | ||||
| @@ -551,7 +551,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||||
| instance.add(dayType, extralease); | instance.add(dayType, extralease); | ||||
| instance.add(Calendar.DAY_OF_MONTH, -1); | instance.add(Calendar.DAY_OF_MONTH, -1); | ||||
| wxBillProperty.setEndtime(instance.getTime()); | 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"); | DecimalFormat format = new DecimalFormat("0"); | ||||
| needpay = Integer.parseInt(format.format(needPayDouble)); //分做四舍五入 | |||||
| needpay = Long.parseLong(format.format(needPayDouble)); //分做四舍五入 | |||||
| }else if(i < paycount - 1){//中间周期 | }else if(i < paycount - 1){//中间周期 | ||||
| Date receiveDate = DateUtils.getFirstDayOfNextMonth(startdate,receivePeriod * i); | Date receiveDate = DateUtils.getFirstDayOfNextMonth(startdate,receivePeriod * i); | ||||
| wxBillProperty.setReceiveDate(receiveDate); | wxBillProperty.setReceiveDate(receiveDate); | ||||
| @@ -671,7 +671,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||||
| } | } | ||||
| } | } | ||||
| DecimalFormat format = new DecimalFormat("0"); | DecimalFormat format = new DecimalFormat("0"); | ||||
| needpay = Integer.parseInt(format.format(needPayDouble)); //分做四舍五入 | |||||
| needpay = Long.parseLong(format.format(needPayDouble)); //分做四舍五入 | |||||
| } | } | ||||
| } | } | ||||