Commit 0e000050 by lujunyi

格式化代码

parent 2cd51921
......@@ -8,9 +8,9 @@
use App\Models\PharmacyModel;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Jxlwqq\IdValidator\IdValidator;
use Milon\Barcode\DNS2D;
use Illuminate\Support\Facades\Log;
// 问诊人控制器
class PatientController extends BaseApiController
......@@ -239,12 +239,12 @@ public function duplicate(Request $request)
$newPatient->user_id = $authInfo->id;
} elseif ($authInfo->last_login_type == User::LOGIN_TYPE_PHARMACY) { // 药店
$pharmacy = PharmacyModel::query()->where('user_id', $authInfo->id)->first();
# 校验该药店是否已经存在手机号+用户名
// 校验该药店是否已经存在手机号+用户名
$patientInfo = PatientModel::where('mobile', $existingPatient->mobile)->where('name', $existingPatient->name)->where('pharmacy_id', $pharmacy->id)->first();
# Log::info('patient=>'. json_encode($patientInfo).'=='.json_encode($existingPatient).'=='. $pharmacy->id);
// Log::info('patient=>'. json_encode($patientInfo).'=='.json_encode($existingPatient).'=='. $pharmacy->id);
if ($patientInfo) {
# return $this->failed('该问诊人信息已存在');
# return $this->failed('该问诊人信息已存在', ['data' => false], 200);
// return $this->failed('该问诊人信息已存在');
// return $this->failed('该问诊人信息已存在', ['data' => false], 200);
return $this->success($patientInfo);
}
if ($pharmacy) {
......
......@@ -34,7 +34,7 @@ public function PharmacyList(Request $request)
if ($limit_test_id) {
$limit_ids = explode(',', $limit_test_id);
}
$query = PharmacyModel::query()->whereNotIn('id',$limit_ids);
$query = PharmacyModel::query()->whereNotIn('id', $limit_ids);
if ($search_input) {
$query->where('name', 'like', "%{$search_input}%");
// ->orWhere('address','like',"%{$search_input}%");
......
......@@ -13,7 +13,6 @@ class DiagnosiModel extends Model
use HasDateTimeFormatter;
use SoftDeletes;
const DIAGNOSI_TYPE_WM = 0;
const DIAGNOSI_TYPE_TCM = 1;
......@@ -23,6 +22,7 @@ class DiagnosiModel extends Model
self::DIAGNOSI_TYPE_WM => '西医',
self::DIAGNOSI_TYPE_TCM => '中医',
];
protected $table = 'diagnosis';
public function setNameAttribute($value)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment