Commit 51bb2f68 by 王昆

tgsb

parent 86d2286c
...@@ -358,17 +358,25 @@ class EcontractApi { ...@@ -358,17 +358,25 @@ class EcontractApi {
msg: "签名失败" msg: "签名失败"
}; };
} }
let idNos = await this.usereaccountSve.idNoByUserId3rd(userId);
var params = { var params = {
ecompanyId: busi.ecompany_id, ecompanyId: busi.ecompany_id,
startId: startId, startId: startId,
idNo: idNo.toUpperCase(), idNo: idNo.toUpperCase(),
pageSize: pageSize, pageSize: pageSize,
userId3rd: userId,
}; };
if (idNos && idNos.length > 0) {
params.idNos = idNos;
}
try { try {
var userList = await this.econtractSve.findSignedUses4Push(params); let userList = await this.econtractSve.findSignedUses4Push(params);
if (userId && userList && userList.length > 0) {
for (let u of userList) {
u.userId3rd = userId;
}
}
var result = { var result = {
code: 0, code: 0,
msg: "success", msg: "success",
......
...@@ -902,6 +902,9 @@ class EcontractService extends ServiceBase { ...@@ -902,6 +902,9 @@ class EcontractService extends ServiceBase {
if (params.idNo) { if (params.idNo) {
sql.push("AND t2.`personsSign` = :idNo"); sql.push("AND t2.`personsSign` = :idNo");
} }
if (params.idNos) {
sql.push("AND t2.`personsSign` IN (:idNos)");
}
if (params.userId3rd) { if (params.userId3rd) {
sql.push("AND t3.`userId3rd` = :userId3rd"); sql.push("AND t3.`userId3rd` = :userId3rd");
} }
......
...@@ -160,6 +160,20 @@ class UsereaccountService extends ServiceBase{ ...@@ -160,6 +160,20 @@ class UsereaccountService extends ServiceBase{
}); });
return list || []; return list || [];
} }
async idNoByUserId3rd(userId3rd) {
if (!userId3rd) {
return;
}
let sql = "SELECT t1.`personsSign` FROM p_user_eaccount t1 INNER JOIN p_user t2 ON t1.`user_id` = t2.`id` WHERE t2.`userId3rd` = :userId3rd";
let list = await this.dao.customQuery(sql, {userId3rd: userId3rd,});
let rs = [];
for(let item of list) {
rs.push(item.personsSign);
}
return rs;
}
async getSignAccounts_dk(etemplateIds, idNoList, idNameList) { async getSignAccounts_dk(etemplateIds, idNoList, idNameList) {
var sql = []; var sql = [];
......
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