|
@@ -428,6 +428,19 @@ class WorkOrderVerification extends Api
|
|
|
->where($where)
|
|
->where($where)
|
|
|
->field('distinct(a.sczl_gxmc),a.sczl_bzdh,a.sczl_jtbh,a.sczl_bh1,b.员工姓名 as name')
|
|
->field('distinct(a.sczl_gxmc),a.sczl_bzdh,a.sczl_jtbh,a.sczl_bh1,b.员工姓名 as name')
|
|
|
->select();
|
|
->select();
|
|
|
|
|
+ }elseif ($searchArr[1] === '胶印'){
|
|
|
|
|
+ $gxmcArray = ['裁切','滚切','胶印','上光','切废'];
|
|
|
|
|
+ $list = db('设备_产量计酬')->alias('a')
|
|
|
|
|
+ ->join('人事_基本资料 b', 'a.sczl_bh1 = b.员工编号', 'left')
|
|
|
|
|
+ ->where($where) // 保留其他筛选条件
|
|
|
|
|
+ ->where(function($query) use ($gxmcArray) {
|
|
|
|
|
+ foreach ($gxmcArray as $word) {
|
|
|
|
|
+ $query->whereOr('a.sczl_gxmc', 'like', "%{$word}%");
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ ->field('distinct(a.sczl_gxmc), a.sczl_bzdh, a.sczl_jtbh, a.sczl_bh1, b.员工姓名 as name')
|
|
|
|
|
+ ->order('a.sczl_gxh', 'asc')
|
|
|
|
|
+ ->select();
|
|
|
}else{
|
|
}else{
|
|
|
$search = substr($searchArr[1],0,6);
|
|
$search = substr($searchArr[1],0,6);
|
|
|
$where['a.sczl_type'] = array('like','%'.$search.'%');
|
|
$where['a.sczl_type'] = array('like','%'.$search.'%');
|