Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-serivce
/
glsx-config-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 91cdcec0
authored
Jun 24, 2020
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加默认时间查询最早20170101
1 parent
4286e193
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
4 deletions
app/service/biz/delivery.js
app/service/biz/opportunity.js
app/service/biz/delivery.js
View file @
91cdcec
/*
/*
* @Author: chenwq
* @Author: chenwq
* @Date: 2020-06-16 10:02:28
* @Date: 2020-06-16 10:02:28
* @Last Modified by:
chenwq
* @Last Modified by:
huyue
* @Last Modified time: 2020-06-
19 17:26:03
* @Last Modified time: 2020-06-
24 16:52:20
* 出货统计
* 出货统计
*/
*/
const
Service
=
require
(
"egg"
).
Service
;
const
Service
=
require
(
"egg"
).
Service
;
...
@@ -23,6 +23,7 @@ class deliveryServices extends Service {
...
@@ -23,6 +23,7 @@ class deliveryServices extends Service {
}
=
this
.
app
.
model
.
Biz
;
}
=
this
.
app
.
model
.
Biz
;
this
.
GBDL
=
GlsxBizDelivery
;
this
.
GBDL
=
GlsxBizDelivery
;
this
.
MDSM
=
DjSystemMerchant
;
this
.
MDSM
=
DjSystemMerchant
;
this
.
defaultYear
=
2017
}
}
/**
/**
...
@@ -85,6 +86,10 @@ class deliveryServices extends Service {
...
@@ -85,6 +86,10 @@ class deliveryServices extends Service {
[
Op
.
lt
]:
nextDate
.
getFullYear
()
+
'-'
+
nextMonth
[
Op
.
lt
]:
nextDate
.
getFullYear
()
+
'-'
+
nextMonth
}]
}]
}
}
}
else
{
where
[
item
.
sqlName
]
=
{
[
Op
.
gte
]:
this
.
defaultYear
}
}
}
})
})
likeArr
.
map
(
item
=>
{
likeArr
.
map
(
item
=>
{
...
@@ -155,6 +160,10 @@ class deliveryServices extends Service {
...
@@ -155,6 +160,10 @@ class deliveryServices extends Service {
[
Op
.
lt
]:
nextDate
.
getFullYear
()
+
'-'
+
nextMonth
[
Op
.
lt
]:
nextDate
.
getFullYear
()
+
'-'
+
nextMonth
}]
}]
}
}
}
else
{
where
[
item
.
sqlName
]
=
{
[
Op
.
gte
]:
this
.
defaultYear
}
}
}
})
})
likeArr
.
map
(
item
=>
{
likeArr
.
map
(
item
=>
{
...
...
app/service/biz/opportunity.js
View file @
91cdcec
/*
/*
* @Author: huyue
* @Author: huyue
* @Date: 2020-06-16 15:36:11
* @Date: 2020-06-16 15:36:11
* @Last Modified by:
chenwq
* @Last Modified by:
huyue
* @Last Modified time: 2020-06-
19 11:40:0
3
* @Last Modified time: 2020-06-
24 16:54:2
3
*/
*/
const
Service
=
require
(
"egg"
).
Service
;
const
Service
=
require
(
"egg"
).
Service
;
...
@@ -23,6 +23,7 @@ class OpportunityService extends Service {
...
@@ -23,6 +23,7 @@ class OpportunityService extends Service {
}
=
this
.
app
.
model
.
Biz
;
}
=
this
.
app
.
model
.
Biz
;
this
.
MGBO
=
GlsxBizOpportunity
;
this
.
MGBO
=
GlsxBizOpportunity
;
this
.
MDSM
=
DjSystemMerchant
;
this
.
MDSM
=
DjSystemMerchant
;
this
.
defaultYear
=
2017
}
}
/**
/**
...
@@ -58,6 +59,10 @@ class OpportunityService extends Service {
...
@@ -58,6 +59,10 @@ class OpportunityService extends Service {
let
merchantWhere
=
{}
let
merchantWhere
=
{}
if
(
month
)
{
if
(
month
)
{
where
.
month
=
month
where
.
month
=
month
}
else
{
where
.
month
=
{
[
Op
.
gte
]:
this
.
defaultYear
}
}
}
if
(
merchantName
)
{
if
(
merchantName
)
{
const
__like
=
`%
${
merchantName
}
%`
const
__like
=
`%
${
merchantName
}
%`
...
@@ -102,6 +107,10 @@ class OpportunityService extends Service {
...
@@ -102,6 +107,10 @@ class OpportunityService extends Service {
let
merchantWhere
=
{}
let
merchantWhere
=
{}
if
(
month
)
{
if
(
month
)
{
where
.
month
=
month
where
.
month
=
month
}
else
{
where
.
month
=
{
[
Op
.
gte
]:
this
.
defaultYear
}
}
}
if
(
merchantName
)
{
if
(
merchantName
)
{
const
__like
=
`%
${
merchantName
}
%`
const
__like
=
`%
${
merchantName
}
%`
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment