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
89c240f7
Commit
89c240f7
authored
Apr 03, 2019
by
chase
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
c27c0c83
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
10 deletions
+23
-10
TaxDocumentController.java
...va/pwc/taxtech/atms/controller/TaxDocumentController.java
+20
-2
TaxDocumentServiceImpl.java
...pwc/taxtech/atms/service/impl/TaxDocumentServiceImpl.java
+3
-8
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/TaxDocumentController.java
View file @
89c240f7
...
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
net.sf.json.JSONNull
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.ss.usermodel.CellType
;
import
org.apache.poi.ss.usermodel.DateUtil
;
...
...
@@ -19,9 +20,11 @@ import org.springframework.web.multipart.MultipartFile;
import
pwc.taxtech.atms.common.PageResultVo
;
import
pwc.taxtech.atms.common.util.DateUtils
;
import
pwc.taxtech.atms.constant.enums.FileUploadEnum
;
import
pwc.taxtech.atms.dpo.OrgSelectDto
;
import
pwc.taxtech.atms.dto.TaxDocumentDto
;
import
pwc.taxtech.atms.entity.TaxDocument
;
import
pwc.taxtech.atms.service.impl.DidiFileUploadService
;
import
pwc.taxtech.atms.service.impl.OrganizationServiceImpl
;
import
pwc.taxtech.atms.service.impl.TaxDocumentServiceImpl
;
import
pwc.taxtech.atms.thirdparty.ExcelUtil
;
import
pwc.taxtech.atms.vat.entity.FileUpload
;
...
...
@@ -36,6 +39,7 @@ import java.net.URL;
import
java.net.URLDecoder
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Controller
@RequestMapping
(
"/api/v1/taxDoc"
)
...
...
@@ -46,11 +50,18 @@ public class TaxDocumentController {
@Autowired
private
DidiFileUploadService
didiFileUploadService
;
@Autowired
private
OrganizationServiceImpl
organizationService
;
@PostMapping
(
"selectList"
)
@ResponseBody
public
PageResultVo
<
TaxDocument
>
selectTaxDocumentList
(
@RequestBody
TaxDocumentDto
taxDocumentDto
)
{
List
<
OrgSelectDto
>
orgList
=
organizationService
.
getMyOrgList
();
if
(
CollectionUtils
.
isEmpty
(
orgList
)){
return
new
PageResultVo
<>();
}
PageHelper
.
startPage
(
taxDocumentDto
.
getCurrentPage
(),
taxDocumentDto
.
getPageSize
());
PageInfo
<
TaxDocument
>
taxDocumentPageInfo
=
new
PageInfo
<>(
taxDocumentService
.
selectTaxDocumentList
(
taxDocumentDto
));
PageInfo
<
TaxDocument
>
taxDocumentPageInfo
=
new
PageInfo
<>(
taxDocumentService
.
selectTaxDocumentList
(
taxDocumentDto
,
orgList
.
stream
()
.
map
(
o
->
o
.
getId
()).
collect
(
Collectors
.
toList
())));
List
<
TaxDocument
>
list
=
taxDocumentPageInfo
.
getList
();
return
PageResultVo
.
getPageResultVo
(
taxDocumentPageInfo
,
list
);
}
...
...
@@ -116,7 +127,14 @@ public class TaxDocumentController {
headers
.
put
(
"UploadTime"
,
"上传日期"
);
headers
.
put
(
"Creator"
,
"创建人"
);
headers
.
put
(
"Remark"
,
"档案备注"
);
List
<
TaxDocument
>
TaxDocument
=
taxDocumentService
.
selectTaxDocumentList
(
taxDocumentDto
);
List
<
TaxDocument
>
TaxDocument
=
null
;
List
<
OrgSelectDto
>
orgList
=
organizationService
.
getMyOrgList
();
if
(
CollectionUtils
.
isEmpty
(
orgList
)){
TaxDocument
=
new
ArrayList
<>();
}
else
{
TaxDocument
=
taxDocumentService
.
selectTaxDocumentList
(
taxDocumentDto
,
orgList
.
stream
()
.
map
(
o
->
o
.
getId
()).
collect
(
Collectors
.
toList
()));
}
response
.
setContentType
(
"multipart/form-data"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;fileName="
+
new
String
(
"taxDocument.xlsx"
.
getBytes
(
"GB2312"
),
"ISO-8859-1"
));
OutputStream
ouputStream
=
response
.
getOutputStream
();
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TaxDocumentServiceImpl.java
View file @
89c240f7
...
...
@@ -12,7 +12,6 @@ import pwc.taxtech.atms.common.AuthUserHelper;
import
pwc.taxtech.atms.constant.enums.FileUploadEnum
;
import
pwc.taxtech.atms.constant.enums.ReportFileUploadEnum
;
import
pwc.taxtech.atms.dao.TaxDocumentMapper
;
import
pwc.taxtech.atms.dpo.OrgSelectDto
;
import
pwc.taxtech.atms.dto.TaxDocumentDto
;
import
pwc.taxtech.atms.dto.didiFileUpload.DidiFileIUploadParam
;
import
pwc.taxtech.atms.dto.didiFileUpload.DidiFileUploadDetailResult
;
...
...
@@ -61,13 +60,9 @@ public class TaxDocumentServiceImpl {
private
OrganizationServiceImpl
organizationService
;
public
List
<
TaxDocument
>
selectTaxDocumentList
(
TaxDocumentDto
taxDocumentDto
)
{
List
<
OrgSelectDto
>
orgList
=
organizationService
.
getMyOrgList
();
if
(
CollectionUtils
.
isEmpty
(
orgList
)){
return
new
ArrayList
<>();
}
List
<
TaxDocument
>
dataList
=
taxDocumentMapper
.
selectByExample
(
getExample
(
taxDocumentDto
,
orgList
.
stream
()
.
map
(
o
->
o
.
getId
()).
collect
(
Collectors
.
toList
())));
public
List
<
TaxDocument
>
selectTaxDocumentList
(
TaxDocumentDto
taxDocumentDto
,
List
<
String
>
orgIds
)
{
List
<
TaxDocument
>
dataList
=
taxDocumentMapper
.
selectByExample
(
getExample
(
taxDocumentDto
,
orgIds
));
DidiFileIUploadParam
fileParam
=
new
DidiFileIUploadParam
();
fileParam
.
setUuids
(
dataList
.
stream
()
.
map
(
o
->
o
.
getFileUploadId
()).
collect
(
Collectors
.
toList
()));
...
...
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