From 39854ed874e1f38ce3f192ca8e0362a826cfdd55 Mon Sep 17 00:00:00 2001
From: yanghb <yangbhwork@163.com>
Date: 星期五, 25 四月 2025 14:35:47 +0800
Subject: [PATCH] fix: 修改字段
---
cz-bussiness/src/main/java/com/ruoyi/bussiness/service/impl/PlacementBatchServiceImpl.java | 44 ++++++++++++++++++++------------------------
1 files changed, 20 insertions(+), 24 deletions(-)
diff --git a/cz-bussiness/src/main/java/com/ruoyi/bussiness/service/impl/PlacementBatchServiceImpl.java b/cz-bussiness/src/main/java/com/ruoyi/bussiness/service/impl/PlacementBatchServiceImpl.java
index 756b09e..15ac4dc 100644
--- a/cz-bussiness/src/main/java/com/ruoyi/bussiness/service/impl/PlacementBatchServiceImpl.java
+++ b/cz-bussiness/src/main/java/com/ruoyi/bussiness/service/impl/PlacementBatchServiceImpl.java
@@ -378,26 +378,23 @@
(existing, replacement) -> existing
));
for (PlacementBatchAsset record : assetRecords) {
- if(record.getChecks() == 1){
+ if (record.getChecks() == 1) {
continue;
}
//未通过安置申请
if (placementApplyRecordService.countPassIdCard(record.getIdCard()) == 0) {
record.setHouseholdHeadWarn(1);
- }else{
+ } else {
record.setHouseholdHeadWarn(0);
}
//赔偿金额(判断新购房还是二手房,这两个只能存在一个)
- if (record.getPriceNewAmount().compareTo(BigDecimal.ZERO) == 0 &&
- record.getPriceOldAmount().compareTo(BigDecimal.ZERO) == 0) {
+ if (ObjUtil.isNotEmpty(record.getPriceNewAmount())
+ && ObjUtil.isNotEmpty(record.getPriceOldAmount())) {
record.setPriceAmountWarn(1);
- }else{
- record.setPriceAmountWarn(0);
- }
- if (record.getPriceNewAmount().compareTo(BigDecimal.ZERO) > 0 &&
- record.getPriceOldAmount().compareTo(BigDecimal.ZERO) > 0) {
+ } else if (ObjUtil.isEmpty(record.getPriceNewAmount())
+ && ObjUtil.isEmpty(record.getPriceOldAmount())) {
record.setPriceAmountWarn(1);
- }else{
+ } else {
record.setPriceAmountWarn(0);
}
//拆迁时间
@@ -406,7 +403,7 @@
continue;
}
//自主购房补贴、过渡补贴(如果购房情况异常则不判定自主购房补贴是否异常,自主购房补贴、过渡补贴 依赖赔偿金额信息)
- if (record.getPriceAmountWarn() == 0) {
+ if (record.getPriceAmountWarn() == 0 && record.getPriceAmountWarn() == 0) {
boolean warnFlag = compensateService.compensateBuyCalculateV2(applyRecord.getDemolitionTime(),
record.getStreet(),
applyRecord.getOrgArea(), applyRecord.getNoOrgArea(),
@@ -417,14 +414,14 @@
//过渡补贴
if (compensateService.compensateSubsidyCalculate(applyRecord.getCurrentCount(), record.getSubsidyAmount())) {
record.setSubsidyAmountWarn(0);
- }else{
+ } else {
record.setSubsidyAmountWarn(1);
}
//首付款警告
boolean downPaymentAmountWarn = true;
BigDecimal cateAmount = record.getCompensationAmount().multiply(new BigDecimal("0.25"));
- if(cateAmount.compareTo(record.getDownPaymentAmount()) == 0){
+ if (cateAmount.compareTo(record.getDownPaymentAmount()) == 0) {
downPaymentAmountWarn = false;
}
record.setDownPaymentAmountWarn(downPaymentAmountWarn ? 1 : 0);
@@ -492,19 +489,18 @@
}
record.setWaitFamilyAreaWarn(warn ? 0 : 1);
- //赔偿金额(判断新购房还是二手房,这两个只能存在一个)
- if (record.getCompensationNewAmount().compareTo(BigDecimal.ZERO) == 0 &&
- record.getCompensationOldAmount().compareTo(BigDecimal.ZERO) == 0) {
+ //判断是否两个都填写了
+ if (ObjUtil.isNotEmpty(record.getCompensationOldAmount())
+ && ObjUtil.isNotEmpty(record.getCompensationNewAmount())) {
record.setCompensationAmountWarn(1);
- }else{
+ }else if(ObjUtil.isEmpty(record.getCompensationNewAmount())
+ && ObjUtil.isEmpty(record.getCompensationOldAmount())){
+ record.setCompensationAmountWarn(1);
+ } else {
record.setCompensationAmountWarn(0);
}
- if (record.getCompensationNewAmount().compareTo(BigDecimal.ZERO) > 0 &&
- record.getCompensationOldAmount().compareTo(BigDecimal.ZERO) > 0) {
- record.setCompensationAmountWarn(1);
- }else{
- record.setCompensationAmountWarn(0);
- }
+
+
BigDecimal orgArea = placementApplyRecord == null ? BigDecimal.ZERO : placementApplyRecord.getOrgArea();
BigDecimal noOrgArea = placementApplyRecord == null ? BigDecimal.ZERO : placementApplyRecord.getNoOrgArea();
//自主购房补贴、过渡补贴(如果购房情况异常则不判定自主购房补贴是否异常,自主购房补贴、过渡补贴 依赖赔偿金额信息)
@@ -519,7 +515,7 @@
//过渡补贴
if (compensateService.compensateSubsidyCalculate(record.getCurrentCount(), record.getSubsidyAmount())) {
record.setSubsidyAmountWarn(0);
- }else{
+ } else {
record.setSubsidyAmountWarn(1);
}
}
--
Gitblit v1.7.1