| | |
| | | <result property="inhospstate" column="inhospstate"/> |
| | | <result property="deptcheckFlag" column="deptcheck_flag"/> |
| | | <result property="wardcheckFlag" column="wardcheck_flag"/> |
| | | <result property="inDeptcheckFlag" column="in_deptcheck_flag"/> |
| | | <result property="inWardcheckFlag" column="in_wardcheck_flag"/> |
| | | <result property="diagcheckFlag" column="diagcheck_flag"/> |
| | | <result property="age" column="age"/> |
| | | <result property="sex" column="sex"/> |
| | |
| | | FROM healthy_user_dept |
| | | where 1=1 |
| | | and user_id != 'admin' |
| | | and dept_type = '1' |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="hisUserId != null ">and user_id = #{hisUserId}</if> |
| | | </select> |
| | | |
| | | <select id="yhybfxx" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserDeptResult"> |
| | | 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' |
| | | and dept_type = '2' |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | |
| | | <select id="yhyyqxx" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserOrgResult"> |
| | | select |
| | | d.orgid as campusid, |
| | | d.del_flag, |
| | | ud.user_id as user_id, |
| | | ud.orgid as orgid |
| | | FROM healthy_dept d |
| | |
| | | </if> |
| | | <if test="hisUserId != null "> |
| | | AND ud.user_id = #{hisUserId} |
| | | </if> |
| | | <if test="campusid != null"> |
| | | AND d.orgid = #{campusid} |
| | | </if> |
| | | union all |
| | | select |
| | | d.orgid as campusid, |
| | | udb.user_id as user_id, |
| | | udb.orgid as orgid |
| | | FROM healthy_dept d |
| | | JOIN healthy_user_dept_bf udb ON d.his_dept_id = udb.dept_code |
| | | where 1=1 |
| | | and udb.user_id != 'admin' |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND udb.orgid = #{orgid} |
| | | </if> |
| | | <if test="hisUserId != null "> |
| | | AND udb.user_id = #{hisUserId} |
| | | </if> |
| | | <if test="campusid != null"> |
| | | AND d.orgid = #{campusid} |
| | |
| | | <if test="filterDrname != null ">and filter_drname = #{filterDrname}</if> |
| | | <if test="filterDrcode != null ">and filter_drcode = #{filterDrcode}</if> |
| | | <if test="lastStartTime != null and lastStartTime != ''"> |
| | | and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') >= #{lastStartTime} |
| | | and last_Update_Time >= to_date(#{lastStartTime}, 'YYYY-MM-DD HH24:MI:SS') |
| | | </if> |
| | | <if test="lastEndTime != null and lastEndTime != ''"> |
| | | and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') <= #{lastEndTime} |
| | | and last_Update_Time <= to_date(#{lastEndTime}, 'YYYY-MM-DD HH24:MI:SS') |
| | | </if> |
| | | <if test="pageSize != null and pageSize!='' ">and rownum<#{pageSize}</if> |
| | | |
| | |
| | | healthy_inhosp b |
| | | 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') |
| | | and b.endtime >= #{startOutHospTime} |
| | | </if> |
| | | <if test="endOutHospTime != null "> |
| | | and to_char(b.endtime, 'YYYY-MM-DD HH24:MI:SS') <= to_char(#{endOutHospTime},'YYYY-MM-DD HH24:MI:SS') |
| | | and b.endtime <= #{endOutHospTime} |
| | | </if> |
| | | <if test="startInHospTime != null "> |
| | | and to_char(starttime, 'YYYY-MM-DD HH24:MI:SS') >= to_char(#{startInHospTime},'YYYY-MM-DD HH24:MI:SS') |
| | | and starttime >= #{startInHospTime} |
| | | </if> |
| | | <if test="endInHospTime != null "> |
| | | and to_char(starttime, 'YYYY-MM-DD HH24:MI:SS') <=to_char(#{endInHospTime},'YYYY-MM-DD HH24:MI:SS') |
| | | and starttime <= #{endInHospTime} |
| | | </if> |
| | | <if test="inhospno != null ">and b.inhospno = #{inhospno}</if> |
| | | <if test="fuflag != null ">and b.fuflag = #{fuflag}</if> |
| | |
| | | <if test="outWayName != null ">and b.out_way_name = #{outWayName}</if> |
| | | <if test="orgid != null ">and b.orgid = #{orgid}</if> |
| | | <if test="lastStartTime != null and lastStartTime != ''"> |
| | | and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') >= #{lastStartTime} |
| | | and last_Update_Time >= to_date(#{lastStartTime}, 'YYYY-MM-DD HH24:MI:SS') |
| | | </if> |
| | | <if test="lastEndTime != null and lastEndTime != ''"> |
| | | and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') <= #{lastEndTime} |
| | | and last_Update_Time <= to_date(#{lastEndTime}, 'YYYY-MM-DD HH24:MI:SS') |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | | </mapper> |