新增监管平台业务文件,新增搜索商品 处方可开具数量
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Model\ReportRegulatory;
|
||||
|
||||
/**
|
||||
* 监管平台
|
||||
*/
|
||||
class ReportRegulatoryService extends BaseService
|
||||
{
|
||||
/**
|
||||
* 增加上报监管平台表
|
||||
* @param string $order_inquiry_id
|
||||
* @param string $order_prescription_id
|
||||
* @return bool
|
||||
*/
|
||||
protected function addReportRegulatory(string $order_inquiry_id,string $order_prescription_id): bool
|
||||
{
|
||||
// 检测是否已添加
|
||||
$params = array();
|
||||
$params['order_inquiry_id'] = $order_inquiry_id;
|
||||
$res = ReportRegulatory::getExists($params);
|
||||
if ($res) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$data = array();
|
||||
$data['order_inquiry_id'] = $order_inquiry_id;
|
||||
$data['order_prescription_id'] = $order_prescription_id;
|
||||
$report_regulatory = ReportRegulatory::addReportRegulatory($data);
|
||||
if (empty($report_regulatory)){
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user