huangtf 2 سال پیش
والد
کامیت
ac96c0c8f1

+ 3 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/feign/ArchiveFileClient.java

@@ -131,4 +131,7 @@ public interface ArchiveFileClient {
 
     @PostMapping(API_PREFIX + "/updateFiles")
     void updateArchiveFile(@RequestBody List<ArchiveFile> files);
+
+    @PostMapping(API_PREFIX + "/getListByContractId")
+    List<ArchiveFile> getListByContractId(Long contractId);
 }

+ 2 - 1
blade-service-api/blade-business-api/src/main/java/org/springblade/business/feign/InformationQueryClient.java

@@ -85,5 +85,6 @@ public interface InformationQueryClient {
     @PostMapping(API_PREFIX + "/getNodeChildTabColsAllByTabName")
     List<QueryProcessDataVO> getNodeChildTabColsAllByTabName(@RequestParam String initTabName);
 
-
+    @PostMapping(API_PREFIX + "/getInformationByContractId")
+    List<InformationQuery> getInformationByContractId(Long contractId);
 }

+ 5 - 0
blade-service/blade-business/src/main/java/org/springblade/business/feignClient/ArchiveFileClientImpl.java

@@ -275,4 +275,9 @@ public class ArchiveFileClientImpl implements ArchiveFileClient {
         iArchiveFileService.updateBatchById(files);
     }
 
+    @Override
+    public List<ArchiveFile> getListByContractId(Long contractId) {
+        return fileMapper.getListByContractId(contractId);
+    }
+
 }

+ 7 - 0
blade-service/blade-business/src/main/java/org/springblade/business/feignClient/InformationQueryClientImpl.java

@@ -7,6 +7,7 @@ import lombok.AllArgsConstructor;
 import org.springblade.business.entity.InformationQuery;
 import org.springblade.business.entity.InformationQueryFile;
 import org.springblade.business.feign.InformationQueryClient;
+import org.springblade.business.mapper.InformationQueryMapper;
 import org.springblade.business.service.IInformationQueryFileService;
 import org.springblade.business.service.IInformationQueryService;
 import org.springblade.business.vo.QueryProcessDataVO;
@@ -24,6 +25,8 @@ public class InformationQueryClientImpl implements InformationQueryClient {
 
     private final IInformationQueryFileService informationQueryFileService;
 
+    private final InformationQueryMapper informationQueryMapper;
+
     @Override
     public JSONObject queryFirstBusinessDataByFirstId(String firstId) {
         InformationQuery query = this.iInformationQueryService.getById(firstId);
@@ -102,4 +105,8 @@ public class InformationQueryClientImpl implements InformationQueryClient {
         return iInformationQueryService.getNodeChildTabColsAllByTabName(initTabName);
     }
 
+    @Override
+    public List<InformationQuery> getInformationByContractId(Long contractId) {
+        return informationQueryMapper.getInformationByContractId(contractId);
+    }
 }

+ 4 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/ArchiveFileMapper.java

@@ -90,4 +90,8 @@ public interface ArchiveFileMapper extends BaseMapper<ArchiveFile> {
     void updateRectificationById(@Param("id") Long id,@Param("rectification") Integer rectification);
 
     List<ArchiveFile> batchSearchArchiveFile(@Param("ids") List<Long> ids);
+
+    List<ArchiveFile> getListByContractId(@Param("contractId") Long contractId);
+
+
 }

+ 12 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/ArchiveFileMapper.xml

@@ -395,4 +395,16 @@
         id = #{id}
     </update>
 
+    <select id="getListByContractId" resultType="org.springblade.business.entity.ArchiveFile">
+        select id,
+               project_id   as projectId,
+               node_id      as nodeId,
+               node_ext_id  as nodeExtId,
+               file_name    as fileName,
+               pdf_file_url as pdfFileUrl,
+               sort
+        from u_archive_file
+        where contract_id = #{contractId} and is_deleted = 0;
+    </select>
+
 </mapper>

+ 2 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/InformationQueryMapper.java

@@ -127,4 +127,6 @@ public interface InformationQueryMapper extends BaseMapper<InformationQuery> {
     List<QueryProcessDataVO> getNodeChildTabColsWithValueByTabName(String tabName, String pKeyId);
 
     List<InformationQuery> selectChildrenNodeInfo(@Param("node") WbsTreeContract node);
+
+    List<InformationQuery> getInformationByContractId(@Param("contractId") Long contractId);
 }

+ 13 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/InformationQueryMapper.xml

@@ -876,4 +876,17 @@
           AND status IN (1, 2)
     </select>
 
+    <select id="getInformationByContractId" resultMap="org.springblade.business.entity.InformationQuery">
+        id,
+        wbs_id as wbsId,
+        name,
+        e_visa_pdf_url as eVisaPdfUrl,
+        business_time as businessTime,
+        e_visa_pdf_page as eVisaPdfPage,
+        e_visa_pdf_size as eVisaPdfSize
+        from u_information_query
+        where is_deleted = 0
+          and contract_id = #{contractId} and is_deleted = 0;
+    </select>
+
 </mapper>

+ 3 - 3
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ArchiveTreeContractMapper.java

@@ -116,7 +116,7 @@ public interface ArchiveTreeContractMapper extends BaseMapper<ArchiveTreeContrac
 
     void updateBatchFileSortById(@Param("list") List<ArchiveFile> archiveFiles);
 
-     List<ArchiveFile> getListByContractId(@Param("contractId") Long contractId);
-
-    List<InformationQuery> getInformationByContractId(@Param("contractId") Long contractId);
+//     List<ArchiveFile> getListByContractId(@Param("contractId") Long contractId);
+//
+//    List<InformationQuery> getInformationByContractId(@Param("contractId") Long contractId);
 }

