Procházet zdrojové kódy

签章部分代码提交

user5 před 2 roky
rodič
revize
bc52fb4e27
24 změnil soubory, kde provedl 2629 přidání a 6 odebrání
  1. 395 2
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectRecords/service/CwProjectRecordsService.java
  2. 71 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReport/controller/CwProjectReportSignatureCallBackController.java
  3. 10 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReport/domain/CwProjectReportData.java
  4. 6 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReport/mapper/CwProjectReportMapper.java
  5. 8 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReport/mapper/ProjectReportWorkAttachmentMapper.java
  6. 6 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReport/mapper/xml/CwProjectReportMapper.xml
  7. 10 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReport/mapper/xml/ProjectReportWorkAttachmentMapper.xml
  8. 387 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReport/service/CwProjectReportService.java
  9. 38 4
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/oss/service/OSSClientService.java
  10. 82 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/signature/domain/Action.java
  11. 27 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/signature/domain/ActionOperatorInfo.java
  12. 164 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/signature/domain/Location.java
  13. 126 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/signature/domain/PresignCallBack.java
  14. 95 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/signature/domain/SealUserInfo.java
  15. 38 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/signature/domain/SignByCompanyInfo.java
  16. 47 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/signature/domain/SignatorieInfo.java
  17. 74 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/signature/domain/SignatureContract.java
  18. 81 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/signature/domain/Stamper.java
  19. 813 0
      jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/signature/utils/SignaturePostUtil.java
  20. 8 0
      jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/mapper/UserMapper.java
  21. 24 0
      jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/mapper/xml/UserMapper.xml
  22. 10 0
      jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/service/UserService.java
  23. 54 0
      jeeplus-web/src/main/resources/application-development.yml
  24. 55 0
      jeeplus-web/src/main/resources/application-production.yml

+ 395 - 2
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectRecords/service/CwProjectRecordsService.java

@@ -3,15 +3,19 @@ package com.jeeplus.test.cw.projectRecords.service;
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.util.ArrayUtil;
 import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.google.common.collect.Lists;
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
 import com.jeeplus.core.query.QueryWrapperGenerator;
 import com.jeeplus.sys.domain.User;
 import com.jeeplus.sys.mapper.UserMapper;
 import com.jeeplus.sys.service.dto.UserDTO;
+import com.jeeplus.sys.utils.Global;
 import com.jeeplus.sys.utils.StringUtils;
 import com.jeeplus.sys.utils.UserUtils;
 import com.jeeplus.test.cw.projectRecords.domain.CwProjectRecords;
@@ -21,14 +25,22 @@ import com.jeeplus.test.cw.projectRecords.service.dto.CwProjectRecordsDTO;
 import com.jeeplus.test.cw.projectRecords.service.mapstruct.CwProjectRecordsWrapper;
 import com.jeeplus.test.cw.workClientInfo.service.dto.CwWorkClientBaseDTO;
 import com.jeeplus.test.mould.service.SerialnumTplService;
+import com.jeeplus.test.oss.domain.WorkAttachment;
+import com.jeeplus.test.oss.service.OSSClientService;
 import com.jeeplus.test.oss.service.OssService;
+import com.jeeplus.test.signature.domain.*;
+import com.jeeplus.test.signature.utils.SignaturePostUtil;
+import org.springframework.data.redis.connection.jedis.JedisUtils;
 import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
 
 import javax.annotation.Resource;
-import java.util.ArrayList;
-import java.util.List;
+import java.io.File;
+import java.lang.reflect.Type;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**
@@ -169,4 +181,385 @@ public class CwProjectRecordsService extends ServiceImpl<CwProjectRecordsMapper,
         cwProjectRecordsMapper.update(cwProjectRecords, new QueryWrapper<CwProjectRecords>().lambda().eq(CwProjectRecords::getId, cwProjectRecords.getId()));
         return "操作成功";
     }
+
+
+
+
+
+
+
+
+
+
+
+    /*public String createSignatureContractId(){
+    //public Map<String,Object> createSignatureContractId(){
+        List<WorkAttachment> fileList = Lists.newArrayList();
+        if(fileList.size()>0){
+
+            //下载审定单文件
+            String path = null;
+            if(System.getProperty("os.name").toLowerCase().contains("win")){
+                path = "D:/attachment-file/";
+            }else{
+                path = "/attachment-file/";
+            }
+            String aliyunUrl = Global.getAliyunUrl();
+            String aliDownloadUrl = Global.getAliDownloadUrl();
+
+            //获取文件生成的documentId
+            List<String> documentList = Lists.newArrayList();
+
+            for (WorkAttachment workattachment : fileList) {
+                String deleteFile = null;
+                try{
+                if(StringUtils.isBlank(workattachment.getUrl())){
+                    return "审定单文件存储路径为空,无法进行签章操作,请驳回后重新上传审定单";
+                }
+
+                String file = workattachment.getUrl();
+                file = file.replace("amp;","");
+                String fileName = file.substring(file.lastIndexOf("/") + 1, file.length());
+                String cons = "";
+                if (file.contains(aliyunUrl)){
+                    cons = aliyunUrl;
+                }else if (file.contains("http://gangwan-app.oss-cn-hangzhou.aliyuncs.com")){
+                    cons = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com";
+                }else {
+                    cons = aliDownloadUrl;
+                }
+                String ossKey = file.split(cons+"/")[1];
+                new OSSClientService().downByStreamSaveLocal(ossKey,fileName,path+fileName);
+                //将下载下来的文件转换为file文件
+                File srcFile = new File(path+fileName);
+                deleteFile = path+fileName;
+
+                //截取文件名称
+                String srcFileName = srcFile.getName().substring(0,srcFile.getName().lastIndexOf("."));
+                //截取文件后缀名
+                String substring = srcFile.getName().substring(srcFile.getName().lastIndexOf(".")+1, srcFile.getName().length());
+                if(!"doc".equals(substring.toLowerCase()) && !"docx".equals(substring.toLowerCase()) && !"pdf".equals(substring.toLowerCase())){
+                    return "请上传doc、docx或者pdf的文件进行签章操作";
+                }
+                //获取真签单的documentId
+                HashMap hashMap = SignaturePostUtil.getDocument(srcFile);
+                String code = hashMap.get("code").toString();
+                String documentId = "";
+                if("0".equals(code)){
+                    String result = hashMap.get("result").toString();
+                    HashMap documentIdMap = JSON.parseObject(result, HashMap.class);
+                    documentId =  documentIdMap.get("documentId").toString();
+                    if("".equals(documentId)){
+                        return "签章文件创建失败";
+                    }
+                }else{
+                    String message = hashMap.get("message").toString();
+                    return message;
+                }
+
+                documentList.add(documentId);
+
+                }catch (Exception e){
+
+                }finally {
+                    if(StringUtils.isNotBlank(deleteFile)){
+                        //根据路径创建文件对象
+                        File file = new File(deleteFile);
+                        //路径是个文件且不为空时删除文件
+                        if(file.isFile()&&file.exists()){
+                            file.delete();
+                        }
+                    }
+                }
+
+            }
+
+
+            //将documentId存入数据库中
+            projectReportData.setSignatureInvalidDocumentId(String.join(",", documentList));
+            //根据项目id 和 documentId生成合同id
+            HashMap contractIdHashMap = ruralProjectMessageService.getSignatureContractIdByPageSign(ruralProjectRecords.getId(), documentList);
+            String contractIdCode = contractIdHashMap.get("code").toString();
+            String contractId = "";
+            if("0".equals(contractIdCode)){
+                contractId = contractIdHashMap.get("contractId").toString();
+                if("".equals(contractId)){
+                    return "签章文件创建失败";
+                }
+                contractUrl = ruralProjectMessageService.getSignatureContractUrl(contractId);
+                System.out.println(contractUrl);
+            }else{
+                return contractIdHashMap.get("message").toString();
+            }
+            //将documentId 和contractId存储到质量复核对应的数据种
+            //签章完成则进行数据的保存
+            projectReportData.setSignatureFlag(1);
+            projectReportData.setSignatureDocumentId(documentId);
+            projectReportData.setSignatureContractId(contractId);
+            projectReportData.setSignatureFileName(srcFileName);
+            projectReportData.setSignatureUploadFileUser(UserUtils.getUser());
+            projectReportData.setSignatureUploadDate(new Date());
+            //修改签章对应信息文件
+            projectReportDataService.updateSignatureInfo(projectReportData);
+
+            //将数据信息以contractId作为key 并且有效期为1天 存储在redis中
+            Gson gson = new Gson();
+            String toJson = gson.toJson(projectApprovalSignature);
+
+            if(StringUtils.isNotBlank(toJson)){
+                Jedis jedis = JedisUtils.getResource();
+                String contractIdRedis = jedis.get("qiyuesuo" + contractId);
+                if (StringUtils.isBlank(contractIdRedis)) {
+                    //将该盖章url存放到redis 并设置1天的过期时间
+                    jedis.set("qiyuesuo" + contractId, toJson);
+                    jedis.expire("qiyuesuo" + contractId,86400);
+                }
+            }
+
+            String auditUserListJson = gson.toJson(auditUsers);
+
+            if(StringUtils.isNotBlank(auditUserListJson)){
+                Jedis jedis = JedisUtils.getResource();
+                String contractIdRedis = jedis.get("qiyuesuoAuditUserList" + contractId);
+                if (StringUtils.isBlank(contractIdRedis)) {
+                    //将该盖章url存放到redis 并设置1天的过期时间
+                    jedis.set("qiyuesuoAuditUserList" + contractId, auditUserListJson);
+                    jedis.expire("qiyuesuoAuditUserList" + contractId,86400);
+                }
+            }
+
+        }else{
+            return "审定单文件未找到,无法进行签章操作";
+        }
+        return null;
+    }
+
+
+
+
+
+    private static final String HTTPTOP = Global.getConfig("signature_http_top");
+    private static final String COMPANYROUNDSEALID = Global.getConfig("company_round_seal_id");
+    private static final String COMPANYROUNDSEALIDVERTICAL = Global.getConfig("company_round_seal_id_vertical");
+    private static final String COMPANYPARTIESSEALID = Global.getConfig("company_parties_seal_id");
+    private static final String APPROVALCATEGORYID = Global.getConfig("approval_category_id");
+    private static final String APPROVALYCCATEGORYID = Global.getConfig("approval_YC_category_id");
+    private static final String REPORTCATEGORYID = Global.getConfig("report_category_id");
+    private static final String REPORTYCCATEGORYID = Global.getConfig("report_YC_category_id");
+    private static final String JUDGEMENTCATEGORYID = Global.getConfig("judgement_category_id");
+
+
+    *//**
+     * 根据项目id 和 documentId生成合同id(页面签署生成)
+     * 个人签字章功能
+     * @param projectId
+     * @param documentList
+     * @return
+     *//*
+    public HashMap getSignatureContractIdByPageSign(String projectId, List<String> documentList){
+        HashMap hashMap = new HashMap();
+        Set<String> serialIdSet = new HashSet<>();
+        //根据项目id查询项目信息
+        RuralProjectRecords ruralProjectRecords = ruralProjectRecordsService.get(projectId);
+        //创建签署方信息
+        List<Action> actions = Lists.newArrayList();
+        Action companyAction = new Action();
+        companyAction.setType("CORPORATE");
+        companyAction.setName("公司印章");
+        companyAction.setSerialNo("3");
+        //公司圆章-竖
+        //serialIdSet.add(COMPANYROUNDSEALIDVERTICAL);
+        //添加盖章位置
+        List<Location> locations = Lists.newArrayList();
+        *//*for (String documentId: documentList) {
+            Location location = new Location();
+            location.setSealId(COMPANYROUNDSEALIDVERTICAL);
+            location.setDocumentId(documentId);
+            location.setPage("0");
+            location.setRectType("SEAL_CORPORATE");
+            location.setKeywordIndex(-1);
+            location.setOffsetX("0.5264");
+            location.setOffsetY("0.6787");
+            locations.add(location);
+        }*//*
+
+        //根据角色信息录入签署方信息
+        //负责人
+        if(StringUtils.isNotBlank(principalUserId)){
+            User user = UserUtils.get(principalUserId);
+            if(null != user){
+                //获取成员印章id信息
+                String userSealId = SignaturePostUtil.getUserSealByMobile(user.getMobile(),"","江苏兴光项目管理有限公司公章");
+
+
+
+                if(StringUtils.isNotBlank(userSealId)){
+                    for (String documentId: documentList) {
+                        //添加盖章位置
+                        Location principalLocation = new Location();
+                        serialIdSet.add(userSealId);
+                        principalLocation.setSealId(userSealId);
+                        principalLocation.setDocumentId(documentId);
+                        principalLocation.setPage("0");
+                        principalLocation.setRectType("SEAL_CORPORATE");
+                        principalLocation.setKeywordIndex(-1);
+                        principalLocation.setOffsetX("0.5971");
+                        principalLocation.setOffsetY("0.8176");
+                        locations.add(principalLocation);
+                    }
+                }else{
+                    hashMap.put("code","2");
+                    hashMap.put("message","查询不到江苏兴光项目管理有限公司公章信息!请联系管理员");
+                    return hashMap;
+                }
+            }
+        }else{
+            hashMap.put("code","2");
+            hashMap.put("message","查询不到江苏兴光项目管理有限公司公章信息!请联系管理员");
+            return hashMap;
+        }
+
+        List<String> serialIdList = new ArrayList<String>(serialIdSet);
+        companyAction.setSealIds("[" + String.join(",", serialIdList) + "]");
+        //判定该action是否采用自动签署
+        companyAction.setAutoSign("false");
+        companyAction.setLocations(locations);
+        actions.add(companyAction);
+
+        //创建个人职业章参数
+        Action professionalChapterAction = new Action();
+        professionalChapterAction.setType("PRACTICE");
+        professionalChapterAction.setName("杨荣华个人职业章");
+        professionalChapterAction.setSerialNo("1");
+
+        //添加盖章位置
+        List<Location> professionalChapterLocations = Lists.newArrayList();
+
+        Set<String> professionalChapterSerialIdSet = new HashSet<>();
+
+        //添加个人职业章人员信息
+        ActionOperatorInfo actionOperatorInfo = new ActionOperatorInfo();
+        actionOperatorInfo.setOperatorContact("15240492484");//个人职业章盖章人的手机号
+        List<ActionOperatorInfo> actionOperators = Lists.newArrayList();
+        actionOperators.add(actionOperatorInfo);
+        professionalChapterAction.setActionOperators(actionOperators);
+
+        //获取成员印章id信息
+        long s1=System.currentTimeMillis();
+        String userSealId = SignaturePostUtil.getUserSealByMobile("15240492484","","杨荣华个人签名");
+        long s2=System.currentTimeMillis();
+        System.out.println("第三个人员印章获取时间:" + (s2 - s1));
+        if(StringUtils.isNotBlank(userSealId)){
+        }else{
+            hashMap.put("code","2");
+            hashMap.put("message","查询不到项目负责人 的印章信息!请联系管理员");
+            return hashMap;
+        }
+
+        List<String> serialIdsList = new ArrayList<String>(professionalChapterSerialIdSet);
+        professionalChapterAction.setSealIds("[" + String.join(",", serialIdsList) + "]");
+        professionalChapterAction.setLocations(professionalChapterLocations);
+        net.sf.json.JSONObject professionalChapterJson = net.sf.json.JSONObject.fromObject(professionalChapterAction);
+        System.out.println(professionalChapterJson.toString());
+        actions.add(professionalChapterAction);
+
+
+
+
+        //创建个人职业章参数
+        Action professionalChapterTwoAction = new Action();
+        professionalChapterTwoAction.setType("PRACTICE");
+        professionalChapterTwoAction.setName("刘建春个人职业章");
+        professionalChapterTwoAction.setSerialNo("2");
+
+        //添加盖章位置
+        List<Location> professionalChapterTwoLocations = Lists.newArrayList();
+
+        Set<String> professionalChapterTwoSerialIdSet = new HashSet<>();
+
+        //添加个人职业章人员信息
+        ActionOperatorInfo actionTwoOperatorInfo = new ActionOperatorInfo();
+        actionTwoOperatorInfo.setOperatorContact("13398782899");
+        List<ActionOperatorInfo> actionTwoOperators = Lists.newArrayList();
+        actionTwoOperators.add(actionTwoOperatorInfo);
+        professionalChapterTwoAction.setActionOperators(actionTwoOperators);
+
+        //获取成员印章id信息
+        long s3=System.currentTimeMillis();
+        String userSealId2 = SignaturePostUtil.getUserSealByMobile("13398782899","","杨荣华个人签名章");
+        long s4=System.currentTimeMillis();
+        System.out.println("第四个人员印章获取时间:" + (s4 - s3));
+
+        serialIdsList = new ArrayList<String>(professionalChapterTwoSerialIdSet);
+        professionalChapterTwoAction.setSealIds("[" + String.join(",", serialIdsList) + "]");
+        professionalChapterTwoAction.setLocations(professionalChapterTwoLocations);
+        professionalChapterJson = net.sf.json.JSONObject.fromObject(professionalChapterTwoAction);
+        System.out.println(professionalChapterJson.toString());
+        actions.add(professionalChapterTwoAction);
+
+
+
+        //创建签署方信息表
+        List<SignatorieInfo> signatories = Lists.newArrayList();
+        SignatorieInfo signatorieInfo1 = new SignatorieInfo();
+        signatorieInfo1.setSerialNo("1");
+        signatorieInfo1.setTenantName("江苏兴光项目管理有限公司");
+        signatorieInfo1.setTenantType("COMPANY");
+        signatorieInfo1.setActions(actions);
+        signatories.add(signatorieInfo1);
+        SignatureContract signatureContract = new SignatureContract();
+        signatureContract.setDocuments(documentList);
+        //审定单用印流程id
+        signatureContract.setCategoryId(APPROVALCATEGORYID);
+        signatureContract.setSend(true);
+        signatureContract.setSignatories(signatories);
+        signatureContract.setSn("");
+        signatureContract.setSubject(ruralProjectRecords.getProjectName());//添加项目名称
+        net.sf.json.JSONObject json = net.sf.json.JSONObject.fromObject(signatureContract);
+        System.out.println(json.toString());
+        long s5=System.currentTimeMillis();
+        System.out.println(json.toString());
+        String contractIdMapStr = SignaturePostUtil.sendPostApplicationJson(HTTPTOP + "/contract/createbycategory", json.toString());
+        long s6=System.currentTimeMillis();
+        System.out.println("获取合同id获取时间:" + (s6 - s5));
+        hashMap = JSON.parseObject(contractIdMapStr, HashMap.class);
+
+
+        return hashMap;
+    }*/
+
+
+    /**
+     * 审定单签章回调操作(个人职业章盖章)
+     * @param presignCallBack  回调参数
+     * @return
+     */
+    /*@RequestMapping(value = "/getApprovalCallBackCoordinates", method= RequestMethod.POST)
+    public String getApprovalCallBackCoordinates(PresignCallBack presignCallBack) throws Exception {
+
+        Jedis jedis = JedisUtils.getResource();
+        String contractIdRedis = jedis.get("qiyuesuo" + presignCallBack.getContractId());
+        String auditUsersStr = jedis.get("qiyuesuoAuditUserList" + presignCallBack.getContractId());
+        Gson gson = new Gson();
+        ProjectApprovalSignature projectApprovalSignature1 = gson.fromJson(contractIdRedis, ProjectApprovalSignature.class);
+
+        Type listType = new TypeToken<ArrayList<User>>(){}.getType();
+        List<User> auditUserList = new Gson().fromJson(auditUsersStr, listType);
+
+        //根据contractId查询对应的报告信息
+        ProjectReportData projectReportData = projectReportDataService.getReportDataByProjectId(projectApprovalSignature1.getProjectId());
+
+        if(null == projectReportData){
+            return null;
+        }
+        //根据项目id查询对应的审定单数据状态是否是已经被送审或者 是否存在值
+        ProjectApprovalSignature projectApprovalSignature = ruralProjectMessageElectronicSealService.getProjectApprovalSignature(projectReportData.getProject().getId());
+        projectApprovalSignature1.setCreateBy(projectApprovalSignature.getCreateBy());
+
+        //对流程数据进行处理
+        approvalSaveAudit(projectApprovalSignature1,auditUserList);
+
+        return null;
+    }*/
+
 }

