This commit is contained in:
chenbo 2024-01-29 18:05:07 +08:00
parent 03ef2f5e3c
commit 6a679c4669
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,20 @@
<?php
namespace app\api\controller;
use think\facade\Db;
class OperationLogController extends BaseApiController
{
public function index()
{
$fenceHouseId = $this->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);
}
}

View File

@ -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()