Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
a323707f
Commit
a323707f
authored
Aug 23, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[bugfix] get filename and temp file name from form
parent
18d4ab34
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
Constant.java
...api/src/main/java/pwc/taxtech/atms/constant/Constant.java
+3
-0
OutputInvoiceController.java
.../pwc/taxtech/atms/controller/OutputInvoiceController.java
+6
-1
FileUploadAdapter.java
.../pwc/taxtech/atms/vat/service/impl/FileUploadAdapter.java
+4
-2
No files found.
atms-api/src/main/java/pwc/taxtech/atms/constant/Constant.java
View file @
a323707f
...
...
@@ -33,6 +33,9 @@ public final class Constant {
public
static
final
String
IMAGE_PATH_SUCCESS
=
CURRENT_IMAGE_PATH
+
File
.
separator
+
"success.png"
;
public
static
final
String
IMAGE_PATH_WARN
=
CURRENT_IMAGE_PATH
+
File
.
separator
+
"warning1.png"
;
public
static
final
String
FILE_NAME
=
"filename"
;
public
static
final
String
TEMP_FILE_NAME
=
"tempFileName"
;
public
static
final
boolean
DEFAULT_RESULT
=
true
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/OutputInvoiceController.java
View file @
a323707f
...
...
@@ -33,6 +33,8 @@ import java.util.UUID;
import
static
javax
.
servlet
.
http
.
HttpServletResponse
.
SC_NO_CONTENT
;
import
static
javax
.
servlet
.
http
.
HttpServletResponse
.
SC_OK
;
import
static
pwc
.
taxtech
.
atms
.
constant
.
Constant
.
FILE_NAME
;
import
static
pwc
.
taxtech
.
atms
.
constant
.
Constant
.
TEMP_FILE_NAME
;
@RestController
@RequestMapping
(
value
=
"api/v1/outputInvoiceImport"
)
...
...
@@ -116,10 +118,13 @@ public class OutputInvoiceController {
}
@RequestMapping
(
value
=
"UploadEvidenceFile"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseEntity
UploadEvidenceFile
(
String
fileName
,
String
tempFileName
,
String
period
,
MultipartHttpServletRequest
request
)
{
public
ResponseEntity
UploadEvidenceFile
(
String
period
,
MultipartHttpServletRequest
request
)
{
String
userID
=
identityService
.
getIdentityUser
().
getID
();
String
fullPath
=
fileUploadAdapter
.
uploadEvidence
(
request
,
EnumModule
.
Evidence
,
userID
);
if
(
StringUtil
.
isNotEmpty
(
fullPath
))
{
String
fileName
=
request
.
getParameter
(
FILE_NAME
);
String
tempFileName
=
request
.
getParameter
(
TEMP_FILE_NAME
);
ImportFile
fileDto
=
new
ImportFile
();
fileDto
.
setFileID
(
tempFileName
.
substring
(
1
,
tempFileName
.
length
()
-
5
));
fileDto
.
setFilePath
(
fullPath
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/FileUploadAdapter.java
View file @
a323707f
...
...
@@ -20,6 +20,8 @@ import java.util.Date;
import
java.util.UUID
;
import
static
pwc
.
taxtech
.
atms
.
constant
.
Constant
.
CURRENT_USER_UPLOAD_FOLDER
;
import
static
pwc
.
taxtech
.
atms
.
constant
.
Constant
.
FILE_NAME
;
import
static
pwc
.
taxtech
.
atms
.
constant
.
Constant
.
TEMP_FILE_NAME
;
@Service
public
class
FileUploadAdapter
{
...
...
@@ -28,10 +30,10 @@ public class FileUploadAdapter {
@Value
(
"${max_file_length}"
)
private
String
maxFileSize
;
static
final
String
FILE_NAME
=
"filename"
;
private
String
_baseFolder
;
public
static
FileParamBean
CacheFileBean
;
public
static
final
String
TEMP_FILE_NAME
=
"tempFileName"
;
public
static
final
String
CHUNK_NUMBER
=
"_chunkNumber"
;
public
static
final
String
CHUNK_SIZE
=
"_chunkSize"
;
public
static
final
String
TOTAL_SIZE
=
"_totalSize"
;
...
...
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