|
@@ -6,6 +6,7 @@ use app\common\model\LeaveApprove;
|
|
|
use app\common\model\ApproveFlow;
|
|
|
use app\common\model\EvectionInfo;
|
|
|
use app\common\service\ApproveService;
|
|
|
+use think\App;
|
|
|
use think\Db;
|
|
|
use app\common\model\User;
|
|
|
/**
|
|
@@ -34,17 +35,7 @@ class Evection extends Base
|
|
|
*/
|
|
|
public function getApproveFlow()
|
|
|
{
|
|
|
- $check_flow = ApproveFlow::where('user_id',$this->user_id)->where('type',1)->where('module',3)->find();
|
|
|
- $where = [];
|
|
|
- $where[] = ['l.type','=',1];
|
|
|
- $where[] = ['l.module','=',3];
|
|
|
- if($check_flow)$where[] = ['l.sort','>',$check_flow->sort];
|
|
|
- $list = ApproveFlow::field('l.user_id,u.name user_name,u.headimg')
|
|
|
- ->alias('l')
|
|
|
- ->where($where)
|
|
|
- ->order('l.sort asc')
|
|
|
- ->leftJoin('StoreMember u','u.id = l.user_id')
|
|
|
- ->select()->toArray();
|
|
|
+ $list = ApproveFlow::getApproveUser(3,$this->user_id);
|
|
|
$this->success('ok',['list'=>$list]);
|
|
|
}
|
|
|
|