导出错误
This commit is contained in:
parent
0bd711d276
commit
113f24bf4a
@ -64,7 +64,7 @@ class OrderDetailExport extends AbstractExport implements FromQuery, WithHeading
|
|||||||
*/
|
*/
|
||||||
public function rows($rows)
|
public function rows($rows)
|
||||||
{
|
{
|
||||||
$rows = OrderService::detailTransformer($rows);
|
$rows = OrderService::detailTransformer(collect($rows));
|
||||||
|
|
||||||
$array = [];
|
$array = [];
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ class OrderService extends Service
|
|||||||
$packages = app(PackageRepository::class)->withTrashed()->get()->keyBy('id')->toArray();
|
$packages = app(PackageRepository::class)->withTrashed()->get()->keyBy('id')->toArray();
|
||||||
$orders = app(OrderRepository::class)->withTrashed()
|
$orders = app(OrderRepository::class)->withTrashed()
|
||||||
->select(['id', 'unit_price', 'pay_channel', 'order_at'])
|
->select(['id', 'unit_price', 'pay_channel', 'order_at'])
|
||||||
->withConditions(['id' => array_unique($cards->pluck('order_id')->toArray())])->get()->keyBy('id')->toArray();
|
->withConditions(['id' => array_unique(array_pluck($cards, 'order_id'))])->get()->keyBy('id')->toArray();
|
||||||
|
|
||||||
$cards->map(function ($item) use ($companies, $packages, $carrierOperators, $orders) {
|
$cards->map(function ($item) use ($companies, $packages, $carrierOperators, $orders) {
|
||||||
$package = $packages[$item->package_id];
|
$package = $packages[$item->package_id];
|
||||||
|
0
storage/app/public/templates/add-cards.xls
Normal file → Executable file
0
storage/app/public/templates/add-cards.xls
Normal file → Executable file
Loading…
x
Reference in New Issue
Block a user