This commit is contained in:
2025-03-26 11:55:10 +08:00
parent 3e7295fec4
commit 2fada5b9ac
7 changed files with 307 additions and 264 deletions

View File

@@ -0,0 +1,27 @@
<?php
/*
* description
* authorwh
* email
*/
namespace app\api\controller;
use think\Db;
use app\common\model\TabConf;
use wanghua\general_utility_tools_php\framework\base\BaseAuthController;
use think\facade\Request;
use wanghua\general_utility_tools_php\file\upload\FileUpload;
use wanghua\general_utility_tools_php\tool\Tools;
class BaseHttpApi extends BaseAuthController
{
//控制器注释
protected $controller_comments = '';
}

View File

@@ -1,42 +0,0 @@
<?php
/*
* description
* authorwh
* email
* createTime{2025/3/25} {10:00}
*/
namespace app\api\controller;
use think\Controller;
use think\Db;
use wanghua\general_utility_tools_php\Mmodel;
use wanghua\general_utility_tools_php\tool\Tools;
class Worker extends BaseApiAuthController
{
/**
* desc获取工作人员列表
*
* authorwh
*/
function getList(){
return Mmodel::catchJson(function (){
$firm_sign = input('firm_sign');//企业标识
if(empty($firm_sign)){
return Tools::set_fail('企业标识不能为空');
}
$info = Db::table('fa_admin')
->where('role','firm')
->where('firm_id',$firm_sign)
->select();
return Tools::set_ok('ok',[
'staff_list'=>array_column($info,'rel_wxid')
]);
});
}
}

View File

@@ -0,0 +1,95 @@
<?php
namespace app\api\controller;
use think\Db;
use app\common\model\TabConf;
use wanghua\general_utility_tools_php\file\upload\FileUpload;
use wanghua\general_utility_tools_php\tool\Tools;
use wanghua\general_utility_tools_php\Validate;
use think\Controller;
class Workers extends BaseHttpApi
{
protected $controller_comments = '管理员表';
/**
* desc获取工作人员列表
*
请求地址:
* api/Workers/getWorkers
*
* 参数:
* mobile 手机号码
* rel_wxid 关联微信
* firm_id 所属企业
*
* 所有字段说明<span style="color: gray">(可能有部分额外字段未在此体现)</span>
* id ID
* username 用户名
* nickname 昵称
* password 密码
* salt 密码盐
* avatar 头像
* email 电子邮箱
* mobile 手机号码
* loginfailure 失败次数
* logintime 登录时间
* loginip 登录IP
* createtime 创建时间
* updatetime 更新时间
* token Session标识
* role 角色:admin=管理员,firm=企业人员
* status 状态
* rel_wxid 关联微信
* employee_type 类型:1=企业微信,2=个人微信
* firm_id 所属企业
* firmstore_id 所属店铺
* firmduty_id 职务
* authorwh
*/
function getWorkers(){
Tools::log_to_write_txt(['获取工作人员列表 入参:'=>input()]);
$api_desc = '获取工作人员列表';
try {
$mobile = input('mobile');
$rel_wxid = input('rel_wxid');
$firm_id = input('firm_id');
$model_obj = Db::table(TabConf::$fa_admin);
if(input('mobile')){
$model_obj->where('mobile',input('mobile'));
}
if(input('rel_wxid')){
$model_obj->where('rel_wxid',input('rel_wxid'));
}
if(input('firm_id')){
$model_obj->where('firm_id',input('firm_id'));
}
$model_obj->where('role','firm');
$model_obj->where('status','normal');
$data = $model_obj->select();
if(empty($data)){
return json(Tools::set_ok('ok',$data));
}
return json(Tools::set_ok('ok',['staff_list'=>implode(',',array_column($data,'rel_wxid'))]));
}catch(\Exception $e){
Tools::log_to_write_txt([
'error'=>'获取工作人员列表.异常.'.$e->getMessage(),
'参数'=>input(),
'error_info'=>$e->getTraceAsString()
]);
return json(Tools::set_res(500,'操作异常',[]));
}
}
}

View File

