修改ca签章
This commit is contained in:
@@ -20,7 +20,7 @@ use Hyperf\Snowflake\Concern\Snowflake;
|
||||
* @property int $patient_id 患者id
|
||||
* @property int $family_id 家庭成员id(就诊用户)
|
||||
* @property int $pharmacist_id 药师id
|
||||
* @property int $prescription_status 处方状态(1:待审核 2:待使用 3:已失效 4:已使用 5:已作废)
|
||||
* @property int $prescription_status 处方状态(1:待审核 2:待使用 3:已失效 4:已使用)
|
||||
* @property int $pharmacist_audit_status 药师审核状态(0:审核中 1:审核成功 2:审核驳回)
|
||||
* @property string $pharmacist_verify_time 药师审核时间
|
||||
* @property string $pharmacist_fail_reason 药师审核驳回原因
|
||||
@@ -29,15 +29,12 @@ use Hyperf\Snowflake\Concern\Snowflake;
|
||||
* @property string $platform_fail_reason 处方平台驳回原因
|
||||
* @property string $doctor_created_time 医生开具处方时间
|
||||
* @property string $expired_time 处方过期时间
|
||||
* @property string $void_time 处方做废时间
|
||||
* @property int $is_delete 是否删除(0:否 1:是)
|
||||
* @property string $prescription_code 处方编号
|
||||
* @property string $doctor_name 医生名称
|
||||
* @property string $patient_name 患者姓名-就诊人
|
||||
* @property int $patient_sex 患者性别-就诊人(1:男 2:女)
|
||||
* @property int $patient_age 患者年龄-就诊人
|
||||
* @property string $prescription_pdf 处方pdf
|
||||
* @property string $prescription_img 处方图片
|
||||
* @property string $doctor_advice 医嘱
|
||||
* @property \Carbon\Carbon $created_at 创建时间
|
||||
* @property \Carbon\Carbon $updated_at 修改时间
|
||||
@@ -57,7 +54,7 @@ class OrderPrescription extends Model
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected array $fillable = ['order_prescription_id', 'order_inquiry_id', 'doctor_id', 'patient_id', 'family_id', 'pharmacist_id', 'prescription_status', 'pharmacist_audit_status', 'pharmacist_verify_time', 'pharmacist_fail_reason', 'platform_audit_status', 'platform_fail_time', 'platform_fail_reason', 'doctor_created_time', 'expired_time', 'void_time', 'is_delete', 'prescription_code', 'doctor_name', 'patient_name', 'patient_sex', 'patient_age', 'prescription_pdf', 'prescription_img', 'doctor_advice', 'created_at', 'updated_at'];
|
||||
protected array $fillable = ['order_prescription_id', 'order_inquiry_id', 'doctor_id', 'patient_id', 'family_id', 'pharmacist_id', 'prescription_status', 'pharmacist_audit_status', 'pharmacist_verify_time', 'pharmacist_fail_reason', 'platform_audit_status', 'platform_fail_time', 'platform_fail_reason', 'doctor_created_time', 'expired_time', 'is_delete', 'prescription_code', 'doctor_name', 'patient_name', 'patient_sex', 'patient_age', 'doctor_advice', 'created_at', 'updated_at'];
|
||||
|
||||
protected string $primaryKey = "order_prescription_id";
|
||||
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Model;
|
||||
|
||||
|
||||
|
||||
use Hyperf\Database\Model\Builder;
|
||||
use Hyperf\Database\Model\Collection;
|
||||
use Hyperf\Snowflake\Concern\Snowflake;
|
||||
|
||||
/**
|
||||
* @property int $prescription_file_id 主键id
|
||||
* @property int $order_prescription_id 订单-处方id
|
||||
* @property string $doctor_ca_file_id 医生签章pdf文件id(可请求ca下载)
|
||||
* @property string $doctor_pdf_oss_path 医生签章pdf文件oss路径(null表示未下载)
|
||||
* @property int $doctor_pdf_down_status 签章文件下载状态(0:未下载 1:已下载 2:下载失败)
|
||||
* @property string $doctor_pdf_down_fail_reason 下载失败原因
|
||||
* @property string $doctor_img_oss_path 医生签章img文件oss路径
|
||||
* @property string $hospital_ca_file_id 医院签章pdf文件id(可请求ca下载)
|
||||
* @property string $hospital_pdf_oss_path 医院签章pdf文件oss路径(null表示未下载)
|
||||
* @property int $hospital_pdf_down_status 签章文件下载状态(0:未下载 1:已下载 2:下载失败)
|
||||
* @property string $hospital_pdf_down_fail_reason 下载失败原因
|
||||
* @property \Carbon\Carbon $created_at 创建时间
|
||||
* @property \Carbon\Carbon $updated_at 修改时间
|
||||
*/
|
||||
class OrderPrescriptionFile extends Model
|
||||
{
|
||||
use Snowflake;
|
||||
|
||||
/**
|
||||
* The table associated with the model.
|
||||
*/
|
||||
protected ?string $table = 'order_prescription_file';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected array $fillable = ['prescription_file_id', 'order_prescription_id', 'doctor_ca_file_id', 'doctor_pdf_oss_path', 'doctor_pdf_down_status', 'doctor_pdf_down_fail_reason', 'doctor_img_oss_path', 'hospital_ca_file_id', 'hospital_pdf_oss_path', 'hospital_pdf_down_status', 'hospital_pdf_down_fail_reason', 'created_at', 'updated_at'];
|
||||
|
||||
protected string $primaryKey = "prescription_file_id";
|
||||
|
||||
/**
|
||||
* 获取信息-单条
|
||||
* @param array $params
|
||||
* @param array $fields
|
||||
* @return object|null
|
||||
*/
|
||||
public static function getOne(array $params, array $fields = ['*']): object|null
|
||||
{
|
||||
return self::where($params)->first($fields);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据-多
|
||||
* @param array $params
|
||||
* @param array $fields
|
||||
* @return Builder[]|Collection
|
||||
*/
|
||||
public static function getList(array $params = [], array $fields = ['*']): Collection|array
|
||||
{
|
||||
return self::where($params)->get($fields);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取是否存在
|
||||
* @param array $params
|
||||
* @return bool
|
||||
*/
|
||||
public static function getExists(array $params): bool
|
||||
{
|
||||
return self::where($params)->exists();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param array $params
|
||||
* @param array $data
|
||||
* @return int
|
||||
*/
|
||||
public static function edit(array $params = [], array $data = []): int
|
||||
{
|
||||
return self::where($params)->update($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param array $data
|
||||
* @return \Hyperf\Database\Model\Model|OrderPrescriptionFile
|
||||
*/
|
||||
public static function addOrderPrescriptionFile(array $data): \Hyperf\Database\Model\Model|OrderPrescriptionFile
|
||||
{
|
||||
return self::create($data);
|
||||
}
|
||||
}
|
||||
@@ -74,10 +74,21 @@ class UserCaCert extends Model
|
||||
/**
|
||||
* 新增
|
||||
* @param array $data
|
||||
* @return \Hyperf\Database\Model\Model|UserCaCert
|
||||
* @return UserCaCert|\Hyperf\Database\Model\Model
|
||||
*/
|
||||
public static function addDoctorPharmacistCert(array $data = []): \Hyperf\Database\Model\Model|UserCaCert
|
||||
public static function addUserCaCert(array $data): UserCaCert|\Hyperf\Database\Model\Model
|
||||
{
|
||||
return self::create($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param array $params
|
||||
* @param array $data
|
||||
* @return int
|
||||
*/
|
||||
public static function edit(array $params = [], array $data = []): int
|
||||
{
|
||||
return self::where($params)->update($data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user