+ 71 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReport/controller/CwProjectReportSignatureCallBackController.java

@@ -0,0 +1,71 @@
+package com.jeeplus.test.cw.projectReport.controller;
+
+import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
+import com.jeeplus.sys.utils.Global;
+import com.jeeplus.sys.utils.SpringContextHolder;
+import com.jeeplus.test.cw.projectReport.domain.CwProjectReportData;
+import com.jeeplus.test.cw.projectReport.service.CwProjectReportService;
+import com.jeeplus.test.signature.domain.PresignCallBack;
+import org.springframework.data.redis.connection.jedis.JedisUtils;
+import org.springframework.security.core.userdetails.User;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+
+import java.lang.reflect.Type;
+import java.util.*;
+
+/**
+ * 项目签章回调接口Controller
+ * @author 徐滕
+ * @version 2021-11-04
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/ruralProject/signatureCallBack")
+public class CwProjectReportSignatureCallBackController {
+
+
+    private CwProjectReportService cwProjectReportService = SpringContextHolder.getBean(CwProjectReportService.class);
+
+
+    private static final String HTTPTOP = Global.getConfig("signature_http_top");
+
+    private final static String apptoken = Global.getConfig("apptoken");
+    private final static String appsecret = Global.getConfig("appsecret");
+    private final static String signature = Global.getConfig("signature");
+
+
+    /**
+     * 审定单签章回调操作(个人职业章盖章)
+     * @param presignCallBack  回调参数
+     * @return
+     */
+    @RequestMapping(value = "/getApprovalCallBackCoordinates", method= RequestMethod.POST)
+    public String getApprovalCallBackCoordinates(PresignCallBack presignCallBack) throws Exception {
+
+        /*Jedis jedis = JedisUtils.getResource();
+        String contractIdRedis = jedis.get("qiyuesuo" + presignCallBack.getContractId());
+        String auditUsersStr = jedis.get("qiyuesuoAuditUserList" + presignCallBack.getContractId());
+        Gson gson = new Gson();
+        ProjectApprovalSignature projectApprovalSignature1 = gson.fromJson(contractIdRedis, ProjectApprovalSignature.class);
+
+        Type listType = new TypeToken<ArrayList<User>>(){}.getType();
+        List<User> auditUserList = new Gson().fromJson(auditUsersStr, listType);
+
+        //根据contractId查询对应的报告信息
+        CwProjectReportData projectReportData = cwProjectReportService.queryById(projectApprovalSignature1.getId());
+
+        if(null == projectReportData){
+            return null;
+        }
+        //根据项目id查询对应的审定单数据状态是否是已经被送审
+        ProjectApprovalSignature projectApprovalSignature = cwProjectReportService.getProjectApprovalSignature(projectReportData.getId());*/
+
+        //对数据进以及流程行处理
+        //approvalSaveAudit(projectApprovalSignature1,auditUserList);
+
+        return null;
+    }
+
+
+}

+ 10 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReport/domain/CwProjectReportData.java

@@ -93,4 +93,14 @@ public class CwProjectReportData extends BaseDTO {
 
     @TableField(exist = false)
     private String[] contractDates;
+
+    /**
+     * 签章documentId
+     */
+    private String signatureDocumentId;
+
+    /**
+     * 签章contractId
+     */
+    private String signatureContractId;
 }

+ 6 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReport/mapper/CwProjectReportMapper.java

@@ -41,4 +41,10 @@ public interface CwProjectReportMapper extends BaseMapper<CwProjectReport> {
     public IPage<CwWorkClientBaseDTO> findClineList(Page<CwWorkClientBaseDTO> page, @Param(Constants.WRAPPER) QueryWrapper<CwWorkClientBase> queryWrapper);
 
     String getUserNameById(String id);
+
+    /**
+     * 更改报告号签章id信息
+     * @param cwProjectReportData
+     */
+    void updateSignatureInfo(CwProjectReportData cwProjectReportData);
 }

+ 8 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReport/mapper/ProjectReportWorkAttachmentMapper.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.jeeplus.test.cw.projectReport.domain.CwProjectReport;
 import com.jeeplus.test.cw.projectReport.domain.CwProjectReportFile;
 import com.jeeplus.test.cw.projectReport.service.dto.ProjectReportWorkAttachmentDTO;
+import com.jeeplus.test.oss.domain.WorkAttachment;
 import org.apache.ibatis.annotations.Mapper;
 
 import java.util.List;
@@ -25,4 +26,11 @@ public interface ProjectReportWorkAttachmentMapper extends BaseMapper<CwProjectR
     List<ProjectReportWorkAttachmentDTO> selectByInfoId(String id);
 
     CwProjectReportFile selectInfoByFileId(String id);
+
+    /**
+     * 查询电子章文件信息
+     * @param id
+     * @return
+     */
+    List<WorkAttachment> selectWorkAttachmentByReportId(String id);
 }

+ 6 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReport/mapper/xml/CwProjectReportMapper.xml

@@ -125,4 +125,10 @@
     <select id="getUserNameById" resultType="java.lang.String">
         select name from sys_user where id = #{id}
     </select>
+
+    <update id="updateSignatureInfo">
+        update cw_project_report set
+        signature_contract_id = #{signatureContractId}
+        where id = #{id}
+    </update>
 </mapper>

+ 10 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReport/mapper/xml/ProjectReportWorkAttachmentMapper.xml

@@ -17,4 +17,14 @@
     <select id="selectInfoByFileId" resultType="com.jeeplus.test.cw.projectReport.domain.CwProjectReportFile">
         select * from cw_project_report_file where report_file_id = #{id}
     </select>
+
+
+    <select id="selectWorkAttachmentByReportId"
+            resultType="com.jeeplus.test.oss.domain.WorkAttachment">
+
+        select a.* from work_attachment a
+        left join cw_project_report_file cf on cf.report_file_id = a.id
+        where a.attachment_id in (select id from cw_project_report_new_line where report_id = #{id}) and cf.file_type = 1
+    </select>
+
 </mapper>

+ 387 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/cw/projectReport/service/CwProjectReportService.java

@@ -3,15 +3,19 @@ package com.jeeplus.test.cw.projectReport.service;
 import cn.hutool.core.collection.CollectionUtil;
 import cn.hutool.core.util.ArrayUtil;
 import cn.hutool.core.util.ObjectUtil;
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.google.common.collect.Lists;
+import com.google.gson.Gson;
 import com.jeeplus.core.query.QueryWrapperGenerator;
 import com.jeeplus.sys.domain.User;
+import com.jeeplus.sys.service.UserService;
 import com.jeeplus.sys.mapper.UserMapper;
 import com.jeeplus.sys.service.dto.UserDTO;
+import com.jeeplus.sys.utils.Global;
 import com.jeeplus.sys.utils.StringUtils;
 import com.jeeplus.sys.utils.UserUtils;
 import com.jeeplus.test.cw.contractRegistration.domain.ContractInfo;
@@ -32,14 +36,20 @@ import com.jeeplus.test.cw.workClientInfo.service.mapstruct.CwWorkClientBaseWrap
 import com.jeeplus.test.mould.service.SerialnumTplService;
 import com.jeeplus.test.oss.domain.WorkAttachment;
 import com.jeeplus.test.oss.mapper.OssServiceMapper;
+import com.jeeplus.test.oss.service.OSSClientService;
 import com.jeeplus.test.oss.service.OssService;
+import com.jeeplus.test.signature.domain.*;
+import com.jeeplus.test.signature.utils.SignaturePostUtil;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.connection.jedis.JedisUtils;
 import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
+import java.io.File;
 import java.util.*;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.stream.Collectors;
@@ -52,6 +62,16 @@ import java.util.stream.Collectors;
 @Transactional
 public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, CwProjectReport> {
 
+    private static final String HTTPTOP = Global.getConfig("signature_http_top");
+    private static final String COMPANYROUNDSEALID = Global.getConfig("company_round_seal_id");
+    private static final String COMPANYROUNDSEALIDVERTICAL = Global.getConfig("company_round_seal_id_vertical");
+    private static final String COMPANYPARTIESSEALID = Global.getConfig("company_parties_seal_id");
+    private static final String APPROVALCATEGORYID = Global.getConfig("approval_category_id");
+    private static final String APPROVALYCCATEGORYID = Global.getConfig("approval_YC_category_id");
+    private static final String REPORTCATEGORYID = Global.getConfig("report_category_id");
+    private static final String REPORTYCCATEGORYID = Global.getConfig("report_YC_category_id");
+    private static final String JUDGEMENTCATEGORYID = Global.getConfig("judgement_category_id");
+
     @Resource
     private CwProjectReportMapper reportMapper;
 
@@ -73,6 +93,11 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
     @Resource
     private CwProjectReportCancelMapper cancelMapper;
 
+    @Autowired
+    private UserService userService;
+    @Autowired
+    private OSSClientService ossClientService;
+
     @Resource
     private UserMapper userMapper;
 
@@ -214,6 +239,10 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
         return report.getId();
     }
 
+    public void updateSignatureInfo(CwProjectReportData projectReportData){
+        reportMapper.updateSignatureInfo(projectReportData);
+    }
+
     /**
      * 新增
      */
@@ -441,4 +470,362 @@ public class CwProjectReportService extends ServiceImpl<CwProjectReportMapper, C
         return list;
     }
 
