Browse Source

包装计件工资

qiuenguang 1 year ago
parent
commit
60f7f32f4e
1 changed files with 2 additions and 1 deletions
  1. 2 1
      application/api/controller/StaffSalary.php

+ 2 - 1
application/api/controller/StaffSalary.php

@@ -395,6 +395,7 @@ class StaffSalary extends Api
             ->join('工单_基本资料 e5','a.sczl_gdbh5 = e5.Gd_gdbh AND a.sczl_gdbh5 IS NOT NULL','LEFT')
             ->join('工单_基本资料 e6','a.sczl_gdbh6 = e6.Gd_gdbh AND a.sczl_gdbh6 IS NOT NULL','LEFT')
             ->where($where)
+            ->group('a.UniqId')
             ->select();
 //        halt($result);
         foreach ($result as $value){
@@ -416,7 +417,7 @@ class StaffSalary extends Api
                 if (!empty($value[$gdbhKey])){
                     $item['sczl_gdbh'] = $value[$gdbhKey];
                     $item['sczl_yjno'] = ltrim(substr($value[$yjgxKey],0,2), '0');
-                    $item['sczl_gxh'] = substr($value[$yjgxKey],-2);
+                    $item['sczl_gxh'] = abs((int)substr($value[$yjgxKey],-2));
 //                    $item['sczl_type'] = substr($value[$gxmcKey],0,30);
                     $item['sczl_type'] = $value[$gxmcKey];
                     if (!empty($value[$reworkKey])  && $value[$reworkKey] > 0){