add
This commit is contained in:
parent
03ef2f5e3c
commit
6a679c4669
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
|
@ -57,6 +57,7 @@ class AnimalInfoLists extends BaseApiDataLists implements ListsSearchInterface
|
||||||
{
|
{
|
||||||
return AnimalInfo::where($this->searchWhere)
|
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'])
|
->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)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()
|
->select()
|
||||||
|
|
Loading…
Reference in New Issue