@@ -6,21 +6,9 @@ class TabConf
{
/**
* ai分析药品、影像、病历结果
* 企业员工
*/
static $___fa_drugs_images_medical_task = '___fa_drugs_images_medical_task';
/**
* AI药品、影像、病历上传任务记录
*/
static $__fa_drugs_images_medical_result = '__fa_drugs_images_medical_result';
/**
* 基本信息图片上传并AI分析结果
*/
static $__fa_hbruser_drugs_images_medical_report = '__fa_hbruser_drugs_images_medical_report';
static $__fa_firmemployee = '__fa_firmemployee';
/**
@@ -35,6 +23,24 @@ class TabConf
static $fa_admin_log = 'fa_admin_log';
/**
* AI客服管理
*/
static $fa_aicustomerservice = 'fa_aicustomerservice';
/**
* API颁发token
*/
static $fa_api_keys = 'fa_api_keys';
/**
* api日志审计
*/
static $fa_api_logs = 'fa_api_logs';
/**
* 地区表
*/
@@ -83,24 +89,6 @@ class TabConf
static $fa_config = 'fa_config';
/**
* 登录设备(一个医生有多个病历,一个医生同时只有一个客户端)
*/
static $fa_device = 'fa_device';
/**
* 基本信息图片上传和AI分析结果
*/
static $fa_drugs_images_medical_result = 'fa_drugs_images_medical_result';
/**
* 任务处理进度记录
*/
static $fa_drugs_images_medical_task = 'fa_drugs_images_medical_task';
/**
* 邮箱验证码表
*/
@@ -108,159 +96,87 @@ class TabConf
/**
* 估量-ai处理结果
* 合作企业
*/
static $fa_guliang_ai_deal_result = 'fa_guliang_ai_deal_result';
static $fa_firm = 'fa_firm';
/**
* 估量-问答记录
* 大类
*/
static $fa_guliangqarecord = 'fa_guliangqarecord';
static $fa_firmbigcategory = 'fa_firmbigcategory';
/**
* 估量-问答配置
* 企业客户信息
*/
static $fa_guliangquestion = 'fa_guliangquestion';
static $fa_firmcustomer = 'fa_firmcustomer';
/**
* 估量-用户
* 客户回访记录
*/
static $fa_gulianguser = 'fa_gulianguser';
static $fa_firmcustomerfollowuprecord = 'fa_firmcustomerfollowuprecord';
/**
* 基本信息图片上传和AI分析结果
* 回访发送时间列表
*/
static $fa_hbruser_drugs_images_medical = 'fa_hbruser_drugs_images_medical';
static $fa_firmcustomerfollowuptimelist = 'fa_firmcustomerfollowuptimelist';
/**
* 基本信息图片上传并AI分析结果
* 客户来源
*/
static $fa_hbruser_drugs_images_medical_report = 'fa_hbruser_drugs_images_medical_report';
static $fa_firmcustomerorigin = 'fa_firmcustomerorigin';
/**
* 任务处理进度记录
* 职务
*/
static $fa_hbruser_drugs_images_medical_task = 'fa_hbruser_drugs_images_medical_task';
static $fa_firmduty = 'fa_firmduty';
/**
* 短信发送记录
* 回访模板
*/
static $fa_hdr_sms_record = 'fa_hdr_sms_record';
static $fa_firmfollowuptemplate = 'fa_firmfollowuptemplate';
/**
* 管理员
* 回访模板回访时间列表
*/
static $fa_hdradmin = 'fa_hdradmin';
static $fa_firmfollowuptemplatetimelist = 'fa_firmfollowuptemplatetimelist';
/**
* 科室
* 注意事项
*/
static $fa_hdrdepartment = 'fa_hdrdepartment';
static $fa_firmnotespoints = 'fa_firmnotespoints';
/**
* 医生账户信息
* 门店
*/
static $fa_hdrdoctorusers = 'fa_hdrdoctorusers';
static $fa_firmstore = 'fa_firmstore';
/**
* 统一随访记录
* 店铺一级项目
*/
static $fa_hdrfollowup = 'fa_hdrfollowup';
static $fa_firmstoreprojectsone = 'fa_firmstoreprojectsone';
/**
* 随访模板
* 店铺二级项目
*/
static $fa_hdrfollowuptemplate = 'fa_hdrfollowuptemplate';
static $fa_firmstoreprojectstwo = 'fa_firmstoreprojectstwo';
/**
* 患者健康洞察
* 标签
*/
static $fa_hdrhealth_insight = 'fa_hdrhealth_insight';
/**
* 问诊报告存档疼痛科、听译、h5问诊统一存放一个基本信息对应一个报告
*/
static $fa_hdrmedical_report = 'fa_hdrmedical_report';
/**
* 打开对话窗口记录(同时向患者端发送当前对话患者信息)
*/
static $fa_hdropen_chat_room_record = 'fa_hdropen_chat_room_record';
/**
* 人格测试结果
*/
static $fa_hdrpersonalitytest = 'fa_hdrpersonalitytest';
/**
* 科室问卷答案
*/
static $fa_hdrquestionnaireanswer = 'fa_hdrquestionnaireanswer';
/**
* 科室问卷问题(一个问题对应多个答案)
*/
static $fa_hdrquestionnairequestion = 'fa_hdrquestionnairequestion';
/**
* 患者挂号列表(可重复挂号)
*/
static $fa_hdrregister = 'fa_hdrregister';
/**
* 用户答题记录
*/
static $fa_hdruseranswerrecord = 'fa_hdruseranswerrecord';
/**
* 统一问诊用户基本信息
*/
static $fa_hdruserbaseinfo = 'fa_hdruserbaseinfo';
/**
* 基本信息图片上传并AI分析结果
*/
static $fa_hdruserbaseinfo_upload = 'fa_hdruserbaseinfo_upload';
/**
* H5用户
*/
static $fa_hdrusersh5 = 'fa_hdrusersh5';
/**
* 智语医助-设备关联表
*/
static $fa_healdevicerelation = 'fa_healdevicerelation';
/**
* 医生新消息
*/
static $fa_message = 'fa_message';
static $fa_firmtags = 'fa_firmtags';
/**
@@ -281,84 +197,6 @@ class TabConf
static $fa_test = 'fa_test';
/**
* 听译优医助手对话记录
*/
static $fa_tingyiueassistantchathis = 'fa_tingyiueassistantchathis';
/**
* 疼痛科聊天历史
*/
static $fa_tt_chathistory = 'fa_tt_chathistory';
/**
* 随访记录(数智人医生)
*/
static $fa_tt_followup = 'fa_tt_followup';
/**
* 疼痛科自由对话聊天历史
*/
static $fa_tt_free_chathistory = 'fa_tt_free_chathistory';
/**
* 疼痛科病历报告(听译问诊)(一个基本信息对应一个报告)
*/
static $fa_tt_medical_report = 'fa_tt_medical_report';
/**
* 疼痛科用户基本信息
*/
static $fa_tt_userbaseinfo = 'fa_tt_userbaseinfo';
/**
* 疼痛科用户
*/
static $fa_tt_users = 'fa_tt_users';
/**
* 听译-聊天历史
*/
static $fa_ty_chathistory = 'fa_ty_chathistory';
/**
* 随访记录(听译助手)
*/
static $fa_ty_followup = 'fa_ty_followup';
/**
* 听译-病历报告(听译问诊)(一个基本信息对应一个报告)
*/
static $fa_ty_medical_report = 'fa_ty_medical_report';
/**
* 听译问诊-患者病历信息
*/
static $fa_ty_userbaseinfo = 'fa_ty_userbaseinfo';
/**
* 听译问诊-患者病历信息
*/
static $fa_ty_usermedicalrecord = 'fa_ty_usermedicalrecord';
/**
* 听译-医生账号
*/
static $fa_ty_users = 'fa_ty_users';
/**
* 会员表
*/
@@ -414,8 +252,14 @@ class TabConf
/**
* 系统杂项配置
* 微信群信息表
*/
static $fa_zc_sundry_config = 'fa_zc_sundry_config';
static $fa_wechatchatroom = 'fa_wechatchatroom';
/**
* 微信社群成员表
*/
static $fa_wechatgroupmember = 'fa_wechatgroupmember';
}

