Jelajahi Sumber

Merge branch 'master' of https://git.7in6.com/Minong/mes-server-api

曹鹤洋 1 tahun lalu
induk
melakukan
ab29e91ff2

+ 18 - 1
application/api/controller/PieceWorkSchedule.php

@@ -3,7 +3,8 @@
 namespace app\api\controller;
 
 use app\common\controller\Api;
-
+use \think\Request;
+use \think\Db;
 /**
  * 计件工计时单维护接口
  */
@@ -147,4 +148,20 @@ class PieceWorkSchedule extends Api
 
         $this->success('成功',$rows);
     }
+    /**
+     * 定位
+     * @ApiMethod GET
+     * @params date $data
+     * @params string code
+    */
+    public function locate(){
+        if (Request::instance()->isGet() == false){
+            $this->error('非法请求');
+        }
+        $params = Request::instance()->param();
+        if (!isset($params['code']) || !isset($params['date'])){
+            $this->error('参数错误');
+        }
+        halt($params);
+    }
 }

+ 0 - 1
application/api/controller/Product.php

@@ -67,7 +67,6 @@ class Product extends Api
                 $total = Db::name('产品_基本资料')->count();
             }
         }
-       
         $list = Db::query($sql);
         foreach ($list as $key=>$value){
             $code = trim($value['产品编号']);

+ 262 - 4
application/api/controller/WorkOrder.php

@@ -73,6 +73,8 @@ class WorkOrder extends Api
         if ($this->request->isGet() === false){
             $this->error('请求错误');
         }
+        $search = input('search');
+
         $limit = input('limit');
 //        $page = input('page');
         $clientNumber = input('Gd_khdh');
@@ -81,6 +83,9 @@ class WorkOrder extends Api
         $where = [
             '成品代号' => ['like',$clientNumber.'%']
         ];
+//        if (isset($search)){
+//            $where['']
+//        }
         if (isset($startTime) && isset($endTime)){
             $where['接单日期'] = ['between',[$startTime,$endTime]];
         }
@@ -203,7 +208,7 @@ class WorkOrder extends Api
                     '印件-工序' => rtrim($value['Gy0_yjno']).'-'.rtrim($value['Gy0_gxh']),
                     '备选工序' => '',
                     '工序名称' => rtrim($value['Gy0_gxmc']).'【'.rtrim($value['Add_gxmc']).'】',
-                    '计划产量' => '',
+                    '计划产量' => rtrim($value['Gy0_计划接货数']),
                     '基础损耗' => rtrim($value['Gy0_Rate0']),
                     '损耗率' => rtrim($value['Gy0_Rate1']),
                     '报废定额' => '',
@@ -326,7 +331,16 @@ class WorkOrder extends Api
         $this->success('成功');
     }
 
-    //U8投料试算
+
+    /**
+     * U8投料试算
+     * @ApiMethod (GET)
+     * @param string  $processCode   产品编号
+     * @return void
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @throws \think\exception\DbException
+     */
 
     public function U8Trial()
     {
@@ -338,8 +352,24 @@ class WorkOrder extends Api
         if (empty($productCode)){
             $this->error('参数错误');
         }
-//        $field = 'rtrim(Gy0_cpdh) as 产品代号,rtrim(Gy0_yjno) as 印件号,rtrim(Gy0_gxh) as 工序号,rtrim(gy0_gxmc) as gxmc,rtrim(Add_gxmc) as add_gxmc,
-//        rtrim(Gy0_Ms) as 墨色数,rtrim(Gy0_shdh) as 损耗代号,rtrim(损耗系数) as 损耗系数,rtrim(Gy0_ls) as 加工联数,'
+        $field = 'rtrim(Gy0_cpdh) as 产品代号,rtrim(Gy0_yjno) as 印件号,rtrim(Gy0_gxh) as 工序号,rtrim(gy0_gxmc) as gxmc,rtrim(Add_gxmc) as add_gxmc,
+        rtrim(Gy0_Ms) as 墨色数,rtrim(Gy0_shdh) as 损耗代号,rtrim(损耗系数) as 损耗系数,rtrim(Gy0_ls) as 加工联数';
+        $list = Db::table('产品_工艺资料')->where('Gy0_cpdh',$productCode)->field($field)->select();
+        if (empty($list)){
+            $this->error('未找到该产品工序');
+        }
+        foreach ($list as $key=>$value){
+            $data = Db::table('dic_lzsh')->where('sys_bh',$value['损耗代号'])->field('rtrim(sys_rate0) as rate0,rtrim(sys_rate1) as rate1')->cache(true)->find();
+            $list[$key]['调机损耗'] = isset($data['rate0'])?$data['rate0']:'';
+            $list[$key]['运行损耗率'] = isset($data['rate1'])?$data['rate1']:'';
+            if ($value['add_gxmc'] !== ''){
+                $list[$key]['工序名称'] = $value['gxmc'].'【'.$value['add_gxmc'].'】';
+            }else{
+                $list[$key]['工序名称'] = $value['gxmc'];
+            }
+            unset($list[$key]['gxmc'],$list[$key]['add_gxmc']);
+        }
+        $this->success('成功',$list);
     }
 
 
