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();
try {
OperationVaccinumLog::create([
AnimalOperateAction::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'],
'type' => 4,
'type_text'=>'疫苗',
'detail' => json_encode([
'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'],
])
]);
// 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();
return true;
} catch (\Exception $e) {