From 8a0fe0368e3c19549f885b4e9c1e4e1b50293bb0 Mon Sep 17 00:00:00 2001 From: luozukai Date: Thu, 29 Aug 2019 10:51:05 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=90=88=E5=90=8C][=E4=BF=AE=E6=94=B9][?= =?UTF-8?q?=E5=BC=80=E5=8F=91=E8=B4=A6=E5=8D=95=E7=BB=93=E7=AE=97]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/WxRentContractServiceImpl.java | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java index b143e70b3..062701cce 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -1264,23 +1264,20 @@ public class WxRentContractServiceImpl implements WxRentContractService { }else{ Double priceD = new Double(price); - //年 除12 - if(EnumPriceUnit.Y.getCode().equals(wxRentContract.getPriceUnit())){ - priceD = new Double(price)/12; - } - if (wxRentContract.getType().equals(EnumRentContractType.RENT_BY_JOINT.getCode())) { + if (EnumRentContractType.RENT_BY_JOINT.getCode().equals(wxRentContract.getType())) { //设置跳点率为年周期 price不变 if(EnumMissTimeType.PERIOD.getCode().equals(wxRentContract.getBusDiscountTime())){ - if(i == billTimeVoListSize - 1){ - priceD = new Double(price); - }else { - return priceD.longValue(); - } + return priceD.longValue(); } //年或者设置跳点率为年周期 除12 if(EnumMissTimeType.YEAR.getCode().equals(wxRentContract.getBusDiscountTime())){ priceD = new Double(price)/12; } + }else{ + //年 除12 + if(EnumPriceUnit.Y.getCode().equals(wxRentContract.getPriceUnit())){ + priceD = new Double(price)/12; + } } //生成金额直接计算 @@ -1291,7 +1288,6 @@ public class WxRentContractServiceImpl implements WxRentContractService { SimpleDateFormat sdM = new SimpleDateFormat("yyyy-MM"); SimpleDateFormat sdD = new SimpleDateFormat("d"); - SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd"); if(i == billTimeVoListSize - 1){//最后 //判断是否满足整月