新增删除登记预约记录接口,完善相关日志
parent
4b0f2cfbd2
commit
74676108a1
@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Services;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
|
class ConflictService
|
||||||
|
{
|
||||||
|
public function logConflict($name, $idCardNum, $currentOrgName,$doctor_name, $lastOrgName, $lastCheckupTime, $type, $source)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
DB::table('conflict_record')->insert([
|
||||||
|
'name' => $name,
|
||||||
|
'id_card_num' => $idCardNum,
|
||||||
|
'current_org_name' => $currentOrgName,
|
||||||
|
'doctor_name' => $doctor_name,
|
||||||
|
'last_org_name' => $lastOrgName,
|
||||||
|
'last_checkup_time' => $lastCheckupTime,
|
||||||
|
'type' => $type,
|
||||||
|
'source' => $source,
|
||||||
|
'created_at' => date('Y-m-d H:i:s'),
|
||||||
|
'updated_at' => date('Y-m-d H:i:s'),
|
||||||
|
]);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
Log::error('冲突记录写入失败: ' . $e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Services;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
|
class DeleteLogService
|
||||||
|
{
|
||||||
|
public function logDeletion($tableName, $recordId, $name, $idCardNum, $operatorId, $operatorName, $reason, $screenshot)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
DB::table('delete_operation_log')->insert([
|
||||||
|
'table_name' => $tableName,
|
||||||
|
'record_id' => $recordId,
|
||||||
|
'name' => $name,
|
||||||
|
'id_card_num' => $idCardNum,
|
||||||
|
'operator_id' => $operatorId,
|
||||||
|
'operator_name' => $operatorName,
|
||||||
|
'reason' => $reason,
|
||||||
|
'screenshot' => $screenshot,
|
||||||
|
'created_at' => date('Y-m-d H:i:s'),
|
||||||
|
'updated_at' => date('Y-m-d H:i:s'),
|
||||||
|
]);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
Log::error('删除操作日志写入失败: ' . $e->getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue