| | |
| | | insert into lf.sys_role (depid,name,descr,is_admin,create_user) values (20,'线路室-数据管理员', '数据管理员',2,1); |
| | | insert into lf.sys_role (depid,name,descr,is_admin,create_user) values (21,'穿跨越室-数据管理员','数据管理员',2,1); |
| | | insert into lf.sys_role (depid,name,descr,is_admin,create_user) values (55,'勘察室-数据管理员', '数据管理员',2,1); |
| | | insert into lf.sys_role (depid,name,descr,is_admin,create_user) values (22,'土建室-数据管理员', '数据管理员',2,1); |
| | | |
| | | ----------------------------------------------------------------------- 设置用户角色 |
| | | delete from lf.sys_role_user where id > 1; |
| | | |
| | | insert into lf.sys_role_user (id, roleid, userid, create_user) values (2, 12, 2, 1); |
| | | insert into lf.sys_role_user (id, roleid, userid, create_user) values (3, 13, 3, 1); |
| | | insert into lf.sys_role_user (id, roleid, userid, create_user) values (4, 14, 5, 1); |
| | | insert into lf.sys_role_user (id, roleid, userid, create_user) values (5, 15, 4, 1); |
| | | ----------------------------------------------------------------------- |
| | | select * from lf.sys_dep; |
| | | |
| | |
| | | SELECT depid FROM bd.dlg_agnp WHERE depid > 0 AND depid != ALL(fn_rec_array(38, 'dep')) |
| | | AND ST_Intersects(ST_PolygonFromText('POLYGON ((115.94927385452 32.3754479115071 0,121.989371092554 32.2766788010181 0,121.850621222894 29.6874200067864 0,115.9727267226 29.7835368627922 0,115.94927385452 32.3754479115071 0))', 4326), geom)) |
| | | |
| | | select c.* from lf.sys_role a inner join lf.sys_role_user b on a.id = b.roleid inner join lf.sys_user c on b.userid = c.id |
| | | where a.is_admin = 2 and a.depid = 55 order by c.id limit 1 |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | select * from lf.sys_role; -- 12>20 13>21 14>55 15>22 |
| | | select * from lf.sys_role_user; |
| | | select * from lf.sys_user order by id; |
| | | |
| | | |
| | | |
| | |
| | | package com.lf.server.mapper.show; |
| | | |
| | | import com.lf.server.entity.show.ApplyEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param userid 用户ID |
| | | * @param userid 用户ID |
| | | * @param limit 记录数 |
| | | * @param offset 偏移量 |
| | | * @return 列表 |
| | |
| | | public ApplyEntity selectById(int id); |
| | | |
| | | /** |
| | | * 根据单位ID查询用户 |
| | | * |
| | | * @param depid 单位ID |
| | | * @return 用户 |
| | | */ |
| | | public UserEntity selectUserByDepid(Integer depid); |
| | | |
| | | /** |
| | | * 插入一条 |
| | | * |
| | | * @param entity |
| | |
| | | import com.lf.server.helper.Md5Helper; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.mapper.show.ApplyMapper; |
| | | import org.hsqldb.rights.User; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | @Override |
| | | public ApplyEntity selectById(int id) { |
| | | return applyMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public UserEntity selectUserByDepid(Integer depid) { |
| | | return applyMapper.selectUserByDepid(depid); |
| | | } |
| | | |
| | | @Override |
| | |
| | | List<FlowEntity> list = new ArrayList<>(); |
| | | for (Integer depid : dr.getIds()) { |
| | | UserEntity user = selectUserByDepid(depid); |
| | | if (null == user) { |
| | | continue; |
| | | } |
| | | |
| | | FlowEntity flow = new FlowEntity(); |
| | | flow.setApplyid(applyId); |
| | |
| | | } |
| | | |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 根据单位ID查询用户 |
| | | */ |
| | | private UserEntity selectUserByDepid(Integer depid) { |
| | | // |
| | | |
| | | return null; |
| | | } |
| | | } |
| | |
| | | select * from lf.sys_apply where id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectUserByDepid" resultType="com.lf.server.entity.sys.UserEntity"> |
| | | select c.* from lf.sys_role a inner join lf.sys_role_user b on a.id = b.roleid |
| | | inner join lf.sys_user c on b.userid = c.id |
| | | where a.is_admin = 2 and a.depid = #{depid} |
| | | order by c.id limit 1 |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.show.ApplyEntity"> |
| | | <selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="id"> |
| | | select currval('lf.sys_apply_id_seq'::regclass) as id |