SELECT t.*,(select m.name from person m where (t.la_type = 'LA' and m.barcode=t.DESTBARCODE) or (t.la_type = 'AL' and m.barcode=t.SRCBARCODE)) as bdyxm,
(select m.idnumber from person m where (t.la_type = 'LA' and m.barcode=t.DESTBARCODE) or (t.la_type = 'AL' and m.barcode=t.SRCBARCODE)) as bdyzjhm,
(select c.casename from case c where (t.la_type = 'AL' and c.barcode=t.DESTBARCODE) or (t.la_type = 'LA' and c.barcode=t.SRCBARCODE)) as ajmc
select t.* from LA_MATCHCAND t where (t.SRCBARCODE= #{xczwbh} and t.DESTBARCODE= #{nyzwbh} and t.LA_TYPE ='LA') or (t.SRCBARCODE= #{nyzwbh} and t.DESTBARCODE= #{xczwbh} and t.LA_TYPE ='AL')
SELECT t.*,(select m.name from person m where (t.la_type = 'LA' and m.barcode=t.DESTBARCODE) or (t.la_type = 'AL' and m.barcode=t.SRCBARCODE)) as bdyxm,
(select m.idnumber from person m where (t.la_type = 'LA' and m.barcode=t.DESTBARCODE) or (t.la_type = 'AL' and m.barcode=t.SRCBARCODE)) as bdyzjhm,
(select c.casename from case c where (t.la_type = 'AL' and c.barcode=t.DESTBARCODE) or (t.la_type = 'LA' and c.barcode=t.SRCBARCODE)) as ajmc