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
088d89f4
Commit
088d89f4
authored
Jan 14, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'xggsve-order-dev' of gitlab.gongsibao.com:jiangyong/zhichan into xggsve-order-dev
parents
34189ea1
7b297741
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
3 deletions
+79
-3
xggsve-order/app/base/db/impl/order/obusinessmenDao.js
+3
-0
xggsve-order/app/base/db/impl/order/oorderdeliverDao.js
+36
-3
xggsve-order/app/base/service/impl/order/obusinessmenSve.js
+40
-0
No files found.
xggsve-order/app/base/db/impl/order/obusinessmenDao.js
View file @
088d89f4
...
@@ -41,6 +41,9 @@ class ObusinessmenDao extends Dao {
...
@@ -41,6 +41,9 @@ class ObusinessmenDao extends Dao {
if
(
params
.
order_id
)
{
if
(
params
.
order_id
)
{
sql
.
push
(
"AND t1.order_id = :order_id"
);
sql
.
push
(
"AND t1.order_id = :order_id"
);
}
}
if
(
params
.
orderIds
&&
params
.
orderIds
.
length
>
0
)
{
sql
.
push
(
"AND t1.order_id IN (:orderIds)"
);
}
if
(
params
.
name
)
{
if
(
params
.
name
)
{
params
.
name_like
=
"%"
+
params
.
name
+
"%"
;
params
.
name_like
=
"%"
+
params
.
name
+
"%"
;
sql
.
push
(
"AND t1.name LIKE :name_like"
);
sql
.
push
(
"AND t1.name LIKE :name_like"
);
...
...
xggsve-order/app/base/db/impl/order/oorderdeliverDao.js
View file @
088d89f4
...
@@ -9,13 +9,46 @@ class OorderdeliverDao extends Dao {
...
@@ -9,13 +9,46 @@ class OorderdeliverDao extends Dao {
* 条件查询所有符合条件的产品
* 条件查询所有符合条件的产品
* @param {*} params
* @param {*} params
*/
*/
async
orderIdsByDeliverId
(
deliver_id
){
if
(
!
deliver_id
)
{
return
[];
}
let
sql
=
`SELECT order_id FROM o_order_deliver WHERE deliver_id = :deliver_id`
;
let
list
=
await
this
.
customQuery
(
sql
,
{
deliver_id
:
deliver_id
});
let
rs
=
[];
if
(
!
list
)
{
return
rs
;
}
for
(
let
item
of
list
)
{
rs
.
push
(
item
.
order_id
);
}
return
rs
;
}
/**
* 条件查询所有符合条件的产品
* @param {*} params
*/
async
orderIdsByOperatorId
(
operator_id
){
if
(
!
operator_id
)
{
return
[];
}
let
sql
=
`SELECT order_id FROM o_order_deliver WHERE operator_id = :operator_id`
;
let
list
=
await
this
.
customQuery
(
sql
,
{
operator_id
:
operator_id
});
let
rs
=
[];
if
(
!
list
)
{
return
rs
;
}
for
(
let
item
of
list
)
{
rs
.
push
(
item
.
order_id
);
}
return
rs
;
}
async
listByIds
(
ids
){
async
listByIds
(
ids
){
if
(
!
ids
||
ids
.
length
==
0
)
{
if
(
!
ids
||
ids
.
length
==
0
)
{
return
[];
return
[];
}
}
let
sql
=
[];
let
sql
=
`SELECT * FROM o_order_deliver WHERE deliver_id in (:deliverIdList)`
;
sql
.
push
(
`SELECT * FROM o_order_deliver WHERE deliver_id in (:deliverIdList)`
);
return
await
this
.
customQuery
(
sql
.
join
(
" "
),
{
deliverIdList
:
ids
});
return
await
this
.
customQuery
(
sql
.
join
(
" "
),
{
deliverIdList
:
ids
});
}
}
...
...
xggsve-order/app/base/service/impl/order/obusinessmenSve.js
View file @
088d89f4
...
@@ -7,6 +7,8 @@ class ObusinessmenService extends ServiceBase {
...
@@ -7,6 +7,8 @@ class ObusinessmenService extends ServiceBase {
constructor
()
{
constructor
()
{
super
(
"order"
,
ServiceBase
.
getDaoName
(
ObusinessmenService
));
super
(
"order"
,
ServiceBase
.
getDaoName
(
ObusinessmenService
));
this
.
oorderDao
=
system
.
getObject
(
"db.order.oorderDao"
);
this
.
oorderDao
=
system
.
getObject
(
"db.order.oorderDao"
);
this
.
oorderdeliverDao
=
system
.
getObject
(
"db.order.oorderdeliverDao"
);
this
.
ASSIGN_STATUS
=
[
'1160'
,
'1170'
,
'1180'
,
'1190'
,
'1200'
];
this
.
ASSIGN_STATUS
=
[
'1160'
,
'1170'
,
'1180'
,
'1190'
,
'1200'
];
}
}
...
@@ -129,6 +131,44 @@ class ObusinessmenService extends ServiceBase {
...
@@ -129,6 +131,44 @@ class ObusinessmenService extends ServiceBase {
params
.
startRow
=
(
params
.
currentPage
-
1
)
*
params
.
pageSize
;
params
.
startRow
=
(
params
.
currentPage
-
1
)
*
params
.
pageSize
;
let
deliverId
=
params
.
deliver_id
;
let
orderIds
=
[];
if
(
deliverId
)
{
// 查询交付商关联订单id
let
_orderIds
=
await
this
.
oorderdeliverDao
.
orderIdsByDeliverId
(
deliverId
);
if
(
!
_orderIds
||
_orderIds
.
length
==
0
)
{
return
system
.
getResultSuccess
({
count
:
0
,
rows
:
[]});
}
orderIds
=
orderIds
.
concat
(
_orderIds
);
}
let
operatorId
=
params
.
operator_id
;
if
(
operatorId
)
{
let
_orderIds
=
await
this
.
oorderdeliverDao
.
orderIdsByOperatorId
(
operatorId
);
if
(
!
_orderIds
||
_orderIds
.
length
==
0
)
{
return
system
.
getResultSuccess
({
count
:
0
,
rows
:
[]});
}
if
(
orderIds
.
length
==
0
)
{
orderIds
=
orderIds
.
concat
(
_orderIds
);
}
else
{
let
tmpIds
=
[];
for
(
let
oid
of
orderIds
)
{
if
(
_orderIds
.
indexOf
(
oid
)
!=
-
1
)
{
tmpIds
.
push
(
oid
);
}
}
if
(
tmpIds
.
length
==
0
)
{
return
system
.
getResultSuccess
({
count
:
0
,
rows
:
[]});
}
orderIds
=
tmpIds
;
}
}
if
(
orderIds
&&
orderIds
.
length
>
0
)
{
params
.
orderIds
=
orderIds
;
}
let
total
=
await
this
.
dao
.
countByCondition
(
params
);
let
total
=
await
this
.
dao
.
countByCondition
(
params
);
if
(
total
==
0
)
{
if
(
total
==
0
)
{
return
system
.
getResultSuccess
({
count
:
0
,
rows
:
[]});
return
system
.
getResultSuccess
({
count
:
0
,
rows
:
[]});
...
...
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