|
@@ -1114,6 +1114,21 @@ module.exports = app => {
|
|
|
});
|
|
|
return result;
|
|
|
}
|
|
|
+
|
|
|
+ async getUserUnitSign(uid) {
|
|
|
+ const userInfo = await this.getDataById(uid);
|
|
|
+ if (!userInfo || !userInfo.company) {
|
|
|
+ return [];
|
|
|
+ }
|
|
|
+ if (userInfo.unit_sign_path) {
|
|
|
+ return userInfo.unit_sign_path.split('&%&');
|
|
|
+ }
|
|
|
+ const info = await this.ctx.service.constructionUnit.getDataByCondition({ pid: userInfo.project_id, name: userInfo.company });
|
|
|
+ if (!info || info.sign_permission === 0) {
|
|
|
+ return [];
|
|
|
+ }
|
|
|
+ return info.sign_path ? info.sign_path.split('&%&') : []; // 多个签章用&%&分隔
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return ProjectAccount;
|