From 682cba11592aa1439eaa37ae2b4770351aeb62b2 Mon Sep 17 00:00:00 2001 From: luozukai Date: Tue, 10 Sep 2019 15:32:04 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E6=94=B9][=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E5=8D=95][=E4=BF=AE=E6=94=B9=E8=B7=B3=E7=82=B9=E7=8E=87?= =?UTF-8?q?=E8=AE=A1=E7=AE=97]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/service/impl/WxFlowServiceImpl.java | 4 ++-- .../service/impl/WxRentContractServiceImpl.java | 10 ++++++---- .../src/main/resources/mapper/WxBillAllMapper.xml | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java index 65e4aa9ab..b4abb970c 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java @@ -311,8 +311,8 @@ public class WxFlowServiceImpl implements WxFlowService { wxBillSettleService.updateFreezeOrStatus(settle.getPayBillIds(),EnumFreezeType.DEF.getCode(),EnumBillRentStatus.PAID.getCode()); }else if(EnumRentContractAppStatus.SETBACK.getCode().intValue() == applyStatus.intValue() || EnumRentContractAppStatus.REJECT.getCode().intValue() == applyStatus.intValue()) { //解冻 - wxBillSettleService.updateFreezeOrStatus(settle.getReceiveBillIds(), EnumFreezeType.DEF.getCode(),EnumBillRentStatus.PAID.getCode()); - wxBillSettleService.updateFreezeOrStatus(settle.getPayBillIds(),EnumFreezeType.DEF.getCode(),EnumBillRentStatus.PAID.getCode()); + wxBillSettleService.updateFreezeOrStatus(settle.getReceiveBillIds(), EnumFreezeType.DEF.getCode(),null); + wxBillSettleService.updateFreezeOrStatus(settle.getPayBillIds(),EnumFreezeType.DEF.getCode(),null); } wxBillSettleMapper.updateByPrimaryKeySelective(wxBillSettle); } 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 9c95294c4..6fb910a79 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -283,7 +283,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { ratioVo.setUseRatio("["); for (int i = 0; i < ratioList.size(); i++) { - BigDecimal revenue = new BigDecimal(revenueLong).divide(new BigDecimal(1000000)).setScale(4, RoundingMode.HALF_EVEN); + BigDecimal revenue = new BigDecimal(revenueLong).divide(new BigDecimal(1000000)).setScale(8, RoundingMode.HALF_EVEN); String e = ratioList.get(i); String[] array = e.split(":"); Integer ratio = Integer.parseInt(array[1]); @@ -316,7 +316,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { if (revenue.compareTo(start) >= 0 && revenue.compareTo(end)<= 0){ ratioVo.setRatio(ratio); ratioVo.setPrice(countPrice(ratioVo.getRatio(),revenueLong,timeType,period,from)); - ratioVo.setUseRatio(ratioVo.getUseRatio()+e+","); + ratioVo.setUseRatio(ratioVo.getUseRatio()+"'"+e+"',"); break; } }else if(e.indexOf(">") >= 0){ @@ -343,7 +343,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { if (revenue.compareTo(end) >= 0){ ratioVo.setRatio(ratio); - ratioVo.setUseRatio(ratioVo.getUseRatio()+e+","); + ratioVo.setUseRatio(ratioVo.getUseRatio()+"'"+e+"',"); //计算超出部分 BigDecimal payRatio = new BigDecimal(ratio).divide(new BigDecimal(10000)); @@ -354,12 +354,14 @@ public class WxRentContractServiceImpl implements WxRentContractService { Integer frontatio = Integer.parseInt(array[1]); revenueArray = array[0].split("-"); - BigDecimal frontEnd = new BigDecimal(0); + BigDecimal frontEnd; if(EnumGetRatioFrom.BILL.getCode().equals(from)){ if(EnumMissTimeType.YEAR.getCode().equals(timeType)){ frontEnd = new BigDecimal(revenueArray[1]).divide(new BigDecimal(365), 10, BigDecimal.ROUND_HALF_DOWN).multiply(new BigDecimal(dayCount)); }else if(EnumMissTimeType.MONTH.getCode().equals(timeType)){ frontEnd = new BigDecimal(revenueArray[1]).divide(new BigDecimal(30), 10, BigDecimal.ROUND_HALF_DOWN).multiply(new BigDecimal(dayCount)); + }else{ + frontEnd = new BigDecimal(revenueArray[1]); } }else{ frontEnd = new BigDecimal(revenueArray[1]); diff --git a/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml b/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml index 97ba1936f..42360c9f4 100644 --- a/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillAllMapper.xml @@ -826,21 +826,22 @@ from ( select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' - endtime,rent_shop_type,shop_info,NULL comments,'' price_detail,updatetime from wx_bill_rent_deposit where + endtime,rent_shop_type,shop_info,NULL comments,'' price_detail,updatetime,freeze from wx_bill_rent_deposit where tenant_id=#{tenantId} union all select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' - endtime,rent_shop_type,shop_info,NULL comments,'' price_detail,updatetime from wx_bill_property_deposit where + endtime,rent_shop_type,shop_info,NULL comments,'' price_detail,updatetime,freeze from wx_bill_property_deposit where tenant_id=#{tenantId} union all select id,merchant_id,shop_id,tenant_id,comments as name,8 bill_type_value,concat('其他押金-',comments) as bill_type,0 as need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime, - rent_shop_type,'[]' shop_info,comments,'' price_detail,updatetime + rent_shop_type,'[]' shop_info,comments,'' price_detail,updatetime,freeze from wx_bill_other_deposit where tenant_id=#{tenantId} ) bill where 1=1 + and bill.freeze = #{freeze} and bill.status = #{status} and bill.merchant_id=#{merchantId}