|
|
@@ -119,7 +119,11 @@ public class EVisaController {
|
|
|
//获取状态为1(待审批)的分支流程
|
|
|
List<Task> tasks = taskClient.queryTaskListByFormDataId(taskApprovalVO.getFormDataId());
|
|
|
Task masterTask = tasks.get(0);
|
|
|
- String sql = "SELECT a.* from u_task_parallel a where a.process_instance_id=(SELECT process_instance_id from u_task_parallel b where b.parallel_process_instance_id='"+taskApprovalVO.getParallelProcessInstanceId()+"') and is_deleted=0 and `status`=1 ";
|
|
|
+ if(masterTask !=null && (masterTask.getApprovalType()==5 || masterTask.getApprovalType()==6 || masterTask.getApprovalType()==7 ) && masterTask.getFixedFlowId()!=null && masterTask.getFixedFlowId()!=0L ){
|
|
|
+ String upsql = "update u_task_parallel set status=2 ,e_visa_status=1,e_visa_content='电签成功' ,update_time=SYSDATE() where sort in(SELECT fixed_flow_branch_sort from u_fixed_flow_link where fixed_flow_id ="+masterTask.getFixedFlowId()+" and fixed_flow_link like'%审计%') and process_instance_id="+masterTask.getProcessInstanceId()+"";
|
|
|
+ jdbcTemplate.execute(upsql);
|
|
|
+ }
|
|
|
+ String sql = "SELECT a.* from u_task_parallel a where a.process_instance_id=(SELECT process_instance_id from u_task_parallel b where b.parallel_process_instance_id='"+taskApprovalVO.getParallelProcessInstanceId()+"') and is_deleted=0 and `status`=1 ";
|
|
|
List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql);
|
|
|
if (maps == null || maps.size() == 0) {
|
|
|
//说明都审批完成,将主表状态更改为已完成
|
|
|
@@ -166,12 +170,15 @@ public class EVisaController {
|
|
|
UpMeterSignDataInfo(taskApprovalVO,finalPdfUrl,1);
|
|
|
}
|
|
|
}
|
|
|
+ }else if("eContractError".equals(eVisaStatus) || eVisaStatus.contains("eContractError")){ //合同段信息出错
|
|
|
+
|
|
|
+ this.jdbcTemplate.execute("delete from u_task_batch where id="+taskApprovalVO.getId());
|
|
|
+
|
|
|
}else if ("eVisaError".equals(eVisaStatus) || eVisaStatus.contains("eVisaError")) {
|
|
|
// 修改 主 任务 u_task 表 状态改为3
|
|
|
String up_task_par = "update u_task_parallel set status=2 ,e_visa_status=99 ,e_visa_content='"+eVisaStatus.split("####")[1]+"' where parallel_process_instance_id='"+taskApprovalVO.getParallelProcessInstanceId()+"'";
|
|
|
this.jdbcTemplate.execute("delete from u_task_batch where id="+taskApprovalVO.getId());
|
|
|
jdbcTemplate.execute(up_task_par);
|
|
|
-
|
|
|
}else {
|
|
|
|
|
|
}
|