瀏覽代碼

生成委托人函修改

wucl 7 月之前
父節點
當前提交
7f6bd5baaa
共有 22 個文件被更改,包括 235 次插入65 次删除
  1. 27 0
      biz-base/src/main/java/com/dayou/controller/GlobalConfigController.java
  2. 0 1
      biz-base/src/main/java/com/dayou/controller/HouseGuarantyAreaController.java
  3. 40 0
      biz-base/src/main/java/com/dayou/controller/HouseGuarantyBaseController.java
  4. 6 5
      biz-base/src/main/java/com/dayou/controller/HouseGuarantyDocController.java
  5. 1 1
      biz-base/src/test/java/com/dayou/ConditionDocumentTest.java
  6. 1 1
      biz-base/src/test/java/com/dayou/FreeMarkTest.java
  7. 16 16
      common/src/main/java/com/dayou/utils/HouseDocumentUtil.java
  8. 11 0
      dao/src/main/java/com/dayou/mapper/GlobalConfigMapper.java
  9. 22 0
      dao/src/main/resources/mapper/GlobalConfigMapper.xml
  10. 2 0
      domain/src/main/java/com/dayou/dto/HouseGuarantyTableDTO.java
  11. 0 2
      domain/src/main/java/com/dayou/entity/DocumentProduction.java
  12. 15 0
      domain/src/main/java/com/dayou/entity/GlobalConfig.java
  13. 15 6
      domain/src/main/java/com/dayou/entity/HouseGuarantyBase.java
  14. 5 0
      domain/src/main/java/com/dayou/entity/HouseGuarantyProcess.java
  15. 11 0
      service/src/main/java/com/dayou/service/GlobalConfigService.java
  16. 2 0
      service/src/main/java/com/dayou/service/HouseGuarantyBaseService.java
  17. 3 2
      service/src/main/java/com/dayou/service/HouseGuarantyService.java
  18. 2 2
      service/src/main/java/com/dayou/service/TmplHouseParagraphService.java
  19. 24 0
      service/src/main/java/com/dayou/service/impl/GlobalConfigServiceImpl.java
  20. 18 0
      service/src/main/java/com/dayou/service/impl/HouseGuarantyBaseServiceImpl.java
  21. 12 27
      service/src/main/java/com/dayou/service/impl/HouseGuarantyServiceImpl.java
  22. 2 2
      service/src/main/java/com/dayou/service/impl/TmplHouseParagraphServiceImpl.java

+ 27 - 0
biz-base/src/main/java/com/dayou/controller/GlobalConfigController.java

@@ -0,0 +1,27 @@
+package com.dayou.controller;
+
+import com.dayou.entity.GlobalConfig;
+import com.dayou.result.Result;
+import com.dayou.service.GlobalConfigService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("globalConfig")
+@Slf4j
+public class GlobalConfigController {
+
+    @Autowired
+    private GlobalConfigService globalConfigService;
+
+    @GetMapping("/type")
+    public Result<List<GlobalConfig>> byType(String type){
+        List<GlobalConfig> ret = globalConfigService.getByType(type);
+        return Result.build(ret);
+    }
+}

+ 0 - 1
biz-base/src/main/java/com/dayou/controller/HouseGuarantyAreaController.java

@@ -1,6 +1,5 @@
 package com.dayou.controller;
 
-import com.dayou.entity.HouseGuarantyAim;
 import com.dayou.entity.HouseGuarantyArea;
 import com.dayou.result.Result;
 import com.dayou.service.HouseGuarantyAreaService;

+ 40 - 0
biz-base/src/main/java/com/dayou/controller/HouseGuarantyBaseController.java

@@ -0,0 +1,40 @@
+package com.dayou.controller;
+
+import com.dayou.entity.HouseGuarantyBase;
+import com.dayou.result.Result;
+import com.dayou.service.HouseGuarantyBaseService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 房地产抵押基本信息
+ */
+@RestController
+@RequestMapping("houseGuarantyBase")
+@Slf4j
+public class HouseGuarantyBaseController {
+
+    @Autowired
+    private HouseGuarantyBaseService houseGuarantyBaseService;
+
+    /**
+     * 基本信息保存
+     * @param base
+     * @return
+     */
+    @PostMapping("")
+    public Result<Long> add(@RequestBody  HouseGuarantyBase base){
+        return Result.build(houseGuarantyBaseService.add(base));
+    }
+
+    /**
+     * 根据id查询
+     * @param id
+     * @return
+     */
+    @GetMapping("/{id}")
+    public Result<HouseGuarantyBase> getById(@PathVariable("id") Long id){
+        return Result.build(houseGuarantyBaseService.getById(id));
+    }
+}

