Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc-java
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huluobin
dc-java
Commits
f947030f
Commit
f947030f
authored
Mar 29, 2019
by
wutong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
处理Ebay平台费率的问题
parent
bfe02c08
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
OrderSyncJob.java
...s-order/src/main/java/com/bailuntec/job/OrderSyncJob.java
+16
-7
No files found.
data-base/base-sync-oms-order/src/main/java/com/bailuntec/job/OrderSyncJob.java
View file @
f947030f
...
@@ -932,9 +932,9 @@ public class OrderSyncJob extends PointJob {
...
@@ -932,9 +932,9 @@ public class OrderSyncJob extends PointJob {
* 自己取汇率
* 自己取汇率
*/
*/
if
(
orderCharge
!=
null
)
{
if
(
orderCharge
!=
null
)
{
LocalDateTime
exchangeDate
=
omsResult
.
getPaidTime
()
!=
null
?
omsResult
.
getPaidTime
()
:
omsResult
.
getCreateTime
();
if
(
orderCharge
.
getAmountTotal
()
!=
null
)
{
if
(
orderCharge
.
getAmountTotal
()
!=
null
)
{
BigDecimal
sellerOrderExchangeRate
=
null
;
BigDecimal
sellerOrderExchangeRate
=
null
;
LocalDateTime
exchangeDate
=
omsResult
.
getPaidTime
()
!=
null
?
omsResult
.
getPaidTime
()
:
omsResult
.
getCreateTime
();
String
orderCurrency
=
orderCharge
.
getAmountTotal
().
getCurrencyCode
();
String
orderCurrency
=
orderCharge
.
getAmountTotal
().
getCurrencyCode
();
if
(
StringUtils
.
isEmpty
(
orderCharge
.
getAmountTotal
().
getCurrencyCode
())
||
orderCurrency
.
equals
(
Constant
.
RMB_CURRENCY_RMB
))
{
if
(
StringUtils
.
isEmpty
(
orderCharge
.
getAmountTotal
().
getCurrencyCode
())
||
orderCurrency
.
equals
(
Constant
.
RMB_CURRENCY_RMB
))
{
orderCurrency
=
Constant
.
RMB_CURRENCY
;
orderCurrency
=
Constant
.
RMB_CURRENCY
;
...
@@ -944,16 +944,25 @@ public class OrderSyncJob extends PointJob {
...
@@ -944,16 +944,25 @@ public class OrderSyncJob extends PointJob {
}
}
dcBaseOmsOrder
.
setOrderCurrency
(
orderCurrency
);
dcBaseOmsOrder
.
setOrderCurrency
(
orderCurrency
);
BigDecimal
orderFinanceExchangeRate
=
CallBailunSystem
.
getMonthExchangeRate
(
orderCurrency
,
Constant
.
RMB_CURRENCY
,
exchangeDate
);
BigDecimal
orderFinanceExchangeRate
=
CallBailunSystem
.
getMonthExchangeRate
(
orderCurrency
,
Constant
.
RMB_CURRENCY
,
exchangeDate
);
dcBaseOmsOrder
.
setFinanceOrderExchangeRate
(
orderFinanceExchangeRate
!=
null
?
orderFinanceExchangeRate
:
BigDecimal
.
ZERO
);
dcBaseOmsOrder
.
setFinanceOrderExchangeRate
(
orderFinanceExchangeRate
);
dcBaseOmsOrder
.
setSellerOrderExchangeRate
(
sellerOrderExchangeRate
!=
null
?
sellerOrderExchangeRate
:
BigDecimal
.
ZERO
);
dcBaseOmsOrder
.
setSellerOrderExchangeRate
(
sellerOrderExchangeRate
);
}
}
/**
* EBAY的平台费币种与订单币种可能不一致
*/
if
(
omsResult
.
getPlatformType
()
!=
null
&&
PlatformType
.
Ebay
.
value
().
equals
(
omsResult
.
getPlatformType
().
toUpperCase
())
&&
orderCharge
.
getCostPlatformFee
()
!=
null
&&
!
StringUtils
.
isEmpty
(
orderCharge
.
getCostPlatformFee
().
getCurrencyCode
()))
{
if
(
omsResult
.
getPlatformType
()
!=
null
&&
PlatformType
.
Ebay
.
value
().
equals
(
omsResult
.
getPlatformType
().
toUpperCase
())
&&
orderCharge
.
getCostPlatformFee
()
!=
null
&&
!
StringUtils
.
isEmpty
(
orderCharge
.
getCostPlatformFee
().
getCurrencyCode
()))
{
String
otherCurrency
=
orderCharge
.
getCostPlatformFee
().
getCurrencyCode
();
String
otherCurrency
=
orderCharge
.
getCostPlatformFee
().
getCurrencyCode
();
BigDecimal
sellerOtherExchangeRate
=
orderCharge
.
getCostPlatformFee
().
getExchangeRate
();
BigDecimal
sellerOtherExchangeRate
=
null
;
BigDecimal
otherFinanceExchangeRate
=
CallBailunSystem
.
getMonthExchangeRate
(
otherCurrency
,
Constant
.
RMB_CURRENCY
,
omsResult
.
getPaidTime
()
!=
null
?
omsResult
.
getPaidTime
()
:
omsResult
.
getCreateTime
());
if
(
StringUtils
.
isEmpty
(
orderCharge
.
getCostPlatformFee
().
getCurrencyCode
())
||
otherCurrency
.
equals
(
Constant
.
RMB_CURRENCY_RMB
))
{
otherCurrency
=
Constant
.
RMB_CURRENCY
;
sellerOtherExchangeRate
=
BigDecimal
.
ONE
;
}
else
{
sellerOtherExchangeRate
=
CallBailunSystem
.
getExchangeRate
(
otherCurrency
,
Constant
.
RMB_CURRENCY
,
exchangeDate
);
}
dcBaseOmsOrder
.
setOtherCurrency
(
otherCurrency
);
dcBaseOmsOrder
.
setOtherCurrency
(
otherCurrency
);
dcBaseOmsOrder
.
setFinanceOtherExchangeRate
(
otherFinanceExchangeRate
!=
null
?
otherFinanceExchangeRate
:
BigDecimal
.
ZERO
);
BigDecimal
otherFinanceExchangeRate
=
CallBailunSystem
.
getMonthExchangeRate
(
otherCurrency
,
Constant
.
RMB_CURRENCY
,
omsResult
.
getPaidTime
()
!=
null
?
omsResult
.
getPaidTime
()
:
omsResult
.
getCreateTime
());
dcBaseOmsOrder
.
setSellerOtherExchangeRate
(
sellerOtherExchangeRate
!=
null
?
sellerOtherExchangeRate
:
BigDecimal
.
ZERO
);
dcBaseOmsOrder
.
setFinanceOtherExchangeRate
(
otherFinanceExchangeRate
);
dcBaseOmsOrder
.
setSellerOtherExchangeRate
(
sellerOtherExchangeRate
);
}
}
}
}
}
}
...
...
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