Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
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
fangxinjiang
yifu-mvp
Commits
ea09b65b
Commit
ea09b65b
authored
Apr 12, 2024
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.6.2-工资原表识别-主逻辑提交
parent
f5ba3a81
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
TSalaryStandardOriginalController.java
.../salary/controller/TSalaryStandardOriginalController.java
+13
-9
No files found.
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TSalaryStandardOriginalController.java
View file @
ea09b65b
...
...
@@ -214,24 +214,28 @@ public class TSalaryStandardOriginalController {
}
// 上传附件
String
fileName
=
System
.
currentTimeMillis
()
+
"_"
+
file
.
getOriginalFilename
();
String
fileName
=
file
.
getOriginalFilename
();
//filePath不传默认存储空间的根目录
//jpg,jpeg,png,bmp
String
key
=
"original/"
+
fileName
;
String
key
=
"original/"
+
System
.
currentTimeMillis
()
+
"_"
+
fileName
;
boolean
flag
=
ossUtil
.
uploadFileByStream
(
file
.
getInputStream
(),
key
,
null
);
if
(
flag
)
{
char
slash
=
'/'
;
char
point
=
'.'
;
if
(
fileName
.
lastIndexOf
(
slash
)
>=
0
)
{
tSalaryStandardOriginal
.
setAttaName
(
key
.
substring
(
fileName
.
lastIndexOf
(
slash
),
fileName
.
length
()));
}
else
{
tSalaryStandardOriginal
.
setAttaName
(
fileName
);
if
(
fileName
!=
null
)
{
if
(
fileName
.
lastIndexOf
(
slash
)
>=
0
)
{
tSalaryStandardOriginal
.
setAttaName
(
fileName
.
substring
(
fileName
.
lastIndexOf
(
slash
)));
}
else
{
tSalaryStandardOriginal
.
setAttaName
(
fileName
);
}
if
(
fileName
.
lastIndexOf
(
point
)
>=
0
)
{
tSalaryStandardOriginal
.
setAttaType
(
fileName
.
substring
(
fileName
.
lastIndexOf
(
point
)));
}
else
{
tSalaryStandardOriginal
.
setAttaType
(
fileName
);
}
}
tSalaryStandardOriginal
.
setAttaSize
(
file
.
getSize
());
tSalaryStandardOriginal
.
setAttaSrc
(
key
);
if
(
key
.
lastIndexOf
(
point
)
>=
0
)
{
tSalaryStandardOriginal
.
setAttaType
(
key
.
substring
(
fileName
.
lastIndexOf
(
point
),
fileName
.
length
()));
}
}
else
{
return
R
.
failed
(
"failed:上传至存储空间失败"
);
}
...
...
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