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
2b17e796
Commit
2b17e796
authored
Mar 05, 2019
by
Ken you
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add delete origin data ---Ken
parent
fc03f870
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
42 deletions
+14
-42
EbsApiServiceImpl.java
...java/pwc/taxtech/atms/service/impl/EbsApiServiceImpl.java
+14
-42
No files found.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/EbsApiServiceImpl.java
View file @
2b17e796
...
...
@@ -250,12 +250,9 @@ public class EbsApiServiceImpl implements EbsApiService {
TrialBalance
result
=
new
TrialBalance
();
if
(
itemList
.
size
()
>
0
)
{
logger
.
debug
(
"exit and delete TrialBalance EntityCode:{},Period:{}"
,
item
.
getSegment1
(),
item
.
getPeriod
());
// result = itemList.get(0);
// populateFieldsTB(item, result);
// result.setId(itemList.get(0).getId());
trialBalanceMapper
.
deleteByExample
(
example
);
}
else
{
logger
.
debug
(
"exit and update
TrialBalance EntityCode:{},Period:{}"
,
item
.
getSegment1
(),
item
.
getPeriod
());
}
logger
.
debug
(
"insert
TrialBalance EntityCode:{},Period:{}"
,
item
.
getSegment1
(),
item
.
getPeriod
());
populateFieldsTB
(
item
,
result
);
result
.
setId
(
distributedIdService
.
nextId
());
result
.
setCreateBy
(
""
);
...
...
@@ -263,7 +260,6 @@ public class EbsApiServiceImpl implements EbsApiService {
result
.
setCreateTime
(
new
Date
());
trialBalanceMapper
.
insertSelective
(
result
);
}
}
private
void
processCF
(
CashFlowQueryDto
item
)
{
CashFlowExample
example
=
new
CashFlowExample
();
...
...
@@ -276,19 +272,15 @@ public class EbsApiServiceImpl implements EbsApiService {
CashFlow
result
=
new
CashFlow
();
if
(
itemList
.
size
()
>
0
)
{
logger
.
debug
(
"exit and delete CashFlow EntityCode:{},Period:{}"
,
item
.
getEntityCode
(),
item
.
getPeriod
());
// result = itemList.get(0);
// populateFieldsCF(item, result);
// result.setId(itemList.get(0).getId());
cashFlowMapper
.
deleteByExample
(
example
);
}
else
{
logger
.
debug
(
"exit and update
CashFlow EntityCode:{},Period:{}"
,
item
.
getEntityCode
(),
item
.
getPeriod
());
}
logger
.
debug
(
"insert
CashFlow EntityCode:{},Period:{}"
,
item
.
getEntityCode
(),
item
.
getPeriod
());
populateFieldsCF
(
item
,
result
);
result
.
setId
(
distributedIdService
.
nextId
());
result
.
setCreateTime
(
new
Date
());
result
.
setCreateBy
(
""
);
cashFlowMapper
.
insertSelective
(
result
);
}
}
private
void
processBS
(
BalanceSheetQueryDto
item
)
{
BalanceSheetExample
example
=
new
BalanceSheetExample
();
...
...
@@ -301,19 +293,15 @@ public class EbsApiServiceImpl implements EbsApiService {
BalanceSheet
result
=
new
BalanceSheet
();
if
(
itemList
.
size
()
>
0
)
{
logger
.
debug
(
"exit and delete BalanceSheet EntityCode:{},Period:{}"
,
item
.
getEntityCode
(),
item
.
getPeriod
());
// result = itemList.get(0);
// populateFieldsBS(item, result);
// result.setId(itemList.get(0).getId());
balanceSheetMapper
.
deleteByExample
(
example
);
}
else
{
logger
.
debug
(
"exit and update
BalanceSheet EntityCode:{},Period:{}"
,
item
.
getEntityCode
(),
item
.
getPeriod
());
}
logger
.
debug
(
"insert
BalanceSheet EntityCode:{},Period:{}"
,
item
.
getEntityCode
(),
item
.
getPeriod
());
populateFieldsBS
(
item
,
result
);
result
.
setId
(
distributedIdService
.
nextId
());
result
.
setCreateBy
(
""
);
result
.
setCreateTime
(
new
Date
());
balanceSheetMapper
.
insertSelective
(
result
);
}
}
private
void
processBSprc
(
BalanceSheetPrcQueryDto
item
)
{
...
...
@@ -327,19 +315,15 @@ public class EbsApiServiceImpl implements EbsApiService {
BalanceSheet
result
=
new
BalanceSheet
();
if
(
itemList
.
size
()
>
0
)
{
logger
.
debug
(
"exit and delete BalanceSheetPrc EntityCode:{},Period:{}"
,
item
.
getEntityCode
(),
item
.
getPeriod
());
// result = itemList.get(0);
// populateFieldsBSprc(item, result);
// result.setId(itemList.get(0).getId());
balanceSheetMapper
.
updateByPrimaryKey
(
result
);
}
else
{
logger
.
debug
(
"exit and update
BalanceSheetPrc EntityCode:{},Period:{}"
,
item
.
getEntityCode
(),
item
.
getPeriod
());
}
logger
.
debug
(
"insert
BalanceSheetPrc EntityCode:{},Period:{}"
,
item
.
getEntityCode
(),
item
.
getPeriod
());
populateFieldsBSprc
(
item
,
result
);
result
.
setId
(
distributedIdService
.
nextId
());
result
.
setCreateBy
(
""
);
result
.
setCreateTime
(
new
Date
());
balanceSheetMapper
.
insertSelective
(
result
);
}
}
private
void
processPL
(
ProfitLossStatementQueryDto
item
)
{
ProfitLossStatementExample
example
=
new
ProfitLossStatementExample
();
...
...
@@ -352,19 +336,15 @@ public class EbsApiServiceImpl implements EbsApiService {
ProfitLossStatement
result
=
new
ProfitLossStatement
();
if
(
itemList
.
size
()
>
0
)
{
logger
.
debug
(
"exit and delete ProfitLossStatement EntityCode:{},Period:{}"
,
item
.
getEntityCode
(),
item
.
getPeriod
());
// result = itemList.get(0);
// populateFieldsPLS(item, result);
// result.setId(itemList.get(0).getId());
profitLossStatementMapper
.
deleteByExample
(
example
);
}
else
{
logger
.
debug
(
"exit and update
ProfitLossStatement EntityCode:{},Period:{}"
,
item
.
getEntityCode
(),
item
.
getPeriod
());
}
logger
.
debug
(
"insert
ProfitLossStatement EntityCode:{},Period:{}"
,
item
.
getEntityCode
(),
item
.
getPeriod
());
populateFieldsPLS
(
item
,
result
);
result
.
setId
(
distributedIdService
.
nextId
());
result
.
setCreateTime
(
new
Date
());
result
.
setCreateBy
(
""
);
profitLossStatementMapper
.
insertSelective
(
result
);
}
}
private
void
processPLprc
(
ProfitLossStatementPrcQueryDto
item
)
{
ProfitLossStatementExample
example
=
new
ProfitLossStatementExample
();
...
...
@@ -377,19 +357,15 @@ public class EbsApiServiceImpl implements EbsApiService {
ProfitLossStatement
result
=
new
ProfitLossStatement
();
if
(
itemList
.
size
()
>
0
)
{
logger
.
debug
(
"exit and delete ProfitLossStatementPrc EntityCode:{},Period:{}"
,
item
.
getEntityCode
(),
item
.
getPeriod
());
// result = itemList.get(0);
// populateFieldsPLSprc(item, result);
// result.setId(itemList.get(0).getId());
profitLossStatementMapper
.
deleteByExample
(
example
);
}
else
{
logger
.
debug
(
"exit and update
ProfitLossStatementPrc EntityCode:{},Period:{}"
,
item
.
getEntityCode
(),
item
.
getPeriod
());
}
logger
.
debug
(
"insert
ProfitLossStatementPrc EntityCode:{},Period:{}"
,
item
.
getEntityCode
(),
item
.
getPeriod
());
populateFieldsPLSprc
(
item
,
result
);
result
.
setId
(
distributedIdService
.
nextId
());
result
.
setCreateTime
(
new
Date
());
result
.
setCreateBy
(
""
);
profitLossStatementMapper
.
insertSelective
(
result
);
}
}
private
void
processOAR
(
OrganizationAccountingRateQueryDto
item
)
{
OrganizationAccountingRateExample
example
=
new
OrganizationAccountingRateExample
();
...
...
@@ -403,19 +379,15 @@ public class EbsApiServiceImpl implements EbsApiService {
OrganizationAccountingRate
result
=
new
OrganizationAccountingRate
();
if
(
itemList
.
size
()
>
0
)
{
logger
.
debug
(
"exit and delete OrganizationAccountingRate Period:{}"
,
item
.
getPeriod
());
// result = itemList.get(0);
// populateFieldsOAR(item, result);
// result.setId(itemList.get(0).getId());
organizationAccountingRateMapper
.
deleteByExample
(
example
);
}
else
{
logger
.
debug
(
"exit and update
OrganizationAccountingRate Period:{}"
,
item
.
getPeriod
());
}
logger
.
debug
(
"insert
OrganizationAccountingRate Period:{}"
,
item
.
getPeriod
());
populateFieldsOAR
(
item
,
result
);
result
.
setId
(
distributedIdService
.
nextId
());
result
.
setCreateTime
(
new
Date
());
result
.
setCreateBy
(
""
);
organizationAccountingRateMapper
.
insertSelective
(
result
);
}
}
private
void
populateFieldsJE
(
JournalEntryQueryDto
item
,
JournalEntry
result
)
{
...
...
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