|
@@ -550,7 +550,7 @@ func (b *Board) MultiTrackCustomer() {
|
|
|
endTime = parse2.Format("2006-01-02") + " 23:59:59"
|
|
|
}
|
|
|
res := util.Mysql.SelectBySql("SELECT DISTINCT b.id,b.name,b.industry,b.area,b.address FROM entniche_project_track a LEFT JOIN entniche_customer b ON a.customer_id = b.id WHERE b.name is not null and a.project_id IS NOT null and a.user_id IN (SELECT user_id FROM entniche_department_user WHERE dept_id = ? ) AND a.time >= ? AND a.time <= ? LIMIT "+fmt.Sprint(page)+","+fmt.Sprint(pageSize), departId, startTime, endTime)
|
|
|
- count := util.Mysql.CountBySql("SELECT count( DISTINCT b.id) as count FROM entniche_project_track a LEFT JOIN entniche_customer b ON a.customer_id = b.id WHERE b.name is not null and a.project_id IS NOT null and a.user_id IN (SELECT user_id FROM entniche_department_user WHERE dept_id = 3388 ) AND a.time >= ? AND a.time <= ? ORDER BY time DESC ", departId, startTime, endTime)
|
|
|
+ count := util.Mysql.CountBySql("SELECT count( DISTINCT b.id) as count FROM entniche_project_track a LEFT JOIN entniche_customer b ON a.customer_id = b.id WHERE b.name is not null and a.project_id IS NOT null and a.user_id IN (SELECT user_id FROM entniche_department_user WHERE dept_id = ? ) AND a.time >= ? AND a.time <= ? ORDER BY time DESC ", departId, startTime, endTime)
|
|
|
b.ServeJson(Result{Error_code: 1, Error_msg: "查询成功", Data: map[string]interface{}{"list": res, "count": count}})
|
|
|
}
|
|
|
|