1.用户分配调阅页面调整

master
王思懿 5 years ago
parent d0eb1a12e0
commit f3521f4779

@ -17,6 +17,8 @@ public class Power_Sys_DictVo extends Power_Sys_Dict {
private String deptIds; private String deptIds;
private String userName;
public Integer getHospitalId() { public Integer getHospitalId() {
return hospitalId; return hospitalId;
} }
@ -78,4 +80,12 @@ public class Power_Sys_DictVo extends Power_Sys_Dict {
public void setDeptName(String deptName) { public void setDeptName(String deptName) {
this.deptName = deptName; this.deptName = deptName;
} }
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
} }

@ -24,6 +24,7 @@
<result column="sys_name" jdbcType="VARCHAR" property="sysName"/> <result column="sys_name" jdbcType="VARCHAR" property="sysName"/>
<result column="dict_status" jdbcType="INTEGER" property="dictStatus"/> <result column="dict_status" jdbcType="INTEGER" property="dictStatus"/>
<result column="dept_name" jdbcType="INTEGER" property="deptName"/> <result column="dept_name" jdbcType="INTEGER" property="deptName"/>
<result column="userName" jdbcType="VARCHAR" property="userName"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
dict_id, dept_id, hospital_name, sys_flag, sys_name, dict_area, hospital_tel, parent_id, dict_id, dept_id, hospital_name, sys_flag, sys_name, dict_area, hospital_tel, parent_id,
@ -73,7 +74,8 @@
#{createDate,jdbcType=CHAR}, #{creater,jdbcType=VARCHAR}, #{updateDate,jdbcType=CHAR}, #{createDate,jdbcType=CHAR}, #{creater,jdbcType=VARCHAR}, #{updateDate,jdbcType=CHAR},
#{updater,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}) #{updater,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.manage.entity.Power_Sys_Dict" useGeneratedKeys="true" keyProperty="dictId"> <insert id="insertSelective" parameterType="com.manage.entity.Power_Sys_Dict" useGeneratedKeys="true"
keyProperty="dictId">
insert into power_sys_dict insert into power_sys_dict
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="dictId != null"> <if test="dictId != null">
@ -372,7 +374,8 @@
dict.sys_type sysType, dict.sys_type sysType,
dept.dept_name deptName, dept.dept_name deptName,
dict.hospital_tel, dict.hospital_tel,
dict.dict_area dict.dict_area,
dept.creater username
FROM FROM
power_sys_dict dict power_sys_dict dict
LEFT JOIN power_dept dept ON dict.dict_id = dept.dict_id LEFT JOIN power_dept dept ON dict.dict_id = dept.dict_id
@ -389,7 +392,8 @@ select
power_role.role_name sysType, power_role.role_name sysType,
null as deptName, null as deptName,
power_user.user_tel hospital_tel, power_user.user_tel hospital_tel,
power_user.user_name as dict_area power_user.user_name as dict_area,
power_user.name as username
from power_user from power_user
LEFT JOIN (SELECT LEFT JOIN (SELECT
dict.dict_id dictId, dict.dict_id dictId,
@ -402,7 +406,8 @@ LEFT JOIN (SELECT
dict.sys_type sysType, dict.sys_type sysType,
dept.dept_name deptName, dept.dept_name deptName,
dict.hospital_tel, dict.hospital_tel,
dict.dict_area dict.dict_area,
dept.creater username
FROM FROM
power_sys_dict dict power_sys_dict dict
LEFT JOIN power_dept dept ON dict.dict_id = dept.dict_id LEFT JOIN power_dept dept ON dict.dict_id = dept.dict_id
@ -410,6 +415,7 @@ LEFT JOIN (SELECT
on FIND_IN_SET(dict.deptIds,power_user.dept_id) on FIND_IN_SET(dict.deptIds,power_user.dept_id)
inner join power_role on power_role.role_id = power_user.role_id and power_role.effective = 1 and power_role.role_id != 0 and power_role.role_id != -100 inner join power_role on power_role.role_id = power_user.role_id and power_role.effective = 1 and power_role.role_id != 0 and power_role.role_id != -100
where dict.deptIds is not null and power_user.effective = 1 where dict.deptIds is not null and power_user.effective = 1
</select> </select>
<!--查询全部系统--> <!--查询全部系统-->
<select id="selectAllSys" resultMap="BaseResultMapVo"> <select id="selectAllSys" resultMap="BaseResultMapVo">
@ -553,7 +559,8 @@ on FIND_IN_SET(dict.deptIds,power_user.dept_id)
dict.sys_type sysType, dict.sys_type sysType,
dept.dept_name deptName, dept.dept_name deptName,
dict.hospital_tel, dict.hospital_tel,
dict.dict_area dict.dict_area,
dept.creater username
FROM FROM
( (
SELECT SELECT
@ -622,7 +629,8 @@ on FIND_IN_SET(dict.deptIds,power_user.dept_id)
power_role.role_name sysType, power_role.role_name sysType,
null as deptName, null as deptName,
power_user.user_tel hospital_tel, power_user.user_tel hospital_tel,
power_user.user_name as dict_area power_user.user_name as dict_area,
power_user.name as username
from power_user from power_user
left join (SELECT DISTINCT left join (SELECT DISTINCT
dict.dict_id dictId, dict.dict_id dictId,
@ -693,7 +701,8 @@ on FIND_IN_SET(dict.deptIds,power_user.dept_id)
) dict ) dict
LEFT JOIN power_dept dept ON dict.dept_id = dept.dept_id LEFT JOIN power_dept dept ON dict.dept_id = dept.dept_id
) dict on FIND_IN_SET(dict.deptIds,power_user.dept_id) ) dict on FIND_IN_SET(dict.deptIds,power_user.dept_id)
inner join power_role on power_role.role_id = power_user.role_id and power_role.effective = 1 and power_role.role_id != 0 and power_role.role_id != -100 inner join power_role on power_role.role_id = power_user.role_id and power_role.effective = 1 and
power_role.role_id != 0 and power_role.role_id != -100
where dict.deptIds is not null and power_user.effective = 1 where dict.deptIds is not null and power_user.effective = 1
<if test="userId != null"> <if test="userId != null">
AND power_user.user_id != #{userId} AND power_user.user_id != #{userId}
@ -835,7 +844,8 @@ on FIND_IN_SET(dict.deptIds,power_user.dept_id)
WHERE WHERE
sys_flag != '' sys_flag != ''
AND sys_flag != 'power' AND sys_flag != 'power'
<if test="userId != null and roleId != -100">AND instr((SELECT dept_id FROM power_user WHERE user_id = #{userId}),dept_id) <if test="userId != null and roleId != -100">AND instr((SELECT dept_id FROM power_user WHERE user_id =
#{userId}),dept_id)
</if> </if>
<if test=" <if test="
userId != null and roleId == -100"> userId != null and roleId == -100">

@ -259,6 +259,7 @@
power_user.dept_id power_user.dept_id
) )
where power_user.effective = #{effective,jdbcType=INTEGER} and user_name = #{userName,jdbcType=VARCHAR} and user_pwd = #{userPwd,jdbcType=VARCHAR} where power_user.effective = #{effective,jdbcType=INTEGER} and user_name = #{userName,jdbcType=VARCHAR} and user_pwd = #{userPwd,jdbcType=VARCHAR}
GROUP BY user_id
</select> </select>
<!--2019-07-31 zengwenhe --> <!--2019-07-31 zengwenhe -->

@ -965,9 +965,9 @@ public class PowerServiceImpl implements PowerService {
tree4.setId(id); tree4.setId(id);
tree4.setParentId(twoLevel); tree4.setParentId(twoLevel);
if(StringUtils.isNotBlank(map.getValue().getHospitalTel())){ if(StringUtils.isNotBlank(map.getValue().getHospitalTel())){
tree4.setName(map.getValue().getSysName()+"-"+map.getValue().getDictArea()+"("+map.getValue().getHospitalTel()+")"); tree4.setName(map.getValue().getUserName()+"-"+map.getValue().getDictArea()+"("+map.getValue().getHospitalTel()+")");
}else{ }else{
tree4.setName(map.getValue().getSysName()+"-"+map.getValue().getDictArea()); tree4.setName(map.getValue().getUserName()+"-"+map.getValue().getDictArea());
} }
tree4.setSelfId(map.getKey()); tree4.setSelfId(map.getKey());
tree4.setRoleId(map.getValue().getParentId()); tree4.setRoleId(map.getValue().getParentId());

Loading…
Cancel
Save