|
@@ -5,10 +5,12 @@ import cn.hutool.json.*;
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
|
import com.dayou.dto.Address;
|
|
|
import com.dayou.dto.HouseGuarantyTargetDTO;
|
|
|
+import com.dayou.entity.CertificateLandUse;
|
|
|
import com.dayou.entity.HouseGuarantyTarget;
|
|
|
import com.dayou.entity.TmplHouseParagraph;
|
|
|
import com.dayou.enums.HouseTargetTableColumn;
|
|
|
import com.dayou.exception.ErrorCode;
|
|
|
+import org.apache.commons.math3.analysis.function.Add;
|
|
|
|
|
|
import java.lang.reflect.Field;
|
|
|
import java.math.BigDecimal;
|
|
@@ -473,14 +475,14 @@ public class HouseDocumentUtil {
|
|
|
|
|
|
/**
|
|
|
* 一般假设、格式化“是否核对权属原件”
|
|
|
- * @param hasImmovable 是否有不动产权利证
|
|
|
+ * @param certificates 权属证书类型
|
|
|
* @param tmplHouseParagraph 段落模版
|
|
|
* @return
|
|
|
*/
|
|
|
- public static String getCheckOriginCertificate(String isCheckOriginCertificate,String hasImmovable, TmplHouseParagraph tmplHouseParagraph){
|
|
|
+ public static String getCheckOriginCertificate(String isCheckOriginCertificate,List<String> certificates, TmplHouseParagraph tmplHouseParagraph){
|
|
|
if (checkBoolean(isCheckOriginCertificate)){
|
|
|
String paragraph = tmplHouseParagraph.getParagraph();
|
|
|
- return paragraph.replace("{immovable}",hasImmovable);
|
|
|
+ return paragraph.replace("{certificates}",CollectionUtil.formatDotAndRemoveMiddle(certificates));
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
@@ -503,7 +505,7 @@ public class HouseDocumentUtil {
|
|
|
if (tIds.size() == targets.size()){
|
|
|
return paragraph.replace("{tIds}", "");
|
|
|
}else {
|
|
|
- String tIdStr = CollectionUtil.formatSplitAndRemoveMiddle(tIds);
|
|
|
+ String tIdStr = CollectionUtil.formatDotAndRemoveMiddle(tIds);
|
|
|
return paragraph.replace("{tIds}", tIdStr);
|
|
|
}
|
|
|
}
|
|
@@ -537,7 +539,7 @@ public class HouseDocumentUtil {
|
|
|
* 未定事项假设、格式化“建成年代”
|
|
|
* @return
|
|
|
*/
|
|
|
- public static String buildingYear(List<HouseGuarantyTarget> targets,String hasImmovable,TmplHouseParagraph tmplHouseParagraph){
|
|
|
+ public static String buildingYear(List<HouseGuarantyTarget> targets,TmplHouseParagraph tmplHouseParagraph){
|
|
|
String paragraph = tmplHouseParagraph.getParagraph();
|
|
|
String result = null;
|
|
|
if (CollectionUtil.isNotEmpty(targets)){
|
|
@@ -547,7 +549,6 @@ public class HouseDocumentUtil {
|
|
|
List<String> buildingYears = collect.stream().map(HouseGuarantyTarget::getBuildingYear).collect(Collectors.toList());
|
|
|
result = paragraph.replace("{tIds}", CollectionUtil.formatDotAndRemoveMiddle(tIds))
|
|
|
.replace("{years}", CollectionUtil.formatDotAndRemoveMiddle(buildingYears));
|
|
|
- result = result.replace("{immovable}",hasImmovable);
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -562,23 +563,22 @@ public class HouseDocumentUtil {
|
|
|
public static String isUseDiff(List<HouseGuarantyTarget> targets,TmplHouseParagraph tmplHouseParagraph) {
|
|
|
StringBuilder result = new StringBuilder();
|
|
|
if (CollectionUtil.isNotEmpty(targets)){
|
|
|
- List<HouseGuarantyTarget> collect = targets.stream().filter(x -> StrUtil.isNotBlank(x.getLandUseTo())).collect(Collectors.toList());
|
|
|
- if (CollectionUtil.isNotEmpty(collect)){
|
|
|
- for (HouseGuarantyTarget target : collect) {
|
|
|
+ for (HouseGuarantyTarget target : targets) {
|
|
|
List<HouseGuarantyTargetDTO> targetDTOS = JSON.parseArray(target.getBaseInfo(), HouseGuarantyTargetDTO.class);
|
|
|
- Set<String> houseUseTo = targetDTOS.stream().map(HouseGuarantyTargetDTO::getUseTo).collect(Collectors.toSet());
|
|
|
- if (!houseUseTo.contains(target.getLandUseTo())){
|
|
|
- result.append(tmplHouseParagraph.getParagraph())
|
|
|
- .append("估价对象").append(target.getTId())
|
|
|
- .append("所在宗地《国有土地使用证》记载土地用途为")
|
|
|
- .append(target.getLandUseTo()).append(",估价对象")
|
|
|
- .append(target.getTId()).append("《房屋所有权证》记载规划用途为")
|
|
|
- .append(CollectionUtil.formatDotAndRemoveMiddle(houseUseTo))
|
|
|
- .append(",本次估价以估价对象合法保持房屋实际用途继续使用为假设前提。\n");
|
|
|
+ for (HouseGuarantyTargetDTO targetDTO : targetDTOS) {
|
|
|
+ if (!targetDTO.getLandType().contains(targetDTO.getUseTo())){
|
|
|
+ result.append(tmplHouseParagraph.getParagraph())
|
|
|
+ .append("估价对象").append(targetDTO.getId()).append("序号").append(targetDTO.getNo())
|
|
|
+ .append("所在宗地《国有土地使用证》记载土地用途为")
|
|
|
+ .append(targetDTO.getLandType()).append(",估价对象")
|
|
|
+ .append(targetDTO.getId()).append("序号").append(targetDTO.getNo()).append("《房屋所有权证》记载规划用途为")
|
|
|
+ .append(targetDTO.getUseTo())
|
|
|
+ .append(",本次估价以估价对象合法保持房屋实际用途继续使用为假设前提。\n");
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
result.append("\n");
|
|
|
- }
|
|
|
}
|
|
|
return result.toString();
|
|
|
}
|
|
@@ -588,18 +588,17 @@ public class HouseDocumentUtil {
|
|
|
* @param targets
|
|
|
* @return
|
|
|
*/
|
|
|
- public static String isProvideLandBigCertificate(List<HouseGuarantyTarget> targets,TmplHouseParagraph tmplHouseParagraph) {
|
|
|
+ public static String isProvideLandBigCertificate(List<HouseGuarantyTarget> targets,TmplHouseParagraph tmplHouseParagraph, CertificateLandUse certificateLandUse) {
|
|
|
StringBuilder result = new StringBuilder();
|
|
|
String paragraph = tmplHouseParagraph.getParagraph();
|
|
|
if (CollectionUtil.isNotEmpty(targets)){
|
|
|
List<HouseGuarantyTarget> collect = targets.stream().filter(x -> StrUtil.isNotBlank(x.getLandCertificateType())
|
|
|
&& x.getLandCertificateType().equals("大证")&& !x.getIsCostingShareMethod()).collect(Collectors.toList());
|
|
|
- if (CollectionUtil.isNotEmpty(collect)){
|
|
|
+ if (CollectionUtil.isNotEmpty(collect) && certificateLandUse!=null){
|
|
|
for (HouseGuarantyTarget target : collect) {
|
|
|
String tId = target.getTId();
|
|
|
String landUseTo = target.getLandUseTo();
|
|
|
- String landExpireDate = target.getLandExpireDate();
|
|
|
- String content = paragraph.replace("{tId}", tId).replace("{landUseTo}", landUseTo).replace("{landExpireDate}", landExpireDate);
|
|
|
+ String content = paragraph.replace("{tId}", tId).replace("{landUseTo}", certificateLandUse.getUseType()).replace("{landExpireDate}", certificateLandUse.getExpireDate());
|
|
|
result.append(content).append("\n");
|
|
|
}
|
|
|
}
|
|
@@ -613,19 +612,21 @@ public class HouseDocumentUtil {
|
|
|
* @param tmplHouseParagraph
|
|
|
* @return
|
|
|
*/
|
|
|
- public static String isProvideLandBigCertificateShare(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplHouseParagraph) {
|
|
|
+ public static String isProvideLandBigCertificateShare(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplHouseParagraph, List<CertificateLandUse> landCerts) {
|
|
|
StringBuilder result = new StringBuilder();
|
|
|
String paragraph = tmplHouseParagraph.getParagraph();
|
|
|
if (CollectionUtil.isNotEmpty(targets)){
|
|
|
List<HouseGuarantyTarget> collect = targets.stream().filter(x -> (StrUtil.isNotBlank(x.getLandCertificateType()) &&
|
|
|
- x.getLandCertificateType().equals("大证") && x.getIsCostingShareMethod())).collect(Collectors.toList());
|
|
|
- if (CollectionUtil.isNotEmpty(collect)){
|
|
|
+ x.getLandCertificateType().equals("大证") )).collect(Collectors.toList());
|
|
|
+ if (CollectionUtil.isNotEmpty(collect) && CollectionUtil.isNotEmpty(landCerts)){
|
|
|
for (HouseGuarantyTarget target : collect) {
|
|
|
- String tId = target.getTId();
|
|
|
- String landExpireDate = target.getLandExpireDate();
|
|
|
- String shareAcreage1 = target.getShareAcreage1();
|
|
|
- String content = paragraph.replace("{tId}", tId).replace("{landExpireDate}", landExpireDate).replace("{shareAcreage1}", shareAcreage1);
|
|
|
- result.append(content).append("\n");
|
|
|
+ List<CertificateLandUse> certs = landCerts.stream().filter(x -> x.getTid().equals(target.getTId())).collect(Collectors.toList());
|
|
|
+ if (CollectionUtil.isNotEmpty(certs)){
|
|
|
+ String tId = target.getTId();
|
|
|
+ String content = paragraph.replace("{tId}", tId).replace("{landExpireDate}",certs.get(0).getExpireDate()).replace("{shareAcreage1}", certs.get(0).getOutterAcreage());
|
|
|
+ result.append(content).append("\n");
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -637,10 +638,9 @@ public class HouseDocumentUtil {
|
|
|
* 未定事项假设 房屋分层面积处理方式1 有图
|
|
|
* @param targets
|
|
|
* @param tmplHouseParagraph
|
|
|
- * @param hasImmovableCertificate
|
|
|
* @return
|
|
|
*/
|
|
|
- public static String isDivideMethod1(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplHouseParagraph, String hasImmovableCertificate) {
|
|
|
+ public static String isDivideMethod1(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplHouseParagraph) {
|
|
|
StringBuilder result = new StringBuilder();
|
|
|
String paragraph = tmplHouseParagraph.getParagraph();
|
|
|
if (CollectionUtil.isNotEmpty(targets)){
|
|
@@ -674,7 +674,7 @@ public class HouseDocumentUtil {
|
|
|
}else {
|
|
|
floorAcreageDesc.append(";");
|
|
|
}
|
|
|
- paragraph = paragraph.replace("{immovable}", hasImmovableCertificate).replace("{tId}", tId).replace("{acreage}", acreage.toPlainString());
|
|
|
+ paragraph = paragraph.replace("{tId}", tId).replace("{acreage}", acreage.toPlainString());
|
|
|
paragraph = paragraph.replace("{floorAcreageDesc}", floorAcreageDesc.toString());
|
|
|
result.append(paragraph).append("\n");
|
|
|
}
|
|
@@ -687,10 +687,9 @@ public class HouseDocumentUtil {
|
|
|
* 未定事项假设 房屋分层面积处理方式2 无图
|
|
|
* @param targets
|
|
|
* @param tmplHouseParagraph
|
|
|
- * @param hasImmovableCertificate
|
|
|
* @return
|
|
|
*/
|
|
|
- public static String isDivideMethod2(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplHouseParagraph, String hasImmovableCertificate) {
|
|
|
+ public static String isDivideMethod2(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplHouseParagraph) {
|
|
|
StringBuilder result = new StringBuilder();
|
|
|
String paragraph = tmplHouseParagraph.getParagraph();
|
|
|
if (CollectionUtil.isNotEmpty(targets)){
|
|
@@ -724,7 +723,7 @@ public class HouseDocumentUtil {
|
|
|
}else {
|
|
|
floorAcreageDesc.append(";");
|
|
|
}
|
|
|
- paragraph = paragraph.replace("{immovable}", hasImmovableCertificate).replace("{tId}", tId).replace("{acreage}", acreage.toPlainString());
|
|
|
+ paragraph = paragraph.replace("{tId}", tId).replace("{acreage}", acreage.toPlainString());
|
|
|
paragraph = paragraph.replace("{floorAcreageDesc}", floorAcreageDesc.toString());
|
|
|
result.append(paragraph).append("\n");
|
|
|
}
|
|
@@ -736,11 +735,11 @@ public class HouseDocumentUtil {
|
|
|
/**
|
|
|
* 不相一致假设 登记地址与实勘地址不一致 有证明
|
|
|
* @param targets
|
|
|
- * @param hasImmovableCertificate
|
|
|
+ * @param certificates
|
|
|
* @param tmplHouseParagraph
|
|
|
* @return
|
|
|
*/
|
|
|
- public static String isAddressDiffCertificate(List<HouseGuarantyTarget> targets, String hasImmovableCertificate, TmplHouseParagraph tmplHouseParagraph) {
|
|
|
+ public static String isAddressDiffCertificate(List<HouseGuarantyTarget> targets, List<String> certificates, TmplHouseParagraph tmplHouseParagraph) {
|
|
|
StringBuilder result = new StringBuilder();
|
|
|
String paragraph = tmplHouseParagraph.getParagraph();
|
|
|
if (CollectionUtil.isNotEmpty(targets)){
|
|
@@ -752,7 +751,7 @@ public class HouseDocumentUtil {
|
|
|
List<HouseGuarantyTargetDTO> targetDTOS = JSON.parseArray(target.getBaseInfo(), HouseGuarantyTargetDTO.class);
|
|
|
String location = targetDTOS.get(0).getLocation();
|
|
|
String actAddress = targetDTOS.get(0).getActAddress();
|
|
|
- String replace = paragraph.replace("{tId}", tId).replace("{location}", location).replace("{actAddress}", actAddress).replace("{immovable}", hasImmovableCertificate);
|
|
|
+ String replace = paragraph.replace("{tId}", tId).replace("{address}", location).replace("{actAddress}", actAddress).replace("{certificates}", CollectionUtil.formatDotAndRemoveMiddle(certificates));
|
|
|
result.append(replace).append("\n");
|
|
|
}
|
|
|
}
|
|
@@ -763,11 +762,11 @@ public class HouseDocumentUtil {
|
|
|
/**
|
|
|
* 不相一致假设 登记地址与实勘地址不一致 无证明
|
|
|
* @param targets
|
|
|
- * @param hasImmovableCertificate
|
|
|
+ * @param certificates
|
|
|
* @param tmplHouseParagraph
|
|
|
* @return
|
|
|
*/
|
|
|
- public static String isAddressDiffNoCertificate(List<HouseGuarantyTarget> targets, String hasImmovableCertificate, TmplHouseParagraph tmplHouseParagraph) {
|
|
|
+ public static String isAddressDiffNoCertificate(List<HouseGuarantyTarget> targets, List<String> certificates, TmplHouseParagraph tmplHouseParagraph) {
|
|
|
StringBuilder result = new StringBuilder();
|
|
|
String paragraph = tmplHouseParagraph.getParagraph();
|
|
|
if (CollectionUtil.isNotEmpty(targets)){
|
|
@@ -776,16 +775,10 @@ public class HouseDocumentUtil {
|
|
|
if (CollectionUtil.isNotEmpty(collect)){
|
|
|
for (HouseGuarantyTarget target : collect) {
|
|
|
String tId = target.getTId();
|
|
|
- Boolean noBuildingHouseNos = target.getNoBuildingHouseNos();
|
|
|
- String noBuildingHouseNosStr="";
|
|
|
- if (noBuildingHouseNos){
|
|
|
- noBuildingHouseNosStr = ",未见估价对象栋号,房号。";
|
|
|
- }
|
|
|
List<HouseGuarantyTargetDTO> targetDTOS = JSON.parseArray(target.getBaseInfo(), HouseGuarantyTargetDTO.class);
|
|
|
- String location = targetDTOS.get(0).getLocation();
|
|
|
String actAddress = targetDTOS.get(0).getActAddress();
|
|
|
- String replace = paragraph.replace("{tId}", tId).replace("{location}", location)
|
|
|
- .replace("{actAddress}", actAddress).replace("{noBuildingHouseNos}",noBuildingHouseNosStr).replace("{immovable}", hasImmovableCertificate);
|
|
|
+ String replace = paragraph.replace("{tId}", tId)
|
|
|
+ .replace("{actAddress}", actAddress).replace("{certificates}", CollectionUtil.formatDotAndRemoveMiddle(certificates));
|
|
|
result.append(replace).append("\n");
|
|
|
}
|
|
|
}
|
|
@@ -799,7 +792,7 @@ public class HouseDocumentUtil {
|
|
|
* @param tmplHouseParagraph
|
|
|
* @return
|
|
|
*/
|
|
|
- public static String isDateDiff(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplHouseParagraph,String docDate) {
|
|
|
+ public static String isDateDiff(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplHouseParagraph,String valueTiming) {
|
|
|
StringBuilder result = new StringBuilder();
|
|
|
String paragraph = tmplHouseParagraph.getParagraph();
|
|
|
if (CollectionUtil.isNotEmpty(targets)){
|
|
@@ -808,7 +801,7 @@ public class HouseDocumentUtil {
|
|
|
for (HouseGuarantyTarget target : collect) {
|
|
|
String tId = target.getTId();
|
|
|
String exploreDate = target.getExploreDate();
|
|
|
- String replace = paragraph.replace("{tId}", tId).replace("{exploreDate}", exploreDate).replace("{docDate}", docDate);
|
|
|
+ String replace = paragraph.replace("{tId}", tId).replace("{exploreDate}", exploreDate==null?"<缺失实勘日期>":exploreDate).replace("{valueTiming}", valueTiming);
|
|
|
result.append(replace).append("\n");
|
|
|
}
|
|
|
}
|
|
@@ -822,24 +815,13 @@ public class HouseDocumentUtil {
|
|
|
* @param tmplParagraph
|
|
|
* @return
|
|
|
*/
|
|
|
- public static String isBigCertificateOnlyHouse(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph) {
|
|
|
- if (CollectionUtil.isNotEmpty(targets)){
|
|
|
+ public static String isBigCertificateOnlyHouse(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph,String isCheckOriginCertificate) {
|
|
|
+ if (CollectionUtil.isNotEmpty(targets) && !checkBoolean(isCheckOriginCertificate)){
|
|
|
List<HouseGuarantyTarget> collect = targets.stream().filter(x -> StrUtil.isNotBlank(x.getLandCertificateType()) &&
|
|
|
- x.getLandCertificateType().equals("大证")).collect(Collectors.toList());
|
|
|
- List<String> tIds = new ArrayList<>();
|
|
|
+ x.getLandCertificateType().equals("大证") && !x.getHouseGetLandInfo()).collect(Collectors.toList());
|
|
|
if (CollectionUtil.isNotEmpty(collect)){
|
|
|
- for (HouseGuarantyTarget target : collect) {
|
|
|
- List<HouseGuarantyTargetDTO> targetDTOS = JSON.parseArray(target.getBaseInfo(), HouseGuarantyTargetDTO.class);
|
|
|
- List<String> userTos = targetDTOS.stream().map(HouseGuarantyTargetDTO::getUseTo).collect(Collectors.toList());
|
|
|
- for (String userTo : userTos){
|
|
|
- if (userTo.contains("住宅")){
|
|
|
- tIds.add(target.getTId());
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if (CollectionUtil.isNotEmpty(tIds)){
|
|
|
String paragraph = tmplParagraph.getParagraph();
|
|
|
+ List<String> tIds = collect.stream().map(HouseGuarantyTarget::getTId).collect(Collectors.toList());
|
|
|
return paragraph.replace("{tIds}",CollectionUtil.formatDotAndRemoveMiddle(tIds));
|
|
|
}
|
|
|
}
|
|
@@ -852,14 +834,12 @@ public class HouseDocumentUtil {
|
|
|
* @param tmplParagraph
|
|
|
* @return
|
|
|
*/
|
|
|
- public static String isNotOriginCertificateOnlyHouse(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph,String hasImmovable) {
|
|
|
+ public static String isNotOriginCertificateOnlyHouse(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph,String isCheckOriginCertificate,List<String> certificates) {
|
|
|
if (CollectionUtil.isNotEmpty(targets)){
|
|
|
- List<HouseGuarantyTarget> collect = targets.stream().filter(x -> x.getHasOriginCertificate()!=null && !x.getHasOriginCertificate()
|
|
|
- &&x.getIsPromise()!=null && x.getIsPromise() && x.getIsPromiseFile()!=null && !x.getIsPromiseFile()).collect(Collectors.toList());
|
|
|
- if (CollectionUtil.isNotEmpty(collect)){
|
|
|
- List<String> tIds = collect.stream().map(HouseGuarantyTarget::getTId).collect(Collectors.toList());
|
|
|
+ if (!checkBoolean(isCheckOriginCertificate)){
|
|
|
+ List<String> tIds = targets.stream().map(HouseGuarantyTarget::getTId).collect(Collectors.toList());
|
|
|
String paragraph = tmplParagraph.getParagraph();
|
|
|
- return paragraph.replace("{tIds}", CollectionUtil.formatDotAndRemoveMiddle(tIds)).replace("{hasImmovable}", hasImmovable);
|
|
|
+ return paragraph.replace("{tIds}", CollectionUtil.formatDotAndRemoveMiddle(tIds)).replace("{certificates}", CollectionUtil.formatDotAndRemoveMiddle(certificates));
|
|
|
}
|
|
|
}
|
|
|
return null;
|
|
@@ -871,17 +851,23 @@ public class HouseDocumentUtil {
|
|
|
* @param tmplParagraph
|
|
|
* @return
|
|
|
*/
|
|
|
- public static String isNotOriginFileInChengDu(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph) {
|
|
|
- if (CollectionUtil.isNotEmpty(targets)){
|
|
|
- List<HouseGuarantyTarget> collect = targets.stream().filter(x ->
|
|
|
- x.getHasOriginCertificate()!=null &&!x.getHasOriginCertificate()
|
|
|
- && x.getIsPromise()!=null && x.getIsPromise()
|
|
|
- && x.getIsPromiseFile()!=null && x.getIsPromiseFile()
|
|
|
- && x.getIsInChengDu()!=null && x.getIsInChengDu()).collect(Collectors.toList());
|
|
|
- if (CollectionUtil.isNotEmpty(collect)){
|
|
|
- List<String> tIds = collect.stream().map(HouseGuarantyTarget::getTId).collect(Collectors.toList());
|
|
|
+ public static String isNotOriginFileInChengDu(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph ,String isCheckOriginCertificate,List<String> certificates) {
|
|
|
+ if (CollectionUtil.isNotEmpty(targets) && !checkBoolean(isCheckOriginCertificate)){
|
|
|
+ List<String> tIds = new ArrayList<>();
|
|
|
+ for (HouseGuarantyTarget target : targets) {
|
|
|
+ List<HouseGuarantyTargetDTO> targetDTOS = JSON.parseArray(target.getBaseInfo(), HouseGuarantyTargetDTO.class);
|
|
|
+ List<String> addresses = targetDTOS.stream().map(HouseGuarantyTargetDTO::getLocation).collect(Collectors.toList());
|
|
|
+ for (String address : addresses) {
|
|
|
+ Boolean inBigChengdu = AddressUtil.isInBigChengdu(address);
|
|
|
+ if (inBigChengdu){
|
|
|
+ tIds.add(target.getTId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ if (CollectionUtil.isNotEmpty(tIds) ){
|
|
|
String paragraph = tmplParagraph.getParagraph();
|
|
|
- return paragraph.replace("{tIds}", CollectionUtil.formatDotAndRemoveMiddle(tIds));
|
|
|
+ return paragraph.replace("{tIds}", CollectionUtil.formatDotAndRemoveMiddle(tIds)).replace("{certificates}",CollectionUtil.formatDotAndRemoveMiddle(certificates));
|
|
|
}
|
|
|
}
|
|
|
return null;
|
|
@@ -893,15 +879,23 @@ public class HouseDocumentUtil {
|
|
|
* @param tmplParagraph
|
|
|
* @return
|
|
|
*/
|
|
|
- public static String isNotOriginFileOutChengDu(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph) {
|
|
|
- if (CollectionUtil.isNotEmpty(targets)){
|
|
|
- List<HouseGuarantyTarget> collect = targets.stream().filter(x -> x.getHasOriginCertificate()!=null && !x.getHasOriginCertificate()
|
|
|
- && x.getIsPromise()!=null&& x.getIsPromise() && x.getIsPromiseFile() !=null && x.getIsPromiseFile()
|
|
|
- && x.getIsInChengDu()!=null && !x.getIsInChengDu()).collect(Collectors.toList());
|
|
|
- if (CollectionUtil.isNotEmpty(collect)){
|
|
|
- List<String> tIds = collect.stream().map(HouseGuarantyTarget::getTId).collect(Collectors.toList());
|
|
|
+ public static String isNotOriginFileOutChengDu(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph,String isCheckOriginCertificate,List<String> certificates) {
|
|
|
+ if (CollectionUtil.isNotEmpty(targets) && !checkBoolean(isCheckOriginCertificate)){
|
|
|
+ List<String> tIds = new ArrayList<>();
|
|
|
+ for (HouseGuarantyTarget target : targets) {
|
|
|
+ List<HouseGuarantyTargetDTO> targetDTOS = JSON.parseArray(target.getBaseInfo(), HouseGuarantyTargetDTO.class);
|
|
|
+ List<String> addresses = targetDTOS.stream().map(HouseGuarantyTargetDTO::getLocation).collect(Collectors.toList());
|
|
|
+ for (String address : addresses) {
|
|
|
+ Boolean inBigChengdu = AddressUtil.isInBigChengdu(address);
|
|
|
+ if (!inBigChengdu){
|
|
|
+ tIds.add(target.getTId());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ if (CollectionUtil.isNotEmpty(tIds) ){
|
|
|
String paragraph = tmplParagraph.getParagraph();
|
|
|
- return paragraph.replace("{tIds}", CollectionUtil.formatDotAndRemoveMiddle(tIds));
|
|
|
+ return paragraph.replace("{tIds}", CollectionUtil.formatDotAndRemoveMiddle(tIds)).replace("{certificates}",CollectionUtil.formatDotAndRemoveMiddle(certificates));
|
|
|
}
|
|
|
}
|
|
|
return null;
|
|
@@ -935,8 +929,7 @@ public class HouseDocumentUtil {
|
|
|
public static String isNotContractLandLowerHouseSY(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph,String methods) {
|
|
|
if (methods.contains("收益法")){
|
|
|
if (CollectionUtil.isNotEmpty(targets)){
|
|
|
- List<HouseGuarantyTarget> collect = targets.stream().filter(x -> x.getHasLandUseRightContract()!=null &&!x.getHasLandUseRightContract()
|
|
|
- && x.getLandYearLowerHouseYear()!=null && x.getLandYearLowerHouseYear()).collect(Collectors.toList());
|
|
|
+ List<HouseGuarantyTarget> collect = targets.stream().filter(x -> x.getIsBuildingReduceValue()!=null && x.getIsBuildingReduceValue()).collect(Collectors.toList());
|
|
|
if (CollectionUtil.isNotEmpty(collect)){
|
|
|
List<String> tIds = collect.stream().map(HouseGuarantyTarget::getTId).collect(Collectors.toList());
|
|
|
String paragraph = tmplParagraph.getParagraph();
|
|
@@ -956,8 +949,7 @@ public class HouseDocumentUtil {
|
|
|
public static String isNotContractLandLowerHouseCB(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph,String methods) {
|
|
|
if (methods.contains("成本法")){
|
|
|
if (CollectionUtil.isNotEmpty(targets)){
|
|
|
- List<HouseGuarantyTarget> collect = targets.stream().filter(x -> x.getHasLandUseRightContract()!=null && !x.getHasLandUseRightContract()
|
|
|
- && x.getLandYearLowerHouseYear()!=null && x.getLandYearLowerHouseYear()).collect(Collectors.toList());
|
|
|
+ List<HouseGuarantyTarget> collect = targets.stream().filter(x -> x.getIsBuildingReduceValue()!=null && x.getIsBuildingReduceValue()).collect(Collectors.toList());
|
|
|
if (CollectionUtil.isNotEmpty(collect)){
|
|
|
List<String> tIds = collect.stream().map(HouseGuarantyTarget::getTId).collect(Collectors.toList());
|
|
|
String paragraph = tmplParagraph.getParagraph();
|
|
@@ -1030,12 +1022,22 @@ public class HouseDocumentUtil {
|
|
|
* @param tmplParagraph
|
|
|
* @return
|
|
|
*/
|
|
|
- public static String isHasImmovableCertificate(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph, String hasImmovableCertificate) {
|
|
|
+ public static String isHasImmovableCertificate(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph, List<String> certificates) {
|
|
|
String paragraph = tmplParagraph.getParagraph();
|
|
|
- if (StrUtil.isNotBlank(hasImmovableCertificate)){
|
|
|
- paragraph = paragraph.replace("{immovable1}","、“不动产登记薄”");
|
|
|
+ if (CollectionUtil.isNotEmpty(certificates)){
|
|
|
+ List<String> list = new ArrayList<>();
|
|
|
+ if (certificates.contains(HOUSE_OWN_CER)){
|
|
|
+ list.add("“房屋登记簿”");
|
|
|
+ }
|
|
|
+ if (certificates.contains(LAND_USE_CER)){
|
|
|
+ list.add("“土地登记簿”");
|
|
|
+ }
|
|
|
+ if (certificates.contains(IMMOVABLE_CER)){
|
|
|
+ list.add("“不动产登记簿”");
|
|
|
+ }
|
|
|
+ paragraph = paragraph.replace("{certificates1}",CollectionUtil.formatDotAndRemoveMiddle(list));
|
|
|
}
|
|
|
- return paragraph.replace("{immovable}", hasImmovableCertificate);
|
|
|
+ return paragraph.replace("{certificates}", CollectionUtil.formatDotAndRemoveMiddle(certificates));
|
|
|
|
|
|
}
|
|
|
|
|
@@ -1344,4 +1346,30 @@ public class HouseDocumentUtil {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 是否核对权属原件第九点
|
|
|
+ * @param isCheckOriginCertificate
|
|
|
+ * @param paragraph
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public static String getCheckOriginCertificateX(String isCheckOriginCertificate, TmplHouseParagraph paragraph) {
|
|
|
+ if (HouseDocumentUtil.checkBoolean(isCheckOriginCertificate)){
|
|
|
+ return paragraph.getParagraph();
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否核对权属原件第八点
|
|
|
+ * @param paragraph
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public static String getCheckOriginCertificateXX(List<String> certificates, TmplHouseParagraph paragraph) {
|
|
|
+ if (CollectionUtil.isNotEmpty(certificates)){
|
|
|
+ String paragraph1 = paragraph.getParagraph();
|
|
|
+ return paragraph1.replace("{certificates}", CollectionUtil.formatDotAndRemoveMiddle(certificates));
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
}
|