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);
|
}
|
}
|
}
|