调整产量列表返回

dev
vine_liutk 2022-11-21 11:29:05 +08:00
parent 0e4f6bf0cd
commit 29f5b2a7a9
1 changed files with 5 additions and 3 deletions

View File

@ -26,9 +26,11 @@ class CropYieldResource extends JsonResource
'crop_id' => $this->crop_id,
'time_year' => $this->time_year,
'quarter' => $this->quarter,
'yield' => $this->yield,
'output' => $this->output,
'cultivated' => $this->cultivated,
'yield' => $this->yield.$this->whenLoaded('crop', function () {
return $this->crop?->unit ?? '';
}, ''),
'output' => $this->output.'元',
'cultivated' => $this->cultivated.'亩',
'extends' => $this->extends,
'created_by' => $this->whenLoaded('createdBy', function () {
return $this->createdBy?->name;