瀏覽代碼

个贷简易预评模版修改&个贷总览列表加上评估目的字段

wucl 1 月之前
父節點
當前提交
6b5ced8111

二進制
biz-base/src/main/resources/docs/personal/house_simple_statement.docx


二進制
biz-base/src/main/resources/docs/personal/immovable_simple_statement.docx


二進制
biz-base/src/main/resources/docs/personal/land_simple_statement.docx


+ 8 - 1
dao/src/main/resources/mapper/PersonalMapper.xml

@@ -628,7 +628,8 @@
         u3.NAME AS pricingStaffName,
         p.created,
         p.created as xCreated,
-        pt.productions
+        pt.productions,
+        p.evaluate_aim
         FROM
         personal p
         LEFT JOIN (select personal_id,acreage,price,amount,created,productions from personal_target where deleted = 0) pt ON pt.personal_id = p.id
@@ -702,6 +703,9 @@
         <if test="personal!=null and personal.productions!=null and personal.productions!='' ">
             and pt.productions like concat('%',#{personal.productions},'%')
         </if>
+        <if test="personal!=null and personal.evaluateAim!=null and personal.evaluateAim!='' ">
+            and p.evaluate_aim = #{personal.evaluateAim}
+        </if>
         order by p.created desc
     </select>
 
@@ -778,6 +782,9 @@
         <if test="personal!=null and personal.handlerName!=null and personal.handlerName!='' ">
             and u4.name like concat('%',#{personal.handlerName},'%')
         </if>
+        <if test="personal!=null and personal.evaluateAim!=null and personal.evaluateAim!='' ">
+            and p.evaluate_aim = #{personal.evaluateAim}
+        </if>
         order by p.created desc
     </select>
 </mapper>

+ 36 - 7
service/src/main/java/com/dayou/service/impl/PersonalProductionServiceImpl.java

@@ -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);
         }
     }