| | |
| | | u_user a |
| | | ,u_org uo |
| | | ,u_org_staff_rel uosr |
| | | ,u_org puo |
| | | where a.level_cd = '01' |
| | | and a.user_id = uosr.staff_id |
| | | and uosr.store_id = #{storeId} |
| | | and uosr.org_id = uo.org_id |
| | | and uo.parent_org_id = puo.org_id |
| | | <if test="parentOrgId !=null and parentOrgId != ''"> |
| | | and uo.parent_org_id = #{parentOrgId} |
| | | </if> |
| | | and a.status_cd = '0' |
| | | and uo.status_cd = '0' |
| | | and uosr.status_cd = '0' |
| | | and puo.status_cd = '0' |
| | | <if test="tel !=null and tel != ''"> |
| | | and a.tel= #{tel} |
| | | </if> |
| | |
| | | |
| | | <!-- 查询员工总量 --> |
| | | <select id="getStaffs" parameterType="Map" resultType="Map"> |
| | | select uo.org_name,uo.org_name orgName,u.user_id, u.user_id userId,u.name,u.name userName,u.email,u.address,u.location_cd,u.location_cd locationCd, |
| | | u.age,u.sex,u.tel,u.level_cd,u.b_id |
| | | select uo.org_id orgId,uo.org_name,uo.org_name orgName,u.user_id, u.user_id userId,u.name,u.name userName,u.email,u.address,u.location_cd,u.location_cd locationCd, |
| | | u.age,u.sex,u.tel,u.level_cd,u.b_id,puo.org_id parentOrgId,puo.org_name parentOrgName |
| | | from |
| | | u_user u |
| | | ,u_org uo |
| | | ,u_org_staff_rel uosr |
| | | ,u_org puo |
| | | where u.level_cd = '01' |
| | | and u.user_id = uosr.staff_id |
| | | and uosr.store_id = #{storeId} |
| | | and uosr.org_id = uo.org_id |
| | | and uo.parent_org_id = puo.org_id |
| | | <if test="parentOrgId !=null and parentOrgId != ''"> |
| | | and uo.parent_org_id = #{parentOrgId} |
| | | </if> |
| | | and u.status_cd = '0' |
| | | and uo.status_cd = '0' |
| | | and uosr.status_cd = '0' |
| | | and puo.status_cd = '0' |
| | | <if test="tel !=null and tel != ''"> |
| | | and u.tel= #{tel} |
| | | </if> |