Commit 48a77f50 by zhaoxiqing

gsb

parent 50a222e8
...@@ -17,6 +17,7 @@ class EcontractCtl extends CtlBase { ...@@ -17,6 +17,7 @@ class EcontractCtl extends CtlBase {
this.Mail = system.getObject("util.mailClient"); this.Mail = system.getObject("util.mailClient");
this.excelClient = system.getObject("util.excelClient"); this.excelClient = system.getObject("util.excelClient");
this.econtractDao = system.getObject("db.econtractDao")
this.eSignBaoRedirectBossUrl = settings.apiconfig.eSignBaoRedirectBossUrl(); this.eSignBaoRedirectBossUrl = settings.apiconfig.eSignBaoRedirectBossUrl();
} }
...@@ -39,7 +40,7 @@ class EcontractCtl extends CtlBase { ...@@ -39,7 +40,7 @@ class EcontractCtl extends CtlBase {
return system.getErrResult2(rs.msg); return system.getErrResult2(rs.msg);
}else{ }else{
return system.getResult2(rs); return system.getResult2(rs);
} }
} catch (e) { } catch (e) {
console.log(e); console.log(e);
return system.getErrResult2("您的网络不稳, 请稍后重试"); return system.getErrResult2("您的网络不稳, 请稍后重试");
...@@ -261,9 +262,9 @@ class EcontractCtl extends CtlBase { ...@@ -261,9 +262,9 @@ class EcontractCtl extends CtlBase {
return system.getErrResult2("协议不存在,请刷新重新选择"); return system.getErrResult2("协议不存在,请刷新重新选择");
} }
let sinedTemplateIds = await this.service.findUserSinedTemplateIds(eaccount_id); let todays = moment().format("YYYY-MM-DD") + " 00:00:00";
let contractId = await this.econtractDao.findSignedContractId({idno: eaccount.personsSign, ecid: etemplateid, today : todays}) || 0;
if (sinedTemplateIds.indexOf(Number(etemplate.id)) != -1) { if (contractId) {
return system.getErrResult2("你已经签署该公司协议,不可以重复签署"); return system.getErrResult2("你已经签署该公司协议,不可以重复签署");
} }
...@@ -492,4 +493,4 @@ class EcontractCtl extends CtlBase { ...@@ -492,4 +493,4 @@ class EcontractCtl extends CtlBase {
} }
} }
module.exports = EcontractCtl; module.exports = EcontractCtl;
\ No newline at end of file
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