|
@@ -2054,12 +2054,36 @@ class Whlabel_bh extends Start_Controller {
|
|
|
$where .= " and features like '%-".$color."-%'";
|
|
|
}
|
|
|
if(!empty($crk_select)){
|
|
|
+ $where_arr = [];
|
|
|
+ $where_arr['time >='] =$timetk;
|
|
|
+ $where_arr['time <='] = $timetj;
|
|
|
+ if($transfer == 1){
|
|
|
+ $where_arr[] =['lx'=>$transfer];
|
|
|
+ }
|
|
|
+
|
|
|
+ $cr_model = $this->db->from('whlabel_bh_transfer_cr')->select('id,fid,is_over,lx,time');
|
|
|
if($crk_select == 1){
|
|
|
- $where .=" and rk != ck ";
|
|
|
+ $where_arr['type'] =1;
|
|
|
+ $where_arr['is_over']=0;
|
|
|
+ $cr_tmp_list = $cr_model->where($where_arr)->get()->result_array();
|
|
|
+ }else{
|
|
|
+ $where_arr['type'] = 2;
|
|
|
+ $cr_tmp_list = $cr_model->where($where_arr)->get()->result_array();
|
|
|
}
|
|
|
- if($crk_select == 2){
|
|
|
- $where .=" and rk = ck ";
|
|
|
+ $fids = array_column($cr_tmp_list,'fid');
|
|
|
+ $ids = array_unique($fids);
|
|
|
+ if(empty($ids)){
|
|
|
+ $where = " id = 1 ";
|
|
|
+ }else{
|
|
|
+ $where .= " and id in (".implode(",",$ids).")";
|
|
|
}
|
|
|
+
|
|
|
+ // if($crk_select == 1){
|
|
|
+ // $where .=" and rk != ck ";
|
|
|
+ // }
|
|
|
+ // if($crk_select == 2){
|
|
|
+ // $where .=" and rk = ck ";
|
|
|
+ // }
|
|
|
}
|
|
|
//数据排序
|
|
|
$order_str = "id desc";
|