Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
shop
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曲欣亮
shop
Commits
90acc23e
Commit
90acc23e
authored
Apr 25, 2023
by
张永
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
a1259093
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
25 deletions
+39
-25
CartQueryServiceImpl.java
...com/egolm/shop/api/service/impl/CartQueryServiceImpl.java
+39
-25
No files found.
src/main/java/com/egolm/shop/api/service/impl/CartQueryServiceImpl.java
View file @
90acc23e
...
@@ -49,6 +49,31 @@ public class CartQueryServiceImpl implements CartQueryService {
...
@@ -49,6 +49,31 @@ public class CartQueryServiceImpl implements CartQueryService {
throw
new
ReflectException
(
"Query the shopping cart parameter error:"
throw
new
ReflectException
(
"Query the shopping cart parameter error:"
+
Rjx
.
json
().
set
(
"terminal"
,
terminal
).
set
(
"shopNo"
,
shopNo
).
jsonValue
());
+
Rjx
.
json
().
set
(
"terminal"
,
terminal
).
set
(
"shopNo"
,
shopNo
).
jsonValue
());
}
}
List
<
Map
<
String
,
Object
>>
orderSumPayList
=
new
ArrayList
<
Map
<
String
,
Object
>>();
List
<
Map
<
String
,
Object
>>
wmsSumPayList
=
new
ArrayList
<
Map
<
String
,
Object
>>();
Map
<
String
,
Object
>
orderSumPayMap
=
new
HashMap
<
String
,
Object
>();
//订单汇总
try
{
String
sql
=
"exec up_B2BGetSumCart '"
+
shopNo
+
"',1 "
;
List
<
List
<
Map
<
String
,
Object
>>>
cartList
=
jdbcTemplate
.
executeMutil
(
sql
).
getDatas
();
orderSumPayList
=
cartList
.
get
(
0
);
//按订单汇总的
if
(
orderSumPayList
!=
null
&&
orderSumPayList
.
size
()>
0
)
{
orderSumPayMap
=
orderSumPayList
.
get
(
0
);
String
Status
=
orderSumPayMap
.
get
(
"Status"
)+
""
;
if
(!
Status
.
equals
(
"0"
))
{
//它错,就全错。
String
ErrorMsg
=
orderSumPayMap
.
get
(
"ErrorMsg"
)+
""
;
Rjx
errRjx
=
Rjx
.
json
().
set
(
"IsValid"
,
false
).
set
(
"errormsg"
,
ErrorMsg
);
return
errRjx
;
}
}
wmsSumPayList
=
cartList
.
get
(
1
);
//按仓库汇总
}
catch
(
Exception
e1
)
{
e1
.
printStackTrace
();
}
List
<
Map
<
String
,
Object
>>
datas
=
this
.
getGoodsList
(
orgNo
,
shopNo
,
terminal
);
List
<
Map
<
String
,
Object
>>
datas
=
this
.
getGoodsList
(
orgNo
,
shopNo
,
terminal
);
System
.
out
.
println
(
"datas: "
+
GsonUtil
.
toJson
(
datas
));
System
.
out
.
println
(
"datas: "
+
GsonUtil
.
toJson
(
datas
));
Set
<
String
>
chooseGroups
=
new
HashSet
<
String
>();
Set
<
String
>
chooseGroups
=
new
HashSet
<
String
>();
...
@@ -126,32 +151,21 @@ public class CartQueryServiceImpl implements CartQueryService {
...
@@ -126,32 +151,21 @@ public class CartQueryServiceImpl implements CartQueryService {
rjx
.
set
(
"isInvalid"
,
isInvalid
);
rjx
.
set
(
"isInvalid"
,
isInvalid
);
//this.processPayAmount(rjx);
//this.processPayAmount(rjx);
List
<
Map
<
String
,
Object
>>
orderSumPayList
=
new
ArrayList
<
Map
<
String
,
Object
>>();
List
<
Map
<
String
,
Object
>>
wmsSumPayList
=
new
ArrayList
<
Map
<
String
,
Object
>>();
try
{
try
{
if
(!
orderSumPayMap
.
isEmpty
())
{
//重新设置汇总金额
String
sql
=
"exec up_B2BGetSumCart '"
+
shopNo
+
"',1 "
;
//计算汇总
rjx
.
set
(
"totalAmount"
,
orderSumPayMap
.
get
(
"TotalSaleAmount"
));
//没写错,韩 旭让写的
orderSumPayList
=
jdbcTemplate
.
executeMutil
(
sql
).
getDatas
().
get
(
0
);
//按订单汇总的
rjx
.
set
(
"payAmount"
,
orderSumPayMap
.
get
(
"PayAmount"
));
rjx
.
set
(
"payPoint"
,
orderSumPayMap
.
containsKey
(
"PayPoint"
)?
orderSumPayMap
.
get
(
"PayPoint"
):
0
);
rjx
.
set
(
"totalSaleQty"
,
orderSumPayMap
.
get
(
"TotalSaleQty"
));
if
(
orderSumPayList
!=
null
&&
orderSumPayList
.
size
()>
0
)
{
rjx
.
set
(
"totalCount"
,
orderSumPayMap
.
get
(
"TotalCount"
));
Map
<
String
,
Object
>
orderSumPayMap
=
orderSumPayList
.
get
(
0
);
rjx
.
set
(
"totalSaleAmount"
,
orderSumPayMap
.
get
(
"TotalSaleAmount"
));
String
Status
=
orderSumPayMap
.
get
(
"Status"
)+
""
;
rjx
.
set
(
"totalDisAmount"
,
orderSumPayMap
.
get
(
"TotalDisAmount"
));
if
(
Status
.
equals
(
"0"
))
{
rjx
.
set
(
"totalAmount"
,
orderSumPayMap
.
get
(
"TotalSaleAmount"
));
//没写错,韩 旭让写的
rjx
.
set
(
"payAmount"
,
orderSumPayMap
.
get
(
"PayAmount"
));
rjx
.
set
(
"payPoint"
,
orderSumPayMap
.
containsKey
(
"PayPoint"
)?
orderSumPayMap
.
get
(
"PayPoint"
):
0
);
rjx
.
set
(
"totalSaleQty"
,
orderSumPayMap
.
get
(
"TotalSaleQty"
));
rjx
.
set
(
"totalCount"
,
orderSumPayMap
.
get
(
"TotalCount"
));
rjx
.
set
(
"totalSaleAmount"
,
orderSumPayMap
.
get
(
"TotalSaleAmount"
));
rjx
.
set
(
"totalDisAmount"
,
orderSumPayMap
.
get
(
"TotalDisAmount"
));
}
else
{
String
ErrorMsg
=
orderSumPayMap
.
get
(
"ErrorMsg"
)+
""
;
Rjx
errRjx
=
Rjx
.
json
().
set
(
"IsValid"
,
false
).
set
(
"errormsg"
,
ErrorMsg
);
return
errRjx
;
}
}
}
wmsSumPayList
=
jdbcTemplate
.
executeMutil
(
sql
).
getDatas
().
get
(
1
);
//按仓库汇总
List
<
Map
<
String
,
Object
>>
rjxWmsList
=
(
List
<
Map
<
String
,
Object
>>)
rjx
.
get
(
"wmsList"
);
List
<
Map
<
String
,
Object
>>
rjxWmsList
=
(
List
<
Map
<
String
,
Object
>>)
rjx
.
get
(
"wmsList"
);
if
(
wmsSumPayList
!=
null
&&
rjxWmsList
!=
null
&&
wmsSumPayList
.
size
()
>
0
&&
rjxWmsList
.
size
()
>
0
)
{
if
(
wmsSumPayList
!=
null
&&
rjxWmsList
!=
null
&&
wmsSumPayList
.
size
()
>
0
&&
rjxWmsList
.
size
()
>
0
)
{
for
(
Map
<
String
,
Object
>
wmsMap
:
wmsSumPayList
)
{
for
(
Map
<
String
,
Object
>
wmsMap
:
wmsSumPayList
)
{
Object
freightamount
=
wmsMap
.
get
(
"TotalSaleQty"
);
Object
freightamount
=
wmsMap
.
get
(
"TotalSaleQty"
);
...
...
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