| | |
| | | private Integer waitFamilyAreaWarn; |
| | | |
| | | @ApiModelProperty(value = "补偿金额-新建商品住房、商业用房、停车位") |
| | | private BigDecimal compensationNewAmount; |
| | | private String compensationNewAmount; |
| | | |
| | | @ApiModelProperty(value = "补偿金额-二手住房") |
| | | private BigDecimal compensationOldAmount; |
| | | private String compensationOldAmount; |
| | | |
| | | @ApiModelProperty(value = "多个购房活动警告(0正常 1异常)") |
| | | private Integer compensationAmountWarn; |
| | |
| | | private Integer waitFamilyAreaWarn; |
| | | |
| | | @ApiModelProperty(value = "补偿单价标准-新建商品房、商业用") |
| | | private BigDecimal priceNewAmount; |
| | | private String priceNewAmount; |
| | | |
| | | @ApiModelProperty(value = "补偿单价标准-二手住房") |
| | | private BigDecimal priceOldAmount; |
| | | private String priceOldAmount; |
| | | |
| | | @ApiModelProperty(value = "多个购房情况警告(新建房和二手住房都录入了)") |
| | | private Integer twoPriceWarn; |
| | |
| | | private Integer waitFamilyAreaWarn; |
| | | |
| | | @ApiModelProperty(value = "补偿金额 - 新建商品住房、商业用房、停车位") |
| | | private BigDecimal compensationNewAmount; |
| | | private String compensationNewAmount; |
| | | |
| | | @ApiModelProperty(value = "补偿金额 - 二手住房") |
| | | private BigDecimal compensationOldAmount; |
| | | private String compensationOldAmount; |
| | | |
| | | @ApiModelProperty(value = "多个购房情况警告") |
| | | private Integer compensationAmountWarn; |
| | |
| | | private BigDecimal compensationNewAmount; |
| | | |
| | | @ApiModelProperty(value = "补偿金额(万元)-二手住房") |
| | | @ExcelProperty(value = {"补偿金额(万元)","二手住房"}, index = 15, converter = BigDecimalConverter.class) |
| | | private BigDecimal compensationOldAmount; |
| | | @ExcelProperty(value = {"补偿金额(万元)","二手住房"}, index = 15, converter = StringConverter.class) |
| | | private String compensationOldAmount; |
| | | |
| | | @ApiModelProperty(value = "补偿金额(合计)") |
| | | @ExcelProperty(value = {"补偿金额(万元)","合计"}, index = 16, converter = BigDecimalConverter.class) |
| | | private BigDecimal compensationSum; |
| | | @ExcelProperty(value = {"补偿金额(万元)","合计"}, index = 16, converter = StringConverter.class) |
| | | private String compensationSum; |
| | | |
| | | @ApiModelProperty(value = "25%首付款(万元)") |
| | | @ExcelProperty(value = "25%首付款(万元)", index = 17, converter = BigDecimalConverter.class) |
| | |
| | | exampleData.setWaitFamilyNames("示例外家庭成员"); |
| | | exampleData.setWaitFamilyArea(new BigDecimal("100.50")); |
| | | exampleData.setCompensationNewAmount(new BigDecimal("500.00")); |
| | | exampleData.setCompensationOldAmount(new BigDecimal("300.00")); |
| | | exampleData.setCompensationSum(new BigDecimal("800.00")); |
| | | exampleData.setCompensationOldAmount("300.00"); |
| | | exampleData.setCompensationSum("800.00"); |
| | | exampleData.setDownPaymentAmount(new BigDecimal("200.00")); |
| | | exampleData.setQuarterPayAmount(new BigDecimal("50.00")); |
| | | exampleData.setSubsidyAmount(new BigDecimal("100.00")); |
| | |
| | | @ApiModelProperty(value = "所有家庭人员应安置面积(m²)") |
| | | private BigDecimal resettledArea; |
| | | |
| | | @ExcelProperty(value = {"补偿单价标准", "新建商品房、商业用房、停车位"}, index = 7, converter = BigDecimalConverter.class) |
| | | @ExcelProperty(value = {"补偿单价标准", "新建商品房、商业用房、停车位"}, index = 7, converter = StringConverter.class) |
| | | @ApiModelProperty(value = "补偿单价标准-新建商品房、商业用房、停车位") |
| | | private BigDecimal priceNewAmount; |
| | | private String priceNewAmount; |
| | | |
| | | @ExcelProperty(value = {"补偿单价标准", "二手住房"}, index = 8, converter = BigDecimalConverter.class) |
| | | @ExcelProperty(value = {"补偿单价标准", "二手住房"}, index = 8, converter = StringConverter.class) |
| | | @ApiModelProperty(value = "补偿单价标准-二手住房") |
| | | private BigDecimal priceOldAmount; |
| | | private String priceOldAmount; |
| | | |
| | | @ExcelProperty(value = "补偿总价(万元)", index = 9, converter = BigDecimalConverter.class) |
| | | @ApiModelProperty(value = "补偿总价(万元)") |
| | |
| | | exampleData.setIdCard("123456789012345678"); |
| | | exampleData.setResettledNum(3); |
| | | exampleData.setResettledArea(new BigDecimal("120.5")); |
| | | exampleData.setPriceNewAmount(new BigDecimal("20000")); |
| | | exampleData.setPriceOldAmount(new BigDecimal("15000")); |
| | | exampleData.setPriceNewAmount("20000"); |
| | | exampleData.setPriceOldAmount("15000"); |
| | | exampleData.setCompensationAmount(new BigDecimal("330.75")); |
| | | exampleData.setDownPaymentAmount(new BigDecimal("82.6875")); |
| | | exampleData.setQuarterPayAmount(new BigDecimal("25")); |
| | |
| | | @ApiModelProperty(value = "待安置人员应安置面积合计(m²)") |
| | | private BigDecimal waitFamilyArea; |
| | | |
| | | @ExcelProperty(value = {"补偿金额(万元)", "新建商品住房、商业用房、停车位"}, index = 12, converter = BigDecimalConverter.class) |
| | | @ExcelProperty(value = {"补偿金额(万元)", "新建商品住房、商业用房、停车位"}, index = 12, converter = StringConverter.class) |
| | | @ApiModelProperty(value = "补偿金额 - 新建商品住房、商业用房、停车位") |
| | | private BigDecimal compensationNewAmount; |
| | | private String compensationNewAmount; |
| | | |
| | | @ExcelProperty(value = {"补偿金额(万元)", "二手住房"}, index = 13, converter = BigDecimalConverter.class) |
| | | @ExcelProperty(value = {"补偿金额(万元)", "二手住房"}, index = 13, converter = StringConverter.class) |
| | | @ApiModelProperty(value = "补偿金额 - 二手住房") |
| | | private BigDecimal compensationOldAmount; |
| | | private String compensationOldAmount; |
| | | |
| | | @ExcelProperty(value = {"补偿金额(万元)", "合计"}, index = 14, converter = BigDecimalConverter.class) |
| | | @ApiModelProperty(value = "补偿金额(合计)") |
| | |
| | | exampleData.setCurrentCount(3); |
| | | exampleData.setWaitFamilyNames("李四,王五"); |
| | | exampleData.setWaitFamilyArea(new BigDecimal("100.00")); |
| | | exampleData.setCompensationNewAmount(new BigDecimal("200.00")); |
| | | exampleData.setCompensationOldAmount(new BigDecimal("150.00")); |
| | | exampleData.setCompensationNewAmount("200"); |
| | | exampleData.setCompensationOldAmount("250"); |
| | | exampleData.setCompensationSum(new BigDecimal("350.00")); |
| | | exampleData.setDownPaymentAmount(new BigDecimal("87.50")); |
| | | exampleData.setQuarterPayAmount(new BigDecimal("25.00")); |
| | |
| | | */ |
| | | boolean compensateBuyCalculateV2(Date time, String street, |
| | | BigDecimal orgArea,BigDecimal noOrgArea, |
| | | BigDecimal compensationNewAmount,BigDecimal compensationOldAmount, |
| | | String compensationNewAmount,String compensationOldAmount, |
| | | BigDecimal money); |
| | | |
| | | /** |
| | |
| | | public boolean compensateBuyCalculateV2( |
| | | Date time, String street, |
| | | BigDecimal orgArea,BigDecimal noOrgArea, |
| | | BigDecimal compensationNewAmount,BigDecimal compensationOldAmount, |
| | | String compensationNewAmount,String compensationOldAmount, |
| | | BigDecimal money |
| | | ) { |
| | | List<Compensate> compensates = this.list(); |
| | |
| | | //14年之前 |
| | | if (time.before(date)) { |
| | | if ("崇阳街道、崇庆街道、羊马街道、大划街道".contains(street)) { |
| | | if (compensationNewAmount.compareTo(BigDecimal.ZERO) > 0) { |
| | | if (ObjUtil.isNotEmpty(compensationNewAmount)) { |
| | | //14年之前 专属街道 集体 新建房 |
| | | orgPrice = configMap.get(CompensateEnum.BEFORE_BUY_ORG_APPOINT1.getCode()); |
| | | //14年之前 专属街道 非集体 新建房 |
| | | noOrgPrice = configMap.get(CompensateEnum.BEFORE_BUY_NO_ORG_APPOINT1.getCode()); |
| | | } |
| | | if (compensationOldAmount.compareTo(BigDecimal.ZERO) > 0) { |
| | | if (ObjUtil.isNotEmpty(compensationOldAmount)) { |
| | | //14年之前 专属街道 集体 二手房 |
| | | orgPrice = configMap.get(CompensateEnum.BEFORE_BUY_ORG_APPOINT2.getCode()); |
| | | //14年之前 专属街道 非集体 二手房 |
| | | noOrgPrice = configMap.get(CompensateEnum.BEFORE_BUY_NO_ORG_APPOINT2.getCode()); |
| | | } |
| | | } else { |
| | | if (compensationNewAmount.compareTo(BigDecimal.ZERO) > 0) { |
| | | if (ObjUtil.isNotEmpty(compensationNewAmount)) { |
| | | //14年之前 其余街道 集体 新建房 |
| | | orgPrice = configMap.get(CompensateEnum.BEFORE_BUY_ORG_OTHER1.getCode()); |
| | | //14年之前 其余街道 非集体 新建房 |
| | | noOrgPrice = configMap.get(CompensateEnum.BEFORE_BUY_NO_ORG_OTHER1.getCode()); |
| | | } |
| | | if (compensationOldAmount.compareTo(BigDecimal.ZERO) > 0) { |
| | | if (ObjUtil.isNotEmpty(compensationOldAmount)) { |
| | | //14年之前 其余街道 集体 二手房 |
| | | orgPrice = configMap.get(CompensateEnum.BEFORE_BUY_ORG_OTHER2.getCode()); |
| | | //14年之前 其余街道 非集体 二手房 |
| | |
| | | } |
| | | }else{ |
| | | if ("崇阳街道、崇庆街道、羊马街道、大划街道".contains(street)) { |
| | | if (compensationNewAmount.compareTo(BigDecimal.ZERO) > 0) { |
| | | if (ObjUtil.isNotEmpty(compensationNewAmount)) { |
| | | //14年之前 专属街道 集体 新建房 |
| | | orgPrice = configMap.get(CompensateEnum.AFTER_BUY_ORG_APPOINT1.getCode()); |
| | | //14年之前 专属街道 非集体 新建房 |
| | | noOrgPrice = configMap.get(CompensateEnum.AFTER_BUY_NO_ORG_APPOINT1.getCode()); |
| | | } |
| | | if (compensationOldAmount.compareTo(BigDecimal.ZERO) > 0) { |
| | | if (ObjUtil.isNotEmpty(compensationOldAmount)) { |
| | | //14年之前 专属街道 集体 二手房 |
| | | orgPrice = configMap.get(CompensateEnum.AFTER_BUY_ORG_APPOINT2.getCode()); |
| | | //14年之前 专属街道 非集体 二手房 |
| | | noOrgPrice = configMap.get(CompensateEnum.AFTER_BUY_NO_ORG_APPOINT2.getCode()); |
| | | } |
| | | } else { |
| | | if (compensationNewAmount.compareTo(BigDecimal.ZERO) > 0) { |
| | | if (ObjUtil.isNotEmpty(compensationNewAmount)) { |
| | | //14年之前 其他街道 集体 新建房 |
| | | orgPrice = configMap.get(CompensateEnum.AFTER_BUY_ORG_OTHER1.getCode()); |
| | | //14年之前 其他街道 非集体 新建房 |
| | | noOrgPrice = configMap.get(CompensateEnum.AFTER_BUY_NO_ORG_OTHER1.getCode()); |
| | | } |
| | | if (compensationOldAmount.compareTo(BigDecimal.ZERO) > 0) { |
| | | if (ObjUtil.isNotEmpty(compensationOldAmount)) { |
| | | //14年之前 其他街道 集体 二手房 |
| | | orgPrice = configMap.get(CompensateEnum.AFTER_BUY_ORG_OTHER2.getCode()); |
| | | //14年之前 其他街道 非集体 二手房 |
| | |
| | | import com.ruoyi.system.service.ISysNoticeService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.security.core.parameters.P; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | return; |
| | | } |
| | | for (PlacementApplyRecord record : records) { |
| | | if(record.getChecks() == 1){ |
| | | if (record.getChecks() == 1) { |
| | | //已核对直接跳过 |
| | | continue; |
| | | } |
| | |
| | | if (count == 0) { |
| | | //安置表户主信息不存在 |
| | | record.setIdCardExistsWarn(1); |
| | | }else{ |
| | | } else { |
| | | record.setIdCardExistsWarn(0); |
| | | } |
| | | //判断户主是否重名 |
| | |
| | | BigDecimal waitFamilyArea = record.getWaitFamilyArea(); |
| | | // Integer currentCollectiveNum = record.getCurrentCollectiveNum(); |
| | | // Integer currentNoCollectiveNum = record.getCurrentNoCollectiveNum(); |
| | | boolean warn = compensateService.compensateSettleAreaCalculate(record.getOrgArea(),record.getNoOrgArea(), waitFamilyArea); |
| | | boolean warn = compensateService.compensateSettleAreaCalculate(record.getOrgArea(), record.getNoOrgArea(), waitFamilyArea); |
| | | if (warn) { |
| | | record.setWaitFamilyAreaWarn(0); |
| | | }else{ |
| | | } else { |
| | | record.setWaitFamilyAreaWarn(1); |
| | | } |
| | | |
| | | //赔偿金额(判断新购房还是二手房,这两个只能存在一个) |
| | | if (record.getCompensationNewAmount().compareTo(BigDecimal.ZERO) == 0 && |
| | | record.getCompensationOldAmount().compareTo(BigDecimal.ZERO) == 0) { |
| | | 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) { |
| | | } else if (ObjUtil.isNotEmpty(record.getCompensationNewAmount()) && |
| | | ObjUtil.isNotEmpty(record.getCompensationOldAmount())) { |
| | | record.setCompensationAmountWarn(1); |
| | | }else{ |
| | | record.setCompensationAmountWarn(0); |
| | |
| | | //过渡补贴 |
| | | if (compensateService.compensateSubsidyCalculate(record.getCurrentCount(), record.getSubsidyAmount())) { |
| | | record.setSubsidyAmountWarn(0); |
| | | }else{ |
| | | } else { |
| | | record.setSubsidyAmountWarn(1); |
| | | } |
| | | } |
| | |
| | | BigDecimal quarterPayAmount = (record.getCompensationSum().subtract(pay)).divide(new BigDecimal("20"), 10, RoundingMode.DOWN); |
| | | if (quarterPayAmount.compareTo(record.getQuarterPayAmount()) != 0) { |
| | | record.setQuarterPayAmountWarn(1); |
| | | }else{ |
| | | } else { |
| | | record.setQuarterPayAmountWarn(0); |
| | | } |
| | | |
| | | //首付款警告 |
| | | boolean downPaymentAmountWarn = true; |
| | | BigDecimal cateAmount = record.getCompensationSum().multiply(new BigDecimal("0.25")); |
| | | if(cateAmount.compareTo(record.getDownPaymentAmount()) == 0){ |
| | | if (cateAmount.compareTo(record.getDownPaymentAmount()) == 0) { |
| | | downPaymentAmountWarn = false; |
| | | } |
| | | record.setDownPaymentAmountWarn(downPaymentAmountWarn ? 1 : 0); |
| | |
| | | (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); |
| | | } |
| | | //拆迁时间 |
| | |
| | | continue; |
| | | } |
| | | //自主购房补贴、过渡补贴(如果购房情况异常则不判定自主购房补贴是否异常,自主购房补贴、过渡补贴 依赖赔偿金额信息) |
| | | if (record.getPriceAmountWarn() == 0) { |
| | | if (record.getPriceAmountWarn() == 0 && record.getPriceAmountWarn() == 0) { |
| | | boolean warnFlag = compensateService.compensateBuyCalculateV2(applyRecord.getDemolitionTime(), |
| | | record.getStreet(), |
| | | applyRecord.getOrgArea(), applyRecord.getNoOrgArea(), |
| | |
| | | //过渡补贴 |
| | | 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); |
| | |
| | | } |
| | | 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(); |
| | | //自主购房补贴、过渡补贴(如果购房情况异常则不判定自主购房补贴是否异常,自主购房补贴、过渡补贴 依赖赔偿金额信息) |
| | |
| | | //过渡补贴 |
| | | if (compensateService.compensateSubsidyCalculate(record.getCurrentCount(), record.getSubsidyAmount())) { |
| | | record.setSubsidyAmountWarn(0); |
| | | }else{ |
| | | } else { |
| | | record.setSubsidyAmountWarn(1); |
| | | } |
| | | } |