Commit 79373890 by liuyang

2024/03/14 文件下载和文件删除调整

parent aaf8be59
...@@ -787,8 +787,16 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -787,8 +787,16 @@ public class ServiceHPSC002 extends ServiceBase {
// 项目环境 // 项目环境
String projectEnv = ProjectInfo.getProjectEnv(); String projectEnv = ProjectInfo.getProjectEnv();
if (projectEnv.equals(CommonConstant.projectEnv.RUN)) { if (projectEnv.equals(CommonConstant.projectEnv.RUN)) {
EiInfo queryInfo = new EiInfo();
queryInfo.set(HPSC002A.FIELD_DOC_ID,hpds002.getDocId());
//获取文档信息
queryInfo.set(EiConstant.serviceId,"S_EU_0102");
EiInfo docInfo = XServiceManager.call(queryInfo);
//数据库
Map docInfoMap = docInfo.getMap("docMap");
if (docInfoMap.size() > 0) {
EiInfo eiInfo = new EiInfo(); EiInfo eiInfo = new EiInfo();
eiInfo.set("data",realPath+"-"+0); eiInfo.set("data",docInfoMap.get("url")+"-"+0);
eiInfo.set(EiConstant.serviceId,"S_EU_0105"); eiInfo.set(EiConstant.serviceId,"S_EU_0105");
//调用接口 //调用接口
EiInfo outInfo = XServiceManager.call(eiInfo); EiInfo outInfo = XServiceManager.call(eiInfo);
...@@ -797,6 +805,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -797,6 +805,7 @@ public class ServiceHPSC002 extends ServiceBase {
LogUtils.setDetailMsg(outInfo, new Throwable(), "查询部件类型失败"); LogUtils.setDetailMsg(outInfo, new Throwable(), "查询部件类型失败");
outInfo.setMsg("失败"); outInfo.setMsg("失败");
} }
}
}else { }else {
FileUtils.deleteFile(realPath); FileUtils.deleteFile(realPath);
} }
......
...@@ -150,8 +150,16 @@ public class ServiceHPSC002A extends ServiceEPBase { ...@@ -150,8 +150,16 @@ public class ServiceHPSC002A extends ServiceEPBase {
// 项目环境 // 项目环境
String projectEnv = ProjectInfo.getProjectEnv(); String projectEnv = ProjectInfo.getProjectEnv();
if (projectEnv.equals(CommonConstant.projectEnv.RUN)) { if (projectEnv.equals(CommonConstant.projectEnv.RUN)) {
EiInfo queryInfo = new EiInfo();
queryInfo.set(HPSC002A.FIELD_DOC_ID,list.get(0).getDocId());
//获取文档信息
queryInfo.set(EiConstant.serviceId,"S_EU_0102");
EiInfo docInfo = XServiceManager.call(queryInfo);
//数据库
Map docInfoMap = docInfo.getMap("docMap");
if (docInfoMap.size() > 0) {
EiInfo eiInfo = new EiInfo(); EiInfo eiInfo = new EiInfo();
eiInfo.set("data",realPath+"-"+0); eiInfo.set("data",docInfoMap.get("url")+"-"+0);
eiInfo.set(EiConstant.serviceId,"S_EU_0105"); eiInfo.set(EiConstant.serviceId,"S_EU_0105");
//调用接口 //调用接口
EiInfo outInfo = XServiceManager.call(eiInfo); EiInfo outInfo = XServiceManager.call(eiInfo);
...@@ -160,6 +168,7 @@ public class ServiceHPSC002A extends ServiceEPBase { ...@@ -160,6 +168,7 @@ public class ServiceHPSC002A extends ServiceEPBase {
LogUtils.setDetailMsg(outInfo, new Throwable(), "查询部件类型失败"); LogUtils.setDetailMsg(outInfo, new Throwable(), "查询部件类型失败");
outInfo.setMsg("失败"); outInfo.setMsg("失败");
} }
}
}else { }else {
FileUtils.deleteFile(realPath); FileUtils.deleteFile(realPath);
} }
......
...@@ -331,8 +331,16 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -331,8 +331,16 @@ public class ServiceHPSC006 extends ServiceBase {
// 项目环境 // 项目环境
String projectEnv = ProjectInfo.getProjectEnv(); String projectEnv = ProjectInfo.getProjectEnv();
if (projectEnv.equals(CommonConstant.projectEnv.RUN)) { if (projectEnv.equals(CommonConstant.projectEnv.RUN)) {
EiInfo queryInfo = new EiInfo();
queryInfo.set(HPSC002A.FIELD_DOC_ID,hpds002.getDocId());
//获取文档信息
queryInfo.set(EiConstant.serviceId,"S_EU_0102");
EiInfo docInfo = XServiceManager.call(queryInfo);
//数据库
Map docInfoMap = docInfo.getMap("docMap");
if (docInfoMap.size() > 0) {
EiInfo eiInfo = new EiInfo(); EiInfo eiInfo = new EiInfo();
eiInfo.set("data",realPath+"-"+0); eiInfo.set("data",docInfoMap.get("url")+"-"+0);
eiInfo.set(EiConstant.serviceId,"S_EU_0105"); eiInfo.set(EiConstant.serviceId,"S_EU_0105");
//调用接口 //调用接口
EiInfo outInfo = XServiceManager.call(eiInfo); EiInfo outInfo = XServiceManager.call(eiInfo);
...@@ -341,6 +349,7 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -341,6 +349,7 @@ public class ServiceHPSC006 extends ServiceBase {
LogUtils.setDetailMsg(outInfo, new Throwable(), "查询部件类型失败"); LogUtils.setDetailMsg(outInfo, new Throwable(), "查询部件类型失败");
outInfo.setMsg("失败"); outInfo.setMsg("失败");
} }
}
}else { }else {
FileUtils.deleteFile(realPath); FileUtils.deleteFile(realPath);
} }
......
...@@ -43,10 +43,10 @@ $(function () { ...@@ -43,10 +43,10 @@ $(function () {
field: "docName", field: "docName",
title: "文件名称", title: "文件名称",
template: function (item) { template: function (item) {
let docId = item.docId;
let docName = item.docName let docName = item.docName
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + IPLATUI.CONTEXT_PATH + '/EU/DM/EUDM06.jsp?docId=' + item.docId + 'href="' + downloadHref(docId) + '" target="_blank">'+docName+'</a>';
+ '" >'+docName+'</a>';
return template; return template;
} }
}], }],
...@@ -119,11 +119,14 @@ $(function () { ...@@ -119,11 +119,14 @@ $(function () {
NotificationUtil("请至少选中一条数据", "info"); NotificationUtil("请至少选中一条数据", "info");
} else { } else {
for (let i = 0, length = checkedRows.length; i < length; i++) { for (let i = 0, length = checkedRows.length; i < length; i++) {
docId += checkedRows[i]["docId"];
docId += "," downloadHref(checkedRows[i]["docId"])
//docId += checkedRows[i]["docId"];
//docId += ","
} }
docId = docId.substr(0, docId.lastIndexOf(','));
window.location.href = IPLATUI.CONTEXT_PATH + '/EU/DM/EUDM14.jsp?docIds=' + docId //docId = docId.substr(0, docId.lastIndexOf(','));
//window.location.href = IPLATUI.CONTEXT_PATH + '/EU/DM/EUDM14.jsp?docIds=' + 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