+    /**
+     * 生成并保存签章contractId 信息
+     * @param projectReportData
+     * @return
+     */
+    public Map<String,Object> createSignatureContractId(CwProjectReportData projectReportData){
+        Map<String,Object> map = new HashMap<String,Object>();
+        //查询报告文件信息(电子章)
+        List<WorkAttachment> fileList = attachmentMapper.selectWorkAttachmentByReportId(projectReportData.getId());
+        if(fileList.size()>0){
+
+            //下载审定单文件
+            String path = null;
+            if(System.getProperty("os.name").toLowerCase().contains("win")){
+                path = "D:/attachment-file/";
+            }else{
+                path = "/attachment-file/";
+            }
+            String aliyunUrl = Global.getAliyunUrl();
+            String aliDownloadUrl = Global.getAliDownloadUrl();
+
+            //获取文件生成的documentId
+            List<String> documentList = Lists.newArrayList();
+
+            for (WorkAttachment workattachment : fileList) {
+                String deleteFile = null;
+                try{
+                    if(StringUtils.isBlank(workattachment.getUrl())){
+                        map.put("success",false);
+                        map.put("message","审定单文件存储路径为空,无法进行签章操作,请驳回后重新上传审定单");
+                        return map;
+                    }
+
+                    String file = aliyunUrl + workattachment.getUrl();
+                    file = file.replace("amp;","");
+                    String fileName = file.substring(file.lastIndexOf("/") + 1, file.length());
+                    String cons = "";
+                    if (file.contains(aliyunUrl)){
+                        cons = aliyunUrl;
+                    }else if (file.contains("http://gangwan-app.oss-cn-hangzhou.aliyuncs.com")){
+                        cons = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com";
+                    }else {
+                        cons = aliDownloadUrl;
+                    }
+                    String ossKey = file.split(cons+"/")[1];
+                    ossClientService.downByStreamSaveLocal(ossKey,fileName,path+fileName);
+                    //将下载下来的文件转换为file文件
+                    File srcFile = new File(path+fileName);
+                    deleteFile = path+fileName;
+
+                    //截取文件名称
+                    String srcFileName = srcFile.getName().substring(0,srcFile.getName().lastIndexOf("."));
+                    //截取文件后缀名
+                    String substring = srcFile.getName().substring(srcFile.getName().lastIndexOf(".")+1, srcFile.getName().length());
+                    if(!"doc".equals(substring.toLowerCase()) && !"docx".equals(substring.toLowerCase()) && !"pdf".equals(substring.toLowerCase())){
+                        map.put("success",false);
+                        map.put("message","请上传doc、docx或者pdf的文件进行签章操作");
+                        return map;
+                    }
+                    //获取真签单的documentId
+                    HashMap hashMap = SignaturePostUtil.getDocument(srcFile);
+                    String code = hashMap.get("code").toString();
+                    String documentId = "";
+                    if("0".equals(code)){
+                        String result = hashMap.get("result").toString();
+                        HashMap documentIdMap = JSON.parseObject(result, HashMap.class);
+                        documentId =  documentIdMap.get("documentId").toString();
+                        if("".equals(documentId)){
+                            map.put("success",false);
+                            map.put("message","签章文件创建失败");
+                            return map;
+                        }
+                    }else{
+                        String message = hashMap.get("message").toString();
+                        map.put("success",false);
+                        map.put("message",message);
+                        return map;
+                    }
+
+                    documentList.add(documentId);
+
+                }catch (Exception e){
+
+                }finally {
+                    if(StringUtils.isNotBlank(deleteFile)){
+                        //根据路径创建文件对象
+                        File file = new File(deleteFile);
+                        //路径是个文件且不为空时删除文件
+                        if(file.isFile()&&file.exists()){
+                            file.delete();
+                        }
+                    }
+                }
+
+            }
+
+
+            //将documentId存入数据库中
+            projectReportData.setSignatureDocumentId(String.join(",", documentList));
+            //根据项目id 和 documentId生成合同id
+            HashMap contractIdHashMap = this.getSignatureContractIdByPageSign(projectReportData.getId(), documentList);
+            String contractIdCode = contractIdHashMap.get("code").toString();
+            String contractId = "";
+            if("0".equals(contractIdCode)){
+                contractId = contractIdHashMap.get("contractId").toString();
+                if("".equals(contractId)){
+                    map.put("success",false);
+                    map.put("message","签章文件创建失败");
+                    return map;
+                }
+                projectReportData.setSignatureContractId(contractId);
+                this.updateSignatureInfo(projectReportData);
+                //修改签章对应信息文件
+                //contractUrl = ruralProjectMessageService.getSignatureContractUrl(contractId);
+                //System.out.println(contractUrl);
+            }else{
+                map.put("success",false);
+                map.put("message",contractIdHashMap.get("message").toString());
+                return map;
+            }
+
+        }else{
+            map.put("success",false);
+            map.put("message","审定单文件未找到,无法进行签章操作");
+            return map;
+        }
+        map.put("success",true);
+        map.put("message","生成签章contractId成功");
+        return null;
+    }
+
+    /**
+     * 根据项目报告id 和 documentId生成合同id(页面签署生成)
+     * 个人签字章功能
+     * @param projectReportDataId
+     * @param documentList
+     * @return
+     */
+    public HashMap getSignatureContractIdByPageSign(String projectReportDataId, List<String> documentList){
+        HashMap hashMap = new HashMap();
+        Set<String> serialIdSet = new HashSet<>();
+        //根据项目id查询项目信息
+        CwProjectReportData projectReportData = reportMapper.queryById(projectReportDataId);
+        //创建签署方信息
+        List<Action> actions = Lists.newArrayList();
+        Action companyAction = new Action();
+        companyAction.setType("CORPORATE");
+        companyAction.setName("公司印章");
+        if(StringUtils.isNotBlank(projectReportData.getSignatureType()) && "2".equals(projectReportData.getSignatureType())){
+            companyAction.setSerialNo("3");
+        }else{
+            companyAction.setSerialNo("1");
+        }
+        //公司圆章-竖
+        //serialIdSet.add(COMPANYROUNDSEALIDVERTICAL);
+        //添加盖章位置
+        List<Location> locations = Lists.newArrayList();
+        /*for (String documentId: documentList) {
+            Location location = new Location();
+            location.setSealId(COMPANYROUNDSEALIDVERTICAL);
+            location.setDocumentId(documentId);
+            location.setPage("0");
+            location.setRectType("SEAL_CORPORATE");
+            location.setKeywordIndex(-1);
+            location.setOffsetX("0.5264");
+            location.setOffsetY("0.6787");
+            locations.add(location);
+        }*/
+
+        //根据角色信息录入签署方信息
+        //负责人
+        List<UserDTO> userInfoByRoleNameList = userService.getUserInfoByRoleName("签章管理人");
+        if(userInfoByRoleNameList.size()>0){
+
+            UserDTO user = UserUtils.get(userInfoByRoleNameList.get(0).getId());
+
+            if(null != user){
+                //获取成员印章id信息
+                long s1=System.currentTimeMillis();
+                String userSealId = SignaturePostUtil.getUserSealByMobile(user.getMobile(),"","江苏兴光项目管理有限公司公章");
+                long s2=System.currentTimeMillis();
+                System.out.println("第二个人员印章获取时间:" + (s2 - s1));
+
+                if(StringUtils.isNotBlank(userSealId)){
+                    for (String documentId: documentList) {
+                        //添加盖章位置
+                        Location principalLocation = new Location();
+                        serialIdSet.add(userSealId);
+                        principalLocation.setSealId(userSealId);
+                        principalLocation.setDocumentId(documentId);
+                        principalLocation.setPage("0");
+                        principalLocation.setRectType("SEAL_CORPORATE");
+                        principalLocation.setKeywordIndex(-1);
+                        principalLocation.setOffsetX("0.7758");
+                        principalLocation.setOffsetY("0.7339");
+                        locations.add(principalLocation);
+                    }
+
+                }else{
+                    hashMap.put("code","2");
+                    hashMap.put("message","查询不到江苏兴光项目管理有限公司公章 的印章信息!请联系管理员");
+                    return hashMap;
+                }
+            }else{
+                hashMap.put("code","2");
+                hashMap.put("message","查询不到江苏兴光项目管理有限公司公章 的印章信息!请联系管理员");
+                return hashMap;
+            }
+        }else{
+            hashMap.put("code","2");
+            hashMap.put("message","查询不到公章盖章人员信息!请联系管理员");
+            return hashMap;
+        }
+
+        List<String> serialIdList = new ArrayList<String>(serialIdSet);
+        companyAction.setSealIds("[" + String.join(",", serialIdList) + "]");
+        //判定该action是否采用自动签署
+        companyAction.setAutoSign("false");
+        companyAction.setLocations(locations);
+        actions.add(companyAction);
+
+        // 根据签章类型判断签章人员信息(即是否添加执业章签章)
+        // 签章类型 1:公章;2:公章+执业章
+        if(StringUtils.isNotBlank(projectReportData.getSignatureType()) && "2".equals(projectReportData.getSignatureType())){
+            //判定签字注师1参数是否为空
+            if(StringUtils.isNotBlank(projectReportData.getSignatureAnnotator1())){
+                UserDTO signatureAnnotator1 = UserUtils.get(projectReportData.getSignatureAnnotator1());
+                if(null != signatureAnnotator1){
+
+                    //创建个人职业章参数(签字注师1)
+                    Action professionalChapterAction = new Action();
+                    professionalChapterAction.setType("PRACTICE");
+                    professionalChapterAction.setName(signatureAnnotator1.getName() + "个人职业章");
+                    professionalChapterAction.setSerialNo("1");
+
+                    //添加盖章位置
+                    List<Location> professionalChapterLocations = Lists.newArrayList();
+
+                    Set<String> professionalChapterSerialIdSet = new HashSet<>();
+
+                    //添加个人职业章人员信息
+                    ActionOperatorInfo actionOperatorInfo = new ActionOperatorInfo();
+                    actionOperatorInfo.setOperatorContact(signatureAnnotator1.getMobile());//个人职业章盖章人的手机号
+                    List<ActionOperatorInfo> actionOperators = Lists.newArrayList();
+                    actionOperators.add(actionOperatorInfo);
+                    professionalChapterAction.setActionOperators(actionOperators);
+
+                    //获取成员印章id信息
+                    long s1=System.currentTimeMillis();
+                    String userSealId = SignaturePostUtil.getUserSealByMobile(signatureAnnotator1.getMobile(),"",signatureAnnotator1.getName() + "个人签名");
+                    long s2=System.currentTimeMillis();
+                    System.out.println("第三个人员印章获取时间:" + (s2 - s1));
+                    if(StringUtils.isNotBlank(userSealId)){
+                    }else{
+                        hashMap.put("code","2");
+                        hashMap.put("message","查询不到签字注师1 的印章信息!请联系管理员");
+                        return hashMap;
+                    }
+
+                    List<String> serialIdsList = new ArrayList<String>(professionalChapterSerialIdSet);
+                    professionalChapterAction.setSealIds("[" + String.join(",", serialIdsList) + "]");
+                    professionalChapterAction.setLocations(professionalChapterLocations);
+                    net.sf.json.JSONObject professionalChapterJson = net.sf.json.JSONObject.fromObject(professionalChapterAction);
+                    System.out.println(professionalChapterJson.toString());
+                    actions.add(professionalChapterAction);
+                }else{
+                    hashMap.put("code","2");
+                    hashMap.put("message","查询不到签字注师1 的印章信息!请联系管理员");
+                    return hashMap;
+                }
+            }else{
+                hashMap.put("code","2");
+                hashMap.put("message","查询不到签字注师1 的印章信息!请联系管理员");
+                return hashMap;
+            }
+
+            //判定签字注师1参数是否为空
+            if(StringUtils.isNotBlank(projectReportData.getSignatureAnnotator1())){
+                UserDTO signatureAnnotator2 = UserUtils.get(projectReportData.getSignatureAnnotator2());
+                if(null != signatureAnnotator2){
+
+                    //创建个人职业章参数(签字注师1)
+                    Action professionalChapterAction = new Action();
+                    professionalChapterAction.setType("PRACTICE");
+                    professionalChapterAction.setName(signatureAnnotator2.getName() + "个人职业章");
+                    professionalChapterAction.setSerialNo("2");
+
+                    //添加盖章位置
+                    List<Location> professionalChapterLocations = Lists.newArrayList();
+
+                    Set<String> professionalChapterSerialIdSet = new HashSet<>();
+
+                    //添加个人职业章人员信息
+                    ActionOperatorInfo actionOperatorInfo = new ActionOperatorInfo();
+                    actionOperatorInfo.setOperatorContact(signatureAnnotator2.getMobile());//个人职业章盖章人的手机号
+                    List<ActionOperatorInfo> actionOperators = Lists.newArrayList();
+                    actionOperators.add(actionOperatorInfo);
+                    professionalChapterAction.setActionOperators(actionOperators);
+
+                    //获取成员印章id信息
+                    long s1=System.currentTimeMillis();
+                    String userSealId = SignaturePostUtil.getUserSealByMobile(signatureAnnotator2.getMobile(),"",signatureAnnotator2.getName() + "个人签名");
+                    long s2=System.currentTimeMillis();
+                    System.out.println("第三个人员印章获取时间:" + (s2 - s1));
+                    if(StringUtils.isNotBlank(userSealId)){
+                    }else{
+                        hashMap.put("code","2");
+                        hashMap.put("message","查询不到签字注师2 的印章信息!请联系管理员");
+                        return hashMap;
+                    }
+
+                    List<String> serialIdsList = new ArrayList<String>(professionalChapterSerialIdSet);
+                    professionalChapterAction.setSealIds("[" + String.join(",", serialIdsList) + "]");
+                    professionalChapterAction.setLocations(professionalChapterLocations);
+                    net.sf.json.JSONObject professionalChapterJson = net.sf.json.JSONObject.fromObject(professionalChapterAction);
+                    System.out.println(professionalChapterJson.toString());
+                    actions.add(professionalChapterAction);
+                }else{
+                    hashMap.put("code","2");
+                    hashMap.put("message","查询不到签字注师2 的印章信息!请联系管理员");
+                    return hashMap;
+                }
+            }else{
+                hashMap.put("code","2");
+                hashMap.put("message","查询不到签字注师2 的印章信息!请联系管理员");
+                return hashMap;
+            }
+        }
+
+
+
+        //创建签署方信息表
+        List<SignatorieInfo> signatories = Lists.newArrayList();
+        SignatorieInfo signatorieInfo1 = new SignatorieInfo();
+        signatorieInfo1.setSerialNo("1");
+        signatorieInfo1.setTenantName("江苏兴光项目管理有限公司");
+        signatorieInfo1.setTenantType("COMPANY");
+        signatorieInfo1.setActions(actions);
+        signatories.add(signatorieInfo1);
+        SignatureContract signatureContract = new SignatureContract();
+        signatureContract.setDocuments(documentList);
+        //审定单用印流程id
+        signatureContract.setCategoryId(APPROVALCATEGORYID);
+        signatureContract.setSend(true);
+        signatureContract.setSignatories(signatories);
+        signatureContract.setSn("");
+        signatureContract.setSubject(projectReportData.getProjectName());//添加项目名称
+        net.sf.json.JSONObject json = net.sf.json.JSONObject.fromObject(signatureContract);
+        System.out.println(json.toString());
+        long s5=System.currentTimeMillis();
+        System.out.println(json.toString());
+        String contractIdMapStr = SignaturePostUtil.sendPostApplicationJson(HTTPTOP + "/contract/createbycategory", json.toString());
+        long s6=System.currentTimeMillis();
+        System.out.println("获取合同id获取时间:" + (s6 - s5));
+        hashMap = JSON.parseObject(contractIdMapStr, HashMap.class);
+
+        return hashMap;
+    }
 }

+ 38 - 4
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/oss/service/OSSClientService.java

@@ -10,10 +10,7 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
-import java.io.BufferedInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
+import java.io.*;
 import java.net.URL;
 import java.util.Calendar;
 import java.util.Date;
@@ -166,6 +163,43 @@ public class OSSClientService {
         return  bytes;
     }
 
+
+    /**
+     * 附件下载到本地指定文件夹
+     * @param key
+     * @param fileName
+     */
+    public void downByStreamSaveLocal(String key, String fileName,String downFileStr){
+        try {
+            // 创建OSSClient实例
+            OSSClient ossClient = new OSSClient(endpoint,accessKeyId,accessKeySecret);
+            OSSObject ossObject = ossClient.getObject(bucketName, key);
+            BufferedInputStream in = new BufferedInputStream(ossObject.getObjectContent());
+
+
+            //写入到文件(注意文件保存路径的后面一定要加上文件的名称)
+            FileOutputStream fileOut = new FileOutputStream(downFileStr);
+            BufferedOutputStream bos = new BufferedOutputStream(fileOut);
+            byte[] buf = new byte[4096];
+            int length = in.read(buf);
+            //保存文件
+            while(length != -1)
+            {
+                bos.write(buf, 0, length);
+                length = in.read(buf);
+            }
+            if(bos!=null){
+                bos.flush();
+                bos.close();
+            }
+            if(in!=null){
+                in.close();
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
     public String datePath(){
         Calendar date = Calendar.getInstance();
         String year = String.valueOf(date.get(Calendar.YEAR));

+ 82 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/signature/domain/Action.java

@@ -0,0 +1,82 @@
+package com.jeeplus.test.signature.domain;
+
+import java.util.List;
+
+/**
+ * @author: 大猫
+ * @create: 2021-11-02 18:32
+ **/
+public class Action {
+    private String type;
+    private String name;
+    private String serialNo;
+    private String sealId;
+    private String autoSign;
+    private String sealIds;
+    private List<ActionOperatorInfo> actionOperators; //签署人信息
+    private List<Location> locations; //位置信息
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getSerialNo() {
+        return serialNo;
+    }
+
+    public void setSerialNo(String serialNo) {
+        this.serialNo = serialNo;
+    }
+
+    public String getAutoSign() {
+        return autoSign;
+    }
+
+    public void setAutoSign(String autoSign) {
+        this.autoSign = autoSign;
+    }
+
+    public List<ActionOperatorInfo> getActionOperators() {
+        return actionOperators;
+    }
+
+    public void setActionOperators(List<ActionOperatorInfo> actionOperators) {
+        this.actionOperators = actionOperators;
+    }
+
+    public List<Location> getLocations() {
+        return locations;
+    }
+
+    public void setLocations(List<Location> locations) {
+        this.locations = locations;
+    }
+
+    public String getSealId() {
+        return sealId;
+    }
+
+    public void setSealId(String sealId) {
+        this.sealId = sealId;
+    }
+
+    public String getSealIds() {
+        return sealIds;
+    }
+
+    public void setSealIds(String sealIds) {
+        this.sealIds = sealIds;
+    }
+}

+ 27 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/signature/domain/ActionOperatorInfo.java

@@ -0,0 +1,27 @@
+package com.jeeplus.test.signature.domain;
+
+/**
+ * 签署人信息
+ * @author: 徐滕
+ * @create: 2021-11-02 18:10
+ **/
+public class ActionOperatorInfo {
+    private String operatorName; //签署人名称
+    private String operatorContact; //签署人手机号
+
+    public String getOperatorName() {
+        return operatorName;
+    }
+
+    public void setOperatorName(String operatorName) {
+        this.operatorName = operatorName;
+    }
+
+    public String getOperatorContact() {
+        return operatorContact;
+    }
+
+    public void setOperatorContact(String operatorContact) {
+        this.operatorContact = operatorContact;
+    }
+}

+ 164 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/signature/domain/Location.java

@@ -0,0 +1,164 @@
+package com.jeeplus.test.signature.domain;
+
+/**
+ * 签署位置表
+ * @author: 徐滕
+ * @create: 2021-11-03 15:50
+ **/
+public class Location {
+    private String id;
+    private String documentId ; //合同文档ID
+    private String rectType ;   //签章类型
+    private String page ;      //签署页码,坐标指定位置时必须,0:全部页,-1:最后一页,其他:第page页
+    private String keyword ;    //关键字,关键字指定位置时必须
+    private Integer keywordIndex ;  //第几个关键字,0:全部,-1:最后一个,其他:第keyIndex 个,默认为1
+    private String offsetX ;    //X轴坐标,坐标定位时必传,关键字定位时选传
+    private String offsetY ;    //Y轴坐标,坐标定位时必传,关键字定位时选传
+    private String contractId ;
+    private String signatoryId ;
+    private String actionId ;
+    private String width ;
+    private String height ;
+    private String fromTemplate ;
+    private String createTime ;
+    private String samePositionId ;
+    private String sealId ;
+
+
+
+    public String getDocumentId() {
+        return documentId;
+    }
+
+    public void setDocumentId(String documentId) {
+        this.documentId = documentId;
+    }
+
+    public String getRectType() {
+        return rectType;
+    }
+
+    public void setRectType(String rectType) {
+        this.rectType = rectType;
+    }
+
+    public String getPage() {
+        return page;
+    }
+
+    public void setPage(String page) {
+        this.page = page;
+    }
+
+    public String getKeyword() {
+        return keyword;
+    }
+
+    public void setKeyword(String keyword) {
+        this.keyword = keyword;
+    }
+
+    public Integer getKeywordIndex() {
+        return keywordIndex;
+    }
+
+    public void setKeywordIndex(Integer keywordIndex) {
+        this.keywordIndex = keywordIndex;
+    }
+
+    public String getOffsetX() {
+        return offsetX;
+    }
+
+    public void setOffsetX(String offsetX) {
+        this.offsetX = offsetX;
+    }
+
+    public String getOffsetY() {
+        return offsetY;
+    }
+
+    public void setOffsetY(String offsetY) {
+        this.offsetY = offsetY;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getContractId() {
+        return contractId;
+    }
+
+    public void setContractId(String contractId) {
+        this.contractId = contractId;
+    }
+
+    public String getSignatoryId() {
+        return signatoryId;
+    }
+
+    public void setSignatoryId(String signatoryId) {
+        this.signatoryId = signatoryId;
+    }
+
+    public String getActionId() {
+        return actionId;
+    }
+
+    public void setActionId(String actionId) {
+        this.actionId = actionId;
+    }
+
+    public String getWidth() {
+        return width;
+    }
+
+    public void setWidth(String width) {
+        this.width = width;
+    }
+
+    public String getHeight() {
+        return height;
+    }
+
+    public void setHeight(String height) {
+        this.height = height;
+    }
+
+    public String getFromTemplate() {
+        return fromTemplate;
+    }
+
+    public void setFromTemplate(String fromTemplate) {
+        this.fromTemplate = fromTemplate;
+    }
+
+    public String getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(String createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getSamePositionId() {
+        return samePositionId;
+    }
+
+    public void setSamePositionId(String samePositionId) {
+        this.samePositionId = samePositionId;
+    }
+
+    public String getSealId() {
+        return sealId;
+    }
+
+    public void setSealId(String sealId) {
+        this.sealId = sealId;
+    }
+}

+ 126 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/signature/domain/PresignCallBack.java

@@ -0,0 +1,126 @@
+package com.jeeplus.test.signature.domain;
+
+/**
+ * 预签署回调参数表
+ * @author: 大猫
+ * @create: 2021-11-04 09:27
+ **/
+public class PresignCallBack {
+    private String contractId;  //文件编号
+    private String documentId;  //文档ID
+    private String tenantId;    //签署方编号
+    private String tenantName;  //签署方名称
+    private String sn;  //文件自定义编号
+    private String status;  //文件状态
+    private String type;    //回调类型
+    private String contact; //联系方式
+    private String operatorName;    //操作人姓名(签章人姓名)
+    private String operatorMobile;  //操作人手机号(签章人手机号)
+    private String operatorNumber;  //操作人员工编号
+    private String receiverNumber;  //经办人员工编号
+    private String storagePath;  //文件归档下载地址
+
+    public String getContractId() {
+        return contractId;
+    }
+
+    public void setContractId(String contractId) {
+        this.contractId = contractId;
+    }
+
+    public String getDocumentId() {
+        return documentId;
+    }
+
+    public void setDocumentId(String documentId) {
+        this.documentId = documentId;
+    }
+
+    public String getTenantId() {
+        return tenantId;
+    }
+
+    public void setTenantId(String tenantId) {
+        this.tenantId = tenantId;
+    }
+
+    public String getTenantName() {
+        return tenantName;
+    }
+
+    public void setTenantName(String tenantName) {
+        this.tenantName = tenantName;
+    }
+
+    public String getSn() {
+        return sn;
+    }
+
+    public void setSn(String sn) {
+        this.sn = sn;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getContact() {
+        return contact;
+    }
+
+    public void setContact(String contact) {
+        this.contact = contact;
+    }
+
+    public String getOperatorName() {
+        return operatorName;
+    }
+
+    public void setOperatorName(String operatorName) {
+        this.operatorName = operatorName;
+    }
+
+    public String getOperatorMobile() {
+        return operatorMobile;
+    }
+
+    public void setOperatorMobile(String operatorMobile) {
+        this.operatorMobile = operatorMobile;
+    }
+
+    public String getOperatorNumber() {
+        return operatorNumber;
+    }
+
+    public void setOperatorNumber(String operatorNumber) {
+        this.operatorNumber = operatorNumber;
+    }
+
+    public String getReceiverNumber() {
+        return receiverNumber;
+    }
+
+    public void setReceiverNumber(String receiverNumber) {
+        this.receiverNumber = receiverNumber;
+    }
+
+    public String getStoragePath() {
+        return storagePath;
+    }
+
+    public void setStoragePath(String storagePath) {
+        this.storagePath = storagePath;
+    }
+}

+ 95 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/signature/domain/SealUserInfo.java

@@ -0,0 +1,95 @@
+package com.jeeplus.test.signature.domain;
+
+import java.util.Date;
+
+/**
+ * 员工印章表
+ * @author: 徐滕
+ * @create: 2021-11-05 09:18
+ **/
+public class SealUserInfo {
+    private String id;  //印章ID
+    private String owner;   //公司ID
+    private String name;    //印章名称
+    private String otherName;   //印章别名
+    //private SealType type;    //签章类型
+    //private SealSpec spec;    //印章规格
+    private String sealKey; //印章图片key
+    private Date createTime; //创建时间
+    //private SealStatus status; //印章状态
+    private String useCount; //印章使用的次数
+    private String category; //印章类型:物理章,电子章
+    private String sealCategoryName; //印章分类名称
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getOwner() {
+        return owner;
+    }
+
+    public void setOwner(String owner) {
+        this.owner = owner;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getOtherName() {
+        return otherName;
+    }
+
+    public void setOtherName(String otherName) {
+        this.otherName = otherName;
+    }
+
+    public String getSealKey() {
+        return sealKey;
+    }
+
+    public void setSealKey(String sealKey) {
+        this.sealKey = sealKey;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getUseCount() {
+        return useCount;
+    }
+
+    public void setUseCount(String useCount) {
+        this.useCount = useCount;
+    }
+
+    public String getCategory() {
+        return category;
+    }
+
+    public void setCategory(String category) {
+        this.category = category;
+    }
+
+    public String getSealCategoryName() {
+        return sealCategoryName;
+    }
+
+    public void setSealCategoryName(String sealCategoryName) {
+        this.sealCategoryName = sealCategoryName;
+    }
+}

+ 38 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/signature/domain/SignByCompanyInfo.java

@@ -0,0 +1,38 @@
+package com.jeeplus.test.signature.domain;
+
+import java.util.List;
+
+/**
+ * 静默公司签署信息表
+ * @author: 徐滕
+ * @create: 2021-11-04 14:14
+ **/
+public class SignByCompanyInfo {
+    private String contractId;
+    private String tenantName;
+    private List<Stamper> stampers;
+
+    public String getContractId() {
+        return contractId;
+    }
+
+    public void setContractId(String contractId) {
+        this.contractId = contractId;
+    }
+
+    public String getTenantName() {
+        return tenantName;
+    }
+
+    public void setTenantName(String tenantName) {
+        this.tenantName = tenantName;
+    }
+
+    public List<Stamper> getStampers() {
+        return stampers;
+    }
+
+    public void setStampers(List<Stamper> stampers) {
+        this.stampers = stampers;
+    }
+}

+ 47 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/signature/domain/SignatorieInfo.java

@@ -0,0 +1,47 @@
+package com.jeeplus.test.signature.domain;
+
+import java.util.List;
+
+/**
+ * 签署方信息表
+ * @author: 徐滕
+ * @create: 2021-11-02 18:08
+ **/
+public class SignatorieInfo {
+    private String tenantType; //签署方类型
+    private String tenantName; //签署方名称
+    private String serialNo; //签署顺序
+    private List<Action> actions; //签署顺序
+
+    public String getTenantType() {
+        return tenantType;
+    }
+
+    public void setTenantType(String tenantType) {
+        this.tenantType = tenantType;
+    }
+
+    public String getTenantName() {
+        return tenantName;
+    }
+
+    public void setTenantName(String tenantName) {
+        this.tenantName = tenantName;
+    }
+
+    public String getSerialNo() {
+        return serialNo;
+    }
+
+    public void setSerialNo(String serialNo) {
+        this.serialNo = serialNo;
+    }
+
+    public List<Action> getActions() {
+        return actions;
+    }
+
+    public void setActions(List<Action> actions) {
+        this.actions = actions;
+    }
+}

+ 74 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/signature/domain/SignatureContract.java

@@ -0,0 +1,74 @@
+package com.jeeplus.test.signature.domain;
+
+import java.util.List;
+
+/**
+ * 签章合同表
+ * @author: 徐滕
+ * @create: 2021-11-02 18:05
+ **/
+public class SignatureContract {
+    private String subject; //合同名称
+    private String sn; //合同编号 非必填
+    private String categoryId; //用印流程ID 非必填
+    private String tenantName; //用印流程名称 非必填
+    private List<String> documents; //文档ID的集合 非必填
+    private List<SignatorieInfo> signatories; //签署方信息 非必填
+    private Boolean send;   //是否发起(预签署为不发起)
+
+    public String getSubject() {
+        return subject;
+    }
+
+    public void setSubject(String subject) {
+        this.subject = subject;
+    }
+
+    public String getSn() {
+        return sn;
+    }
+
+    public void setSn(String sn) {
+        this.sn = sn;
+    }
+
+    public String getCategoryId() {
+        return categoryId;
+    }
+
+    public void setCategoryId(String categoryId) {
+        this.categoryId = categoryId;
+    }
+
+    public String getTenantName() {
+        return tenantName;
+    }
+
+    public void setTenantName(String tenantName) {
+        this.tenantName = tenantName;
+    }
+
+    public List<String> getDocuments() {
+        return documents;
+    }
+
+    public void setDocuments(List<String> documents) {
+        this.documents = documents;
+    }
+
+    public List<SignatorieInfo> getSignatories() {
+        return signatories;
+    }
+
+    public void setSignatories(List<SignatorieInfo> signatories) {
+        this.signatories = signatories;
+    }
+
+    public Boolean getSend() {
+        return send;
+    }
+
+    public void setSend(Boolean send) {
+        this.send = send;
+    }
+}

+ 81 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/signature/domain/Stamper.java

@@ -0,0 +1,81 @@
+package com.jeeplus.test.signature.domain;
+
+/**
+ * 印章坐标表
+ * @author: 大猫
+ * @create: 2021-11-04 14:19
+ **/
+public class Stamper {
+    private String documentId;  //合同文档ID
+    private String type;        //签章类型:SEAL_CORPORATE(公章),ACROSS_PAGE(骑缝章),TIMESTAMP(时间戳)
+    private String sealId;      //印章ID
+    private Integer page;        //签署页码,从1开始,坐标定位时必传,0:全部页,-1:最后一页,其他:第page页
+    private Boolean allPage;     //是否签署所有页面
+    private Double x;           //签署位置在页面宽的占比,取值0~1,坐标定位时必传,关键字定位时选传
+    private Double y;           //签署位置在页面高的占比,取值0~1,坐标定位时必传,关键字定位时选传
+    private String keyword;     //定位关键字
+
+    public String getDocumentId() {
+        return documentId;
+    }
+
+    public void setDocumentId(String documentId) {
+        this.documentId = documentId;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getSealId() {
+        return sealId;
+    }
+
+    public void setSealId(String sealId) {
+        this.sealId = sealId;
+    }
+
+    public Integer getPage() {
+        return page;
+    }
+
+    public void setPage(Integer page) {
+        this.page = page;
+    }
+
+    public Boolean getAllPage() {
+        return allPage;
+    }
+
+    public void setAllPage(Boolean allPage) {
+        this.allPage = allPage;
+    }
+
+    public Double getX() {
+        return x;
+    }
+
+    public void setX(Double x) {
+        this.x = x;
+    }
+
+    public Double getY() {
+        return y;
+    }
+
+    public void setY(Double y) {
+        this.y = y;
+    }
+
+    public String getKeyword() {
+        return keyword;
+    }
+
+    public void setKeyword(String keyword) {
+        this.keyword = keyword;
+    }
+}

+ 813 - 0
jeeplus-module/jeeplus-test/src/main/java/com/jeeplus/test/signature/utils/SignaturePostUtil.java

@@ -0,0 +1,813 @@
+package com.jeeplus.test.signature.utils;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.jeeplus.sys.utils.Global;
+import com.jeeplus.test.signature.domain.SealUserInfo;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+import org.apache.http.NameValuePair;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.utils.URLEncodedUtils;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.util.EntityUtils;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.URI;
+import java.net.URL;
+import java.net.URLConnection;
+import java.nio.charset.Charset;
+import java.util.*;
+import java.util.Map.Entry;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+/**
+ * @author: 徐滕
+ * @create: 2021-11-02 14:20
+ **/
+public class SignaturePostUtil {
+
+    //竖版模板templateId
+    private static final String VERTICALTEMPLATEID = Global.getConfig("vertical_templateId");
+    //横板模板templateId
+    private static final String ACROSSTEMPLATEID = Global.getConfig("across_templateId");
+    private static final String HTTPTOP = Global.getConfig("signature_http_top");
+
+    private final static String apptoken = Global.getConfig("apptoken");
+    private final static String appsecret = Global.getConfig("appsecret");
+    private final static String signature = Global.getConfig("signature");
+
+
+    /**
+     * 发送get请求
+     *
+     * @param requestUrl
+     *      请求url
+     * @param requestHeader
+     *      请求头
+     * @param responseEncoding
+     *      响应编码
+     * @return 页面响应html
+     */
+    public static String sendGet(String requestUrl, Map<String, String> requestHeader, String responseEncoding) {
+        String result = "";
+        BufferedReader reader = null;
+        try {
+            if (requestUrl == null || requestUrl.isEmpty()) {
+                return result;
+            }
+            URL realUrl = new URL(requestUrl);
+            URLConnection connection = realUrl.openConnection();
+            connection.setRequestProperty("accept", "text/html, application/xhtml+xml, image/jxr, */*");
+            connection.setRequestProperty("user-agent", "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0");
+            if (requestHeader != null && requestHeader.size() > 0) {
+                for (Entry<String, String> entry : requestHeader.entrySet()) {
+                    connection.setRequestProperty(entry.getKey(), entry.getValue());
+                }
+            }
+            connection.connect();
+            if (responseEncoding == null || responseEncoding.isEmpty()) {
+                responseEncoding = "UTF-8";
+            }
+            reader = new BufferedReader(new InputStreamReader(connection.getInputStream(), responseEncoding));
+            String line;
+            while ((line = reader.readLine()) != null) {
+                result += line;
+            }
+        } catch (Exception e) {
+            System.out.println("发送GET请求出现异常!");
+            e.printStackTrace();
+        } finally {
+            try {
+                if (reader != null) {
+                    reader.close();
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+        result = decodeUnicode(result);
+        return result;
+    }
+
+    /**
+     * 发送下载压缩包get请求
+     * @param requestUrl 请求url
+     * @param requestHeader 请求头
+     * @param fileName 下载文件名称
+     * @param responseEncoding 响应编码
+     * @return 页面响应html
+     */
+    public static String downloadZipGet(String requestUrl, Map<String, String> requestHeader, String fileName, String responseEncoding, HttpServletResponse response) {
+        String result = "";
+        BufferedReader reader = null;
+        try {
+            if (requestUrl == null || requestUrl.isEmpty()) {
+                return result;
+            }
+            URL realUrl = new URL(requestUrl);
+            URLConnection connection = realUrl.openConnection();
+            connection.setRequestProperty("accept", "text/html, application/xhtml+xml, image/jxr, */*");
+            connection.setRequestProperty("user-agent", "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0");
+            if (requestHeader != null && requestHeader.size() > 0) {
+                for (Entry<String, String> entry : requestHeader.entrySet()) {
+                    connection.setRequestProperty(entry.getKey(), entry.getValue());
+                }
+            }
+            connection.setRequestProperty("Content-Type", "application/zip");
+            connection.connect();
+            if (responseEncoding == null || responseEncoding.isEmpty()) {
+                responseEncoding = "UTF-8";
+            }
+            InputStream inputStream = connection.getInputStream();
+            //获取自己数组
+            byte[] getData = readInputStream(inputStream);
+
+            //设置HTTP响应头
+            response.reset();//重置 响应头
+            response.setContentType("application/x-download");//告知浏览器下载文件,而不是直接打开,浏览器默认为打开
+            fileName = new String(fileName.getBytes("UTF-8"), "ISO-8859-1");
+            response.addHeader("Content-Disposition" ,"attachment;filename=" +fileName+ "");//下载文件的名称
+            // 循环取出流中的数据
+            response.getOutputStream().write(getData);
+            response.getOutputStream().close();
+
+            if(inputStream!=null){
+                inputStream.close();
+            }
+
+        } catch (Exception e) {
+            System.out.println("发送GET请求出现异常!");
+            e.printStackTrace();
+        } finally {
+            try {
+                if (reader != null) {
+                    reader.close();
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+        return result;
+    }
+
+    /**
+     * 下载文件并保存到指定位置
+     * @param requestUrl 请求url
+     * @param requestHeader 请求头
+     * @param fileName 下载文件名称
+     * @param responseEncoding 响应编码
+     * @return 页面响应html
+     */
+    public static Map<String,Object> downloadZipDesignated(String requestUrl, Map<String, String> requestHeader, String fileName, String responseEncoding) {
+        Map<String,Object> map = new HashMap<>();
+        BufferedReader reader = null;
+        try {
+            if (requestUrl == null || requestUrl.isEmpty()) {
+                map.put("success",false);
+                map.put("message",fileName + " 的请求路径为空");
+                map.put("fileName",fileName);
+                map.put("filePath","");
+                return map;
+            }
+            URL realUrl = new URL(requestUrl);
+            URLConnection connection = realUrl.openConnection();
+            connection.setRequestProperty("accept", "text/html, application/xhtml+xml, image/jxr, */*");
+            connection.setRequestProperty("user-agent", "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0");
+            if (requestHeader != null && requestHeader.size() > 0) {
+                for (Entry<String, String> entry : requestHeader.entrySet()) {
+                    connection.setRequestProperty(entry.getKey(), entry.getValue());
+                }
+            }
+            connection.setRequestProperty("Content-Type", "application/zip");
+            connection.connect();
+            if (responseEncoding == null || responseEncoding.isEmpty()) {
+                responseEncoding = "UTF-8";
+            }
+            InputStream inputStream = connection.getInputStream();
+
+            BufferedInputStream bis = new BufferedInputStream(inputStream);
+            //判断文件的保存路径后面是否以/结尾
+            String filePath = null;
+            if(System.getProperty("os.name").toLowerCase().contains("win")){
+                filePath = "D:/attachment-file/";
+            }else{
+                filePath = "/attachment-file/";
+            }
+            //写入到文件(注意文件保存路径的后面一定要加上文件的名称)
+            fileName = fileName.replaceAll("\\\\","");
+            fileName = fileName.replaceAll("/","");
+            fileName = fileName.replaceAll("\\*","");
+            fileName = fileName.replaceAll("\\?","");
+            fileName = fileName.replaceAll("\"","");
+            fileName = fileName.replaceAll("<","");
+            fileName = fileName.replaceAll(">","");
+            fileName = fileName.replaceAll("\\|","");
+            fileName = fileName.replaceAll("\\’","'");
+            fileName = fileName.replaceAll("\\”","\"");
+            fileName = fileName.replaceAll("【","(");
+            fileName = fileName.replaceAll("\\{","(");
+            fileName = fileName.replaceAll("】",")");
+            fileName = fileName.replaceAll("}",")");
+            fileName = fileName.replaceAll(",",",");
+            fileName = fileName.replaceAll(":",":");
+            fileName = fileName.replaceAll("—","-");
+            fileName = fileName.replaceAll("……","");
+            fileName = fileName.replaceAll("±","");
+            fileName = fileName.replaceAll("#","");
+            fileName = fileName.replaceAll("%","");
+            fileName = fileName.replaceAll("Π","");
+
+            FileOutputStream fileOut = new FileOutputStream(filePath + fileName);
+            BufferedOutputStream bos = new BufferedOutputStream(fileOut);
+
+            byte[] buf = new byte[4096];
+            int length = bis.read(buf);
+            //保存文件
+            while(length != -1)
+            {
+                bos.write(buf, 0, length);
+                length = bis.read(buf);
+            }
+            //response.getOutputStream().close();
+            bos.close();
+            fileOut.close();
+            bis.close();
+            if(inputStream!=null){
+                inputStream.close();
+            }
+            map.put("success",true);
+            map.put("message","下载成功");
+            map.put("fileName",fileName);
+            map.put("filePath",filePath);
+        } catch (Exception e) {
+            System.out.println("发送GET请求出现异常!");
+            e.printStackTrace();
+        } finally {
+            try {
+                if (reader != null) {
+                    reader.close();
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+        return map;
+    }
+
+    /**
+     * 从输入流中获取字节数组
+     * @param inputStream
+     * @return
+     * @throws IOException
+     */
+    public static byte[] readInputStream(InputStream inputStream) throws IOException {
+        byte[] buffer = new byte[1024];
+        int len = 0;
+        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        while((len = inputStream.read(buffer)) != -1) {
+            bos.write(buffer, 0, len);
+        }
+        bos.close();
+        return bos.toByteArray();
+    }
+
+    /**
+     * 发送post请求
+     *
+     * @param requestUrl 请求url
+     * @param requestHeader 请求头
+     * @param formTexts 表单数据
+     * @param files 上传文件
+     * @param requestEncoding 请求编码
+     * @param responseEncoding 响应编码
+     * @return 页面响应html
+     */
+    public static String sendPost(String requestUrl, Map<String, String> requestHeader, Map<String, String> formTexts, File[] files, String requestEncoding, String responseEncoding) {
+        OutputStream out = null;
+        BufferedReader reader = null;
+        String result = "";
+        try {
+            if (requestUrl == null || requestUrl.isEmpty()) {
+                return result;
+            }
+            URL realUrl = new URL(requestUrl);
+            HttpURLConnection connection = (HttpURLConnection) realUrl.openConnection();
+            connection.setRequestProperty("accept", "text/html, application/xhtml+xml, image/jxr, */*");
+            connection.setRequestProperty("user-agent", "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0");
+            if (requestHeader != null && requestHeader.size() > 0) {
+                for (Entry<String, String> entry : requestHeader.entrySet()) {
+                    connection.setRequestProperty(entry.getKey(), entry.getValue());
+                }
+            }
+            connection.setDoOutput(true);
+            connection.setDoInput(true);
+            connection.setRequestMethod("POST");
+            if (requestEncoding == null || requestEncoding.isEmpty()) {
+                requestEncoding = "UTF-8";
+            }
+            if (responseEncoding == null || responseEncoding.isEmpty()) {
+                responseEncoding = "UTF-8";
+            }
+            if (requestHeader != null && requestHeader.size() > 0) {
+                for (Entry<String, String> entry : requestHeader.entrySet()) {
+                    connection.setRequestProperty(entry.getKey(), entry.getValue());
+                }
+            }
+            if (files == null || files.length == 0) {
+                String boundary = "-----------------------------" + String.valueOf(new Date().getTime());
+                connection.setRequestProperty("content-type", "multipart/form-data; boundary=" + boundary);
+                out = new DataOutputStream(connection.getOutputStream());
+                if (formTexts != null && formTexts.size() > 0) {
+                    StringBuilder sbFormData = new StringBuilder();
+                    for (Entry<String, String> entry : formTexts.entrySet()) {
+                        sbFormData.append("--" + boundary + "\r\n");
+                        sbFormData.append("Content-Disposition: form-data; name=\"" + entry.getKey() + "\"\r\n\r\n");
+                        sbFormData.append(entry.getValue() + "\r\n");
+                    }
+                    out.write(sbFormData.toString().getBytes(requestEncoding));
+                }
+            } else {
+                String boundary = "-----------------------------" + String.valueOf(new Date().getTime());
+                connection.setRequestProperty("content-type", "multipart/form-data; boundary=" + boundary);
+                out = new DataOutputStream(connection.getOutputStream());
+                if (formTexts != null && formTexts.size() > 0) {
+                    StringBuilder sbFormData = new StringBuilder();
+                    for (Entry<String, String> entry : formTexts.entrySet()) {
+                        sbFormData.append("--" + boundary + "\r\n");
+                        sbFormData.append("Content-Disposition: form-data; name=\"" + entry.getKey() + "\"\r\n\r\n");
+                        sbFormData.append(entry.getValue() + "\r\n");
+                    }
+                    out.write(sbFormData.toString().getBytes(requestEncoding));
+                }
+                for (File file : files) {
+                    if (!file.exists()) {
+                        continue;
+                    }
+                    out.write(("--" + boundary + "\r\n").getBytes(requestEncoding));
+                    out.write(("Content-Disposition: form-data; name=\" file \"; filename=\"" + file.getName() + "\"\r\n").getBytes(requestEncoding));
+                    out.write(("Content-Type: application/x-msdownload\r\n\r\n").getBytes(requestEncoding));
+                    DataInputStream in = new DataInputStream(new FileInputStream(file));
+                    int bytes = 0;
+                    byte[] bufferOut = new byte[1024];
+                    while ((bytes = in.read(bufferOut)) != -1) {
+                        out.write(bufferOut, 0, bytes);
+                    }
+                    in.close();
+                    out.write(("\r\n").getBytes(requestEncoding));
+                }
+                out.write(("--" + boundary + "--").getBytes(requestEncoding));
+            }
+            out.flush();
+            out.close();
+            out = null;
+            reader = new BufferedReader(new InputStreamReader(connection.getInputStream(), responseEncoding));
+            String line;
+            while ((line = reader.readLine()) != null) {
+                result += line;
+            }
+        } catch (Exception e) {
+            System.out.println("发送POST请求出现异常!");
+            e.printStackTrace();
+        } finally {
+            try {
+                if (out != null) {
+                    out.close();
+                }
+                if (reader != null) {
+                    reader.close();
+                }
+            } catch (IOException ex) {
+                ex.printStackTrace();
+            }
+        }
+        result = decodeUnicode(result);
+        return result;
+    }
+
+    /**
+     * ApplicationJson的post请求
+     * @return
+     */
+    public static String sendPostApplicationJson(String url, String jsonString) {
+        CloseableHttpClient httpClient = null;
+        CloseableHttpResponse httpResponse = null;
+        String result = "";
+        // 创建httpClient实例
+        httpClient = HttpClients.createDefault();
+        // 创建httpPost远程连接实例
+        HttpPost httpPost = new HttpPost(url);
+        // 配置请求参数实例
+        RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(35000)// 设置连接主机服务超时时间
+                .setConnectionRequestTimeout(35000)// 设置连接请求超时时间
+                .setSocketTimeout(60000)// 设置读取数据连接超时时间
+                .build();
+        // 为httpPost实例设置配置
+        httpPost.setConfig(requestConfig);
+        // 设置请求头鉴权
+        httpPost.setHeader("x-qys-accesstoken", apptoken);
+        httpPost.setHeader("x-qys-signature", signature);
+        httpPost.setHeader("x-qys-timestamp", "0");
+        // 包含内容格式设置
+        httpPost.addHeader("Content-Type", "application/json");
+        // 封装post请求参数
+        if (null != jsonString) {
+            // 为httpPost设置封装好的请求参数
+            System.out.println("添加到实体------");
+            httpPost.setEntity(new StringEntity(jsonString, "UTF-8"));
+        }
+        try {
+            // httpClient对象执行post请求,并返回响应参数对象
+            httpResponse = httpClient.execute(httpPost);
+            // 从响应对象中获取响应内容
+            HttpEntity entity = httpResponse.getEntity();
+            result = EntityUtils.toString(entity);
+        } catch (ClientProtocolException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
+            // 关闭资源
+            if (null != httpResponse) {
+                try {
+                    httpResponse.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+            if (null != httpClient) {
+                try {
+                    httpClient.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        result = decodeUnicode(result);
+        System.out.println(result);
+        return result;
+    }
+    /**
+     * imagePng的post请求
+     * @return
+     */
+    public static String sendPostImagePng(String url, String jsonString) {
+        CloseableHttpClient httpClient = null;
+        CloseableHttpResponse httpResponse = null;
+        String result = "";
+        // 创建httpClient实例
+        httpClient = HttpClients.createDefault();
+        // 创建httpPost远程连接实例
+        HttpPost httpPost = new HttpPost(url);
+        // 配置请求参数实例
+        RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(35000)// 设置连接主机服务超时时间
+                .setConnectionRequestTimeout(35000)// 设置连接请求超时时间
+                .setSocketTimeout(60000)// 设置读取数据连接超时时间
+                .build();
+        // 为httpPost实例设置配置
+        httpPost.setConfig(requestConfig);
+        // 设置请求头鉴权
+        httpPost.setHeader("x-qys-accesstoken", apptoken);
+        httpPost.setHeader("x-qys-signature", signature);
+        httpPost.setHeader("x-qys-timestamp", "0");
+        // 包含内容格式设置
+        httpPost.addHeader("Content-Type", "image/png");
+        // 封装post请求参数
+        if (null != jsonString) {
+            // 为httpPost设置封装好的请求参数
+            System.out.println("添加到实体------");
+            httpPost.setEntity(new StringEntity(jsonString, "UTF-8"));
+        }
+        try {
+            // httpClient对象执行post请求,并返回响应参数对象
+            httpResponse = httpClient.execute(httpPost);
+            // 从响应对象中获取响应内容
+            HttpEntity entity = httpResponse.getEntity();
+            result = EntityUtils.toString(entity);
+        } catch (ClientProtocolException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
+            // 关闭资源
+            if (null != httpResponse) {
+                try {
+                    httpResponse.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+            if (null != httpClient) {
+                try {
+                    httpClient.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        result = decodeUnicode(result);
+        System.out.println(result);
+        return result;
+    }
+
+    public static String decodeUnicode(String asciicode) {
+        String[] asciis = asciicode.split ("\\\\u");
+        String nativeValue = asciis[0];
+        try
+        {
+            for ( int i = 1; i < asciis.length; i++ )
+            {
+                String code = asciis[i];
+                nativeValue += (char) Integer.parseInt (code.substring (0, 4), 16);
+                if (code.length () > 4)
+                {
+                    nativeValue += code.substring (4, code.length ());
+                }
+            }
+        }
+        catch (NumberFormatException e)
+        {
+            return asciicode;
+        }
+        return nativeValue;
+    }
+
+    /**
+     * 根据文件创建合同信息
+     * @param srcFile
+     * @return
+     */
+    public static HashMap getDocument(File srcFile) {
+        //截取文件后缀名
+        String substring = srcFile.getName().substring(srcFile.getName().lastIndexOf(".")+1, srcFile.getName().length());
+        //添加请求头
+        Map<String,String> requestHeaderMap = new HashMap<>();
+        requestHeaderMap.put("x-qys-accesstoken", apptoken);
+        requestHeaderMap.put("x-qys-signature", signature);
+        requestHeaderMap.put("x-qys-timestamp", "0");
+        //添加文件参数
+        Map<String,String> formTextsMap = new HashMap<>();
+        formTextsMap.put("title",srcFile.getName());
+        formTextsMap.put("fileType",substring);
+        //创建文件数组
+        File[] files = new File[]{srcFile};
+        //访问方法
+        String documentResult = sendPost(HTTPTOP + "/v2/document/createbyfile", requestHeaderMap, formTextsMap, files, "", "");
+        HashMap hashMap = JSON.parseObject(documentResult, HashMap.class);
+
+        return hashMap;
+    }
+
+    /**
+     * 运行无效合同信息
+     * @param fileName
+     * @param invalidFile
+     * @return
+     */
+    public static String getVerticalInvalidDocument(String fileName,File invalidFile){
+        File[] files = new File[]{invalidFile};
+        //添加请求头
+        Map<String,String> requestHeaderMap = new HashMap<>();
+        requestHeaderMap.put("x-qys-accesstoken", apptoken);
+        requestHeaderMap.put("x-qys-signature", signature);
+        requestHeaderMap.put("x-qys-timestamp", "0");
+        //添加文件参数
+        Map<String,String> formTextsMap = new HashMap<>();
+        formTextsMap.put("title",fileName);
+        formTextsMap.put("templateId",VERTICALTEMPLATEID);
+        //访问方法
+        String documentResult = sendPost(HTTPTOP + "/document/createbytemplate", requestHeaderMap, formTextsMap, files, "", "");
+        HashMap hashMap = JSON.parseObject(documentResult, HashMap.class);
+        String code = hashMap.get("code").toString();
+        if("0".equals(code)){
+            String documentId = hashMap.get("documentId").toString();
+            return documentId;
+        }
+        return "";
+    }
+
+    /**
+     * 运行无效合同信息
+     * @param fileName
+     * @param invalidFile
+     * @return
+     */
+    public static String getAcrossVerticalInvalidDocument(String fileName,File invalidFile){
+        File[] files = new File[]{invalidFile};
+        //添加请求头
+        Map<String,String> requestHeaderMap = new HashMap<>();
+        requestHeaderMap.put("x-qys-accesstoken", apptoken);
+        requestHeaderMap.put("x-qys-signature", signature);
+        requestHeaderMap.put("x-qys-timestamp", "0");
+        //添加文件参数
+        Map<String,String> formTextsMap = new HashMap<>();
+        formTextsMap.put("title",fileName);
+        formTextsMap.put("templateId",ACROSSTEMPLATEID);
+        //访问方法
+        String documentResult = sendPost(HTTPTOP + "/document/createbytemplate", requestHeaderMap, formTextsMap, files, "", "");
+        HashMap hashMap = JSON.parseObject(documentResult, HashMap.class);
+        String code = hashMap.get("code").toString();
+        if("0".equals(code)){
+            String documentId = hashMap.get("documentId").toString();
+            return documentId;
+        }
+        return "";
+    }
+
+
+    public static String doGet(Map<String, String> paramMap, String url){
+        String result = "";
+        HttpGet get = new HttpGet(url);
+        try{
+            // 设置请求头鉴权
+            get.setHeader("x-qys-accesstoken", apptoken);
+            get.setHeader("x-qys-signature", signature);
+            get.setHeader("x-qys-timestamp", "0");
+            CloseableHttpClient httpClient = HttpClients.createDefault();
+            List<NameValuePair> params = setHttpParams(paramMap);
+            String param = URLEncodedUtils.format(params, "UTF-8");
+            get.setURI(URI.create(url + "?" + param));
+            HttpResponse response = httpClient.execute(get);
+            result = getHttpEntityContent(response);
+
+            if(response.getStatusLine().getStatusCode()!= HttpStatus.SC_OK){
+                result = "服务器异常";
+            }
+        } catch (Exception e){
+            System.out.println("请求异常");
+            throw new RuntimeException(e);
+        } finally{
+            get.abort();
+        }
+        result = decodeUnicode(result);
+        return result;
+    }
+
+    public static List<NameValuePair> setHttpParams(Map<String, String> paramMap){
+        List<NameValuePair> params = new ArrayList<NameValuePair>();
+        Set<Entry<String, String>> set = paramMap.entrySet();
+        for(Entry<String, String> entry : set){
+            params.add(new BasicNameValuePair(entry.getKey(), entry.getValue()));
+        }
+        return params;
+    }
+
+    public static String getHttpEntityContent(HttpResponse response) throws UnsupportedOperationException, IOException{
+        String result = "";
+        HttpEntity entity = response.getEntity();
+        if(entity != null){
+            InputStream in = entity.getContent();
+            BufferedReader br = new BufferedReader(new InputStreamReader(in, "utf-8"));
+            StringBuilder strber= new StringBuilder();
+            String line = null;
+            while((line = br.readLine())!=null){
+                strber.append(line+'\n');
+            }
+            br.close();
+            in.close();
+            result = strber.toString();
+        }
+
+        return result;
+    }
+
+
+    /**
+     * 根据用户手机号查询用户章信息
+     * @param userMobile
+     * @param employeeNo 用户编号
+     * @param sealName 印章名称
+     * @return
+     */
+    public static String getUserSealByMobile(String userMobile,String employeeNo,String sealName){
+        //根据contractId将文件下载下来 并上传到阿里云服务种
+        //添加请求头
+        Map<String,String> requestHeaderMap = new HashMap<>();
+        requestHeaderMap.put("x-qys-accesstoken", apptoken);
+        requestHeaderMap.put("x-qys-signature", signature);
+        requestHeaderMap.put("x-qys-timestamp", "0");
+
+        Map map =new HashMap();
+        map.put("companyName","江苏兴光项目管理有限公司");
+        map.put("mobile",userMobile);
+        map.put("employeeNo",employeeNo);
+        String viewUrlStr = SignaturePostUtil.doGet(map, HTTPTOP + "/seal/user/charge");
+        HashMap userSealStrMap = JSON.parseObject(viewUrlStr, HashMap.class);
+        String code = userSealStrMap.get("code").toString();
+        if("0".equals(code)){
+            String resultStr = userSealStrMap.get("result").toString();
+            //获取成员印章信息列表
+            List<SealUserInfo> userSealList = (List<SealUserInfo>) JSONArray.parseArray(resultStr, SealUserInfo.class);
+            //ZList <SealUserInfo> userSealList =new Gson().fromJson(resultStr, new TypeToken<List<SealUserInfo>>() {}.getType());
+            if(userSealList.size()>0){
+                //如果需要判定得印章名称不为空则进行精确印章处理
+                if(StringUtils.isNotBlank(sealName)){
+                    for (SealUserInfo userSeal: userSealList) {
+                        if(sealName.equals(userSeal.getName())){
+                            //返回成员印章编号id
+                            return userSeal.getId();
+                        }
+                    }
+                }else{
+                    if(StringUtils.isNotBlank(userSealList.get(0).getId())){
+                        //返回成员第一个印章编号id
+                        return userSealList.get(0).getId();
+                    }
+                }
+            }
+        }
+        return "";
+    }
+
+    /**
+     * 根据合同编号查询签章合同对应的url访问界面
+     * @param contractId 签章合同id
+     * @param contact 签章人手机号
+     * @return
+     */
+    public String getSignatureContractUrl( String contractId,String contact ){
+        Map map = new HashMap();
+        map.put("contractId",contractId);
+        map.put("tenantType","COMPANY");
+        map.put("tenantName","江苏兴光项目管理有限公司");
+        map.put("contact",contact);
+        String jsonString = JSON.toJSONString(map);
+        String contractIdUrl = SignaturePostUtil.sendPostApplicationJson(HTTPTOP + "/contract/signurl", jsonString);
+        HashMap signUrlHashMap = JSON.parseObject(contractIdUrl, HashMap.class);
+        String code = signUrlHashMap.get("code").toString();
+        if("0".equals(code)){
+            String signUrl = signUrlHashMap.get("signUrl").toString();
+            return signUrl;
+        }
+        return "";
+    }
+
+    /**
+     * zip文件解压
+     * @param file 需解压的文件
+     * @param destDirPath 解压文件地址
+     */
+    public static void unZipFile(File file,String destDirPath){
+        // 开始解压
+        ZipFile zipFile = null;
+        try {
+            //zipFile = new ZipFile(file);
+            //添加解压编码,解决解压报错问题
+            zipFile = new ZipFile(file, Charset.forName("GBK"));
+            Enumeration<?> entries = zipFile.entries();
+            while (entries.hasMoreElements()) {
+                ZipEntry entry = (ZipEntry) entries.nextElement();
+                System.out.println("解压" + entry.getName());
+                // 如果是文件夹,就创建个文件夹
+                if (entry.isDirectory()) {
+                    String dirPath = destDirPath + "/" + entry.getName();
+                    File dir = new File(dirPath);
+                    dir.mkdirs();
+                } else {
+                    // 如果是文件,就先创建一个文件,然后用io流把内容copy过去
+                    File targetFile = new File(destDirPath + "/" + entry.getName());
+                    // 保证这个文件的父文件夹必须要存在
+                    if(!targetFile.getParentFile().exists()){
+                        targetFile.getParentFile().mkdirs();
+                    }
+                    targetFile.createNewFile();
+                    // 将压缩文件内容写入到这个文件中
+                    InputStream is = zipFile.getInputStream(entry);
+                    FileOutputStream fos = new FileOutputStream(targetFile);
+                    int len;
+                    byte[] buf = new byte[1024];
+                    while ((len = is.read(buf)) != -1) {
+                        fos.write(buf, 0, len);
+                    }
+                    // 关流顺序,先打开的后关闭
+                    fos.close();
+                    is.close();
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            if(zipFile != null){
+                try {
+                    zipFile.close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                    e.printStackTrace();
+                }
+            }
+        }
+    }
+}
+

+ 8 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/mapper/UserMapper.java

@@ -148,4 +148,12 @@ public interface UserMapper extends BaseMapper<User> {
      */
     List <UserDTO> getUserInfoByMobile(UserDTO userDTO);
 
+    /**
+     * 根据角色名称查询角色下人员信息
+     *
+     * @param roleName 角色名称
+     * @return
+     */
+    List <UserDTO> getUserInfoByRoleName(String roleName);
+
 }

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 24 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/mapper/xml/UserMapper.xml


+ 10 - 0
jeeplus-platform/jeeplus-admin/src/main/java/com/jeeplus/sys/service/UserService.java

@@ -415,4 +415,14 @@ public class UserService  extends ServiceImpl<UserMapper, User> {
 			}
 		}
 	}
+
+
+	/**
+	 * 根据角色名称查询角色下人员信息
+	 * @param roleName 角色名称
+	 * @return
+	 */
+	public List<UserDTO> getUserInfoByRoleName(String roleName){
+		return userMapper.getUserInfoByRoleName(roleName);
+	}
 }

+ 54 - 0
jeeplus-web/src/main/resources/application-development.yml

@@ -212,3 +212,57 @@ publicPassword: jsxgpassword
 #阿里云文件夹路径
 aliyun_directory: attachment-file/assess
 
+#apptoken: Mt4een4BN8
+#appsecret: qhA4aV2GKE8Oq8k4G3twLiUn4U60cN
+#signature: 19ed90930b5b84800ea582e34b71d1dd
+#
+#signature_http_top: http://121.40.158.10:9182
+#
+##竖版模板templateId
+#vertical_templateId: 2896237810850173018
+##横板模板templateId
+#across_templateId: 2896237585095954500
+##公司圆章
+#company_round_seal_id: 2895593387063378002
+##公司圆章-竖
+#company_round_seal_id_vertical: 2898042707446829376
+##公司方章
+#company_parties_seal_id: 2895597212998434929
+##审定单用印流程id
+#approval_category_id: 2895535120981852163
+##报告用印流程id
+#report_category_id: 2896237012158222343
+##审定内用印流程id
+#judgement_category_id: 2912238663717396786
+#审定单用印流程id(盐城)
+#approval_YC_category_id: 2933219658963918882
+#报告用印流程id(盐城)
+#report_YC_category_id: 2933233335469383748
+
+#192.168.2.6签章测试参数
+apptoken: uIJQmTwyGJ
+appsecret: 2NMBqFigKoInmd43Wohxv5aEDKiiHo
+signature: 232a44ee9ebd251d119f0a65628f678e
+
+signature_http_top: http://192.168.2.6:9182
+
+#竖版模板templateId
+vertical_templateId: 2894156236229259396
+#横板模板templateId
+across_templateId: 2894156210627227768
+#公司圆章
+company_round_seal_id: 2894161942659543252
+#公司圆章-竖
+company_round_seal_id_vertical: 2898043523878957918
+#公司方章
+company_parties_seal_id: 2894163220106129636
+#审定单用印流程id
+approval_category_id: 2895582833566102435
+#报告用印流程id
+report_category_id: 2895618951099527314
+##审定内用印流程id
+judgement_category_id: 2920938119742709765
+#审定单用印流程id(盐城)
+approval_YC_category_id: 2932214418853044239
+#报告用印流程id(盐城)
+report_YC_category_id: 2933233458312618324

+ 55 - 0
jeeplus-web/src/main/resources/application-production.yml

@@ -213,3 +213,58 @@ publicPassword: jsxgpassword
 
 #阿里云文件夹路径
 aliyun_directory: attachment-file/assess
+
+#apptoken: Mt4een4BN8
+#appsecret: qhA4aV2GKE8Oq8k4G3twLiUn4U60cN
+#signature: 19ed90930b5b84800ea582e34b71d1dd
+#
+#signature_http_top: http://121.40.158.10:9182
+#
+##竖版模板templateId
+#vertical_templateId: 2896237810850173018
+##横板模板templateId
+#across_templateId: 2896237585095954500
+##公司圆章
+#company_round_seal_id: 2895593387063378002
+##公司圆章-竖
+#company_round_seal_id_vertical: 2898042707446829376
+##公司方章
+#company_parties_seal_id: 2895597212998434929
+##审定单用印流程id
+#approval_category_id: 2895535120981852163
+##报告用印流程id
+#report_category_id: 2896237012158222343
+##审定内用印流程id
+#judgement_category_id: 2912238663717396786
+#审定单用印流程id(盐城)
+#approval_YC_category_id: 2933219658963918882
+#报告用印流程id(盐城)
+#report_YC_category_id: 2933233335469383748
+
+#192.168.2.6签章测试参数
+apptoken: uIJQmTwyGJ
+appsecret: 2NMBqFigKoInmd43Wohxv5aEDKiiHo
+signature: 232a44ee9ebd251d119f0a65628f678e
+
+signature_http_top: http://192.168.2.6:9182
+
+#竖版模板templateId
+vertical_templateId: 2894156236229259396
+#横板模板templateId
+across_templateId: 2894156210627227768
+#公司圆章
+company_round_seal_id: 2894161942659543252
+#公司圆章-竖
+company_round_seal_id_vertical: 2898043523878957918
+#公司方章
+company_parties_seal_id: 2894163220106129636
+#审定单用印流程id
+approval_category_id: 2895582833566102435
+#报告用印流程id
+report_category_id: 2895618951099527314
+##审定内用印流程id
+judgement_category_id: 2920938119742709765
+#审定单用印流程id(盐城)
+approval_YC_category_id: 2932214418853044239
+#报告用印流程id(盐城)
+report_YC_category_id: 2933233458312618324