正在显示
1 个修改的文件
包含
4 行增加
和
1 行删除
@@ -15,7 +15,7 @@ use think\Db; | @@ -15,7 +15,7 @@ use think\Db; | ||
15 | 15 | ||
16 | class TestController extends HomeBaseController | 16 | class TestController extends HomeBaseController |
17 | { | 17 | { |
18 | - protected $uid = 309; //451 | 18 | + protected $uid = 267; //451 |
19 | protected $complete = [83]; | 19 | protected $complete = [83]; |
20 | 20 | ||
21 | public function prob() | 21 | public function prob() |
@@ -33,9 +33,11 @@ class TestController extends HomeBaseController | @@ -33,9 +33,11 @@ class TestController extends HomeBaseController | ||
33 | 5 => '已发货', | 33 | 5 => '已发货', |
34 | 6 => '待取货' | 34 | 6 => '待取货' |
35 | ]; | 35 | ]; |
36 | + $else_ids = []; | ||
36 | $indent_ids = Db::name('money_income')->where('uid',$uid)->group('indent_id')->column('indent_id'); | 37 | $indent_ids = Db::name('money_income')->where('uid',$uid)->group('indent_id')->column('indent_id'); |
37 | foreach ($indent_ids as &$id) { | 38 | foreach ($indent_ids as &$id) { |
38 | $v = Db::name('indent')->where('id',$id)->find(); | 39 | $v = Db::name('indent')->where('id',$id)->find(); |
40 | +// if(!$v) $else_ids[] = $id; | ||
39 | if($v['state'] == 3 || $v['state'] == 5) { | 41 | if($v['state'] == 3 || $v['state'] == 5) { |
40 | $money = Db::name('money_income')->where('uid',$uid)->where('indent_id',$v['id'])->value('money'); | 42 | $money = Db::name('money_income')->where('uid',$uid)->where('indent_id',$v['id'])->value('money'); |
41 | $fact_money = Db::name('money_income')->where('uid',$uid)->where('indent_id',$v['id'])->sum('money'); | 43 | $fact_money = Db::name('money_income')->where('uid',$uid)->where('indent_id',$v['id'])->sum('money'); |
@@ -59,6 +61,7 @@ class TestController extends HomeBaseController | @@ -59,6 +61,7 @@ class TestController extends HomeBaseController | ||
59 | ]; | 61 | ]; |
60 | } | 62 | } |
61 | } | 63 | } |
64 | +// print_r($else_ids);exit; | ||
62 | // $indent = Db::name('indent')->where('salesman_uid',$uid)->order('create_time','desc')->select(); | 65 | // $indent = Db::name('indent')->where('salesman_uid',$uid)->order('create_time','desc')->select(); |
63 | // $arr = collection($indent)->toArray(); | 66 | // $arr = collection($indent)->toArray(); |
64 | // foreach ($arr as &$v) { | 67 | // foreach ($arr as &$v) { |
-
请 注册 或 登录 后发表评论