1234567891011121314151617181920212223242526272829 |
- <?php
- /**
- * Created by PhpStorm.
- * User: sicilon_IT
- * Date: 2020/2/11
- * Time: 14:38
- */
- namespace app\index\logic;
- use app\index\model\gworkermodel;
- use app\index\model\pwrelationmodel;
- use app\index\model\wheadmodel;
- class headmanger{
- public function setghead($arr){
- $set_arr['gid']=$arr['gid'];
- $set_arr['gwid']=$arr['wid'];
- $set_arr['startdate']=date('Y-m-d ');
- $set_arr['checkstatus']=1;
- $head_t=new wheadmodel();
- //取消新班组长以前的权取,只在本班组有效
- $head_t->changeghead($set_arr['gwid']);
- //取消本班组当前的班组长,只有一个班组长
- $head_t->updategheadbygid($set_arr['gid']);
- $res= $head_t->addnewghead($set_arr);
- return $res;
- }
- }
|