@@ -544,4 +574,232 @@ class WorkOrder extends Api
             $this->error('失败');
         }
     }
+
+    /**
+     * U8工单资料删除
+     * @param string $workOrder  工单编号
+     * @return void
+     * @throws \think\Exception
+     * @throws \think\exception\PDOException
+     */
+    public function U8DataCorrection()
+    {
+        if($this->request->isGet() === false){
+            $this->error('请求错误');
+        }
+        $workOrder = input('workOrder');
+        if (empty($workOrder)){
+            $this->error('参数错误');
+        }
+        $res = Db::table('工单_基本资料')->where('Gd_gdbh',$workOrder)->delete();
+        if ($res !== false){
+            $this->success('成功');
+        }else{
+            $this->error('失败');
+        }
+    }
+
+
+    /**
+     * 产品废检系数调整->质检工艺数据获取
+     * @ApiMethod (GET)
+     * @param  string  $workOrder   工单编号
+     * @return void
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @throws \think\exception\DbException
+     */
+    public function TestCoefficient()
+    {
+        if ($this->request->isGet() === false){
+            $this->error('请求错误');
+        }
+        $workOrder = input('workOrder');
+        if (empty($workOrder)){
+            $this->error('参数错误');
+        }
+        $where = [
+            'Gy0_gdbh' => $workOrder,
+            'Gy0_gxmc' => ['like','%检%']
+        ];
+        $filed = 'rtrim(Gy0_gdbh) as gdbh,rtrim(Gy0_yjno) as yjno,rtrim(Gy0_gxh) as gxh,rtrim(Gy0_gxmc) as gxmc,rtrim(人工检_正品板) as 人工正品板,
+        rtrim(人工检_次品板) as 人工次品板,rtrim(人工检_废检) as 人工废检,rtrim(机检_正品板) as 机检正品板,rtrim(机检_次品板) as 机检次品板,rtrim(机检_废检) as 机检废检,rtrim(Gy0_sbbh) as 设备编号';
+        $list = Db::table('工单_工艺资料')->where($where)->field($filed)->select();
+        if (empty($list)){
+            $this->error('未找到该工单工艺');
+        }
+        $name = Db::table('工单_基本资料')
+            ->where('Gd_gdbh',$workOrder)
+            ->field('rtrim(Gd_cpdh) as 产品代号,rtrim(Gd_khmc) as 客户名称,rtrim(Gd_cpmc) as 产品名称')
+            ->find();
+        if (empty($name)){
+            $this->error('未找到该工单');
+        }
+        foreach ($list as $key=>$value){
+            if ($value['yjno']<10){
+                $value['yjno'] = '0'.$value['yjno'];
+            }
+            if ($value['gxh']<10){
+                $value['gxh'] = '0'.$value['gxh'];
+            }
+            $list[$key]['印件工序及工艺'] = $value['gdbh'].'-'.$value['yjno'].'-'.$value['gxh'].'-'.$value['gxmc'];
+            unset($list[$key]['gdbh'],$list[$key]['yjno'],$list[$key]['gxmc']);
+            $list[$key]['产品编号'] = $name['产品代号'];
+            $list[$key]['产品名称'] = $name['产品名称'];
+            $list[$key]['客户名称'] = $name['客户名称'];
+        }
+        $this->success('成功',$list);
+    }
+
+    /**
+     * 产品质检系数调整->系数修改
+     * @ApiMethod (GET)
+     * @param string $workorder   工单编号
+     * @param string $processCode  工序号
+     * @param float $code1  人工正品板
+     * @param float $code2  人工次品板
+     * @param float $code3  人工废检
+     * @param float $code4  机检正品板
+     * @param float $code5  机检次品板
+     * @param float $code6  机检废检
+     * @return void
+     * @throws \think\Exception
+     * @throws \think\exception\PDOException
+     */
+    public function TestCoefficientEdit()
+    {
+        if ($this->request->isPost() === false){
+            $this->error('请求错误');
+        }
+        $workOrder = input('workOrder');
+        $processCode = input('processCode');
+        $row = [
+            '人工检_正品板' => input('code1'),
+            '人工检_次品板' => input('code2'),
+            '人工检_废检'   => input('code3'),
+            '机检_正品板' => input('code4'),
+            '机检_次品板' => input('code5'),
+            '机检_废检' => input('code6'),
+        ];
+        if (empty($workOrder) || empty($processCode)){
+            $this->error('参数错误');
+        }
+        $where = [
+            'Gy0_gdbh' => $workOrder,
+            'Gy0_gxh' => $processCode
+        ];
+        $sql = Db::table('工单_工艺资料')->where($where)->fetchSql(true)->update($row);
+        $res = Db::query($sql);
+        if ($res !== false){
+            $this->success('成功');
+        }else{
+            $this->error('失败');
+        }
+    }
+
+    //
+
+    /**
+     * 修正工单核算参数->数据获取
+     * @ApiMethod (GET)
+     * @param string $workOrder  工单编号
+     * @return void
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @throws \think\exception\DbException
+     */
+    public function AccountingParameter()
+    {
+        if ($this->request->isGet() === false){
+            $this->error('请求错误');
+        }
+        $workOrder = input('workOrder');
+        if (empty($workOrder)){
+            $this->error('参数错误');
+        }
+        $field = 'rtrim(Gy0_方案) as 方案,rtrim(Gy0_yjno) as yjno,rtrim(Gy0_gxh) as gxh,rtrim(Gy0_gxmc) as gxmc,rtrim(Add_gxmc) as add_gxmc,
+        rtrim(Gy0_sbbh) as 参照设备,rtrim(工价系数) as 难度系数,rtrim(Gy0_shdh) as 损耗代号,rtrim(Gy0_Rate0) as 基础损耗,rtrim(Gy0_Rate1) as 损耗率,
+        rtrim(印刷方式) as 印刷方式,rtrim(版距) as 版距,rtrim(Gy0_ms) as 计损色数,rtrim(损耗系数) as 损耗系数';
+        $list = Db::table('工单_工艺资料')->where('Gy0_gdbh',$workOrder)->field($field)->select();
+        if (empty($list)){
+            $this->error('未找到该工单工艺资料');
+        }
+        foreach ($list as $key=>$value){
+            if ($value['yjno']<10){
+                $value['yjno'] = '0'.$value['yjno'];
+            }
+            if ($value['gxh']<10){
+                $value['gxh'] = '0'.$value['gxh'];
+            }
+            $list[$key]['印件号及工序名称'] = $value['yjno'].'-'.$value['gxh'].$value['gxmc'].'('.$value['add_gxmc'].')';
+            unset($list[$key]['yjno'],$list[$key]['gxmc'],$list[$key]['add_gxmc']);
+        }
+        $this->success('成功',$list);
+    }
+
+    //
+
+    /**
+     * 修正工单核算参数->参数修改
+     * @ApiMethod (GET)
+     * @param string workorder   工单编号
+     * @param string processCode   工序号
+     * @param float  difficulty  难度系数
+     * @param string loss  损耗代号
+     * @param string peintMode  印刷方式
+     * @param float  plate  版距
+     * @param float chromatic  计损色数
+     * @param float wastage 损耗系数
+     * @return void
+     * @throws \think\Exception
+     * @throws \think\db\exception\DataNotFoundException
+     * @throws \think\db\exception\ModelNotFoundException
+     * @throws \think\exception\DbException
+     * @throws \think\exception\PDOException
+     */
+    public function AccountingParameterEdit()
+    {
+        if ($this->request->isPost() === false){
+            $this->error('请求错误');
+        }
+        $workOrder = input('workOrder');
+        $processCode = input('processCode');
+        if (empty($workOrder) || empty($processCode)){
+            $this->error('参数错误');
+        }
+        $row = [
+            '工价系数' => input('difficulty'),
+            'Gy0_shdh' => input('loss'),
+            '印刷方式' => input('printMode'),
+            '版距' => input('plate'),
+            'Gy0_ms' => input('chromatic'),
+            '损耗系数' => input('wastage'),
+        ];
+        //根据损耗代号获取基础损耗、损耗率
+        $data = Db::table('dic_lzsh')->where('sys_bh',$row['Gy0_shdh'])->field('rtrim(sys_rate0) as rate0,rtrim(sys_rate1) as rate1')->find();
+        $row['基础损耗'] = $data['rate0'];
+        $row['损耗率'] = $data['rate1'];
+        $sql = Db::table('工单_工艺资料')->where(['Gy0_gdbh'=>$workOrder,'Gy0_gxh'=>$processCode])->fetchSql(true)->update($row);
+        $res = Db::query($sql);
+        if ($res !== false){
+            $this->success('成功');
+        }else{
+            $this->error('失败');
+        }
+    }
+
+    //工单工序产量统计
+
+    public function OutputStatistics()
+    {
+        if ($this->request->isGet() === false){
+            $this->error('请求错误');
+        }
+        $workOrder  = input('workOrder');
+        if (empty($workOrder)){
+            $this->error('参数错误');
+        }
+//        $filed = 'rtrim(Gy0_yjno) as yjno,rtrim(Gy0_gxh) as gxh,rtrim(Gy0_gxmc) as gxmc,rtrim(Add_gxmc) as add_gxmc,rtrim(Gy0_计划接货数) as 工序计划产量,
+//        rtrim(Gy0_ls) as 联数,'
+    }
 }

