From beecbfa7165533f3740fb3ff8aa544da18cd6ae8 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期一, 19 七月 2021 15:32:40 +0800
Subject: [PATCH] 优化 加入租金和 套内面积功能
---
java110-core/src/main/java/com/java110/core/smo/impl/ComputeFeeSMOImpl.java | 77 +++++++++++++++++++++++++++++++++++---
1 files changed, 70 insertions(+), 7 deletions(-)
diff --git a/java110-core/src/main/java/com/java110/core/smo/impl/ComputeFeeSMOImpl.java b/java110-core/src/main/java/com/java110/core/smo/impl/ComputeFeeSMOImpl.java
index 7de3ffe..67e7838 100755
--- a/java110-core/src/main/java/com/java110/core/smo/impl/ComputeFeeSMOImpl.java
+++ b/java110-core/src/main/java/com/java110/core/smo/impl/ComputeFeeSMOImpl.java
@@ -256,7 +256,13 @@
} else if ("2002".equals(computingFormula)) { // 鍥哄畾璐圭敤
feeReceiptDetailPo.setArea("");
feeReceiptDetailPo.setSquarePrice(feeDto.getAdditionalAmount());
- } else if ("4004".equals(computingFormula)) {
+ } else if ("3003".equals(computingFormula)) { // 鍥哄畾璐圭敤
+ feeReceiptDetailPo.setArea(roomDtos.get(0).getRoomArea());
+ feeReceiptDetailPo.setSquarePrice(feeDto.getSquarePrice() + "/" + feeDto.getAdditionalAmount());
+ } else if ("1101".equals(computingFormula)) { // 绉熼噾
+ feeReceiptDetailPo.setArea("");
+ feeReceiptDetailPo.setSquarePrice(roomDto.getRoomRent());
+ }else if ("4004".equals(computingFormula)) {
} else if ("5005".equals(computingFormula)) {
if (StringUtil.isEmpty(feeDto.getCurDegrees())) {
} else {
@@ -310,7 +316,13 @@
} else if ("2002".equals(computingFormula)) { // 鍥哄畾璐圭敤
feeReceiptDetailPo.setArea("");
feeReceiptDetailPo.setSquarePrice(feeDto.getAdditionalAmount());
- } else if ("4004".equals(computingFormula)) {
+ } else if ("3003".equals(computingFormula)) { // 鍥哄畾璐圭敤
+ feeReceiptDetailPo.setArea("");
+ feeReceiptDetailPo.setSquarePrice("0");
+ } else if ("1101".equals(computingFormula)) { // 绉熼噾
+ feeReceiptDetailPo.setArea("");
+ feeReceiptDetailPo.setSquarePrice("0");
+ }else if ("4004".equals(computingFormula)) {
} else if ("5005".equals(computingFormula)) {
if (StringUtil.isEmpty(feeDto.getCurDegrees())) {
} else {
@@ -372,7 +384,21 @@
} else if ("2002".equals(computingFormula)) { // 鍥哄畾璐圭敤
feeReceiptDetailPo.setArea("");
feeReceiptDetailPo.setSquarePrice(feeDto.getAdditionalAmount());
- } else if ("4004".equals(computingFormula)) {
+ } else if ("3003".equals(computingFormula)) { // 鍥哄畾璐圭敤
+ BigDecimal builtUpArea = new BigDecimal(0);
+ for (ContractRoomDto tmpContractRoomDto : contractRoomDtos) {
+ builtUpArea = builtUpArea.add(new BigDecimal(Double.parseDouble(tmpContractRoomDto.getRoomArea())));
+ }
+ feeReceiptDetailPo.setArea(builtUpArea.doubleValue() + "");
+ feeReceiptDetailPo.setSquarePrice(feeDto.getSquarePrice() + "/" + feeDto.getAdditionalAmount());
+ } else if ("1101".equals(computingFormula)) { // 绉熼噾
+ BigDecimal builtUpArea = new BigDecimal(0);
+ for (ContractRoomDto tmpContractRoomDto : contractRoomDtos) {
+ builtUpArea = builtUpArea.add(new BigDecimal(Double.parseDouble(tmpContractRoomDto.getRoomRent())));
+ }
+ feeReceiptDetailPo.setArea(builtUpArea.doubleValue() + "");
+ feeReceiptDetailPo.setSquarePrice(feeDto.getSquarePrice() + "/" + feeDto.getAdditionalAmount());
+ }else if ("4004".equals(computingFormula)) {
} else if ("5005".equals(computingFormula)) {
if (StringUtil.isEmpty(feeDto.getCurDegrees())) {
} else {
@@ -754,7 +780,15 @@
//feePrice = Double.parseDouble(feeDto.getAdditionalAmount());
BigDecimal additionalAmount = new BigDecimal(Double.parseDouble(tmpReportFeeDto.getAdditionalAmount()));
feePrice = additionalAmount.setScale(2, BigDecimal.ROUND_HALF_EVEN);
- } else if ("4004".equals(computingFormula)) {
+ } else if ("3003".equals(computingFormula)) { // 鍥哄畾璐圭敤
+ BigDecimal squarePrice = new BigDecimal(Double.parseDouble(tmpReportFeeDto.getSquarePrice()));
+ BigDecimal builtUpArea = new BigDecimal(Double.parseDouble(tmpReportFeeDto.getRoomArea()));
+ BigDecimal additionalAmount = new BigDecimal(Double.parseDouble(tmpReportFeeDto.getAdditionalAmount()));
+ feePrice = squarePrice.multiply(builtUpArea).add(additionalAmount).setScale(3, BigDecimal.ROUND_HALF_EVEN);
+ } else if ("1101".equals(computingFormula)) { // 绉熼噾
+ BigDecimal additionalAmount = new BigDecimal(Double.parseDouble(tmpReportFeeDto.getRoomRent()));
+ feePrice = additionalAmount.setScale(3, BigDecimal.ROUND_HALF_EVEN);
+ }else if ("4004".equals(computingFormula)) {
feePrice = new BigDecimal(Double.parseDouble(tmpReportFeeDto.getAmount()));
} else if ("5005".equals(computingFormula)) {
if (StringUtil.isEmpty(tmpReportFeeDto.getCurDegrees())) {
@@ -801,7 +835,12 @@
//feePrice = Double.parseDouble(feeDto.getAdditionalAmount());
BigDecimal additionalAmount = new BigDecimal(Double.parseDouble(tmpReportFeeDto.getAdditionalAmount()));
feePrice = additionalAmount.setScale(2, BigDecimal.ROUND_HALF_EVEN);
- } else if ("4004".equals(computingFormula)) {
+ } else if ("3003".equals(computingFormula)) { // 鍥哄畾璐圭敤
+ //feePrice = Double.parseDouble(feeDto.getAdditionalAmount());
+ feePrice = new BigDecimal(0);
+ } else if ("1101".equals(computingFormula)) { // 绉熼噾
+ feePrice = new BigDecimal(0);
+ }else if ("4004".equals(computingFormula)) {
feePrice = new BigDecimal(Double.parseDouble(tmpReportFeeDto.getAmount()));
} else if ("5005".equals(computingFormula)) {
if (StringUtil.isEmpty(tmpReportFeeDto.getCurDegrees())) {
@@ -870,6 +909,14 @@
//feePrice = Double.parseDouble(feeDto.getAdditionalAmount());
BigDecimal additionalAmount = new BigDecimal(Double.parseDouble(feeDto.getAdditionalAmount()));
feePrice = additionalAmount.setScale(3, BigDecimal.ROUND_HALF_EVEN);
+ } else if ("3003".equals(computingFormula)) { // 鍥哄畾璐圭敤
+ BigDecimal squarePrice = new BigDecimal(Double.parseDouble(feeDto.getSquarePrice()));
+ BigDecimal builtUpArea = new BigDecimal(Double.parseDouble(roomDto.getRoomArea()));
+ BigDecimal additionalAmount = new BigDecimal(Double.parseDouble(feeDto.getAdditionalAmount()));
+ feePrice = squarePrice.multiply(builtUpArea).add(additionalAmount).setScale(3, BigDecimal.ROUND_HALF_EVEN);
+ } else if ("1101".equals(computingFormula)) { // 绉熼噾
+ BigDecimal additionalAmount = new BigDecimal(Double.parseDouble(roomDto.getRoomRent()));
+ feePrice = additionalAmount.setScale(3, BigDecimal.ROUND_HALF_EVEN);
} else if ("4004".equals(computingFormula)) { //鍔ㄦ�佽垂鐢�
feePrice = new BigDecimal(Double.parseDouble(feeDto.getAmount()));
} else if ("5005".equals(computingFormula)) { //(鏈湡搴︽暟-涓婃湡搴︽暟)*鍗曚环+闄勫姞璐�
@@ -931,7 +978,15 @@
//feePrice = Double.parseDouble(feeDto.getAdditionalAmount());
BigDecimal additionalAmount = new BigDecimal(Double.parseDouble(feeDto.getAdditionalAmount()));
feePrice = additionalAmount.setScale(2, BigDecimal.ROUND_HALF_EVEN);
- } else if ("4004".equals(computingFormula)) {
+ } else if ("3003".equals(computingFormula)) { // 鍥哄畾璐圭敤
+ BigDecimal squarePrice = new BigDecimal(Double.parseDouble(feeDto.getSquarePrice()));
+ BigDecimal builtUpArea = new BigDecimal(Double.parseDouble(roomDto.getRoomArea()));
+ BigDecimal additionalAmount = new BigDecimal(Double.parseDouble(feeDto.getAdditionalAmount()));
+ feePrice = squarePrice.multiply(builtUpArea).add(additionalAmount).setScale(3, BigDecimal.ROUND_HALF_EVEN);
+ } else if ("1101".equals(computingFormula)) { // 绉熼噾
+ BigDecimal additionalAmount = new BigDecimal(Double.parseDouble(roomDto.getRoomRent()));
+ feePrice = additionalAmount.setScale(3, BigDecimal.ROUND_HALF_EVEN);
+ }else if ("4004".equals(computingFormula)) {
feePrice = new BigDecimal(Double.parseDouble(feeDto.getAmount()));
} else if ("5005".equals(computingFormula)) {
if (StringUtil.isEmpty(feeDto.getCurDegrees())) {
@@ -991,7 +1046,15 @@
// BigDecimal roomDount = new BigDecimal(contractRoomDtos.size());
// additionalAmount = additionalAmount.multiply(roomDount);
feePrice = additionalAmount.setScale(3, BigDecimal.ROUND_HALF_EVEN);
- } else if ("4004".equals(computingFormula)) { //鍔ㄦ�佽垂鐢�
+ } else if ("3003".equals(computingFormula)) { // 鍥哄畾璐圭敤
+ BigDecimal squarePrice = new BigDecimal(Double.parseDouble(feeDto.getSquarePrice()));
+ BigDecimal builtUpArea = new BigDecimal(Double.parseDouble(roomDto.getRoomArea()));
+ BigDecimal additionalAmount = new BigDecimal(Double.parseDouble(feeDto.getAdditionalAmount()));
+ feePrice = squarePrice.multiply(builtUpArea).add(additionalAmount).setScale(3, BigDecimal.ROUND_HALF_EVEN);
+ } else if ("1101".equals(computingFormula)) { // 绉熼噾
+ BigDecimal additionalAmount = new BigDecimal(Double.parseDouble(roomDto.getRoomRent()));
+ feePrice = additionalAmount.setScale(3, BigDecimal.ROUND_HALF_EVEN);
+ }else if ("4004".equals(computingFormula)) { //鍔ㄦ�佽垂鐢�
feePrice = new BigDecimal(Double.parseDouble(feeDto.getAmount()));
} else if ("5005".equals(computingFormula)) { //(鏈湡搴︽暟-涓婃湡搴︽暟)*鍗曚环+闄勫姞璐�
if (StringUtil.isEmpty(feeDto.getCurDegrees())) {
--
Gitblit v1.8.0