Commit a6cd0bb2 by 王昆

gsb

parent eb05ec9c
...@@ -87,7 +87,7 @@ class EcontractDao extends Dao { ...@@ -87,7 +87,7 @@ class EcontractDao extends Dao {
sql.push("AND t1.`etemplate_id` = :ecid"); sql.push("AND t1.`etemplate_id` = :ecid");
} }
if (params.today) { if (params.today) {
sql.push("AND t1.`end_at` >= :today AND t1.`begin_at` <= :today"); sql.push("AND t1.`end_at` >= :today");
} }
let list = await this.customQuery(sql.join(" "), params); let list = await this.customQuery(sql.join(" "), params);
......
...@@ -1368,8 +1368,8 @@ class EcontractService extends ServiceBase { ...@@ -1368,8 +1368,8 @@ class EcontractService extends ServiceBase {
// usereaccount_id: eaccount.id, // usereaccount_id: eaccount.id,
// etemplate_id: ecid, // etemplate_id: ecid,
// }); // });
let todays = new Date().Format("YYYY-MM-DD HH:mm:ss"); let todays = moment().format("YYYY-MM-DD") + " 00:00:00";
let contractId = await this.dao.findSignedContractId({idno: eaccount.personsSign, ecid: ecid,today : todays}) || 0; let contractId = await this.dao.findSignedContractId({idno: eaccount.personsSign, ecid: ecid, today : todays}) || 0;
if (contractId) { if (contractId) {
return this.returnjson(0, "用户已经签约", { return this.returnjson(0, "用户已经签约", {
contractId: contractId contractId: contractId
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment