|
|
@ -8,22 +8,23 @@ |
|
|
|
resultType="com.yxt.anrui.portal.api.sysstaffinfo.SysStaffinfoAppContactsVo"> |
|
|
|
SELECT staff.sid, staff.name, staff.mobile, staff.pinYinName, staff.firstPinYinLabel, user.headImage |
|
|
|
FROM sys_staffinfo staff |
|
|
|
LEFT JOIN sys_user user ON staff.sid = user.staffSid |
|
|
|
LEFT JOIN sys_user user |
|
|
|
ON staff.sid = user.staffSid |
|
|
|
ORDER BY staff.firstPinYinLabel = '#', staff.firstPinYinLabel ASC, staff.pinYinName |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="searchAppContactsPageList" |
|
|
|
resultType="com.yxt.anrui.portal.api.sysstaffinfo.SysStaffinfoAppContactsSearchVo"> |
|
|
|
SELECT staff.sid, |
|
|
|
staff.name, |
|
|
|
staff.mobile, |
|
|
|
staff.position, |
|
|
|
user.headImage, |
|
|
|
GROUP_CONCAT(org.orgName SEPARATOR '/') orgName |
|
|
|
staff.name, |
|
|
|
staff.mobile, |
|
|
|
staff.position, |
|
|
|
user.headImage, |
|
|
|
GROUP_CONCAT(org.orgName SEPARATOR '/') orgName |
|
|
|
FROM sys_staffinfo staff |
|
|
|
LEFT JOIN sys_staff_org org ON org.staffSid = staff.sid |
|
|
|
LEFT JOIN sys_user user ON staff.sid = user.staffSid |
|
|
|
WHERE 1 = 1 |
|
|
|
LEFT JOIN sys_staff_org org ON org.staffSid = staff.sid |
|
|
|
LEFT JOIN sys_user user ON staff.sid = user.staffSid |
|
|
|
WHERE 1 = 1 |
|
|
|
<if test="mobileStr != null and mobileStr != ''"> |
|
|
|
AND staff.mobile LIKE concat('%', #{mobileStr}, '%') |
|
|
|
</if> |
|
|
@ -47,8 +48,9 @@ |
|
|
|
staff.position, |
|
|
|
GROUP_CONCAT(org.orgNamePath SEPARATOR '/') orgNamePath |
|
|
|
FROM sys_staffinfo staff |
|
|
|
LEFT JOIN sys_user user ON staff.sid = user.staffSid |
|
|
|
LEFT JOIN sys_staff_org org ON staff.sid = org.staffSid |
|
|
|
LEFT JOIN sys_user user |
|
|
|
ON staff.sid = user.staffSid |
|
|
|
LEFT JOIN sys_staff_org org ON staff.sid = org.staffSid |
|
|
|
WHERE staff.sid = #{staffSid} |
|
|
|
GROUP BY staff.sid |
|
|
|
</select> |
|
|
@ -65,15 +67,15 @@ |
|
|
|
IFNULL(NULL, 0) AS staffNum |
|
|
|
FROM sys_staff_org org |
|
|
|
INNER JOIN sys_staffinfo staff ON org.staffSid = staff.sid |
|
|
|
LEFT JOIN sys_user user ON staff.sid = user.staffSid |
|
|
|
LEFT JOIN sys_user user |
|
|
|
ON staff.sid = user.staffSid |
|
|
|
WHERE org.orgSid = #{sid} |
|
|
|
</select> |
|
|
|
<!--根据员工类型key查询员工工号的最大号--> |
|
|
|
<select id="selectJobNumber" resultType="com.yxt.anrui.portal.api.sysstaffinfo.SysStaffinfo"> |
|
|
|
select * |
|
|
|
from sys_staffinfo |
|
|
|
order by jobNumber desc |
|
|
|
limit 1 |
|
|
|
order by jobNumber desc limit 1 |
|
|
|
</select> |
|
|
|
<!--根据手机号查询员工是否重复--> |
|
|
|
<select id="selectByMobile" resultType="com.yxt.anrui.portal.api.sysstaffinfo.SysStaffinfo"> |
|
|
@ -294,8 +296,18 @@ |
|
|
|
</update> |
|
|
|
<!--查询当前分公司下的员工信息--> |
|
|
|
<select id="selectStaffList" resultType="com.yxt.anrui.portal.api.sysstaffinfo.PcSysStaffVo"> |
|
|
|
select sso.staffSid,si.name staffName from sys_staff_org sso |
|
|
|
left join sys_staffinfo si on sso.staffSid = si.sid |
|
|
|
where find_in_set(#{orgSid},replace(sso.orgSidPath,'/',',')) |
|
|
|
select sso.staffSid, si.name staffName |
|
|
|
from sys_staff_org sso |
|
|
|
left join sys_staffinfo si on sso.staffSid = si.sid |
|
|
|
where find_in_set(#{orgSid}, replace(sso.orgSidPath, '/', ',')) |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getStaffName" resultType="java.util.Map"> |
|
|
|
SELECT sid, name |
|
|
|
FROM sys_staffinfo ${ew.customSqlSegment} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getStaffNameByDeptSid" resultType="java.util.Map"> |
|
|
|
|
|
|
|
</select> |
|
|
|
</mapper> |