['node_id'], ]; } /** * @notes 获取工程监理--新增检查项明细列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author likeadmin * @date 2024/02/26 15:34 */ public function lists(): array { $params = $this->request->get(); $where = []; if(isset($params['node_ids']) && $params['node_ids'] != ''){ $where[] = ['node_id','in',$params['node_ids']]; } return SupervisionCheckItemDetail::withoutField('create_time,update_time,delete_time')->where($this->searchWhere)->where($where) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select()->each(function($data){ $data['must_check_text'] = $data->must_check_text; }) ->toArray(); } /** * @notes 获取工程监理--新增检查项明细数量 * @return int * @author likeadmin * @date 2024/02/26 15:34 */ public function count(): int { $params = $this->request->get(); $where = []; if(isset($params['node_ids']) && $params['node_ids'] != ''){ $where[] = ['node_id','in',$params['node_ids']]; } return SupervisionCheckItemDetail::where($this->searchWhere)->where($where)->count(); } }