1
0
chenendian 15 часов назад
Родитель
Сommit
d58f9c5bec

+ 5 - 0
siwei-modules/pom.xml

@@ -9,6 +9,11 @@
     <modelVersion>4.0.0</modelVersion>
 
     <modules>
+        <module>siwei-system</module>
+        <module>siwei-job</module>
+        <module>siwei-file</module>
+        <module>siwei-gen</module>
+        <module>siwei-spatial</module>
         <module>siwei-apply</module>
     </modules>
 

+ 0 - 19
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/mapper/ProjectMapper.java

@@ -95,19 +95,6 @@ public interface ProjectMapper {
     List<Project> getZrzysiteProjectList(String nodeTableName);
 
 
-    /**
-     * 获取工改同步项目信息
-     * @param nodeTableName
-     * @return
-     */
-    List<Project> getZrzysiteProjectList(String nodeTableName);
-
-
-
-    String getNodeSourceIdByTable(@Param("nodeId")String nodeId,@Param("tableName") String tableName);
-
-
-
     String getNodeSourceIdByTable(@Param("nodeId")String nodeId,@Param("tableName") String tableName);
 
 
@@ -118,10 +105,4 @@ public interface ProjectMapper {
                                                 @Param("ewkt") String ewkt);
 
 
-    String getNodeSourceIdByTable(@Param("nodeId")String nodeId,@Param("tableName") String tableName);
-
-
-
-
-
 }

+ 24 - 24
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/utils/NpoiHelper.java

@@ -1,6 +1,6 @@
 package com.siwei.apply.utils;
 
-//import com.aspose.words.*;
+import com.aspose.words.*;
 import com.siwei.common.core.utils.StringUtils;
 import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
 import org.apache.poi.util.Units;
@@ -499,29 +499,29 @@ public class NpoiHelper {
         FileOutputStream os = null;
         try {
             //取用户字体目录
-//            String userfontsfoloder = System.getProperty("user.home") + "\\Microsoft\\Windows\\Fonts\\";
-//            System.out.println("userfontsfoloder:" + userfontsfoloder);
-//            FontSourceBase[] fontSourceBases = FontSettings.getDefaultInstance().getFontsSources();
-//            FontSourceBase[] updatedFontSources = new FontSourceBase[FontSettings.getDefaultInstance().getFontsSources().length + 1];
-//
-//            //将用户目录字体添加到字体源中
-//            FolderFontSource folderFontSource = new FolderFontSource(userfontsfoloder, true);
-//
-//            for (int i = 0; i < fontSourceBases.length; i++) {
-//                updatedFontSources[i] = fontSourceBases[i];
-//            }
-//            updatedFontSources[fontSourceBases.length] = folderFontSource;
-//
-//            FontSettings.getDefaultInstance().setFontsSources(updatedFontSources);
-//
-//            long old = System.currentTimeMillis();
-//            File file = new File(outPath); // 新建一个空白pdf文档
-//            os = new FileOutputStream(file);
-//            com.aspose.words.Document doc = new com.aspose.words.Document(inPath); // Address是将要被转化的word文档
-//            doc.save(os, SaveFormat.PDF);// 全面支持DOC, DOCX, OOXML, RTF HTML, OpenDocument, PDF,
-//            // EPUB, XPS, SWF 相互转换
-//            long now = System.currentTimeMillis();
-//            System.out.println("pdf转换成功,共耗时:" + ((now - old) / 1000.0) + "秒"); // 转化用时
+            String userfontsfoloder = System.getProperty("user.home") + "\\Microsoft\\Windows\\Fonts\\";
+            System.out.println("userfontsfoloder:" + userfontsfoloder);
+            FontSourceBase[] fontSourceBases = FontSettings.getDefaultInstance().getFontsSources();
+            FontSourceBase[] updatedFontSources = new FontSourceBase[FontSettings.getDefaultInstance().getFontsSources().length + 1];
+
+            //将用户目录字体添加到字体源中
+            FolderFontSource folderFontSource = new FolderFontSource(userfontsfoloder, true);
+
+            for (int i = 0; i < fontSourceBases.length; i++) {
+                updatedFontSources[i] = fontSourceBases[i];
+            }
+            updatedFontSources[fontSourceBases.length] = folderFontSource;
+
+            FontSettings.getDefaultInstance().setFontsSources(updatedFontSources);
+
+            long old = System.currentTimeMillis();
+            File file = new File(outPath); // 新建一个空白pdf文档
+            os = new FileOutputStream(file);
+            com.aspose.words.Document doc = new com.aspose.words.Document(inPath); // Address是将要被转化的word文档
+            doc.save(os, SaveFormat.PDF);// 全面支持DOC, DOCX, OOXML, RTF HTML, OpenDocument, PDF,
+            // EPUB, XPS, SWF 相互转换
+            long now = System.currentTimeMillis();
+            System.out.println("pdf转换成功,共耗时:" + ((now - old) / 1000.0) + "秒"); // 转化用时
         } catch (Exception e) {
             e.printStackTrace();
             return false;

+ 1 - 1
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/utils/ServiceUtil.java

@@ -235,7 +235,7 @@ public class ServiceUtil {
         headers.put("x-format", "json");
 
         // 7. 使用HttpClientUtil 发起远程POST请求
-        String resp = HttpClientUtil.doPostJson(THIRD_API_BASE_URL, payload, headers);
+        String resp = HttpClientUtil.doPostJson(THIRD_API_DOMAIN+THIRD_API_BASE_URL, payload, headers);
         //System.out.println("响应原文: " + resp);
         logger.info("响应原文:{} ", resp);
         // 8. 用我方私钥解密响应密文

+ 0 - 17
siwei-modules/siwei-apply/src/main/resources/mapper/ProjectMapper.xml

@@ -821,23 +821,6 @@
     </select>
 
 
-    <!-- 1.查询项目代码存在的所有项目,并且工程建设环节无新增数据的条数。2.查询当前环节已经新增数据但是未上链并且未同步过的数据(source_id-同步数据id)) -->
-    <select id="getZrzysiteProjectList" resultMap="projectMap">
-        SELECT    p.id,p.name,p.code ,p.project_type,  '1'  as creator_id
-        from "public"."t_project" p  LEFT JOIN  "public"."t_project_workflow"  w on p.id = w.project_id     and w.node_table_name=#{tableName}
-        where    LENGTH(TRIM(p.code))>0   and   w.id is  null
-        union
-        SELECT DISTINCT  p.id,p.name,p.code ,p.project_type ,'2' as  creator_id
-        from "public"."t_project"  p  LEFT JOIN "public".${tableName}  node  on  p.id=node.project_id
-        where  LENGTH(TRIM(p.code))>0   and  node.has_onchain=false  and  node.source_id is null
-    </select>
-
-    <select id="getNodeSourceIdByTable"   resultType="string" >
-        SELECT source_id FROM ${tableName}
-        WHERE id = #{nodeId}
-    </select>
-
-
     <!-- 1.查询项目代码存在的所有项目,并且工程建设环节无新增数据的条数。2.查询当前环节已经新增数据但是未上链并且未同步过的数据(source_id-同步数据id)) -->
     <select id="getZrzysiteProjectList" resultMap="projectMap">
         SELECT    p.id,p.name,p.code ,p.project_type,  '1'  as creator_id