调整产量列表返回
parent
0e4f6bf0cd
commit
29f5b2a7a9
|
|
@ -26,9 +26,11 @@ class CropYieldResource extends JsonResource
|
||||||
'crop_id' => $this->crop_id,
|
'crop_id' => $this->crop_id,
|
||||||
'time_year' => $this->time_year,
|
'time_year' => $this->time_year,
|
||||||
'quarter' => $this->quarter,
|
'quarter' => $this->quarter,
|
||||||
'yield' => $this->yield,
|
'yield' => $this->yield.$this->whenLoaded('crop', function () {
|
||||||
'output' => $this->output,
|
return $this->crop?->unit ?? '';
|
||||||
'cultivated' => $this->cultivated,
|
}, ''),
|
||||||
|
'output' => $this->output.'元',
|
||||||
|
'cultivated' => $this->cultivated.'亩',
|
||||||
'extends' => $this->extends,
|
'extends' => $this->extends,
|
||||||
'created_by' => $this->whenLoaded('createdBy', function () {
|
'created_by' => $this->whenLoaded('createdBy', function () {
|
||||||
return $this->createdBy?->name;
|
return $this->createdBy?->name;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue