|
|
@ -2,30 +2,39 @@
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="com.glxp.api.dao.basic.BasicCollectUserMapper">
|
|
|
|
<mapper namespace="com.glxp.api.dao.basic.BasicCollectUserMapper">
|
|
|
|
<select id="filterList" resultType="com.glxp.api.res.basic.UserWorkResponse">
|
|
|
|
<select id="filterList" resultType="com.glxp.api.res.basic.UserWorkResponse">
|
|
|
|
select bcu.id,sw.workplaceName,sw.invCode,sw.workplaceId,sw.constituencies,
|
|
|
|
select bcu.id,
|
|
|
|
au.userName,au.employeeName,sw.createTime as createTime,sw.workplaceStatus,sw.workplaceType,sw.invRemindNumber,ad.name deptCodeName
|
|
|
|
sw.workplaceName,
|
|
|
|
from basic_collect_user bcu
|
|
|
|
sw.invCode,
|
|
|
|
left join auth_user au on bcu.userId = au.id
|
|
|
|
sw.workplaceId,
|
|
|
|
left join sys_workplace sw on bcu.workplaceCode = sw.workplaceId
|
|
|
|
sw.constituencies,
|
|
|
|
left join auth_dept ad on ad.code = sw.deptCode
|
|
|
|
au.userName,
|
|
|
|
|
|
|
|
au.employeeName,
|
|
|
|
|
|
|
|
sw.createTime as createTime,
|
|
|
|
|
|
|
|
sw.workplaceStatus,
|
|
|
|
|
|
|
|
sw.workplaceType,
|
|
|
|
|
|
|
|
sw.invRemindNumber,
|
|
|
|
|
|
|
|
ad.name deptCodeName
|
|
|
|
|
|
|
|
from basic_collect_user bcu
|
|
|
|
|
|
|
|
left join auth_user au on bcu.userId = au.id
|
|
|
|
|
|
|
|
left join sys_workplace sw on bcu.workplaceCode = sw.workplaceId
|
|
|
|
|
|
|
|
left join auth_dept ad on ad.code = sw.deptCode
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test=" userId != null and userId != ''">
|
|
|
|
<if test="userId != null and userId != ''">
|
|
|
|
AND bcu.userId = #{userId}
|
|
|
|
AND bcu.userId = #{userId}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test=" workplaceCode != null and workplaceCode != ''">
|
|
|
|
<if test="workplaceCode != null and workplaceCode != ''">
|
|
|
|
AND bcu.workplaceCode = #{workplaceCode}
|
|
|
|
AND bcu.workplaceCode = #{workplaceCode}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="userKey != null and userKey != ''">
|
|
|
|
<if test="userKey != null and userKey != ''">
|
|
|
|
AND (au.employeeName like concat('%', #{userKey}, '%')
|
|
|
|
AND (au.employeeName like concat('%', #{userKey}, '%')
|
|
|
|
or au.userName like concat('%', #{userKey}, '%')
|
|
|
|
or au.userName like concat('%', #{userKey}, '%')
|
|
|
|
)
|
|
|
|
)
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="workKey != null and workKey != ''">
|
|
|
|
<if test="workKey != null and workKey != ''">
|
|
|
|
AND (sw.workplaceName like concat('%', #{workKey}, '%')
|
|
|
|
AND (sw.workplaceName like concat('%', #{workKey}, '%')
|
|
|
|
or sw.workplaceId like concat('%', #{workKey}, '%')
|
|
|
|
or sw.workplaceId like concat('%', #{workKey}, '%')
|
|
|
|
)
|
|
|
|
)
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
</mapper>
|
|
|
|