+ 208 - 3
application/api/controller/WorkOrderVerification.php

@@ -3,7 +3,8 @@
 namespace app\api\controller;
 
 use app\common\controller\Api;
-
+use \think\Request;
+use \think\Db;
 /**
  * 工单核验单维护接口
  */
@@ -84,12 +85,12 @@ class WorkOrderVerification extends Api
             $this->error('参数错误');
         }
         if (isset($req['sys_id']) && !empty($req['sys_id'])) $where['sys_id'] = ['LIKE','%'.$req['sys_id'].'%'];
-
+        if (isset($req['order']) && !empty($req['order'])) $where['qczl_gdbh'] = $req['order'];
         $rows = db()->table('db_qczl')
             ->field('qczl_gdbh, qczl_yjno, LEFT(qczl_rq, 10) as qczl_rq, qczl_num, rtrim(qczl_NumDesc) as qczl_NumDesc, qczl_fp, 
             fp_lb1, fp_lb2, fp_lb3, fp_lb4, fp_lb5, fp_lb6, fp_lb7, fp_lb8, fp_lb9, fp_lb10, fp_lb11, fp_lb12, fp_lb13, fp_lb14, fp_lb15, fp_lb16, fp_lb17, 
             fp_sl1, fp_sl2, fp_sl3, fp_sl4, fp_sl5, fp_sl6, fp_sl7, fp_sl8, fp_sl9, fp_sl10, fp_sl11, fp_sl12, fp_sl13, fp_sl14, fp_sl15, fp_sl16, fp_sl17, 
-            rtrim(sys_id) as sys_id')
+            rtrim(sys_id) as sys_id,UniqId')
             ->where($where)
             ->order('UniqId desc')
             ->page($page,$limit)
@@ -146,4 +147,208 @@ class WorkOrderVerification extends Api
 
         $this->success('成功',$rows);
     }
