Try this code:
<?php
$thumb_id = get_post_thumbnail_id();
$thumb_url = wp_get_attachment_image_src($thumb_id,'full', true);
if ( !empty($thumb_url[0])) {
echo "There is a thumbnail and it's id is: ".$thumb_id;
} else {
echo 'There is no picture.';
}
?>
For the second code, use:
<?php
$thumb_id = get_post_thumbnail_id();
$thumb_url = wp_get_attachment_image_src($thumb_id,'full', true);
if ( !empty($thumb_url[0]) ) : ?>
<img class="img-responsive logo-main scale-with-grid" src="https://wordpress.stackexchange.com/questions/262579/<?php echo $thumb_url[0]; ?>"/>
<div class="text-box">
<p class="dataNumber title"><?php the_title();?> </p>
</div>
</div>
<?php else: ?>
<div class="logo-main scale-with-grid">no postthumb</div>
<div class="text-box">
<p class="dataNumber title"><?php the_title();?> </p>
</div>
</div>
<?php endif; ?>