zhuwei пре 1 месец
родитељ
комит
a4eef1b097
17 измењених фајлова са 351 додато и 241 уклоњено
  1. 2 2
      blade-common/src/main/java/org/springblade/common/utils/AsyncConfigurer.java
  2. 4 0
      blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/oss/AliOssBuilder.java
  3. 1 0
      blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/oss/OssBuilder.java
  4. 1 1
      blade-service-api/blade-e-visa-api/src/main/java/org/springblade/evisa/feign/EVisaClient.java
  5. 1 1
      blade-service-api/blade-e-visa-api/src/main/java/org/springblade/evisa/feign/EVisaClientFallBack.java
  6. 2 4
      blade-service/blade-archive/src/main/java/org/springblade/archive/service/impl/ArchiveExpertConclusionServiceImpl.java
  7. 2 2
      blade-service/blade-e-visa/src/main/java/org/springblade/evisa/feign/EVisaClientImpl.java
  8. 2 2
      blade-service/blade-e-visa/src/main/java/org/springblade/evisa/service/EVisaService.java
  9. 205 152
      blade-service/blade-e-visa/src/main/java/org/springblade/evisa/service/impl/EVisaServiceImpl.java
  10. 53 10
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java
  11. 10 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/formula/impl/ExecutorMeter.java
  12. 2 5
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java
  13. 3 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/utils/FileUtils.java
  14. 43 39
      blade-service/blade-meter/src/main/java/org/springblade/meter/controller/TaskController.java
  15. 10 19
      blade-service/blade-meter/src/main/java/org/springblade/meter/utils/CreateDashedLine.java
  16. 8 0
      blade-service/blade-meter/src/main/java/org/springblade/meter/utils/FileUtils.java
  17. 2 2
      blade-service/blade-meter/src/main/java/org/springblade/meter/utils/PdfAddimgUtil.java

+ 2 - 2
blade-common/src/main/java/org/springblade/common/utils/AsyncConfigurer.java

@@ -15,7 +15,7 @@ public class AsyncConfigurer {
     /**
      * cpu 核心数量
      */
-    public static final int cpuNum =6 ;//Runtime.getRuntime().availableProcessors();
+    public static final int cpuNum = 2 ;//Runtime.getRuntime().availableProcessors();
 
     /**
      * 线程池配置
@@ -24,7 +24,7 @@ public class AsyncConfigurer {
     @Bean("taskExecutor1")
     public ThreadPoolExecutor getAsyncExecutor() {
         return new ThreadPoolMonitor(cpuNum
-                , 10
+                , 3
                 , 30
                 , TimeUnit.SECONDS
                 , new LinkedBlockingQueue<>(2000)

+ 4 - 0
blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/oss/AliOssBuilder.java

@@ -21,9 +21,13 @@ import com.aliyun.oss.OSSClient;
 import com.aliyun.oss.common.auth.CredentialsProvider;
 import com.aliyun.oss.common.auth.DefaultCredentialProvider;
 import lombok.SneakyThrows;
+import org.springblade.core.oss.AliossTemplate;
+import org.springblade.core.oss.OssTemplate;
 import org.springblade.core.oss.props.OssProperties;
 import org.springblade.core.oss.rule.BladeOssRule;
+import org.springblade.core.oss.rule.OssRule;
 import org.springblade.resource.builder.ossre.AliossTemplateRe;
+import org.springblade.resource.builder.ossre.OssTemplateRe;
 import org.springblade.resource.entity.Oss;
 
 /**

+ 1 - 0
blade-ops/blade-resource/src/main/java/org/springblade/resource/builder/oss/OssBuilder.java

@@ -100,6 +100,7 @@ public class OssBuilder {
                     } else {
                         ossRule = new BladeOssRule(Boolean.FALSE);
                     }
+
                     //获取对象
                    if (oss.getCategory() == OssEnum.MINIO.getCategory()) {
                         template = MinioOssBuilder.template(oss, ossRule);

+ 1 - 1
blade-service-api/blade-e-visa-api/src/main/java/org/springblade/evisa/feign/EVisaClient.java

@@ -58,6 +58,6 @@ public interface EVisaClient {
      * 单张PDF批量电签,返回电签后的PDF
      */
     @PostMapping(API_PREFIX + "/batchEVisa")
-    R<String> batchEVisa(@RequestBody SigInfoVO vo);
+    R<String> batchEVisa(@RequestBody SealPdfVO pdfVO);
 
 }

+ 1 - 1
blade-service-api/blade-e-visa-api/src/main/java/org/springblade/evisa/feign/EVisaClientFallBack.java

@@ -48,7 +48,7 @@ public class EVisaClientFallBack implements FallbackFactory<EVisaClient> {
             }
 
             @Override
-            public R<String> batchEVisa(SigInfoVO vo){return R.fail("feign调用失败");}
+            public R<String> batchEVisa(SealPdfVO vo){return R.fail("feign调用失败");}
         };
     }
 }

+ 2 - 4
blade-service/blade-archive/src/main/java/org/springblade/archive/service/impl/ArchiveExpertConclusionServiceImpl.java

@@ -15,7 +15,6 @@ import org.apache.commons.lang.StringUtils;
 import org.springblade.archive.entity.ArchiveExpertConclusion;
 import org.springblade.archive.entity.ArchiveExpertScore;
 import org.springblade.archive.mapper.ArchiveExpertConclusionMapper;
-import org.springblade.archive.mapper.ArchiveExpertScoreMapper;
 import org.springblade.archive.service.IArchiveExpertConclusionService;
 import org.springblade.archive.service.IArchiveExpertScoreService;
 import org.springblade.archive.utils.ItextPdfUtils;
@@ -28,7 +27,6 @@ import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.evisa.feign.EVisaClient;
-import org.springblade.evisa.vo.SigInfoVO;
 import org.springblade.manager.entity.ProjectInfo;
 import org.springblade.manager.entity.SignPfxFile;
 import org.springblade.manager.feign.ProjectClient;
@@ -256,7 +254,7 @@ public class ArchiveExpertConclusionServiceImpl extends BaseServiceImpl<ArchiveE
             throw new ServiceException("生成PDF失败:"+e.getMessage());
         }
         //构建专家电签信息
