Browse Source

解决pdf签字成功但是显示签字失败的问题

lvy 1 week ago
parent
commit
b5ceace9d5

+ 2 - 2
blade-service/blade-business/src/main/java/org/springblade/business/mapper/InformationQueryMapper.xml

@@ -1022,13 +1022,13 @@
     </select>
 
     <update id="addCheckPdfInfoByNodeId" >
-        update u_information_query a set a.chek_status=1
+        update u_information_query a set a.chek_status=1, check_desc = ''
         where a.is_deleted = 0 and a.classify=#{classify} and a.wbs_id
         in( select b.p_key_id from m_wbs_tree_contract b where b.is_deleted = 0 and b.ancestors_p_id like CONCAT(CONCAT('%', #{ids}), '%') and b.is_deleted = 0) and a.status = 2
     </update>
 
     <update id="addCheckPdfInfoByIds">
-        update u_information_query set chek_status=1
+        update u_information_query set chek_status=1, check_desc = ''
         where status = 2 and is_deleted = 0 and classify=#{classify} and id in
         <foreach collection="ids" item="id" open="(" separator="," close=")">
             #{id}

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

@@ -96,8 +96,12 @@ public class EVDataServiceImpl implements EVDataService {
             List<String> eVisaConfigList = PDFUtils.getPdfSignIds(fileUrl, taskApp);
             if (eVisaConfigList == null || eVisaConfigList.size() == 0) {
                 //没有电签配置,默认当前任务为不签字审批,返回成功
-                taskApp.setSigState(2);
-                taskApp.setSignSmg("pdf未获取到关键字Id");
+                if(taskApp.getSigState() == 10) {
+                    taskApp.setSigState(2);
+                } else {
+                    taskApp.setSigState(2);
+                    taskApp.setSignSmg("pdf未获取到关键字Id");
+                }
                 SignBackPdfInfo(taskApp);
                 return;
             }
@@ -407,7 +411,12 @@ public class EVDataServiceImpl implements EVDataService {
                     }
                     this.jdbcTemplate.execute("delete from u_task_batch where id in(" + taskApp.getId()+")");
                 }else{
-                    this.jdbcTemplate.execute("update u_task_parallel set exe_count=(exe_count+1), e_visa_status=99,e_visa_content='" + taskApp.getSignSmg() + "' ,update_time=SYSDATE() where parallel_process_instance_id in (" + taskApp.getParallelProcessInstanceId() + ")");
+                    if (taskApp.getSigType() == 1) {
+                        this.jdbcTemplate.execute("update u_task_parallel set exe_count=(exe_count+1), e_visa_status=99,e_visa_content='" + taskApp.getSignSmg() + "' ,update_time=SYSDATE() where parallel_process_instance_id in (" + taskApp.getParallelProcessInstanceId() + ")");
+                    } else {
+                        // 签章失败
+                        this.jdbcTemplate.execute("update u_task_parallel set exe_count=(exe_count+1), meter_task_repeal_desc='" + taskApp.getSignSmg() + "' ,update_time=SYSDATE() where parallel_process_instance_id in (" + taskApp.getParallelProcessInstanceId() + ")");
+                    }
                     this.jdbcTemplate.execute("update u_task set status=1 ,update_time=SYSDATE() where id='" + taskApp.getTaskId() + "'");
                     if (totalCount >= 3) {
                         this.jdbcTemplate.execute("delete from u_task_batch where id in(" + taskApp.getId()+")");

+ 2 - 1
blade-service/blade-e-visa/src/main/java/org/springblade/evisa/utils/PDFUtils.java

@@ -116,7 +116,8 @@ public class PDFUtils {
             return unique;
         }catch (Exception e){
             e.printStackTrace();
-            System.out.println("pdf大小为0");
+            taskApp.setSigState(10);
+            taskApp.setSignSmg("解析pdf异常");
             return eVisaConfigList;
         }
     }