/*
  * 根据流程实例类型查询当前用户流程实例个数
  */
 private Integer getInstanceNumByType(Long typeId, boolean isEnd) {
   if (isEnd) {
     return workflowInstanceManager.getEndInstanceNumByCreatorAndType(
         getCompanyId(), getCurrentUser(), typeId);
   } else {
     return workflowInstanceManager.getNotEndInstanceNumByCreatorAndType(
         getCompanyId(), getCurrentUser(), typeId);
   }
 }