...
|
...
|
@@ -99,9 +99,9 @@ class OrderInfoModel extends Model |
|
|
}
|
|
|
public function peopleCount($where){
|
|
|
$where['o.delete_time'] = ['eq',0];
|
|
|
$where['c.expire_time'] = ['>',time()];//判断保单是否还在缴费期限内
|
|
|
$where['o.order_expire_time'] = ['>',time()];//筛选出托管中状态
|
|
|
$where['o.status'] = ['eq',3];//筛选出托管中状态
|
|
|
$where1['o.order_expire_time'] = ['>',time()];//筛选出托管中状态
|
|
|
$where1['o.order_about_time'] = ['>',(time()-30*24*60*60)];
|
|
|
$where1['o.status'] = ['in',[3,1]];
|
|
|
$field = "c.*";
|
|
|
$data = $this
|
|
|
->alias('o_i')
|
...
|
...
|
@@ -109,15 +109,16 @@ class OrderInfoModel extends Model |
|
|
->join('cmf_order o','o.id = o_i.order_id')
|
|
|
->join('cmf_collocation c','c.id = o_i.collocation_id')
|
|
|
->where($where)
|
|
|
->where($where1)
|
|
|
->group('c.insurer')
|
|
|
->count();
|
|
|
return $data;
|
|
|
}
|
|
|
public function totalSum($where){
|
|
|
$where['o.delete_time'] = ['eq',0];
|
|
|
$where['c.expire_time'] = ['>',time()];//判断保单是否还在缴费期限内
|
|
|
$where['o.order_expire_time'] = ['>',time()];//筛选出托管中状态
|
|
|
$where['o.status'] = ['eq',3];//筛选出托管中状态
|
|
|
$where1['o.order_expire_time'] = ['>',time()];//筛选出托管中状态
|
|
|
$where1['o.order_about_time'] = ['>',(time()-30*24*60*60)];
|
|
|
$where1['o.status'] = ['in',[3,1]];
|
|
|
$field = "c.*";
|
|
|
$data = $this
|
|
|
->alias('o_i')
|
...
|
...
|
@@ -125,14 +126,15 @@ class OrderInfoModel extends Model |
|
|
->join('cmf_order o','o.id = o_i.order_id')
|
|
|
->join('cmf_collocation c','c.id = o_i.collocation_id')
|
|
|
->where($where)
|
|
|
->where($where1)
|
|
|
->sum('c.insurance_price');
|
|
|
return $data;
|
|
|
}
|
|
|
public function subjoinSum($where){
|
|
|
$where['o.delete_time'] = ['eq',0];
|
|
|
$where['c.expire_time'] = ['>',time()];//判断保单是否还在缴费期限内
|
|
|
$where['o.order_expire_time'] = ['>',time()];//筛选出托管中状态
|
|
|
$where['o.status'] = ['eq',3];//筛选出托管中状态
|
|
|
$where1['o.order_expire_time'] = ['>',time()];//筛选出托管中状态
|
|
|
$where1['o.order_about_time'] = ['>',(time()-30*24*60*60)];
|
|
|
$where1['o.status'] = ['in',[3,1]];
|
|
|
$field = "c.*";
|
|
|
$data = $this
|
|
|
->alias('o_i')
|
...
|
...
|
@@ -140,6 +142,7 @@ class OrderInfoModel extends Model |
|
|
->join('cmf_order o','o.id = o_i.order_id')
|
|
|
->join('cmf_collocation c','c.id = o_i.collocation_id')
|
|
|
->where($where)
|
|
|
->where($where1)
|
|
|
->order('c.create_time','desc')
|
|
|
->select()->toArray();
|
|
|
//获取附加险的信息
|
...
|
...
|
|