|
@@ -364,7 +364,7 @@ class ApiService{
|
|
}
|
|
}
|
|
|
|
|
|
//网格化巡检记录
|
|
//网格化巡检记录
|
|
- public static function getFinalList($start_date, $end_date, $depart = '', $person_id = '')
|
|
|
|
|
|
+ public static function getFinalList($start_date, $end_date, $depart = '', $person = '')
|
|
{
|
|
{
|
|
$result['status'] = true;
|
|
$result['status'] = true;
|
|
$result['msg'] = ApiEnum::RETURN_SUCCESS;
|
|
$result['msg'] = ApiEnum::RETURN_SUCCESS;
|
|
@@ -382,8 +382,10 @@ class ApiService{
|
|
$query = $query->where('xjdw', $depart);
|
|
$query = $query->where('xjdw', $depart);
|
|
}
|
|
}
|
|
|
|
|
|
- if ($person_id) {
|
|
|
|
- $query = $query->where('lrr', $person_id);
|
|
|
|
|
|
+ if ($person) {
|
|
|
|
+ $person_id = DB::connection('mysql_fwview')->table('hrmresource')
|
|
|
|
+ ->where('lastname', 'like', '%' . $person . '%')->value('id')->all();
|
|
|
|
+ $query = $query->whereIn('lrr', $person_id);
|
|
}
|
|
}
|
|
|
|
|
|
$query = $query->orderBy('lrdate', 'desc')->groupBy('lrdate', 'xjdw', 'lrr')
|
|
$query = $query->orderBy('lrdate', 'desc')->groupBy('lrdate', 'xjdw', 'lrr')
|