insertAll($data); } //连表查询对应的ccjc信息 public function selectCcjcData($where,$pageNum=1,$pageSize=10) { //todo 模型我写不出来,只能用db了 $result= Db::name("orgs") ->join('t_ccjc','t_orgs.task_id=t_ccjc.id') ->where($where) ->page((int)$pageNum,(int)$pageSize) ->select(); return $result; } public function countCcjcData($where) { //todo 模型我写不出来,只能用db了 $result= Db::name("orgs") ->Join('t_ccjc','t_orgs.task_id=t_ccjc.id') ->where($where) ->count(); return $result; } public function getUnitIdByTaskID($task_id) { if (empty($task_id)) { return false; } return $this->where('task_id', '=', $task_id)->find(); } }