订单详情新增检测成功时间

This commit is contained in:
wucongxing 2023-08-23 15:05:16 +08:00
parent 9630e66233
commit b788dca5a2
2 changed files with 6 additions and 1 deletions

View File

@ -15,6 +15,7 @@ use Hyperf\Snowflake\Concern\Snowflake;
* @property string $detection_project_name 检测项目名称
* @property int $company_id 合作公司id
* @property string $detection_project_price 检测价格
* @property int $detection_time 检测时间(小时)
* @property string $img_path 内容图片地址
* @property string $informed_consent_form 知情同意书
* @property \Carbon\Carbon $created_at 创建时间
@ -32,7 +33,7 @@ class DetectionProject extends Model
/**
* The attributes that are mass assignable.
*/
protected array $fillable = ['detection_project_id', 'detection_project_title', 'detection_project_name', 'company_id', 'detection_project_price', 'img_path', 'informed_consent_form', 'created_at', 'updated_at'];
protected array $fillable = ['detection_project_id', 'detection_project_title', 'detection_project_name', 'company_id', 'detection_project_price', 'detection_time', 'img_path', 'informed_consent_form', 'created_at', 'updated_at'];
protected string $primaryKey = "detection_project_id";

View File

@ -1765,6 +1765,10 @@ class PatientOrderService extends BaseService
$order_detection['detection_project_name'] = $detection_project['detection_project_name'];
$order_detection['detection_result_pdf'] = addAliyunOssWebsite($order_detection['detection_result_pdf']);
// 检测成功时间
$detection_success_time = date('Y-m-d',time() + 60 * 60 * $detection_project['detection_time']);
$order_detection['detection_success_time'] = $detection_success_time;
return success($order_detection);
}