Explorar el Código

优化员工查询

曹鹤洋 hace 1 año
padre
commit
414b6533cb
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      application/api/controller/PackagingCountDocument.php

+ 2 - 2
application/api/controller/PackagingCountDocument.php

@@ -294,9 +294,9 @@ class PackagingCountDocument extends Api
         }else{
             $this->error('参数错误');
         }
-        $rs = db()->table('人事_基本资料')->field('rtrim(员工姓名) as ygxm')->where('员工编号',$sczl_bh)->find();
+        $rs = db()->table('人事_基本资料')->field('rtrim(员工姓名) as ygxm')->where(['员工编号'=>$sczl_bh,'在职状态'=>'在职'])->find();
         if(!$rs){
-            $this->error('失败');
+            $this->error('员工编号错误');
         }
         $this->success('成功',$rs);
     }