diff --git a/app/api/controller/OperationLogController.php b/app/api/controller/OperationLogController.php new file mode 100644 index 0000000..6a744da --- /dev/null +++ b/app/api/controller/OperationLogController.php @@ -0,0 +1,20 @@ +request->param('fence_house_id'); + $list = []; + $list[] = Db::name('operation_deworming_log')->where('fence_house_id', $fenceHouseId)->order('id desc')->find(); + $list[] = Db::name('operation_disinfect_log')->where('fence_house_id', $fenceHouseId)->order('id desc')->find(); + $list[] = Db::name('operation_feeding_log')->where('fence_house_id', $fenceHouseId)->order('id desc')->find(); + $list[] = Db::name('operation_vaccinum_log')->where('fence_house_id', $fenceHouseId)->order('id desc')->find(); + $list[] = Db::name('operation_water_log')->where('fence_house_id', $fenceHouseId)->order('id desc')->find(); + return $this->success('成功', $list); + } +} \ No newline at end of file diff --git a/app/api/lists/AnimalInfoLists.php b/app/api/lists/AnimalInfoLists.php index 8d1c79e..128e477 100644 --- a/app/api/lists/AnimalInfoLists.php +++ b/app/api/lists/AnimalInfoLists.php @@ -57,6 +57,7 @@ class AnimalInfoLists extends BaseApiDataLists implements ListsSearchInterface { return AnimalInfo::where($this->searchWhere) ->field(['id', 'fence_house_id', 'sn', 'animal_type', 'brand', 'physi_stage', 'gender', 'blood_purity', 'animal_source', 'current_estimation', 'algebra', 'birth', 'entry_date', 'birth_estimation', 'health_condition']) + ->with(['fenceHouseAttr']) ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select()