Commit 91cdcec0 by 胡悦

添加默认时间查询最早20170101

1 parent 4286e193
/*
* @Author: chenwq
* @Date: 2020-06-16 10:02:28
* @Last Modified by: chenwq
* @Last Modified time: 2020-06-19 17:26:03
* @Last Modified by: huyue
* @Last Modified time: 2020-06-24 16:52:20
* 出货统计
*/
const Service = require("egg").Service;
......@@ -23,6 +23,7 @@ class deliveryServices extends Service {
} = this.app.model.Biz;
this.GBDL = GlsxBizDelivery;
this.MDSM = DjSystemMerchant;
this.defaultYear = 2017
}
/**
......@@ -85,6 +86,10 @@ class deliveryServices extends Service {
[Op.lt]: nextDate.getFullYear() + '-' + nextMonth
}]
}
} else {
where[item.sqlName] = {
[Op.gte]: this.defaultYear
}
}
})
likeArr.map(item => {
......@@ -155,6 +160,10 @@ class deliveryServices extends Service {
[Op.lt]: nextDate.getFullYear() + '-' + nextMonth
}]
}
} else {
where[item.sqlName] = {
[Op.gte]: this.defaultYear
}
}
})
likeArr.map(item => {
......
/*
* @Author: huyue
* @Date: 2020-06-16 15:36:11
* @Last Modified by: chenwq
* @Last Modified time: 2020-06-19 11:40:03
* @Last Modified by: huyue
* @Last Modified time: 2020-06-24 16:54:23
*/
const Service = require("egg").Service;
......@@ -23,6 +23,7 @@ class OpportunityService extends Service {
} = this.app.model.Biz;
this.MGBO = GlsxBizOpportunity;
this.MDSM = DjSystemMerchant;
this.defaultYear = 2017
}
/**
......@@ -58,6 +59,10 @@ class OpportunityService extends Service {
let merchantWhere = {}
if (month) {
where.month = month
} else {
where.month = {
[Op.gte]: this.defaultYear
}
}
if (merchantName) {
const __like = `%${merchantName}%`
......@@ -102,6 +107,10 @@ class OpportunityService extends Service {
let merchantWhere = {}
if (month) {
where.month = month
} else {
where.month = {
[Op.gte]: this.defaultYear
}
}
if (merchantName) {
const __like = `%${merchantName}%`
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!