| | |
| | | <result property="updateTime" column="update_time"></result> |
| | | <result property="roleName" column="roleName"></result> |
| | | <result property="containerCodeList" column="containerCodeList"></result> |
| | | <result property="projectId" column="project_id"></result> |
| | | </resultMap> |
| | | |
| | | <sql id="queryWhereSql"> |
| | |
| | | </select> |
| | | |
| | | <select id="getSysUserInfoList" parameterType="java.util.Map" resultMap="SysUser"> |
| | | select u.name,u.see_flag,u.role_id,u.valid_flag,u.id_card,u.point,group_concat(container_code SEPARATOR ',') containerCodeList ,u.arp, bm1.meta_value department,bm2.meta_value company from sys_user u |
| | | select u.name,u.see_flag,u.role_id,u.valid_flag,u.id_card,u.point,group_concat(container_code SEPARATOR ',') containerCodeList ,u.arp, bm1.meta_value department,bm2.meta_value company,u.project_id projectId from sys_user u |
| | | left join sys_laboratory l on l.department = u.department and l.valid_flag = 1 |
| | | left join sys_laboratory_container c on c.laboratory_id = l.id and c.valid_flag = 1 |
| | | left join base_meta bm1 on bm1.id = u.department |
| | |
| | | </select> |
| | | |
| | | <insert id="insertSysUser" parameterType="com.nanometer.smartlab.entity.SysUser"> |
| | | insert into sys_user(id, arp, account, password, company, department, name, phone, email, memo, id_card, approver_flag, see_flag, role_id, valid_flag, create_time, update_time) |
| | | values (#{id}, #{arp}, #{account}, #{password}, #{company}, #{department}, #{name}, #{phone}, #{email}, #{memo}, #{idCard}, #{approverFlag}, #{seeFlag}, #{roleId}, 1, now(), now()) |
| | | insert into sys_user(id, arp, account, password, company, department, name, phone, email, memo, id_card, approver_flag, see_flag, role_id, valid_flag, create_time, update_time,project_id) |
| | | values (#{id}, #{arp}, #{account}, #{password}, #{company}, #{department}, #{name}, #{phone}, #{email}, #{memo}, #{idCard}, #{approverFlag}, #{seeFlag}, #{roleId}, 1, now(), now(),#{projectId}) |
| | | </insert> |
| | | |
| | | <update id="updateSysUser" parameterType="com.nanometer.smartlab.entity.SysUser"> |
| | | update sys_user set arp=#{arp}, account=#{account}, password=#{password}, company=#{company}, department=#{department}, name=#{name}, phone=#{phone}, |
| | | email=#{email}, memo=#{memo}, id_card=#{idCard}, approver_flag=#{approverFlag}, see_flag=#{seeFlag}, role_id=#{roleId}, point=#{point},update_time=now() |
| | | email=#{email}, memo=#{memo}, id_card=#{idCard}, approver_flag=#{approverFlag}, see_flag=#{seeFlag}, role_id=#{roleId}, point=#{point},update_time=now(),project_id=#{projectId} |
| | | where id=#{id} |
| | | </update> |
| | | |
| | |
| | | and u.update_time >= #{1} and #{2} > u.update_time |
| | | </select> |
| | | |
| | | |
| | | <select id="getUserListByContainerCodeNew" parameterType="java.util.Map" resultMap="SysUser"> |
| | | SELECT u.name,u.see_flag,u.role_id,u.valid_flag,u.id_card,bm2.meta_value department,bm1.meta_value company,u.arp,u.point,sp.project |
| | | from sys_user u |
| | | left join base_meta bm1 on bm1.id = u.company |
| | | left join base_meta bm2 on bm2.id = u.department |
| | | LEFT JOIn sys_project sp on sp.id = u.project_id |
| | | where u.project_id = ( |
| | | SELECT project_id from sys_laboratory_container |
| | | WHERE container_code = #{0} |
| | | and valid_flag = 1) |
| | | AND u.valid_flag = 1 |
| | | and sp.valid_flag = 1 |
| | | and u.update_time >= #{1} and #{2} > u.update_time |
| | | </select> |
| | | |
| | | <select id="selectByAccount" parameterType="com.nanometer.smartlab.entity.SysUser" resultMap="SysUser"> |
| | | select * from sys_user where valid_flag=1 and account=#{account} |
| | | </select> |