update
This commit is contained in:
parent
f8bd395277
commit
f23c941217
|
@ -56,7 +56,9 @@ class OperationDewormingLogLists extends BaseDataLists implements ListsSearchInt
|
||||||
*/
|
*/
|
||||||
public function lists(): array
|
public function lists(): array
|
||||||
{
|
{
|
||||||
return AnimalOperateAction::whereRaw("animal_info_id = {$this->request->param('animal_info_id', 0)} or fence_house_id={$this->request->param('fence_house_id', 0)}")->where('type', 2)
|
$animal_info_id = $this->request->get('animal_info_id', 0)? $this->request->get('animal_info_id'): 0;
|
||||||
|
$fence_house_id = $this->request->get('fence_house_id', 0)? $this->request->get('fence_house_id'): 0;
|
||||||
|
return AnimalOperateAction::whereRaw("animal_info_id = {$animal_info_id} or fence_house_id={$fence_house_id}")->where('type', 2)
|
||||||
->with(['fenceHouseAttr', 'animalInfo'])
|
->with(['fenceHouseAttr', 'animalInfo'])
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
|
@ -77,7 +79,9 @@ class OperationDewormingLogLists extends BaseDataLists implements ListsSearchInt
|
||||||
*/
|
*/
|
||||||
public function count(): int
|
public function count(): int
|
||||||
{
|
{
|
||||||
return AnimalOperateAction::whereRaw("animal_info_id = {$this->request->param('animal_info_id', 0)} or fence_house_id={$this->request->param('fence_house_id', 0)}")->where('type', 2)->count();
|
$animal_info_id = $this->request->get('animal_info_id', 0)? $this->request->get('animal_info_id'): 0;
|
||||||
|
$fence_house_id = $this->request->get('fence_house_id', 0)? $this->request->get('fence_house_id'): 0;
|
||||||
|
return AnimalOperateAction::whereRaw("animal_info_id = {$animal_info_id} or fence_house_id={$fence_house_id}")->where('type', 2)->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -56,7 +56,9 @@ class OperationDisinfectLogLists extends BaseDataLists implements ListsSearchInt
|
||||||
*/
|
*/
|
||||||
public function lists(): array
|
public function lists(): array
|
||||||
{
|
{
|
||||||
return AnimalOperateAction::whereRaw("animal_info_id = {$this->request->param('animal_info_id', 0)} or fence_house_id={$this->request->param('fence_house_id', 0)}")->where('type', 1)
|
$animal_info_id = $this->request->get('animal_info_id', 0)? $this->request->get('animal_info_id'): 0;
|
||||||
|
$fence_house_id = $this->request->get('fence_house_id', 0)? $this->request->get('fence_house_id'): 0;
|
||||||
|
return AnimalOperateAction::whereRaw("animal_info_id = {$animal_info_id} or fence_house_id={$fence_house_id}")->where('type', 1)
|
||||||
->with(['fenceHouseAttr', 'animalInfo'])
|
->with(['fenceHouseAttr', 'animalInfo'])
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
|
@ -77,7 +79,9 @@ class OperationDisinfectLogLists extends BaseDataLists implements ListsSearchInt
|
||||||
*/
|
*/
|
||||||
public function count(): int
|
public function count(): int
|
||||||
{
|
{
|
||||||
return AnimalOperateAction::whereRaw("animal_info_id = {$this->request->param('animal_info_id', 0)} or fence_house_id={$this->request->param('fence_house_id', 0)}")->where('type', 1)->count();
|
$animal_info_id = $this->request->get('animal_info_id', 0)? $this->request->get('animal_info_id'): 0;
|
||||||
|
$fence_house_id = $this->request->get('fence_house_id', 0)? $this->request->get('fence_house_id'): 0;
|
||||||
|
return AnimalOperateAction::whereRaw("animal_info_id = {$animal_info_id} or fence_house_id={$fence_house_id}")->where('type', 1)->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -57,7 +57,9 @@ class OperationFeedingLogLists extends BaseDataLists implements ListsSearchInter
|
||||||
*/
|
*/
|
||||||
public function lists(): array
|
public function lists(): array
|
||||||
{
|
{
|
||||||
return AnimalOperateAction::whereRaw("animal_info_id = {$this->request->param('animal_info_id', 0)} or fence_house_id={$this->request->param('fence_house_id', 0)}")->where('type', 3)
|
$animal_info_id = $this->request->get('animal_info_id', 0)? $this->request->get('animal_info_id'): 0;
|
||||||
|
$fence_house_id = $this->request->get('fence_house_id', 0)? $this->request->get('fence_house_id'): 0;
|
||||||
|
$list = AnimalOperateAction::whereRaw("animal_info_id = {$animal_info_id} or fence_house_id={$fence_house_id}")->where('type', 3)
|
||||||
->with(['fenceHouseAttr', 'animalInfo'])
|
->with(['fenceHouseAttr', 'animalInfo'])
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
|
@ -67,6 +69,7 @@ class OperationFeedingLogLists extends BaseDataLists implements ListsSearchInter
|
||||||
return $item;
|
return $item;
|
||||||
})
|
})
|
||||||
->toArray();
|
->toArray();
|
||||||
|
return $list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -78,7 +81,9 @@ class OperationFeedingLogLists extends BaseDataLists implements ListsSearchInter
|
||||||
*/
|
*/
|
||||||
public function count(): int
|
public function count(): int
|
||||||
{
|
{
|
||||||
return AnimalOperateAction::whereRaw("animal_info_id = {$this->request->param('animal_info_id', 0)} or fence_house_id={$this->request->param('fence_house_id', 0)}")->where('type', 3)->count();
|
$animal_info_id = $this->request->get('animal_info_id', 0)? $this->request->get('animal_info_id'): 0;
|
||||||
|
$fence_house_id = $this->request->get('fence_house_id', 0)? $this->request->get('fence_house_id'): 0;
|
||||||
|
return AnimalOperateAction::whereRaw("animal_info_id = {$animal_info_id} or fence_house_id={$fence_house_id}")->where('type', 3)->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -56,7 +56,9 @@ class OperationVaccinumLogLists extends BaseDataLists implements ListsSearchInte
|
||||||
*/
|
*/
|
||||||
public function lists(): array
|
public function lists(): array
|
||||||
{
|
{
|
||||||
return AnimalOperateAction::whereRaw("animal_info_id = {$this->request->param('animal_info_id', 0)} or fence_house_id={$this->request->param('fence_house_id', 0)}")->where('type', 4)
|
$animal_info_id = $this->request->get('animal_info_id', 0)? $this->request->get('animal_info_id'): 0;
|
||||||
|
$fence_house_id = $this->request->get('fence_house_id', 0)? $this->request->get('fence_house_id'): 0;
|
||||||
|
return AnimalOperateAction::whereRaw("animal_info_id = {$animal_info_id} or fence_house_id={$fence_house_id}")->where('type', 4)
|
||||||
->with(['fenceHouseAttr', 'animalInfo'])
|
->with(['fenceHouseAttr', 'animalInfo'])
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
|
@ -77,7 +79,9 @@ class OperationVaccinumLogLists extends BaseDataLists implements ListsSearchInte
|
||||||
*/
|
*/
|
||||||
public function count(): int
|
public function count(): int
|
||||||
{
|
{
|
||||||
return AnimalOperateAction::whereRaw("animal_info_id = {$this->request->param('animal_info_id', 0)} or fence_house_id={$this->request->param('fence_house_id', 0)}")->where('type', 4)->count();
|
$animal_info_id = $this->request->get('animal_info_id', 0)? $this->request->get('animal_info_id'): 0;
|
||||||
|
$fence_house_id = $this->request->get('fence_house_id', 0)? $this->request->get('fence_house_id'): 0;
|
||||||
|
return AnimalOperateAction::whereRaw("animal_info_id = {$animal_info_id} or fence_house_id={$fence_house_id}")->where('type', 4)->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -56,7 +56,9 @@ class OperationWaterLogLists extends BaseDataLists implements ListsSearchInterfa
|
||||||
*/
|
*/
|
||||||
public function lists(): array
|
public function lists(): array
|
||||||
{
|
{
|
||||||
return AnimalOperateAction::whereRaw("animal_info_id = {$this->request->param('animal_info_id', 0)} or fence_house_id={$this->request->param('fence_house_id', 0)}")->where('type', 5)
|
$animal_info_id = $this->request->get('animal_info_id', 0)? $this->request->get('animal_info_id'): 0;
|
||||||
|
$fence_house_id = $this->request->get('fence_house_id', 0)? $this->request->get('fence_house_id'): 0;
|
||||||
|
return AnimalOperateAction::whereRaw("animal_info_id = {$animal_info_id} or fence_house_id={$fence_house_id}")->where('type', 5)
|
||||||
->with(['fenceHouseAttr', 'animalInfo'])
|
->with(['fenceHouseAttr', 'animalInfo'])
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
|
@ -77,7 +79,9 @@ class OperationWaterLogLists extends BaseDataLists implements ListsSearchInterfa
|
||||||
*/
|
*/
|
||||||
public function count(): int
|
public function count(): int
|
||||||
{
|
{
|
||||||
return AnimalOperateAction::whereRaw("animal_info_id = {$this->request->param('animal_info_id', 0)} or fence_house_id={$this->request->param('fence_house_id', 0)}")->where('type', 5)->count();
|
$animal_info_id = $this->request->get('animal_info_id', 0)? $this->request->get('animal_info_id'): 0;
|
||||||
|
$fence_house_id = $this->request->get('fence_house_id', 0)? $this->request->get('fence_house_id'): 0;
|
||||||
|
return AnimalOperateAction::whereRaw("animal_info_id = {$animal_info_id} or fence_house_id={$fence_house_id}")->where('type', 5)->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue