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
7dbf7450
Commit
7dbf7450
authored
Jul 25, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[bugfix] use optional instead use get directe
parent
185bad36
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
DataImportServiceImpl.java
.../pwc/taxtech/atms/service/impl/DataImportServiceImpl.java
+6
-4
No files found.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/DataImportServiceImpl.java
View file @
7dbf7450
...
...
@@ -36,6 +36,7 @@ import pwc.taxtech.atms.vat.entity.ValidationInfoExample;
import
pwc.taxtech.atms.vat.entity.VatEnterpriseAccount
;
import
pwc.taxtech.atms.vat.entity.VatEnterpriseAccountExample
;
import
javax.swing.text.html.Option
;
import
java.io.StringReader
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
...
...
@@ -43,6 +44,7 @@ import java.util.Comparator;
import
java.util.Date
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.Set
;
import
java.util.UUID
;
import
java.util.stream.Collectors
;
...
...
@@ -220,11 +222,11 @@ public class DataImportServiceImpl {
List
<
Balance
>
addlist
=
new
ArrayList
<>();
List
<
VatEnterpriseAccount
>
vats
=
vatEnterpriseAccountMapper
.
selectByExample
(
null
);
companyBalanceList
.
forEach
(
compbalance
->
{
VatEnterpriseAccount
directionDto
=
vats
.
stream
().
filter
(
m
->
m
.
getAcctCode
().
equals
(
compbalance
.
getAcctCode
()))
.
findFirst
()
.
get
()
;
Optional
<
VatEnterpriseAccount
>
directionDto
=
vats
.
stream
().
filter
(
m
->
m
.
getAcctCode
().
equals
(
compbalance
.
getAcctCode
()))
.
findFirst
();
if
(
directionDto
!=
null
)
{
Integer
direction
=
directionDto
.
getDirection
();
if
(
directionDto
.
isPresent
()
)
{
Integer
direction
=
directionDto
.
get
().
get
Direction
();
Balance
balanceDto
=
new
Balance
();
balanceDto
.
setBalanceId
(
UUID
.
randomUUID
().
toString
());
balanceDto
.
setPeriodId
(
compbalance
.
getPeriodId
());
...
...
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