Commit abd3a0b4 by liuyang

修复企业log显示

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