| @@ -16,6 +16,7 @@ import com.iformall.enums.*; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.mapper.*; | |||
| import com.iformall.service.*; | |||
| import com.iformall.service.helper.WxRentContractHelper; | |||
| import com.iformall.utils.DateUtils; | |||
| import org.apache.commons.collections.map.HashedMap; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| @@ -745,7 +746,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||
| //按日 | |||
| if (wxRentContract.getPriceUnit().equals(EnumPriceUnit.D.getCode())){ | |||
| Double priceD = new Double(price); | |||
| double needpayD = WxRentContractServiceImpl.getNeedPay(0,priceD,startDate,endDate); | |||
| double needpayD = WxRentContractHelper.getNeedPay(0,priceD,startDate,endDate); | |||
| needpay = new Double(needpayD).longValue(); | |||
| }else{ | |||
| //年 需要除12 | |||
| @@ -756,7 +757,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||
| //生成金额直接计算 | |||
| if(!saveDb){ | |||
| needpay = new Double(WxRentContractServiceImpl.getMonthNeedPay(priceD, startDate, endDate,dayType,receivePeriod,false)).longValue(); | |||
| needpay = new Double(WxRentContractHelper.getMonthNeedPay(priceD, startDate, endDate,dayType,receivePeriod,false)).longValue(); | |||
| return needpay; | |||
| } | |||
| @@ -767,34 +768,34 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService | |||
| if(i == billTimeVoListSize - 1){//最后 | |||
| if(sdMR.format(startDate).equals(sdMR.format(wxRentContract.getStartDate())) && sdMR.format(endDate).equals(sdMR.format(wxRentContract.getEndDate())) ){ | |||
| int months = WxRentContractServiceImpl.getMonths(sdM.format(startDate)+"-01",sdM.format(endDate)+"-01"); | |||
| int months = WxRentContractHelper.getMonths(sdM.format(startDate)+"-01",sdM.format(endDate)+"-01"); | |||
| months++; | |||
| needpay = new Double(months * priceD).longValue(); | |||
| }else { | |||
| needpay = new Double(WxRentContractServiceImpl.getMonthNeedPay(priceD, startDate, endDate,dayType,receivePeriod,false)).longValue(); | |||
| needpay = new Double(WxRentContractHelper.getMonthNeedPay(priceD, startDate, endDate,dayType,receivePeriod,false)).longValue(); | |||
| } | |||
| }else if(i == 0){//第一期 | |||
| if(wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())){ | |||
| if(isFirstDay(startDate)){ | |||
| int months = WxRentContractServiceImpl.getMonths(sdM.format(startDate)+"-01",sdM.format(endDate)+"-01"); | |||
| int months = WxRentContractHelper.getMonths(sdM.format(startDate)+"-01",sdM.format(endDate)+"-01"); | |||
| months++; | |||
| needpay = new Double(months * priceD).longValue(); | |||
| }else{ | |||
| needpay = new Double(WxRentContractServiceImpl.getMonthNeedPay(priceD, startDate, endDate,dayType,receivePeriod,false)).longValue(); | |||
| needpay = new Double(WxRentContractHelper.getMonthNeedPay(priceD, startDate, endDate,dayType,receivePeriod,false)).longValue(); | |||
| } | |||
| }else{ | |||
| if(isFirstDay(startDate)){ | |||
| int months = WxRentContractServiceImpl.getMonths(sdM.format(startDate)+"-01",sdM.format(endDate)+"-01"); | |||
| int months = WxRentContractHelper.getMonths(sdM.format(startDate)+"-01",sdM.format(endDate)+"-01"); | |||
| if(isFirstDay(startDate)){ | |||
| months++; | |||
| } | |||
| needpay = new Double(months * priceD).longValue(); | |||
| }else{ | |||
| needpay = new Double(WxRentContractServiceImpl.getMonthNeedPay(priceD, startDate, endDate,dayType,receivePeriod,false)).longValue(); | |||
| needpay = new Double(WxRentContractHelper.getMonthNeedPay(priceD, startDate, endDate,dayType,receivePeriod,false)).longValue(); | |||
| } | |||
| } | |||
| }else{//中间 | |||
| int months = WxRentContractServiceImpl.getMonths(sdM.format(startDate)+"-01",sdM.format(endDate)+"-01"); | |||
| int months = WxRentContractHelper.getMonths(sdM.format(startDate)+"-01",sdM.format(endDate)+"-01"); | |||
| if(isFirstDay(startDate)){ | |||
| months++; | |||
| } | |||