| | |
| | | <result property="projectId" column="project_id"></result> |
| | | </resultMap> |
| | | |
| | | <resultMap id="SysUserDto" type="com.nanometer.smartlab.entity.dto.SysUserDto"> |
| | | <id property="id" column="id"/> |
| | | <result property="arp" column="arp"/> |
| | | <result property="account" column="account"/> |
| | | <result property="department" column="department"/> |
| | | <result property="name" column="name"/> |
| | | <result property="point" column="point"/> |
| | | <collection property="sysLaboratory" ofType="com.nanometer.smartlab.entity.dto.SysLaboratoryDto" fetchType="lazy"> |
| | | <id property="id" column="sl_id"/> |
| | | <result property="name" column="sl_name"/> |
| | | <collection property="sysLaboratoryContainer" ofType="com.nanometer.smartlab.entity.dto.SysLaboratoryContainerDto" fetchType="lazy"> |
| | | <id property="id" column="slc_id"/> |
| | | <result property="name" column="slc_name"/> |
| | | </collection> |
| | | </collection> |
| | | </resultMap> |
| | | |
| | | <sql id="queryWhereSql"> |
| | | <if test="arp != null and arp != ''"> |
| | | and su.arp like #{arp} |
| | |
| | | |
| | | |
| | | <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 |
| | | 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 |
| | | where project_id = ( |
| | | 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> |
| | | <select id="selectUserInfo" resultMap="SysUserDto"> |
| | | SELECT |
| | | su.id, |
| | | su.arp, |
| | | su.account, |
| | | su.`name`, |
| | | su.point, |
| | | bm1.meta_value department, |
| | | sl.id sl_id, |
| | | sl.`name` sl_name, |
| | | slc.id slc_id, |
| | | slc.`name` slc_name |
| | | FROM |
| | | sys_user su |
| | | LEFT JOIN base_meta bm1 on bm1.id = su.department |
| | | LEFT JOIN sys_laboratory sl on sl.department = su.department |
| | | LEFT JOIN sys_laboratory_container slc on slc.laboratory_id = sl.id |
| | | |
| | | |
| | | |
| | | WHERE su.valid_flag = 1 |
| | | and sl.valid_flag = 1 |
| | | and slc.valid_flag = 1 |
| | | |
| | | </select> |
| | | |
| | | <update id="updateUserPointBySelective" parameterType="java.util.Map"> |
| | | update sys_user set point=#{point} |