Jelajahi Sumber

质检废除逻辑

zhuwei 4 bulan lalu
induk
melakukan
c405869b11

+ 1 - 3
blade-service/blade-business/src/main/java/org/springblade/business/controller/TaskController.java

@@ -1492,9 +1492,7 @@ public class TaskController extends BladeController {
                 Date createTime = task.getCreateTime();
                 //废除时间肯定在任务创建时间之后  选择距离当前任务创建时间最近的一条数据
                 List<OperationLog> operationLogsF = operationLogMap.get(task.getFormDataId());
-                /*List<OperationLog> operationLogs = jdbcTemplate.query("select create_user_name ,create_time from u_operation_log where business_id = '" +
-                                task.getFormDataId() + "'and operation_content like '%废除%' and create_time >= '"+format+"' ORDER BY ABS(TIMESTAMPDIFF(SECOND, '"+format+"', create_time)) LIMIT 1"
-                        , new BeanPropertyRowMapper<>(OperationLog.class));*/
+
                 if(ObjectUtil.isNotEmpty(operationLogsF)){
                     Optional<OperationLog> min = operationLogsF.stream().filter(o -> o.getCreateTime().compareTo(createTime) >= 0)
                             .min(Comparator.comparing(t -> t.getCreateTime().getTime() - createTime.getTime()));

+ 59 - 34
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TaskServiceImpl.java

@@ -623,47 +623,72 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
     public void batchCompleteApprovalTask(List<TaskApprovalVO> taskApprovalVOS) {
         Long userId = AuthUtil.getUserId();
         String nickName = AuthUtil.getNickName();
-        List<String> taskIds = taskApprovalVOS.stream().map(TaskApprovalVO::getParallelProcessInstanceId).distinct().collect(Collectors.toList());
-        this.taskParallelService.update(Wrappers.<TaskParallel>lambdaUpdate()
-                .set(TaskParallel::getEVisaContent, "当前等待电签的批次较多,请等待几分钟后刷新页面查看........")
-                .set(TaskParallel::getStatus, 1)
-                .set(TaskParallel::getEVisaStatus, 0)
+        // 批量审批接口
+        if(taskApprovalVOS!=null && taskApprovalVOS.size()>0){
+            TaskApprovalVO taskAppr = taskApprovalVOS.get(0);
+            if(taskAppr.getFlag().equals("OK")){ //同意
+                List<String> taskIds = taskApprovalVOS.stream().map(TaskApprovalVO::getParallelProcessInstanceId).distinct().collect(Collectors.toList());
+                this.taskParallelService.update(Wrappers.<TaskParallel>lambdaUpdate()
+                        .set(TaskParallel::getEVisaContent, "当前等待电签的批次较多,请等待几分钟后刷新页面查看........")
+                        .set(TaskParallel::getStatus, 1)
+                        .set(TaskParallel::getEVisaStatus, 0)
                         .set(TaskParallel::getInitiative, 1)
-                .in(TaskParallel::getParallelProcessInstanceId, taskIds));
+                        .in(TaskParallel::getParallelProcessInstanceId, taskIds));
 
-        List<TaskBatch> taskList = new ArrayList<>();
-        for (TaskApprovalVO taskApprovalVO : taskApprovalVOS) {
-            //重签时,需要对应任务的签字人
-            if (ObjectUtil.isNotEmpty(taskApprovalVO.getYsNickName())) {
-                nickName = taskApprovalVO.getYsNickName();
-            }
+                List<TaskBatch> taskList = new ArrayList<>();
+                for (TaskApprovalVO taskApprovalVO : taskApprovalVOS) {
+                    //重签时,需要对应任务的签字人
+                    if (ObjectUtil.isNotEmpty(taskApprovalVO.getYsNickName())) {
+                        nickName = taskApprovalVO.getYsNickName();
+                    }
 
-            //保存批次
-            TaskBatch taskBatch = new TaskBatch(null, JSONObject.toJSONString(taskApprovalVO));
-            if (taskApprovalVO.getUserId() == null || StringUtils.isEmpty(taskApprovalVO.getUserId() + "")) {
-                taskBatch.setCreateUser(userId);
-            } else {
-                taskBatch.setCreateUser(taskApprovalVO.getUserId());
-            }
-            taskBatch.setNickName(nickName);
-            taskBatch.setCreateTime(new Date());
-            taskList.add(taskBatch);
-            //设置委托单的状态
-            try {
-                String sql="SELECT uei.* FROM u_entrust_info uei JOIN u_trial_self_inspection_record utsr ON uei.id = utsr.entrust_id JOIN u_information_query uiq ON utsr.id = uiq.wbs_id WHERE uiq.id = "+taskApprovalVO.getFormDataId()+" and uiq.status !=3 and uiq.is_deleted=0";
-                List<EntrustInfo> query = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(EntrustInfo.class));
-                if(!query.isEmpty()){
-                    EntrustInfo entrustInfo = query.get(0);
-                    if(entrustInfo.getStatus()==3){
-                        String update="update u_entrust_info set status = 4 where id="+entrustInfo.getId();
-                        jdbcTemplate.execute(update);
+                    //保存批次
+                    TaskBatch taskBatch = new TaskBatch(null, JSONObject.toJSONString(taskApprovalVO));
+                    if (taskApprovalVO.getUserId() == null || StringUtils.isEmpty(taskApprovalVO.getUserId() + "")) {
+                        taskBatch.setCreateUser(userId);
+                    } else {
+                        taskBatch.setCreateUser(taskApprovalVO.getUserId());
+                    }
+                    taskBatch.setNickName(nickName);
+                    taskBatch.setCreateTime(new Date());
+                    taskList.add(taskBatch);
+                    //设置委托单的状态
+                    try {
+                        String sql="SELECT uei.* FROM u_entrust_info uei JOIN u_trial_self_inspection_record utsr ON uei.id = utsr.entrust_id JOIN u_information_query uiq ON utsr.id = uiq.wbs_id WHERE uiq.id = "+taskApprovalVO.getFormDataId()+" and uiq.status !=3 and uiq.is_deleted=0";
+                        List<EntrustInfo> query = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(EntrustInfo.class));
+                        if(!query.isEmpty()){
+                            EntrustInfo entrustInfo = query.get(0);
+                            if(entrustInfo.getStatus()==3){
+                                String update="update u_entrust_info set status = 4 where id="+entrustInfo.getId();
+                                jdbcTemplate.execute(update);
+                            }
+                        }
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                }
+                this.taskBatchService.saveBatch(taskList);
+            }else if (taskAppr.getFlag().equals("NO")){ //废除
+                for (TaskApprovalVO taskApp : taskApprovalVOS) {
+                    // 废除信息
+                    Integer appType = taskApp.getApprovalType();
+                    //质检系统
+                    String up_task_par = "update u_task_parallel set status=3 , e_visa_content = '废除成功', initiative=10,update_time=SYSDATE(),update_user="+userId+"  where parallel_process_instance_id='"+taskApp.getParallelProcessInstanceId()+"'";
+                    String up_task = "update u_task set status=3, update_time=SYSDATE(),update_user="+userId+" where id='"+taskApp.getTaskId()+"'";
+                    this.jdbcTemplate.execute("delete from u_task_batch where JSON_UNQUOTE(JSON_EXTRACT(json_data, '$.taskId'))="+taskApp.getTaskId()+"");
+                    jdbcTemplate.execute(up_task_par);
+                    jdbcTemplate.execute(up_task);
+
+                    if(taskApp.getApprovalType() == 3){
+                        jdbcTemplate.execute("update u_contract_log set status=0 where id='"+taskApp.getFormDataId()+"'");
+                    }else if (taskApp.getApprovalType()==8) {
+                        this.jdbcTemplate.execute("update u_entrust_info set status=1 where id=(SELECT wbs_id from u_information_query where id='"+taskApp.getFormDataId()+"')");
+                    }else {
+                        jdbcTemplate.execute("update u_information_query set e_visa_pdf_url='',status=0 where id='"+taskApp.getFormDataId()+"'");
                     }
                 }
-            } catch (Exception e) {
-                e.printStackTrace();
             }
         }
-        this.taskBatchService.saveBatch(taskList);
     }
 
 

+ 5 - 1
blade-service/blade-e-visa/src/main/java/org/springblade/evisa/service/impl/EVDataServiceImpl.java

@@ -86,6 +86,7 @@ public class EVDataServiceImpl implements EVDataService {
             String fileUrl = CommonUtil.replaceOssUrl(taskApp.getSignPdfUrl());
             System.out.println("s1231312"+fileUrl);
             List<String> eVisaConfigList = PDFUtils.getPdfSignIds(fileUrl, taskApp);
+            System.out.println("安心签关键字个数" + eVisaConfigList.size());
             if (eVisaConfigList == null || eVisaConfigList.size() == 0) {
                 //没有电签配置,默认当前任务为不签字审批,返回成功
                 taskApp.setSigState(2);
@@ -96,8 +97,10 @@ public class EVDataServiceImpl implements EVDataService {
             // 获取pdf上的电签Ids
             String ids = String.join(",", eVisaConfigList);
             if (taskApp.getRemarkType().equals("1")) { //安心签
+                System.out.println("进入安心签");
                 //添加电签策略
                 List<SealStrategyVO> strategyListByAXQ = getStrategyListByAXQ(taskApp, ids);
+                System.out.println("安心签策略个数" + strategyListByAXQ.size());
                 if (strategyListByAXQ == null || Func.isEmpty(strategyListByAXQ) || strategyListByAXQ.size() == 0) {
                     List<Map<String, Object>> mapList = jdbcTemplate.queryForList("SELECT * from m_textdict_info where type=6  and is_deleted=0 and id in(" + ids + ")");
                     if (mapList != null && mapList.size() > 0) {
@@ -118,6 +121,7 @@ public class EVDataServiceImpl implements EVDataService {
                 }
 
                 //调用签字逻辑
+                System.out.println("安心签完毕开始签字" );
                 signTaskBatchByAXQZ(strategyListByAXQ, taskApp);
                 if (taskApp.getSigState() != 1) {
                     return;
@@ -689,7 +693,7 @@ public class EVDataServiceImpl implements EVDataService {
 
         Object[] result = null;
         String fileUrl = pdfUrl;
-        if (list.size() >= 10000 || fileByte.length > 100000 * 1000 * 1000) {
+        if (list.size() >= 1000 || fileByte.length > 1000 * 1000 * 1000) {
             String inUrl = "/inp/" + DateUtil.today();
             String outUrl = "/out/" + DateUtil.today();
             SignFtpUtil.FTPCreateDir(inUrl);

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

@@ -854,8 +854,10 @@ public class EVisaServiceImpl implements EVisaService {
             if ("20".equals(sys_isonline) || SystemUtils.isWindows() || SystemUtils.isMacOs()) {
                 SIGN_HOST = "219.151.181.43";
             }
+            SIGN_HOST = "219.151.181.43";
             System.out.println("电签Ip===:" + SIGN_HOST);
-            PaperlessClient paperlessClient = new PaperlessClient(SIGN_HOST, SIGN_PORT, 240000000, 810000000);
+            PaperlessClient paperlessClient = new PaperlessClient(SIGN_HOST, SIGN_PORT, 24000000, 81000000);
+            System.out.println("paperlessClient创建成功");
             paperlessClient.setSSL(false);
             //*****************************************************************************
             CompoundSealPdfListDetachedRequest compoundSealPdfListDetachedRequest = new CompoundSealPdfListDetachedRequest();
@@ -882,6 +884,7 @@ public class EVisaServiceImpl implements EVisaService {
             pdfBean.setBizSerialNo(GUIDUtil.generateId());
             pdfBean.setInputSource("");
             pdfBean.setInputType(BaseConstants.INPUT_TYPE_FILEDATA);
+            System.out.println("【电签模块】pdf{}长度" + fileByte.length);
             logger.info("【电签模块】pdf{}", "长度" + fileByte.length);
             pdfBean.setPdfData(fileByte);
             // pdfBean.set
@@ -890,6 +893,7 @@ public class EVisaServiceImpl implements EVisaService {
 
             requestBody.setPdfBeans(pdfBeans);
             //***********************构造机构章策略 ********************************
+            System.out.println("【电签模块】10" + pdfVO.getStrategyVoList().size());
             List<SealStrategy> sealStrategies = this.generateSealStrategies(pdfVO.getStrategyVoList());
             if (null == sealStrategies || sealStrategies.size() <= 0) {
                 logger.info("【电签模块】{}", "签章策略为空");
@@ -897,6 +901,7 @@ public class EVisaServiceImpl implements EVisaService {
             }
             requestBody.setSealStrategies(sealStrategies);
 
+            System.out.println("【电签模块】11" + sealStrategies.size());
             //签章后文件保存地址,不为空时,直接将签章文件保存在此地址,不再返回签章后文档数据;ftp:auto
             requestBody.setOutputFilepath("");
 
@@ -904,7 +909,7 @@ public class EVisaServiceImpl implements EVisaService {
             requestBody.setTimestampChannel(BaseConstants.TIME_STAMP_CHANNEL_CFCA);
             //获取场景证书的方式默认值为0;0:实时从CFCA CA服务申请下载场景证书;1:使用从CFCA CA服务预先申请下载并存储在本地的场景证书;
             requestBody.setSceneCertChannel(BaseConstants.SCEND_CERT_CHANNEL_REAL);
-
+            System.out.println("【电签模块】12" + sealStrategies.size());
             compoundSealPdfListDetachedRequest.setBody(requestBody);
             //****************************** 请求服务端进行签章 *********************************************
             System.out.println("-----------------------" + new Date().toString() + "开始" + transactionNo + "----------------------------");
@@ -930,6 +935,7 @@ public class EVisaServiceImpl implements EVisaService {
                 result[2] = responseHead.getMessage();
             }
         } catch (Exception e) {
+            logger.info("【电签模块】{}", "签章异常:" + e.getMessage());
             e.printStackTrace();
         }
         return result;

+ 8 - 6
blade-service/blade-e-visa/src/main/java/org/springblade/evisa/utils/SignFtpUtil.java

@@ -4,6 +4,7 @@ import org.apache.commons.net.ftp.FTP;
 import org.apache.commons.net.ftp.FTPClient;
 import org.springblade.common.constant.CommonConstant;
 import org.springblade.common.utils.SystemUtils;
+import org.springblade.core.tool.utils.DateUtil;
 import org.springblade.system.cache.ParamCache;
 
 import java.io.*;
@@ -33,7 +34,7 @@ public class SignFtpUtil {
             // 连接到FTP服务器
             String sys_isonline = ParamCache.getValue(CommonConstant.SYS_ISONLINE);
             if("20".equals(sys_isonline) || SystemUtils.isWindows() || SystemUtils.isMacOs()){
-                SERVER = "219.151.181.43";
+                SERVER = "219.151.185.227";
             }
             System.out.println("ftp上传ip地址:"+SERVER);
             ftp.connect(SERVER, PORT);
@@ -140,11 +141,14 @@ public class SignFtpUtil {
         FTPClient ftpClinet = SignFtpUtil.getFTPClinet();
         try {
             if (ftpClinet.deleteFile(remoteFilePath)) {
+                System.out.println(remoteFilePath+"-s");
                 return 1;
             } else {
+                System.out.println(remoteFilePath+"-f");
                 return 2;
             }
         } catch (Exception e) {
+            System.out.println(e+"-f");
             e.printStackTrace();
             return 2;
         } finally {
@@ -228,10 +232,8 @@ public class SignFtpUtil {
     }
 
 /*    public static void main(String[] args) {
-        String loudUrl = "/Users/hongchuangyanfa/Desktop/excel/头像.jpeg";
-        uploadFile(loudUrl,"/inp/20250317/123.jpeg");
-
-      //  ftp://signAdmin:123456@219.151.181.43:6233/inp/20250317/bc64d878fed6eff18a896641874594ea.jpg
-       // downloadFile("/Users/hongchuangyanfa/Desktop/22222/头像.jpeg","/inp/20250317/bc64d878fed6eff18a896641874594ea.jpg");
+        String inUrl = "/inp/" + DateUtil.today();
+        System.out.println(inUrl);
+        FTPCreateDir(inUrl);
     }*/
 }

+ 0 - 169
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java

@@ -10,7 +10,6 @@ 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.fasterxml.jackson.annotation.JsonProperty;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import com.google.gson.Gson;
 import com.spire.xls.*;
@@ -32,7 +31,6 @@ import org.springblade.business.entity.ContractLog;
 import org.springblade.business.entity.InformationQuery;
 import org.springblade.business.feign.ContractLogClient;
 import org.springblade.business.feign.InformationQueryClient;
-import org.springblade.business.feign.TaskClient;
 import org.springblade.business.vo.SaveContractLogVO;
 import org.springblade.common.constant.CommonConstant;
 import org.springblade.common.utils.BaseUtils;
@@ -44,7 +42,6 @@ import org.springblade.core.log.exception.ServiceException;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;
 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;
@@ -66,18 +63,15 @@ import org.springblade.resource.feign.NewIOSSClient;
 import org.springblade.resource.vo.NewBladeFile;
 import org.springblade.system.cache.ParamCache;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Lazy;
 import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.MediaType;
 import org.springframework.jdbc.core.BeanPropertyRowMapper;
 import org.springframework.jdbc.core.JdbcTemplate;
-import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
-import javax.annotation.Resource;
 import javax.imageio.ImageIO;
 import javax.servlet.http.HttpServletResponse;
 import javax.validation.Valid;
@@ -93,10 +87,7 @@ import java.nio.file.StandardCopyOption;
 import java.text.SimpleDateFormat;
 import java.util.List;
 import java.util.*;
-import java.util.concurrent.CompletableFuture;
 import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -132,12 +123,9 @@ public class ExcelTabController extends BladeController {
     // 元素信息表-
     private final IWbsFormElementService wbsFormElementService;
 
-
     // 元素信息表-
     private final IWbsTreeContractService wbsTreeContractService;
 
-    private final INodeBaseInfoService nodeBaseInfoService;
-
     private final WbsTreePrivateMapper wbsTreePrivateMapper;
 
     private final JdbcTemplate jdbcTemplate;
@@ -164,17 +152,6 @@ public class ExcelTabController extends BladeController {
 
     private final IContractInfoService contractInfoService;
 
-    /*private final IWbsParamService wbsParamService;*/
-
-    private final TaskClient taskClient;
-
-    private final BladeRedis bladeRedis;
-
-
-    // 线程池
-    @Resource(name = "taskExecutor1")
-    private ThreadPoolExecutor executor;
-
 
     @Autowired
     StringRedisTemplate RedisTemplate;
@@ -4422,95 +4399,6 @@ public class ExcelTabController extends BladeController {
         return R.data(bussDataInfoTrial);
     }
 
-
-    // @Scheduled(cron = "0/20 * * * * ?")
-    public void HtmlCope() {
-        //执行代码
-        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) {
-                if (executor.getQueue().size() <= 40) {
-                    String idkey = dataInfo.get("p_key_id") + "";
-                    Boolean aBoolean = RedisTemplate.hasKey("sign-" + idkey);
-                    if (!aBoolean) {
-                        RedisTemplate.opsForValue().set("sign-" + idkey, "1", 30, TimeUnit.SECONDS);
-                        CompletableFuture<Void> runAsync = CompletableFuture.runAsync(() -> {
-                            try {
-                                this.checkHtmlCope(dataInfo);
-                            } catch (Exception e) {
-                                e.printStackTrace();
-                            }
-                        }, executor);
-                    }
-
-                }
-            }
-        }
-        System.out.println("队列数量" + executor.getQueue().size());
-        System.out.println("活跃数量" + executor.getActiveCount());
-        System.out.println("总共数量" + executor.getTaskCount());
-        System.out.println("完成数量" + executor.getCompletedTaskCount());
-    }
-
-    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 = "/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) {
-            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;
-                }
-            }
-        }
-
-
-    }
-
     public static synchronized InputStream getOSSInputStream2(String urlStr) throws Exception {
         //获取OSS文件流
         URL url = new URL(urlStr);
@@ -4523,63 +4411,6 @@ public class ExcelTabController extends BladeController {
         }
     }
 
-    //  @Scheduled(cron = "0/20 * * * * ?")
-    public void SignInfo() {
-        //执行代码
-        String sql = "SELECT * from m_wbs_tree_contract where id in(SELECT parent_id from m_wbs_tree_contract where contract_id=1750757576810766337 and is_cope_tab=2  ) and type =1 and contract_id=1750757576810766337 and is_deleted<>4 ";
-        List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql);
-        if (maps != null && maps.size() >= 1) {
-            for (Map<String, Object> dataInfo : maps) {
-                if (executor.getQueue().size() <= 40) {
-                    String idkey = dataInfo.get("p_key_id") + "";
-                    Boolean aBoolean = RedisTemplate.hasKey("sign-" + idkey);
-                    if (!aBoolean) {
-                        RedisTemplate.opsForValue().set("sign-" + idkey, "1", 30, TimeUnit.SECONDS);
-                        CompletableFuture<Void> runAsync = CompletableFuture.runAsync(() -> {
-                            try {
-                                this.checkIsExsitTaskBatch(dataInfo);
-                            } catch (Exception e) {
-                                e.printStackTrace();
-                            }
-                        }, executor);
-                    }
-
-                }
-            }
-        }
-        System.out.println("队列数量" + executor.getQueue().size());
-        System.out.println("活跃数量" + executor.getActiveCount());
-        System.out.println("总共数量" + executor.getTaskCount());
-        System.out.println("完成数量" + executor.getCompletedTaskCount());
-    }
-
-    public void checkIsExsitTaskBatch(Map<String, Object> dataInfo) {
-        String sql = "SELECT * from m_wbs_tree_contract where parent_id =(select id from m_wbs_tree_contract where p_key_id='" + dataInfo.get("p_key_id") + "' and is_deleted=0 ) and type =2  and is_cope_tab=2 and contract_id=1750757576810766337 ORDER BY sort,create_time,node_name ASC";
-        List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql);
-        String node_name = "";
-        System.out.println(sql);
-        int index = 0;
-        if (maps != null && maps.size() >= 1) {
-            for (int i = 0; i < maps.size(); i++) {
-                Map<String, Object> dataIn = maps.get(i);
-                String nodeName = dataIn.get("node_name") + "";
-                if (node_name.equals(nodeName)) {
-                    index = index + 1;
-                } else {
-                    index = 1;
-                }
-                node_name = nodeName;
-                if (nodeName.indexOf("__") >= 0) {
-                    nodeName = nodeName.split("__")[0];
-                }
-                String newNmae = nodeName + "__" + index;
-                System.out.println(newNmae);
-                // jdbcTemplate.update("update m_wbs_tree_contract set node_name='"+node_name+"' set is_deleted=4 where p_key_id='"+dataIn.get("p_key_id")+"' ");
-
-            }
-        }
-    }
-
     //@Scheduled(fixedDelay = 1000*60*60*24)
     //检查excel路径有错的
     public void cheackExcel() throws IOException {

+ 0 - 5
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/WbsTreeContractController.java

@@ -26,12 +26,10 @@ import org.jsoup.nodes.Element;
 import org.jsoup.select.Elements;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springblade.business.dto.ImportTreeDto;
 import org.springblade.common.utils.SnowFlakeUtil;
 import org.springblade.core.boot.ctrl.BladeController;
 import org.springblade.core.log.exception.ServiceException;
 import org.springblade.core.tool.api.R;
-import org.springblade.core.tool.utils.BeanUtil;
 import org.springblade.core.tool.utils.IoUtil;
 import org.springblade.core.tool.utils.ObjectUtil;
 import org.springblade.core.tool.utils.ResourceUtil;
@@ -48,9 +46,6 @@ import org.springblade.manager.utils.RandomNumberHolder;
 import org.springblade.manager.vo.*;
 import org.springframework.jdbc.core.BeanPropertyRowMapper;
 import org.springframework.jdbc.core.JdbcTemplate;
-import org.springframework.jdbc.core.SingleColumnRowMapper;
-import org.springframework.scheduling.annotation.Scheduled;
-import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 

+ 1 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/feign/ExcelTabClientImpl.java

@@ -38,6 +38,7 @@ import org.springblade.manager.service.IWbsTreePrivateService;
 import org.springblade.manager.utils.FileUtils;
 import org.springblade.manager.vo.TrialSelfDataRecordVO1;
 import org.springblade.resource.feign.NewIOSSClient;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.jdbc.core.BeanPropertyRowMapper;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.web.bind.annotation.RestController;
@@ -68,8 +69,6 @@ public class ExcelTabClientImpl implements ExcelTabClient {
     private final IProjectInfoService projectInfoService;
     private final IContractInfoService contractInfoService;
     private final EntrustInfoServiceClient entrustInfoServiceClient;
-    private static final Logger logger = LoggerFactory.getLogger(ExcelTabClientImpl.class);
-
     @Override
     public ExcelTab getById(String id) {
         return this.excelTabService.getById(id);

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

@@ -534,7 +534,7 @@ public class FileUtils {
         String sys_file_net_url = ParamCache.getValue(CommonConstant.SYS_FILE_NET_URL);
         String sys_isonline = ParamCache.getValue(CommonConstant.SYS_ISONLINE);
 
-        if (fileUrl.indexOf("aliyuncs.com") >= 0) {
+        if (fileUrl.indexOf("aliyuncs.com") >= 0 || fileUrl.indexOf("/mnt/sdc/Users/hongchuangyanfa/Desktop/")>=0) {
             return fileUrl;
         } else {
             file_path2 = file_path;