Procházet zdrojové kódy

Merge remote-tracking branch 'origin/master'

liuyc před 1 rokem
rodič
revize
f5be82a714

+ 2 - 0
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TaskServiceImpl.java

@@ -609,6 +609,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
         RedisTemplate.opsForValue().set("sign-" + taskApprovalVO.getFormDataId(), "1", 60, TimeUnit.SECONDS);
 
         String pdfUrlEVisa = this.completeApprovalTask(taskApprovalVO);
+        System.out.println("电签操作成功buss-----"+pdfUrlEVisa);
         //TODO ============== 电签成功,修改试验状态,关联工程部位信息pdf(只有电签成功,才修改) liuYc 2023-03-16 ==============
         if ("OK".equals(taskApprovalVO.getFlag()) && StringUtils.isNotEmpty(pdfUrlEVisa)) {
             //已审批
@@ -650,6 +651,7 @@ public class TaskServiceImpl extends BaseServiceImpl<TaskMapper, Task> implement
             //todo ============================ 执行电签区域 ============================
             //电签状态
             String eVisaStatus = this.eVisaClient.eVisa(JSONObject.parseObject(JSONObject.toJSONString(taskApprovalVO), EVisaTaskApprovalVO.class));
+            System.out.println("+++++"+eVisaStatus);
             //todo ============================ 执行电签区域 ============================
 
             //电签状态分为success/notPfxOrFile/error,当状态为error时就需要重新提交请求

+ 31 - 21
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java

@@ -3771,28 +3771,42 @@ public class ExcelTabController extends BladeController {
     @PostMapping("/save_sigpdfInfo12313213")
     @ApiOperationSupport(order = 72)
     @ApiOperation(value = "pdf", notes = "pdf")
-    public void synPDFInfo(@RequestParam String contractid) throws Exception {
-        String sqlInfo = "SELECT DISTINCT wbs_id,classify,contract_id,project_id,type from u_information_query where contract_id='"+contractid+"' and is_deleted=0 and type=1 and wbs_id in(SELECT p_key_id from m_wbs_tree_contract where is_deleted=0 and contract_id='"+contractid+"')";
+    public void synPDFInfo(@RequestParam String contractid,@RequestParam String typeinfo){
+        String sqlInfo = "SELECT DISTINCT wbs_id,classify,contract_id,project_id,type from u_information_query where contract_id='"+contractid+"' and is_deleted=0 and type=1 and  classify='"+typeinfo+"' and wbs_id in(SELECT p_key_id from m_wbs_tree_contract where is_deleted=0 and contract_id='"+contractid+"')";
         List<Map<String, Object>> maps = jdbcTemplate.queryForList(sqlInfo);
         System.out.println(maps.size());
-        int i=0;
-        if(maps!=null && maps.size()>=2){
-            for(Map<String, Object> dataMap:maps){
-                String nodeId = dataMap.get("wbs_id")+"";
-                String classify = dataMap.get("classify")+"";
-                String contractId = dataMap.get("contract_id")+"";
-                String projectId = dataMap.get("project_id")+"";
-                List<AppWbsTreeContractVO> tableAll = wbsTreeContractService.searchNodeAllTable(nodeId, "1", contractId, projectId);
-                if(tableAll!=null && tableAll.size()>=1){
-                    for(AppWbsTreeContractVO tab:tableAll){
-                        excelTabService.getBussPdfInfo(Long.parseLong(tab.getPKeyId()+""));
+
+            int i=0;
+            if(maps!=null && maps.size()>=1){
+                for(Map<String, Object> dataMap:maps){
+                    String nodeId = dataMap.get("wbs_id")+"";
+                    String classify = dataMap.get("classify")+"";
+                    String contractId = dataMap.get("contract_id")+"";
+                    String projectId = dataMap.get("project_id")+"";
+                    List<AppWbsTreeContractVO> tableAll = wbsTreeContractService.searchNodeAllTable(nodeId, classify, contractId, projectId);
+                    if(tableAll!=null && tableAll.size()>=1){
+                        for(AppWbsTreeContractVO tab:tableAll){
+                            try {
+                                 excelTabService.getBussPdfInfo(Long.parseLong(tab.getPKeyId()+""));
+                            }catch (Exception e){
+                                e.printStackTrace();
+                            }finally {
+                                continue;
+                            }
+                        }
+                    }
+                    i=i+1;
+                    System.out.println("完成1---="+i);
+                    try {
+                        excelTabService.getBussPdfs(nodeId, classify, contractId, projectId);
+                    } catch (Exception e) {
+                        continue;
+                    }finally {
+                        continue;
                     }
                 }
-                i=i+1;
-                System.out.println("完成1---="+i);
-                excelTabService.getBussPdfs(nodeId, classify, contractId, projectId);
             }
-        }
+
     }
 
 
@@ -3813,11 +3827,7 @@ public class ExcelTabController extends BladeController {
         } else { //单个保存
             dataArray.add(dataInfo);
         }
-        /*公式处理开始*/
-        this.excelTabService.formulaFillData2(dataArray,ExecuteType.INSPECTION);
-        /*公式处理结束*/
         return excelTabService.saveBussData(dataArray);
     }
 
-
 }

+ 4 - 4
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/TextdictInfoController.java

@@ -634,7 +634,7 @@ public class TextdictInfoController extends BladeController {
     @ApiOperationSupport(order = 72)
     @ApiOperation(value = "保存电签", notes = "保存电签")
     public void synDqidInfo() {
-        String qerysql = "select * from test_data_info where state =1 ";
+        String qerysql = "select * from test_data_info2 where state =1 ";
         List<Map<String, Object>> maps1 = jdbcTemplate.queryForList(qerysql);
         if (maps1 != null && maps1.size() >= 0) {
             for (Map<String, Object> dataInfo : maps1) {
@@ -642,7 +642,7 @@ public class TextdictInfoController extends BladeController {
                 String excel_id = dataInfo.get("excel_id") + "";
                 String p_key_id = dataInfo.get("p_key_id") + "";
                 try {
-                    String sql = "select * from m_textdict_info where excel_id=" + excel_id + " and type in(2,6)";
+                    String sql = "select * from m_textdict_info where tab_id='" + p_key_id + "'  and type in(2,6)";
                     WbsTreePrivate wbsTreePrivate = wbsTreePrivateMapper.getByPKeyId(Long.parseLong(p_key_id));
                     InputStream inputStreamByUrl = FileUtils.getInputStreamByUrl(wbsTreePrivate.getHtmlUrl());
                     String htmlString = IoUtil.readToString(inputStreamByUrl);
@@ -714,11 +714,11 @@ public class TextdictInfoController extends BladeController {
                         String updateSqlC = "update m_wbs_tree_contract set html_url = '" + replace + "' where p_key_id in (" + cPkeyIdsStr + ")";
                         jdbcTemplate.execute(updateSqlC);
                     }
-                    String updatesql = "update test_data_info set  state=2  where p_key_id=" + p_key_id + " and excel_id=" + excel_id + " ";
+                    String updatesql = "update test_data_info2 set  state=2  where p_key_id=" + p_key_id + " and excel_id=" + excel_id + " ";
                     jdbcTemplate.execute(updatesql);
                     System.out.println("--------完成-------=" + p_key_id);
                 } catch (Exception e) {
-                    String updatesql = "update test_data_info set  state=3  where p_key_id=" + p_key_id + " and excel_id=" + excel_id + " ";
+                    String updatesql = "update test_data_info2 set  state=3  where p_key_id=" + p_key_id + " and excel_id=" + excel_id + " ";
                     jdbcTemplate.execute(updatesql);
                     e.printStackTrace();
                 }finally {

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

@@ -3159,7 +3159,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         wbsTreeContractService.update(updateWrapper);
         tabPdf2.delete();
         tabPdf.delete();
-        ResourceUtil.getFile(excelPath).delete();
+        ResourceUtil.getFile(excelPath);
         //关闭流
         IoUtil.closeQuietly(outputStream);
         IoUtil.closeQuietly(exceInp);