Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-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
hg-smart
Commits
827df551
Commit
827df551
authored
Oct 23, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.调整文件下载,改为直接通过链接下载
parent
b3650156
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
11 deletions
+13
-11
ServiceHGWD001C.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD001C.java
+7
-4
HGWD001.js
src/main/webapp/HG/WD/HGWD001.js
+3
-5
HGWD001.jsp
src/main/webapp/HG/WD/HGWD001.jsp
+1
-0
HGWD001C1.js
src/main/webapp/HG/WD/HGWD001C1.js
+2
-2
No files found.
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001C.java
View file @
827df551
...
@@ -96,10 +96,13 @@ public class ServiceHGWD001C extends ServiceBase {
...
@@ -96,10 +96,13 @@ public class ServiceHGWD001C extends ServiceBase {
*/
*/
public
EiInfo
add
(
EiInfo
inInfo
)
{
public
EiInfo
add
(
EiInfo
inInfo
)
{
try
{
try
{
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
,
EiConstant
.
resultBlock
);
HGWD001C
fWd001C
=
MapUtils
.
toDaoEPBase
(
inInfo
,
EiConstant
.
resultBlock
,
HGWD001C
.
class
);
String
fileId
=
MapUtils
.
getString
(
queryMap
,
HGWD001
.
FIELD_FILE_ID
);
// 写入下载记录
// 写入下载记录
this
.
saveData
(
inInfo
,
fileId
);
this
.
saveData
(
inInfo
,
fWd001C
.
getFileId
());
// 构建文件HTTP地址
String
url
=
Iplat4jUtils
.
buildDocUrl
(
fWd001C
.
getDocId
());
AssertUtils
.
isEmpty
(
url
,
"文件地址异常,请联系管理人员!"
);
inInfo
.
set
(
"url"
,
url
);
inInfo
.
setMsg
(
"操作成功"
);
inInfo
.
setMsg
(
"操作成功"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"操作失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"操作失败"
);
...
@@ -120,7 +123,7 @@ public class ServiceHGWD001C extends ServiceBase {
...
@@ -120,7 +123,7 @@ public class ServiceHGWD001C extends ServiceBase {
String
fileName
=
MapUtils
.
getString
(
queryMap
,
HGWD001
.
FIELD_FILE_NAME
);
String
fileName
=
MapUtils
.
getString
(
queryMap
,
HGWD001
.
FIELD_FILE_NAME
);
String
zipName
=
fileName
+
"_"
+
DateUtils
.
shortDateTime
();
String
zipName
=
fileName
+
"_"
+
DateUtils
.
shortDateTime
();
List
<
String
>
docIds
=
ObjectUtils
.
listKey
(
inInfo
,
HGWD099
.
FIELD_DOC_ID
);
List
<
String
>
docIds
=
ObjectUtils
.
listKey
(
inInfo
,
HGWD099
.
FIELD_DOC_ID
);
inInfo
.
set
(
"
downloadU
rl"
,
Iplat4jUtils
.
compressFile
(
docIds
,
zipName
));
inInfo
.
set
(
"
u
rl"
,
Iplat4jUtils
.
compressFile
(
docIds
,
zipName
));
// 写入下载记录
// 写入下载记录
this
.
saveData
(
inInfo
,
fileId
);
this
.
saveData
(
inInfo
,
fileId
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
src/main/webapp/HG/WD/HGWD001.js
View file @
827df551
...
@@ -481,14 +481,12 @@ $(function () {
...
@@ -481,14 +481,12 @@ $(function () {
e
.
preventDefault
();
e
.
preventDefault
();
deleteFunc
();
deleteFunc
();
},
},
columns
:
[
columns
:
[{
{
field
:
"operator"
,
field
:
"operator"
,
title
:
"操作"
,
title
:
"操作"
,
readonly
:
true
,
readonly
:
true
,
template
:
function
(
item
)
{
template
:
function
(
item
)
{
let
template
=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
let
template
=
""
;
+
'href="'
+
downloadHref
(
item
.
docId
)
+
'">下载</a>'
;
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="changeFile(
\'
'
+
item
.
docId
+
'
\'
,
\'
'
+
item
.
bizId
+
'
\'
)" target="_blank">变更</a>'
;
+
'onclick="changeFile(
\'
'
+
item
.
docId
+
'
\'
,
\'
'
+
item
.
bizId
+
'
\'
)" target="_blank">变更</a>'
;
return
template
;
return
template
;
...
@@ -554,7 +552,7 @@ $(function () {
...
@@ -554,7 +552,7 @@ $(function () {
//确认发布
//确认发布
$
(
"#confirmRelease"
).
on
(
"click"
,
updateRelease
);
$
(
"#confirmRelease"
).
on
(
"click"
,
updateRelease
);
// 批量下载
// 批量下载
$
(
"#BATCH_DOWNLOAD"
).
on
(
"click"
,
batchD
ownload
);
$
(
"#BATCH_DOWNLOAD"
).
on
(
"click"
,
d
ownload
);
});
});
let
query
=
function
()
{
let
query
=
function
()
{
...
...
src/main/webapp/HG/WD/HGWD001.jsp
View file @
827df551
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<c:set
var=
"loginName"
value=
"<%=userId%>"
/>
<c:set
var=
"loginName"
value=
"<%=userId%>"
/>
<script
type=
"text/javascript"
src=
"${ctx}/common/js/dayjs.min.js"
></script>
<script
type=
"text/javascript"
src=
"${ctx}/common/js/dayjs.min.js"
></script>
<script
src=
"${ctx}/HG/WD/HGWD001C1.js"
></script>
<EF:EFPage
title=
"文档库"
>
<EF:EFPage
title=
"文档库"
>
...
...
src/main/webapp/HG/WD/HGWD001C1.js
View file @
827df551
...
@@ -26,7 +26,7 @@ let singleDownload = function (row) {
...
@@ -26,7 +26,7 @@ let singleDownload = function (row) {
EiCommunicator
.
send
(
"HGWD001C"
,
"add"
,
inInfo
,
{
EiCommunicator
.
send
(
"HGWD001C"
,
"add"
,
inInfo
,
{
onSuccess
(
res
)
{
onSuccess
(
res
)
{
if
(
res
.
status
>
-
1
)
{
if
(
res
.
status
>
-
1
)
{
window
.
open
(
CommonUtils
.
downloadFile
(
row
[
'docId'
],
false
)
,
'_blank'
);
window
.
open
(
res
.
extAttr
.
url
,
'_blank'
);
}
else
{
}
else
{
message
(
res
.
msg
);
message
(
res
.
msg
);
}
}
...
@@ -44,7 +44,7 @@ let batchDownload = function () {
...
@@ -44,7 +44,7 @@ let batchDownload = function () {
JSUtils
.
submitGridsData
(
"result"
,
"HGWD001C"
,
"batchDownload"
,
false
,
JSUtils
.
submitGridsData
(
"result"
,
"HGWD001C"
,
"batchDownload"
,
false
,
function
(
res
)
{
function
(
res
)
{
if
(
res
.
status
>
-
1
)
{
if
(
res
.
status
>
-
1
)
{
window
.
open
(
res
.
extAttr
.
downloadU
rl
,
'_blank'
);
window
.
open
(
res
.
extAttr
.
u
rl
,
'_blank'
);
}
}
}
}
);
);
...
...
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