P15GEN2\59518
2025-10-10 9f6890646993d16260d4201d613c092132856127
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package biz.esign.weaver;
 
import java.util.List;
 
import biz.esign.weaver.dao.Signer;
import foundation.data.entity.Entity;
import foundation.data.object.DataObject;
import foundation.token.IOnlineUser;
 
public abstract class ISignService{
 
    public List<Signer> getSigners(Entity entity) throws Exception {
        return null;
    }
 
    public String getContracePhone(String sourceCode, String orgId, String accountId) throws Exception {
        int pos = sourceCode.indexOf("@{");
        
        if (pos == -1){
            return sourceCode;
        }
        
        sourceCode = sourceCode.substring(pos + 2, sourceCode.length());
        pos = sourceCode.indexOf(".");
        
        if (pos == -1) {
            IOnlineUser user = IOnlineUser.getInstance();
            String employeePhone = user.getEmployeePhone();
            return employeePhone;
        }
        
        String dataName = sourceCode.substring(0, pos);
        String field = sourceCode.substring(pos + 1);
        
        DataObject dataObject = DataObject.getInstance(dataName);
        
        if (dataName.equalsIgnoreCase("md_org")) {
            Entity entity = dataObject.getTableEntity(orgId);
            return entity.getString(field);
        }
        else {
            Entity entity = dataObject.getTableEntity(accountId);
            return entity.getString(field);
        }
    }
}