|
|
@@ -424,4 +424,38 @@ class ReportingWork extends Api
|
|
|
$data = \db('设备_基本资料')->where('sys_sbID',$params['addr'])->field('设备编号,rtrim(使用部门) as 使用部门')->find();
|
|
|
$this->success('请求成功',$data);
|
|
|
}
|
|
|
+ /**
|
|
|
+ * 6获取拉料人员
|
|
|
+ * @ApiMethod GET
|
|
|
+ * @params department
|
|
|
+ */
|
|
|
+ public function getMaterialStrippingPeople(){
|
|
|
+ if (Request::instance()->isGet() == false) {
|
|
|
+ $this->error('非法请求');
|
|
|
+ }
|
|
|
+ $params = Request::instance()->param();
|
|
|
+ $where = [];
|
|
|
+ if (!isset($params['department']) || empty($params['department'])) {
|
|
|
+ $this->error('参数错误');
|
|
|
+ }if (!isset($params['search']) || !empty($params['search'])) {
|
|
|
+ $where['员工编号|员工姓名'] = array('like','%'.$params['search'].'%');
|
|
|
+ }
|
|
|
+ $where['职称职务'] = '拉纸工';
|
|
|
+ $where['在职状态'] = '在职';
|
|
|
+ $where['U8在职'] = '在职';
|
|
|
+ if ($params['department'] == 1){
|
|
|
+ $where['所在部门'] = '生产部';
|
|
|
+ }else{
|
|
|
+ $where['所在部门'] = '检验车间';
|
|
|
+ }
|
|
|
+ $list[0]['员工编号'] = '000000';
|
|
|
+ $list[0]['员工姓名'] = '自备';
|
|
|
+ $data = \db('人事_基本资料')->where($where)->field('rtrim(员工编号) as 员工编号,rtrim(员工姓名) as 员工姓名')->order('班组代号 desc')->select();
|
|
|
+ if (!empty($data)){
|
|
|
+ foreach ($data as $item){
|
|
|
+ array_push($list,$item);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $this->success('请求成功',$list);
|
|
|
+ }
|
|
|
}
|