diff --git a/digital_doctor/.gitignore b/digital_doctor/.gitignore index df8ec46..a0733c8 100644 --- a/digital_doctor/.gitignore +++ b/digital_doctor/.gitignore @@ -1,22 +1,28 @@ /nbproject/ #/thinkphp/ #/vendor/ +#/application/extra /runtime/* #/addons/* -#/public/assets/libs/ +/application/admin/command/Install/*.lock #/public/assets/addons/* /public/uploads/* .idea composer.lock +.env.sample *.log *.css.map !.gitkeep .env .svn .vscode -node_modules +#application/extra/* .user.ini - +#/application/database.php +js_api_ticket.txt +.well-known +webautocode +webautocodestatic .git .git* *.pid \ No newline at end of file diff --git a/digital_doctor/application/api/controller/Hdrquestionnairequestion.php b/digital_doctor/application/api/controller/Hdrquestionnairequestion.php index 67d3f8e..9c11225 100644 --- a/digital_doctor/application/api/controller/Hdrquestionnairequestion.php +++ b/digital_doctor/application/api/controller/Hdrquestionnairequestion.php @@ -1,90 +1,121 @@ -(可能有部分额外字段未在此体现): - * id ID - * hdrdepartment_id 所属科室 - * question 问卷问题 - * fit_sex 适合对象:all=全部,gg=男,mm=女 + * is_common 是否通用:yes=是,no=否 + * is_only_boy 只适合男:yes=是,no=否 + * is_only_girl 只适合女:yes=是,no=否 * type 选项类型:one=单选,more=多选 - * create_time 创建时间 - * update_time 更新时间 - - * author:wh - */ - function getHdrquestionnairequestionList(){ - Tools::log_to_write_txt(['获取科室问卷问题(一个问题对应多个答案) 入参:'=>input()]); - $api_desc = '获取科室问卷问题(一个问题对应多个答案)'; - try { - - $id = input('id'); - $hdrdepartment_id = input('hdrdepartment_id'); - $question = input('question'); - - - $model_obj = Db::table(TabConf::$fa_hdrquestionnairequestion); - - if(input('id')){ - $model_obj->where('id',input('id')); - } - if(input('hdrdepartment_id')){ - $model_obj->where('hdrdepartment_id',input('hdrdepartment_id')); - } - if(input('question')){ - $model_obj->where('question',input('question')); - } - - $data = $model_obj->paginate(['page'=>input('current_page',1),'list_rows'=>input('list_rows',15)]) - ->each(function($item, $key){ - - - - return $item; - }); - - // ['total'] => int(30) - // ['per_page'] => int(15) - // ['current_page'] => int(1) - // ['last_page''] => int(2) - $data = $data->toArray();//包含 data列表 - - - - - return json(Tools::set_ok('ok',$data)); - }catch(\Exception $e){ - Tools::log_to_write_txt([ - 'error'=>'获取科室问卷问题(一个问题对应多个答案).异常.'.$e->getMessage(), - '参数'=>input(), - 'error_info'=>$e->getTraceAsString() - ]); - return json(Tools::set_res(500,'操作异常',[])); - } - } - + * create_time 创建时间 + * + * 所有字段说明(可能有部分额外字段未在此体现): + * id ID + * hdrdepartment_id 所属科室 + * question 问卷问题 + * is_common 是否通用:yes=是,no=否 + * is_only_boy 只适合男:yes=是,no=否 + * is_only_girl 只适合女:yes=是,no=否 + * type 选项类型:one=单选,more=多选 + * create_time 创建时间 + * update_time 更新时间 + + * author:wh + */ + function getHdrquestionnairequestionList(){ + Tools::log_to_write_txt(['获取科室问卷问题(一个问题对应多个答案) 入参:'=>input()]); + $api_desc = '获取科室问卷问题(一个问题对应多个答案)'; + try { + + $id = input('id'); + $hdrdepartment_id = input('hdrdepartment_id'); + if(empty($hdrdepartment_id)){ + return json(Tools::set_fail('参数错误')); + } + + $question = input('question'); + $is_common = input('is_common'); + $is_only_boy = input('is_only_boy'); + $is_only_girl = input('is_only_girl'); + $type = input('type'); + $create_time = input('create_time'); + + + $model_obj = Db::table(TabConf::$fa_hdrquestionnairequestion); + + if(input('id')){ + $model_obj->where('id',input('id')); + } + if(input('hdrdepartment_id')){ + $model_obj->where('hdrdepartment_id',input('hdrdepartment_id')); + } + if(input('question')){ + $model_obj->where('question',input('question')); + } + if(input('is_common')){ + $model_obj->where('is_common',input('is_common')); + } + if(input('is_only_boy')){ + $model_obj->where('is_only_boy',input('is_only_boy')); + } + if(input('is_only_girl')){ + $model_obj->where('is_only_girl',input('is_only_girl')); + } + if(input('type')){ + $model_obj->where('type',input('type')); + } + if(input('create_time')){ + $model_obj->where('create_time',input('create_time')); + } + + $data = $model_obj->paginate(['page'=>input('current_page',1),'list_rows'=>input('list_rows',15)]) + ->each(function($item, $key){ + + + + return $item; + }); + + // ['total'] => int(30) + // ['per_page'] => int(15) + // ['current_page'] => int(1) + // ['last_page''] => int(2) + $data = $data->toArray();//包含 data列表 + + + + + return json(Tools::set_ok('ok',$data)); + }catch(\Exception $e){ + Tools::log_to_write_txt([ + 'error'=>'获取科室问卷问题(一个问题对应多个答案).异常.'.$e->getMessage(), + '参数'=>input(), + 'error_info'=>$e->getTraceAsString() + ]); + return json(Tools::set_res(500,'操作异常',[])); + } + } } \ No newline at end of file diff --git a/digital_doctor/public/api_docs/api_list.html b/digital_doctor/public/api_docs/api_list.html index 04c48f0..789afab 100644 --- a/digital_doctor/public/api_docs/api_list.html +++ b/digital_doctor/public/api_docs/api_list.html @@ -86,12 +86,19 @@ * id ID * hdrdepartment_id 所属科室 * question 问卷问题 + * is_common 是否通用:yes=是,no=否 + * is_only_boy 只适合男:yes=是,no=否 + * is_only_girl 只适合女:yes=是,no=否 + * type 选项类型:one=单选,more=多选 + * create_time 创建时间 * * 所有字段说明(可能有部分额外字段未在此体现): * id ID * hdrdepartment_id 所属科室 * question 问卷问题 - * fit_sex 适合对象:all=全部,gg=男,mm=女 + * is_common 是否通用:yes=是,no=否 + * is_only_boy 只适合男:yes=是,no=否 + * is_only_girl 只适合女:yes=是,no=否 * type 选项类型:one=单选,more=多选 * create_time 创建时间 * update_time 更新时间 diff --git a/digital_doctor/public/api_docs/api_list.md b/digital_doctor/public/api_docs/api_list.md index ad637e6..2a49ce2 100644 --- a/digital_doctor/public/api_docs/api_list.md +++ b/digital_doctor/public/api_docs/api_list.md @@ -64,12 +64,19 @@ * id ID * hdrdepartment_id 所属科室 * question 问卷问题 + * is_common 是否通用:yes=是,no=否 + * is_only_boy 只适合男:yes=是,no=否 + * is_only_girl 只适合女:yes=是,no=否 + * type 选项类型:one=单选,more=多选 + * create_time 创建时间 * * 所有字段说明(可能有部分额外字段未在此体现): * id ID * hdrdepartment_id 所属科室 * question 问卷问题 - * fit_sex 适合对象:all=全部,gg=男,mm=女 + * is_common 是否通用:yes=是,no=否 + * is_only_boy 只适合男:yes=是,no=否 + * is_only_girl 只适合女:yes=是,no=否 * type 选项类型:one=单选,more=多选 * create_time 创建时间 * update_time 更新时间