SELECT ifnull(max(right(e.APPLY_NO,5)),0) APPLY_NO FROM t_employee_contract_info e where e.DELETE_FLAG = 0 and e.CREATE_TIME>DATE_FORMAT(now(),'%Y-%m-%d')
SELECT ifnull(max(right(e.APPLY_NO,4)),0) APPLY_NO FROM t_employee_contract_info e where e.DELETE_FLAG = 0 and e.CREATE_TIME>DATE_FORMAT(now(),'%Y-%m-%d')