作者 lyh

gx

@@ -141,12 +141,19 @@ class DownloadProject extends Command @@ -141,12 +141,19 @@ class DownloadProject extends Command
141 { 141 {
142 $this->param['dept_id'] = 2; 142 $this->param['dept_id'] = 2;
143 $this->param['entry_position'] = 2; 143 $this->param['entry_position'] = 2;
  144 + $search = '资料上传';
144 $query = Tickets::with([ 145 $query = Tickets::with([
145 'logs.engineer', 146 'logs.engineer',
146 'project.pm', 147 'project.pm',
147 'project.projectV6', 148 'project.projectV6',
148 ]); 149 ]);
149 - $query->where('status', 0)->where('plan_end_at','<',date("Y-m-d H:i:s", strtotime("-72 hours")));//超过120个小时未处理的工单 150 + $query->where('title', 'like', '%' . $search . '%')
  151 + ->orWhereHas('project', function ($q1) use ($search) {
  152 + $q1->where('title', 'like', '%' . $search . '%')
  153 + ->orWhere('company_name', 'like', '%' . $search . '%');
  154 + });
  155 + $query->where('status', '!=' ,Tickets::STATUS_COMPLETED)->where('plan_end_at','<',date("Y-m-d H:i:s", strtotime("-72 hours")));
  156 + $query->where('status', 0)->where('plan_end_at','<',date("Y-m-d H:i:s", strtotime("-120 hours")));//超过120个小时未处理的工单
150 //TODO::用户部门搜索 157 //TODO::用户部门搜索
151 if(isset($this->param['dept_id']) && !empty($this->param['dept_id'])){ 158 if(isset($this->param['dept_id']) && !empty($this->param['dept_id'])){
152 $manageHrModel = new ManageHr(); 159 $manageHrModel = new ManageHr();