|
@@ -193,18 +193,17 @@ class ApiService{
|
|
$data = [];
|
|
$data = [];
|
|
$pie = [];
|
|
$pie = [];
|
|
foreach ($query as $key => $val) {
|
|
foreach ($query as $key => $val) {
|
|
|
|
+ $lastname = DB::connection('mysql_fwview')->table('hrmresource')
|
|
|
|
+ ->where('id', $val->lrr)->value('lastname');
|
|
$allcount = DB::connection('mysql_fwview')->table('formtable_main_974')
|
|
$allcount = DB::connection('mysql_fwview')->table('formtable_main_974')
|
|
- ->where('szxmc', $depart)->count();
|
|
|
|
|
|
+ ->where('szxmc', $val->xjdw)->count();
|
|
|
|
|
|
$detail = DB::connection('mysql_fwview')->table('uf_wghgl_new')
|
|
$detail = DB::connection('mysql_fwview')->table('uf_wghgl_new')
|
|
- ->where('xjdw', $depart)
|
|
|
|
|
|
+ ->where('xjdw', $val->xjdw)
|
|
->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) {
|
|
- $lastname = DB::connection('mysql_fwview')->table('hrmresource')
|
|
|
|
- ->where('id', $val->lrr)->value('lastname');
|
|
|
|
-
|
|
|
|
$data[$val->lrr] = [
|
|
$data[$val->lrr] = [
|
|
'department' => $val->dwmc,
|
|
'department' => $val->dwmc,
|
|
'lastname' => $lastname,
|
|
'lastname' => $lastname,
|