| | |
| | | <resultMap type="com.ruoyi.common.core.domain.entity.SysUserDept" id="SysUserDeptResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="userId" column="user_id"/> |
| | | <result property="userCode" column="user_code"/> |
| | | <result property="deptId" column="dept_id"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="deptCode" column="dept_code"/> |
| | |
| | | |
| | | <select id="yhyjsxx" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserRoleResult"> |
| | | select user_id, role_id, orgid |
| | | FROM yhyjsxx |
| | | <where> |
| | | FROM healthy_user_role |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="hisUserId != null ">and user_id = #{hisUserId}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="yhyksxx" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserDeptResult"> |
| | | select user_id, user_code, dept_type,department_id as |
| | | dept_id,dept_name,deptparent,del_flag,orgid,create_time,create_by,update_time,update_by |
| | | FROM yhyksxx |
| | | <where> |
| | | user_id != 'admin' |
| | | <if test="hisUserId != null ">and user_id = #{hisUserId}</if> |
| | | </where> |
| | | select user_id , user_code , dept_type ,dept_code,dept_name,deptparent,del_flag,orgid |
| | | FROM healthy_user_dept |
| | | where 1=1 |
| | | and user_id != 'admin' |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="hisUserId != null ">and user_id = #{hisUserId}</if> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectPatArchiveList" parameterType="com.smartor.domain.PatArchive" resultMap="PatArchiveResult"> |
| | | <include refid="selectPatArchiveVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if> |
| | | <if test="idcardno != null and idcardno != ''">and idcardno = #{idcardno}</if> |
| | | <if test="sourcefrom != null ">and sourcefrom = #{sourcefrom}</if> |
| | |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="viptype != null ">and viptype = #{viptype}</if> |
| | | <if test="pattype != null ">and pattype = #{pattype}</if> |
| | | <if test="patientno != null ">and patientno = CAST(#{patientno} AS INTEGER)</if> |
| | | <if test="patientno != null ">and patientno = #{patientno} </if> |
| | | <if test="patidHis != null ">and patid_his = #{patidHis}</if> |
| | | <if test="sdFlag != null ">and sd_flag = #{sdFlag}</if> |
| | | <if test="ageUnit != null ">and age_unit = #{ageUnit}</if> |
| | |
| | | <if test="casePersonAge != null ">and case_person_age = #{casePersonAge}</if> |
| | | <if test="filterDrname != null ">and filter_drname = #{filterDrname}</if> |
| | | <if test="filterDrcode != null ">and filter_drcode = #{filterDrcode}</if> |
| | | </where> |
| | | <if test="lastStartTime != null and lastStartTime != ''"> |
| | | and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') >= #{lastStartTime} |
| | | </if> |
| | | <if test="lastEndTime != null and lastEndTime != ''"> |
| | | and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') <= #{lastEndTime} |
| | | </if> |
| | | <if test="pageSize != null and pageSize!='' ">and rownum<#{pageSize}</if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | |
| | |
| | | |
| | | FROM |
| | | healthy_inhosp b |
| | | <where> |
| | | |
| | | <if test="startOutHospTime != null ">and to_char(b.endtime,'YYMMDD') >= |
| | | to_char(#{startOutHospTime}::date,'YYMMDD') |
| | | where 1=1 |
| | | <if test="startOutHospTime != null "> |
| | | and to_char(b.endtime, 'YYYY-MM-DD HH24:MI:SS') >=to_char(#{startOutHospTime},'YYYY-MM-DD HH24:MI:SS') |
| | | </if> |
| | | <if test="endOutHospTime != null ">and to_char(b.endtime,'YYMMDD') <= |
| | | to_char(#{endOutHospTime}::date,'YYMMDD') |
| | | <if test="endOutHospTime != null "> |
| | | and to_char(b.endtime, 'YYYY-MM-DD HH24:MI:SS') <= to_char(#{endOutHospTime},'YYYY-MM-DD HH24:MI:SS') |
| | | </if> |
| | | <if test="startInHospTime != null ">and to_char(b.starttime,'YYMMDD') >= |
| | | to_char(#{startInHospTime}::date,'%y%m%d') |
| | | <if test="startInHospTime != null "> |
| | | and to_char(starttime, 'YYYY-MM-DD HH24:MI:SS') >= to_char(#{startInHospTime},'YYYY-MM-DD HH24:MI:SS') |
| | | </if> |
| | | <if test="endInHospTime != null ">and to_char(b.starttime,'YYMMDD') <= |
| | | to_char(#{endInHospTime}::date,'YYMMDD') |
| | | <if test="endInHospTime != null "> |
| | | and to_char(starttime, 'YYYY-MM-DD HH24:MI:SS') <=to_char(#{endInHospTime},'YYYY-MM-DD HH24:MI:SS') |
| | | </if> |
| | | <if test="inhospno != null ">and b.inhospno = #{inhospno}</if> |
| | | <if test="fuflag != null ">and b.fuflag = #{fuflag}</if> |
| | |
| | | <if test="outWayId != null ">and b.out_way_id = #{outWayId}</if> |
| | | <if test="outWayName != null ">and b.out_way_name = #{outWayName}</if> |
| | | <if test="orgid != null ">and b.orgid = #{orgid}</if> |
| | | </where> |
| | | <if test="lastStartTime != null and lastStartTime != ''"> |
| | | and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') >= #{lastStartTime} |
| | | </if> |
| | | <if test="lastEndTime != null and lastEndTime != ''"> |
| | | and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') <= #{lastEndTime} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | |
| | | patname, |
| | | mainsuit |
| | | from healthy_outhosp |
| | | <where> |
| | | |
| | | <if test="beginTime != null ">and to_char( admitdate,'YYMMDD') >= |
| | | to_char(#{beginTime}::date,'YYMMDD') |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="endTime != null ">and to_char( admitdate,'YYMMDD') <= |
| | | to_char(#{endTime}::date,'YYMMDD') |
| | | <if test="beginTime != null "> |
| | | and to_char(admitdate, 'YYYY-MM-DD HH24:MI:SS') >= to_char(#{beginTime}, 'YYYY-MM-DD HH24:MI:SS') |
| | | </if> |
| | | |
| | | </where> |
| | | <if test="endTime != null "> |
| | | and to_char(admitdate, 'YYYY-MM-DD HH24:MI:SS') <= to_char(#{endTime}, 'YYYY-MM-DD HH24:MI:SS') |
| | | </if> |
| | | <if test="lastStartTime != null and lastStartTime != ''"> |
| | | and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') >= #{lastStartTime} |
| | | </if> |
| | | <if test="lastEndTime != null and lastEndTime != ''"> |
| | | and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') <= #{lastEndTime} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | |
| | | icdname, |
| | | icdpym |
| | | from healthy_disease |
| | | <where> |
| | | where 1=1 |
| | | <if test="icdcode != null and icdcode != ''">and icdcode = #{icdcode}</if> |
| | | <if test="lastflag != null and lastflag != ''">and lastflag = #{lastflag}</if> |
| | | <if test="chimedflag != null and chimedflag != ''">and chimedflag = #{chimedflag}</if> |
| | |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | <if test="hisIcdid != null and hisIcdid != ''">and his_icdid = #{hisIcdid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | |
| | | u.nick_name, u.user_name, u.email,u.id_card, u.avatar, |
| | | u.birthday,u.orgid,u.job_phone,u.phonenumber, u.sex, u.status |
| | | from healthy_user u |
| | | <where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="userId != null and userId != 0"> |
| | | AND u.user_id = #{userId} |
| | | </if> |
| | |
| | | <if test="phonenumber != null and phonenumber != ''"> |
| | | AND u.phonenumber like concat('%', #{phonenumber}, '%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectDeptList" parameterType="com.ruoyi.common.core.domain.entity.SysDept" resultMap="SysDeptResult"> |
| | |
| | | d.email, |
| | | d.status, |
| | | d.his_dept_id, |
| | | d.orgid, |
| | | d.his_parent_id |
| | | FROM healthy_dept d |
| | | |