fix the bug of getexpensedata function, update balance query and check expensecategory id valid query