Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apps-collaboration
Project
Project
Details
Activity
Releases
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
高燕
apps-collaboration
Commits
5aec60e7
Commit
5aec60e7
authored
Nov 18, 2020
by
gaoyingwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:更新上传附件
parent
dd7ebaa0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
FileManagerImpl.java
...eeyon/ctp/common/filemanager/manager/FileManagerImpl.java
+11
-10
No files found.
src/main/java/com/seeyon/ctp/common/filemanager/manager/FileManagerImpl.java
View file @
5aec60e7
...
@@ -484,9 +484,9 @@ public class FileManagerImpl implements FileManager {
...
@@ -484,9 +484,9 @@ public class FileManagerImpl implements FileManager {
//TODO: 配置组件完成后,释放下行注释
//TODO: 配置组件完成后,释放下行注释
encryptVersion
=
CoderFactory
.
getInstance
().
getEncryptVersion
();
encryptVersion
=
CoderFactory
.
getInstance
().
getEncryptVersion
();
String
level
=
request
.
getParameter
(
"secretLevel"
);
String
level
=
request
.
getParameter
(
"secretLevel"
);
if
(
level
.
equals
(
"4"
)
||
level
.
equals
(
"5"
))
{
if
(
encryptVersion
!=
null
&&
!
IConfigPublicKey
.
NO
.
equals
(
encryptVersion
)
&&
!
"false"
.
equals
(
isEncrypt
))
{
// 统一由系统开关配置控制,除非模块设置成false不要求加密
if
(
encryptVersion
!=
null
&&
!
IConfigPublicKey
.
NO
.
equals
(
encryptVersion
)
&&
!
"false"
.
equals
(
isEncrypt
))
{
// 统一由系统开关配置控制,除非模块设置成false不要求加密
if
(
StringUtils
.
isBlank
(
level
)
||
level
.
equals
(
"4"
)
||
level
.
equals
(
"5"
)
)
{
bos
=
new
BufferedOutputStream
(
new
FileOutputStream
(
destFile
));
bos
=
new
BufferedOutputStream
(
new
FileOutputStream
(
destFile
));
CoderFactory
.
getInstance
().
upload
(
fi
.
getInputStream
(),
bos
,
encryptVersion
);
CoderFactory
.
getInstance
().
upload
(
fi
.
getInputStream
(),
bos
,
encryptVersion
);
}
}
}
else
{
}
else
{
...
@@ -494,14 +494,15 @@ public class FileManagerImpl implements FileManager {
...
@@ -494,14 +494,15 @@ public class FileManagerImpl implements FileManager {
}
}
//文件加标
//文件加标
Integer
secretLevel
=
colManager
.
selectMemberSecretLevel
(
AppContext
.
getCurrentUser
().
getId
());
Integer
secretLevel
=
colManager
.
selectMemberSecretLevel
(
AppContext
.
getCurrentUser
().
getId
());
//判断人员密集
if
(!(((
secretLevel
.
equals
(
1
)||
secretLevel
.
equals
(
5
))&&(
Integer
.
parseInt
(
level
)>=
4
))
||
(
secretLevel
.
equals
(
2
)&&
Integer
.
parseInt
(
level
)>=
3
)
||
(
secretLevel
.
equals
(
3
)&&
Integer
.
parseInt
(
level
)>=
2
))){
log
.
error
(
"文件密级标志大于人员密级"
);
throw
new
BusinessException
(
"文件密级标志大于人员密级"
);
}
if
(
level
.
equals
(
"1"
)
||
level
.
equals
(
"2"
)
||
level
.
equals
(
"3"
))
{
if
(
StringUtils
.
isNotBlank
(
level
)
&&
(
level
.
equals
(
"1"
)
||
level
.
equals
(
"2"
)
||
level
.
equals
(
"3"
)))
{
//判断人员密集
if
(!(((
secretLevel
.
equals
(
1
)||
secretLevel
.
equals
(
5
))&&(
Integer
.
parseInt
(
level
)>=
4
))
||
(
secretLevel
.
equals
(
2
)&&
Integer
.
parseInt
(
level
)>=
3
)
||
(
secretLevel
.
equals
(
3
)&&
Integer
.
parseInt
(
level
)>=
2
))){
log
.
error
(
"文件密级标志大于人员密级"
);
throw
new
BusinessException
(
"文件密级标志大于人员密级"
);
}
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
date
=
sdf
.
format
(
new
Date
());
String
date
=
sdf
.
format
(
new
Date
());
int
secrecyLevel
=
5
;
int
secrecyLevel
=
5
;
...
...
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