db.eval(); Error changes after upgrade

  mongodb, question

The normally available scheduled task suddenly reported an error, and the error changed again after mongodb upgrade.

Upon examination, the following statement was found to be in error:

MongoDB='./mongo -u*** -p***  1.2.3.4:808/adm'
 $MongoDB <<EOF
 use logReportDB
 db.eval('js_dailyChnIntSucRateSta(\"${v_date}\")');
 exit;
 EOF

The log information before upgrade is:

MongoDB shell version: 2.4.8
 connecting to:  1.2.3.4:808/adm
 switched to db logReportDB
 Thu Apr 13 06:30:01.970 {
 "errmsg" : "exception: Error: attempted to insert an empty array at src/mongo/shell/collection.js:201",
 "code" : 16722,
 "ok" : 0
 } at src/mongo/shell/db.js:571

The upgraded log information is:

MongoDB server version: 3.4.2
 switched to db logReportDB
 WARNING: db.eval is deprecated
 2017-05-11T06:30:01.838+0800 E QUERY    [thread1] Error: {
 "ok" : 0,
 "errmsg" : "Error: remove needs a query :\nDBCollection.prototype._parseRemove@src/mongo/shell/collection.js:409:1\  nDBCollection.prototype.remove@src/mongo/shell/collection.js:434:18\n____MongoToSM_newFunction_temp@:11:1\n_funcs1@:1:31\n",
 "code" : 139,
 "codeName" : "JSInterpreterFailure"
 } :
 _getErrorWithCode@src/mongo/shell/utils.js:25:13
 DB.prototype.eval@src/mongo/shell/db.js:613:1
 @(shell):1:1

At present, there is no way to deal with it. I hope the Great Spirit can teach me.

I have encountered such a situation, how to solve it?