租户问题修复

ht
qijirenjian 2 months ago
parent d2e6bd9d42
commit 434e80cb4c

@ -14,11 +14,6 @@ public class TransUtil {
private static final org.slf4j.Logger logger_24a1e280 = LoggerFactory.getLogger(TransUtil.class); private static final org.slf4j.Logger logger_24a1e280 = LoggerFactory.getLogger(TransUtil.class);
private String tenantKey;
public TransUtil(){
this.tenantKey = tenantKey;
}
/** /**
* value * value
* *
@ -69,8 +64,9 @@ public class TransUtil {
public Map<String,String> getDTtripMt(String workcode){ public Map<String,String> getDTtripMt(String workcode){
RecordSet rs = I18nContextUtil.getBean(RecordSet.class); RecordSet rs = I18nContextUtil.getBean(RecordSet.class);
String poolname = CONN_TYPE.ebuilder.getType(); // String poolname = CONN_TYPE.ebuilder.getType();
rs.setTenantKey("t6kj9c07jr");//集团租户key // rs.setTenantKey("t6kj9c07jr");//集团租户key
String poolname ="E10JTZH";
Map<String,String> map = new HashMap<>(); Map<String,String> map = new HashMap<>();
if("".equals(workcode)){ if("".equals(workcode)){
return map; return map;
@ -89,13 +85,14 @@ public class TransUtil {
public Map<String,String> getResourceInfoByworkcode(String workcode ){ public Map<String,String> getResourceInfoByworkcode(String workcode ){
Map<String,String> info = new HashMap<>(); Map<String,String> info = new HashMap<>();
String tenantKey = "";
if("".equals(workcode)){ if("".equals(workcode)){
return info; return info;
} }
String sql = "SELECT a.id AS ryid, a.username AS lastname, a.job_num AS workcode, a.department AS departmentid, b.subcompanyid AS subcompanyid1 " + String sql = " SELECT a.id AS ryid, a.username AS lastname, a.job_num AS workcode, a.department AS departmentid, b.subcompanyid AS subcompanyid1 " +
" , b.name AS departmentname, c.name AS subcompanyname ,a.position as jobtitle" + " , b.name AS departmentname, c.name AS subcompanyname ,a.position as jobtitle" +
"FROM eteams.dbo.employee a, eteams.dbo.department b, eteams.dbo.department c " + " FROM eteams.dbo.employee a, eteams.dbo.department b, eteams.dbo.department c " +
"WHERE a.department = b.id " + " WHERE a.department = b.id " +
" AND c.id = b.subcompanyid " + " AND c.id = b.subcompanyid " +
" AND a.job_num = "+workcode+" " + " AND a.job_num = "+workcode+" " +
" AND a.delete_type = 0 " + " AND a.delete_type = 0 " +

@ -47,9 +47,12 @@ public class CallDTtripService extends BaseBean {
jsonObject.put("random", UUID.randomUUID().toString()); jsonObject.put("random", UUID.randomUUID().toString());
jsonObject.put("timestamp", new Date().getTime()); jsonObject.put("timestamp", new Date().getTime());
String outEmployeeId = String.valueOf(param.get("outEmployeeId")); String outEmployeeId = String.valueOf(param.get("outEmployeeId"));
String account = Util.null2String(getPropValue("htsloasync", "dttrip_account")).trim(); // String account = Util.null2String(getPropValue("htsloasync", "dttrip_account")).trim();
String password = Util.null2String(getPropValue("htsloasync", "dttrip_password")).trim(); // String password = Util.null2String(getPropValue("htsloasync", "dttrip_password")).trim();
String secret = Util.null2String(getPropValue("htsloasync", "dttrip_secret")).trim(); // String secret = Util.null2String(getPropValue("htsloasync", "dttrip_secret")).trim();
String account = configProp.getDttrip_account();
String password = configProp.getDttrip_password();
String secret =configProp.getDttrip_secret();
TransUtil tu = new TransUtil(); TransUtil tu = new TransUtil();
Map<String,String> map = tu.getDTtripMt(outEmployeeId); Map<String,String> map = tu.getDTtripMt(outEmployeeId);
if(!"".equals(Util.null2String(map.get("account")))){ if(!"".equals(Util.null2String(map.get("account")))){

@ -119,7 +119,7 @@ public class PMProjectAcceptanceAction extends BaseBean implements Action, EsbSe
for (int i = 0; i < docs.length; i++) { for (int i = 0; i < docs.length; i++) {
String docid = docs[i]; String docid = docs[i];
Map<String, String> docInfoWf = docUtil.getDocInfoWf(docid, "t6kj9c07jr"); Map<String, String> docInfoWf = docUtil.getDocInfoWf(docid );
String uploadBuffer = docInfoWf.get("base64str"); String uploadBuffer = docInfoWf.get("base64str");
String imagefilename = docInfoWf.get("filename"); String imagefilename = docInfoWf.get("filename");
logger_f17f81aa.error(String.valueOf(requestIdTemp + " 附件:" + imagefilename + " " + uploadBuffer.length())); logger_f17f81aa.error(String.valueOf(requestIdTemp + " 附件:" + imagefilename + " " + uploadBuffer.length()));

@ -165,6 +165,10 @@ public class ZOEM_PRICE_DIFFERENCE_RATE_Action extends BaseBean implements Actio
// TODO E10执行sql方法第二参数必须指定源默认使用流程源单体客户无需修改微服务/组合客户需根据查询表所属服务切换源,或使用外部数据源 // TODO E10执行sql方法第二参数必须指定源默认使用流程源单体客户无需修改微服务/组合客户需根据查询表所属服务切换源,或使用外部数据源
boolean b = rs.executeSql(sql, poolname); boolean b = rs.executeSql(sql, poolname);
log.error("b -----"+ b); log.error("b -----"+ b);
if(ret[0].equals("E")){
return WeaResult.fail(500, "OEM成品差价率失败" + sb, getResultMapForAction(weaverResultMap, "result", "", requestinfo.getRequestManager()));
}
} catch (Exception e) { } catch (Exception e) {
log.error("ZOEM_PRICE_DIFFERENCE_RATE_Action-error-" , e); log.error("ZOEM_PRICE_DIFFERENCE_RATE_Action-error-" , e);

@ -184,7 +184,7 @@ public class ZWZX_CG_FileUploadAction extends BaseBean implements Action, EsbSer
// fi.close(); // fi.close();
// // 这里就可以封装 文件名和文件内容 传给第三方系统 // // 这里就可以封装 文件名和文件内容 传给第三方系统
// } // }
Map<String, String> docInfoWf = docUtil.getDocInfoWf(docid, "t6kj9c07jr"); Map<String, String> docInfoWf = docUtil.getDocInfoWf(docid );
String uploadBuffer = docInfoWf.get("base64str"); String uploadBuffer = docInfoWf.get("base64str");
String imagefilename = docInfoWf.get("filename"); String imagefilename = docInfoWf.get("filename");
logger_323752e9.error(String.valueOf(requestID + " 附件:" + imagefilename + " " + uploadBuffer.length())); logger_323752e9.error(String.valueOf(requestID + " 附件:" + imagefilename + " " + uploadBuffer.length()));

@ -186,7 +186,7 @@ public class ZZ_GDFileUploadAction extends BaseBean implements Action, EsbServer
// fi.close(); // fi.close();
// // 这里就可以封装 文件名和文件内容 传给第三方系统 // // 这里就可以封装 文件名和文件内容 传给第三方系统
// } // }
Map<String, String> docInfoWf = docUtil.getDocInfoWf(docid, "t6kj9c07jr"); Map<String, String> docInfoWf = docUtil.getDocInfoWf(docid );
String uploadBuffer = docInfoWf.get("base64str"); String uploadBuffer = docInfoWf.get("base64str");
String imagefilename = docInfoWf.get("filename"); String imagefilename = docInfoWf.get("filename");
logger_b14cb5d0.error(String.valueOf(requestID + " 附件:" + imagefilename + " " + uploadBuffer.length())); logger_b14cb5d0.error(String.valueOf(requestID + " 附件:" + imagefilename + " " + uploadBuffer.length()));

@ -160,7 +160,7 @@ public class ZZ_Ten_GDFileUploadAction extends BaseBean implements Action, EsbSe
// 附件 // 附件
RecordSet rs = I18nContextUtil.getBean(RecordSet.class); RecordSet rs = I18nContextUtil.getBean(RecordSet.class);
JSONArray fileVOListArr = new JSONArray(); JSONArray fileVOListArr = new JSONArray();
if (!"".equals(fileIds) && !"4814".equals(workFlowId)) { if (!"".equals(fileIds) && !"100003460000004814".equals(workFlowId)) {
String[] docs = fileIds.split(","); String[] docs = fileIds.split(",");
for (int i = 0; i < docs.length; i++) { for (int i = 0; i < docs.length; i++) {
String docid = docs[i]; String docid = docs[i];
@ -198,7 +198,7 @@ public class ZZ_Ten_GDFileUploadAction extends BaseBean implements Action, EsbSe
// fi.close(); // fi.close();
// // 这里就可以封装 文件名和文件内容 传给第三方系统 // // 这里就可以封装 文件名和文件内容 传给第三方系统
// } // }
Map<String, String> docInfoWf = docUtil.getDocInfoWf(docid, "t6kj9c07jr"); Map<String, String> docInfoWf = docUtil.getDocInfoWf(docid);
String uploadBuffer = docInfoWf.get("base64str"); String uploadBuffer = docInfoWf.get("base64str");
String imagefilename = docInfoWf.get("filename"); String imagefilename = docInfoWf.get("filename");
logger_8ab26152.error(String.valueOf(requestID + " 附件:" + imagefilename + " " + uploadBuffer.length())); logger_8ab26152.error(String.valueOf(requestID + " 附件:" + imagefilename + " " + uploadBuffer.length()));

@ -6,6 +6,7 @@ import com.weaver.common.i18n.tool.util.I18nContextUtil;
import com.weaver.eteams.file.client.file.FileObj; import com.weaver.eteams.file.client.file.FileObj;
import com.weaver.eteams.file.client.param.RemoteUploadParam; import com.weaver.eteams.file.client.param.RemoteUploadParam;
import com.weaver.file.ud.api.FileUploadService; import com.weaver.file.ud.api.FileUploadService;
import com.weaver.framework.rpc.context.impl.TenantRpcContext;
import com.weaver.teams.domain.EntityType; import com.weaver.teams.domain.EntityType;
import com.weaver.teams.domain.user.SimpleEmployee; import com.weaver.teams.domain.user.SimpleEmployee;
import com.weaver.verupgrade.api.doc.detail.service.DocSaveService; import com.weaver.verupgrade.api.doc.detail.service.DocSaveService;
@ -173,9 +174,13 @@ public class DocUtil {
} }
public Map<String,String> getDocInfoWf(String fileid,String tenantKey) throws Exception { public Map<String,String> getDocInfoWf(String fileid) throws Exception {
RecordSet rs = I18nContextUtil.getBean(RecordSet.class); RecordSet rs = I18nContextUtil.getBean(RecordSet.class);
String poolname = CONN_TYPE.document.getType(); String poolname = CONN_TYPE.document.getType();
String tenantKey = TenantRpcContext.getTenantKey();
log.error("getDocInfoWf tenantKey:" + tenantKey);
rs.setTenantKey(tenantKey); rs.setTenantKey(tenantKey);
Map<String,String> docmap = new HashMap<>(); Map<String,String> docmap = new HashMap<>();
String uploadBuffer="";//base64字符串 String uploadBuffer="";//base64字符串

Loading…
Cancel
Save