|
@@ -1,9 +1,9 @@
|
|
|
package thyyxxk.webserver.dao_his.settings;
|
|
|
|
|
|
import org.apache.ibatis.annotations.*;
|
|
|
+import thyyxxk.webserver.pojo.dictionary.PureCodeName;
|
|
|
import thyyxxk.webserver.pojo.settings.deptphones.DeptPhonesPojo;
|
|
|
import thyyxxk.webserver.pojo.settings.users.UserInfoPojo;
|
|
|
-import thyyxxk.webserver.pojo.settings.permissions.DeptUserTreePojo;
|
|
|
import thyyxxk.webserver.pojo.settings.permissions.MenuTreePojo;
|
|
|
import thyyxxk.webserver.pojo.settings.permissions.RolePojo;
|
|
|
|
|
@@ -31,31 +31,33 @@ public interface SettingsDao {
|
|
|
List<Integer> getUserRoles(@Param("code") String code);
|
|
|
|
|
|
@Select("select rtrim(code) code, rtrim(name) name from zd_unit_code where isnull(del_flag,0)!=1 order by code")
|
|
|
- List<DeptUserTreePojo> getAllDepts();
|
|
|
+ List<PureCodeName> selectAllDepts();
|
|
|
|
|
|
- @Select("select rtrim(code) as code, rtrim(name) as name from zd_unit_code where " +
|
|
|
- "code=(select dept_code from a_employee_mi where code=#{code})")
|
|
|
- DeptUserTreePojo getDeptInfo(@Param("code") String code);
|
|
|
+ @Select("select rtrim(code) code, rtrim(name) name from zd_unit_code where code=(" +
|
|
|
+ "select rtrim(dept_code) from a_employee_mi where code=#{code})")
|
|
|
+ List<PureCodeName> selectDeptsByUserCode(@Param("code") String code);
|
|
|
|
|
|
@Select("select rtrim(code) as code, rtrim(code_rs) as codeRs, rtrim(name) as name, " +
|
|
|
"rtrim(dept_code) as deptCode, deptName=(select rtrim(name) from zd_unit_code where code=dept_code), " +
|
|
|
"title=(select rtrim(name) from zd_emp_title where code=emp_tit_code), " +
|
|
|
"position=(select rtrim(name) from zd_emp_position where code=emp_po_code) " +
|
|
|
- "from a_employee_mi where dept_code=(select dept_code from a_employee_mi where code=#{code}) " +
|
|
|
- "and isnull(del_flag,0)!=1 ")
|
|
|
- List<UserInfoPojo> getDeptUsersByUserCode(@Param("code") String code);
|
|
|
+ "from a_employee_mi where isnull(del_flag,0)!=1 and isnull(dept_code,'')!=''")
|
|
|
+ List<UserInfoPojo> selectAllUsers();
|
|
|
|
|
|
@Select("select rtrim(code) as code, rtrim(code_rs) as codeRs, rtrim(name) as name, " +
|
|
|
"rtrim(dept_code) as deptCode, deptName=(select rtrim(name) from zd_unit_code where code=dept_code), " +
|
|
|
"title=(select rtrim(name) from zd_emp_title where code=emp_tit_code), " +
|
|
|
"position=(select rtrim(name) from zd_emp_position where code=emp_po_code) " +
|
|
|
- "from a_employee_mi where dept_code=#{code} and isnull(del_flag,0)!=1 ")
|
|
|
- List<UserInfoPojo> getDeptUsersByDeptCode(@Param("code") String code);
|
|
|
+ "from a_employee_mi where dept_code=(select dept_code from a_employee_mi where code=#{code}) " +
|
|
|
+ "and isnull(del_flag,0)!=1 ")
|
|
|
+ List<UserInfoPojo> getDeptUsersByUserCode(@Param("code") String code);
|
|
|
|
|
|
- @Select("select * from dj_dict_role")
|
|
|
+ @Select("select id,name,create_datetime,createStaff=(select rtrim(name) " +
|
|
|
+ "from a_employee_mi where code=create_staff) from dj_dict_role")
|
|
|
List<RolePojo> getAllRoles();
|
|
|
|
|
|
- @Select("select * from dj_dict_role where id>2")
|
|
|
+ @Select("select id,name,create_datetime,createStaff=(select rtrim(name) " +
|
|
|
+ "from a_employee_mi where code=create_staff) from dj_dict_role where id>2")
|
|
|
List<RolePojo> getAllRolesExceptAdmin();
|
|
|
|
|
|
@Delete("delete from dj_user_role where user_code=#{code}")
|
|
@@ -72,8 +74,9 @@ public interface SettingsDao {
|
|
|
@Select("select count(1) from dj_dict_role where name=#{name}")
|
|
|
Integer isRoleExist(@Param("name") String name);
|
|
|
|
|
|
- @Insert("insert into dj_dict_role (name) values (#{name})")
|
|
|
- void addNewRole(@Param("name") String name);
|
|
|
+ @Insert("insert into dj_dict_role (name,create_datetime,create_staff) values " +
|
|
|
+ "(#{name},getdate(),#{createStaff})")
|
|
|
+ void addNewRole(RolePojo role);
|
|
|
|
|
|
@Select("select * from dj_dict_menu where parent=#{code}")
|
|
|
List<MenuTreePojo> getMenusByParent(@Param("code") Integer code);
|