Ver Fonte

Merge remote-tracking branch 'origin/master'

xqj há 10 meses atrás
pai
commit
5bf74073b1

+ 18 - 0
blade-service/blade-meter/src/main/java/org/springblade/meter/controller/TaskController.java

@@ -2037,12 +2037,30 @@ public class TaskController extends BladeController {
                 aopParamsSet.add(param);
             }
 
+            // 判断是否为审批 最后一人 如果是 即生成 pdf 并开始电签
+            /*当前审批轮次*/
+            String sql_3 = "SELECT * FROM u_task_parallel WHERE status=1 and process_instance_id = ? ORDER BY sort";
+            List<TaskParallel> lastTaskParallels = jdbcTemplate.query(sql_3, new Object[]{task.getProcessInstanceId()}, new BeanPropertyRowMapper<>(TaskParallel.class));
+            if(lastTaskParallels == null || lastTaskParallels.size() == 0 ){
+                meterPdfInfo(task);
+            }
             return R.data(200, aopParamsSet, "操作成功");
         }
 
         return R.fail("操作失败");
     }
 
+
+    // pdf 生成
+
+    private boolean meterPdfInfo(Task task) {
+
+
+
+
+        return true;
+    }
+
     private void check(Task task) {
         String sql_2 = "SELECT * FROM u_task_parallel WHERE process_instance_id = ? ORDER BY sort";
         List<TaskParallel> taskParallels = jdbcTemplate.query(sql_2, new Object[]{task.getProcessInstanceId()}, new BeanPropertyRowMapper<>(TaskParallel.class));