|
|
@@ -205,7 +205,7 @@ class EmployeeDailySalary extends Api
|
|
|
->buildSql();
|
|
|
$arr1 = db()->table($arr1 . ' t')
|
|
|
->group('t.bh, LEFT(t.sczl_rq, 7)')
|
|
|
- ->column('t.bh,t.法定天数 as num');
|
|
|
+ ->column('t.bh,count(t.sczl_rq) as num');
|
|
|
//查询该员工当月停机工时
|
|
|
$res1=db('绩效工资汇总')
|
|
|
->join('人事_基本资料','人事_基本资料.员工编号=绩效工资汇总.bh')
|
|
|
@@ -490,7 +490,8 @@ class EmployeeDailySalary extends Api
|
|
|
->buildSql();
|
|
|
$arr1 = db()->table($arr1 . ' t')
|
|
|
->group('t.bh, LEFT(t.sczl_rq, 7)')
|
|
|
- ->column('t.bh,t.法定天数 as num');
|
|
|
+// ->column('t.bh,t.法定天数 as num');
|
|
|
+ ->column('t.bh,count(t.sczl_rq) as num');
|
|
|
|
|
|
//查询该员工当月停机工时
|
|
|
$res1=db('绩效工资汇总')
|
|
|
@@ -501,7 +502,6 @@ class EmployeeDailySalary extends Api
|
|
|
// ->where(['人事_基本资料.所在部门'=>['like',$req['department'].'%']])
|
|
|
->column('bh,rtrim(xm) as 员工姓名,DATE_FORMAT(sczl_rq,"%Y/%m/%d") as sczl_rq,
|
|
|
sum(异常停机工时) as 计时时数');
|
|
|
-
|
|
|
//查询每条记录
|
|
|
$arr2 = db('绩效工资汇总')->alias('j')
|
|
|
->field('j.bh, DATE_FORMAT(j.sczl_rq,"%Y/%m/%d") as sczl_rq,
|
|
|
@@ -529,7 +529,7 @@ class EmployeeDailySalary extends Api
|
|
|
$yjsss = $yjsss1 + $yjsss2;
|
|
|
|
|
|
$a = $yjsss/$arr1[$v['bh']]/11*0.6*$v['达标定额']*$v['Rate']*0.5/1000*$v['千件工价'];
|
|
|
-
|
|
|
+
|
|
|
if(array_key_exists($v['bh'].'-'.$v['sczl_rq'],$brr)){
|
|
|
$brr[$v['bh'].'-'.$v['sczl_rq']] += $a;
|
|
|
}else{
|