|
@@ -231,7 +231,7 @@ class VisitService extends Service {
|
|
const { model } = this.ctx;
|
|
const { model } = this.ctx;
|
|
const level = user.dept.level;
|
|
const level = user.dept.level;
|
|
const match = {};
|
|
const match = {};
|
|
- match.time = { $gte: data.yestday} ;
|
|
|
|
|
|
+ match.time = { $gte: data.startday} ;
|
|
// admin的dept 存在冲突,所以它不需要结合
|
|
// admin的dept 存在冲突,所以它不需要结合
|
|
if (user.role._id != this.app.config.defaultAdminRoleId) {
|
|
if (user.role._id != this.app.config.defaultAdminRoleId) {
|
|
match['dept'+level]= user.dept._id;
|
|
match['dept'+level]= user.dept._id;
|
|
@@ -245,6 +245,7 @@ class VisitService extends Service {
|
|
{ $sort:{ label: 1 } }
|
|
{ $sort:{ label: 1 } }
|
|
]);
|
|
]);
|
|
|
|
|
|
|
|
+ this.ctx.logger.info(data);
|
|
|
|
|
|
let morenArr = [];
|
|
let morenArr = [];
|
|
for(let i=0;i<7;i++){
|
|
for(let i=0;i<7;i++){
|