+    /**
+     * 获取单个工单核检单信息
+     * @ApiMethod GET
+     * @params string UniqId
+    */
+    public function getOneWorkOrder(){
+        if (Request::instance()->isGet() == false){
+            $this->error('非法请求');
+        }
+        $params = Request::instance()->param();
+        if (!isset($params['UniqId']) || empty($params['UniqId'])){
+            $this->error('参数错误');
+        }
+        $list = Db::name('db_qczl')->where('UniqId',$params['UniqId'])->find();
+        $list['fp_name1'] = '';
+        if (!empty($list['fp_bh1'])){
+            $list['fp_name1'] = Db::name('人事_基本资料')->where('员工编号',$list['fp_bh1'])->value('rtrim(员工姓名)');
+        }
+        $list['fp_name2'] = '';
+        if (!empty($list['fp_bh2'])){
+            $list['fp_name2'] = Db::name('人事_基本资料')->where('员工编号',$list['fp_bh2'])->value('rtrim(员工姓名)');
+        }
+        $list['fp_name3'] = '';
+        if (!empty($list['fp_bh3'])){
+            $list['fp_name3'] = Db::name('人事_基本资料')->where('员工编号',$list['fp_bh3'])->value('rtrim(员工姓名)');
+        }
+        $list['fp_name4'] = '';
+        if (!empty($list['fp_bh4'])){
+            $list['fp_name4'] = Db::name('人事_基本资料')->where('员工编号',$list['fp_bh4'])->value('rtrim(员工姓名)');
+        }
+        $list['fp_name5'] = '';
+        if (!empty($list['fp_bh5'])){
+            $list['fp_name5'] = Db::name('人事_基本资料')->where('员工编号',$list['fp_bh5'])->value('rtrim(员工姓名)');
+        }
+        $list['fp_name6'] = '';
+        if (!empty($list['fp_bh6'])){
+            $list['fp_name6'] = Db::name('人事_基本资料')->where('员工编号',$list['fp_bh6'])->value('rtrim(员工姓名)');
+        }
+        $list['fp_name7'] = '';
+        if (!empty($list['fp_bh7'])){
+            $list['fp_name7'] = Db::name('人事_基本资料')->where('员工编号',$list['fp_bh7'])->value('rtrim(员工姓名)');
+        }
+        $list['fp_name8'] = '';
+        if (!empty($list['fp_bh8'])){
+            $list['fp_name8'] = Db::name('人事_基本资料')->where('员工编号',$list['fp_bh8'])->value('rtrim(员工姓名)');
+        }
+        $list['fp_name9'] = '';
+        if (!empty($list['fp_bh9'])){
+            $list['fp_name9'] = Db::name('人事_基本资料')->where('员工编号',$list['fp_bh9'])->value('rtrim(员工姓名)');
+        }
+        $list['fp_name10'] = '';
+        if (!empty($list['fp_bh10'])){
+            $list['fp_name10'] = Db::name('人事_基本资料')->where('员工编号',$list['fp_bh10'])->value('rtrim(员工姓名)');
+        }
+        $list['fp_name11'] = '';
+        if (!empty($list['fp_bh11'])){
+            $list['fp_name11'] = Db::name('人事_基本资料')->where('员工编号',$list['fp_bh11'])->value('rtrim(员工姓名)');
+        }
+        $list['fp_name12'] = '';
+        if (!empty($list['fp_bh12'])){
+            $list['fp_name12'] = Db::name('人事_基本资料')->where('员工编号',$list['fp_bh12'])->value('rtrim(员工姓名)');
+        }
+        $list['fp_name13'] = '';
+        if (!empty($list['fp_bh13'])){
+            $list['fp_name13'] = Db::name('人事_基本资料')->where('员工编号',$list['fp_bh13'])->value('rtrim(员工姓名)');
+        }
+        $max = Db::name('设备_产量计酬')->where('sczl_gdbh',$list['qczl_gdbh'])->field('MAX(sczl_num) as sczl_num')->find();
+        $list['total_liucheng'] = $max['sczl_num'];
+        $this->success('请求成功',$list);
+    }
+    /**
+     * 获取工单基本信息
+     * @ApiMethod GET
+     * @params string order
+     */
+    public function getOrderInfo(){
+        if (Request::instance()->isGet() == false){
+            $this->error('非法请求');
+        }
+        $params = Request::instance()->param();
+        if (!isset($params['order']) || empty($params['order'])){
+            $this->error('参数错误');
+        }
+        $list = Db::name('工单_基本资料')->alias('a')
+            ->join('工单_印件资料 b','a.Gd_gdbh = b.Yj_Gdbh','left')
+            ->where('a.Gd_gdbh',$params['order'])
+            ->where('a.行号',1)
+            ->field('a.Gd_cpmc,b.yj_Yjno,b.yj_yjmc')
+            ->find();
+        $this->success('请求成功',$list);
+    }
+    /**
+     * 获取印件名称及工序
+     * @ApiMethod GET
+     * @params string order
+     * @params string yj_no
+    */
+    public function getYjInfo(){
+        if (Request::instance()->isGet() == false){
+            $this->error('非法请求');
+        }
+        $params = Request::instance()->param();
+        if (!isset($params['order']) || empty($params['order'])){
+            $this->error('参数错误');
+        }
+        if (!isset($params['yj_no']) || empty($params['yj_no'])){
+            $this->error('参数错误');
+        }
+        $where['Yj_Gdbh'] = $params['order'];
+        $where['yj_Yjno'] = $params['yj_no'];
+        $list = Db::name('工单_印件资料')->where($where)->field('yj_yjmc')->find();
+        $option['Gy0_gdbh'] = $params['order'];
+        $option['Gy0_yjno'] = $params['yj_no'];
+        $option['Gy0_site'] = '检验车间';
+        $option['Gy0_gxmc'] = array('not in',['包装','外发加工','废挑正','成品防护']);
+        $gxList = Db::name('工单_工艺资料')->where($option)->field('Gy0_gxh,rtrim(Gy0_gxmc) as Gy0_gxmc,rtrim(Add_gxmc) as Add_gxmc')->select();
+        $max = Db::name('设备_产量计酬')->where('sczl_gdbh',$params['order'])->where('sczl_yjno',$params['yj_no'])->field('MAX(sczl_num) as sczl_num')->value('sczl_num');
+        $list['gx_data'] = $gxList;
+        $list['max_num'] = $max;
+        $this->success('请求成功',$list);
+
+    }
+    /**
+     * 获取废品分类
+     * @ApiMethod GET
+     * @params string search
+    */
+    public function getWastInfo(){
+        if (Request::instance()->isGet() == false){
+            $this->error('非法请求');
+        }
+        $params = Request::instance()->param();
+        if (!isset($params['search']) || empty($params['search'])){
+            $this->error('参数错误');
+        }
+        $where['分类'] = '废品分类';
+        $where['名称'] = array('like','%'.$params['search'].'%');
+        $data = Db::name('erp_常用字典')->where($where)->column('名称');
+        // 分割字符串并合并相同项
+        $resultArray = [];
+        foreach ($data as $item) {
+            $parts = explode('_', $item);
+            // 使用第一个部分作为一级键,第二个部分作为二级键
+            $firstKey = $parts[0];
+            $secondKey = $parts[1];
+            $thirdValue = $parts[2];
+
+            $resultArray[$firstKey][$secondKey][] = $thirdValue;
+        }
+        // 对废品分类下的数组进行升序排序
+        if (isset($resultArray['data']['废品分类'])) {
+            foreach ($resultArray['data']['废品分类'] as &$category) {
+                // 判断是关联数组(单凹等)还是索引数组(分切等)
+                if (is_array($category) && !empty($category) && is_array(current($category))) {
+                    foreach ($category as &$subCategory) {
+                        ksort($subCategory);
+                    }
+                } else {
+                    ksort($category);
+                }
+            }
+        }
+        $this->success('请求成功',$resultArray);
+    }
+    /**
+     *获取工序及责任组长
+     * @ApiMethod GET
+     * @params string type
+     * @params string order
+    */
+    public function getGxAndLeader(){
+        if (Request::instance()->isGet() == false){
+            $this->error('非法请求');
+        }
+        $params = Request::instance()->param();
+        if (!isset($params['type']) || empty($params['type'])){
+            $this->error('参数错误');
+        }
+        if (!isset($params['order']) || empty($params['order'])){
+            $this->error('参数错误');
+        }
+        $type = trim($params['type']);
+        $waste = Db::name('erp_常用字典')->where('名称','like','%'.$type.'%')->find();
+        if (empty($waste)){
+            $this->error('未查询到废品分类');
+        }
+        $wasteType = explode('_',substr($waste['名称'],0,-1));
+        $searchArr = explode('-',$wasteType[1]);
+        $search = substr($searchArr[1],0,6);
+        $where['a.sczl_gdbh'] = $params['order'];
+        $where['a.sczl_type'] = array('like','%'.$search.'%');
+        $list = Db::name('设备_产量计酬')->alias('a')
+            ->join('人事_基本资料 b','a.sczl_bh1 = b.员工编号','left')
+            ->where($where)->field('distinct(a.sczl_gxmc),a.sczl_bzdh,a.sczl_jtbh,a.sczl_bh1,b.员工姓名 as name')
+            ->select();
+        $count = count($list);
+        $list[$count]['sczl_gxmc'] = '99-外发加工';
+        $list[$count]['sczl_bzdh'] = 'A班';
+        $list[$count]['sczl_jtbh'] = '';
+        $list[$count]['sczl_bh1'] = '000000';
+        $list[$count]['name'] = '计时工';
+        $this->success('请求成功',$list);
+    }
+
 }