<sql>select a.KSBM,b.DPTZJM,b.DPTID,b.DPTNAME KSMC,b.DPTTYPE,b.DPTGPID from MAIN_YHGLKS a left join MAIN_KS b on a.JGID=b.JGID and a.KSBM=b.DPTID where a.JGID=? and a.EMPID=? and a.SCBZ=0</sql>
<sql>select a.KSBM,b.DPTZJM,b.DPTID,b.DPTNAME KSMC,b.DPTTYPE,b.DPTGPID from MAIN_YHGLKS a left join MAIN_KS b on a.JGID=b.JGID and a.KSBM=b.DPTID where a.JGID=? and a.EMPID=? and a.SCBZ=0 order by DPTTYPE,KSMC</sql>