Try to change $cat_name by the category ID.
$term_name = get_query_var('taxonomy'); // current taxonomy
$cate = get_queried_object();
$cat_id = $cate->term_id; // current category ID
echo $term_name;
echo $cat_id;
$wp_query = new WP_Query(array('post_type'=>'st_ai',
'post_status' => 'publish',
'tax_query' => array(
array(
'taxonomy' => $term_name,
'field' => 'slug',
'term' => $cat_id,
)
)
));
if ( $wp_query->have_posts() ) {
echo "good";
}
?>