letsql="SELECT ecompany_id FROM `c_econtract` WHERE usereaccount_id = :usereaccount_id AND begin_at < NOW() AND end_at > NOW() AND eflowstatus = '2' GROUP BY ecompany_id";
letsql="SELECT ecompany_id FROM `c_econtract` WHERE usereaccount_id = :usereaccount_id AND begin_at < NOW() AND end_at > NOW() AND eflowstatus = '2' GROUP BY ecompany_id";
lettmpParas={usereaccount_id:usereaccount_id}
lettmpParas={usereaccount_id:usereaccount_id}
letrs=awaitthis.customQuery(sql,tmpParas);
letrs=awaitthis.customQuery(sql,tmpParas);
letlist=[];
letlist=[];
if(rs&&rs.length>0){
if(rs&&rs.length>0){
for(letrofrs){
for(letrofrs){
list.push(r.ecompany_id);
list.push(r.ecompany_id);
}
}
}
}
...
@@ -46,16 +51,31 @@ class EcontractDao extends Dao{
...
@@ -46,16 +51,31 @@ class EcontractDao extends Dao{
asyncfindUserSinedTemplateIds(usereaccount_id){
asyncfindUserSinedTemplateIds(usereaccount_id){
letsql="SELECT etemplate_id FROM `c_econtract` WHERE usereaccount_id = :usereaccount_id AND begin_at < NOW() AND end_at > NOW() AND eflowstatus = '2' GROUP BY etemplate_id";
letsql="SELECT etemplate_id FROM `c_econtract` WHERE usereaccount_id = :usereaccount_id AND begin_at < NOW() AND end_at > NOW() AND eflowstatus = '2' GROUP BY etemplate_id";
letsql="SELECT id, fileurl FROM `c_econtract` WHERE usereaccount_id IN (:accountIds) AND eflowstatus = '2' AND etemplate_id = :etemplate_id ORDER BY id DESC";