-        SigInfoVO vo = new SigInfoVO();
+  /*      SigInfoVO vo = new SigInfoVO();
         List<SigInfoVO.SigInfo> infos = new ArrayList<>();
         for (User user : users) {
             SignPfxFile file = map.get(user.getId());
@@ -294,7 +292,7 @@ public class ArchiveExpertConclusionServiceImpl extends BaseServiceImpl<ArchiveE
         baseMapper.updateAllArchiveByProject(conclusion.getProjectId());
         //还原当前项目所有分配的树节点
         baseMapper.updateAllNodeByProject(conclusion.getProjectId());
-        this.updateById(conclusion);
+        this.updateById(conclusion);*/
     }
 
     private String buildPdf(ArchiveExpertConclusion conclusion,List<User> users) throws Exception {

+ 2 - 2
blade-service/blade-e-visa/src/main/java/org/springblade/evisa/feign/EVisaClientImpl.java

@@ -31,8 +31,8 @@ public class EVisaClientImpl implements EVisaClient {
     }
 
     @Override
-    public R<String> batchEVisa(SigInfoVO vo) {
-        return eVisaService.batchEVisa(vo);
+    public R<String> batchEVisa(SealPdfVO pdfVO) {
+        return eVisaService.batchEVisa(pdfVO);
     }
 
     @Override

+ 2 - 2
blade-service/blade-e-visa/src/main/java/org/springblade/evisa/service/EVisaService.java

@@ -4,7 +4,7 @@ import cfca.paperless.dto.bean.CertBean;
 import org.springblade.core.tool.api.R;
 import org.springblade.evisa.vo.EVisaMakeSealVO;
 import org.springblade.evisa.vo.EVisaTaskApprovalVO;
-import org.springblade.evisa.vo.SigInfoVO;
+import org.springblade.evisa.vo.SealPdfVO;
 
 import java.util.List;
 
@@ -43,6 +43,6 @@ public interface EVisaService {
     /**
      * 单张PDF批量电签,返回电签后的PDF
      */
-    R<String> batchEVisa(SigInfoVO vo);
+    R<String> batchEVisa(SealPdfVO pdfVO);
 
 }

+ 205 - 152
blade-service/blade-e-visa/src/main/java/org/springblade/evisa/service/impl/EVisaServiceImpl.java

@@ -59,10 +59,12 @@ import org.springblade.evisa.utils.PDFUtils;
 import org.springblade.evisa.vo.*;
 import org.springblade.manager.entity.ContractInfo;
 import org.springblade.manager.entity.SignPfxFile;
+import org.springblade.manager.entity.TextdictInfo;
 import org.springblade.manager.feign.ContractClient;
 import org.springblade.manager.feign.SignPfxClient;
 import org.springblade.resource.feign.NewIOSSClient;
 import org.springblade.system.cache.ParamCache;
+import org.springblade.system.user.entity.User;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
@@ -71,6 +73,7 @@ import org.springframework.http.converter.StringHttpMessageConverter;
 import org.springframework.jdbc.core.BeanPropertyRowMapper;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.mock.web.MockMultipartFile;
+import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Service;
 import org.springframework.web.client.RestTemplate;
 import org.springframework.web.multipart.MultipartFile;
@@ -82,6 +85,7 @@ import javax.imageio.metadata.IIOMetadataNode;
 import javax.imageio.stream.ImageOutputStream;
 import java.awt.image.BufferedImage;
 import java.io.*;
+import java.net.MalformedURLException;
 import java.net.URL;
 import java.nio.charset.StandardCharsets;
 import java.util.*;
@@ -1445,168 +1449,217 @@ public class EVisaServiceImpl implements EVisaService {
         }
     }
 
+   // @Scheduled(cron = "0/40 * * * * ?")
+    public void SignInfo() throws IOException {
+        //获取字节
+        String pdfUrl="/Users/hongchuangyanfa/Desktop/excel/TJ06标咨询意见单.pdf";
+        byte[] fileByte = IOUtils.toByteArray(new FileInputStream(new File(pdfUrl)));
+
+        SealPdfVO pdfVO = new SealPdfVO();
+        List<SealStrategyVO> sealStrategyVOS = new ArrayList<>();
+
+
+        String userId ="1794916072011603970";
+        SealStrategyVO vo = new SealStrategyVO();
+        vo.setSealCode(EVisaConstant.SIGN_SEAL_CODE + userId);
+
+        if(userId.length()<=EVisaConstant.USER_ID_SUB){
+            vo.setSealPassword(userId);
+        }else{
+            vo.setSealPassword(userId.substring(0, EVisaConstant.USER_ID_SUB));
+        }
+        vo.setSealPerson("谭立剑");
+        //设置签字文件
+        vo.setImageUrl("https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20240530/d935381e0ba7e9a7d97cbcebd2b25702.png");
+        vo.setSealType("3");
+        vo.setKeyword("1808342935356309504");
+
+        String userId2 ="1794914652935954434";
+        SealStrategyVO vo2 = new SealStrategyVO();
+        vo2.setSealCode(EVisaConstant.SIGN_SEAL_CODE + userId2);
+        if(userId2.length()<=EVisaConstant.USER_ID_SUB){
+            vo2.setSealPassword(userId2);
+        }else{
+            vo2.setSealPassword(userId2.substring(0, EVisaConstant.USER_ID_SUB));
+        }
+        vo2.setSealPerson("黎军丰");
+        //设置签字文件
+        vo2.setImageUrl("https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20240530/e7f435510f9b4dc7080d05d8d6061de6.png");
+        vo2.setSealType("3");
+        vo2.setKeyword("1808342935364698112");
+
+        String userId3 ="1794914652935954434";
+        SealStrategyVO vo3 = new SealStrategyVO();
+        vo3.setSealCode(EVisaConstant.SIGN_SEAL_CODE + userId3);
+        if(userId3.length()<=EVisaConstant.USER_ID_SUB){
+            vo3.setSealPassword(userId3);
+        }else{
+            vo3.setSealPassword(userId3.substring(0, EVisaConstant.USER_ID_SUB));
+        }
+        vo3.setSealPerson("李梦君");
+        //设置签字文件
+        vo3.setImageUrl("https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20240419/2a56ec080c61c812875f797658414de1.png");
+        vo3.setSealType("3");
+        vo3.setKeyword("1810847886083096576");
+
+        String userId4 ="104326754034";
+        SealStrategyVO vo4 = new SealStrategyVO();
+        vo3.setSealCode(EVisaConstant.SIGN_SEAL_CODE + userId4);
+        if(userId4.length()<=EVisaConstant.USER_ID_SUB){
+            vo4.setSealPassword(userId4);
+        }else{
+            vo4.setSealPassword(userId4.substring(0, EVisaConstant.USER_ID_SUB));
+        }
+        vo4.setSealPerson("王涛");
+        //设置签字文件
+        vo4.setImageUrl("https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20240419/0f6f989997036b9f4d3a3a288da96dcc.png");
+        vo4.setSealType("3");
+        vo4.setKeyword("1810847886083096576");
+
+        //设置签章策略
+        SealStrategyVO vo5 = new SealStrategyVO();
+        vo5.setSealCode(EVisaConstant.SIGN_SEAL_CODE + "1808350880450215936");
+        vo5.setSealPassword("123456");
+        vo5.setSealPerson("万邦工程管理咨询有限公司");
+        //设置签字文件
+        vo5.setImageUrl("http://183.247.216.148:9000//minio-oss-chongqing/upload/20240826/0726789415206b444d0bbe88840cf459.png");
+        vo5.setSealType("3");
+        vo5.setCompanySeal(true);
+        vo5.setKeyword("1808342935356309504");
+
+
+        // 6期
+
+        String userId6 ="1796388593051426817";
+        SealStrategyVO vo6 = new SealStrategyVO();
+        vo6.setSealCode(EVisaConstant.SIGN_SEAL_CODE + userId6);
+        if(userId6.length()<=EVisaConstant.USER_ID_SUB){
+            vo6.setSealPassword(userId6);
+        }else{
+            vo6.setSealPassword(userId6.substring(0, EVisaConstant.USER_ID_SUB));
+        }
+        vo6.setSealPerson("刘宝平");
+        //设置签字文件
+        vo6.setImageUrl("https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20240605/e234e767e38d3e0c84c81dffab7f3c19.png");
+        vo6.setSealType("3");
+        vo6.setKeyword("1808342935356309504");
+
+
+        String userId7 ="1796388092851314689";
+        SealStrategyVO vo7 = new SealStrategyVO();
+        vo7.setSealCode(EVisaConstant.SIGN_SEAL_CODE + userId7);
+        if(userId7.length()<=EVisaConstant.USER_ID_SUB){
+            vo7.setSealPassword(userId7);
+        }else{
+            vo7.setSealPassword(userId7.substring(0, EVisaConstant.USER_ID_SUB));
+        }
+        vo7.setSealPerson("李富生");
+        //设置签字文件
+        vo7.setImageUrl("https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20240531/d76792ab80aae67d5640d88813bd4175.png");
+        vo7.setSealType("3");
+        vo7.setKeyword("1808342935364698112");
+
+
+        String userId8 ="104326754036";
+        SealStrategyVO vo8 = new SealStrategyVO();
+        vo8.setSealCode(EVisaConstant.SIGN_SEAL_CODE + userId8);
+        if(userId8.length()<=EVisaConstant.USER_ID_SUB){
+            vo8.setSealPassword(userId8);
+        }else{
+            vo8.setSealPassword(userId8.substring(0, EVisaConstant.USER_ID_SUB));
+        }
+        vo8.setSealPerson("许利利");
+        //设置签字文件
+        vo8.setImageUrl("https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20240419/0ca5682ba89915e48b03676de4c1bc12.png");
+        vo8.setSealType("3");
+        vo8.setKeyword("1810847886083096576");
+
+        //设置签章策略
+        SealStrategyVO vo9 = new SealStrategyVO();
+        vo9.setSealCode(EVisaConstant.SIGN_SEAL_CODE + "1808351286031024128");
+        vo9.setSealPassword("123456");
+        vo9.setSealPerson("浙江同欣工程管理有限公司");
+        //设置签字文件
+        vo9.setImageUrl("https://blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20240703/b40c2907e1cc4549a0f18df1504382ef.png");
+        vo9.setSealType("3");
+        vo9.setCompanySeal(true);
+        vo9.setKeyword("1808342935377281024");
+        //sealStrategyVOS.add(vo);
+       // sealStrategyVOS.add(vo2);
+        //sealStrategyVOS.add(vo3);
+        // 3期
+       // sealStrategyVOS.add(vo4);
+        // 6期
+        sealStrategyVOS.add(vo6);
+        sealStrategyVOS.add(vo7);
+        sealStrategyVOS.add(vo8);
+        sealStrategyVOS.add(vo9);
+
+        pdfVO.setStrategyVoList(sealStrategyVOS);
+        Object[] result = this.signPdfByAXQZ(pdfVO, fileByte);
+        if (result != null) {
+            if (result[0] != null) {
+                MultipartFile newFiles = null;
+                try {
+                    newFiles = new MockMultipartFile("file", SnowFlakeUtil.getId() + ".pdf", ContentType.APPLICATION_OCTET_STREAM.toString(), IOUtils.toByteArray(new ByteArrayInputStream((byte[]) result[0])));
+                } catch (IOException e) {
+                    throw new RuntimeException(e);
+                }
+                //重新上传
+                BladeFile bladeFile = this.newIOSSClient.uploadFileByInputStream(newFiles);
+
+                System.out.println(bladeFile.getLink());
+
+            } else {
+            }
+        } else {
+        }
+
+    }
     /**
      *      单张PDF批量电签,返回电签后的PDF
-     * @param vo
+     * @param
      * @return
      */
     @Override
-    public R<String> batchEVisa(SigInfoVO vo) {
+    public R<String> batchEVisa(SealPdfVO pdfVO) {
+        //获取字节
+        URL url = null;
         try {
-            List<SigInfoVO.SigInfo> list = vo.getList();
-            String pdfUrl = vo.getPdfUrl();
-
-            for (SigInfoVO.SigInfo sigInfo : list) {
-                pdfUrl = myDoWork(sigInfo, pdfUrl);
-            }
-            return R.data(pdfUrl);
-        }catch (Exception e){
-            return R.fail(e.getMessage());
+            String fileUrl = CommonUtil.replaceOssUrl(pdfVO.getPdfFileUrl());
+            url = new URL(fileUrl);
+        } catch (MalformedURLException e) {
+            throw new RuntimeException(e);
         }
-    }
-    public String myDoWork(SigInfoVO.SigInfo sig,String pdfUrl) throws Exception {
-
-        PaperlessClient paperlessClient = new PaperlessClient(SIGN_HOST, SIGN_PORT, 300000, 1800000);
-
-        paperlessClient.setSSL(false);
-        /*******************************************************************************/
-        SealPdfRequest sealPdfRequest = new SealPdfRequest();
-        RequestHead requestHead = new RequestHead();
-        String transactionNo = GUIDUtil.generateId();
-        //机构编码非空
-        String organizationCode = EVisaConstant.organizationCode;
-        //操作员编码 可为空
-        String operatorCode = "";
-        //渠道编码 可为空
-        String channelCode = "";
-        //设置属性
-        requestHead.setBasicInfo(transactionNo, organizationCode,operatorCode,channelCode);
-
-        sealPdfRequest.setHead(requestHead);
-        /*******************************************************************************/
-        SealPdfRequestBody requestBody = new SealPdfRequestBody();
-        //待签章文件
-        byte[] pdfData = CommonUtil.InputStreamToBytes(CommonUtil.getOSSInputStream(pdfUrl));
-        // 数据源类型 1 pdf文件路径 2 pdf文件字节流
-        String inputType = BaseConstants.INPUT_TYPE_FILEDATA;
-        //设置数据源,数据源类型为2时,为空,数据源类型为1时,上送数据源路径(服务器可以访问到的文件路径)
-        requestBody.setInputSource("");
-        //数据源类型
-        requestBody.setInputType(inputType);
-        //数据源为2时,需上送 pdf文件数据
-        requestBody.setPdfData(pdfData);
-        //签章后文件保存地址,不为空时,直接将签章文件保存在此地址,不再返回签章后文档数据
-        requestBody.setOutputFilepath("");
-        //时间戳方式,默认为0;0:实时访问CFCA 时间戳服务;1:使用从CFCA购置并在本地部署的时间戳服务器产品;
-        requestBody.setTimestampChannel(BaseConstants.TIME_STAMP_CHANNEL_CFCA);
-
-        /************************ ②-2.构造机构章策略 *********************************************/
-        SealStrategy sealStrategy = myGenerateSealStrategy(sig);
-
-        requestBody.setSealStrategy(sealStrategy);
-
-        sealPdfRequest.setBody(requestBody);
-
-        /************************请求签章 ********************************************/
-        ResponseDto responseDto = paperlessClient.execute(sealPdfRequest);
-
-        /************************解析响应结果 *********************************************/
-
-        SealPdfResponse sealPdfResponse = (SealPdfResponse)responseDto;
-
-        ResponseHead responseHead = sealPdfResponse.getHead();
-        SealPdfResponseBody responseBody = sealPdfResponse.getBody();
-        String resultOutputFilepath = "";
-        if(ClientConstants.CODE_SUCCESS.equals(responseHead.getCode())){
-
-            resultOutputFilepath = responseBody.getOutputFilepath();
-
-            byte[] pdf = responseBody.getPdf();
-            System.out.println(pdf == null ? 0 : pdf.length);
-
-            String resultPdfFileDataHash = responseBody.getPdfFileDataHash();
-            System.out.println("resultPdfFileDataHash=" + resultPdfFileDataHash);
-
-            if(cfca.paperless.base.util.StringUtil.isNotEmpty(resultOutputFilepath)) {
-                System.out.println("文件已输出到:"+ resultOutputFilepath);
-            } else {
-                Random random = new Random();
-                int i = random.nextInt(100000);
-                String pdfFile = FileUtils.getSysLocalFileUrl() + "/archiveCheck/" + i +".pdf";
-                resultOutputFilepath = pdfFile;
-                IoUtil.write(resultOutputFilepath, pdf);
-                System.out.println("文件已输出到:"+ resultOutputFilepath );
-                BladeFile bladeFile = newIOSSClient.uploadFile("aa.pdf",pdfFile);
-                if (bladeFile == null || StringUtils.isBlank(bladeFile.getLink())){
-                    throw new ServiceException("上传阿里云失败");
+        byte[] fileByte;
+        try {
+            fileByte = IOUtils.toByteArray(url);
+        } catch (Exception e) {
+            return null;
+        }
+        //执行电签
+        Object[] result = this.signPdfByAXQZ(pdfVO, fileByte);
+        if (result != null) {
+            if (result[0] != null) {
+                MultipartFile newFiles = null;
+                try {
+                    newFiles = new MockMultipartFile("file", SnowFlakeUtil.getId() + ".pdf", ContentType.APPLICATION_OCTET_STREAM.toString(), IOUtils.toByteArray(new ByteArrayInputStream((byte[]) result[0])));
+                } catch (IOException e) {
+                    throw new RuntimeException(e);
                 }
-                resultOutputFilepath = bladeFile.getLink();
-            }
+                //重新上传
+                BladeFile bladeFile = this.newIOSSClient.uploadFileByInputStream(newFiles);
 
+                if (bladeFile != null) {
+                    return R.data(bladeFile.getLink());
+                } else {
+                    return R.data(bladeFile.getLink());
+                }
+            } else {
+                return R.fail("无法获取pdf路径");
+            }
         } else {
-            throw new ServiceException(" NG,Code:"+responseHead.getCode()+",Message:"+responseHead.getMessage());
+            return R.fail("电签解析失败");
         }
-
-        return resultOutputFilepath;
-    }
-    public SealStrategy  myGenerateSealStrategy(SigInfoVO.SigInfo sig) throws Exception{
-
-        String type = BaseConstants.SEAL_TYPE_IMAGE;
-        String sealCode = sig.getSealCode();
-        String sealPassword = PwdEncryptUtil.encrypto(sig.getSealPassword());
-        SealStrategy  sealStrategy = new SealStrategy();
-        sealStrategy.setSealInfo(type, sealCode, sealPassword);
-
-        String pngFilePath = sig.getSigPic();
-        //外传图片
-        byte[] imageData = CommonUtil.InputStreamToBytes(CommonUtil.getOSSInputStream(pngFilePath));
-        //图片进行Base64编码/
-        String imageDataString =  new String(Base64.encode(imageData), StandardCharsets.UTF_8);
-        sealStrategy.setSealImage(imageDataString);
-        //算法,非空
-        String hashAlg = BaseConstants.HASHALG_SM3;
-        sealStrategy.setHashAlg(hashAlg);
-        //透明度,0-1.0f,默认1.0f,不透明
-        String fillOpacity = "1";
-        sealStrategy.setFillOpacity(fillOpacity);
-        //是否显示,默认1 显示
-        String visible = "1";
-        sealStrategy.setVisible(visible);
-        //签章图片显示尺寸  单位毫米  默认为图片本身尺寸
-        //签章图片显示尺寸,单位毫米;如果是圆形,则为半径实际尺寸;如果是矩形,则为较长的一边的实际尺寸;如果是不规则图形,则为较长的一边的实际尺寸
-        String displaySize = "50";
-        sealStrategy.setDisplaySize(displaySize);
-        // 业务码 businessCode ,businessCode为空,则不添加业务码,业务码相关属性都不需要设置
-        //业务码内容
-        String businessCode = "";
-        // 业务码字体大小,默认12,可以为空
-        String businessFontSize = "20";
-        //以图片底部为起点,向上占图片百分之多少的位置开始显示业务码,默认0.5
-        String textRectHeightPercent = "0.5";
-        //颜色值,默认黑色 000000
-        String businessColor = "FF0000";
-        //字体,默认宋体,可以为空
-        String bussinessFamily = "";
-        // 业务码  end
-        sealStrategy.setBusinessInfo(businessCode, businessFontSize, textRectHeightPercent, businessColor, bussinessFamily);
-        // 签章杂项信息
-        //签章人姓名,必填
-        String sealPerson = sig.getUserName();
-        //签章地点,可以为空
-        String sealLocation = "";
-        //签章原因,可以为空
-        String sealReason = "";
-        sealStrategy.setSealMiscInfo(sealPerson, sealLocation, sealReason);
-        /************************关键字签章****************************************************/
-        //关键字
-        String keyword =sig.getUserSig();
-        //x轴偏移,默认0
-        String offSetX = "0";
-        //y轴偏移,默认0
-        String offSetY = "0";
-        sealStrategy.setSignWithKeywordInfo(keyword, offSetX, offSetY);
-        return sealStrategy;
     }
-
-
 }

+ 53 - 10
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java

@@ -21,6 +21,9 @@ import lombok.SneakyThrows;
 import org.apache.commons.codec.Charsets;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang3.ObjectUtils;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.IndexedColors;
+import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.ss.usermodel.WorkbookFactory;
 import org.jsoup.Jsoup;
 import org.jsoup.nodes.Document;
@@ -4102,10 +4105,10 @@ public class ExcelTabController extends BladeController {
     }
 
 
-    @Scheduled(cron = "0/20 * * * * ?")
+   // @Scheduled(cron = "0/20 * * * * ?")
     public void HtmlCope() {
         //执行代码
-        String sql = "SELECT * from m_wbs_tree_contract where p_key_id=1789131196718907437" ;
+        String sql = "SELECT * from m_wbs_tree_private_0425 where project_id=1750070685257990145 and wbs_id=1745384228667129857 and type =2 and is_deleted=0 LIMIT 200" ;
         List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql);
         if (maps != null && maps.size() >= 1) {
             for (Map<String, Object> dataInfo : maps) {
@@ -4133,16 +4136,58 @@ public class ExcelTabController extends BladeController {
     }
 
     public void checkHtmlCope (Map < String, Object > dataInfo) throws Exception {
+
         String pkey_id = dataInfo.get("p_key_id")+"";
+        String sql = "update m_wbs_tree_private_0425 set is_deleted=1 where p_key_id='"+pkey_id+"'";
+        jdbcTemplate.execute(sql);
         String Html1 = dataInfo.get("html_url")+"";
+        String fileName = Html1.substring(Html1.lastIndexOf("/")+1,Html1.length());
+        String Html2 = Html1.replaceAll("privateUrl", "/privateUrlCopy/1795277868551389185/").replaceAll("//","/");
+        String Html3 = Html1.replaceAll("privateUrl", "/privateUrlCopy/1792760669353865218/").replaceAll("//","/");
         String url183= "http://183.247.216.148:22776/";
-        String local183 = "/home/www/wwwroot/Users/hongchuangyanfa/Desktop/";
-        String s1 = Html1.replaceAll(local183, url183);
-        InputStream stream1 = getOSSInputStream2(s1);
+        String local183 = "/www/wwwroot/Users/hongchuangyanfa/Desktop/";
+        if(Html1.indexOf("/home/")>=0){
+            local183 = "/home/www/wwwroot/Users/hongchuangyanfa/Desktop/";
+       }
+        String url210= "http://fileinfo.hczcxx.cn/";
+        String local210 = "/www/wwwroot/Users/hongchuangyanfa/Desktop/";
+        String saveUrl = "/Users/hongchuangyanfa/Desktop/privateUrl/"+fileName;
+
+        // 先判断 基础路径是否存在
+        String file1 =  Html1.replaceAll(local183,url183);
+        String file2 =  Html2.replaceAll(local183,url183);
+        String file3 =  Html3.replaceAll(local183,url183);
+        String file4 =  Html1.replaceAll(local210,url210).replace("/home","");
+        String file5 =  Html2.replaceAll(local210,url210).replace("/home","");
+        String file6 =  Html3.replaceAll(local210,url210).replace("/home","");
+
+        List<String> dataUrl = new ArrayList<>();
+        dataUrl.add(file2);
+        dataUrl.add(file3);
+      //  dataUrl.add(file4);
+      //  dataUrl.add(file5);
+      //  dataUrl.add(file6);
+        InputStream stream1 = getOSSInputStream2(file1);
+        System.out.println(fileName);
         if(stream1==null){
-
-        }else{
-            System.out.println("成功!");
+            String sql2 = "update m_wbs_tree_private_0425 set is_deleted=5 where p_key_id='"+pkey_id+"'";
+            jdbcTemplate.execute(sql2);
+
+            for(String fileUrl:dataUrl){
+                InputStream str = getOSSInputStream2(fileUrl);
+                if(str!=null){
+                    OutputStream outputStream = new FileOutputStream(saveUrl);
+                    byte[] bytes = CommonUtil.InputStreamToBytes(str);
+                    outputStream.write(bytes);
+
+                    if (outputStream != null) {
+                        outputStream.close();
+                    }
+                    String sql3 = "update m_wbs_tree_private_0425 set is_deleted=2 where p_key_id='"+pkey_id+"'";
+                    jdbcTemplate.execute(sql3);
+                    return;
+                }
+            }
         }
 
 
@@ -4156,8 +4201,6 @@ public class ExcelTabController extends BladeController {
         try {
             return conn.getInputStream();
         } catch (Exception e){
-            System.out.println("zw-----------");
-            e.printStackTrace();
             return null;
         }
     }

+ 10 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/formula/impl/ExecutorMeter.java

@@ -1156,7 +1156,10 @@ public class ExecutorMeter extends FormulaExecutor {
                      addGetSetConfig(hj,InterimPaymentCertificate::getCurrentPeriodPay,hj::setCurrentPeriodPay);
                      payItemZj.add(hj);
                      payItemZj.add(new InterimPaymentCertificate("索赔金额",MINUS_ONE));
-                     payItemZj.add(new InterimPaymentCertificate("违约罚金",MINUS_ONE));
+                     InterimPaymentCertificate wyje = new InterimPaymentCertificate("违约罚金",MINUS_ONE);
+                     wyje.setNoApply(1);
+                     payItemZj.add(wyje);
+                    // payItemZj.add(new InterimPaymentCertificate("违约罚金",MINUS_ONE));
                      payItemZj.add(new InterimPaymentCertificate("迟付款利息"));
                      InterimPaymentCertificate startPay =new InterimPaymentCertificate("动员预付款");
                      /*startPay.setContractAmount(StringUtils.handleNull(tec.meterInfo.getBaseInfo().getDyTotalAmount()));*/
@@ -1297,6 +1300,12 @@ public class ExecutorMeter extends FormulaExecutor {
                              certificate.setCurrentPeriodEndPay(rebateIncentiveAdvPay.getEndPay());
                              certificate.setCurrentPeriodPay(rebateIncentiveAdvPay.getCurrentPay());
                              certificate.setPreviousPeriodEndPay(rebateIncentiveAdvPay.getPreviousPay());
+                         }else if("违约罚金".equals(certificate.getChapterSeq())){
+                             certificate.setCurrentPeriodPay(ic.getCurrentPeriodPay());
+                             ic.setPreviousPeriodEndPay(icPre.getCurrentPeriodEndPay());
+                             ic.setCurrentPeriodEndPay(addFc.apply(ic.getCurrentPeriodPay(),ic.getPreviousPeriodEndPay()));
+                             certificate.setPreviousPeriodEndPay(ic.getPreviousPeriodEndPay());
+                             certificate.setCurrentPeriodEndPay(ic.getCurrentPeriodEndPay());
                          }else if("返回保留金".equals(certificate.getChapterSeq())){
                              certificate.setCurrentPeriodPay(ic.getCurrentPeriodPay());
                              ic.setPreviousPeriodEndPay(icPre.getCurrentPeriodEndPay());

+ 2 - 5
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java

@@ -1635,8 +1635,6 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
 
         String querySql = "select * from " + wbsTreeContract.getInitTableName() + " where p_key_id=" + pkeyId;
 
-
-        //String querySql = "select * from table_data_info where p_key_id=" + pkeyId;
         List<Map<String, Object>> dataIn = jdbcTemplate.queryForList(querySql);
 
         // 匹配关联
@@ -1757,7 +1755,6 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                     }
                 }
             }
-
             //电签默认值
             if (defText.size() >= 1) {
                 for (Element element : defText) {
@@ -1843,7 +1840,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         }
 
         // 获取默认值
-        QueryWrapper<TextdictInfo> queryWrapper = new QueryWrapper<>();
+/*        QueryWrapper<TextdictInfo> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq("type", 4);
         queryWrapper.eq("tab_id", wbsTreeContract.getIsTypePrivatePid());
         final List<TextdictInfo> textdictInfos = textdictInfoService.getBaseMapper().selectList(queryWrapper);
@@ -1855,7 +1852,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                     reData.put(textdictInfo.getColKey() + "", textdictInfo.getSigRoleName());
                 }
             }
-        }
+        }*/
 
         // 移除Id 和 p_key_id
         if (type == 0) {

+ 3 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/utils/FileUtils.java

@@ -535,8 +535,10 @@ public class FileUtils {
                 file_path = "C://upload//";
             }
         }else if(sys_isonline.equals("20")){ //183
-            if (SystemUtils.isMacOs()) {
+            if (SystemUtils.isLinux()) {
                 file_path = "/home/www/wwwroot/Users/hongchuangyanfa/Desktop/";
+            }else if (SystemUtils.isMacOs()) {
+                file_path = "/Users/hongchuangyanfa/Desktop/";
             } else if (SystemUtils.isWindows()) {
                 file_path = "C://upload//";
             }

+ 43 - 39
blade-service/blade-meter/src/main/java/org/springblade/meter/controller/TaskController.java

@@ -7,13 +7,11 @@ import com.alibaba.fastjson.JSONObject;
 import com.aspose.cells.PageSetup;
 import com.aspose.cells.SaveFormat;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
@@ -25,7 +23,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
-import javassist.bytecode.stackmap.BasicBlock;
 import lombok.AllArgsConstructor;
 import lombok.Data;
 import net.logstash.logback.encoder.org.apache.commons.lang3.ObjectUtils;
@@ -45,24 +42,24 @@ import org.springblade.business.entity.*;
 import org.springblade.business.feign.TaskClient;
 import org.springblade.common.constant.ClientIdConstant;
 import org.springblade.common.constant.CommonConstant;
+import org.springblade.common.constant.EVisaConstant;
 import org.springblade.common.utils.BaseUtils;
 import org.springblade.common.utils.CommonUtil;
 import org.springblade.common.utils.SnowFlakeUtil;
-import org.springblade.common.utils.SystemUtils;
 import org.springblade.common.vo.DataVO;
 import org.springblade.core.boot.ctrl.BladeController;
 import org.springblade.core.log.exception.ServiceException;
 import org.springblade.core.mp.base.BaseService;
 import org.springblade.core.oss.model.BladeFile;
 import org.springblade.core.redis.cache.BladeRedis;
-import org.springblade.core.secure.BladeUser;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.secure.utils.SecureUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.*;
 import org.springblade.core.tool.utils.DateUtil;
 import org.springblade.evisa.feign.EVisaClient;
-import org.springblade.evisa.vo.SigInfoVO;
+import org.springblade.evisa.vo.SealPdfVO;
+import org.springblade.evisa.vo.SealStrategyVO;
 import org.springblade.feign.ArchiveFileTaskClient;
 import org.springblade.manager.entity.*;
 import org.springblade.manager.feign.*;
@@ -73,7 +70,6 @@ import org.springblade.meter.config.MyJdbcTemplate;
 import org.springblade.meter.dto.*;
 import org.springblade.meter.entity.*;
 import org.springblade.meter.mapper.*;
-import org.springblade.meter.service.IContractMeterPeriodService;
 import org.springblade.meter.service.IInterimPayCertificateService;
 import org.springblade.meter.service.IMaterialStartStatementService;
 import org.springblade.meter.service.ITaskRepealMessageService;
@@ -111,8 +107,6 @@ import java.util.function.Function;
 import java.util.regex.Matcher;
 import java.util.stream.Collectors;
 
-import static org.bouncycastle.asn1.x500.style.RFC4519Style.*;
-
 @RestController
 @AllArgsConstructor
 @RequestMapping("/task")
@@ -3862,7 +3856,7 @@ public class TaskController extends BladeController {
                             String url = "无效链接";
                             try {
                                 if(rs.getPkeyId() == 1760845593422331904l){
-
+                                    System.out.println("zw+1===="+local);
                                     Map<String, Object> dataMap = rs.getData().get(0);
                                     // key_39 实际
                                     String key39= rs.getCoordinateMap().get("key_39");
@@ -4081,12 +4075,15 @@ public class TaskController extends BladeController {
         try {
             // 修改个人电签状态
             String UPSql = "update u_task_parallel a set a.e_visa_status=null,e_visa_content=null where a.process_instance_id = (select b.process_instance_id from u_task b where  b.`status` in(1,2) and b.form_data_id=" + report.getPeriodId() +  ") ";
-            String DeSql = "delete from u_task_batch where task_parallel_id = (select b.process_instance_id from u_task b where b.`status` in(1,2) and b.form_data_id=" + report.getPeriodId()  + ")";
+            String UPSqlJL = " update u_task_parallel a set a.e_visa_status=1,e_visa_content='电签成功' where sort in( SELECT a.fixed_flow_branch_sort from u_task b,u_fixed_flow_link a where b.`status` in(1,2) and b.form_data_id='"+report.getPeriodId()+"' and a.fixed_flow_id=b.fixed_flow_id and a.flow_task_type=2 ) and a.process_instance_id in(SELECT process_instance_id from u_task b where b.`status` in(1,2) and b.form_data_id='"+report.getPeriodId()+"')";
+            String DeSql = "delete from u_task_batch where task_parallel_id in(select b.process_instance_id from u_task b where b.`status` in(1,2) and b.form_data_id=" + report.getPeriodId()  + ")";
             //删除以前存在的电签
-            String sql = " insert INTO u_task_batch(id,task_parallel_id,json_data,create_user,create_dept,create_time,update_user,update_time,status,is_deleted,nick_name) " + " SELECT a.id,a.process_instance_id,json_object('approvalFileList',json_array(),'approvalType',b.approval_type,'comment','','flag','OK','formDataId',b.form_data_id,'parallelProcessInstanceId',a.parallel_process_instance_id,'pass',true,'taskId',b.id) as  json_data,a.task_user,a.create_dept,a.create_time,a.update_user,a.update_time,1 as status,0 as is_deleted,a.task_user_name as nick_name " + " from u_task_parallel a,u_task b where b.`status` in(1,2) and  a.process_instance_id=b.process_instance_id and b.form_data_id= '" + report.getPeriodId()+"'";
+            String sql = " insert INTO u_task_batch(id,task_parallel_id,json_data,create_user,create_dept,create_time,update_user,update_time,status,is_deleted,nick_name) " + " SELECT a.id,a.process_instance_id,json_object('approvalFileList',json_array(),'approvalType',b.approval_type,'comment','','flag','OK','formDataId',b.form_data_id,'parallelProcessInstanceId',a.parallel_process_instance_id,'pass',true,'taskId',b.id) as  json_data,a.task_user,a.create_dept,a.create_time,a.update_user,a.update_time,1 as status,0 as is_deleted,a.task_user_name as nick_name " + " from u_task_parallel a,u_task b,u_fixed_flow_link c where b.`status` in(1,2) and  a.process_instance_id=b.process_instance_id and c.flow_task_type!=2 and a.sort = c.fixed_flow_branch_sort and c.fixed_flow_id=b.fixed_flow_id and b.form_data_id= '" + report.getPeriodId()+"'";
+
             jdbcTemplate.execute(DeSql);
             jdbcTemplate.execute(UPSql);
             jdbcTemplate.execute(sql);
+            jdbcTemplate.execute(UPSqlJL);
         } catch (Exception e) {
             StaticLog.error(e.getMessage());
         }
@@ -4700,8 +4697,6 @@ public class TaskController extends BladeController {
                                 newStyle.setFont(redFont);
                                 cell.setCellStyle(newStyle);
                                 String sig = htmlDeptIdMap.get(e.getId());
-//                                String other = StringUtils.isBlank(cell.getStringCellValue())?"":cell.getStringCellValue();
-//                                cell.setCellValue(sig+","+other);
                                 cell.setCellValue(sig);
                             } else {
                                 ObjectUtils.isNotEmpty(cell);
@@ -4714,12 +4709,11 @@ public class TaskController extends BladeController {
 
         //输出流
         FileOutputStream outputStream = new FileOutputStream(excelPath);
-
         workbook.write(outputStream);
-
         FileUtils.setExcelScaleToPdf(excelPath, pdfPath);
         BladeFile bladeFile = newIOSSClient.uploadFile(pkeyId + ".pdf", pdfPath);
         System.out.println("----------------------处理证书---------------------------");
+        //开始调用电签
         if (bladeFile != null) {
             //获取所有专家个人证书
             List<SignPfxFile> list = jdbcTemplate.query(" select * from m_sign_pfx_file where is_deleted = 0  and certificate_user_id in (" + sigUser.stream().map(User::getId).distinct().map(Objects::toString).collect(Collectors.joining(",")) + ")", new BeanPropertyRowMapper<>(SignPfxFile.class));
@@ -4727,23 +4721,27 @@ public class TaskController extends BladeController {
                 throw new ServiceException("有签字人没有配置电签,请联系管理员");
             }
             Map<Long, SignPfxFile> map = list.stream().collect(Collectors.toMap(l -> l.getCertificateUserId(), l -> l));
-            SigInfoVO vo = new SigInfoVO();
-            List<SigInfoVO.SigInfo> infos = new ArrayList<>();
+            List<SealStrategyVO> sealStrategyVOS = new ArrayList<>();
             for (User user : sigUser) {
                 SignPfxFile file = map.get(user.getId());
                 if (file == null) {
                     throw new ServiceException("未获取到专家:" + user.getName() + "的电签信息");
                 }
-                SigInfoVO.SigInfo info = new SigInfoVO.SigInfo();
-                info.setUserName(user.getName());
-                info.setUserSig(user.getName() + user.getPhone().substring(0, 3));
-                info.setSealCode("S_NEW_" + file.getCertificatePassword());
-                info.setSealPassword(file.getCertificatePassword());
-                if (StringUtils.isBlank(file.getSignatureFileUrl())) {
-                    throw new ServiceException("未获取到专家:" + user.getName() + "的签字图片");
+
+                SealStrategyVO vo = new SealStrategyVO();
+                vo.setSealCode(EVisaConstant.SIGN_SEAL_CODE + user.getId());
+
+                if(user.getId().toString().length()<=EVisaConstant.USER_ID_SUB){
+                    vo.setSealPassword(user.getId()+"");
+                }else{
+                    vo.setSealPassword(user.getId().toString().substring(0, EVisaConstant.USER_ID_SUB));
                 }
-                info.setSigPic(file.getSignatureFileUrl());
-                infos.add(info);
+                vo.setSealPerson(file.getCertificateUserName());
+                //设置签字文件
+                vo.setImageUrl(file.getSignatureFileUrl());
+                vo.setSealType("3");
+                vo.setKeyword(user.getName() + user.getPhone().substring(0, 3));
+                sealStrategyVOS.add(vo);
             }
             //如果存在配置企业电签,则需要获取企业证书
             if (companyList.size() > 0) {
@@ -4760,27 +4758,33 @@ public class TaskController extends BladeController {
                     if (StringUtils.isBlank(file.getSignatureFileUrl())) {
                         throw new ServiceException("未获取到:" + textdictInfo.getSigRoleName() + "的签字图片");
                     }
-                    SigInfoVO.SigInfo info = new SigInfoVO.SigInfo();
-                    info.setUserName(file.getCertificateUserName());
-                    info.setUserSig(textdictInfo.getSigRoleName() + "123");
-                    info.setSealCode("S_NEW_" + file.getId());
-                    info.setSealPassword(file.getCertificatePassword());
-                    info.setSigPic(file.getSignatureFileUrl());
-                    infos.add(info);
+
+                    //设置签章策略
+                    SealStrategyVO vo = new SealStrategyVO();
+                    vo.setSealCode(EVisaConstant.SIGN_SEAL_CODE + file.getId());
+                    vo.setSealPassword(file.getCertificatePassword());
+                    vo.setSealPerson(file.getCertificateUserName() + "" + System.currentTimeMillis());
+                    //设置签字文件
+                    vo.setImageUrl(file.getSignatureFileUrl());
+                    vo.setSealType("3");
+                    vo.setCompanySeal(true);
+                    vo.setKeyword(textdictInfo.getSigRoleName() + "123");
+                    sealStrategyVOS.add(vo);
                 }
             }
 
-            vo.setList(infos);
-            vo.setPdfUrl(bladeFile.getLink());
-            R<String> r1 = eVisaClient.batchEVisa(vo);
+            SealPdfVO pdfVO = new SealPdfVO();
+            pdfVO.setPdfFileUrl(bladeFile.getLink());
+            pdfVO.setStrategyVoList(sealStrategyVOS);
+
+            R<String> r1 = eVisaClient.batchEVisa(pdfVO);
             if (r1.getCode() != 200 || StringUtils.isBlank(r1.getData())) {
                 throw new ServiceException("咨询意见PDF电签时失败:" + r1.getMsg());
             }
             return r1.getData();
-        } else {
+        }else {
             throw new ServiceException("生成咨询意见PDF时失败");
         }
-
     }
 
     public Map<String, Object> getBussDataInfo(WbsTreePrivate aPrivate, Long taskId) {

+ 10 - 19
blade-service/blade-meter/src/main/java/org/springblade/meter/utils/CreateDashedLine.java

@@ -22,23 +22,12 @@ public class CreateDashedLine {
 /*    public static void main(String[] args) throws Exception {
         // 获取值的坐标
         List<String> s_data = new java.util.ArrayList<>();
-        s_data.add("0.01");
-        s_data.add("0.076");
-        s_data.add("1.08");
-        s_data.add("1.28");
-        s_data.add("2.76");
-        s_data.add("3.56");
-        s_data.add("4.8");
-        s_data.add("5.88");
-        s_data.add("7.46");
-        s_data.add("10.38");
-        s_data.add("13.85");
-        s_data.add("17.54");
-        s_data.add("22.88");
-        s_data.add("27.94");
-        String pdfUrl = "/Users/hongchuangyanfa/Desktop/excel/【2-4】施工进度表.pdf";
-
-        getPDFInfo(pdfUrl,s_data);
+        s_data.add("0.89");
+        s_data.add("100");
+
+        String pdfUrl = "/Users/hongchuangyanfa/fsdownload/1750756833940807682_01760474080491864064.pdf";
+
+        getPDFInfo(pdfUrl,s_data,"2");
 
         System.out.println("");
     }*/
@@ -99,7 +88,7 @@ public class CreateDashedLine {
                         break;
                     }
                     float[] postions = listData.get(positionIndex);
-                    if((postions[1]==bf_x || Math.abs(postions[1]-bf_x)<=0.002) && postions[2]>bf_y){
+                    if((postions[1]==bf_x || Math.abs(postions[1]-bf_x)<=0.01) && postions[2]>bf_y){
                         data.put(key,postions);
                         bf_y =postions[2];
                         break;
@@ -154,7 +143,9 @@ public class CreateDashedLine {
                 String da2 = floor.intValue()+"";
                 float add = (float) ((Func.toDouble(sval)-floor ) * oney);
                 float[] floats1 = data.get(da2);
-                points.add( pageHeight- pageHeight * (floats1[2])+add);
+                float daa = pageHeight - pageHeight * (floats1[2]) + add;
+                System.out.println("zw+__"+daa);
+                points.add(daa);
             }
         }
         PDFFill(points,pdfUrl,type);

+ 8 - 0
blade-service/blade-meter/src/main/java/org/springblade/meter/utils/FileUtils.java

@@ -163,6 +163,14 @@ public class FileUtils {
             } else if (SystemUtils.isWindows()) {
                 file_path = "C://upload//";
             }
+        }else if(sys_isonline.equals("20")){ //183
+            if (SystemUtils.isLinux()) {
+                file_path = "/home/www/wwwroot/Users/hongchuangyanfa/Desktop/";
+            }else if (SystemUtils.isMacOs()) {
+                file_path = "/Users/hongchuangyanfa/Desktop/";
+            } else if (SystemUtils.isWindows()) {
+                file_path = "C://upload//";
+            }
         }else{  //本地环境
             if (SystemUtils.isMacOs()) {
                 file_path = "/Users/hongchuangyanfa/Desktop/";

+ 2 - 2
blade-service/blade-meter/src/main/java/org/springblade/meter/utils/PdfAddimgUtil.java

@@ -67,6 +67,7 @@ public class PdfAddimgUtil {
 
     public static void gaizhang(File src, File dest, int page, float x, float y, String imagePath,float pyzbx,float pyzby,String type) throws Exception {
         // 读取模板文件
+        String sysLocalFileUrl = FileUtils.getSysLocalFileUrl();
         InputStream input = new FileInputStream(src);
         PdfReader reader = new PdfReader(input);
         PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(dest));
@@ -76,7 +77,7 @@ public class PdfAddimgUtil {
         if(type.equals("6")){
             x = width * x - 27+pyzbx;
             y = height - height * y - 30+pyzby;
-            imagePath = "/Users/hongchuangyanfa/Desktop/print/ht1234567890.png";
+            imagePath = sysLocalFileUrl + "/print/ht1234567890.png";
         }else{
             x = width * x - 20+pyzbx;
             y = height - height * y - 8+pyzby;
@@ -379,7 +380,6 @@ public class PdfAddimgUtil {
     public static String getNetUrl(String fileUrl){
         String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
         String sys_file_net_url = ParamCache.getValue(CommonConstant.SYS_FILE_NET_URL);
-
         String path = sys_file_net_url + fileUrl.replaceAll("//", "/").replaceAll(file_path, "");
         return path;
     }