This commit is contained in:
chenbo 2024-02-03 10:16:56 +08:00
parent a2d818ab04
commit e4ff4556aa
1 changed files with 31 additions and 10 deletions

View File

@ -41,20 +41,41 @@ class OperationVaccinumLogLogic extends BaseLogic
{ {
Db::startTrans(); Db::startTrans();
try { try {
OperationVaccinumLog::create([
AnimalOperateAction::create([
'fence_house_id' => $params['fence_house_id'], 'fence_house_id' => $params['fence_house_id'],
'animal_info_id' => $params['animal_info_id']??0, 'animal_info_id' => $params['animal_info_id']??0,
'vaccine_name' => $params['vaccine_name'], 'type' => 4,
'vaccine_manufacturers' => $params['vaccine_manufacturers'], 'type_text'=>'疫苗',
'vaccine_batch' => $params['vaccine_batch'], 'detail' => json_encode([
'vaccination_method' => $params['vaccination_method'], 'fence_house_id' => $params['fence_house_id'],
'vaccination_site' => $params['vaccination_site'], 'animal_info_id' => $params['animal_info_id']??0,
'immune_validity_period' => $params['immune_validity_period'], 'vaccine_name' => $params['vaccine_name'],
'operator' => $params['operator'], 'vaccine_manufacturers' => $params['vaccine_manufacturers'],
'pic' => $params['pic'], 'vaccine_batch' => $params['vaccine_batch'],
'remark' => $params['remark'], 'vaccination_method' => $params['vaccination_method'],
'vaccination_site' => $params['vaccination_site'],
'immune_validity_period' => $params['immune_validity_period'],
'operator' => $params['operator'],
'pic' => $params['pic'],
'remark' => $params['remark'],
])
]); ]);
// OperationVaccinumLog::create([
// 'fence_house_id' => $params['fence_house_id'],
// 'animal_info_id' => $params['animal_info_id']??0,
// 'vaccine_name' => $params['vaccine_name'],
// 'vaccine_manufacturers' => $params['vaccine_manufacturers'],
// 'vaccine_batch' => $params['vaccine_batch'],
// 'vaccination_method' => $params['vaccination_method'],
// 'vaccination_site' => $params['vaccination_site'],
// 'immune_validity_period' => $params['immune_validity_period'],
// 'operator' => $params['operator'],
// 'pic' => $params['pic'],
// 'remark' => $params['remark'],
// ]);
Db::commit(); Db::commit();
return true; return true;
} catch (\Exception $e) { } catch (\Exception $e) {