(select name from sys_dictitem where groupid='QGCODE_UNIT' AND code=us.unitcode) as unitcode,
us.username as username,
us.password as password,
us.true_name as trueName,
us.open_flag as openFlag,
us.default_model as defaultModel,
us.remark as remark,
us.lrr as lrr,
us.lrsj as lrsj,
us.gxr as gxr,
us.gxsj as gxsj,
us.lrdwdm as lrdwdm,
us.lrdwmc as lrdwmc,
us.identitycard as identitycard,
(select name from sys_dictitem where groupid='CODE_XB' AND code=us.sex) as sex,
us.birthday as birthday,
us.telephone as telephone,
<!--(select name from sys_dictitem where groupid='CODE_UNIT' AND code=us.unitcode) as unitname,-->
(SELECT name FROM sys_dictitem_xz WHERE code = us.unitcode) as unitname,
us.scbz as scbz,
us.ip as ip,
us.grade as grade,
us.policemanid as policemanid,
(select (select name from sys_dictitem where groupid='CODE_XZQH' AND code=lqh.qh_id) as mc from sys_user_llyqh lqh where lqh.user_id=us.id AND lqh.xxsc_pdbz = '0' limit 1 ) qhmc
FROM sys_user us
LEFT JOIN sys_dictitem_xz xz ON us.unitcode = xz.code