|
|
@@ -398,14 +398,26 @@ class WorkOrderVerification extends Api
|
|
|
}
|
|
|
$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.'%');
|
|
|
$where['a.sczl_yjno'] = $params['yjno'];
|
|
|
- $list = db('设备_产量计酬')->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();
|
|
|
+ if ($searchArr[1] === '模切凹凸'){
|
|
|
+ $list = db('设备_产量计酬')->alias('a')
|
|
|
+ ->join('人事_基本资料 b', 'a.sczl_bh1 = b.员工编号', 'left')
|
|
|
+ ->where($where)
|
|
|
+ ->where(function($query) {
|
|
|
+ $query->where('a.sczl_type', 'like', '%模切%')
|
|
|
+ ->whereOr('a.sczl_type', 'like', '%凹凸%');
|
|
|
+ })
|
|
|
+ ->field('distinct(a.sczl_gxmc),a.sczl_bzdh,a.sczl_jtbh,a.sczl_bh1,b.员工姓名 as name')
|
|
|
+ ->select();
|
|
|
+ }else{
|
|
|
+ $search = substr($searchArr[1],0,6);
|
|
|
+ $where['a.sczl_type'] = array('like','%'.$search.'%');
|
|
|
+ $list = db('设备_产量计酬')->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班';
|