Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
qianhe-ydsj
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangyun
qianhe-ydsj
Commits
cd51ac1c
Commit
cd51ac1c
authored
Oct 10, 2024
by
jiang'yun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改问题
parent
0b009a22
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletions
+12
-1
qianhe-admin/src/main/java/com/qianhe/web/controller/common/CommonController.java
+6
-1
qianhe-ydsj/src/main/java/com/qianhe/service/impl/BzscCyglqglscZbServiceImpl.java
+6
-0
No files found.
qianhe-admin/src/main/java/com/qianhe/web/controller/common/CommonController.java
View file @
cd51ac1c
...
...
@@ -58,7 +58,11 @@ public class CommonController
throw
new
Exception
(
StringUtils
.
format
(
"文件名称({})非法,不允许下载。 "
,
fileName
));
}
String
realFileName
=
System
.
currentTimeMillis
()
+
fileName
.
substring
(
fileName
.
indexOf
(
"_"
)
+
1
);
String
filePath
=
RuoYiConfig
.
getDownloadPath
()
+
fileName
;
String
localPath
=
RuoYiConfig
.
getProfile
();
// // 数据库资源地址
String
filePath
=
localPath
+
StringUtils
.
substringAfter
(
fileName
,
Constants
.
RESOURCE_PREFIX
);
// String downloadPath = RuoYiConfig.getDownloadPath();
// String filePath = downloadPath + fileName;
response
.
setContentType
(
MediaType
.
APPLICATION_OCTET_STREAM_VALUE
);
FileUtils
.
setAttachmentResponseHeader
(
response
,
realFileName
);
...
...
@@ -184,6 +188,7 @@ public class CommonController
xx
.
setFjmc
(
file
.
getOriginalFilename
());
xx
.
setLrr
(
SecurityUtils
.
getUsername
());
xx
.
setLrsj
(
DateUtils
.
getNowDate
());
xx
.
setYl1
(
yl1
);
wdWdxxRdList
.
add
(
xx
);
}
if
(
wdWdxxRdList
.
size
()>
0
){
...
...
qianhe-ydsj/src/main/java/com/qianhe/service/impl/BzscCyglqglscZbServiceImpl.java
View file @
cd51ac1c
...
...
@@ -3,6 +3,7 @@ package com.qianhe.service.impl;
import
java.util.Iterator
;
import
java.util.List
;
import
cn.hutool.core.codec.Base64
;
import
cn.hutool.core.lang.tree.TreeUtil
;
import
com.qianhe.common.annotation.DataScope
;
import
com.qianhe.common.core.domain.BaseEntity
;
...
...
@@ -74,6 +75,7 @@ public class BzscCyglqglscZbServiceImpl implements IBzscCyglqglscZbService
@Override
public
int
insertBzscCyglqglscZb
(
BzscCyglqglscZb
bzscCyglqglscZb
)
{
bzscCyglqglscZb
.
setCreateTime
(
DateUtils
.
getNowDate
());
bzscCyglqglscZb
.
setCreateBy
(
SecurityUtils
.
getUsername
());
int
rows
=
bzscCyglqglscZbMapper
.
insertBzscCyglqglscZb
(
bzscCyglqglscZb
);
...
...
@@ -145,6 +147,7 @@ public class BzscCyglqglscZbServiceImpl implements IBzscCyglqglscZbService
bzscCyglqglscCb
.
setParentId
(
0L
);
bzscCyglqglscCb
.
setDeptId
(
bzscCyglqglscZb
.
getDeptId
());
bzscCyglqglscCb
.
setNd
(
bzscCyglqglscZb
.
getNd
());
bzscCyglqglscCb
.
setNr
(
new
String
(
Base64
.
decode
(
bzscCyglqglscCb
.
getNr
())));
bzscCyglqglscZbMapper
.
insertBzscCyglqglscCb
(
bzscCyglqglscCb
);
if
(
StringUtils
.
isNotNull
(
bzscCyglqglscCb
.
getChildList
())){
for
(
BzscCyglqglscCb
cb1:
bzscCyglqglscCb
.
getChildList
()){
...
...
@@ -152,6 +155,7 @@ public class BzscCyglqglscZbServiceImpl implements IBzscCyglqglscZbService
cb1
.
setParentId
(
bzscCyglqglscCb
.
getID
());
cb1
.
setDeptId
(
bzscCyglqglscZb
.
getDeptId
());
cb1
.
setNd
(
bzscCyglqglscZb
.
getNd
());
cb1
.
setNr
(
new
String
(
Base64
.
decode
(
cb1
.
getNr
())));
bzscCyglqglscZbMapper
.
insertBzscCyglqglscCb
(
cb1
);
if
(
cb1
.
getChildList
().
size
()>
0
){
for
(
BzscCyglqglscCb
cb2:
cb1
.
getChildList
()){
...
...
@@ -159,6 +163,7 @@ public class BzscCyglqglscZbServiceImpl implements IBzscCyglqglscZbService
cb2
.
setParentId
(
cb1
.
getID
());
cb2
.
setDeptId
(
bzscCyglqglscZb
.
getDeptId
());
cb2
.
setNd
(
bzscCyglqglscZb
.
getNd
());
cb2
.
setNr
(
new
String
(
Base64
.
decode
(
cb2
.
getNr
())));
bzscCyglqglscZbMapper
.
insertBzscCyglqglscCb
(
cb2
);
}
}
else
{
...
...
@@ -169,6 +174,7 @@ public class BzscCyglqglscZbServiceImpl implements IBzscCyglqglscZbService
cb2
.
setParentId
(
cb1
.
getID
());
cb2
.
setDeptId
(
bzscCyglqglscZb
.
getDeptId
());
cb2
.
setNd
(
bzscCyglqglscZb
.
getNd
());
cb2
.
setNr
(
new
String
(
Base64
.
decode
(
cb2
.
getNr
())));
bzscCyglqglscZbMapper
.
insertBzscCyglqglscCb
(
cb2
);
}
}
...
...
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