Forráskód Böngészése

refactor(app): 重构 E签宝 相关接口

- 新增 ESignController 类,用于处理 web 管理端的 E签宝 相关请求
- 在 AppSite 实体类中添加 esignOrgId 和 orgIdCardNum 字段
- 优化 EsignFileBean 类,支持从网络 URL 下载文件
- 删除 ESignApi 中不再使用的冗余方法
SheepHy 3 napja
szülő
commit
95afda9555
15 módosított fájl, 741 hozzáadás és 596 törlés
  1. 7 100
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/controller/ESignApi.java
  2. 145 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/controller/ESignController.java
  3. 41 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/dto/ExternalAuthRequestDTO.java
  4. 25 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/dto/SealInfoDTO.java
  5. 0 165
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/dto/SignFlowDTO.java
  6. 87 7
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/esign/comm/EsignFileBean.java
  7. 28 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/esign/fileAndTemplate/FileDemo.java
  8. 1 1
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/esign/fileAndTemplate/TemplateDemo.java
  9. 11 12
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/esign/members/MembersDemo.java
  10. 23 46
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/esign/seal/SealDemo.java
  11. 1 1
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/esign/sign/SignDemo.java
  12. 20 1
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/service/IESignService.java
  13. 350 262
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/service/impl/ESignServiceImpl.java
  14. 2 0
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/AppSite.java
  15. 0 1
      national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/entity/SysDepart.java

+ 7 - 100
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/controller/ESignApi.java

@@ -7,18 +7,18 @@ import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.modules.app.esign.exception.EsignDemoException;
 import org.jeecg.modules.app.service.IESignService;
-import org.jeecg.modules.system.app.dto.AppContractInfoDTO;
-import org.jeecg.modules.system.app.entity.AppContractInfo;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
 import java.util.List;
-import java.util.Map;
 
 @Slf4j
 @Tag(name = "E签宝相关接口")
 @RestController
-@RequestMapping("/api/esign")
+@RequestMapping("/app/esign")
 public class ESignApi {
     @Resource
     private IESignService iESignService;
@@ -44,49 +44,8 @@ public class ESignApi {
      **/
     @GetMapping("/getAuthUrl")
     @Operation(summary = "用户获取授权链接-APP")
-    public Result<String> getAuthUrl() throws EsignDemoException{
-        return Result.OK(iESignService.getAuthUrl());
-    }
-
-
-    /**
-     * @Author SheepHy
-     * @Description 查询企业授权状态
-     * @Date 13:33 2025/7/18
-     * @Param
-     * @return
-     **/
-    @GetMapping("/getOrgIdentityInfos")
-    @Operation(summary = "查询企业授权状态-PC")
-    public Result<Boolean> getOrgIdentityInfos(@RequestParam("orgCode") @Schema(description="企业编号")String orgCode) throws EsignDemoException{
-        return Result.OK(iESignService.getOrgIdentityInfos(orgCode));
-    }
-
-    /**
-     * @Author SheepHy
-     * @Description 企业获取授权链接
-     * @Date 13:33 2025/7/18
-     * @Param
-     * @return
-     **/
-    @GetMapping("/getOrgAuthUrls")
-    @Operation(summary = "企业获取授权链接-PC")
-    public Result<String> getOrgAuthUrls(@RequestParam("orgCode") @Schema(description="企业编号")String orgCode,
-                                         @RequestParam("phoneNumber") @Schema(description="联系人手机号")String phoneNumber) throws EsignDemoException{
-        return Result.OK(iESignService.getOrgAuthUrls(orgCode,phoneNumber));
-    }
-
-    /**
-     * @Author SheepHy
-     * @Description 上传合同底稿
-     * @Date 9:54 2025/7/21
-     * @Param
-     * @return
-     **/
-    @PostMapping("/uploadContractTemplate")
-    @Operation(summary = "上传合同底稿-PC")
-    public Result<Boolean> uploadContractTemplate(@RequestBody AppContractInfoDTO appContractInfoDTO) throws EsignDemoException{
-        return Result.OK(iESignService.uploadContractTemplate(appContractInfoDTO));
+    public Result<String> getAuthUrl(@RequestParam("phoneNumber") @Schema(description="联系人手机号")String phoneNumber) throws EsignDemoException{
+        return Result.OK(iESignService.getAuthUrl(phoneNumber));
     }
 
     /**
@@ -102,32 +61,6 @@ public class ESignApi {
         return Result.OK(iESignService.getSignUrl(signFlowId));
     }
 
-    /**
-     * @Author SheepHy
-     * @Description 制作模板
-     * @Date 14:47 2025/7/21
-     * @Param
-     * @return
-     **/
-    @GetMapping("/createTemplate")
-    @Operation(summary = "制作模板-PC")
-    public Result<String> createTemplate(@RequestParam("fileId") @Schema(description="文件标识")String fileId) throws EsignDemoException{
-        return Result.OK(iESignService.createTemplate(fileId));
-    }
-
-    /**
-     * @Author SheepHy
-     * @Description 编辑合同
-     * @Date 15:01 2025/7/21
-     * @Param
-     * @return
-     **/
-    @GetMapping("/editContract")
-    @Operation(summary = "编辑合同-PC")
-    public Result<String> editContract(@RequestParam("docTemplateId") @Schema(description="模板ID")String docTemplateId) throws EsignDemoException{
-        return Result.OK(iESignService.editContract(docTemplateId));
-    }
-
     /**
      * @Author SheepHy
      * @Description 发起签署
@@ -140,30 +73,4 @@ public class ESignApi {
     public Result<List<String>> createSign(@RequestParam("orderCode") @Schema(description="订单编号")String orderCode) throws EsignDemoException{
         return Result.OK(iESignService.createSign(orderCode));
     }
-
-    /**
-     * @Author SheepHy
-     * @Description 下载已签署文件及附属材料
-     * @Date 14:05 2025/7/28
-     * @Param
-     * @return
-     **/
-    @GetMapping("/fileDownloadUrl")
-    @Operation(summary = "下载已签署文件及附属材料-PC")
-    public Result<List<Map<String,String>>> fileDownloadUrl(@RequestParam("signFlowId") @Schema(description="文件标识")String signFlowId) throws EsignDemoException{
-        return Result.OK(iESignService.fileDownloadUrl(signFlowId));
-    }
-
-    /**
-     * @Author SheepHy
-     * @Description 合同列表查询
-     * @Date 15:09 2025/7/28
-     * @Param
-     * @return
-     **/
-    @GetMapping("/queryContractInfo")
-    @Operation(summary = "合同列表查询-PC")
-    public Result<List<AppContractInfo>> queryContractInfo(@RequestParam(name = "contractName", required = false) @Schema(description="合同名称")String contractName){
-        return Result.OK(iESignService.queryContractInfo(contractName));
-    }
 }

+ 145 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/controller/ESignController.java

@@ -0,0 +1,145 @@
+package org.jeecg.modules.app.controller;
+
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.modules.app.dto.SealInfoDTO;
+import org.jeecg.modules.app.esign.exception.EsignDemoException;
+import org.jeecg.modules.app.service.IESignService;
+import org.jeecg.modules.system.app.dto.AppContractInfoDTO;
+import org.jeecg.modules.system.app.entity.AppContractInfo;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Map;
+
+@Slf4j
+@Tag(name = "web管理E签宝相关接口")
+@RestController
+@RequestMapping("/app/esign/web")
+public class ESignController {
+    @Resource
+    private IESignService iESignService;
+
+    /**
+     * @Author SheepHy
+     * @Description 查询企业授权状态
+     * @Date 13:33 2025/7/18
+     * @Param
+     * @return
+     **/
+    @GetMapping("/getOrgIdentityInfos")
+    @Operation(summary = "查询企业授权状态-PC")
+    public Result<Boolean> getOrgIdentityInfos(@RequestParam("orgCode") @Schema(description="企业编号")String orgCode) throws EsignDemoException {
+        return Result.OK(iESignService.getOrgIdentityInfos(orgCode));
+    }
+
+    /**
+     * @Author SheepHy
+     * @Description 企业获取授权链接
+     * @Date 13:33 2025/7/18
+     * @Param
+     * @return
+     **/
+    @GetMapping("/getOrgAuthUrls")
+    @Operation(summary = "企业获取授权链接-PC")
+    public Result<String> getOrgAuthUrls(@RequestParam("orgCode") @Schema(description="企业编号")String orgCode,
+                                         @RequestParam("phoneNumber") @Schema(description="联系人手机号")String phoneNumber) throws EsignDemoException{
+        return Result.OK(iESignService.getOrgAuthUrls(orgCode,phoneNumber));
+    }
+
+    /**
+     * @Author SheepHy
+     * @Description 上传合同底稿
+     * @Date 9:54 2025/7/21
+     * @Param
+     * @return
+     **/
+    @PostMapping("/uploadContractTemplate")
+    @Operation(summary = "上传合同底稿-PC")
+    public Result<Boolean> uploadContractTemplate(@RequestBody AppContractInfoDTO appContractInfoDTO) throws EsignDemoException{
+        return Result.OK(iESignService.uploadContractTemplate(appContractInfoDTO));
+    }
+
+    /**
+     * @Author SheepHy
+     * @Description 制作模板
+     * @Date 14:47 2025/7/21
+     * @Param
+     * @return
+     **/
+    @GetMapping("/createTemplate")
+    @Operation(summary = "制作模板-PC")
+    public Result<String> createTemplate(@RequestParam("fileId") @Schema(description="文件标识")String fileId) throws EsignDemoException{
+        return Result.OK(iESignService.createTemplate(fileId));
+    }
+
+    /**
+     * @Author SheepHy
+     * @Description 编辑合同
+     * @Date 15:01 2025/7/21
+     * @Param
+     * @return
+     **/
+    @GetMapping("/editContract")
+    @Operation(summary = "编辑合同-PC")
+    public Result<String> editContract(@RequestParam("docTemplateId") @Schema(description="模板ID")String docTemplateId) throws EsignDemoException{
+        return Result.OK(iESignService.editContract(docTemplateId));
+    }
+
+    /**
+     * @Author SheepHy
+     * @Description 下载已签署文件及附属材料
+     * @Date 14:05 2025/7/28
+     * @Param
+     * @return
+     **/
+    @GetMapping("/fileDownloadUrl")
+    @Operation(summary = "下载已签署文件及附属材料-PC")
+    public Result<List<Map<String,String>>> fileDownloadUrl(@RequestParam("signFlowId") @Schema(description="文件标识")String signFlowId) throws EsignDemoException{
+        return Result.OK(iESignService.fileDownloadUrl(signFlowId));
+    }
+
+    /**
+     * @Author SheepHy
+     * @Description 合同列表查询
+     * @Date 15:09 2025/7/28
+     * @Param
+     * @return
+     **/
+    @GetMapping("/queryContractInfo")
+    @Operation(summary = "合同列表查询-PC")
+    public Result<List<AppContractInfo>> queryContractInfo(@RequestParam(name = "contractName", required = false) @Schema(description="合同名称")String contractName){
+        return Result.OK(iESignService.queryContractInfo(contractName));
+    }
+
+    /**
+     * @Author SheepHy
+     * @Description 查询企业内部印章
+     * @Date 11:46 2025/7/31
+     * @Param
+     * @return
+     **/
+    @GetMapping("/orgOwnSeal")
+    @Operation(summary = "查询企业内部印章-PC")
+    public Result<List<SealInfoDTO>> orgOwnSeal(@RequestParam(name = "orgId") @Schema(description="E签宝组织ID")String orgId){
+        return Result.OK(iESignService.orgOwnSeal(orgId));
+    }
+
+    /**
+     * @Author SheepHy
+     * @Description 跨企业印章授权
+     * @Date 15:29 2025/7/31
+     * @Param
+     * @return
+     **/
+    @GetMapping("/orgSealsExternal")
+    @Operation(summary = "跨企业印章授权-PC")
+    public Result<Boolean> orgSealsExternal(@RequestParam("orgCode")@Schema(description="企业编号")String orgCode,
+                                            @RequestParam("sealId")@Schema(description="签章ID")String sealId) throws EsignDemoException{
+        return Result.OK(iESignService.orgSealsExternal(orgCode, sealId));
+    }
+}

+ 41 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/dto/ExternalAuthRequestDTO.java

@@ -0,0 +1,41 @@
+package org.jeecg.modules.app.dto;
+
+import com.google.gson.annotations.SerializedName;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.util.List;
+
+@Data
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@Schema(description = "跨企业印章授权DTO")
+public class ExternalAuthRequestDTO {
+    // 授权企业ID
+    private String orgId;
+
+    // 操作人ID
+    private String transactorPsnId;
+
+    // 授权组织信息
+    private AuthorizedOrgInfoDTO authorizedOrgInfo;
+
+    // 印章ID集合
+    private List<String> sealIds;
+
+    // 长期有效
+    private Boolean longTermEffective;
+
+
+    @Data
+    public static class AuthorizedOrgInfoDTO {
+        // 组织名称
+        private String orgName;
+
+        // 组织证件号
+        @SerializedName("orgIDCardNum")
+        private String orgIdCardNum;
+    }
+}

+ 25 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/dto/SealInfoDTO.java

@@ -0,0 +1,25 @@
+package org.jeecg.modules.app.dto;
+
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+@Data
+@Accessors(chain = true)
+@EqualsAndHashCode(callSuper = false)
+@Schema(description="企业签章信息DTO")
+public class SealInfoDTO {
+    @Schema(description ="签章ID")
+    private String sealId;
+    @Schema(description ="签章业务类型")
+    private String sealBizType;
+    @Schema(description ="签章状态")
+    private String statusDescription;
+    @Schema(description ="签章名称")
+    private String sealName;
+    @Schema(description ="签章业务类型描述")
+    private String sealBizTypeDescription;
+    @Schema(description ="签章图片下载地址")
+    private String sealImageDownloadUrl;
+}

+ 0 - 165
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/dto/SignFlowDTO.java

@@ -1,165 +0,0 @@
-package org.jeecg.modules.app.dto;
-
-import io.swagger.v3.oas.annotations.media.Schema;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-import java.util.List;
-
-@Data
-@Accessors(chain = true)
-@EqualsAndHashCode(callSuper = false)
-@Schema(description = "电子签流程配置DTO")
-public class SignFlowDTO {
-    @Schema(description = "文档列表")
-    private List<Doc> docs;
-
-    @Schema(description = "签署流程配置")
-    private SignFlowConfig signFlowConfig;
-
-    @Schema(description = "签署方列表")
-    private List<Signer> signers;
-
-    // 内部类 - 文档信息
-    @Data
-    @Accessors(chain = true)
-    @Schema(description = "文档信息")
-    public static class Doc {
-        @Schema(description = "文件ID")
-        private String fileId;
-
-        @Schema(description = "文件名称")
-        private String fileName;
-    }
-
-    // 内部类 - 签署流程配置
-    @Data
-    @Accessors(chain = true)
-    @Schema(description = "签署流程配置")
-    public static class SignFlowConfig {
-        @Schema(description = "流程标题")
-        private String signFlowTitle;
-
-        @Schema(description = "流程过期时间")
-        private Long signFlowExpireTime;
-
-        @Schema(description = "是否自动完成")
-        private Boolean autoFinish;
-
-        @Schema(description = "回调通知地址")
-        private String notifyUrl;
-
-        @Schema(description = "重定向配置")
-        private RedirectConfig redirectConfig;
-    }
-
-    // 内部类 - 重定向配置
-    @Data
-    @Accessors(chain = true)
-    @Schema(description = "重定向配置")
-    public static class RedirectConfig {
-        @Schema(description = "重定向URL")
-        private String redirectUrl;
-    }
-
-    // 内部类 - 签署方信息
-    @Data
-    @Accessors(chain = true)
-    @Schema(description = "签署方信息")
-    public static class Signer {
-
-        @Schema(description = "签署方类型 0-个人 1-企业")
-        private Integer signerType;
-
-        @Schema(description = "个人签署方信息")
-        private PsnSignerInfo psnSignerInfo;
-
-        @Schema(description = "签署字段列表")
-        private List<SignField> signFields;
-    }
-
-    // 内部类 - 签署配置
-    @Data
-    @Accessors(chain = true)
-    @Schema(description = "签署配置")
-    public static class SignConfig {
-        @Schema(description = "签署顺序")
-        private Integer signOrder;
-    }
-
-    // 内部类 - 通知配置
-    @Data
-    @Accessors(chain = true)
-    @Schema(description = "通知配置")
-    public static class NoticeConfig {
-        @Schema(description = "通知类型集合")
-        private String noticeTypes;
-    }
-
-    // 内部类 - 个人签署方信息
-    @Data
-    @Accessors(chain = true)
-    @Schema(description = "个人签署方信息")
-    public static class PsnSignerInfo {
-        @Schema(description = "签署方账号")
-        private String psnAccount;
-
-        @Schema(description = "签署方信息")
-        private PsnInfo psnInfo;
-    }
-
-    // 内部类 - 签署方信息
-    @Data
-    @Accessors(chain = true)
-    @Schema(description = "签署方信息")
-    public static class PsnInfo {
-        @Schema(description = "签署方姓名")
-        private String psnName;
-    }
-
-    // 内部类 - 签署字段
-    @Data
-    @Accessors(chain = true)
-    @Schema(description = "签署字段配置")
-    public static class SignField {
-        @Schema(description = "自定义业务编号")
-        private String customBizNum;
-
-        @Schema(description = "文件ID")
-        private String fileId;
-
-        @Schema(description = "普通签署字段配置")
-        private NormalSignFieldConfig normalSignFieldConfig;
-    }
-
-    // 内部类 - 普通签署字段配置
-    @Data
-    @Accessors(chain = true)
-    @Schema(description = "普通签署字段配置")
-    public static class NormalSignFieldConfig {
-        @Schema(description = "是否自动签署")
-        private Boolean autoSign = true;
-
-        @Schema(description = "签署字段样式")
-        private Integer signFieldStyle;
-
-        @Schema(description = "签署位置信息")
-        private List<SignFieldPosition> signFieldPosition;
-    }
-
-    // 内部类 - 签署位置信息
-    @Data
-    @Accessors(chain = true)
-    @Schema(description = "签署位置信息")
-    public static class SignFieldPosition {
-        @Schema(description = "页码位置")
-        private String positionPage;
-
-        @Schema(description = "X坐标位置")
-        private Integer positionX;
-
-        @Schema(description = "Y坐标位置")
-        private Integer positionY;
-    }
-}

+ 87 - 7
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/esign/comm/EsignFileBean.java

@@ -4,6 +4,10 @@ package org.jeecg.modules.app.esign.comm;
 import org.jeecg.modules.app.esign.exception.EsignDemoException;
 
 import java.io.File;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
 
 /**
  * @description  文件基础信息封装类
@@ -23,14 +27,90 @@ public class EsignFileBean {
 
 
     public EsignFileBean(String filePath) throws EsignDemoException {
-            this.filePath=filePath;
-            this.fileContentMD5 = FileTransformation.getFileContentMD5(filePath);
-            File file = new File(filePath);
-            if (!file.exists()) {
-                throw new EsignDemoException("文件不存在");
+        this.filePath = filePath;
+
+        if (filePath.startsWith("http")) {
+            // 下载网络文件到本地临时目录
+            File tempFile = downloadFromURL(filePath);
+            this.filePath = tempFile.getAbsolutePath();
+            this.isTemporaryFile = true;
+        }
+
+        File file = new File(this.filePath);
+        if (!file.exists()) {
+            throw new EsignDemoException("文件不存在");
+        }
+
+        this.fileName = file.getName();
+        this.fileSize = (int) file.length();
+        this.fileContentMD5 = FileTransformation.getFileContentMD5(this.filePath);
+    }
+
+    private boolean isTemporaryFile = false;
+
+    private File downloadFromURL(String fileUrl) throws EsignDemoException {
+        try {
+            URL url = new URL(fileUrl);
+            HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+            connection.setRequestMethod("GET");
+            connection.connect();
+
+            if (connection.getResponseCode() != HttpURLConnection.HTTP_OK) {
+                throw new EsignDemoException("网络文件下载失败,状态码:" + connection.getResponseCode());
+            }
+
+            // 提取文件名(从URL或Content-Disposition)
+            String fileName = extractFileNameFromURL(url, connection);
+            File targetFile = new File(getDownloadDirectory(), fileName);
+
+            // 确保文件名唯一(可选)
+            int count = 1;
+            String baseName = fileName.substring(0, fileName.lastIndexOf('.'));
+            String ext = fileName.substring(fileName.lastIndexOf('.'));
+            while (targetFile.exists()) {
+                targetFile = new File(getDownloadDirectory(), baseName + "_" + (count++) + ext);
+            }
+
+            try (InputStream in = connection.getInputStream();
+                 FileOutputStream out = new FileOutputStream(targetFile)) {
+                byte[] buffer = new byte[8192];
+                int bytesRead;
+                while ((bytesRead = in.read(buffer)) != -1) {
+                    out.write(buffer, 0, bytesRead);
+                }
+            }
+
+            return targetFile;
+        } catch (Exception e) {
+            throw new EsignDemoException("网络文件下载失败:" + e.getMessage(), e);
+        }
+    }
+    private String downloadDirectory = System.getProperty("user.dir") + File.separator + "esign_downloads";
+
+    private File getDownloadDirectory() {
+        File dir = new File(downloadDirectory);
+        if (!dir.exists()) {
+            dir.mkdirs();
+        }
+        return dir;
+    }
+    private String extractFileNameFromURL(URL url, HttpURLConnection connection) {
+        String disposition = connection.getHeaderField("Content-Disposition");
+        if (disposition != null && disposition.contains("filename=")) {
+            return disposition.split("filename=")[1].trim().replaceAll("\"", "");
+        } else {
+            String path = url.getPath();
+            return path.substring(path.lastIndexOf('/') + 1);
+        }
+    }
+    protected void finalize() throws Throwable {
+        try {
+            if (isTemporaryFile && new File(filePath).exists()) {
+                new File(filePath).delete();
             }
-            this.fileName = file.getName();
-            this.fileSize = (int) file.length();
+        } finally {
+            super.finalize();
+        }
     }
 
     public String getFileName() {

+ 28 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/esign/fileAndTemplate/FileDemo.java

@@ -11,6 +11,11 @@ import org.jeecg.modules.app.esign.enums.EsignRequestType;
 import org.jeecg.modules.app.esign.exception.EsignDemoException;
 
 import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
 
@@ -87,6 +92,29 @@ public class FileDemo extends Exception {
 		//发起接口请求
 		return EsignHttpHelper.doCommHttp(eSignHost, apiaddr,requestType , jsonParm, header,true);
 	}
+
+
+	// 新增下载方法
+	private static File downloadFromURL(String fileUrl) throws IOException {
+		URL url = new URL(fileUrl);
+		HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+		connection.setRequestMethod("GET");
+		connection.connect();
+
+		// 创建临时文件
+		File tempFile = File.createTempFile("esign_", ".tmp");
+		tempFile.deleteOnExit();
+
+		try (InputStream in = connection.getInputStream();
+			 FileOutputStream out = new FileOutputStream(tempFile)) {
+			byte[] buffer = new byte[8192];
+			int bytesRead;
+			while ((bytesRead = in.read(buffer)) != -1) {
+				out.write(buffer, 0, bytesRead);
+			}
+		}
+		return tempFile;
+	}
 	/**
 	 * 文件流上传
 	 * @return

+ 1 - 1
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/esign/fileAndTemplate/TemplateDemo.java

@@ -95,7 +95,7 @@ public class TemplateDemo extends Exception {
 	/**
 	 * 查询合同模板中控件详情
 	 */
-	private static EsignHttpResponse getComponentsInfo() throws EsignDemoException {
+	public static EsignHttpResponse getComponentsInfo() throws EsignDemoException {
 		String docTemplateId="a6f7e3b4xxxxxxxxfdedc6fc89";
 		String apiaddr="/v3/doc-templates/"+docTemplateId;
 

+ 11 - 12
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/esign/members/MembersDemo.java

@@ -25,23 +25,23 @@ public class MembersDemo {
     public static void main(String[] args) throws EsignDemoException, InterruptedException {
         Gson gson = new Gson();
         //添加企业机构成员
-        EsignHttpResponse createMembers = createMembers();
-        JsonObject createMembersObject = gson.fromJson(createMembers.getBody(), JsonObject.class);
-        System.out.println("请求返回:"+createMembersObject);
+//        EsignHttpResponse createMembers = createMembers();
+//        JsonObject createMembersObject = gson.fromJson(createMembers.getBody(), JsonObject.class);
+//        System.out.println("请求返回:"+createMembersObject);
 
         //查询企业成员列表
-        EsignHttpResponse memberList = memberList();
-        JsonObject memberListObject = gson.fromJson(memberList.getBody(), JsonObject.class);
-        System.out.println("请求返回:"+memberListObject);
+//        EsignHttpResponse memberList = memberList();
+//        JsonObject memberListObject = gson.fromJson(memberList.getBody(), JsonObject.class);
+//        System.out.println("请求返回:"+memberListObject);
         //查询企业管理员
-        EsignHttpResponse administrators = administrators();
+        EsignHttpResponse administrators = administrators("ebeefbce5843482b94d3bfe24dd5959c");
         JsonObject administratorsObject = gson.fromJson(administrators.getBody(), JsonObject.class);
         System.out.println("请求返回:"+administratorsObject);
 
         //删除企业成员
-        EsignHttpResponse deleteMembers = deleteMembers();
-        JsonObject deleteMembersObject = gson.fromJson(deleteMembers.getBody(), JsonObject.class);
-        System.out.println("请求返回:"+deleteMembersObject);
+//        EsignHttpResponse deleteMembers = deleteMembers();
+//        JsonObject deleteMembersObject = gson.fromJson(deleteMembers.getBody(), JsonObject.class);
+//        System.out.println("请求返回:"+deleteMembersObject);
     }
 
 
@@ -97,8 +97,7 @@ public class MembersDemo {
      * 查询企业管理员
      */
 
-    public static EsignHttpResponse administrators() throws EsignDemoException {
-        String orgId="89621ebc8fe64239b61001c46caa8de6";
+    public static EsignHttpResponse administrators(String orgId) throws EsignDemoException {
 
         String apiaddr="/v3/organizations/"+orgId+"/administrators";
 

+ 23 - 46
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/esign/seal/SealDemo.java

@@ -2,6 +2,7 @@ package org.jeecg.modules.app.esign.seal;
 
 import com.google.gson.Gson;
 import com.google.gson.JsonObject;
+import org.jeecg.modules.app.dto.ExternalAuthRequestDTO;
 import org.jeecg.modules.app.esign.comm.EsignHttpHelper;
 import org.jeecg.modules.app.esign.comm.EsignHttpResponse;
 import org.jeecg.modules.app.esign.constant.EsignDemoConfig;
@@ -10,6 +11,8 @@ import org.jeecg.modules.app.esign.exception.EsignDemoException;
 
 import java.util.Map;
 
+import static com.alibaba.dashscope.utils.JsonUtils.gson;
+
 /**
  * description 印章服务
  * @author  古柯
@@ -45,29 +48,29 @@ public class SealDemo {
 
     //企业印章场景
         //创建机构模板印章
-        EsignHttpResponse createOrgByTemplate = createOrgByTemplate();
-        JsonObject createOrgByTemplateObject = gson.fromJson(createOrgByTemplate.getBody(), JsonObject.class);
-        System.out.println("请求返回:"+createOrgByTemplateObject);
+//        EsignHttpResponse createOrgByTemplate = createOrgByTemplate();
+//        JsonObject createOrgByTemplateObject = gson.fromJson(createOrgByTemplate.getBody(), JsonObject.class);
+//        System.out.println("请求返回:"+createOrgByTemplateObject);
         //查询企业内部印章
-        EsignHttpResponse orgOwnSealList = orgOwnSealList();
-        JsonObject orgOwnSealListObject = gson.fromJson(orgOwnSealList.getBody(), JsonObject.class);
-        System.out.println("请求返回:"+orgOwnSealListObject);
+//        EsignHttpResponse orgOwnSealList = orgOwnSealList();
+//        JsonObject orgOwnSealListObject = gson.fromJson(orgOwnSealList.getBody(), JsonObject.class);
+//        System.out.println("请求返回:"+orgOwnSealListObject);
         //查询被外部企业授权印章
         EsignHttpResponse orgAuthorizedSealList = orgAuthorizedSealList();
         JsonObject orgAuthorizedSealListObject = gson.fromJson(orgAuthorizedSealList.getBody(), JsonObject.class);
         System.out.println("请求返回:"+orgAuthorizedSealListObject);
         //跨企业印章授权
-        EsignHttpResponse orgSealsExternalAuth = orgSealsExternalAuth();
-        JsonObject orgSealsExternalAuthObject = gson.fromJson(orgSealsExternalAuth.getBody(), JsonObject.class);
-        System.out.println("请求返回:"+orgSealsExternalAuthObject);
+//        EsignHttpResponse orgSealsExternalAuth = orgSealsExternalAuth();
+//        JsonObject orgSealsExternalAuthObject = gson.fromJson(orgSealsExternalAuth.getBody(), JsonObject.class);
+//        System.out.println("请求返回:"+orgSealsExternalAuthObject);
         //解除印章授权
-        EsignHttpResponse orgSealsauthDelete = orgSealsauthDelete();
-        JsonObject orgSealsauthDeleteObject = gson.fromJson(orgSealsauthDelete.getBody(), JsonObject.class);
-        System.out.println("请求返回:"+orgSealsauthDeleteObject);
-        //删除企业印章
-        EsignHttpResponse deleteOrgSeal = deleteOrgSeal();
-        JsonObject deleteOrgSealObject = gson.fromJson(deleteOrgSeal.getBody(), JsonObject.class);
-        System.out.println("请求返回:"+deleteOrgSealObject);
+//        EsignHttpResponse orgSealsauthDelete = orgSealsauthDelete();
+//        JsonObject orgSealsauthDeleteObject = gson.fromJson(orgSealsauthDelete.getBody(), JsonObject.class);
+//        System.out.println("请求返回:"+orgSealsauthDeleteObject);
+//        //删除企业印章
+//        EsignHttpResponse deleteOrgSeal = deleteOrgSeal();
+//        JsonObject deleteOrgSealObject = gson.fromJson(deleteOrgSeal.getBody(), JsonObject.class);
+//        System.out.println("请求返回:"+deleteOrgSealObject);
 
 
     }
@@ -164,13 +167,10 @@ public class SealDemo {
      * 查询企业内部印章
      */
 
-    public static EsignHttpResponse orgOwnSealList() throws EsignDemoException {
-        String orgId="89621ebc8fe64239b61001c46caa8de6";
+    public static EsignHttpResponse orgOwnSealList(String orgId) throws EsignDemoException {
         int pageNum=1;
         int pageSize=10;
-
         String apiaddr="/v3/seals/org-own-seal-list?orgId="+orgId+"&pageNum="+pageNum+"&pageSize="+pageSize;
-
         //请求参数body体,json格式。get或者delete请求时jsonString传空json:"{}"或者null
         String jsonParm=null;
         //请求方法
@@ -185,7 +185,7 @@ public class SealDemo {
      */
 
     public static EsignHttpResponse orgAuthorizedSealList() throws EsignDemoException {
-        String orgId="89621ebc8fe64239b61001c46caa8de6";
+        String orgId="ebeefbce5843482b94d3bfe24dd5959c";
         int pageNum=1;
         int pageSize=10;
         String apiaddr="/v3/seals/org-authorized-seal-list?orgId="+orgId+"&pageNum="+pageNum+"&pageSize="+pageSize;
@@ -223,32 +223,9 @@ public class SealDemo {
      * 跨企业授权
      */
 
-    public static EsignHttpResponse orgSealsExternalAuth() throws EsignDemoException {
-
-        String orgId="89621ebc8fe64239b61001c46caa8de6";//授权企业账号id
-        String transactorPsnId="319f513178f242e590c04b2fc2bb8ca5 ";//操作人的账号id
-        String orgName="esigntest-guke";//被授权的企业名称
-        String orgIDCardNum="913301087458302417";//被授权企业证件号
-        String sealId="475f2ebc-dc17-xxxx-8xx5-714ded5cbb0a";
-
+    public static EsignHttpResponse orgSealsExternalAuth(ExternalAuthRequestDTO requestDTO) throws EsignDemoException {
         String apiaddr="/v3/seals/org-seals/external-auth";
-        System.out.println(apiaddr);
-        //请求参数body体,json格式。get或者delete请求时jsonString传空json:"{}"或者null
-
-
-
-        String jsonParm="{\n" +
-                "    \"orgId\": \""+orgId+"\",\n" +
-                "    \"effectiveTime\": 1636525541000,\n" +
-                "    \"expireTime\": 1668061541000,\n" +
-                "    \"transactorPsnId\":\""+transactorPsnId+"\",\n" +
-                "    \"authorizedOrgInfo\":{\n" +
-                "        \"orgName\":\""+orgName+"\",\n" +
-                "        \"orgIDCardNum\":\""+orgIDCardNum+"\"\n" +
-                "    },\n" +
-                "    \"sealId\": \""+sealId+"\",\n" +
-                "    \"redirectUrl\": \"https://www.xx.cn/\"\n" +
-                "}";
+        String jsonParm= gson.toJson(requestDTO);
         //请求方法
         EsignRequestType requestType= EsignRequestType.POST;
         //生成签名鉴权方式的的header

+ 1 - 1
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/esign/sign/SignDemo.java

@@ -626,7 +626,7 @@ public class SignDemo {
                 "    \"organization\": {\n" +
                 "        \"orgName\": \""+departName+"\"\n" +
                 "    },\n" +
-                "    \"urlType\": 1\n" +
+                "    \"urlType\": 2\n" +
                 "}";
         //请求方法
         EsignRequestType requestType = EsignRequestType.POST;

+ 20 - 1
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/service/IESignService.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.app.service;
 
+import org.jeecg.modules.app.dto.SealInfoDTO;
 import org.jeecg.modules.app.esign.exception.EsignDemoException;
 import org.jeecg.modules.system.app.dto.AppContractInfoDTO;
 import org.jeecg.modules.system.app.entity.AppContractInfo;
@@ -24,7 +25,7 @@ public interface IESignService {
      * @Param
      * @return
      **/
-    String getAuthUrl() throws EsignDemoException;
+    String getAuthUrl(String phoneNumber) throws EsignDemoException;
 
 
     /**
@@ -109,4 +110,22 @@ public interface IESignService {
      * @return
      **/
     List<AppContractInfo> queryContractInfo(String contractName);
+
+    /**
+     * @Author SheepHy
+     * @Description 查询企业内部印章
+     * @Date 11:46 2025/7/31
+     * @Param
+     * @return
+     **/
+    List<SealInfoDTO> orgOwnSeal(String orgId);
+    
+    /** 
+     * @Author SheepHy
+     * @Description 跨企业印章授权
+     * @Date 15:29 2025/7/31
+     * @Param
+     * @return 
+     **/
+    Boolean orgSealsExternal(String orgCode, String sealId) throws EsignDemoException;
 }

+ 350 - 262
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/service/impl/ESignServiceImpl.java

@@ -2,50 +2,41 @@ package org.jeecg.modules.app.service.impl;
 
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.google.gson.Gson;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
+import com.google.gson.*;
+import com.google.gson.reflect.TypeToken;
 import lombok.extern.log4j.Log4j2;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.exception.JeecgBootException;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.modules.app.dto.DocTemplateDTO;
+import org.jeecg.modules.app.dto.ExternalAuthRequestDTO;
 import org.jeecg.modules.app.dto.GetPsnAuthUrlDTO;
+import org.jeecg.modules.app.dto.SealInfoDTO;
 import org.jeecg.modules.app.esign.comm.EsignHttpResponse;
 import org.jeecg.modules.app.esign.exception.EsignDemoException;
 import org.jeecg.modules.app.esign.fileAndTemplate.FileDemo;
 import org.jeecg.modules.app.esign.sign.SignDemo;
 import org.jeecg.modules.app.service.IESignService;
 import org.jeecg.modules.system.app.dto.AppContractInfoDTO;
-import org.jeecg.modules.system.app.entity.AppContractInfo;
-import org.jeecg.modules.system.app.entity.AppContractSign;
-import org.jeecg.modules.system.app.entity.AppOrder;
-import org.jeecg.modules.system.app.entity.FamilyMembers;
-import org.jeecg.modules.system.app.mapper.AppContractInfoMapper;
-import org.jeecg.modules.system.app.mapper.AppContractSignMapper;
-import org.jeecg.modules.system.app.mapper.AppOrderMapper;
-import org.jeecg.modules.system.app.mapper.FamilyMembersMapper;
+import org.jeecg.modules.system.app.entity.*;
+import org.jeecg.modules.system.app.mapper.*;
 import org.jeecg.modules.system.entity.SysDepart;
-import org.jeecg.modules.system.entity.SysUser;
 import org.jeecg.modules.system.mapper.SysDepartMapper;
 import org.jeecg.modules.system.mapper.SysUserMapper;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.nio.file.Files;
-import java.nio.file.StandardCopyOption;
 import java.util.*;
+import java.util.stream.Collectors;
 
 import static com.alibaba.dashscope.utils.JsonUtils.gson;
 import static org.jeecg.modules.app.esign.auth.ESignAuth.*;
 import static org.jeecg.modules.app.esign.fileAndTemplate.TemplateDemo.getTemplateCreateUrl;
 import static org.jeecg.modules.app.esign.fileAndTemplate.TemplateDemo.getTemplateEditUrl;
+import static org.jeecg.modules.app.esign.members.MembersDemo.administrators;
+import static org.jeecg.modules.app.esign.seal.SealDemo.orgOwnSealList;
+import static org.jeecg.modules.app.esign.seal.SealDemo.orgSealsExternalAuth;
 import static org.jeecg.modules.app.esign.sign.SignDemo.createByFile;
 
 @Service
@@ -63,6 +54,14 @@ public class ESignServiceImpl implements IESignService {
     private AppContractSignMapper appContractSignMapper;
     @Resource
     private FamilyMembersMapper familyMembersMapper;
+    @Resource
+    private AppSiteMapper appSiteMapper;
+    private static final String NOTIFY_URL = "http://xx.xx.86.172:8081/asyn/notify";
+    private static final String REDIRECT_URL = "http://www.xx.cn/";
+    private static final String[] PERSON_AUTH_MODES = {"PSN_MOBILE3"};
+    private static final String[] WILLINGNESS_MODES = {"CODE_SMS"};
+    private static final String[] ORG_AUTH_MODES = {"ORG_ALIPAY_CREDIT", "ORG_LEGALREP"};
+    private static final int DEFAULT_EXPIRE_TIME = 86400000;
     @Override
     public boolean getUserIdentityInfo(String phoneNumber) throws EsignDemoException {
         EsignHttpResponse getPsnIdentityInfo = getPsnIdentityInfo(phoneNumber);
@@ -76,12 +75,9 @@ public class ESignServiceImpl implements IESignService {
     }
 
     @Override
-    public String getAuthUrl() throws EsignDemoException {
-        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
-        SysUser sysUser = sysUserMapper.selectById(user.getId());
-        if (null == sysUser.getPhone()) throw new JeecgBootException("请先绑定手机号");
+    public String getAuthUrl(String phoneNumber) throws EsignDemoException {
         GetPsnAuthUrlDTO getPsnAuthUrlDTO = new GetPsnAuthUrlDTO();
-        GetPsnAuthUrlDTO.PsnAuthConfig pncAuthConfig = new GetPsnAuthUrlDTO.PsnAuthConfig().setPsnAccount(sysUser.getPhone());
+        GetPsnAuthUrlDTO.PsnAuthConfig pncAuthConfig = new GetPsnAuthUrlDTO.PsnAuthConfig().setPsnAccount(phoneNumber);
         getPsnAuthUrlDTO.setPsnAuthConfig(pncAuthConfig);
         EsignHttpResponse getPsnAuthUrl = getPsnAuthUrl(getPsnAuthUrlDTO);
         JsonObject getPsnAuthUrlObject = gson.fromJson(getPsnAuthUrl.getBody(), JsonObject.class);
@@ -92,6 +88,7 @@ public class ESignServiceImpl implements IESignService {
     @Override
     public boolean getOrgIdentityInfos(String orgCode) throws EsignDemoException {
         SysDepart sysDepart = sysDepartMapper.selectOne(Wrappers.<SysDepart>lambdaQuery().eq(SysDepart::getOrgCode, orgCode));
+        AppSite appSite = appSiteMapper.selectOne(Wrappers.<AppSite>lambdaQuery().eq(AppSite::getOrgCode, orgCode));
         EsignHttpResponse getOrgIdentityInfo = getOrgIdentityInfo(sysDepart.getDepartName());
         JsonObject getOrgIdentityInfoObject = gson.fromJson(getOrgIdentityInfo.getBody(), JsonObject.class);
         JsonElement dataElement = getOrgIdentityInfoObject.get("data");
@@ -103,8 +100,11 @@ public class ESignServiceImpl implements IESignService {
         JsonObject dataObj = dataElement.getAsJsonObject();
         String orgRealnameStatus = dataObj.get("realnameStatus").getAsString();
         String orgId = dataObj.get("orgId").getAsString();
-        sysDepart.setEsignOrgId(orgId);
-        sysDepartMapper.updateById(sysDepart);
+        JsonObject jsonObject = dataObj.get("orgInfo").getAsJsonObject();
+        String orgIDCardNum = jsonObject.get("orgIDCardNum").getAsString();
+        appSite.setEsignOrgId(orgId);
+        appSite.setOrgIdCardNum(orgIDCardNum);
+        appSiteMapper.updateById(appSite);
         return orgRealnameStatus.equals("1");
     }
 
@@ -156,218 +156,270 @@ public class ESignServiceImpl implements IESignService {
     }
 
     @Override
-    @Transactional
-    public List<String> createSign(String orderCode) throws EsignDemoException {
-        List<String> signFlowIds = new ArrayList<>();
-        //todo
-        AppOrder appOrder = orderMapper.selectOne(Wrappers.<AppOrder>lambdaQuery().eq(AppOrder::getOrderCode, orderCode));
-        List<String> familyIds = List.of(appOrder.getFamilyIds().split(","));
-        AppContractInfo appContractInfo = appAccountMapper.selectById(appOrder.getContractNo());
-        SysDepart sysDepart = sysDepartMapper.selectOne(Wrappers.<SysDepart>lambdaQuery().eq(SysDepart::getOrgCode, appOrder.getOrgCode()));
-        familyIds.forEach(familyId -> {
-            String generate32BitUUID = generate32BitUUID();
-            FamilyMembers familyMembers = familyMembersMapper.selectById(familyId);
-            EsignHttpResponse createByFile = null;
-            try {
-//                SignFlowDTO dto = new SignFlowDTO();
-//                dto.setDocs(Arrays.asList(
-//                        new SignFlowDTO.Doc().setFileId(appContractInfo.getFileId()).setFileName(appContractInfo.getContractName())
-//                ));
-//                dto.setSignFlowConfig(new SignFlowDTO.SignFlowConfig()
-//                        .setSignFlowTitle(appContractInfo.getContractName())
-//                        .setSignFlowExpireTime(System.currentTimeMillis() + 86400000L)
-//                        .setAutoFinish(true)
-//                        .setNotifyUrl("http://example.com/notify")
-//                        .setRedirectConfig(new SignFlowDTO.RedirectConfig().setRedirectUrl(appContractInfo.getRedirectUrl())));
-//                List<SignFlowDTO.Signer> signers = new  ArrayList<>();
-//                //个人用户
-//                SignFlowDTO.Signer signer1 = new SignFlowDTO.Signer()
-//                        .setSignerType(0)
-//                        .setPsnSignerInfo(new SignFlowDTO.PsnSignerInfo()
-//                                .setPsnAccount(familyMembers.getPhone())
-//                                .setPsnInfo(new SignFlowDTO.PsnInfo().setPsnName(familyMembers.getFullName())))
-//                        .setSignFields(Collections.singletonList(
-//                                new SignFlowDTO.SignField()
-//                                        .setCustomBizNum(generate32BitUUID)
-//                                        .setFileId(appContractInfo.getFileId())
-//                                        .setNormalSignFieldConfig(new SignFlowDTO.NormalSignFieldConfig()
-//                                                .setAutoSign(false)
-//                                                .setSignFieldStyle(1)
-//                                                .setSignFieldPosition(Collections.singletonList(new SignFlowDTO.SignFieldPosition()
-//                                                        .setPositionPage("1")
-//                                                        .setPositionX(100)
-//                                                        .setPositionY(200))))));
-////                //企业用户
-////                SignFlowDTO.Signer signer2 = new SignFlowDTO.Signer()
-////                        .setSignerType(1)
-////                        .setSignFields(Collections.singletonList(
-////                                new SignFlowDTO.SignField()
-////                                        .setCustomBizNum(generate32BitUUID)
-////                                        .setFileId(appContractInfo.getFileId())
-////                                        .setNormalSignFieldConfig(new SignFlowDTO.NormalSignFieldConfig()
-////                                                .setAutoSign(false)
-////                                                .setSignFieldStyle(1)
-////                                                .setSignFieldPosition(Collections.singletonList(new SignFlowDTO.SignFieldPosition()
-////                                                        .setPositionPage("1")
-////                                                        .setPositionX(100)
-////                                                        .setPositionY(200))))));
-////
-//                signers.add(signer1);
-////                signers.add(signer2);
-//                dto.setSigners(signers);
-                String dto = "{\n" +
-                        "    \"docs\": [\n" +
-                        "        {\n" +
-                        "            \"fileId\": \""+appContractInfo.getFileId()+"\",\n" +
-                        "            \"fileName\": \""+appContractInfo.getContractName()+"."+appContractInfo.getContractType()+"\"\n" +
-                        "        }\n" +
-                        "    ],\n" +
-                        "    \"attachments\": [\n" +
-                        "        {\n" +
-                        "            \"fileId\": \""+appContractInfo.getFileId()+"\",\n" +
-                        "            \"fileName\": \""+appContractInfo.getContractName()+"."+appContractInfo.getContractType()+"\"\n" +
-                        "        }\n" +
-                        "    ],\n" +
-                        "    \"signFlowConfig\": {\n" +
-                        "        \"signFlowTitle\": \""+appContractInfo.getContractName()+"\",\n" +
-                        "        \"signFlowExpireTime\": "+(System.currentTimeMillis() + 86400000L)+",\n" +
-                        "        \"autoStart\": true,\n" +
-                        "        \"autoFinish\": false,\n" +
-                        "        \"identityVerify\": true,\n" +
-                        "        \"signConfig\": {\n" +
-                        "            \"availableSignClientTypes\": \"1\",\n" +
-                        "            \"showBatchDropSealButton\": true\n" +
-                        "        },\n" +
-                        "        \"notifyUrl\": \"http://xx.xx.86.172:8081/asyn/notify\",\n" +
-                        "        \"redirectConfig\": {\n" +
-                        "            \"redirectUrl\": \"http://www.xx.cn/\"\n" +
-                        "        },\n" +
-                        "        \"authConfig\": {\n" +
-                        "            \"psnAvailableAuthModes\": [\n" +
-                        "                \"PSN_FACE\"\n" +
-                        "            ],\n" +
-                        "            \"willingnessAuthModes\": [\n" +
-                        "                \"PSN_FACE_TECENT\",\n" +
-                        "                \"PSN_FACE_ALIPAY\"\n" +
-                        "            ],\n" +
-                        "            \"orgAvailableAuthModes\": [\n" +
-                        "                \"ORG_BANK_TRANSFER\",\n" +
-                        "                \"ORG_LEGALREP\"\n" +
-                        "            ]\n" +
-                        "        }\n" +
-                        "    },\n" +
-                        "    \"signFlowInitiator\": {\n" +
-                        "        \"orgInitiator\": {\n" +
-                        "            \"orgId\": \""+sysDepart.getEsignOrgId()+"\",\n" +
-                        "            \"transactor\": {\n" +
-                        "                \"psnId\": \""+familyMembers.getPsnId()+"\"\n" +
-                        "            }\n" +
-                        "        }\n" +
-                        "    },\n" +
-                        "    \"signers\": [\n" +
-                        "        {\n" +
-                        "            \"signConfig\": {\n" +
-                        "                \"forcedReadingTime\": \"10\",\n" +
-                        "                \"signOrder\": 1\n" +
-                        "            },\n" +
-                        "            \"noticeConfig\": {\n" +
-                        "                \"noticeTypes\": \"1\"\n" +
-                        "            },\n" +
-                        "            \"signerType\": 0,\n" +
-                        "            \"psnSignerInfo\": {\n" +
-                        "                \"psnAccount\": \""+familyMembers.getPhone()+"\",\n" +
-                        "                \"psnInfo\": {\n" +
-                        "                    \"psnName\": \""+familyMembers.getFullName()+"\",\n" +
-                        "                    \"psnIDCardNum\": \""+familyMembers.getIdentityCard()+"\",\n" +
-                        "                    \"psnIDCardType\": \"CRED_PSN_CH_IDCARD\"\n" +
-                        "                }\n" +
-                        "            },"+
-                        "            \"signFields\": [\n" +
-                        "                {\n" +
-                        "                    \"fileId\": \""+appContractInfo.getFileId()+"\",\n" +
-                        "                    \"customBizNum\": \"自定义编码0001\",\n" +
-                        "                    \"signFieldType\": 0,\n" +
-                        "                    \"normalSignFieldConfig\": {\n" +
-                        "                        \"autoSign\": false,\n" +
-                        "                        \"freeMode\": false,\n" +
-                        "                        \"movableSignField\": false,\n" +
-                        "                        \"psnSealStyles\": \"0,1\",\n" +
-                        "                        \"signFieldSize\": \"96\",\n" +
-                        "                        \"signFieldStyle\": 1,\n" +
-                        "                        \"signFieldPosition\": {\n" +
-                        "                            \"positionPage\": \"1\",\n" +
-                        "                            \"positionX\": 100,\n" +
-                        "                            \"positionY\": 200\n" +
-                        "                        }\n" +
-                        "                    },\n" +
-                        "                    \"signDateConfig\": {\n" +
-                        "                        \"dateFormat\": \"yyyy-MM-dd\",\n" +
-                        "                        \"showSignDate\": 1,\n" +
-                        "                        \"signDatePositionX\": 100,\n" +
-                        "                        \"signDatePositionY\": 100\n" +
-                        "                    }\n" +
-                        "                }\n" +
-                        "            ]\n" +
-                        "        },\n" +
-                        "        {\n" +
-                        "            \"signConfig\": {\n" +
-                        "                \"forcedReadingTime\": \"10\",\n" +
-                        "                \"signOrder\": 2\n" +
-                        "            },\n" +
-                        "            \"noticeConfig\": {\n" +
-                        "                \"noticeTypes\": \"1,2\"\n" +
-                        "            },\n" +
-                        "            \"signerType\": 1,\n" +
-                        "            \"signFields\": [\n" +
-                        "                {\n" +
-                        "                    \"customBizNum\": \"自定义编码001\",\n" +
-                        "                    \"fileId\": \""+appContractInfo.getFileId()+"\",\n" +
-                        "                    \"normalSignFieldConfig\": {\n" +
-                        "                        \"autoSign\": true,\n" +
-                        "                        \"freeMode\": false,\n" +
-                        "                        \"movableSignField\": false,\n" +
-                        "                        \"signFieldSize\": \"159\",\n" +
-                        "                        \"signFieldStyle\": 1,\n" +
-                        "                        \"signFieldPosition\": {\n" +
-                        "                            \"positionPage\": \"1\",\n" +
-                        "                            \"positionX\": 300,\n" +
-                        "                            \"positionY\": 200\n" +
-                        "                        }\n" +
-                        "                    },\n" +
-                        "                    \"signDateConfig\": {\n" +
-                        "                        \"dateFormat\": \"yyyy-MM-dd\",\n" +
-                        "                        \"showSignDate\": 1,\n" +
-                        "                        \"signDatePositionX\": 300,\n" +
-                        "                        \"signDatePositionY\": 100\n" +
-                        "                    }\n" +
-                        "                }\n" +
-                        "            ]\n" +
-                        "        }\n" +
-                        "    ]\n" +
-                        "}";
-                createByFile = createByFile(dto);
-            } catch (EsignDemoException e) {
-                throw new RuntimeException(e);
-            }
-            JSONObject createByFileJsonObject = JSONObject.parseObject(createByFile.getBody());
-            String signFlowId = createByFileJsonObject.getJSONObject("data").getString("signFlowId");
-            System.out.println("signFlowId:" + signFlowId);
+    @Transactional(rollbackFor = Exception.class)
+    public List<String> createSign(String orderCode){
+    List<String> signFlowIds = new ArrayList<>();
+    AppOrder appOrder = orderMapper.selectOne(Wrappers.<AppOrder>lambdaQuery()
+            .eq(AppOrder::getOrderCode, orderCode));
+
+    List<String> familyIds = Arrays.asList(appOrder.getFamilyIds().split(","));
+    AppContractInfo contractInfo = appAccountMapper.selectById(appOrder.getContractNo());
+    SysDepart sysDepart = sysDepartMapper.selectOne(Wrappers.<SysDepart>lambdaQuery()
+            .eq(SysDepart::getOrgCode, appOrder.getOrgCode()));
+
+    // 预加载家庭成员信息
+    Map<String, FamilyMembers> familyMemberMap = familyIds.stream()
+            .map(familyMembersMapper::selectById)
+            .collect(Collectors.toMap(FamilyMembers::getId, fm -> fm));
+
+    // 构建签署流程
+    familyIds.forEach(familyId -> {
+        try {
+            FamilyMembers familyMembers = familyMemberMap.get(familyId);
+            JsonObject dto = buildSignFlowDto(contractInfo, sysDepart, familyMembers);
+
+            EsignHttpResponse response = createByFile(dto.toString());
+            String signFlowId = extractSignFlowId(response);
+
+            log.info("生成签署流程ID: {}", signFlowId);
             signFlowIds.add(signFlowId);
-            appContractSignMapper.insert(new AppContractSign().setId(generate32BitUUID)
-                    .setSignFlowId(signFlowId)
-                    .setOrderId(appOrder.getId()).setFamilyId(familyId)
-                    .setOrgCode(appOrder.getOrgCode())
-                    .setCreateTime(new Date())
-                    .setUpdateTime(new Date()));
+            saveSignFlowRecord(signFlowId, appOrder, familyId);
+        } catch (EsignDemoException e) {
+            log.error("签署流程创建失败,订单号: {}", orderCode, e);
+            throw new JeecgBootException(e.getMessage());
+        }
         });
-        return signFlowIds;
+
+    return signFlowIds;
+    }
+    /**
+     * 构建签署流程请求体
+     */
+    private JsonObject buildSignFlowDto(AppContractInfo contractInfo,
+                                        SysDepart sysDepart,
+                                        FamilyMembers familyMembers) {
+        JsonObject dto = new JsonObject();
+        AppSite appSite = appSiteMapper.selectOne(Wrappers.<AppSite>lambdaQuery().eq(AppSite::getOrgCode, sysDepart.getOrgCode()));
+        // 构建文档信息
+        JsonArray docs = new JsonArray();
+        JsonObject doc = new JsonObject();
+        doc.addProperty("fileId", contractInfo.getFileId());
+        doc.addProperty("fileName", contractInfo.getContractName() + "." + contractInfo.getContractType());
+        docs.add(doc);
+        dto.add("docs", docs);
+
+        // 构建附件信息
+        dto.add("attachments", docs);
+
+        // 构建签署流程配置
+        JsonObject signFlowConfig = new JsonObject();
+        signFlowConfig.addProperty("signFlowTitle", contractInfo.getContractName());
+        signFlowConfig.addProperty("signFlowExpireTime", System.currentTimeMillis() + DEFAULT_EXPIRE_TIME);
+        signFlowConfig.addProperty("autoStart", true);
+        signFlowConfig.addProperty("autoFinish", true);
+        signFlowConfig.addProperty("identityVerify", true);
+
+        // 签署配置
+        JsonObject signConfig = new JsonObject();
+        signConfig.addProperty("availableSignClientTypes", "1");
+        signConfig.addProperty("showBatchDropSealButton", true);
+        signFlowConfig.add("signConfig", signConfig);
+
+        // 通知配置
+        signFlowConfig.addProperty("notifyUrl", NOTIFY_URL);
+
+        // 重定向配置
+        JsonObject redirectConfig = new JsonObject();
+        redirectConfig.addProperty("redirectUrl", REDIRECT_URL);
+        signFlowConfig.add("redirectConfig", redirectConfig);
+
+        // 认证配置
+        JsonObject authConfig = new JsonObject();
+        addStringArray(authConfig, "psnAvailableAuthModes", PERSON_AUTH_MODES);
+        addStringArray(authConfig, "willingnessAuthModes", WILLINGNESS_MODES);
+        addStringArray(authConfig, "orgAvailableAuthModes", ORG_AUTH_MODES);
+        signFlowConfig.add("authConfig", authConfig);
+
+        dto.add("signFlowConfig", signFlowConfig);
+
+        // 发起人信息
+        JsonObject signFlowInitiator = new JsonObject();
+        JsonObject orgInitiator = new JsonObject();
+        orgInitiator.addProperty("orgId", appSite.getEsignOrgId());
+
+        JsonObject transactor = new JsonObject();
+        transactor.addProperty("psnId", familyMembers.getPsnId());
+        orgInitiator.add("transactor", transactor);
+
+        signFlowInitiator.add("orgInitiator", orgInitiator);
+        dto.add("signFlowInitiator", signFlowInitiator);
+
+        // 签署人信息
+        dto.add("signers", buildSigners(contractInfo, familyMembers));
+
+        return dto;
+    }
+
+    /**
+     * 构建签署人信息
+     */
+    private JsonArray buildSigners(AppContractInfo contractInfo, FamilyMembers familyMembers) {
+        JsonArray signers = new JsonArray();
+
+        // 个人签署人
+        JsonObject signer1 = new JsonObject();
+        signer1.add("signConfig", buildSignConfig(1, 10));
+        signer1.add("noticeConfig", buildNoticeConfig(""));
+        signer1.addProperty("signerType", 0);
+
+        // 签署人信息
+        JsonObject psnSignerInfo = new JsonObject();
+        psnSignerInfo.addProperty("psnAccount", familyMembers.getPhone());
+
+        JsonObject psnInfo = new JsonObject();
+        psnInfo.addProperty("psnName", familyMembers.getFullName());
+        psnInfo.addProperty("psnIDCardNum", familyMembers.getIdentityCard());
+        psnInfo.addProperty("psnIDCardType", "CRED_PSN_CH_IDCARD");
+        psnSignerInfo.add("psnInfo", psnInfo);
+
+        signer1.add("psnSignerInfo", psnSignerInfo);
+        signer1.add("signFields", buildSignFields(contractInfo.getFileId(), 100, 200, 96, 100, 100,false));
+//        "orgSignerInfo": {
+//            "orgName": "XXXX企业名字",
+//                    "orgInfo": {
+//                "orgIDCardNum": "911*******3",
+//                        "orgIDCardType": "CRED_ORG_USCC"
+//            },
+//            "transactorInfo": {
+//                "psnAccount": "139****10",
+//                        "psnInfo": {
+//                    "psnName": "李四",
+//                            "psnIDCardNum": "3311********9",
+//                            "psnIDCardType": "CRED_PSN_CH_IDCARD"
+//                }
+//            }
+//        },
+
+        // 企业签署人
+//        JsonObject signer2 = new JsonObject();
+//
+//        JsonObject corporate = new JsonObject();
+//        // 签署人信息
+//        psnSignerInfo.addProperty("psnAccount", familyMembers.getPhone());
+//
+//        corporate.addProperty("psnName", familyMembers.getFullName());
+//        corporate.addProperty("psnIDCardNum", familyMembers.getIdentityCard());
+//        corporate.addProperty("psnIDCardType", "CRED_PSN_CH_IDCARD");
+//        psnSignerInfo.add("psnInfo", psnInfo);
+//
+//        signer1.add("orgSignerInfo", psnSignerInfo);
+//        signer2.add("signConfig", buildSignConfig(2, 10));
+//        signer2.add("noticeConfig", buildNoticeConfig(""));
+//        signer2.addProperty("signerType", 1);
+//        signer2.add("signFields", buildSignFields(contractInfo.getFileId(), 300, 200, 159, 300, 100,true));
+
+        signers.add(signer1);
+        return signers;
+    }
+
+    /**
+     * 构建签署配置
+     */
+    private JsonObject buildSignConfig(int signOrder, int readingTime) {
+        JsonObject signConfig = new JsonObject();
+        signConfig.addProperty("forcedReadingTime", String.valueOf(readingTime));
+        signConfig.addProperty("signOrder", signOrder);
+        return signConfig;
+    }
+
+    /**
+     * 构建通知配置
+     */
+    private JsonObject buildNoticeConfig(String noticeTypes) {
+        JsonObject noticeConfig = new JsonObject();
+        noticeConfig.addProperty("noticeTypes", noticeTypes);
+        return noticeConfig;
+    }
+
+    /**
+     * 构建签署区域
+     */
+    private JsonArray buildSignFields(String fileId,
+                                      int x, int y,
+                                      int size,
+                                      int dateX, int dateY,boolean autoSign) {
+        JsonArray signFields = new JsonArray();
+        JsonObject field = new JsonObject();
+
+        field.addProperty("fileId", fileId);
+        field.addProperty("customBizNum", "自定义编码0001");
+        field.addProperty("signFieldType", 0);
+
+        // 签署配置
+        JsonObject normalConfig = new JsonObject();
+        normalConfig.addProperty("autoSign", autoSign);
+        normalConfig.addProperty("freeMode", false);
+        normalConfig.addProperty("movableSignField", false);
+        normalConfig.addProperty("psnSealStyles", "0,1");
+        normalConfig.addProperty("signFieldSize", String.valueOf(size));
+        normalConfig.addProperty("signFieldStyle", 1);
+
+        // 位置配置
+        JsonObject position = new JsonObject();
+        position.addProperty("positionPage", "1");
+        position.addProperty("positionX", x);
+        position.addProperty("positionY", y);
+        normalConfig.add("signFieldPosition", position);
+
+        // 日期配置
+        JsonObject dateConfig = new JsonObject();
+        dateConfig.addProperty("dateFormat", "yyyy-MM-dd");
+        dateConfig.addProperty("showSignDate", 1);
+        dateConfig.addProperty("signDatePositionX", dateX);
+        dateConfig.addProperty("signDatePositionY", dateY);
+
+        field.add("normalSignFieldConfig", normalConfig);
+        field.add("signDateConfig", dateConfig);
+
+        signFields.add(field);
+        return signFields;
+    }
+
+    /**
+     * 提取签署流程ID
+     */
+    private String extractSignFlowId(EsignHttpResponse response) {
+        JSONObject result = JSONObject.parseObject(response.getBody());
+        return result.getJSONObject("data").getString("signFlowId");
+    }
+
+    /**
+     * 保存签署流程记录
+     */
+    private void saveSignFlowRecord(String signFlowId, AppOrder appOrder, String familyId) {
+        String id = UUID.randomUUID().toString().replace("-", "");
+        AppContractSign record = new AppContractSign()
+                .setId(id)
+                .setSignFlowId(signFlowId)
+                .setOrderId(appOrder.getId())
+                .setFamilyId(familyId)
+                .setOrgCode(appOrder.getOrgCode())
+                .setCreateTime(new Date())
+                .setUpdateTime(new Date());
+        appContractSignMapper.insert(record);
     }
-    public static String generate32BitUUID() {
-        // 生成标准 UUID(128 位)
-        UUID uuid = UUID.randomUUID();
-        // 去除连字符,得到 32 位字符串
-        return uuid.toString().replace("-", "");
+
+    /**
+     * 添加字符串数组到JSON对象
+     */
+    private void addStringArray(JsonObject parent, String key, String[] values) {
+        JsonArray array = new JsonArray();
+        for (String value : values) {
+            array.add(value);
+        }
+        parent.add(key, array);
     }
+
     @Override
     public String getSignUrl(String signFlowId) throws EsignDemoException {
         AppContractSign appContractSign = appContractSignMapper.selectOne(Wrappers.<AppContractSign>lambdaQuery().eq(AppContractSign::getSignFlowId, signFlowId));
@@ -437,43 +489,79 @@ public class ESignServiceImpl implements IESignService {
         }
     }
 
-    /**
-     * 获取文件扩展名
-     */
-    private String getFileExtension(String filename) {
-        if (filename == null || !filename.contains(".")) {
-            return "";
+    @Override
+    public List<SealInfoDTO> orgOwnSeal(String orgId) {
+        try {
+            // 调用API获取响应
+            EsignHttpResponse response = orgOwnSealList(orgId);
+
+            // 解析JSON响应
+            JsonObject result = gson.fromJson(response.getBody(), JsonObject.class);
+
+            // 验证数据结构
+            if (!result.has("data")) {
+                throw new JeecgBootException("响应数据中缺少'data'字段");
+            }
+
+            JsonObject data = result.getAsJsonObject("data");
+
+            if (!data.has("seals")) {
+                throw new JeecgBootException("响应数据中缺少'seals'字段");
+            }
+
+            // 转换数据
+            return gson.fromJson(data.getAsJsonArray("seals"),
+                    new TypeToken<List<SealInfoDTO>>(){}.getType());
+
+        } catch (JsonSyntaxException e) {
+            throw new JeecgBootException("JSON解析失败: " + e.getMessage(), e);
+        } catch (Exception e) {
+            throw new JeecgBootException("获取印章列表失败: " + e.getMessage(), e);
         }
-        return filename.substring(filename.lastIndexOf(".") + 1).toLowerCase();
     }
 
-    /**
-     * 下载远程文件
-     */
-    private File downloadRemoteFile(String fileUrl) throws IOException {
-        URL url = new URL(fileUrl);
-        File tempFile = File.createTempFile("esign-", ".tmp");
-        tempFile.deleteOnExit();
-
-        try (InputStream in = url.openStream()) {
-            Files.copy(in, tempFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
+    @Override
+    public Boolean orgSealsExternal(String orgCode, String sealId) throws EsignDemoException {
+        AppSite appSite = appSiteMapper.selectOne(Wrappers.<AppSite>lambdaQuery().eq(AppSite::getOrgCode, orgCode));
+        EsignHttpResponse administrators = administrators(appSite.getEsignOrgId());
+        JsonObject administratorsObject = gson.fromJson(administrators.getBody(), JsonObject.class);
+        JsonObject data = administratorsObject.getAsJsonObject("data");
+        String psnId = null;
+        if (data != null) {
+            JsonArray admins = data.getAsJsonArray("administrators");
+            if (admins != null && !admins.isEmpty()) {
+                JsonObject firstAdmin = admins.get(0).getAsJsonObject();
+                if (firstAdmin.has("psnId")) {
+                    psnId = firstAdmin.get("psnId").getAsString();
+                }
+            }
         }
+        ExternalAuthRequestDTO requestDTO = new ExternalAuthRequestDTO();
+        requestDTO.setOrgId(appSite.getEsignOrgId());
+        requestDTO.setTransactorPsnId(psnId);
+        requestDTO.setLongTermEffective(true);
+        requestDTO.setSealIds(Collections.singletonList(sealId));
+
+        ExternalAuthRequestDTO.AuthorizedOrgInfoDTO orgInfo = new ExternalAuthRequestDTO.AuthorizedOrgInfoDTO();
+        orgInfo.setOrgName("中数未来(海南)系统集成有限公司");
+        orgInfo.setOrgIdCardNum("91460105MAA9A6L75X");
+        requestDTO.setAuthorizedOrgInfo(orgInfo);
+
+        EsignHttpResponse orgSealsExternalAuth = orgSealsExternalAuth(requestDTO);
+        JsonObject orgSealsExternalAuthObject = gson.fromJson(orgSealsExternalAuth.getBody(), JsonObject.class);
+        System.out.println("请求返回:"+orgSealsExternalAuthObject);
 
-        return tempFile;
+        return null;
     }
 
     /**
-     * 获取MIME类型映射
+     * 获取文件扩展名
      */
-    private String getMimeType(String ext) {
-        Map<String, String> mimeMap = new HashMap<>();
-        mimeMap.put("pdf", "application/pdf");
-        mimeMap.put("doc", "application/msword");
-        mimeMap.put("docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document");
-        mimeMap.put("xls", "application/vnd.ms-excel");
-        mimeMap.put("xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
-
-        return mimeMap.getOrDefault(ext, "application/octet-stream");
+    private String getFileExtension(String filename) {
+        if (filename == null || !filename.contains(".")) {
+            return "";
+        }
+        return filename.substring(filename.lastIndexOf(".") + 1).toLowerCase();
     }
 }
 

+ 2 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/entity/AppSite.java

@@ -163,4 +163,6 @@ public class AppSite implements Serializable {
     @Excel(name = "教学日", width = 15)
     @Schema(description = "教学日")
     private String teachingDay;
+    private String esignOrgId;
+    private String orgIdCardNum;
 }

+ 0 - 1
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/entity/SysDepart.java

@@ -35,7 +35,6 @@ public class SysDepart implements Serializable {
 	/**机构/部门名称*/
 	@Excel(name="机构/部门名称",width=15)
 	private String departName;
-	private String esignOrgId;
 	/**英文名*/
 	@Excel(name="英文名",width=15)
 	private String departNameEn;