Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
order-group-application
order-group
Commits
dd2121ff
Commit
dd2121ff
authored
Sep 17, 2021
by
徐康
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
价格修复
parent
ade0042a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
order-application-service/src/main/java/cn/freemud/service/impl/MCCafeOrderServiceImpl.java
+9
-11
No files found.
order-application-service/src/main/java/cn/freemud/service/impl/MCCafeOrderServiceImpl.java
View file @
dd2121ff
...
...
@@ -174,6 +174,8 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService {
private
String
mcCafePartnerId
;
@Value
(
"${mccafe.push.order.url}"
)
private
String
mccafePushOrderUrl
;
@Value
(
"${mccafe.push.order.gateway.url}"
)
private
String
mccafePushOrderGatewayUrl
;
@Value
(
"${mccafe.pushorder.MerchantId}"
)
private
String
mccafePushOrderMerchantId
;
@Value
(
"${mccafe.pushorder.AppId}"
)
...
...
@@ -2772,27 +2774,23 @@ public class MCCafeOrderServiceImpl implements MCCafeOrderService {
orderItem
.
setProductLongNameEn
(
orderItemResp
.
getProductForeignName
());
orderItem
.
setQuantity
(
orderItemResp
.
getProductQuantity
().
toString
());
orderItem
.
setReal_quantity
(
orderItemResp
.
getProductQuantity
().
toString
());
orderItem
.
setOriginal_price
(
String
.
valueOf
(
orderItemResp
.
getSalePrice
().
intValue
()
+
materialPrice
));
orderItem
.
setPrice
(
String
.
valueOf
(
orderItemResp
.
get
Product
Price
().
intValue
()+
materialPrice
));
orderItem
.
setOriginal_price
(
String
.
valueOf
(
orderItemResp
.
getSalePrice
().
intValue
()));
orderItem
.
setPrice
(
String
.
valueOf
(
orderItemResp
.
get
Sale
Price
().
intValue
()+
materialPrice
));
orderItem
.
setSubtotal
(
new
BigDecimal
(
orderItem
.
getPrice
()).
multiply
(
new
BigDecimal
(
orderItemResp
.
getProductQuantity
())).
intValue
()+
""
);
if
(
orderItemResp
.
getProductPrice
().
intValue
()
>
orderItemResp
.
getSalePrice
().
intValue
())
{
orderItem
.
setDiscountAmount
((
orderItemResp
.
getProductPrice
().
subtract
(
orderItemResp
.
getSalePrice
())).
multiply
(
new
BigDecimal
(
orderItemResp
.
getProductQuantity
())).
intValue
()+
""
);
}
else
{
orderItem
.
setDiscountAmount
(
0
+
""
);
}
orderItem
.
setRealAmount
(
new
BigDecimal
(
orderItem
.
getOriginal_price
()).
multiply
(
new
BigDecimal
(
orderItemResp
.
getProductQuantity
())).
intValue
()+
""
);
orderItem
.
setDiscountAmount
(
0
+
""
);
orderItem
.
setRealAmount
(
new
BigDecimal
(
orderItem
.
getPrice
()).
multiply
(
new
BigDecimal
(
orderItemResp
.
getProductQuantity
())).
intValue
()+
""
);
String
taxId
=
"10"
;
orderItem
.
setTaxId
(
taxId
);
Integer
taxRate
=
6
;
orderItem
.
setTaxRate
(
String
.
valueOf
(
taxRate
));
orderItem
.
setTaxAmount
(
String
.
valueOf
(
new
BigDecimal
(
taxRate
).
multiply
(
new
BigDecimal
(
orderItem
.
get
Original_p
rice
()))
orderItem
.
setTaxAmount
(
String
.
valueOf
(
new
BigDecimal
(
taxRate
).
multiply
(
new
BigDecimal
(
orderItem
.
get
P
rice
()))
.
multiply
(
new
BigDecimal
(
orderItemResp
.
getProductQuantity
())).
intValue
()/
100
));
taxTotalAmount
+=
Integer
.
parseInt
(
orderItem
.
getTaxAmount
());
McCafePushOrderDto
.
TaxAmountDetail
taxAmountDetail
=
new
McCafePushOrderDto
.
TaxAmountDetail
();
taxAmountDetail
.
setUniqueCode
(
orderItemResp
.
getProductCode
());
McCafePushOrderDto
.
TaxItem
taxItem
=
new
McCafePushOrderDto
.
TaxItem
();
taxItem
.
setRealAmount
(
new
BigDecimal
(
orderItem
.
get
Original_p
rice
()).
multiply
(
new
BigDecimal
(
orderItemResp
.
getProductQuantity
())).
intValue
());
taxItem
.
setTaxAmount
(
new
BigDecimal
(
taxRate
).
multiply
(
new
BigDecimal
(
orderItem
.
get
Original_p
rice
()))
taxItem
.
setRealAmount
(
new
BigDecimal
(
orderItem
.
get
P
rice
()).
multiply
(
new
BigDecimal
(
orderItemResp
.
getProductQuantity
())).
intValue
());
taxItem
.
setTaxAmount
(
new
BigDecimal
(
taxRate
).
multiply
(
new
BigDecimal
(
orderItem
.
get
P
rice
()))
.
multiply
(
new
BigDecimal
(
orderItemResp
.
getProductQuantity
())).
intValue
()/
100
);
taxItem
.
setTaxId
(
taxId
);
taxItem
.
setTaxRate
(
taxRate
+
""
);
...
...
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