|
@@ -5,6 +5,7 @@ import cn.hutool.json.*;
|
|
import com.alibaba.fastjson2.JSON;
|
|
import com.alibaba.fastjson2.JSON;
|
|
import com.dayou.dto.Address;
|
|
import com.dayou.dto.Address;
|
|
import com.dayou.dto.HouseGuarantyTargetDTO;
|
|
import com.dayou.dto.HouseGuarantyTargetDTO;
|
|
|
|
+import com.dayou.dto.HousePledgeDTO;
|
|
import com.dayou.entity.CertificateLandUse;
|
|
import com.dayou.entity.CertificateLandUse;
|
|
import com.dayou.entity.HouseGuarantyTarget;
|
|
import com.dayou.entity.HouseGuarantyTarget;
|
|
import com.dayou.entity.TmplHouseParagraph;
|
|
import com.dayou.entity.TmplHouseParagraph;
|
|
@@ -16,6 +17,8 @@ import java.lang.reflect.Field;
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
import java.util.function.Function;
|
|
import java.util.function.Function;
|
|
|
|
+import java.util.regex.Matcher;
|
|
|
|
+import java.util.regex.Pattern;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import static com.dayou.constants.HouseGuarantyDoc.*;
|
|
import static com.dayou.constants.HouseGuarantyDoc.*;
|
|
@@ -34,7 +37,7 @@ public class HouseDocumentUtil {
|
|
*/
|
|
*/
|
|
public static JSONArray houseTargetsFormat(JSONArray jsonArray){
|
|
public static JSONArray houseTargetsFormat(JSONArray jsonArray){
|
|
JSONArray targets = new JSONArray();
|
|
JSONArray targets = new JSONArray();
|
|
- if (jsonArray.size()>1){
|
|
|
|
|
|
+ if (jsonArray.size()>0){
|
|
JSONObject jsonObject = (JSONObject) jsonArray.get(0);
|
|
JSONObject jsonObject = (JSONObject) jsonArray.get(0);
|
|
Set<String> columns = jsonObject.keySet();
|
|
Set<String> columns = jsonObject.keySet();
|
|
for (int i = 0; i < jsonArray.size(); i++){
|
|
for (int i = 0; i < jsonArray.size(); i++){
|
|
@@ -292,11 +295,11 @@ public class HouseDocumentUtil {
|
|
//有地类用途和分摊面积
|
|
//有地类用途和分摊面积
|
|
if (cn.hutool.core.collection.CollectionUtil.isNotEmpty(outerAcreage)
|
|
if (cn.hutool.core.collection.CollectionUtil.isNotEmpty(outerAcreage)
|
|
&& cn.hutool.core.collection.CollectionUtil.isNotEmpty(landType)){
|
|
&& cn.hutool.core.collection.CollectionUtil.isNotEmpty(landType)){
|
|
- if (landType.contains("商业用地")){
|
|
|
|
|
|
+ if (landType.contains("商业")){
|
|
BigDecimal sum = sumList(outerAcreage);
|
|
BigDecimal sum = sumList(outerAcreage);
|
|
return "估价对象分摊出让商业用地使用权面积合计为:"+sum.toString()+"㎡;详见估价结果一览表";
|
|
return "估价对象分摊出让商业用地使用权面积合计为:"+sum.toString()+"㎡;详见估价结果一览表";
|
|
}
|
|
}
|
|
- if (landType.contains("批发零售用地")){
|
|
|
|
|
|
+ if (landType.contains("零售")){
|
|
BigDecimal sum = sumList(outerAcreage);
|
|
BigDecimal sum = sumList(outerAcreage);
|
|
return "估价对象分摊出让批发零售用地使用权面积合计为:"+sum.toString()+"㎡;详见估价结果一览表";
|
|
return "估价对象分摊出让批发零售用地使用权面积合计为:"+sum.toString()+"㎡;详见估价结果一览表";
|
|
}
|
|
}
|
|
@@ -318,7 +321,7 @@ public class HouseDocumentUtil {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//有用途和无分摊面积
|
|
//有用途和无分摊面积
|
|
- if (cn.hutool.core.collection.CollectionUtil.isEmpty(outerAcreage)
|
|
|
|
|
|
+ if (!CollectionUtil.isNotEmpty(outerAcreage)
|
|
&& cn.hutool.core.collection.CollectionUtil.isNotEmpty(useTo)){
|
|
&& cn.hutool.core.collection.CollectionUtil.isNotEmpty(useTo)){
|
|
if (useTo.contains("商业")){
|
|
if (useTo.contains("商业")){
|
|
return "估价对象占用(分摊)的国有建设用地使用权系商业用地。详见估价结果一览表";
|
|
return "估价对象占用(分摊)的国有建设用地使用权系商业用地。详见估价结果一览表";
|
|
@@ -962,16 +965,12 @@ public class HouseDocumentUtil {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 限制条件 估价对象未设立抵押权
|
|
* 限制条件 估价对象未设立抵押权
|
|
- * @param targets
|
|
|
|
* @param tmplParagraph
|
|
* @param tmplParagraph
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public static String isNotPledge(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph) {
|
|
|
|
- if (CollectionUtil.isNotEmpty(targets)){
|
|
|
|
- List<HouseGuarantyTarget> collect = targets.stream().filter(x -> x.getHasPledge()!=null && x.getHasPledge()).collect(Collectors.toList());
|
|
|
|
- if (!CollectionUtil.isNotEmpty(collect)){
|
|
|
|
- return tmplParagraph.getParagraph();
|
|
|
|
- }
|
|
|
|
|
|
+ public static String isNotPledge(TmplHouseParagraph tmplParagraph,Boolean isPledge) {
|
|
|
|
+ if (!isPledge){
|
|
|
|
+ return tmplParagraph.getParagraph();
|
|
}
|
|
}
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
@@ -1075,8 +1074,8 @@ public class HouseDocumentUtil {
|
|
* @param tmplParagraph
|
|
* @param tmplParagraph
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public static String isTransferNotDeductSellMoney(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph,Boolean isDeductSellAmount) {
|
|
|
|
- return isDeductSellAmount?null:tmplParagraph.getParagraph();
|
|
|
|
|
|
+ public static String isTransferNotDeductSellMoney(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph,String isDeductSellAmount) {
|
|
|
|
+ return checkBoolean(isDeductSellAmount)?null:tmplParagraph.getParagraph();
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1085,8 +1084,8 @@ public class HouseDocumentUtil {
|
|
* @param tmplParagraph
|
|
* @param tmplParagraph
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public static String isTransferDeductSellMoney(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph,Boolean isDeductSellAmount) {
|
|
|
|
- return isDeductSellAmount?tmplParagraph.getParagraph():null;
|
|
|
|
|
|
+ public static String isTransferDeductSellMoney(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph,String isDeductSellAmount) {
|
|
|
|
+ return checkBoolean(isDeductSellAmount)?tmplParagraph.getParagraph():null;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1095,9 +1094,9 @@ public class HouseDocumentUtil {
|
|
* @param tmplParagraph
|
|
* @param tmplParagraph
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public static String isProvideTechReport(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph,Boolean hasTechReport) {
|
|
|
|
|
|
+ public static String isProvideTechReport(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph,String hasTechReport) {
|
|
String paragraph = tmplParagraph.getParagraph();
|
|
String paragraph = tmplParagraph.getParagraph();
|
|
- if (hasTechReport){
|
|
|
|
|
|
+ if (checkBoolean(hasTechReport)){
|
|
return paragraph.replace("{hasTechReport}","、“估价技术报告”");
|
|
return paragraph.replace("{hasTechReport}","、“估价技术报告”");
|
|
}
|
|
}
|
|
return paragraph.replace("{hasTechReport}","");
|
|
return paragraph.replace("{hasTechReport}","");
|
|
@@ -1105,22 +1104,20 @@ public class HouseDocumentUtil {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 限制条件 是否是农商银行
|
|
* 限制条件 是否是农商银行
|
|
- * @param targets
|
|
|
|
* @param tmplParagraph
|
|
* @param tmplParagraph
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public static String isNSBank(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph,Boolean isNsBank) {
|
|
|
|
- return isNsBank?tmplParagraph.getParagraph():null;
|
|
|
|
|
|
+ public static String isNSBank(TmplHouseParagraph tmplParagraph,String isNsBank) {
|
|
|
|
+ return checkBoolean(isNsBank)?tmplParagraph.getParagraph():null;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 限制条件 其他银行
|
|
* 限制条件 其他银行
|
|
- * @param targets
|
|
|
|
* @param tmplParagraph
|
|
* @param tmplParagraph
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- public static String isNormalBank(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph,Boolean isNsBank) {
|
|
|
|
- return !isNsBank?tmplParagraph.getParagraph():null;
|
|
|
|
|
|
+ public static String isNormalBank( TmplHouseParagraph tmplParagraph,String isNsBank) {
|
|
|
|
+ return !checkBoolean(isNsBank)?tmplParagraph.getParagraph():null;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1372,4 +1369,5 @@ public class HouseDocumentUtil {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
}
|
|
}
|