Commit abd3a0b4 by liuyang

修复企业log显示

parent d6b8b689
......@@ -5,6 +5,7 @@ import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.OrgTypeEnum;
import com.baosight.hggp.core.enums.ValidFlagEnum;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.pz.domain.HGPZ009;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
......@@ -66,9 +67,10 @@ public class ServiceHGPZ009 extends ServiceBase {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
// 排除虚拟企业
queryRow.put("exValidFlag", ValidFlagEnum.VIRTUALLY.getCode());
queryRow.put("accountCode", UserSessionUtils.getAccountCode());
inInfo = super.query(inInfo, HGPZ009.QUERY, new HGPZ009());
String projectEnv = ProjectInfo.getProjectEnv();
inInfo.setCell(EiConstant.resultBlock, ACConstants.ROW_CODE_0, "projectEnv", projectEnv);
//String projectEnv = ProjectInfo.getProjectEnv();
//inInfo.setCell(EiConstant.resultBlock, ACConstants.ROW_CODE_0, "projectEnv", projectEnv);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
......
......@@ -2100,14 +2100,14 @@ $(function () {
try {
if (loginName !== "admin"){
var info = new EiInfo()
info.set("inqu_status-0-accountCode", loginName)
//info.set("inqu_status-0-accountCode", loginName)
EiCommunicator.send("HGPZ009", "query", info, {
onSuccess: function (ei) {//返回结果集
if (ei.blocks.result !== undefined){
let results = ei.getBlock("result").getMappedRows();
if (results.length>0 && results[0].docIdPc.trim().length>0){
let src = downloadHref(results[0].docIdPc.trim(),results[0].projectEnv)
let img=`<img src="${src}" style='width:200px;height:55px;background-image: none;'/>`;
//let src = downloadFile(results[0].docIdPc.trim(),true)
let img="<img src=\'"+downloadFile(results[0].docIdPc.trim(),true)+"\' style='width:200px;height:55px;background-image: none;'/>";
$("#sidebar .sidebar-content .side-header").html(img);
//$("#sidebar .sidebar-content .side-header").attr("src",downloadHref(results[0].docIdPc,results[0].projectEnv));
}else {
......@@ -2200,13 +2200,20 @@ function changepassword(formEname,formCname){
});
}
function downloadHref(docId,projectEnv) {
// S3地址有外网
// return IPLATUI.CONTEXT_PATH + ("run" == projectEnv ? ('/docFileDownload/' + docId)
// : ('/EU/DM/EUDM06.jsp?docId=' + docId));
// S3地址无外网
return IPLATUI.CONTEXT_PATH + ("run" == projectEnv ? ('/file/download/' + docId)
: ('/EU/DM/EUDM06.jsp?docId=' + docId));
/**
* 文件下载路径
*
* @param docId
* @param isPreview 是否预览,true:预览
* @returns {string}
*/
let downloadFile = function (docId, isPreview) {
if (isPreview) {
return IPLATUI.CONTEXT_PATH + '/file/download/preview/' + docId;
} else {
// S3地址必须支持公网
return IPLATUI.CONTEXT_PATH + '/file/download/' + docId;
}
}
/**
......
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