+ 6 - 5
biz-base/src/main/java/com/dayou/controller/HouseGuarantyDocController.java

@@ -2,6 +2,7 @@ package com.dayou.controller;
 
 
 import com.dayou.dto.HouseGuarantyTableDTO;
+import com.dayou.entity.HouseGuarantyBase;
 import com.dayou.entity.HouseGuarantyProcess;
 import com.dayou.result.Result;
 import com.dayou.service.HouseGuarantyProcessService;
@@ -39,13 +40,13 @@ public class HouseGuarantyDocController {
     }
 
     /**
-     * 解析表单1
-     * @param id
+     * 解析表单中的估价对象
+     * @param processId
      * @return
      */
-    @GetMapping("/collect1/{id}")
-    public Result<Long> analysisCollect1(@PathVariable("id") Long id) throws Exception {
-        return Result.build(houseGuarantyService.analysisCollect1(id));
+    @GetMapping("/collect1/{processId}")
+    public Result<Long> analysisCollect1(@PathVariable("processId") Long processId) throws Exception {
+        return Result.build(houseGuarantyService.analysisCollect1(processId));
     }
 
     /**

+ 1 - 1
biz-base/src/test/java/com/dayou/ConditionDocumentTest.java

@@ -41,7 +41,7 @@ public class ConditionDocumentTest {
 
         //String wdsxjsResult = tmplHouseParagraphService.findWDSXJSResult(targets, landCerts);
        //String bxyzjsResult = tmplHouseParagraphService.findBXYZJSResult(targets, cersList, "2024年2月23日");
-        String yjbujsResult = tmplHouseParagraphService.findYJBUJSResult(targets, cersList, NO,"收益法");
+        String yjbujsResult = tmplHouseParagraphService.findYJBUJSResult(targets, cersList, false,"收益法");
         System.out.println(yjbujsResult);
 
     }

+ 1 - 1
biz-base/src/test/java/com/dayou/FreeMarkTest.java

@@ -97,7 +97,7 @@ public class FreeMarkTest {
         XSSFWorkbook workbook = new XSSFWorkbook("/Users/wuwei/opt/temp/collect1.xlsx");
         //读取估价对象数组
         List<HouseGuarantyAim> aims = houseGuarantyAimService.list(new LambdaQueryWrapper<HouseGuarantyAim>().eq(HouseGuarantyAim::getDocId, 58));
-        HouseGuarantyBase base = houseGuarantyBaseService.getOne(new LambdaQueryWrapper<HouseGuarantyBase>().eq(HouseGuarantyBase::getDocId, 58));
+        HouseGuarantyBase base = houseGuarantyBaseService.getById(59L);
         base.setProjectName(HouseDocumentUtil.getProjectName(aims));
         Map<Object, List<Object>> collect = array.stream().collect(Collectors.groupingBy(x -> ((JSONObject) x).get(TID.getZhName())));
         String actDesc = "";

+ 16 - 16
common/src/main/java/com/dayou/utils/HouseDocumentUtil.java

@@ -492,8 +492,8 @@ public class HouseDocumentUtil {
      * @param tmplHouseParagraph 段落模版
      * @return
      */
-    public static String getCheckOriginCertificate(String isCheckOriginCertificate,List<String> certificates, TmplHouseParagraph tmplHouseParagraph){
-        if (checkBoolean(isCheckOriginCertificate)){
+    public static String getCheckOriginCertificate(Boolean isCheckOriginCertificate,List<String> certificates, TmplHouseParagraph tmplHouseParagraph){
+        if (isCheckOriginCertificate){
             String paragraph = tmplHouseParagraph.getParagraph();
             return paragraph.replace("{certificates}",CollectionUtil.formatDotAndRemoveMiddle(certificates));
         }
@@ -828,8 +828,8 @@ public class HouseDocumentUtil {
      * @param tmplParagraph
      * @return
      */
-    public static String isBigCertificateOnlyHouse(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph,String isCheckOriginCertificate) {
-        if (CollectionUtil.isNotEmpty(targets) && !checkBoolean(isCheckOriginCertificate)){
+    public static String isBigCertificateOnlyHouse(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph,Boolean isCheckOriginCertificate) {
+        if (CollectionUtil.isNotEmpty(targets) && !isCheckOriginCertificate){
             List<HouseGuarantyTarget> collect = targets.stream().filter(x -> StrUtil.isNotBlank(x.getLandCertificateType()) &&
                     x.getLandCertificateType().equals("大证") && !x.getHouseGetLandInfo()).collect(Collectors.toList());
             if (CollectionUtil.isNotEmpty(collect)){
@@ -847,9 +847,9 @@ public class HouseDocumentUtil {
      * @param tmplParagraph
      * @return
      */
-    public static String isNotOriginCertificateOnlyHouse(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph,String isCheckOriginCertificate,List<String> certificates) {
+    public static String isNotOriginCertificateOnlyHouse(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph,Boolean isCheckOriginCertificate,List<String> certificates) {
         if (CollectionUtil.isNotEmpty(targets)){
-            if (!checkBoolean(isCheckOriginCertificate)){
+            if (!isCheckOriginCertificate){
                 List<String> tIds = targets.stream().map(HouseGuarantyTarget::getTid).collect(Collectors.toList());
                 String paragraph = tmplParagraph.getParagraph();
                 return paragraph.replace("{tIds}", CollectionUtil.formatDotAndRemoveMiddle(tIds)).replace("{certificates}", CollectionUtil.formatDotAndRemoveMiddle(certificates));
@@ -864,8 +864,8 @@ public class HouseDocumentUtil {
      * @param tmplParagraph
      * @return
      */
-    public static String isNotOriginFileInChengDu(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph ,String isCheckOriginCertificate,List<String> certificates) {
-        if (CollectionUtil.isNotEmpty(targets) && !checkBoolean(isCheckOriginCertificate)){
+    public static String isNotOriginFileInChengDu(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph ,Boolean isCheckOriginCertificate,List<String> certificates) {
+        if (CollectionUtil.isNotEmpty(targets) && !isCheckOriginCertificate){
             List<String> tIds = new ArrayList<>();
             for (HouseGuarantyTarget target : targets) {
                 List<HouseGuarantyAim> targetDTOS = target.getAims();
@@ -892,8 +892,8 @@ public class HouseDocumentUtil {
      * @param tmplParagraph
      * @return
      */
-    public static String isNotOriginFileOutChengDu(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph,String isCheckOriginCertificate,List<String> certificates) {
-        if (CollectionUtil.isNotEmpty(targets) && !checkBoolean(isCheckOriginCertificate)){
+    public static String isNotOriginFileOutChengDu(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph,Boolean isCheckOriginCertificate,List<String> certificates) {
+        if (CollectionUtil.isNotEmpty(targets) && !isCheckOriginCertificate){
             List<String> tIds = new ArrayList<>();
             for (HouseGuarantyTarget target : targets) {
                 List<HouseGuarantyAim> targetDTOS = target.getAims();
@@ -1104,9 +1104,9 @@ public class HouseDocumentUtil {
      * @param tmplParagraph
      * @return
      */
-    public static String isProvideTechReport(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph,String hasTechReport) {
+    public static String isProvideTechReport(List<HouseGuarantyTarget> targets, TmplHouseParagraph tmplParagraph,Boolean hasTechReport) {
         String paragraph = tmplParagraph.getParagraph();
-        if (checkBoolean(hasTechReport)){
+        if (hasTechReport){
             return paragraph.replace("{hasTechReport}","、“估价技术报告”");
         }
         return paragraph.replace("{hasTechReport}","");
@@ -1117,8 +1117,8 @@ public class HouseDocumentUtil {
      * @param tmplParagraph
      * @return
      */
-    public static String isNSBank(TmplHouseParagraph tmplParagraph,String isNsBank) {
-        return checkBoolean(isNsBank)?tmplParagraph.getParagraph():null;
+    public static String isNSBank(TmplHouseParagraph tmplParagraph,Boolean isNsBank) {
+        return isNsBank?tmplParagraph.getParagraph():null;
     }
 
     /**
@@ -1126,8 +1126,8 @@ public class HouseDocumentUtil {
      * @param tmplParagraph
      * @return
      */
-    public static String isNormalBank( TmplHouseParagraph tmplParagraph,String isNsBank) {
-        return !checkBoolean(isNsBank)?tmplParagraph.getParagraph():null;
+    public static String isNormalBank( TmplHouseParagraph tmplParagraph,Boolean isNsBank) {
+        return !isNsBank?tmplParagraph.getParagraph():null;
     }
 
     /**

+ 11 - 0
dao/src/main/java/com/dayou/mapper/GlobalConfigMapper.java

@@ -0,0 +1,11 @@
+package com.dayou.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.dayou.entity.GlobalConfig;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface GlobalConfigMapper extends BaseMapper<GlobalConfig> {
+    List<GlobalConfig> getByType(@Param("type") String type);
+}

+ 22 - 0
dao/src/main/resources/mapper/GlobalConfigMapper.xml

@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.dayou.mapper.GlobalConfigMapper">
+
+
+    <select id="getByType" parameterType="java.lang.String" resultType="com.dayou.entity.GlobalConfig">
+        SELECT
+            id,
+            type,
+            `key`,
+            `value`
+        FROM
+            global_config
+        WHERE
+            delete_status = 0
+          AND (
+            type = #{type})
+        ORDER BY
+            id DESC
+    </select>
+
+</mapper>

+ 2 - 0
domain/src/main/java/com/dayou/dto/HouseGuarantyTableDTO.java

@@ -8,4 +8,6 @@ public class HouseGuarantyTableDTO {
     private String html;
 
     private String homePath;
+
+    private Long baseId;
 }

+ 0 - 2
domain/src/main/java/com/dayou/entity/DocumentProduction.java

@@ -74,6 +74,4 @@ public class DocumentProduction extends BaseEntity implements Serializable {
      */
     private Long businessSubId;
 
-
-
 }

+ 15 - 0
domain/src/main/java/com/dayou/entity/GlobalConfig.java

@@ -0,0 +1,15 @@
+package com.dayou.entity;
+
+import com.dayou.common.BaseEntity;
+import lombok.Data;
+
+@Data
+public class GlobalConfig extends BaseEntity {
+
+    private String type;
+
+    private String key;
+
+    private String value;
+
+}

+ 15 - 6
domain/src/main/java/com/dayou/entity/HouseGuarantyBase.java

@@ -4,15 +4,14 @@ import com.baomidou.mybatisplus.annotation.TableField;
 import com.dayou.common.BaseEntity;
 import lombok.Data;
 
+import java.util.List;
+
 /**
  * 致委托人函 文档对象
  */
 @Data
 public class HouseGuarantyBase extends BaseEntity {
 
-    private Long docId;
-
-
     /**
      * 估价项目名称
      */
@@ -65,20 +64,23 @@ public class HouseGuarantyBase extends BaseEntity {
      */
     private String methods;
 
+
+
+
     /**
      * 是否提供技术报告
      */
-    private String hasTechReport;
+    private Boolean hasTechReport;
 
     /**
      * 是否是农商银行
      */
-    private String isNsBank;
+    private Boolean isNsBank;
 
     /**
      * 是否审核权属原件
      */
-    private String isCheckOriginCertificate;
+    private Boolean isCheckOriginCertificate;
 
 
     /**
@@ -132,4 +134,11 @@ public class HouseGuarantyBase extends BaseEntity {
     @TableField(exist = false)
     private String ownshipUser;
 
+
+    @TableField(exist = false)
+    private List<String> methodList;
+
+    @TableField(exist = false)
+    private Long processId;
+
 }

+ 5 - 0
domain/src/main/java/com/dayou/entity/HouseGuarantyProcess.java

@@ -15,6 +15,11 @@ public class HouseGuarantyProcess extends BaseEntity implements Serializable {
     private Long parentId;
 
     /**
+     * 基本信息id
+     */
+    private Long baseId;
+
+    /**
      * docHome
      */
     private String home;

+ 11 - 0
service/src/main/java/com/dayou/service/GlobalConfigService.java

@@ -0,0 +1,11 @@
+package com.dayou.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.dayou.entity.GlobalConfig;
+
+import java.util.List;
+
+public interface GlobalConfigService extends IService<GlobalConfig> {
+
+    List<GlobalConfig> getByType(String type);
+}

+ 2 - 0
service/src/main/java/com/dayou/service/HouseGuarantyBaseService.java

@@ -4,4 +4,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.dayou.entity.HouseGuarantyBase;
 
 public interface HouseGuarantyBaseService extends IService<HouseGuarantyBase> {
+
+    Long add(HouseGuarantyBase base);
 }

+ 3 - 2
service/src/main/java/com/dayou/service/HouseGuarantyService.java

@@ -2,6 +2,7 @@ package com.dayou.service;
 
 
 import com.dayou.dto.HouseGuarantyTableDTO;
+import com.dayou.entity.HouseGuarantyBase;
 import com.dayou.vo.HouseTargetVO;
 
 import java.io.IOException;
@@ -20,10 +21,10 @@ public interface HouseGuarantyService {
 
     /**
      * 解析表单1
-     * @param id
+     * @param processId
      * @return
      */
-    Long analysisCollect1(Long id) throws Exception;
+    Long analysisCollect1(Long processId) throws Exception;
 
     /**
      * 生成致委托人函

+ 2 - 2
service/src/main/java/com/dayou/service/TmplHouseParagraphService.java

@@ -16,7 +16,7 @@ public interface TmplHouseParagraphService extends IService<TmplHouseParagraph>
     /**
      * 生成一般假设最终结果
      */
-    String findYBJSResult(List<HouseGuarantyTarget> targets,String isCheckOriginCertificate, List<String> certificates);
+    String findYBJSResult(List<HouseGuarantyTarget> targets,Boolean isCheckOriginCertificate, List<String> certificates);
 
     /**
      * 生成未定事项假设最终结果
@@ -38,7 +38,7 @@ public interface TmplHouseParagraphService extends IService<TmplHouseParagraph>
      * @param targets
      * @return
      */
-    String findYJBUJSResult(List<HouseGuarantyTarget> targets,List<String> certificates,String isCheckOriginCertificate,String methods);
+    String findYJBUJSResult(List<HouseGuarantyTarget> targets,List<String> certificates,Boolean isCheckOriginCertificate,String methods);
 
     /**
      * 生成限制条件结果

+ 24 - 0
service/src/main/java/com/dayou/service/impl/GlobalConfigServiceImpl.java

@@ -0,0 +1,24 @@
+package com.dayou.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.dayou.common.BaseEntity;
+import com.dayou.entity.GlobalConfig;
+import com.dayou.mapper.GlobalConfigMapper;
+import com.dayou.service.GlobalConfigService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public class GlobalConfigServiceImpl extends ServiceImpl<GlobalConfigMapper, GlobalConfig> implements GlobalConfigService {
+
+    @Autowired
+    private GlobalConfigMapper globalConfigMapper;
+
+    @Override
+    public List<GlobalConfig> getByType(String type) {
+        return globalConfigMapper.getByType(type);
+    }
+}

+ 18 - 0
service/src/main/java/com/dayou/service/impl/HouseGuarantyBaseServiceImpl.java

@@ -1,11 +1,29 @@
 package com.dayou.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.dayou.common.BaseEntity;
 import com.dayou.entity.HouseGuarantyBase;
+import com.dayou.entity.HouseGuarantyProcess;
 import com.dayou.mapper.HouseGuarantyBaseMapper;
 import com.dayou.service.HouseGuarantyBaseService;
+import com.dayou.service.HouseGuarantyProcessService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 @Service
 public class HouseGuarantyBaseServiceImpl extends ServiceImpl<HouseGuarantyBaseMapper, HouseGuarantyBase> implements HouseGuarantyBaseService {
+
+    @Autowired
+    private HouseGuarantyProcessService houseGuarantyProcessService;
+    @Override
+    public Long add(HouseGuarantyBase base) {
+        this.saveOrUpdate(base);
+        if (base.getProcessId() != null) {
+            houseGuarantyProcessService.update(new LambdaUpdateWrapper<HouseGuarantyProcess>()
+                    .eq(BaseEntity::getId,base.getProcessId()).set(HouseGuarantyProcess::getBaseId,base.getId()));
+        }
+        return base.getId();
+    }
 }

+ 12 - 27
service/src/main/java/com/dayou/service/impl/HouseGuarantyServiceImpl.java

@@ -96,15 +96,12 @@ public class HouseGuarantyServiceImpl implements HouseGuarantyService {
 
     @Override
     public Long createTableWord(HouseGuarantyTableDTO houseGuarantyTableDTO) {
-        try {
-            sleep(500);
-        } catch (InterruptedException e) {
-            throw new RuntimeException(e);
-        }
         String html = houseGuarantyTableDTO.getHtml();
         String homePath = houseGuarantyTableDTO.getHomePath();
+        Long baseId = houseGuarantyTableDTO.getBaseId();
         String xHtml = wordTableHelper.htmlTableFormat(html);
         HouseGuarantyProcess hgp = new HouseGuarantyProcess();
+        hgp.setBaseId(baseId);
         hgp.setHome(homePath);
         hgp.setTargetsHtml(html);
         hgp.setProcessName(BusinessEnum.HouseGuarantyProcess.CONSIGNOR_LETTER.getMsg());
@@ -114,32 +111,25 @@ public class HouseGuarantyServiceImpl implements HouseGuarantyService {
     }
 
     @Override
-    public Long analysisCollect1(Long id) throws Exception {
-        HouseGuarantyProcess process = houseGuarantyProcessService.getById(id);
+    public Long analysisCollect1(Long processId) throws Exception {
+        HouseGuarantyProcess process = houseGuarantyProcessService.getById(processId);
         String home = fileNetConfig.getBaseDir() + process.getHome();
         Workbook workbook = new Workbook( home + COLLECT1_XLSX);
         workbook.save(home+ COLLECT1_JSON, SaveFormat.JSON);
 
 
         //解析估价对象json(估价对象一览表)
-        JSONArray array = JsonUtil.file2JsonArray(home + COLLECT1_JSON, TARGETS_TABLE_ZH);
+        JSONArray array = JsonUtil.file2JsonArray(home + COLLECT1_JSON);
         JSONArray xArray = HouseDocumentUtil.houseTargetsFormat(array);
         List<HouseGuarantyAim> houseGuarantyAims = HouseDocumentUtil.houseTargetsFormatDTO(xArray);
         //获取项目名称
         String projectName = HouseDocumentUtil.getProjectName(houseGuarantyAims);
 
-
-        //解析估价对象json(基本信息)
-        XSSFWorkbook book = new XSSFWorkbook(home + COLLECT1_XLSX);
-        Map<String, String> valueMap = EasyExcelUtil.getExcelCellValue(book, BASE_INFO_ZH);
-        HouseGuarantyBase houseGuarantyBase = BeanUtil.mapToBean(valueMap, HouseGuarantyBase.class, true);
-
-        DocumentProduction dp = buildDocumentProduction(id, projectName, houseGuarantyBase.getDocNo(), houseGuarantyBase.getConsignor());
+        HouseGuarantyBase base = houseGuarantyBaseService.getById(process.getBaseId());
+        DocumentProduction dp = buildDocumentProduction(processId, projectName, base.getDocNo(), base.getConsignor());
         documentProductionService.save(dp);
 
         Long docId = dp.getId();
-        houseGuarantyBase.setDocId(docId);
-        houseGuarantyBaseService.save(houseGuarantyBase);
 
         houseGuarantyAims.stream().forEach(x->{
             x.setDocId(docId);
@@ -152,11 +142,6 @@ public class HouseGuarantyServiceImpl implements HouseGuarantyService {
 
     @Override
     public Boolean genConsignorLetter(Long pId,Long docId) {
-        try {
-            sleep(1000);
-        } catch (InterruptedException e) {
-            throw new RuntimeException(e);
-        }
         HouseGuarantyProcess process = houseGuarantyProcessService.getById(pId);
         String baseDir = fileNetConfig.getBaseDir();
         String home = baseDir + process.getHome();
@@ -167,7 +152,7 @@ public class HouseGuarantyServiceImpl implements HouseGuarantyService {
                     .eq(HouseGuarantyAim::getDocId, docId));
 
             //读取基本信息
-            HouseGuarantyBase base = houseGuarantyBaseService.getOne(new LambdaQueryWrapper<HouseGuarantyBase>().eq(HouseGuarantyBase::getDocId, docId));
+            HouseGuarantyBase base = houseGuarantyBaseService.getById(process.getBaseId());
 
             Map<String, List<HouseGuarantyAim>> collect = aims.stream().collect(Collectors.groupingBy(HouseGuarantyAim::getTid));
             String actDesc = HouseDocumentUtil.combinationTargetDescription(collect);
@@ -226,7 +211,7 @@ public class HouseGuarantyServiceImpl implements HouseGuarantyService {
         String baseDir = fileNetConfig.getBaseDir();
 
         try {
-            HouseGuarantyBase base = houseGuarantyBaseService.getOne(new LambdaQueryWrapper<HouseGuarantyBase>().eq(HouseGuarantyBase::getDocId, id));
+            HouseGuarantyBase base = houseGuarantyBaseService.getById(process.getBaseId());
             ConditionDO conditionDO = new ConditionDO();
             conditionDO.setAppraiser1(base.getAppraiser1());
             conditionDO.setAppraiser2(base.getAppraiser2());
@@ -247,7 +232,7 @@ public class HouseGuarantyServiceImpl implements HouseGuarantyService {
 
             //获取土地证信息
             List<CertificateLandUse> landCerts = certificateLandUseService.list(new LambdaQueryWrapper<CertificateLandUse>().eq(CertificateLandUse::getBusinessId, id));
-            String isCheckOriginCertificate = base.getIsCheckOriginCertificate();
+            Boolean isCheckOriginCertificate = base.getIsCheckOriginCertificate();
 
 
             //组合一般假设内容
@@ -323,7 +308,7 @@ public class HouseGuarantyServiceImpl implements HouseGuarantyService {
         try {
             //读取估价对象数组
             List<HouseGuarantyAim> aims = houseGuarantyAimService.list(new LambdaQueryWrapper<HouseGuarantyAim>().eq(HouseGuarantyAim::getDocId, id));
-            HouseGuarantyBase base = houseGuarantyBaseService.getOne(new LambdaQueryWrapper<HouseGuarantyBase>().eq(HouseGuarantyBase::getDocId, id));
+            HouseGuarantyBase base = houseGuarantyBaseService.getById(process.getBaseId());
 //            JSONArray array = JsonUtil.file2JsonArray(home + TARGETS_JSON);
 //            JSONObject jsonObject = JsonUtil.file2JsonObject(home + BASE_INFO_JSON);
 
@@ -364,7 +349,7 @@ public class HouseGuarantyServiceImpl implements HouseGuarantyService {
             //获取权属信息数据源
             List<HouseRightsDTO> houseRightsDTOList = houseTargetEntityService.getHouseRightsDTOList(id);
             HouseDocumentUtil.getRightsDesc(doc,houseRightsDTOList,
-                    HouseDocumentUtil.checkBoolean(base.getIsCheckOriginCertificate()));
+                    base.getIsCheckOriginCertificate());
 
             //获取区位状况数据源
             List<HouseGuarantyArea> areas = houseGuarantyAreaService.getAreasList(id);

+ 2 - 2
service/src/main/java/com/dayou/service/impl/TmplHouseParagraphServiceImpl.java

@@ -38,7 +38,7 @@ public class TmplHouseParagraphServiceImpl extends ServiceImpl<TmplHouseParagrap
     }
 
     @Override
-    public String findYBJSResult(List<HouseGuarantyTarget> targets, String isCheckOriginCertificate, List<String> certificates) {
+    public String findYBJSResult(List<HouseGuarantyTarget> targets, Boolean isCheckOriginCertificate, List<String> certificates) {
         List<TmplHouseParagraph> paragraphTemps = this.list(new LambdaQueryWrapper<TmplHouseParagraph>()
                 .eq(TmplHouseParagraph::getDocMold, GUARANTY).eq(TmplHouseParagraph::getChapter, ORDINARY_ASSUMPTION).orderByAsc(TmplHouseParagraph::getSort));
         Map<Integer, List<TmplHouseParagraph>> collect = paragraphTemps.stream().collect(Collectors.groupingBy(TmplHouseParagraph::getSort));
@@ -199,7 +199,7 @@ public class TmplHouseParagraphServiceImpl extends ServiceImpl<TmplHouseParagrap
     }
 
     @Override
-    public String findYJBUJSResult(List<HouseGuarantyTarget> targets,List<String> certificates,String isCheckOriginCertificate,String methods) {
+    public String findYJBUJSResult(List<HouseGuarantyTarget> targets,List<String> certificates,Boolean isCheckOriginCertificate,String methods) {
         List<TmplHouseParagraph> paragraphTemps = this.list(new LambdaQueryWrapper<TmplHouseParagraph>()
                 .eq(TmplHouseParagraph::getDocMold, GUARANTY).eq(TmplHouseParagraph::getChapter, DEFICIENCY_ASSUMPTION).orderByAsc(TmplHouseParagraph::getSort));
         StringBuilder result = new StringBuilder();