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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
71 deletions
+43
-71
EbsApiServiceImpl.java
...java/pwc/taxtech/atms/service/impl/EbsApiServiceImpl.java
+43
-71
No files found.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/EbsApiServiceImpl.java
View file @
2b17e796
...
...
@@ -250,19 +250,15 @@ 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
());
populateFieldsTB
(
item
,
result
);
result
.
setId
(
distributedIdService
.
nextId
());
result
.
setCreateBy
(
""
);
result
.
setCreateTime
(
new
Date
());
result
.
setCreateTime
(
new
Date
());
trialBalanceMapper
.
insertSelective
(
result
);
}
logger
.
debug
(
"insert TrialBalance EntityCode:{},Period:{}"
,
item
.
getSegment1
(),
item
.
getPeriod
());
populateFieldsTB
(
item
,
result
);
result
.
setId
(
distributedIdService
.
nextId
());
result
.
setCreateBy
(
""
);
result
.
setCreateTime
(
new
Date
());
result
.
setCreateTime
(
new
Date
());
trialBalanceMapper
.
insertSelective
(
result
);
}
private
void
processCF
(
CashFlowQueryDto
item
)
{
...
...
@@ -276,18 +272,14 @@ 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
());
populateFieldsCF
(
item
,
result
);
result
.
setId
(
distributedIdService
.
nextId
());
result
.
setCreateTime
(
new
Date
());
result
.
setCreateBy
(
""
);
cashFlowMapper
.
insertSelective
(
result
);
}
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
)
{
...
...
@@ -301,18 +293,14 @@ 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
());
populateFieldsBS
(
item
,
result
);
result
.
setId
(
distributedIdService
.
nextId
());
result
.
setCreateBy
(
""
);
result
.
setCreateTime
(
new
Date
());
balanceSheetMapper
.
insertSelective
(
result
);
}
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
);
}
...
...
@@ -327,18 +315,14 @@ 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
());
populateFieldsBSprc
(
item
,
result
);
result
.
setId
(
distributedIdService
.
nextId
());
result
.
setCreateBy
(
""
);
result
.
setCreateTime
(
new
Date
());
balanceSheetMapper
.
insertSelective
(
result
);
}
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
)
{
...
...
@@ -352,18 +336,14 @@ 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
());
populateFieldsPLS
(
item
,
result
);
result
.
setId
(
distributedIdService
.
nextId
());
result
.
setCreateTime
(
new
Date
());
result
.
setCreateBy
(
""
);
profitLossStatementMapper
.
insertSelective
(
result
);
}
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
)
{
...
...
@@ -377,18 +357,14 @@ 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
());
populateFieldsPLSprc
(
item
,
result
);
result
.
setId
(
distributedIdService
.
nextId
());
result
.
setCreateTime
(
new
Date
());
result
.
setCreateBy
(
""
);
profitLossStatementMapper
.
insertSelective
(
result
);
}
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
)
{
...
...
@@ -403,18 +379,14 @@ 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
());
populateFieldsOAR
(
item
,
result
);
result
.
setId
(
distributedIdService
.
nextId
());
result
.
setCreateTime
(
new
Date
());
result
.
setCreateBy
(
""
);
organizationAccountingRateMapper
.
insertSelective
(
result
);
}
logger
.
debug
(
"insert OrganizationAccountingRate Period:{}"
,
item
.
getPeriod
());
populateFieldsOAR
(
item
,
result
);
result
.
setId
(
distributedIdService
.
nextId
());
result
.
setCreateTime
(
new
Date
());
result
.
setCreateBy
(
""
);
organizationAccountingRateMapper
.
insertSelective
(
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