|
@@ -135,18 +135,25 @@ public class PersonalProductionServiceImpl extends ServiceImpl<PersonalProductio
|
|
|
Map<String,Object> textMap = new HashMap();
|
|
|
|
|
|
PersonalSellingAbilityVO sell = JSON.parseObject(target.getSellingAbility(), PersonalSellingAbilityVO.class);
|
|
|
- PersonalBackgroundInfo bg = JSON.parseObject(target.getBackgroundInfo(), PersonalBackgroundInfo.class);
|
|
|
+
|
|
|
PersonalEntityInfoVO en = JSON.parseObject(target.getEntityInfo(), PersonalEntityInfoVO.class);
|
|
|
personalSceneService.getSceneImagesForDoc(personalId,textMap);
|
|
|
Field[] sellFields = sell.getClass().getDeclaredFields();
|
|
|
- Field[] bgFields = bg.getClass().getDeclaredFields();
|
|
|
+
|
|
|
Field[] enFields = en.getClass().getDeclaredFields();
|
|
|
for (Field field :sellFields){
|
|
|
textMap.put(field.getName(),ReflectUtils.getFieldValue(sell,field.getName()));
|
|
|
}
|
|
|
- for (Field field :bgFields){
|
|
|
- textMap.put(field.getName(),ReflectUtils.getFieldValue(bg,field.getName()));
|
|
|
+ // 简单预评不需要填写区位信息
|
|
|
+ if (tag!=4){
|
|
|
+ PersonalBackgroundInfo bg = JSON.parseObject(target.getBackgroundInfo(), PersonalBackgroundInfo.class);
|
|
|
+ Field[] bgFields = bg.getClass().getDeclaredFields();
|
|
|
+ for (Field field :bgFields){
|
|
|
+ textMap.put(field.getName(),ReflectUtils.getFieldValue(bg,field.getName()));
|
|
|
+ }
|
|
|
+ addEnvironment(bg,textMap);
|
|
|
}
|
|
|
+
|
|
|
for (Field field :enFields){
|
|
|
textMap.put(field.getName(),ReflectUtils.getFieldValue(en,field.getName()));
|
|
|
}
|
|
@@ -156,7 +163,7 @@ public class PersonalProductionServiceImpl extends ServiceImpl<PersonalProductio
|
|
|
textMap.put("nPrice",((BigDecimal)target.getPrice()).setScale(0, RoundingMode.HALF_UP));
|
|
|
textMap.put("nAmount",target.getAmount());
|
|
|
textMap.put("validateCode",target.getValidateCode());
|
|
|
- addEnvironment(bg,textMap);
|
|
|
+
|
|
|
PersonalCalculate calculate = personalCalculateMapper.getByTargetId(target.getId());
|
|
|
textMap.put("rightsType",calculate.getRightsType());
|
|
|
if (tag == 1 || tag == 4){
|
|
@@ -288,19 +295,41 @@ public class PersonalProductionServiceImpl extends ServiceImpl<PersonalProductio
|
|
|
addDebiInfo(textMap);
|
|
|
addExamples(target.getId(),textMap);
|
|
|
addSimpleAbout6(textMap,tag);
|
|
|
+ addDiffAddress(textMap,tag,certificateEnum);
|
|
|
return doCreateFile(certificateEnum.getTemplatePath().get(tag),textMap,orderId,ProductionEnum.STATEMENT);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 简易预评第七点(地址不一致)
|
|
|
+ * @param textMap
|
|
|
+ * @param tag
|
|
|
+ */
|
|
|
+ private void addDiffAddress(Map<String, Object> textMap, Integer tag,CertificateEnum certificateEnum) {
|
|
|
+ Boolean isSameAddress = Boolean.valueOf(String.valueOf(textMap.get("isSameAddress")));
|
|
|
+ String sceneAddress = String.valueOf(textMap.get("sceneAddress"));
|
|
|
+ String certType = "《不动产权证书》";
|
|
|
+ if (!certificateEnum.equals(IMMOVABLE_CERTIFICATE)){
|
|
|
+ certType = "《房屋所有权证》";
|
|
|
+ }
|
|
|
+ if (tag==4 && !isSameAddress){
|
|
|
+ textMap.put("diffAddress","7、本次评估估价对象界址、范围由委托人指界、确认;注册房地产估价师现场实勘估价对象地址为:" +
|
|
|
+ sceneAddress+",本次评估以委托人提供的"+certType+"界定标的物与注册房地产估价师现场查看标的物为同一估价对象。");
|
|
|
+ }else{
|
|
|
+ textMap.put("diffAddress","");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 简单预评版的相关情况第六点
|
|
|
* @param textMap
|
|
|
* @param tag
|
|
|
*/
|
|
|
private void addSimpleAbout6(Map<String, Object> textMap, Integer tag) {
|
|
|
if (tag == 4){
|
|
|
+ String rightsToPurpose = (String) textMap.get("rightsToPurpose");
|
|
|
String aboutInfo6 = "较强".equals((String)textMap.get("toCashAble"))?
|
|
|
- "估价对象系住宅,通用性较强,独立使用性强,不可分割,其所在区域房地产市场状况较好,变现能力较强"
|
|
|
- :"估价对象系住宅,独立使用性强,不可分割,其所在区域房地产市场状况较好,其面积较大,总价较高,通用性一般,变现能力一般";
|
|
|
+ "估价对象系"+rightsToPurpose+",通用性较强,独立使用性强,不可分割,其所在区域房地产市场状况较好,变现能力较强"
|
|
|
+ :"估价对象系"+rightsToPurpose+",独立使用性强,不可分割,其所在区域房地产市场状况较好,其面积较大,总价较高,通用性一般,变现能力一般";
|
|
|
textMap.put("aboutInfo6",aboutInfo6);
|
|
|
}
|
|
|
}
|