counts
This commit is contained in:
parent
840349d22e
commit
a25e5c02ff
@ -990,7 +990,7 @@ class OrderService extends Service
|
|||||||
foreach ($array as $card) {
|
foreach ($array as $card) {
|
||||||
$data[$card['sim']] = [
|
$data[$card['sim']] = [
|
||||||
'sim' => $card['sim'],
|
'sim' => $card['sim'],
|
||||||
'counts' => $data[$card['sim']] ? $data[$card['sim']] + $card['counts'] : $card['counts'],
|
'counts' => $data[$card['sim']] ? $data[$card['sim']]['counts'] + $card['counts'] : $card['counts'],
|
||||||
'type' => $node['type'],
|
'type' => $node['type'],
|
||||||
'order_id' => $node['id'],
|
'order_id' => $node['id'],
|
||||||
'company_id' => $node['company_id'],
|
'company_id' => $node['company_id'],
|
||||||
|
@ -1,14 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use App\Domains\Real\Services\OrderService;
|
|
||||||
|
|
||||||
require_once realpath(dirname(__FILE__) . '/TestCase.php');
|
require_once realpath(dirname(__FILE__) . '/TestCase.php');
|
||||||
|
|
||||||
$res = DB::connection('real')->select("call proc_child('No00000000768')");
|
$conditions = [
|
||||||
|
'company_name' = '福建车媒通网络科技有限公司',
|
||||||
|
'month' = '2016-01'
|
||||||
|
]
|
||||||
|
|
||||||
foreach ($res as $key => &$value) {
|
$export = new CompanyReportExport($conditions);
|
||||||
$value = (array) $value;
|
$url = ExportService::store($export, $this->disk);
|
||||||
}
|
|
||||||
|
|
||||||
$res = array_pluck($res, 'custom_no');
|
|
||||||
dd(in_array('No00000003080', $res));
|
|
||||||
|
14
tests/ProcChildTest.php
Normal file
14
tests/ProcChildTest.php
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use App\Domains\Real\Services\OrderService;
|
||||||
|
|
||||||
|
require_once realpath(dirname(__FILE__) . '/TestCase.php');
|
||||||
|
|
||||||
|
$res = DB::connection('real')->select("call proc_child('No00000000768')");
|
||||||
|
|
||||||
|
foreach ($res as $key => &$value) {
|
||||||
|
$value = (array) $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
$res = array_pluck($res, 'custom_no');
|
||||||
|
dd(in_array('No00000003080', $res));
|
Loading…
x
Reference in New Issue
Block a user