Parcourir la source

查询离职人员

qiuenguang il y a 5 jours
Parent
commit
c4effff120
1 fichiers modifiés avec 2 ajouts et 23 suppressions
  1. 2 23
      application/api/controller/PackagingCountDocument.php

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

@@ -354,32 +354,11 @@ class PackagingCountDocument extends Api
         }else{
             $this->error('参数错误');
         }
-        // $rows = db()->table('人事_基本资料')->field('员工编号, rtrim(员工姓名) as ygxm')->where(['在职状态'=>'在职'])->select();
-        // $data = [];
-        // $pinyin = new Pinyin();
-        // foreach ($rows as $v){
-        //     $sx = '';
-        //     for($i=0; $i<mb_strlen($v['ygxm']); $i++){
-        //         $str = mb_substr($v['ygxm'],$i,1);
-        //         $bool = $this->getChineseCharInitial($str);
-        //         if($bool){
-        //             $sx .= $this->getChineseCharInitial($str);
-        //         }else{
-        //             $sx .= strtoupper($pinyin->abbr($str));
-        //         }
-        //     }
-        //     $data[$sx][] = $v;
-        // }
-        // $sx = strtoupper($sczl_bh);
-        // if(array_key_exists($sx,$data)){
-        //     $this->success('成功',$data[$sx]);
-        // }
-
-        $rs = db()->table('人事_基本资料')->field('员工编号, rtrim(员工姓名) as ygxm')->where(['pycode'=>$sczl_bh,'在职状态'=>'在职'])->select();
+        $rs = db()->table('人事_基本资料')->field('员工编号, rtrim(员工姓名) as ygxm')->where(['pycode'=>$sczl_bh])->select();
         if($rs){
             $this->success('成功',$rs);
         }
-        $rs = db()->table('人事_基本资料')->field('员工编号, rtrim(员工姓名) as ygxm')->where(['员工编号'=>$sczl_bh,'在职状态'=>'在职'])->select();
+        $rs = db()->table('人事_基本资料')->field('员工编号, rtrim(员工姓名) as ygxm')->where(['员工编号'=>$sczl_bh])->select();
         if($rs===false){
             $this->error('员工编号错误');
         }