@Query(name="historicTaskInstExtension.findApplicantTask",value="from HistoricTaskInstanceExtension o where o.businessKey = ?1 and o.taskDefinitionKey = 'Apply' and o.previousId is null")
@Query(name="historicTaskInstExtension.findApplicantTask",value="from HistoricTaskInstanceExtension o where o.businessKey = ?1 and o.taskDefinitionKey = 'Apply' and (o.previousId is null or o.previousId='')")
@Query(name="historicTaskInstExtension.findApplicantTaskByBizCode",value="from HistoricTaskInstanceExtension o where o.businessCode = ?1 and o.taskDefinitionKey = 'Apply' and o.previousId is null")
@Query(name="historicTaskInstExtension.findApplicantTaskByBizCode",value="from HistoricTaskInstanceExtension o where o.businessCode = ?1 and o.taskDefinitionKey = 'Apply' and (o.previousId is null or o.previousId='')")