From 5389773b2d1ae86daec68b00f67c3682dc907e01 Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期五, 22 十一月 2024 14:35:48 +0800 Subject: [PATCH] 代码提交(长期任务电话完成) --- smartor/src/main/resources/mapper/smartor/PatArchiveImportMapper.xml | 65 ++++++++++++++++++++++++++++++++ 1 files changed, 65 insertions(+), 0 deletions(-) diff --git a/smartor/src/main/resources/mapper/smartor/PatArchiveImportMapper.xml b/smartor/src/main/resources/mapper/smartor/PatArchiveImportMapper.xml index df9a877..13392f0 100644 --- a/smartor/src/main/resources/mapper/smartor/PatArchiveImportMapper.xml +++ b/smartor/src/main/resources/mapper/smartor/PatArchiveImportMapper.xml @@ -22,6 +22,10 @@ <result property="batchName" column="batch_name"/> <result property="batchNo" column="batch_no"/> </resultMap> + <resultMap type="com.ruoyi.common.core.domain.entity.SysUser" id="SysUserResult"> + <id property="userId" column="user_id"/> + <result property="userName" column="user_name"/> + </resultMap> <sql id="selectPatArchiveImportVo"> select id, @@ -47,6 +51,7 @@ resultMap="PatArchiveImportResult"> <include refid="selectPatArchiveImportVo"/> <where> + del_flag=0 <if test="patientno != null and patientno != ''"> and patientno = #{patientno} </if> @@ -78,6 +83,7 @@ and batch_no = #{batchNo} </if> </where> + ORDER BY create_time desc </select> <select id="selectPatArchiveImportById" parameterType="Long" @@ -226,5 +232,64 @@ </foreach> </update> + <select id="checkUserExist" parameterType="String" resultMap="SysUserResult"> + select user_id, user_name + from sys_user + where id_card = #{idCard} + and del_flag = '0' + </select> + + <insert id="insertUser" parameterType="com.ruoyi.common.core.domain.entity.SysUser" useGeneratedKeys="true" + keyProperty="userId"> + insert into sys_user( + <if test="userId != null and userId != 0">user_id,</if> + <if test="deptId != null and deptId != 0">dept_id,</if> + <if test="userName != null and userName != ''">user_name,</if> + <if test="nickName != null and nickName != ''">nick_name,</if> + <if test="email != null and email != ''">email,</if> + <if test="avatar != null and avatar != ''">avatar,</if> + <if test="phonenumber != null and phonenumber != ''">phonenumber,</if> + <if test="sex != null and sex != ''">sex,</if> + <if test="password != null and password != ''">password,</if> + <if test="status != null and status != ''">status,</if> + <if test="createBy != null and createBy != ''">create_by,</if> + <if test="remark != null and remark != ''">remark,</if> + <if test="userType != null and userType != ''">user_type,</if> + <if test="deptInfo != null and deptInfo != ''">dept_info,</if> + <if test="hospInfo != null and hospInfo != ''">hosp_info,</if> + <if test="searchscope != null and searchscope != ''">searchscope,</if> + <if test="idCard != null and idCard != ''">id_card,</if> + create_time + )values( + <if test="userId != null and userId != ''">#{userId},</if> + <if test="deptId != null and deptId != ''">#{deptId},</if> + <if test="userName != null and userName != ''">#{userName},</if> + <if test="nickName != null and nickName != ''">#{nickName},</if> + <if test="email != null and email != ''">#{email},</if> + <if test="avatar != null and avatar != ''">#{avatar},</if> + <if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if> + <if test="sex != null and sex != ''">#{sex},</if> + <if test="password != null and password != ''">#{password},</if> + <if test="status != null and status != ''">#{status},</if> + <if test="createBy != null and createBy != ''">#{createBy},</if> + <if test="remark != null and remark != ''">#{remark},</if> + <if test="userType != null and userType != ''">#{userType},</if> + <if test="deptInfo != null and deptInfo != ''">#{deptInfo},</if> + <if test="hospInfo != null and hospInfo != ''">#{hospInfo},</if> + <if test="searchscope != null and searchscope != ''">#{searchscope},</if> + <if test="idCard != null and idCard != ''">#{idCard},</if> + sysdate() + ) + </insert> + + <insert id="insertUserRole" parameterType="com.ruoyi.common.core.domain.entity.SysUserRole"> + insert into sys_user_role( + <if test="roleId != null ">role_id,</if> + <if test="userId != null ">user_id</if> + )values( + <if test="roleId != null ">#{roleId},</if> + <if test="userId != null">#{userId}</if> + ) + </insert> </mapper> -- Gitblit v1.9.3