|
|
const sql = `select t_ycbgjlb.*,(case t_ycbgjlb.fu_jian_ when '' then '空' else t_ycbgjlb.fu_jian_ END) as aa,g.bianzhibumen,g.bianzhiren,g.shenheren,g.jieshouzhe from t_ycbgjlb LEFT JOIN (select e.*,f.jieshouzhe from (select c.*,d.shenheren from (select a.*,b.bianzhiren from (select t.id_ ,group_concat(u.name_ order by find_in_set(u.id_,t.bian_zhi_bu_men_)) as bianzhibumen from t_ycbgjlb as t inner join ibps_party_position as u on find_in_set(u.id_,t.bian_zhi_bu_men_)>0 group by t.id_ ORDER BY t.create_time_ DESC) as a LEFT JOIN (select t.id_ ,u.NAME_ as bianzhiren from t_ycbgjlb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.bian_zhi_ren_)>0 group by t.id_ ORDER BY t.create_time_ DESC) as b on a.id_ = b.id_) as c LEFT JOIN (select t.id_ ,u.NAME_ as shenheren from t_ycbgjlb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.shen_he_ren_)>0 group by t.id_ ORDER BY t.create_time_ DESC) as d on c.id_ = d.id_) as e LEFT JOIN (select t.id_ ,group_concat(u.name_ order by find_in_set(u.id_,t.jie_shou_zhe_)) as jieshouzhe from t_ycbgjlb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.jie_shou_zhe_)>0 group by t.id_ ORDER BY t.create_time_ DESC) as f on e.id_ = f.id_)as g on t_ycbgjlb.id_ =g.id_ where find_in_set(t_ycbgjlb.bian_zhi_bu_men_,'${this.positionObj}') and t_ycbgjlb.yang_pin_hao_ like'%` + key + `%' ORDER BY t_ycbgjlb.create_time_ DESC LIMIT ${page},10`
|
|
const sql = `select t_ycbgjlb.*,(case t_ycbgjlb.fu_jian_ when '' then '空' else t_ycbgjlb.fu_jian_ END) as aa,g.bianzhibumen,g.bianzhiren,g.shenheren,g.jieshouzhe from t_ycbgjlb LEFT JOIN (select e.*,f.jieshouzhe from (select c.*,d.shenheren from (select a.*,b.bianzhiren from (select t.id_ ,group_concat(u.name_ order by find_in_set(u.id_,t.bian_zhi_bu_men_)) as bianzhibumen from t_ycbgjlb as t inner join ibps_party_position as u on find_in_set(u.id_,t.bian_zhi_bu_men_)>0 group by t.id_ ORDER BY t.create_time_ DESC) as a LEFT JOIN (select t.id_ ,u.NAME_ as bianzhiren from t_ycbgjlb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.bian_zhi_ren_)>0 group by t.id_ ORDER BY t.create_time_ DESC) as b on a.id_ = b.id_) as c LEFT JOIN (select t.id_ ,u.NAME_ as shenheren from t_ycbgjlb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.shen_he_ren_)>0 group by t.id_ ORDER BY t.create_time_ DESC) as d on c.id_ = d.id_) as e LEFT JOIN (select t.id_ ,group_concat(u.name_ order by find_in_set(u.id_,t.jie_shou_zhe_)) as jieshouzhe from t_ycbgjlb as t inner join ibps_party_employee as u on find_in_set(u.id_,t.jie_shou_zhe_)>0 group by t.id_ ORDER BY t.create_time_ DESC) as f on e.id_ = f.id_)as g on t_ycbgjlb.id_ =g.id_ where find_in_set(t_ycbgjlb.bian_zhi_bu_men_,'${this.positionObj}') and t_ycbgjlb.yang_pin_hao_ like'%` + key + `%' ORDER BY t_ycbgjlb.create_time_ DESC LIMIT ${page},10`
|