first commit

This commit is contained in:
2025-03-17 10:56:09 +08:00
parent b65a5fd005
commit afec54dafe
6918 changed files with 1199199 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
<?php
namespace app\admin\controller\tt;
use app\common\controller\Backend;
/**
* 疼痛科聊天历史
*
* @icon fa fa-circle-o
*/
class Chathistory extends Backend
{
/**
* Chathistory模型对象
* @var \app\admin\model\tt\Chathistory
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\tt\Chathistory;
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
}

View File

@@ -0,0 +1,130 @@
<?php
namespace app\admin\controller\tt;
use app\common\controller\Backend;
use think\Db;
use wanghua\general_utility_tools_php\Mmodel;
use wanghua\general_utility_tools_php\tool\Tools;
/**
* 随访记录(数智人医生)
*
* @icon fa fa-circle-o
*/
class Followup extends Backend
{
protected $noNeedRight = ['addfollowup','submitfollowup','addFollowUpTy','submitFollowUpTy'];
/**
* Followup模型对象
* @var \app\admin\model\tt\Followup
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\tt\Followup;
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
/**
* 添加页面
*
* @return string
* @throws \think\Exception
*/
public function addfollowup()
{
//报告数据id
$report_dataid = input('report_dataid');
$report = Db::table('fa_tt_medical_report')->where('id',$report_dataid)->find();
$userbaseinfo = Db::table('fa_tt_userbaseinfo')->where('id',$report['id'])->find();
$this->assign('user',$userbaseinfo);
$html = view('add')->getContent();
return json(Tools::set_ok('ok',$html));
}
function submitfollowup(){
return Mmodel::catchJson(function (){
$content = input('content');
if(empty($content)){
return Tools::set_fail( '请填写随访内容');
}
$report_dataid = input('report_dataid');
if(empty($report_dataid)){
return Tools::set_fail( '请选择诊断报告');
}
$report = Db::table('fa_tt_medical_report')
->where('id',$report_dataid)
->find();
$userbase = Db::table('fa_tt_userbaseinfo')
->where('id',$report['userbaseid'])
->find();
$data = [
'report_dataid'=>$report_dataid,
'content'=>$content,
'create_time'=>input('create_time'),
'name'=>$userbase['name'],
'phone'=>$userbase['phone'],
];
Db::table('fa_tt_followup')->insert($data);
return Tools::set_ok('添加成功');
});
}
public function addFollowUpTy()
{
//报告数据id
$report_dataid = input('report_dataid');
$report = Db::table('fa_ty_medical_report')->where('id',$report_dataid)->find();
$userbaseinfo = Db::table('fa_ty_userbaseinfo')->where('id',$report['id'])->find();
$this->assign('user',$userbaseinfo);
$html = view('add')->getContent();
return json(Tools::set_ok('ok',$html));
}
function submitFollowUpTy(){
return Mmodel::catchJson(function (){
$content = input('content');
if(empty($content)){
return Tools::set_fail( '请填写随访内容');
}
$report_dataid = input('report_dataid');
if(empty($report_dataid)){
return Tools::set_fail( '请选择诊断报告');
}
$report = Db::table('fa_ty_medical_report')->where('id',$report_dataid)->find();
$userbase = Db::table('fa_ty_userbaseinfo')
->where('id',$report['userbaseid'])
->find();
if(empty($userbase)){
return Tools::set_fail( '用户基本信息不存在');
}
$data = [
'report_dataid'=>$report_dataid,
'content'=>$content,
'create_time'=>input('create_time'),
'name'=>$userbase['name'],
//'phone'=>$userbase['phone'],
];
Db::table('fa_ty_followup')->insert($data);
return Tools::set_ok('添加成功');
});
}
}

View File

@@ -0,0 +1,37 @@
<?php
namespace app\admin\controller\tt;
use app\common\controller\Backend;
/**
* 疼痛科用户基本信息
*
* @icon fa fa-circle-o
*/
class Userbaseinfo extends Backend
{
/**
* Userbaseinfo模型对象
* @var \app\admin\model\tt\Userbaseinfo
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\tt\Userbaseinfo;
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
}