From 6e4c84d578bfe22e72371e99baadd43297b1a889 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Thu, 20 Jun 2019 18:43:09 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[BUG][=E4=BF=AE=E6=94=B9][=E7=89=A9?= =?UTF-8?q?=E4=B8=9A=E5=90=88=E5=90=8Cadd=E6=97=B6=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E6=98=AF=E5=90=88=E5=B9=B6=E5=90=88=E5=90=8C=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E4=B8=BA=E6=84=8F=E5=90=910]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WxPropertyContractServiceImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 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 c1b756059..8188c4997 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java @@ -278,7 +278,11 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService Date date = new Date(); record.setCreatetime(date); record.setUpdatetime(date); - record.setStatus(EnumRentContractStatus.WAIT_SIGN.getCode()); + if (record.getOperationType().equals(EnumContractOperationType.WHOLE.getCode())) { + record.setStatus(EnumRentContractStatus.INTENTION.getCode()); + } else { + record.setStatus(EnumRentContractStatus.WAIT_SIGN.getCode()); + } record.setApplyStatus(EnumRentContractAppStatus.DEFAULT.getCode()); try { wxPropertyContractMapper.insertSelective(record); @@ -326,7 +330,6 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService record.setPrice(record.getPrice() != null ? record.getPrice() : 0); record.setDeposit(record.getDeposit() != null ? record.getDeposit() : 0); record.setUpdatetime(new Date()); - record.setStatus(EnumRentContractStatus.WAIT_SIGN.getCode()); try { wxPropertyContractMapper.updateByPrimaryKeySelective(record); } catch (Exception e) { From 72dbe579a626849b81a7165fe0c612bbd2321d83 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Thu, 20 Jun 2019 20:28:36 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[BUG][=E4=BF=AE=E6=94=B9][=E5=95=86?= =?UTF-8?q?=E9=93=BA=E7=A7=9F=E8=B5=81=E5=90=88=E5=90=8C=20--=20=20?= =?UTF-8?q?=E8=B4=A6=E5=8D=95=E9=87=91=E9=A2=9D=E5=9C=A8=E6=8C=89=E5=9B=BA?= =?UTF-8?q?=E5=AE=9A=E9=87=91=E9=A2=9D=E9=80=92=E5=A2=9E=E5=90=8E=E3=80=82?= =?UTF-8?q?=20=E6=B2=A1=E6=9C=89=E5=8F=98=E5=8C=96]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/WxRentContractServiceImpl.java | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 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 5438f2d60..24f68b239 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -820,7 +820,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { for (int j = 0; j < arraySize; j++) { rentInfoObject = rentInfoArray.getJSONObject(j); adjustRatio = rentInfoObject.getJSONArray("adjustRatio"); - BigDecimal price = new BigDecimal(priceList.get(i)[j]).add(new BigDecimal(adjustRatio.getString(i))); + BigDecimal price = new BigDecimal(priceList.get(i)[j]).add(new BigDecimal(adjustRatio.getString(i)).multiply(new BigDecimal(100))); priceArrs[j] = price.setScale(0, RoundingMode.HALF_EVEN).longValue(); } priceList.add(priceArrs); @@ -869,10 +869,18 @@ public class WxRentContractServiceImpl implements WxRentContractService { priceArrs = new long[size]; priceArrs[0] = price; BigDecimal priceD = new BigDecimal(price); - for (int i = 1; i < size; i++) { - BigDecimal divide = priceD.multiply(new BigDecimal(integers.get(i))).divide(new BigDecimal(10000)); - priceD = priceD.add(divide); - priceArrs[i] = priceD.setScale(0, RoundingMode.HALF_EVEN).longValue(); + if (wxRentContract.getAdjustRatioWay().equals(EnumRentContractAdjustRatioWay.RATIO.getCode())) { + for (int i = 1; i < size; i++) { + BigDecimal divide = priceD.multiply(new BigDecimal(integers.get(i))).divide(new BigDecimal(10000)); + priceD = priceD.add(divide); + priceArrs[i] = priceD.setScale(0, RoundingMode.HALF_EVEN).longValue(); + } + } else { + for (int i = 1; i < size; i++) { + BigDecimal divide = priceD.add(new BigDecimal(integers.get(i))); + priceD = priceD.add(divide); + priceArrs[i] = priceD.setScale(0, RoundingMode.HALF_EVEN).longValue(); + } } }