counts
This commit is contained in:
parent
840349d22e
commit
a25e5c02ff
@ -990,7 +990,7 @@ class OrderService extends Service
|
||||
foreach ($array as $card) {
|
||||
$data[$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'],
|
||||
'order_id' => $node['id'],
|
||||
'company_id' => $node['company_id'],
|
||||
|
@ -1,14 +1,11 @@
|
||||
<?php
|
||||
|
||||
use App\Domains\Real\Services\OrderService;
|
||||
|
||||
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) {
|
||||
$value = (array) $value;
|
||||
}
|
||||
|
||||
$res = array_pluck($res, 'custom_no');
|
||||
dd(in_array('No00000003080', $res));
|
||||
$export = new CompanyReportExport($conditions);
|
||||
$url = ExportService::store($export, $this->disk);
|
||||
|
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