Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
蒋勇
zhichan
Commits
f966fb03
Commit
f966fb03
authored
Jan 11, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gbs
parent
ec2cffd0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
1 deletions
+31
-1
xggsve-order/app/base/db/impl/order/oorderdeliverDao.js
+1
-0
xggsve-order/app/base/service/impl/order/oorderSve.js
+1
-1
xggsve-order/app/base/service/impl/order/oorderdeliverSve.js
+29
-0
No files found.
xggsve-order/app/base/db/impl/order/oorderdeliverDao.js
View file @
f966fb03
...
...
@@ -47,6 +47,7 @@ class OorderdeliverDao extends Dao {
async
findOrders
(
params
){
let
sql
=
[];
sql
.
push
(
`SELECT a.id,b.created_at,a.service_items,a.status,b.deliver_divide,b.operator_id,b.completed_at,
a.desc, a.service_remark,
b.deliver_name FROM o_order_deliver b INNER JOIN o_order a on
b.order_id=a.id WHERE b.deliver_id = '
${
params
.
deliver_id
}
' `
);
this
.
setOrderCount
(
sql
,
params
);
...
...
xggsve-order/app/base/service/impl/order/oorderSve.js
View file @
f966fb03
...
...
@@ -37,7 +37,7 @@ class OorderService extends ServiceBase {
order
.
product_id
=
Number
(
params
.
product_id
);
order
.
source_id
=
Number
(
params
.
source_id
);
order
.
source_no
=
this
.
trim
(
params
.
source_no
);
order
.
notes
=
this
.
trim
(
params
.
notes
);
order
.
desc
=
this
.
trim
(
params
.
notes
);
order
.
contact_mobile
=
this
.
trim
(
params
.
contact_mobile
);
// 验证订单是否存在
...
...
xggsve-order/app/base/service/impl/order/oorderdeliverSve.js
View file @
f966fb03
...
...
@@ -63,6 +63,13 @@ class OorderdeliverService extends ServiceBase {
let
rows
=
await
this
.
dao
.
findOrders
(
where
);
//格式化订单状态
await
this
.
formateStatus
(
rows
);
await
this
.
formateServiceItems
(
rows
);
for
(
var
row
of
rows
)
{
this
.
handleDate
(
row
,
[
"created_at"
],
"YYYY-MM-DD HH:mm:ss"
,
-
8
);
}
let
res
=
{
count
,
rows
};
...
...
@@ -115,6 +122,28 @@ class OorderdeliverService extends ServiceBase {
console
.
log
(
orderList
);
}
async
formateServiceItems
(
orderList
)
{
let
ids
=
[];
let
statuses
=
[];
for
(
let
item
of
orderList
)
{
let
productIds
=
this
.
trim
(
item
.
service_items
).
split
(
","
);
ids
=
ids
.
concat
(
productIds
);
}
let
productMap
=
await
this
.
oproductDao
.
mapByIds
(
ids
);
for
(
let
item
of
orderList
)
{
let
productIds
=
this
.
trim
(
item
.
service_items
).
split
(
","
);
let
names
=
[];
for
(
var
productId
of
productIds
)
{
let
product
=
productMap
[
productId
];
if
(
product
)
{
names
.
push
(
product
.
name
);
}
}
item
.
service_items_name
=
names
.
join
(
","
);
}
}
}
...
...
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