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
7ec11571
Commit
7ec11571
authored
Jun 21, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEV] outputInvoiceImport getEvidenceList impl
parent
6a18d012
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
85 additions
and
5 deletions
+85
-5
OutputInvoiceController.java
.../pwc/taxtech/atms/controller/OutputInvoiceController.java
+10
-5
QueryEvidenceDto.java
...in/java/pwc/taxtech/atms/dto/vatdto/QueryEvidenceDto.java
+40
-0
OutputInvoiceService.java
...va/pwc/taxtech/atms/vat/service/OutputInvoiceService.java
+4
-0
FinanceDataImportServiceImpl.java
...h/atms/vat/service/impl/FinanceDataImportServiceImpl.java
+2
-0
OutputInvoiceServiceImpl.java
...xtech/atms/vat/service/impl/OutputInvoiceServiceImpl.java
+29
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/OutputInvoiceController.java
View file @
7ec11571
...
...
@@ -3,12 +3,14 @@ package pwc.taxtech.atms.controller;
import
org.apache.http.HttpStatus
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.ResponseEntity
;
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
pwc.taxtech.atms.dto.PagingResultDto
;
import
pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto
;
import
pwc.taxtech.atms.dto.vatdto.QueryEvidenceDto
;
import
pwc.taxtech.atms.dto.vatdto.QueryOutputDto
;
import
pwc.taxtech.atms.thirdparty.ExcelUtil
;
import
pwc.taxtech.atms.vat.service.OutputInvoiceService
;
...
...
@@ -38,17 +40,15 @@ public class OutputInvoiceController {
response
.
setContentType
(
"application/vnd.ms-excel;charset=utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
UUID
.
randomUUID
()
+
".xls"
);
response
.
setHeader
(
"x-file-name"
,
UUID
.
randomUUID
()
+
".xlsx"
);
response
.
setHeader
(
"x-file-name"
,
UUID
.
randomUUID
()
+
".xlsx"
);
OutputStream
os
=
null
;
try
{
os
=
response
.
getOutputStream
();
int
count
=
getDownloadFilePath
(
paras
,
os
);
if
(
count
==
0
)
{
if
(
count
==
0
)
{
response
.
setStatus
(
HttpStatus
.
SC_NO_CONTENT
);
}
else
{
}
else
{
response
.
setStatus
(
HttpStatus
.
SC_OK
);
}
}
catch
(
IOException
e
)
{
...
...
@@ -56,6 +56,11 @@ public class OutputInvoiceController {
}
}
@RequestMapping
(
value
=
"getEvidenceList"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseEntity
getEvidenceList
(
@RequestBody
QueryEvidenceDto
queryDto
)
{
return
ResponseEntity
.
ok
().
body
(
outputInvoiceService
.
getEvidenceList
(
queryDto
));
}
private
int
getDownloadFilePath
(
QueryOutputDto
paras
,
OutputStream
outputStream
)
{
List
<
OutputVATInvoiceInfoDto
>
list
=
outputInvoiceService
.
getExportOutputInvoiceList
(
paras
).
getData
();
if
(
list
.
size
()
==
0
)
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/QueryEvidenceDto.java
0 → 100644
View file @
7ec11571
package
pwc
.
taxtech
.
atms
.
dto
.
vatdto
;
public
class
QueryEvidenceDto
{
private
Integer
queryType
;
private
String
queryString
;
private
Boolean
isCurrentPeriod
;
private
Integer
periodId
;
public
Integer
getQueryType
()
{
return
queryType
;
}
public
void
setQueryType
(
Integer
queryType
)
{
this
.
queryType
=
queryType
;
}
public
String
getQueryString
()
{
return
queryString
;
}
public
void
setQueryString
(
String
queryString
)
{
this
.
queryString
=
queryString
;
}
public
Boolean
getCurrentPeriod
()
{
return
isCurrentPeriod
;
}
public
void
setCurrentPeriod
(
Boolean
currentPeriod
)
{
isCurrentPeriod
=
currentPeriod
;
}
public
Integer
getPeriodId
()
{
return
periodId
;
}
public
void
setPeriodId
(
Integer
periodId
)
{
this
.
periodId
=
periodId
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/OutputInvoiceService.java
View file @
7ec11571
...
...
@@ -3,7 +3,9 @@ package pwc.taxtech.atms.vat.service;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.PagingResultDto
;
import
pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto
;
import
pwc.taxtech.atms.dto.vatdto.QueryEvidenceDto
;
import
pwc.taxtech.atms.dto.vatdto.QueryOutputDto
;
import
pwc.taxtech.atms.vat.entity.ImportFile
;
import
java.util.List
;
...
...
@@ -11,4 +13,6 @@ public interface OutputInvoiceService {
PagingResultDto
<
OutputVATInvoiceInfoDto
>
queryOutputInvoiceList
(
QueryOutputDto
queryDto
);
OperationResultDto
<
List
<
OutputVATInvoiceInfoDto
>>
getExportOutputInvoiceList
(
QueryOutputDto
queryDto
);
List
<
ImportFile
>
getEvidenceList
(
QueryEvidenceDto
queryDto
);
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/FinanceDataImportServiceImpl.java
View file @
7ec11571
...
...
@@ -2,6 +2,7 @@ package pwc.taxtech.atms.vat.service.impl;
import
com.alibaba.fastjson.JSON
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.constant.VatErpImportValidation
;
import
pwc.taxtech.atms.constant.enums.ErpCheckType
;
import
pwc.taxtech.atms.constant.enums.ImageType
;
...
...
@@ -40,6 +41,7 @@ import static pwc.taxtech.atms.constant.VATCommon.ValidationExisted;
import
static
pwc
.
taxtech
.
atms
.
constant
.
enums
.
EnumValidationType
.
ErpBasicCheck
;
import
static
pwc
.
taxtech
.
atms
.
constant
.
enums
.
ImageType
.
Alert
;
@Service
public
class
FinanceDataImportServiceImpl
implements
FinanceDataImportService
{
@Autowired
private
ValidationInfoMapper
validationInfoMapper
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/OutputInvoiceServiceImpl.java
View file @
7ec11571
package
pwc
.
taxtech
.
atms
.
vat
.
service
.
impl
;
import
org.apache.commons.lang3.StringUtils
;
import
org.reflections.util.Utils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.common.CommonUtils
;
import
pwc.taxtech.atms.common.PagingList
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.PagingResultDto
;
import
pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto
;
import
pwc.taxtech.atms.dto.vatdto.QueryEvidenceDto
;
import
pwc.taxtech.atms.dto.vatdto.QueryOutputDto
;
import
pwc.taxtech.atms.vat.dao.ImportFileMapper
;
import
pwc.taxtech.atms.vat.entity.ImportFile
;
import
pwc.taxtech.atms.vat.entity.ImportFileExample
;
import
pwc.taxtech.atms.vat.entity.OutputVATInvoiceItem
;
import
pwc.taxtech.atms.vat.entity.OutputVATInvoiceItemExample
;
import
pwc.taxtech.atms.vat.service.OutputInvoiceService
;
...
...
@@ -23,6 +29,9 @@ import java.util.stream.Stream;
@Service
public
class
OutputInvoiceServiceImpl
extends
VatAbstractService
implements
OutputInvoiceService
{
@Autowired
private
ImportFileMapper
importFileMapper
;
@Override
public
PagingResultDto
<
OutputVATInvoiceInfoDto
>
queryOutputInvoiceList
(
QueryOutputDto
queryDto
)
{
PagingResultDto
<
OutputVATInvoiceInfoDto
>
qResult
=
new
PagingResultDto
<>();
...
...
@@ -48,6 +57,26 @@ public class OutputInvoiceServiceImpl extends VatAbstractService implements Outp
return
result
;
}
@Override
public
List
<
ImportFile
>
getEvidenceList
(
QueryEvidenceDto
queryDto
)
{
ImportFileExample
example
=
new
ImportFileExample
();
if
(
queryDto
.
getCurrentPeriod
())
{
if
(
Utils
.
isEmpty
(
queryDto
.
getQueryString
()))
{
example
.
createCriteria
().
andFileImportTypeEqualTo
(
2
).
andPeriodIDEqualTo
(
queryDto
.
getPeriodId
().
intValue
());
}
else
{
example
.
createCriteria
().
andFileImportTypeEqualTo
(
2
).
andPeriodIDEqualTo
(
queryDto
.
getPeriodId
().
intValue
()).
andFileNameLike
(
queryDto
.
getQueryString
());
}
}
else
{
if
(
Utils
.
isEmpty
(
queryDto
.
getQueryString
()))
{
example
.
createCriteria
().
andFileImportTypeEqualTo
(
2
);
}
else
{
example
.
createCriteria
().
andFileImportTypeEqualTo
(
2
).
andFileNameLike
(
queryDto
.
getQueryString
());
}
}
return
importFileMapper
.
selectByExample
(
example
);
}
private
List
<
OutputVATInvoiceInfoDto
>
getOutputDetailInfoList
(
List
<
OutputVATInvoiceInfoDto
>
query
)
{
List
<
OutputVATInvoiceInfoDto
>
list
=
new
ArrayList
<>();
List
<
OutputVATInvoiceItem
>
outItem
=
outputVATInvoiceItemMapper
.
selectByExample
(
new
OutputVATInvoiceItemExample
());
...
...
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