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
d44833f1
Commit
d44833f1
authored
Jul 23, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[dev] UploadEvidenceFile impl
parent
37c45a65
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
14 deletions
+17
-14
OutputInvoiceController.java
.../pwc/taxtech/atms/controller/OutputInvoiceController.java
+15
-13
OutputInvoiceServiceImpl.java
...xtech/atms/vat/service/impl/OutputInvoiceServiceImpl.java
+2
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/OutputInvoiceController.java
View file @
d44833f1
...
...
@@ -9,6 +9,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
pwc.taxtech.atms.constant.enums.EnumModule
;
import
pwc.taxtech.atms.dto.PagingResultDto
;
import
pwc.taxtech.atms.dto.vatdto.ImportOutputInvoiceDto
;
...
...
@@ -24,6 +25,7 @@ import pwc.taxtech.atms.vat.service.impl.OutputInvoiceServiceImpl;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.OutputStream
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -114,23 +116,19 @@ public class OutputInvoiceController {
}
@RequestMapping
(
value
=
"UploadEvidenceFile"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseEntity
UploadEvidenceFile
()
{
public
ResponseEntity
UploadEvidenceFile
(
String
fileName
,
String
tempFileName
,
String
period
)
{
String
userID
=
identityService
.
getIdentityUser
().
getID
();
String
fullPath
=
fileUploadAdapter
.
uploadEvidence
(
this
,
EnumModule
.
Evidence
,
UUID
.
randomUUID
().
toString
());
if
(!
StringUtil
.
isNotEmpty
(
fullPath
))
{
// string fileName = HttpContext.Current.Request.Form["filename"];
// string _tempFileName = HttpContext.Current.Request.Form["tempFileName"];
ImportFile
fileDto
=
new
ImportFile
();
// {
// FileID = _tempFileName.Substring(1, _tempFileName.Length - 5),
// FilePath = fullPath,
// FileName = fileName,
// PeriodID = Convert.ToInt32(HttpContext.Current.Request.Form["period"]),
// FileType = Path.GetExtension(fileName),
// FileImportType = (int)EnumModule.Evidence,
// CreatorID = userID,
// CreateTime = DateTime.Now
// };
fileDto
.
setFileID
(
tempFileName
.
substring
(
1
,
tempFileName
.
length
()
-
5
));
fileDto
.
setFilePath
(
fullPath
);
fileDto
.
setFileName
(
fileName
);
fileDto
.
setPeriodID
(
Integer
.
parseInt
(
period
));
fileDto
.
setFileType
(
GetExtension
(
fileName
));
fileDto
.
setFileImportType
(
EnumModule
.
Evidence
.
getCode
());
fileDto
.
setCreatorID
(
userID
);
fileDto
.
setCreateTime
(
new
Date
());
return
ResponseEntity
.
ok
(
outputInvoiceService
.
addImportFile
(
fileDto
));
}
return
ResponseEntity
.
ok
(
false
);
...
...
@@ -141,5 +139,9 @@ public class OutputInvoiceController {
return
ResponseEntity
.
ok
(
outputInvoiceService
.
GetOutputInvoiceList
(
period
));
}
private
String
GetExtension
(
String
file
)
{
return
file
.
substring
(
file
.
lastIndexOf
(
"."
)
+
1
,
file
.
length
()
-
file
.
lastIndexOf
(
"."
));
}
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/OutputInvoiceServiceImpl.java
View file @
d44833f1
...
...
@@ -239,7 +239,8 @@ public class OutputInvoiceServiceImpl extends VatAbstractService {
}
public
Boolean
addImportFile
(
ImportFile
fileDto
)
{
return
null
;
importFileMapper
.
insert
(
fileDto
);
return
true
;
}
public
OperationResultDto
<
List
<
OutputVATInvoiceInfoDto
>>
GetOutputInvoiceList
(
int
period
)
{
...
...
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