View File

@@ -10,31 +10,109 @@
.txt-lf{text-align: left}
</style>
<div style="width: 50%;margin: 0 auto;color: red;text-align: center;">
<div class="txt-lf">文档说明:</div>
<div class="txt-lf">1、如果没有明确说明提交请求均使用post</div>
<div class="txt-lf">2、此接口文档不包含websocket接口</div>
<div class="txt-lf">3、接口参数之间使用“/”符号隔开</div>
<div class="txt-lf">4、此文档接口测试功能只针对普通post、get接口不能测试文件上传或文件流</div>
<div class="txt-lf">5、功能模块按照颜色分组</div>
<div class="txt-lf">文档说明:</div>
<div class="txt-lf">1、如果没有明确说明提交请求均使用post</div>
<div class="txt-lf">2、此接口文档不包含websocket接口</div>
<div class="txt-lf">3、接口参数之间使用“/”符号隔开</div>
<div class="txt-lf">4、此文档接口测试功能只针对普通post、get接口不能测试文件上传或文件流</div>
<div class="txt-lf">5、功能模块按照颜色分组</div>
<div class="txt-lf" style="color: black;">清理缓存:
<a href='JavaScript:;' onclick="CacheObj.clearCache()">
点击清理
</a><span style="color: gray;font-size: 12px;">(由于接口数据可能会被缓存,发现数据没变化或需要时,可清理缓存)</span>
</div>
<div class="txt-lf">
<a href="/api_docs/api_list.html" style="margin: 20px">api应用文档</a>
<a href="/api_docs/api_list.html" style="margin: 20px">api应用文档</a>
</div>
</div>
<div id="api_workers_getWorkers" style="background-color: #ffe4e1;margin-top: 50px;">
<div class="markdown_content">
***
```
/**
* desc获取工作人员列表
*
请求地址:
* api/Workers/getWorkers
*
* 参数:
* mobile 手机号码
* rel_wxid 关联微信
* firm_id 所属企业
*
* 所有字段说明<span style="color: gray">(可能有部分额外字段未在此体现)</span>
* id ID
* username 用户名
* nickname 昵称
* password 密码
* salt 密码盐
* avatar 头像
* email 电子邮箱
* mobile 手机号码
* loginfailure 失败次数
* logintime 登录时间
* loginip 登录IP
* createtime 创建时间
* updatetime 更新时间
* token Session标识
* role 角色:admin=管理员,firm=企业人员
* status 状态
* rel_wxid 关联微信
* employee_type 类型:1=企业微信,2=个人微信
* firm_id 所属企业
* firmstore_id 所属店铺
* firmduty_id 职务
* authorwh
* api/workers/getWorkers
*/
```
</div>
<div>
按需填写其它接口参数:
<textarea name="" id="api_workers_getWorkers_textarea" cols="100" rows="3">/api/workers/getWorkers</textarea>
<a href='JavaScript:;' onclick="DocObject.api_workers_getWorkers()">测试</a>
</div>
<div class="api_workers_getWorkers_response_result"></div>
</div>
</div>
</body>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="/static/common/js/marked.min.js"></script>
<script src="/webautocodestatic/marked.min.js"></script>
<script src="/webautocodestatic/plugs/layui-v2.9.2/layui.js"></script>
<script>
$(function() {
//加载markdown
DocObject.markdown_content();
});
let CacheObj = {
clearCache: function () {
let url = '/index/test/clearCache';
$.post(url,{},function(res) {
layer.msg('清理成功')
},'json');
}
};
let DocObject = {
markdown_content(){
$('.markdown_content').each(function(k,ele) {
$(ele).html(marked.parse($(ele).html()));
});
},
api_workers_getWorkers(){
let url = $('#api_workers_getWorkers_textarea').val();
$.post(url,{},function(res) {
$('.api_workers_getWorkers_response_result').html(JSON.stringify(res, null, "\t"));
$('.api_workers_getWorkers_response_result').attr('style','color:green');
},'json');
},
}
</script>

View File

@@ -3,3 +3,44 @@
###### ctrl+f 搜索)(如果更改了路由,请根据路由规则定位)
##### 请求域名http://127.0.0.1:8080/
##### 请求方式POST默认
***
```
/**
* desc获取工作人员列表
*
请求地址:
* api/Workers/getWorkers
*
* 参数:
* mobile 手机号码
* rel_wxid 关联微信
* firm_id 所属企业
*
* 所有字段说明<span style="color: gray">(可能有部分额外字段未在此体现)</span>
* id ID
* username 用户名
* nickname 昵称
* password 密码
* salt 密码盐
* avatar 头像
* email 电子邮箱
* mobile 手机号码
* loginfailure 失败次数
* logintime 登录时间
* loginip 登录IP
* createtime 创建时间
* updatetime 更新时间
* token Session标识
* role 角色:admin=管理员,firm=企业人员
* status 状态
* rel_wxid 关联微信
* employee_type 类型:1=企业微信,2=个人微信
* firm_id 所属企业
* firmstore_id 所属店铺
* firmduty_id 职务
* authorwh
* api/workers/getWorkers
*/
```

Submodule admin/vendor/wanghua/general-utility-tools-php updated: 2f9aad4bc8...a64ab59e2d