Browse Source

优化员工复制列表接口

曹鹤洋 1 year ago
parent
commit
b27d994cf5
1 changed files with 2 additions and 3 deletions
  1. 2 3
      application/api/controller/RelatedSalaryAccounting.php

+ 2 - 3
application/api/controller/RelatedSalaryAccounting.php

@@ -561,12 +561,11 @@ class RelatedSalaryAccounting extends Api
         $res=db('人事_关联工资设置')
             ->cache(true,86400)
             ->join('人事_基本资料','人事_基本资料.员工编号=人事_关联工资设置.关联员工','LEFT')
-            ->field('关联员工 as 员工编号,人事_基本资料.员工姓名,人事_基本资料.所在部门,人事_基本资料.职称职务,人事_关联工资设置.UniqID')
+            ->field('关联员工 as 员工编号, trim(人事_基本资料.员工姓名) as 员工姓名, trim(人事_基本资料.所在部门) as 所在部门, trim(人事_基本资料.职称职务) as 职称职务,trim(人事_基本资料.UniqID) as UniqID')
             ->group('关联员工')
             ->where(['日期'=>['between',"$start_time,$end_time"]])
-            // ->order('人事_关联工资设置.关联员工')
             ->select();
-        if(!$res){
+        if($res===false){
             $this->error('失败');
         }
         $this->success('成功',$res);