diff --git a/app/adminapi/logic/animal_info/AnimalInfoLogic.php b/app/adminapi/logic/animal_info/AnimalInfoLogic.php index 97b9116..e2334db 100644 --- a/app/adminapi/logic/animal_info/AnimalInfoLogic.php +++ b/app/adminapi/logic/animal_info/AnimalInfoLogic.php @@ -55,7 +55,7 @@ class AnimalInfoLogic extends BaseLogic 'entry_date' => $params['entry_date'], 'birth_estimation' => $params['birth_estimation'], 'health_condition' => $params['health_condition'], - 'pic' => $params['image'], + 'pic' => $params['pic'], ]); Db::commit(); @@ -94,7 +94,7 @@ class AnimalInfoLogic extends BaseLogic 'entry_date' => $params['entry_date'], 'birth_estimation' => $params['birth_estimation'], 'health_condition' => $params['health_condition'], - 'pic' => $params['image'], + 'pic' => $params['pic'], ]); Db::commit(); diff --git a/app/api/logic/suyuan_operation/OperationDisinfectLogLogic.php b/app/api/logic/suyuan_operation/OperationDisinfectLogLogic.php index 6ff893c..712ee1d 100644 --- a/app/api/logic/suyuan_operation/OperationDisinfectLogLogic.php +++ b/app/api/logic/suyuan_operation/OperationDisinfectLogLogic.php @@ -42,7 +42,7 @@ class OperationDisinfectLogLogic extends BaseLogic try { OperationDisinfectLog::create([ 'fence_house_id' => $params['fence_house_id'], - 'animal_info_id' => $params['animal_info_id'], + 'animal_info_id' => $params['animal_info_id']??0, 'disinfectant_name' => $params['disinfectant_name'], 'concentration' => $params['concentration'], 'disinfectant_method' => $params['disinfectant_method'], @@ -75,7 +75,7 @@ class OperationDisinfectLogLogic extends BaseLogic try { OperationDisinfectLog::where('id', $params['id'])->update([ 'fence_house_id' => $params['fence_house_id'], - 'animal_info_id' => $params['animal_info_id'], + 'animal_info_id' => $params['animal_info_id']??0, 'disinfectant_name' => $params['disinfectant_name'], 'concentration' => $params['concentration'], 'disinfectant_method' => $params['disinfectant_method'], diff --git a/app/api/logic/suyuan_operation/OperationFeedingLogLogic.php b/app/api/logic/suyuan_operation/OperationFeedingLogLogic.php index 9a779e3..6cddc91 100644 --- a/app/api/logic/suyuan_operation/OperationFeedingLogLogic.php +++ b/app/api/logic/suyuan_operation/OperationFeedingLogLogic.php @@ -41,7 +41,7 @@ class OperationFeedingLogLogic extends BaseLogic Db::startTrans(); try { OperationFeedingLog::create([ - 'animal_info_id' => $params['animal_info_id'], + 'animal_info_id' => $params['animal_info_id']??0, 'fence_house_id' => $params['fence_house_id'], 'feed_type' => $params['feed_type'], 'feed_brand' => $params['feed_brand'], @@ -73,7 +73,7 @@ class OperationFeedingLogLogic extends BaseLogic Db::startTrans(); try { OperationFeedingLog::where('id', $params['id'])->update([ - 'animal_info_id' => $params['animal_info_id'], + 'animal_info_id' => $params['animal_info_id']??0, 'fence_house_id' => $params['fence_house_id'], 'feed_type' => $params['feed_type'], 'feed_brand' => $params['feed_brand'], diff --git a/app/api/logic/suyuan_operation/OperationVaccinumLogLogic.php b/app/api/logic/suyuan_operation/OperationVaccinumLogLogic.php index 2b1c33b..39addde 100644 --- a/app/api/logic/suyuan_operation/OperationVaccinumLogLogic.php +++ b/app/api/logic/suyuan_operation/OperationVaccinumLogLogic.php @@ -42,7 +42,7 @@ class OperationVaccinumLogLogic extends BaseLogic try { OperationVaccinumLog::create([ 'fence_house_id' => $params['fence_house_id'], - 'animal_info_id' => $params['animal_info_id'], + 'animal_info_id' => $params['animal_info_id']??0, 'vaccine_name' => $params['vaccine_name'], 'vaccine_manufacturers' => $params['vaccine_manufacturers'], 'vaccine_batch' => $params['vaccine_batch'], @@ -77,7 +77,7 @@ class OperationVaccinumLogLogic extends BaseLogic try { OperationVaccinumLog::where('id', $params['id'])->update([ 'fence_house_id' => $params['fence_house_id'], - 'animal_info_id' => $params['animal_info_id'], + 'animal_info_id' => $params['animal_info_id']??0, 'vaccine_name' => $params['vaccine_name'], 'vaccine_manufacturers' => $params['vaccine_manufacturers'], 'vaccine_batch' => $params['vaccine_batch'], diff --git a/app/api/logic/suyuan_operation/OperationWaterLogLogic.php b/app/api/logic/suyuan_operation/OperationWaterLogLogic.php index b39db43..76f11ac 100644 --- a/app/api/logic/suyuan_operation/OperationWaterLogLogic.php +++ b/app/api/logic/suyuan_operation/OperationWaterLogLogic.php @@ -41,7 +41,7 @@ class OperationWaterLogLogic extends BaseLogic Db::startTrans(); try { OperationWaterLog::create([ - 'animal_info_id' => $params['animal_info_id'], + 'animal_info_id' => $params['animal_info_id']??0, 'fence_house_id' => $params['fence_house_id'], 'water_consumption' => $params['water_consumption'], 'operator' => $params['operator'], @@ -71,7 +71,7 @@ class OperationWaterLogLogic extends BaseLogic Db::startTrans(); try { OperationWaterLog::where('id', $params['id'])->update([ - 'animal_info_id' => $params['animal_info_id'], + 'animal_info_id' => $params['animal_info_id']??0, 'fence_house_id' => $params['fence_house_id'], 'water_consumption' => $params['water_consumption'], 'operator' => $params['operator'],