+ 23 - 23
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ArchiveTreeContractMapper.xml

@@ -517,29 +517,29 @@
         </foreach>
     </update>
 
-    <select id="getListByContractId" resultType="org.springblade.business.entity.ArchiveFile">
-        select id,
-               project_id   as projectId,
-               node_id      as nodeId,
-               node_ext_id  as nodeExtId,
-               file_name    as fileName,
-               pdf_file_url as pdfFileUrl,
-               sort
-        from u_archive_file
-        where contract_id = #{contractId} and is_deleted = 0;
-    </select>
+<!--    <select id="getListByContractId" resultType="org.springblade.business.entity.ArchiveFile">-->
+<!--        select id,-->
+<!--               project_id   as projectId,-->
+<!--               node_id      as nodeId,-->
+<!--               node_ext_id  as nodeExtId,-->
+<!--               file_name    as fileName,-->
+<!--               pdf_file_url as pdfFileUrl,-->
+<!--               sort-->
+<!--        from u_archive_file-->
+<!--        where contract_id = #{contractId} and is_deleted = 0;-->
+<!--    </select>-->
 
-    <select id="getInformationByContractId" resultMap="org.springblade.business.entity.InformationQuery">
-        id,
-        wbs_id as wbsId,
-        name,
-        e_visa_pdf_url as eVisaPdfUrl,
-        business_time as businessTime,
-        e_visa_pdf_page as eVisaPdfPage,
-        e_visa_pdf_size as eVisaPdfSize
-        from u_information_query
-        where is_deleted = 0
-          and contract_id = #{contractId} and is_deleted = 0;
-    </select>
+<!--    <select id="getInformationByContractId" resultMap="org.springblade.business.entity.InformationQuery">-->
+<!--        id,-->
+<!--        wbs_id as wbsId,-->
+<!--        name,-->
+<!--        e_visa_pdf_url as eVisaPdfUrl,-->
+<!--        business_time as businessTime,-->
+<!--        e_visa_pdf_page as eVisaPdfPage,-->
+<!--        e_visa_pdf_size as eVisaPdfSize-->
+<!--        from u_information_query-->
+<!--        where is_deleted = 0-->
+<!--          and contract_id = #{contractId} and is_deleted = 0;-->
+<!--    </select>-->
 
 </mapper>

+ 6 - 4
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ArchiveTreeContractSyncImpl.java

@@ -5,6 +5,7 @@ import lombok.AllArgsConstructor;
 import org.springblade.business.entity.ArchiveFile;
 import org.springblade.business.entity.InformationQuery;
 import org.springblade.business.feign.ArchiveFileClient;
+import org.springblade.business.feign.InformationQueryClient;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.manager.entity.ArchiveTreeContract;
 import org.springblade.manager.entity.ContractInfo;
@@ -39,7 +40,7 @@ public class ArchiveTreeContractSyncImpl {
 
     private final ArchiveFileClient archiveFileClient;
 
-
+    private final InformationQueryClient informationQueryClient;
 
 
     /**
@@ -385,15 +386,16 @@ public class ArchiveTreeContractSyncImpl {
 
     public List<InformationQuery>  getInformationQuerys(Long contractId) {
         //获取某个合同段所有的电签完成的文件题名,取 id wbsid name,eVisaPdfUrl
-        List<InformationQuery> informationQueryList = archiveTreeContractMapper.getInformationByContractId(contractId);
+//        List<InformationQuery> informationQueryList = new ArrayList<>();
+        List<InformationQuery> informationQueryList = informationQueryClient.getInformationByContractId(contractId);
         return informationQueryList;
 
         //互殴去
     }
 
     public List<ArchiveFile>  getArchiveFiles(Long contractId) {
-
-        List<ArchiveFile> archiveFiles = archiveTreeContractMapper.getListByContractId(contractId);
+//        List<ArchiveFile> archiveFiles = new ArrayList<>();
+       List<ArchiveFile> archiveFiles = archiveFileClient.getListByContractId(contractId);
         return archiveFiles;
     }