Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-smart
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
platform
hp-smart
Commits
79373890
Commit
79373890
authored
Mar 14, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024/03/14 文件下载和文件删除调整
parent
aaf8be59
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
31 deletions
+61
-31
ServiceHPSC002.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
+18
-9
ServiceHPSC002A.java
...java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002A.java
+17
-8
ServiceHPSC006.java
.../java/com/baosight/hpjx/hp/sc/service/ServiceHPSC006.java
+17
-8
HPXS002.js
src/main/webapp/HP/XS/HPXS002.js
+9
-6
No files found.
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002.java
View file @
79373890
...
...
@@ -787,15 +787,24 @@ public class ServiceHPSC002 extends ServiceBase {
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
projectEnv
.
equals
(
CommonConstant
.
projectEnv
.
RUN
))
{
EiInfo
eiInfo
=
new
EiInfo
();
eiInfo
.
set
(
"data"
,
realPath
+
"-"
+
0
);
eiInfo
.
set
(
EiConstant
.
serviceId
,
"S_EU_0105"
);
//调用接口
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
if
(
outInfo
.
getStatus
()
==
EiConstant
.
STATUS_FAILURE
){
LogUtils
.
setDetailMsg
(
outInfo
,
new
Throwable
(),
"查询部件类型失败"
);
outInfo
.
setMsg
(
"失败"
);
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
.
set
(
"data"
,
docInfoMap
.
get
(
"url"
)+
"-"
+
0
);
eiInfo
.
set
(
EiConstant
.
serviceId
,
"S_EU_0105"
);
//调用接口
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
if
(
outInfo
.
getStatus
()
==
EiConstant
.
STATUS_FAILURE
){
LogUtils
.
setDetailMsg
(
outInfo
,
new
Throwable
(),
"查询部件类型失败"
);
outInfo
.
setMsg
(
"失败"
);
}
}
}
else
{
FileUtils
.
deleteFile
(
realPath
);
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC002A.java
View file @
79373890
...
...
@@ -150,15 +150,24 @@ public class ServiceHPSC002A extends ServiceEPBase {
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
projectEnv
.
equals
(
CommonConstant
.
projectEnv
.
RUN
))
{
EiInfo
eiInfo
=
new
EiInfo
();
eiInfo
.
set
(
"data"
,
realPath
+
"-"
+
0
);
eiInfo
.
set
(
EiConstant
.
serviceId
,
"S_EU_0105"
);
//调用接口
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
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
.
set
(
"data"
,
docInfoMap
.
get
(
"url"
)+
"-"
+
0
);
eiInfo
.
set
(
EiConstant
.
serviceId
,
"S_EU_0105"
);
//调用接口
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
if
(
outInfo
.
getStatus
()
==
EiConstant
.
STATUS_FAILURE
){
LogUtils
.
setDetailMsg
(
outInfo
,
new
Throwable
(),
"查询部件类型失败"
);
outInfo
.
setMsg
(
"失败"
);
if
(
outInfo
.
getStatus
()
==
EiConstant
.
STATUS_FAILURE
){
LogUtils
.
setDetailMsg
(
outInfo
,
new
Throwable
(),
"查询部件类型失败"
);
outInfo
.
setMsg
(
"失败"
);
}
}
}
else
{
FileUtils
.
deleteFile
(
realPath
);
...
...
src/main/java/com/baosight/hpjx/hp/sc/service/ServiceHPSC006.java
View file @
79373890
...
...
@@ -331,15 +331,24 @@ public class ServiceHPSC006 extends ServiceBase {
// 项目环境
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
projectEnv
.
equals
(
CommonConstant
.
projectEnv
.
RUN
))
{
EiInfo
eiInfo
=
new
EiInfo
();
eiInfo
.
set
(
"data"
,
realPath
+
"-"
+
0
);
eiInfo
.
set
(
EiConstant
.
serviceId
,
"S_EU_0105"
);
//调用接口
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
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
.
set
(
"data"
,
docInfoMap
.
get
(
"url"
)+
"-"
+
0
);
eiInfo
.
set
(
EiConstant
.
serviceId
,
"S_EU_0105"
);
//调用接口
EiInfo
outInfo
=
XServiceManager
.
call
(
eiInfo
);
if
(
outInfo
.
getStatus
()
==
EiConstant
.
STATUS_FAILURE
){
LogUtils
.
setDetailMsg
(
outInfo
,
new
Throwable
(),
"查询部件类型失败"
);
outInfo
.
setMsg
(
"失败"
);
if
(
outInfo
.
getStatus
()
==
EiConstant
.
STATUS_FAILURE
){
LogUtils
.
setDetailMsg
(
outInfo
,
new
Throwable
(),
"查询部件类型失败"
);
outInfo
.
setMsg
(
"失败"
);
}
}
}
else
{
FileUtils
.
deleteFile
(
realPath
);
...
...
src/main/webapp/HP/XS/HPXS002.js
View file @
79373890
...
...
@@ -43,10 +43,10 @@ $(function () {
field
:
"docName"
,
title
:
"文件名称"
,
template
:
function
(
item
)
{
let
docId
=
item
.
docId
;
let
docName
=
item
.
docName
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
+
'" >'
+
docName
+
'</a>'
;
+
'href="'
+
downloadHref
(
docId
)
+
'" target="_blank">'
+
docName
+
'</a>'
;
return
template
;
}
}],
...
...
@@ -119,11 +119,14 @@ $(function () {
NotificationUtil
(
"请至少选中一条数据"
,
"info"
);
}
else
{
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
}
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment