|
@@ -175,7 +175,7 @@ class ApiService{
|
|
$query = $query->where(DB::raw('WEEK(lrsj)'), DB::raw('WEEK(CURDATE())'));
|
|
$query = $query->where(DB::raw('WEEK(lrsj)'), DB::raw('WEEK(CURDATE())'));
|
|
}
|
|
}
|
|
|
|
|
|
- $query = $query->groupBy('lrdate', 'lrr', 'xjdw')
|
|
|
|
|
|
+ $query = $query->groupBy('lrdate', 'lrr', 'xjdw', 'dwmc')
|
|
->select(
|
|
->select(
|
|
[
|
|
[
|
|
DB::raw('DATE(lrsj) as lrdate'),
|
|
DB::raw('DATE(lrsj) as lrdate'),
|
|
@@ -187,14 +187,14 @@ class ApiService{
|
|
->get();
|
|
->get();
|
|
|
|
|
|
$allcount = DB::connection('mysql_fwview')->table('formtable_main_974')
|
|
$allcount = DB::connection('mysql_fwview')->table('formtable_main_974')
|
|
- ->whereNotIn('szxmc', $depart)->count();
|
|
|
|
|
|
+ ->where('szxmc', $depart)->count();
|
|
|
|
|
|
$data = [];
|
|
$data = [];
|
|
$count = 0;
|
|
$count = 0;
|
|
foreach ($query as $key => $val) {
|
|
foreach ($query as $key => $val) {
|
|
$detail = DB::connection('mysql_fwview')->table('uf_wghgl_new')
|
|
$detail = DB::connection('mysql_fwview')->table('uf_wghgl_new')
|
|
->where('xjdw', $depart)
|
|
->where('xjdw', $depart)
|
|
- ->where(DB::raw('DATE(lrsj)', $val->lrdate))
|
|
|
|
|
|
+ ->where(DB::raw('DATE(lrsj)'), $val->lrdate)
|
|
->where('lrr', $val->lrr)->count();
|
|
->where('lrr', $val->lrr)->count();
|
|
|
|
|
|
if ($detail >= $allcount) {
|
|
if ($detail >= $allcount) {
|
|
@@ -213,7 +213,8 @@ class ApiService{
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
- dd($data);
|
|
|
|
|
|
+
|
|
|
|
+ $result['data'] = $data;
|
|
|
|
|
|
return $result;
|
|
return $result;
|
|
}
|
|
}
|