|
|
|
@ -171,7 +171,6 @@ |
|
|
|
where a.site=#{site} and a.role_no=#{roleNo} and b.active='Y' |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<select id="selectUserBySite" resultType="SysUserData"> |
|
|
|
select a.username,a.user_display from sys_user a left join AccessSite b on a.site=b.site and a.username=b.UserID |
|
|
|
where b.site=#{site} and a.status=1 |
|
|
|
@ -190,13 +189,32 @@ |
|
|
|
delete from AccessRole where site=#{site} and role_no=#{roleNo} |
|
|
|
</delete> |
|
|
|
<select id="searchAccessProjectForUser" resultType="PlmUserRoleData"> |
|
|
|
select a.project_id,a.project_name,a.project_desc,a.site,isnull(c.searchFlag,'N') searchFlag |
|
|
|
select top 2000 a.project_id,a.project_name,a.project_desc,a.site,isnull(c.searchFlag,'N') searchFlag |
|
|
|
,isnull(c.updateFlag,'N') updateFlag,isnull(c.downFlag,'N') downFlag,isnull(c.deleteFlag,'N') deleteFlag,#{username} as username |
|
|
|
from plm_project_info a left join AccessSite b on a.site=b.site |
|
|
|
left join AccessProject c on a.project_id=c.project_id and c.site=#{site} and c.username=#{username} |
|
|
|
<where> |
|
|
|
and b.UserID=#{username} |
|
|
|
and a.site=#{site} |
|
|
|
<if test="projectId != null and projectId != ''"> |
|
|
|
AND isnull(a.project_id,'N') like #{projectId} |
|
|
|
</if> |
|
|
|
<if test="projectName != null and projectName != ''"> |
|
|
|
AND isnull(a.project_name,'N') like #{projectName} |
|
|
|
</if> |
|
|
|
<if test="searchFlag != null and searchFlag != ''"> |
|
|
|
AND isnull(c.searchFlag,'N') = #{searchFlag} |
|
|
|
</if> |
|
|
|
<if test="updateFlag != null and updateFlag != ''"> |
|
|
|
AND isnull(c.updateFlag,'N') = #{updateFlag} |
|
|
|
</if> |
|
|
|
<if test="downFlag != null and downFlag != ''"> |
|
|
|
AND isnull(c.downFlag,'N') = #{downFlag} |
|
|
|
</if> |
|
|
|
<if test="deleteFlag != null and deleteFlag != ''"> |
|
|
|
AND isnull(c.deleteFlag,'N') = #{deleteFlag} |
|
|
|
</if> |
|
|
|
|
|
|
|
</where> |
|
|
|
order by a.project_id desc |
|
|
|
</select> |
|
|
|
@ -204,6 +222,9 @@ |
|
|
|
<delete id="deleteAccessProjectByUser"> |
|
|
|
delete from AccessProject where site=#{site} and username=#{username} |
|
|
|
</delete> |
|
|
|
<delete id="deleteAccessProjectByUserPlus"> |
|
|
|
delete from AccessProject where site=#{site} and username=#{username} ${sql} |
|
|
|
</delete> |
|
|
|
|
|
|
|
<insert id="saveAccessProject"> |
|
|
|
insert into AccessProject (site,project_id,username,searchFlag,updateFlag,downFlag,deleteFlag) values |
|
|
|
|