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
cc32c85d
Commit
cc32c85d
authored
Jan 19, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dd
parent
5e2cb18f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
6 deletions
+15
-6
xggsve-order/app/base/api/impl/op/action.js
+1
-0
xggsve-order/app/base/db/impl/order/oorderdeliverDao.js
+9
-4
xggsve-order/app/base/service/impl/order/oorderSve.js
+3
-0
xggsve-order/app/base/service/impl/order/oorderdeliverSve.js
+2
-2
No files found.
xggsve-order/app/base/api/impl/op/action.js
View file @
cc32c85d
...
@@ -103,6 +103,7 @@ class ActionAPI extends APIBase {
...
@@ -103,6 +103,7 @@ class ActionAPI extends APIBase {
case
"statDeliverData"
:
//交付商统计
case
"statDeliverData"
:
//交付商统计
opResult
=
await
this
.
oorderdeliverSve
.
statDeliverData
(
action_body
);
opResult
=
await
this
.
oorderdeliverSve
.
statDeliverData
(
action_body
);
break
;
break
;
// 统计数据(交付商)
// 统计数据(交付商)
case
"deliverStatTransData"
:
//交付商统计
case
"deliverStatTransData"
:
//交付商统计
opResult
=
await
this
.
oorderdeliverSve
.
deliverStatTransData
(
action_body
);
opResult
=
await
this
.
oorderdeliverSve
.
deliverStatTransData
(
action_body
);
...
...
xggsve-order/app/base/db/impl/order/oorderdeliverDao.js
View file @
cc32c85d
...
@@ -219,10 +219,11 @@ class OorderdeliverDao extends Dao {
...
@@ -219,10 +219,11 @@ class OorderdeliverDao extends Dao {
var
sql
=
[];
var
sql
=
[];
sql
.
push
(
"SELECT"
);
sql
.
push
(
"SELECT"
);
sql
.
push
(
"DATE_FORMAT(a.created_at, '%Y-%m-%d') AS `day`, SUM(b.deliver_divide) AS orderPrice, COUNT(1) AS orderCount"
);
sql
.
push
(
"DATE_FORMAT(a.created_at, '%Y-%m-%d') AS `day`, SUM(b.deliver_divide) AS orderPrice, COUNT(1) AS orderCount"
);
sql
.
push
(
"from o_order a inner join o_order_deliver b on a.deliver_id = b.id where 1=1 and b.deliver_id = :deliver_id"
);
var
params
=
{
var
params
=
{
begin
:
begin
,
begin
:
begin
,
end
:
end
end
:
end
,
deliver_id
:
deliver_id
};
};
if
(
begin
)
{
if
(
begin
)
{
sql
.
push
(
"AND a.created_at >= :begin"
);
sql
.
push
(
"AND a.created_at >= :begin"
);
...
@@ -243,7 +244,7 @@ class OorderdeliverDao extends Dao {
...
@@ -243,7 +244,7 @@ class OorderdeliverDao extends Dao {
}
}
/**
/**
*
平台
数据概览
*
交付商
数据概览
* @param {*} begin
* @param {*} begin
* @param {*} end
* @param {*} end
*/
*/
...
@@ -251,7 +252,9 @@ class OorderdeliverDao extends Dao {
...
@@ -251,7 +252,9 @@ class OorderdeliverDao extends Dao {
var
result
=
{};
var
result
=
{};
var
sql
=
[];
var
sql
=
[];
sql
.
push
(
"SELECT"
);
sql
.
push
(
"SELECT"
);
sql
.
push
(
`WHERE 1 = 1 and b.deliver_id = '
${
deliver_id
}
' and a.status="1180"`
);
sql
.
push
(
"DATE_FORMAT(a.created_at, '%Y-%m') AS `month`, SUM(b.deliver_divide) AS orderPrice, COUNT(1) AS orderCount"
);
sql
.
push
(
"FROM `o_order` a inner join o_order_deliver b on a.deliver_id = b.id"
);
sql
.
push
(
`WHERE 1 = 1 and b.deliver_id = '
${
deliver_id
}
'`
);
var
params
=
{
var
params
=
{
begin
:
begin
,
begin
:
begin
,
...
@@ -287,6 +290,8 @@ class OorderdeliverDao extends Dao {
...
@@ -287,6 +290,8 @@ class OorderdeliverDao extends Dao {
return
result
;
return
result
;
}
}
/*********************************************以下是交付商首页**************************************************** */
/**
/**
* 完成订单
* 完成订单
* @param {*} begin
* @param {*} begin
...
...
xggsve-order/app/base/service/impl/order/oorderSve.js
View file @
cc32c85d
...
@@ -526,6 +526,9 @@ class OorderService extends ServiceBase {
...
@@ -526,6 +526,9 @@ class OorderService extends ServiceBase {
* @param {*} params
* @param {*} params
*/
*/
async
needToBeDealtWith
(
params
)
{
async
needToBeDealtWith
(
params
)
{
if
(
!
params
.
current_date
)
{
return
system
.
getResult
(
null
,
`参数错误 当前时间不能为空`
);
}
try
{
try
{
let
begin
,
end
;
let
begin
,
end
;
begin
=
moment
(
params
.
current_date
).
format
(
"YYYY-MM"
)
+
"-01 00:00:00"
;
begin
=
moment
(
params
.
current_date
).
format
(
"YYYY-MM"
)
+
"-01 00:00:00"
;
...
...
xggsve-order/app/base/service/impl/order/oorderdeliverSve.js
View file @
cc32c85d
...
@@ -154,12 +154,12 @@ class OorderdeliverService extends ServiceBase {
...
@@ -154,12 +154,12 @@ class OorderdeliverService extends ServiceBase {
*/
*/
async
statDeliverData
(
params
)
{
async
statDeliverData
(
params
)
{
if
(
!
params
.
current
D
ate
)
{
if
(
!
params
.
current
_d
ate
)
{
return
system
.
getResult
(
null
,
`参数错误 当前时间不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 当前时间不能为空`
);
}
}
try
{
try
{
let
begin
,
end
;
let
begin
,
end
;
begin
=
moment
(
params
.
current
D
ate
).
format
(
"YYYY-MM"
)
+
"-01 00:00:00"
;
begin
=
moment
(
params
.
current
_d
ate
).
format
(
"YYYY-MM"
)
+
"-01 00:00:00"
;
end
=
moment
(
begin
).
add
(
1
,
"months"
).
subtract
(
1
,
'days'
).
format
(
"YYYY-MM-DD"
)
+
" 23:59:59"
;
end
=
moment
(
begin
).
add
(
1
,
"months"
).
subtract
(
1
,
'days'
).
format
(
"YYYY-MM-DD"
)
+
" 23:59:59"
;
let
deliverList
=
await
this
.
dao
.
deliverList
(
begin
,
end
);
let
deliverList
=
await
this
.
dao
.
deliverList
(
begin
,
end
);
let
deliverSet
=
new
Set
();
let
deliverSet
=
new
Set
();
...
...
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