Merge branch 'master-where标签替换'
| | |
| | | <remote-repository> |
| | | <option name="id" value="central" /> |
| | | <option name="name" value="Central Repository" /> |
| | | <option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" /> |
| | | <option name="url" value="https://repo.maven.apache.org/maven2" /> |
| | | </remote-repository> |
| | | <remote-repository> |
| | | <option name="id" value="central" /> |
| | | <option name="name" value="Central Repository" /> |
| | | <option name="url" value="https://repo.maven.apache.org/maven2" /> |
| | | <option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" /> |
| | | </remote-repository> |
| | | <remote-repository> |
| | | <option name="id" value="releases" /> |
| | |
| | | <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" /> |
| | | </remote-repository> |
| | | </component> |
| | | </project> |
| | | </project> |
| | |
| | | <module fileurl="file://$PROJECT_DIR$/ruoyi-admin/ruoyi-admin.iml" filepath="$PROJECT_DIR$/ruoyi-admin/ruoyi-admin.iml" /> |
| | | </modules> |
| | | </component> |
| | | </project> |
| | | </project> |
| | |
| | | |
| | | <select id="selectGenTableList" parameterType="GenTable" resultMap="GenTableResult"> |
| | | <include refid="selectGenTableVo"/> |
| | | <where> |
| | | <if test="tableName != null and tableName != ''"> |
| | | AND lower(table_name) like lower(concat('%', #{tableName}, '%')) |
| | | </if> |
| | | <if test="tableComment != null and tableComment != ''"> |
| | | AND lower(table_comment) like lower(concat('%', #{tableComment}, '%')) |
| | | </if> |
| | | <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
| | | AND date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') |
| | | </if> |
| | | <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
| | | AND date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') |
| | | </if> |
| | | </where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="tableName != null and tableName != ''"> |
| | | AND lower(table_name) like lower(concat('%', #{tableName}, '%')) |
| | | </if> |
| | | <if test="tableComment != null and tableComment != ''"> |
| | | AND lower(table_comment) like lower(concat('%', #{tableComment}, '%')) |
| | | </if> |
| | | <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
| | | AND date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') |
| | | </if> |
| | | <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
| | | AND date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectDbTableList" parameterType="GenTable" resultMap="GenTableResult"> |
| | |
| | | <select id="select${ClassName}List" parameterType="${packageName}.domain.${ClassName}" |
| | | resultMap="${ClassName}Result"> |
| | | <include refid="select${ClassName}Vo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag=0 |
| | | #foreach($column in $columns) |
| | | #set($queryType=$column.queryType) |
| | | #set($javaField=$column.javaField) |
| | |
| | | #end |
| | | #end |
| | | #end |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="select${ClassName}By${pkColumn.capJavaField}" parameterType="${pkColumn.javaType}" |
| | |
| | | <select id="yhyjsxx" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserRoleResult"> |
| | | select user_id, role_id, orgid |
| | | FROM healthy_user_role |
| | | <where> |
| | | 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 ,dept_code,dept_name,deptparent,del_flag,orgid |
| | | FROM healthy_user_dept |
| | | <where> |
| | | user_id != 'admin' |
| | | <if test="hisUserId != null ">and user_id = #{hisUserId}</if> |
| | | </where> |
| | | 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="pageSize != null and pageSize!='' ">and rownum<#{pageSize}</if> |
| | | |
| | | |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | |
| | | |
| | | FROM |
| | | healthy_inhosp b |
| | | <where> |
| | | |
| | | 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="lastEndTime != null and lastEndTime != ''"> |
| | | and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') <= #{lastEndTime} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | |
| | | patname, |
| | | mainsuit |
| | | from healthy_outhosp |
| | | <where> |
| | | |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="beginTime != null "> |
| | | and to_char(admitdate, 'YYYY-MM-DD HH24:MI:SS') >= to_char(#{beginTime}, '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} |
| | | </if> |
| | | </where> |
| | | </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"> |
| | |
| | | |
| | | <select id="selectJobLogList" parameterType="com.ruoyi.quartz.domain.SysJobLog" resultMap="SysJobLogResult"> |
| | | <include refid="selectJobLogVo"/> |
| | | <where> |
| | | <if test="jobName != null and jobName != ''"> |
| | | AND job_name like concat('%', #{jobName}, '%') |
| | | </if> |
| | | <if test="jobGroup != null and jobGroup != ''"> |
| | | AND job_group = #{jobGroup} |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | AND status = #{status} |
| | | </if> |
| | | <if test="invokeTarget != null and invokeTarget != ''"> |
| | | AND invoke_target like concat('%', #{invokeTarget}, '%') |
| | | </if> |
| | | <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
| | | and date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') |
| | | </if> |
| | | <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
| | | and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') |
| | | </if> |
| | | </where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="jobName != null and jobName != ''"> |
| | | AND job_name like concat('%', #{jobName}, '%') |
| | | </if> |
| | | <if test="jobGroup != null and jobGroup != ''"> |
| | | AND job_group = #{jobGroup} |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | AND status = #{status} |
| | | </if> |
| | | <if test="invokeTarget != null and invokeTarget != ''"> |
| | | AND invoke_target like concat('%', #{invokeTarget}, '%') |
| | | </if> |
| | | <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
| | | and date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') |
| | | </if> |
| | | <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
| | | and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectJobLogAll" resultMap="SysJobLogResult"> |
| | |
| | | |
| | | <select id="selectJobList" parameterType="SysJob" resultMap="SysJobResult"> |
| | | <include refid="selectJobVo"/> |
| | | <where> |
| | | <if test="jobName != null and jobName != ''"> |
| | | AND job_name like concat('%', #{jobName}, '%') |
| | | </if> |
| | | <if test="jobGroup != null and jobGroup != ''"> |
| | | AND job_group = #{jobGroup} |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | AND status = #{status} |
| | | </if> |
| | | <if test="invokeTarget != null and invokeTarget != ''"> |
| | | AND invoke_target like concat('%', #{invokeTarget}, '%') |
| | | </if> |
| | | </where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="jobName != null and jobName != ''"> |
| | | AND job_name like concat('%', #{jobName}, '%') |
| | | </if> |
| | | <if test="jobGroup != null and jobGroup != ''"> |
| | | AND job_group = #{jobGroup} |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | AND status = #{status} |
| | | </if> |
| | | <if test="invokeTarget != null and invokeTarget != ''"> |
| | | AND invoke_target like concat('%', #{invokeTarget}, '%') |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectJobAll" resultMap="SysJobResult"> |
| | |
| | | <select id="selectBaseUserInfoList" parameterType="com.ruoyi.system.domain.BaseUserInfo" |
| | | resultMap="BaseUserInfoResult"> |
| | | <include refid="selectBaseUserInfoVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="usercode != null and usercode != ''">and usercode = #{usercode}</if> |
| | | <if test="account != null and account != ''">and account = #{account}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="deptpermission != null and deptpermission != ''">and deptpermission = #{deptpermission}</if> |
| | | <if test="wardpermission != null and wardpermission != ''">and wardpermission = #{wardpermission}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectBaseUserInfoByUserid" parameterType="Long" resultMap="BaseUserInfoResult"> |
| | |
| | | |
| | | <select id="selectEquipmentinfoList" parameterType="Equipmentinfo" resultMap="EquipmentinfoResult"> |
| | | <include refid="selectEquipmentinfoVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="devtype != null "> and devtype = #{devtype}</if> |
| | | <if test="equipmentname != null and equipmentname != ''"> and equipmentname like concat('%', #{equipmentname}, '%')</if> |
| | | <if test="modnum != null and modnum != ''"> and modnum = #{modnum}</if> |
| | |
| | | <if test="storePlace != null and storePlace != ''"> and storePlace = #{storePlace}</if> |
| | | <if test="technData != null and technData != ''"> and technData = #{technData}</if> |
| | | <if test="statusid != null "> and statusid = #{statusid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectEquipmentinfoById" parameterType="Long" resultMap="EquipmentinfoResult"> |
| | |
| | | |
| | | <select id="selectSmsParamList" parameterType="SmsParam" resultMap="SmsParamResult"> |
| | | <include refid="selectSmsParamVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="paramname != null and paramname != ''"> and paramname like concat('%', #{paramname}, '%')</if> |
| | | <if test="paramval != null and paramval != ''"> and paramval = #{paramval}</if> |
| | | <if test="descirbe != null and descirbe != ''"> and descirbe = #{descirbe}</if> |
| | |
| | | <if test="isupload != null "> and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> |
| | | <if test="orgid != null "> and orgid = #{orgid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSmsParamByParamid" parameterType="Long" resultMap="SmsParamResult"> |
| | |
| | | |
| | | <select id="selectSmsRecordsList" parameterType="com.ruoyi.system.domain.SmsRecords" resultMap="SmsRecordsResult"> |
| | | <include refid="selectSmsRecordsVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="userid != null and userid != ''">and userid = #{userid}</if> |
| | | <if test="username != null and username != ''">and username like concat('%', #{username}, '%')</if> |
| | | <if test="phone != null and phone != ''">and phone = #{phone}</if> |
| | |
| | | <if test="visitTime != null ">and date_format(visit_time,'%y%m%d') = |
| | | date_format(#{visitTime},'%y%m%d') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSmsRecordsByRecordid" parameterType="Long" resultMap="SmsRecordsResult"> |
| | |
| | | |
| | | <select id="selectSmsTempletList" parameterType="SmsTemplet" resultMap="SmsTempletResult"> |
| | | <include refid="selectSmsTempletVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="templetno != null and templetno != ''"> and templetno = #{templetno}</if> |
| | | <if test="templetname != null and templetname != ''"> and templetname like concat('%', #{templetname}, '%')</if> |
| | | <if test="templetcontent != null and templetcontent != ''"> and templetcontent = #{templetcontent}</if> |
| | | <if test="isupload != null "> and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSmsTempletByTempletid" parameterType="Long" resultMap="SmsTempletResult"> |
| | |
| | | |
| | | <!-- 查询条件 --> |
| | | <sql id="sqlwhereSearch"> |
| | | <where> |
| | | where 1=1 |
| | | <if test="configId !=null"> |
| | | and config_id = #{configId} |
| | | </if> |
| | |
| | | <if test="orgid !=null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | </where> |
| | | </sql> |
| | | |
| | | <select id="selectConfig" parameterType="SysConfig" resultMap="SysConfigResult"> |
| | |
| | | |
| | | <select id="selectConfigList" parameterType="SysConfig" resultMap="SysConfigResult"> |
| | | <include refid="selectConfigVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="configName != null and configName != ''"> |
| | | AND config_name like concat('%', #{configName}, '%') |
| | | </if> |
| | |
| | | <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
| | | and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectConfigById" parameterType="Long" resultMap="SysConfigResult"> |
| | |
| | | |
| | | <select id="selectDictDataList" parameterType="SysDictData" resultMap="SysDictDataResult"> |
| | | <include refid="selectDictDataVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="dictType != null and dictType != ''"> |
| | | AND dict_type = #{dictType} |
| | | </if> |
| | |
| | | </if> |
| | | <if test="guid != null and guid != ''"> |
| | | AND guid = #{guid} |
| | | </if> <if test="orgid != null and orgid != ''"> |
| | | </if> |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | </where> |
| | | order by dict_sort asc |
| | | </select> |
| | | |
| | |
| | | |
| | | <select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult"> |
| | | <include refid="selectDictTypeVo"/> |
| | | <where> |
| | | <if test="dictName != null and dictName != ''"> |
| | | AND dict_name like concat('%', #{dictName}, '%') |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | AND status = #{status} |
| | | </if> |
| | | <if test="dictType != null and dictType != ''"> |
| | | AND dict_type like concat('%', #{dictType}, '%') |
| | | </if> |
| | | <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
| | | and date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') |
| | | </if> |
| | | <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
| | | and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') |
| | | </if> |
| | | </where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="dictName != null and dictName != ''"> |
| | | AND dict_name like concat('%', #{dictName}, '%') |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | AND status = #{status} |
| | | </if> |
| | | <if test="dictType != null and dictType != ''"> |
| | | AND dict_type like concat('%', #{dictType}, '%') |
| | | </if> |
| | | <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
| | | and date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') |
| | | </if> |
| | | <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
| | | and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectDictTypeAll" resultMap="SysDictTypeResult"> |
| | |
| | | |
| | | <select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult"> |
| | | select info_id, user_name, ipaddr, login_location, browser, os, status, msg, login_time from sys_logininfor |
| | | <where> |
| | | <if test="ipaddr != null and ipaddr != ''"> |
| | | AND ipaddr like concat('%', #{ipaddr}, '%') |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | AND status = #{status} |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | AND user_name like concat('%', #{userName}, '%') |
| | | </if> |
| | | <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
| | | and date_format(login_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') |
| | | </if> |
| | | <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
| | | and date_format(login_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') |
| | | </if> |
| | | </where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="ipaddr != null and ipaddr != ''"> |
| | | AND ipaddr like concat('%', #{ipaddr}, '%') |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | AND status = #{status} |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | AND user_name like concat('%', #{userName}, '%') |
| | | </if> |
| | | <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
| | | and date_format(login_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') |
| | | </if> |
| | | <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
| | | and date_format(login_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') |
| | | </if> |
| | | order by info_id desc |
| | | </select> |
| | | |
| | |
| | | |
| | | <select id="selectMenuList" parameterType="SysMenu" resultMap="SysMenuResult"> |
| | | <include refid="selectMenuVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="menuName != null and menuName != ''"> |
| | | AND menu_name like concat('%', #{menuName}, '%') |
| | | </if> |
| | |
| | | <if test="status != null and status != ''"> |
| | | AND status = #{status} |
| | | </if> |
| | | </where> |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | order by parent_id, order_num |
| | | </select> |
| | | |
| | |
| | | |
| | | <select id="selectNoticeList" parameterType="SysNotice" resultMap="SysNoticeResult"> |
| | | <include refid="selectNoticeVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="noticeTitle != null and noticeTitle != ''"> |
| | | AND notice_title like concat('%', #{noticeTitle}, '%') |
| | | </if> |
| | |
| | | <if test="createBy != null and createBy != ''"> |
| | | AND create_by like concat('%', #{createBy}, '%') |
| | | </if> |
| | | <if test="orgid != null and orgid != ''"> |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <insert id="insertNotice" parameterType="SysNotice"> |
| | |
| | | |
| | | <select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult"> |
| | | <include refid="selectOperLogVo"/> |
| | | <where> |
| | | <if test="title != null and title != ''"> |
| | | AND title like concat('%', #{title}, '%') |
| | | </if> |
| | | <if test="businessType != null"> |
| | | AND business_type = #{businessType} |
| | | </if> |
| | | <if test="businessTypes != null and businessTypes.length > 0"> |
| | | AND business_type in |
| | | <foreach collection="businessTypes" item="businessType" open="(" separator="," close=")"> |
| | | #{businessType} |
| | | </foreach> |
| | | </if> |
| | | <if test="status != null"> |
| | | AND status = #{status} |
| | | </if> |
| | | <if test="operName != null and operName != ''"> |
| | | AND oper_name like concat('%', #{operName}, '%') |
| | | </if> |
| | | <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
| | | and date_format(oper_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') |
| | | </if> |
| | | <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
| | | and date_format(oper_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') |
| | | </if> |
| | | </where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="title != null and title != ''"> |
| | | AND title like concat('%', #{title}, '%') |
| | | </if> |
| | | <if test="businessType != null"> |
| | | AND business_type = #{businessType} |
| | | </if> |
| | | <if test="businessTypes != null and businessTypes.length > 0"> |
| | | AND business_type in |
| | | <foreach collection="businessTypes" item="businessType" open="(" separator="," close=")"> |
| | | #{businessType} |
| | | </foreach> |
| | | </if> |
| | | <if test="status != null"> |
| | | AND status = #{status} |
| | | </if> |
| | | <if test="operName != null and operName != ''"> |
| | | AND oper_name like concat('%', #{operName}, '%') |
| | | </if> |
| | | <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
| | | and date_format(oper_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') |
| | | </if> |
| | | <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
| | | and date_format(oper_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') |
| | | </if> |
| | | order by oper_id desc |
| | | </select> |
| | | |
| | |
| | | |
| | | <select id="selectPostList" parameterType="com.ruoyi.system.domain.SysPost" resultMap="SysPostResult"> |
| | | <include refid="selectPostVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="postCode != null and postCode != ''"> |
| | | AND post_code like concat('%', #{postCode}, '%') |
| | | </if> |
| | |
| | | <if test="postName != null and postName != ''"> |
| | | AND post_name like concat('%', #{postName}, '%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPostAll" resultMap="SysPostResult"> |
| | |
| | | |
| | | <select id="selectUserByUserNameByCondition" parameterType="String" resultMap="SysUserResult"> |
| | | <include refid="selectUserVo"/> |
| | | <where> |
| | | u.del_flag = '0' |
| | | where 1=1 |
| | | AND u.del_flag = '0' |
| | | <if test="userName != null and userName != ''"> |
| | | AND u.user_name = #{userName} |
| | | </if> |
| | | <if test="deptId != null and deptId != ''"> |
| | | AND u.dept_id = #{deptId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectUserById" parameterType="Long" resultMap="SysUserResult"> |
| | |
| | | <select id="selectBaseDictOperationList" parameterType="com.smartor.domain.BaseDictOperation" |
| | | resultMap="BaseDictOperationResult"> |
| | | <include refid="selectBaseDictOperationVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="opid != null "> |
| | | and opid = #{opid} |
| | | </if> |
| | |
| | | <if test="pid != null "> |
| | | and pid = #{pid} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectBaseDictOperationById" parameterType="Long" |
| | |
| | | <select id="selectBaseOrganizationList" parameterType="com.smartor.domain.BaseOrganization" |
| | | resultMap="BaseOrganizationResult"> |
| | | <include refid="selectBaseOrganizationVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="OrganizationName != null and OrganizationName != ''"> |
| | | and OrganizationName like concat('%', #{OrganizationName}, '%') |
| | | </if> |
| | |
| | | <if test="orgid != null "> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectBaseOrganizationByID" parameterType="Long" |
| | |
| | | |
| | | <select id="selectBaseSmsaccountList" parameterType="BaseSmsaccount" resultMap="BaseSmsaccountResult"> |
| | | <include refid="selectBaseSmsaccountVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="smsname != null and smsname != ''">and smsname like concat('%', #{smsname}, '%')</if> |
| | | <if test="account != null and account != ''">and account = #{account}</if> |
| | | <if test="password != null and password != ''">and password = #{password}</if> |
| | |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="isenable != null ">and isenable = #{isenable}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectBaseSmsaccountBySmsacountid" parameterType="Long" resultMap="BaseSmsaccountResult"> |
| | |
| | | |
| | | <select id="selectBaseTagList" parameterType="com.smartor.domain.BaseTag" resultMap="BaseTagResult"> |
| | | <include refid="selectBaseTagVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="tagcategoryid != null ">and tagcategoryid = #{tagcategoryid}</if> |
| | | <if test="tagname != null and tagname != ''">and tagname like concat('%', #{tagname}, '%')</if> |
| | | <if test="tagdescription != null and tagdescription != ''">and tagdescription = #{tagdescription}</if> |
| | |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="isenable != null ">and isenable = #{isenable}</if> |
| | | </where> |
| | | </select> |
| | | <select id="selectBaseTagListByTagname" parameterType="com.smartor.domain.BaseTag" resultMap="BaseTagResult"> |
| | | <include refid="selectBaseTagVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="tagcategoryid != null ">and tagcategoryid = #{tagcategoryid}</if> |
| | | <if test="tagname != null and tagname != ''">and tagname =#{tagname}</if> |
| | | <if test="tagdescription != null and tagdescription != ''">and tagdescription = #{tagdescription}</if> |
| | |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="isenable != null ">and isenable = #{isenable}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectBaseTagByTagid" parameterType="Long" resultMap="BaseTagResult"> |
| | |
| | | <select id="selectBaseTagcategoryList" parameterType="com.smartor.domain.BaseTagcategory" |
| | | resultMap="BaseTagcategoryResult"> |
| | | <include refid="selectBaseTagcategoryVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="pym != null and pym != ''">and pym = #{pym}</if> |
| | | <if test="wbm != null and wbm != ''">and wbm = #{wbm}</if> |
| | |
| | | <if test="categoryname != null and categoryname != ''">and categoryname like concat('%', #{categoryname}, |
| | | '%') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectBaseTagcategoryByTagcategoryid" parameterType="Long" resultMap="BaseTagcategoryResult"> |
| | |
| | | count(b.tagid) as tagNum |
| | | from base_tagcategory a left join base_tag b |
| | | on a.tagcategoryid = b.tagcategoryid |
| | | <where> |
| | | <if test="categoryname != null and categoryname != ''">a.categoryname like concat('%', #{categoryname}, |
| | | '%') |
| | | </if> |
| | | </where> |
| | | where 1=1 |
| | | <if test="categoryname != null and categoryname != ''"> |
| | | and a.categoryname like concat('%', #{categoryname}, |
| | | '%') |
| | | </if> |
| | | <if test="orgid != null and orgid != ''"> |
| | | and a.orgid = #{orgid} |
| | | </if> |
| | | GROUP BY a.tagcategoryid,a.categoryname |
| | | </select> |
| | | </mapper> |
| | |
| | | <select id="yhyjsxx" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserRoleResult"> |
| | | select user_id, role_id, orgid |
| | | FROM yhyjsxx |
| | | <where> |
| | | <if test="hisUserId != null ">and user_id = #{hisUserId}</if> |
| | | </where> |
| | | where 1=1 |
| | | <if test="hisUserId != null "> |
| | | and user_id = #{hisUserId} |
| | | </if> |
| | | </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' |
| | | where 1=1 |
| | | and user_id != 'admin' |
| | | <if test="hisUserId != null ">and user_id = #{hisUserId}</if> |
| | | </where> |
| | | </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="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> |
| | | </select> |
| | | |
| | | |
| | |
| | | b.fuadvice |
| | | FROM |
| | | cryxx b |
| | | <where> |
| | | |
| | | where 1=1 |
| | | <if test="startOutHospTime != null ">and to_char(b.endtime,'YYMMDD') >= |
| | | to_char(#{startOutHospTime}::date,'YYMMDD') |
| | | </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> |
| | | </select> |
| | | |
| | | |
| | |
| | | patname, |
| | | mainsuit |
| | | from mzxx |
| | | <where> |
| | | |
| | | where 1=1 |
| | | <if test="beginTime != null ">and to_char( admitdate,'YYMMDD') >= |
| | | to_char(#{beginTime}::date,'YYMMDD') |
| | | </if> |
| | |
| | | to_char(#{endTime}::date,'YYMMDD') |
| | | </if> |
| | | |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | |
| | | icdname, |
| | | icdpym |
| | | from jbxx |
| | | <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.birthday,u.orgid,u.job_phone,u.phonenumber, u.sex, u.status, |
| | | u.login_ip, u.login_date, u.create_by, u.create_time, u.remark |
| | | from ryxx u |
| | | <where> |
| | | where 1=1 |
| | | <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"> |
| | |
| | | |
| | | <select id="selectHeCategoryList" parameterType="com.smartor.domain.HeCategory" resultMap="HeCategoryResult"> |
| | | <include refid="selectHeCategoryVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="categoryname != null and categoryname != ''">and categoryname like concat('%', #{categoryname}, |
| | | '%') |
| | | </if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="id != null">and id = #{id}</if> |
| | | <if test="pid != null">and pid = #{pid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectHeCategoryById" parameterType="Long" resultMap="HeCategoryResult"> |
| | |
| | | <select id="selectHeLibraryAssortList" parameterType="com.smartor.domain.HeLibraryAssort" |
| | | resultMap="HeLibraryAssortResult"> |
| | | <include refid="selectHeLibraryAssortVo"/> |
| | | <where> |
| | | del_flag != 1 |
| | | where 1=1 |
| | | and del_flag != 1 |
| | | <if test="assortname != null and assortname != ''">and assortname like concat('%', #{assortname}, '%')</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | |
| | | <if test="seqno != null ">and seqno = #{seqno}</if> |
| | | <if test="hetype != null ">and hetype = #{hetype}</if> |
| | | |
| | | </where> |
| | | order by seqno asc |
| | | </select> |
| | | |
| | |
| | | |
| | | <select id="selectHeLibraryList" parameterType="com.smartor.domain.HeLibrary" resultMap="HeLibraryResult"> |
| | | <include refid="selectHeLibraryVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="id != null ">and id = #{id}</if> |
| | | <if test="classification != null and classification != ''">and classification = #{classification}</if> |
| | | <if test="assortid != null ">and assortid = #{assortid}</if> |
| | |
| | | <if test="richText != null and richText != ''">and rich_text = #{richText}</if> |
| | | <if test="hetype != null and hetype != ''">and hetype = #{hetype}</if> |
| | | <if test="htmlRichText != null and htmlRichText != ''">and html_rich_text = #{htmlRichText}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectHeLibraryById" parameterType="Long" resultMap="HeLibraryResult"> |
| | |
| | | |
| | | <select id="selectHeLibraryTagList" parameterType="com.smartor.domain.HeLibraryTag" resultMap="HeLibraryTagResult"> |
| | | <include refid="selectHeLibraryTagVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="tagcategoryid != null ">and tagcategoryid = #{tagcategoryid}</if> |
| | | <if test="tagid != null ">and tagid = #{tagid}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | <if test="tagname != null and tagname != ''">and tagname = #{tagname}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectHeLibraryTagById" parameterType="Long" resultMap="HeLibraryTagResult"> |
| | |
| | | <select id="selectHeLocallibraryList" parameterType="com.smartor.domain.HeLocallibrary" |
| | | resultMap="HeLocallibraryResult"> |
| | | <include refid="selectHeLocallibraryVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="preachcategoryid != null ">and preachcategoryid = #{preachcategoryid}</if> |
| | | <if test="preachname != null and preachname != ''">and preachname like concat('%', #{preachname}, '%')</if> |
| | | <if test="version != null ">and version = #{version}</if> |
| | |
| | | <if test="centerlibrarycode != null and centerlibrarycode != ''">and centerlibrarycode = |
| | | #{centerlibrarycode} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectHeLocallibraryById" parameterType="Long" resultMap="HeLocallibraryResult"> |
| | |
| | | <select id="selectHospitalRecordList" parameterType="com.smartor.domain.HospitalRecord" |
| | | resultMap="HospitalRecordResult"> |
| | | <include refid="selectHospitalRecordVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="ID != null and ID != ''">and ID = #{ID}</if> |
| | | <if test="sourceSystem != null and sourceSystem != ''">and SourceSystem = #{sourceSystem}</if> |
| | | <if test="messageID != null and messageID != ''">and MessageID = #{messageID}</if> |
| | |
| | | </if> |
| | | <if test="taskStatus != null and taskStatus != ''">and taskStatus = #{taskStatus}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectHospitalRecordByID" parameterType="String" resultMap="HospitalRecordResult"> |
| | |
| | | |
| | | <select id="selectHospitalUserinfoList" parameterType="HospitalUserinfo" resultMap="HospitalUserinfoResult"> |
| | | <include refid="selectHospitalUserinfoVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="SourceSystem != null and SourceSystem != ''">and SourceSystem = #{SourceSystem}</if> |
| | | <if test="MessageID != null and MessageID != ''">and MessageID = #{MessageID}</if> |
| | | <if test="CreateTime != null and CreateTime != ''">and CreateTime = #{CreateTime}</if> |
| | |
| | | <if test="Bednur != null and Bednur != ''">and Bednur = #{Bednur}</if> |
| | | <if test="Regdoc != null and Regdoc != ''">and Regdoc = #{Regdoc}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectHospitalUserinfoByID" parameterType="Long" resultMap="HospitalUserinfoResult"> |
| | |
| | | <select id="selectIcd10AssociationList" parameterType="com.smartor.domain.Icd10Association" |
| | | resultMap="Icd10AssociationResult"> |
| | | <include refid="selectIcd10AssociationVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="icd10id != null ">and icd10id = #{icd10id}</if> |
| | | <if test="icd10code != null and icd10code != ''">and icd10code = #{icd10code}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | |
| | | </if> |
| | | <if test="outpatientUseAssort != null">and outpatient_use_assort = #{outpatientUseAssort}</if> |
| | | <if test="inpatientUseAssort != null">and inpatient_use_assort = #{inpatientUseAssort}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIcd10AssociationById" parameterType="Long" resultMap="Icd10AssociationResult"> |
| | |
| | | |
| | | <select id="selectIcd10List" parameterType="com.smartor.domain.Icd10" resultMap="Icd10Result"> |
| | | <include refid="selectIcd10Vo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <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> |
| | | |
| | | <select id="selectIcd10ByIcdid" parameterType="Long" resultMap="Icd10Result"> |
| | |
| | | |
| | | <select id="selectIvrLibIntentList" parameterType="IvrLibIntent" resultMap="IvrLibIntentResult"> |
| | | <include refid="selectIvrLibIntentVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="intentionname != null and intentionname != ''"> and intentionname like concat('%', #{intentionname}, '%')</if> |
| | | <if test="categoryid != null "> and categoryid = #{categoryid}</if> |
| | |
| | | <if test="intentionword != null and intentionword != ''"> and intentionword = #{intentionword}</if> |
| | | <if test="isupload != null "> and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrLibIntentByIntentid" parameterType="Long" resultMap="IvrLibIntentResult"> |
| | |
| | | |
| | | <select id="selectIvrLibIntentcategoryList" parameterType="IvrLibIntentcategory" resultMap="IvrLibIntentcategoryResult"> |
| | | <include refid="selectIvrLibIntentcategoryVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="categoryname != null and categoryname != ''"> and categoryname like concat('%', #{categoryname}, '%')</if> |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="isupload != null "> and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrLibIntentcategoryByIntertcatid" parameterType="Long" resultMap="IvrLibIntentcategoryResult"> |
| | |
| | | |
| | | <select id="selectIvrLibScriptList" parameterType="IvrLibScript" resultMap="IvrLibScriptResult"> |
| | | <include refid="selectIvrLibScriptVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="categoryid != null "> and categoryid = #{categoryid}</if> |
| | | <if test="categoryname != null and categoryname != ''"> and categoryname like concat('%', #{categoryname}, '%')</if> |
| | |
| | | <if test="speakname != null and speakname != ''"> and speakname like concat('%', #{speakname}, '%')</if> |
| | | <if test="isupload != null "> and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrLibScriptByScriptid" parameterType="Long" resultMap="IvrLibScriptResult"> |
| | |
| | | |
| | | <select id="selectIvrLibScriptcategoryList" parameterType="IvrLibScriptcategory" resultMap="IvrLibScriptcategoryResult"> |
| | | <include refid="selectIvrLibScriptcategoryVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="categoryname != null and categoryname != ''"> and categoryname like concat('%', #{categoryname}, '%')</if> |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="isupload != null "> and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrLibScriptcategoryByCategoryid" parameterType="Long" resultMap="IvrLibScriptcategoryResult"> |
| | |
| | | |
| | | <select id="selectIvrLibScriptmodelList" parameterType="IvrLibScriptmodel" resultMap="IvrLibScriptmodelResult"> |
| | | <include refid="selectIvrLibScriptmodelVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="scriptid != null "> and scriptid = #{scriptid}</if> |
| | | <if test="speaktype != null "> and speaktype = #{speaktype}</if> |
| | |
| | | <if test="isupload != null "> and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> |
| | | <if test="speakvariable != null and speakvariable != ''"> and speakvariable = #{speakvariable}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrLibScriptmodelByModelid" parameterType="Long" resultMap="IvrLibScriptmodelResult"> |
| | |
| | | <select id="selectIvrLibaExtemplateCategoryList" parameterType="com.smartor.domain.IvrLibaExtemplateCategory" |
| | | resultMap="IvrLibaExtemplateCategoryResult"> |
| | | <include refid="selectIvrLibaExtemplateCategoryVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="categoryname != null and categoryname != ''">and categoryname like concat('%', #{categoryname}, |
| | | '%') |
| | | </if> |
| | |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | <if test="seqno != null ">and seqno = #{seqno}</if> |
| | | and del_flag = 0 |
| | | </where> |
| | | order by seqno asc |
| | | </select> |
| | | |
| | |
| | | <select id="selectIvrLibaExtemplateList" parameterType="com.smartor.domain.IvrLibaExtemplate" |
| | | resultMap="IvrLibaExtemplateResult"> |
| | | <include refid="selectIvrLibaExtemplateVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="extName != null and extName != ''">and extName like concat('%', #{extName}, '%')</if> |
| | | <if test="language != null and language != ''">and language = #{language}</if> |
| | | <if test="note != null and note != ''">and note = #{note}</if> |
| | |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrLibaExtemplateByID" parameterType="String" resultMap="IvrLibaExtemplateResult"> |
| | |
| | | <select id="selectIvrLibaExtemplatescriptList" parameterType="com.smartor.domain.IvrLibaExtemplatescript" |
| | | resultMap="IvrLibaExtemplatescriptResult"> |
| | | <include refid="selectIvrLibaExtemplatescriptVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="extID != null">and extID = #{extID}</if> |
| | | <if test="switchID != null ">and switchID = #{switchID}</if> |
| | | <if test="switchText != null and switchText != ''">and switchText = #{switchText}</if> |
| | |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | <if test="isEnd != null">and is_end = #{isEnd}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="queryIvrLibaExtemplatescriptList" parameterType="com.smartor.domain.IvrLibaExtemplatescript" |
| | | resultMap="IvrLibaExtemplatescriptResult"> |
| | | <include refid="selectIvrLibaExtemplatescriptVo"/> |
| | | <where> |
| | | del_flag = 0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="IDs != null"> |
| | | and extID in |
| | | <foreach collection="IDs" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrLibaExtemplatescriptByID" parameterType="String" resultMap="IvrLibaExtemplatescriptResult"> |
| | |
| | | <select id="selectIvrLibaScriptAssortList" parameterType="com.smartor.domain.IvrLibaScriptAssort" |
| | | resultMap="IvrLibaScriptAssortResult"> |
| | | <include refid="selectIvrLibaScriptAssortVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="indexAssortName != null and indexAssortName != ''">and index_assort_name like concat('%', |
| | | #{indexAssortName}, '%') |
| | | </if> |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | and del_flag=0 |
| | | </where> |
| | | order by seqno asc |
| | | </select> |
| | | |
| | |
| | | <select id="selectIvrLibaScriptList" parameterType="com.smartor.domain.IvrLibaScript" |
| | | resultMap="IvrLibaScriptResult"> |
| | | <include refid="selectIvrLibaScriptVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="id != null ">and id = #{id}</if> |
| | | <if test="deptIds != null and deptIds != ''">and deptIds = #{deptIds}</if> |
| | | <if test="deptNames != null and deptNames != ''">and deptNames like concat('%', #{deptNames}, '%')</if> |
| | |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | <if test="otherdata != null and otherdata != ''">and otherdata = #{otherdata}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrLibaScriptByQuestionid" parameterType="String" resultMap="IvrLibaScriptResult"> |
| | |
| | | <select id="selectIvrLibaScriptTagList" parameterType="com.smartor.domain.IvrLibaScriptTag" |
| | | resultMap="IvrLibaScriptTagResult"> |
| | | <include refid="selectIvrLibaScriptTagVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="tagcategoryid != null ">and tagcategoryid = #{tagcategoryid}</if> |
| | | <if test="scriptid != null ">and scriptid = #{scriptid}</if> |
| | | <if test="tagid != null ">and tagid = #{tagid}</if> |
| | |
| | | <if test="targetid != null ">and targetid = #{targetid}</if> |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrLibaScriptTagById" parameterType="Long" resultMap="IvrLibaScriptTagResult"> |
| | |
| | | <select id="selectIvrLibaScriptTargetList" parameterType="com.smartor.domain.IvrLibaScriptTarget" |
| | | resultMap="IvrLibaScriptTargetResult"> |
| | | <include refid="selectIvrLibaScriptTargetVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="scriptid != null ">and scriptid = #{scriptid}</if> |
| | | <if test="targetID != null ">and targetID = #{targetID}</if> |
| | | <if test="targetType != null and targetType != ''">and targetType = #{targetType}</if> |
| | |
| | | <if test="warnup != null ">and warnup = #{warnup}</if> |
| | | <if test="warndown != null">and warndown = #{warndown}</if> |
| | | <if test="picturePath != null and picturePath != ''">and picture_path = #{picturePath}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrLibaScriptTargetByQuestionTargetID" parameterType="String" |
| | |
| | | <select id="selectIvrLibaScriptTargetoptionList" parameterType="com.smartor.domain.IvrLibaScriptTargetoption" |
| | | resultMap="IvrLibaScriptTargetoptionResult"> |
| | | <include refid="selectIvrLibaScriptTargetoptionVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="targetid != null and targetid != ''">and targetid = #{targetid}</if> |
| | | <if test="targetname != null and targetname != ''">and targetname = #{targetname}</if> |
| | | <if test="scriptid != null ">and scriptid = #{scriptid}</if> |
| | |
| | | <if test="appendflag != null">and appendflag = #{appendflag}</if> |
| | | <if test="appenddesc != null">and appenddesc = #{appenddesc}</if> |
| | | <if test="picturePath != null">and picture_path = #{picturePath}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrLibaScriptTargetoptionByTargetoptionid" parameterType="String" |
| | |
| | | <select id="selectIvrLibaTargetAssortList" parameterType="com.smartor.domain.IvrLibaTargetAssort" |
| | | resultMap="IvrLibaTargetAssortResult"> |
| | | <include refid="selectIvrLibaTargetAssortVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="indexAssortName != null and indexAssortName != ''">and index_assort_name like concat('%', |
| | | #{indexAssortName}, '%') |
| | | </if> |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | and del_flag=0 |
| | | </where> |
| | | order by seqno asc |
| | | </select> |
| | | |
| | |
| | | <select id="selectIvrLibaTargetList" parameterType="com.smartor.domain.IvrLibaTarget" |
| | | resultMap="IvrLibaTargetResult"> |
| | | <include refid="selectIvrLibaTargetVo"/> |
| | | <where> |
| | | del_flag =0 |
| | | where 1=1 |
| | | and del_flag =0 |
| | | <if test="id != null ">and id = #{id}</if> |
| | | <if test="groupid != null and groupid != ''">and groupid = #{groupid}</if> |
| | | <if test="targettype != null and targettype != ''">and targettype = #{targettype}</if> |
| | |
| | | <if test="parameter != null and parameter != ''">and parameter = #{parameter}</if> |
| | | <if test="optionDesc != null and optionDesc != ''">and option_desc = #{optionDesc}</if> |
| | | |
| | | </where> |
| | | order by update_time desc |
| | | </select> |
| | | |
| | |
| | | from ivr_liba_target a |
| | | LEFT JOIN ivr_liba_targetoption b |
| | | on a.id = b.targetid |
| | | <where> |
| | | a.del_flag != 1 and b.del_flag != 1 |
| | | where 1=1 |
| | | and a.del_flag != 1 and b.del_flag != 1 |
| | | <if test="groupid != null and groupid != ''">and a.groupid = #{groupid}</if> |
| | | <if test="targettype != null and targettype != ''">and a.targettype = #{targettype}</if> |
| | | <if test="targetname != null and targetname != ''">and a.targetname like concat('%', #{targetname}, '%') |
| | |
| | | <if test="parameter != null and parameter != ''">a.parameter = #{parameter}</if> |
| | | <if test="optionDesc != null and optionDesc != ''">a.option_desc = #{optionDesc}</if> |
| | | |
| | | </where> |
| | | ORDER BY a.targetID |
| | | </select> |
| | | |
| | |
| | | <select id="selectIvrLibaTargetTagList" parameterType="com.smartor.domain.IvrLibaTargetTag" |
| | | resultMap="IvrLibaTargetTagResult"> |
| | | <include refid="selectIvrLibaTargetTagVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="tagcategoryid != null ">and tagcategoryid = #{tagcategoryid}</if> |
| | | <if test="tagid != null ">and tagid = #{tagid}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="tagname != null ">and tagname = #{tagname}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrLibaTargetTagById" parameterType="Long" resultMap="IvrLibaTargetTagResult"> |
| | |
| | | <select id="selectIvrLibaTargetoptionList" parameterType="com.smartor.domain.IvrLibaTargetoption" |
| | | resultMap="IvrLibaTargetoptionResult"> |
| | | <include refid="selectIvrLibaTargetoptionVo"/> |
| | | <where> |
| | | del_flag != 1 |
| | | where 1=1 |
| | | and del_flag != 1 |
| | | <if test="targetid != null ">and targetid = #{targetid}</if> |
| | | <if test="targettype != null and targettype != ''">and targettype = #{targettype}</if> |
| | | <if test="categoryName != null and categoryName != ''">and categoryName like concat('%', #{categoryName}, |
| | |
| | | <if test="appenddesc != null">and appenddesc = #{appenddesc}</if> |
| | | <if test="picturePath != null">and picture_path = #{picturePath}</if> |
| | | <if test="isEnd != null ">and is_end = #{isEnd}</if> |
| | | </where> |
| | | order by guid asc |
| | | </select> |
| | | |
| | |
| | | <select id="selectIvrLibaTemplateAssortList" parameterType="com.smartor.domain.IvrLibaTemplateAssort" |
| | | resultMap="IvrLibaTemplateAssortResult"> |
| | | <include refid="selectIvrLibaTemplateAssortVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="indexAssortName != null and indexAssortName != ''">and index_assort_name like concat('%', |
| | | #{indexAssortName}, '%') |
| | | </if> |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | </where> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | order by seqno asc |
| | | </select> |
| | | |
| | |
| | | <select id="selectIvrLibaTemplateList" parameterType="com.smartor.domain.IvrLibaTemplate" |
| | | resultMap="IvrLibaTemplateResult"> |
| | | <include refid="selectIvrLibaTemplateVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="templateName != null and templateName != ''">and templateName like concat('%', #{templateName}, |
| | | '%') |
| | | </if> |
| | |
| | | <if test="noVoiceNum != null and noVoiceNum > 0">and no_voice_num = #{noVoiceNum}</if> |
| | | <if test="silencetime != null">and silencetime = #{silencetime}</if> |
| | | <if test="deptCode != null">and dept_code = #{deptCode}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrLibaTemplateByID" parameterType="Long" resultMap="IvrLibaTemplateResult"> |
| | |
| | | <select id="selectIvrLibaTemplateScriptList" parameterType="com.smartor.domain.IvrLibaTemplateScript" |
| | | resultMap="IvrLibaTemplateScriptResult"> |
| | | <include refid="selectIvrLibaTemplateScriptVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="scriptno != null ">and scriptno = #{scriptno}</if> |
| | | <if test="assortid != null ">and assortid = #{assortid}</if> |
| | | <if test="groupName != null ">and group_name = #{groupName}</if> |
| | |
| | | <if test="scriptType != null">and script_type = #{scriptType}</if> |
| | | <if test="sort != null">and sort = #{sort}</if> |
| | | <if test="score != null">and score = #{score}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrLibaTemplateScriptByID" parameterType="Long" resultMap="IvrLibaTemplateScriptResult"> |
| | |
| | | <select id="selectIvrLibaTemplateTagList" parameterType="com.smartor.domain.IvrLibaTemplateTag" |
| | | resultMap="IvrLibaTemplateTagResult"> |
| | | <include refid="selectIvrLibaTemplateTagVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="tagcategoryid != null ">and tagcategoryid = #{tagcategoryid}</if> |
| | | <if test="templateid != null ">and templateid = #{templateid}</if> |
| | | <if test="tagid != null ">and tagid = #{tagid}</if> |
| | |
| | | <if test="targetid != null ">and targetid = #{targetid}</if> |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrLibaTemplateTagById" parameterType="Long" resultMap="IvrLibaTemplateTagResult"> |
| | |
| | | <select id="selectIvrLibaTemplateTargetoptionList" parameterType="com.smartor.domain.IvrLibaTemplateTargetoption" |
| | | resultMap="IvrLibaTemplateTargetoptionResult"> |
| | | <include refid="selectIvrLibaTemplateTargetoptionVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="targetid != null ">and targetid = #{targetid}</if> |
| | | <if test="isEnd != null ">and is_end = #{isEnd}</if> |
| | | <if test="score != null ">and score = #{score}</if> |
| | |
| | | <if test="optionNo != null">and option_no = #{optionNo}</if> |
| | | <if test="sendTaskid != null">and send_taskid= #{sendTaskid}</if> |
| | | <if test="sendTaskname != null">and send_taskname = #{sendTaskname}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrLibaTemplateTargetoptionById" parameterType="Long" |
| | |
| | | |
| | | <select id="selectIvrSceneExecuteconfigList" parameterType="IvrSceneExecuteconfig" resultMap="IvrSceneExecuteconfigResult"> |
| | | <include refid="selectIvrSceneExecuteconfigVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="sourcetype != null "> and sourcetype = #{sourcetype}</if> |
| | | <if test="globalid != null "> and globalid = #{globalid}</if> |
| | |
| | | <if test="executeconditionscode != null and executeconditionscode != ''"> and executeconditionscode = #{executeconditionscode}</if> |
| | | <if test="executeresultcode != null and executeresultcode != ''"> and executeresultcode = #{executeresultcode}</if> |
| | | <if test="flownodeid != null "> and flownodeid = #{flownodeid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrSceneExecuteconfigByScenecfgid" parameterType="Long" resultMap="IvrSceneExecuteconfigResult"> |
| | |
| | | |
| | | <select id="selectIvrSceneFlowList" parameterType="IvrSceneFlow" resultMap="IvrSceneFlowResult"> |
| | | <include refid="selectIvrSceneFlowVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="isupload != null "> and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> |
| | |
| | | <if test="sort != null "> and sort = #{sort}</if> |
| | | <if test="startnode != null "> and startnode = #{startnode}</if> |
| | | <if test="oldid != null "> and oldid = #{oldid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrSceneFlowByFlowid" parameterType="Long" resultMap="IvrSceneFlowResult"> |
| | |
| | | |
| | | <select id="selectIvrSceneFlownodeList" parameterType="IvrSceneFlownode" resultMap="IvrSceneFlownodeResult"> |
| | | <include refid="selectIvrSceneFlownodeVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="isupload != null "> and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> |
| | |
| | | <if test="flowcode != null and flowcode != ''"> and flowcode = #{flowcode}</if> |
| | | <if test="targetid != null "> and targetid = #{targetid}</if> |
| | | <if test="oldid != null "> and oldid = #{oldid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrSceneFlownodeByFlownodeid" parameterType="Long" resultMap="IvrSceneFlownodeResult"> |
| | |
| | | |
| | | <select id="selectIvrSceneFlownodebranchList" parameterType="IvrSceneFlownodebranch" resultMap="IvrSceneFlownodebranchResult"> |
| | | <include refid="selectIvrSceneFlownodebranchVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="isupload != null "> and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> |
| | |
| | | <if test="nodetype != null "> and nodetype = #{nodetype}</if> |
| | | <if test="targetid != null "> and targetid = #{targetid}</if> |
| | | <if test="oldid != null "> and oldid = #{oldid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrSceneFlownodebranchByBranchid" parameterType="Long" resultMap="IvrSceneFlownodebranchResult"> |
| | |
| | | |
| | | <select id="selectIvrSceneGlobalconfigList" parameterType="IvrSceneGlobalconfig" resultMap="IvrSceneGlobalconfigResult"> |
| | | <include refid="selectIvrSceneGlobalconfigVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="sceneid != null "> and sceneid = #{sceneid}</if> |
| | | <if test="configname != null and configname != ''"> and configname like concat('%', #{configname}, '%')</if> |
| | | <if test="description != null and description != ''"> and description = #{description}</if> |
| | |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="isupload != null "> and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrSceneGlobalconfigByGblconfigid" parameterType="Long" resultMap="IvrSceneGlobalconfigResult"> |
| | |
| | | |
| | | <select id="selectIvrSceneIntentList" parameterType="IvrSceneIntent" resultMap="IvrSceneIntentResult"> |
| | | <include refid="selectIvrSceneIntentVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="sourcetype != null ">and sourcetype = #{sourcetype}</if> |
| | | <if test="gbiconfigid != null ">and gbiconfigid = #{gbiconfigid}</if> |
| | |
| | | <if test="grouporand != null ">and grouporand = #{grouporand}</if> |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrSceneIntentBySceneintentid" parameterType="Long" resultMap="IvrSceneIntentResult"> |
| | |
| | | |
| | | <select id="selectIvrSceneList" parameterType="IvrScene" resultMap="IvrSceneResult"> |
| | | <include refid="selectIvrSceneVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="categoryid != null and categoryid != ''"> and categoryid = #{categoryid}</if> |
| | | <if test="scenename != null and scenename != ''"> and scenename like concat('%', #{scenename}, '%')</if> |
| | | <if test="version != null and version != ''"> and version = #{version}</if> |
| | |
| | | <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> |
| | | <if test="releasenotes != null and releasenotes != ''"> and releasenotes = #{releasenotes}</if> |
| | | <if test="draftid != null "> and draftid = #{draftid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrSceneBySceneid" parameterType="Long" resultMap="IvrSceneResult"> |
| | |
| | | |
| | | <select id="selectIvrSceneRecallList" parameterType="IvrSceneRecall" resultMap="IvrSceneRecallResult"> |
| | | <include refid="selectIvrSceneRecallVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="sceneid != null "> and sceneid = #{sceneid}</if> |
| | | <if test="recalltype != null and recalltype != ''"> and recalltype = #{recalltype}</if> |
| | |
| | | <if test="recallunit != null "> and recallunit = #{recallunit}</if> |
| | | <if test="isupload != null "> and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrSceneRecallByRecallid" parameterType="Long" resultMap="IvrSceneRecallResult"> |
| | |
| | | |
| | | <select id="selectIvrSceneScriptList" parameterType="IvrSceneScript" resultMap="IvrSceneScriptResult"> |
| | | <include refid="selectIvrSceneScriptVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="sourcetype != null "> and sourcetype = #{sourcetype}</if> |
| | | <if test="globalid != null "> and globalid = #{globalid}</if> |
| | |
| | | <if test="speakname != null and speakname != ''"> and speakname like concat('%', #{speakname}, '%')</if> |
| | | <if test="isupload != null "> and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrSceneScriptByScenescrid" parameterType="Long" resultMap="IvrSceneScriptResult"> |
| | |
| | | |
| | | <select id="selectIvrSceneScriptmodelList" parameterType="IvrSceneScriptmodel" resultMap="IvrSceneScriptmodelResult"> |
| | | <include refid="selectIvrSceneScriptmodelVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="scenescrid != null "> and scenescrid = #{scenescrid}</if> |
| | | <if test="speaktype != null "> and speaktype = #{speaktype}</if> |
| | |
| | | <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> |
| | | <if test="speakvariable != null and speakvariable != ''"> and speakvariable = #{speakvariable}</if> |
| | | <if test="sceneid != null "> and sceneid = #{sceneid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrSceneScriptmodelByScenemodid" parameterType="Long" resultMap="IvrSceneScriptmodelResult"> |
| | |
| | | |
| | | <select id="selectIvrScenecategoryList" parameterType="IvrScenecategory" resultMap="IvrScenecategoryResult"> |
| | | <include refid="selectIvrScenecategoryVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="categoryname != null and categoryname != ''"> and categoryname like concat('%', #{categoryname}, '%')</if> |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="isupload != null "> and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrScenecategoryByScenecatid" parameterType="Long" resultMap="IvrScenecategoryResult"> |
| | |
| | | <select id="selectIvrTaskTemplateList" parameterType="com.smartor.domain.IvrTaskTemplate" |
| | | resultMap="IvrTaskTemplateResult"> |
| | | <include refid="selectIvrTaskTemplateVo"/> |
| | | <where> |
| | | del_flag = 0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <if test="sendDay != null ">and send_day = #{sendDay}</if> |
| | | <if test="id != null ">and id = #{id}</if> |
| | |
| | | <if test="recallcount != null">and recallcount = #{prologrecallcountue}</if> |
| | | <if test="deptCode != null">and dept_code = #{deptCode}</if> |
| | | <if test="longTemp != null">and long_temp = #{longTemp}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrTaskTemplateByID" parameterType="Long" resultMap="IvrTaskTemplateResult"> |
| | |
| | | <select id="selectIvrTaskTemplateScriptList" parameterType="com.smartor.domain.IvrTaskTemplateScript" |
| | | resultMap="IvrTaskTemplateScriptResult"> |
| | | <include refid="selectIvrTaskTemplateScriptVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <if test="assortid != null ">and assortid = #{assortid}</if> |
| | | <if test="score != null ">and score = #{score}</if> |
| | |
| | | <if test="branchNextscriptno != null and branchNextscriptno != ''">and branch_nextscriptno = |
| | | #{branchNextscriptno} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrTaskTemplateScriptByID" parameterType="Long" resultMap="IvrTaskTemplateScriptResult"> |
| | |
| | | <select id="selectIvrTaskTemplateTargetoptionList" parameterType="com.smartor.domain.IvrTaskTemplateTargetoption" |
| | | resultMap="IvrTaskTemplateTargetoptionResult"> |
| | | <include refid="selectIvrTaskTemplateTargetoptionVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <if test="isEnd != null ">and is_end = #{isEnd}</if> |
| | | <if test="templateID != null ">and templateID = #{templateID}</if> |
| | |
| | | <if test="score != null ">and score = #{score}</if> |
| | | <if test="sendTaskid != null">and send_taskid= #{sendTaskid}</if> |
| | | <if test="sendTaskname != null">and send_taskname = #{sendTaskname}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrTaskTemplateTargetoptionById" parameterType="Long" |
| | |
| | | <select id="selectIvrTaskVisitResultList" parameterType="com.smartor.domain.IvrTaskVisitResult" |
| | | resultMap="IvrTaskVisitResultResult"> |
| | | <include refid="selectIvrTaskVisitResultVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="sendname != null and sendname != ''">and sendname like concat('%', #{sendname}, '%')</if> |
| | | <if test="phone != null and phone != ''">and phone = #{phone}</if> |
| | | <if test="sex != null and sex != ''">and sex = #{sex}</if> |
| | |
| | | <if test="patientAnswer != null and patientAnswer != ''">and patient_answer = #{patientAnswer}</if> |
| | | <if test="optionResult != null and optionResult != ''">and option_result = #{optionResult}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrTaskVisitResultById" parameterType="Long" resultMap="IvrTaskVisitResultResult"> |
| | |
| | | <select id="selectIvrTaskcallrecordList" parameterType="com.smartor.domain.IvrTaskcallrecord" |
| | | resultMap="IvrTaskcallrecordResult"> |
| | | <include refid="selectIvrTaskcallrecordVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="displayno != null and displayno != ''">and displayno = #{displayno}</if> |
| | | <if test="phone != null and phone != ''">and phone = #{phone}</if> |
| | | <if test="taskid != null and taskid != ''">and taskid = #{taskid}</if> |
| | |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrTaskcallrecordByUuid" parameterType="String" resultMap="IvrTaskcallrecordResult"> |
| | |
| | | |
| | | <select id="selectIvrTasksmsList" parameterType="com.smartor.domain.IvrTasksms" resultMap="IvrTasksmsResult"> |
| | | <include refid="selectIvrTasksmsVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <if test="type != null ">and type = #{type}</if> |
| | | <if test="smstemplateid != null ">and smstemplateid = #{smstemplateid}</if> |
| | |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrTasksmsById" parameterType="Long" resultMap="IvrTasksmsResult"> |
| | |
| | | |
| | | <select id="selectMedicalHistoryList" parameterType="com.smartor.domain.MedicalHistory" resultMap="MedicalHistoryResult"> |
| | | <include refid="selectMedicalHistoryVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="pastIllnesses != null and pastIllnesses != ''"> and past_illnesses = #{pastIllnesses}</if> |
| | | <if test="drugAllergy != null and drugAllergy != ''"> and drug_allergy = #{drugAllergy}</if> |
| | | <if test="familyHistory != null and familyHistory != ''"> and family_history = #{familyHistory}</if> |
| | |
| | | <if test="psychology != null and psychology != ''"> and psychology = #{psychology}</if> |
| | | <if test="pid != null "> and pid = #{pid}</if> |
| | | <if test="orgid != null "> and orgid = #{orgid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectMedicalHistoryById" parameterType="Long" resultMap="MedicalHistoryResult"> |
| | |
| | | |
| | | <select id="selectMinioFileList" parameterType="com.smartor.domain.MinioFile" resultMap="MinioFileResult"> |
| | | <include refid="selectMinioFileVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="originalFileName != null and originalFileName != ''">and original_file_name like concat('%', |
| | | #{originalFileName}, '%') |
| | | </if> |
| | |
| | | <if test="mime != null and mime != ''">and mime = #{mime}</if> |
| | | <if test="fileUrl != null and fileUrl != ''">and file_url = #{fileUrl}</if> |
| | | <if test="isDelete != null ">and is_delete = #{isDelete}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectMinioFileById" parameterType="Long" resultMap="MinioFileResult"> |
| | |
| | | <select id="selectPatArchiveImportList" parameterType="com.smartor.domain.PatArchiveImport" |
| | | resultMap="PatArchiveImportResult"> |
| | | <include refid="selectPatArchiveImportVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="patientno != null and patientno != ''"> |
| | | and patientno = #{patientno} |
| | | </if> |
| | |
| | | <if test="batchNo != null and batchNo != ''"> |
| | | and batch_no = #{batchNo} |
| | | </if> |
| | | </where> |
| | | ORDER BY create_time desc |
| | | </select> |
| | | |
| | |
| | | |
| | | <select id="selectPatArchiveList" parameterType="com.smartor.domain.PatArchive" resultMap="PatArchiveResult"> |
| | | <include refid="selectPatArchiveVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <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="filterDrname != null ">and filter_drname = #{filterDrname}</if> |
| | | <if test="filterDrcode != null ">and filter_drcode = #{filterDrcode}</if> |
| | | <if test="campusid != null ">and campusid = #{campusid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | |
| | | a.filter_drcode, |
| | | a.case_person_age |
| | | from pat_archive a,pat_archivetag b ,base_tag c |
| | | <where> |
| | | a.del_flag=0 and |
| | | a.id = b.patid and b.tagid = c.tagid |
| | | where 1=1 |
| | | and a.del_flag = 0 |
| | | and a.id = b.patid |
| | | and b.tagid = c.tagid |
| | | <if test="filterDrname != null ">and filter_drname = #{filterDrname}</if> |
| | | <if test="filterDrcode != null ">and filter_drcode = #{filterDrcode}</if> |
| | | <if test="name != null and name != ''">and a.name like concat('%', #{name}, '%')</if> |
| | |
| | | #{tagId} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPatArchiveByPatid" parameterType="Long" resultMap="PatArchiveResult"> |
| | |
| | | FROM |
| | | pat_archive a |
| | | LEFT JOIN pat_archivetag b ON a.id = b.patid AND b.del_flag = 0 |
| | | <where> |
| | | a.del_flag = 0 |
| | | where 1=1 |
| | | and a.del_flag = 0 |
| | | and a.orgid = #{orgid} |
| | | <if test="name != null and name != ''">and a.name like concat('%', #{name}, '%')</if> |
| | | <if test="idcardno != null and idcardno != ''">and a.idcardno = #{idcardno}</if> |
| | |
| | | #{tagId} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | order by a.update_time desc |
| | | <if test="pn != null and ps != null">limit ${pn},${ps}</if> |
| | | |
| | |
| | | LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag where del_flag=0 GROUP BY patid |
| | | ) t ON t.patid = |
| | | d.patid |
| | | <where> |
| | | d.del_flag != 1 |
| | | where 1=1 |
| | | and d.del_flag != 1 |
| | | AND a.del_flag != 1 |
| | | and d.orgid = #{orgid} |
| | | <if test="name != null and name != ''">and a.name like concat('%', #{name}, '%')</if> |
| | |
| | | <if test="isFilter == true"> |
| | | AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid) |
| | | </if> |
| | | </where> |
| | | -- order by a.update_time desc |
| | | <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if> |
| | | |
| | |
| | | LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag where del_flag=0 GROUP BY patid |
| | | ) t ON t.patid = |
| | | d.patid |
| | | <where> |
| | | d.del_flag != 1 |
| | | where 1=1 |
| | | and d.del_flag != 1 |
| | | AND a.del_flag != 1 |
| | | and d.orgid = #{orgid} |
| | | <if test="pid != null and pid != ''">and a.id = #{pid}</if> |
| | |
| | | <if test="isFilter == true"> |
| | | AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid) |
| | | </if> |
| | | </where> |
| | | -- order by a.update_time desc |
| | | <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if> |
| | | </select> |
| | |
| | | LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag where del_flag=0 GROUP BY patid |
| | | ) t ON t.patid = |
| | | d.patid |
| | | <where> |
| | | d.del_flag != 1 |
| | | where 1=1 |
| | | and d.del_flag != 1 |
| | | AND a.del_flag != 1 |
| | | and d.orgid = #{orgid} |
| | | <if test="pid != null and pid != ''">and a.id = #{pid}</if> |
| | |
| | | <if test="isFilter == true"> |
| | | AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid) |
| | | </if> |
| | | </where> |
| | | -- order by a.update_time desc |
| | | <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if> |
| | | </select> |
| | |
| | | LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag where del_flag=0 GROUP BY patid |
| | | ) t ON t.patid = |
| | | d.patid |
| | | <where> |
| | | d.del_flag != 1 |
| | | where 1=1 |
| | | and d.del_flag != 1 |
| | | AND a.del_flag != 1 |
| | | and d.orgid = #{orgid} |
| | | <if test="name != null and name != ''">and a.name like concat('%', #{name}, '%')</if> |
| | |
| | | <if test="isFilter == true"> |
| | | AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid) |
| | | </if> |
| | | </where> |
| | | <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if> |
| | | ) as tmp |
| | | </select> |
| | |
| | | LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag where del_flag=0 GROUP BY patid |
| | | ) t ON t.patid = |
| | | d.patid |
| | | <where> |
| | | d.del_flag != 1 |
| | | where 1=1 |
| | | and d.del_flag != 1 |
| | | AND a.del_flag != 1 |
| | | and d.orgid = #{orgid} |
| | | <if test="pid != null and pid != ''">and a.id = #{pid}</if> |
| | |
| | | <if test="isFilter == true"> |
| | | AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid) |
| | | </if> |
| | | </where> |
| | | <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if> |
| | | </select> |
| | | |
| | |
| | | LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag where del_flag=0 GROUP BY patid |
| | | ) t ON t.patid = |
| | | d.patid |
| | | <where> |
| | | d.del_flag != 1 |
| | | where 1=1 |
| | | and d.del_flag != 1 |
| | | AND a.del_flag != 1 |
| | | and d.orgid = #{orgid} |
| | | <if test="pid != null and pid != ''">and a.id = #{pid}</if> |
| | |
| | | <if test="isFilter == true"> |
| | | AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid) |
| | | </if> |
| | | </where> |
| | | -- order by a.update_time desc |
| | | <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if> |
| | | </select> |
| | |
| | | <select id="selectPatArchiveOutList" parameterType="com.smartor.domain.PatArchiveOut" |
| | | resultMap="PatArchiveOutResult"> |
| | | <include refid="selectPatArchiveOutVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="patientno != null and patientno != ''">and patientno = #{patientno}</if> |
| | | <if test="pattype != null and pattype != ''">and pattype = #{pattype}</if> |
| | | <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if> |
| | |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | <if test="membertype != null and membertype != ''">and membertype = #{membertype}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPatArchiveOutByPatid" parameterType="Long" resultMap="PatArchiveOutResult"> |
| | |
| | | select aa.name1 as name, aa.count as count |
| | | from ( |
| | | SELECT "住院" as name1, count(1) as count FROM `pat_med_inhosp` |
| | | <where> |
| | | del_flag = 0 and endtime = null |
| | | where 1=1 |
| | | and del_flag = 0 and endtime = null |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="deptIds != null ">and deptId in |
| | | <foreach collection="deptIds" item="deptId" open="(" separator="," close=")"> |
| | | #{deptId} |
| | |
| | | #{drCode} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | union |
| | | select "出院" name1, count(1) as count FROM `pat_med_inhosp` |
| | | <where> |
| | | del_flag=0 and endtime != null |
| | | where 1=1 |
| | | and del_flag = 0 and endtime != null |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="deptIds != null ">and deptId in |
| | | <foreach collection="deptIds" item="deptId" open="(" separator="," close=")"> |
| | | #{deptId} |
| | |
| | | #{drCode} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | union |
| | | select "门诊" name1, count(1) as count FROM `pat_med_outhosp` |
| | | where del_flag=0 |
| | |
| | | <select id="selectPatArchivecontactList" parameterType="com.smartor.domain.PatArchivecontact" |
| | | resultMap="PatArchivecontactResult"> |
| | | <include refid="selectPatArchivecontactVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="patid != null ">and patid = #{patid}</if> |
| | | <if test="contactway != null and contactway != ''">and contactway = #{contactway}</if> |
| | | <if test="relation != null ">and relation = #{relation}</if> |
| | |
| | | </if> |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPatArchivecontactById" parameterType="Long" resultMap="PatArchivecontactResult"> |
| | |
| | | a.patid, |
| | | b.tagname |
| | | from pat_archivetag a ,base_tag b |
| | | <where> |
| | | a.tagid=b.tagid |
| | | where 1=1 |
| | | and a.tagid=b.tagid |
| | | <if test="tagcategoryid != null ">and a.tagcategoryid = #{tagcategoryid}</if> |
| | | <if test="tagid != null ">and a.tagid = #{tagid}</if> |
| | | <if test="orgid != null and orgid != ''">and a.orgid = #{orgid}</if> |
| | | <if test="isupload != null ">and a.isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and a.upload_time = #{uploadTime}</if> |
| | | <if test="patid != null ">and a.patid = #{patid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPatArchivetagById" parameterType="Long" resultMap="PatArchivetagResult"> |
| | |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if> |
| | | </trim> |
| | | <where> |
| | | where 1=1 |
| | | <if test="tagid != null">and tagid = #{tagid}</if> |
| | | <if test="patid != null">and patid = #{patid}</if> |
| | | </where> |
| | | </delete> |
| | | |
| | | <delete id="deletePatArchivetagByIds" parameterType="String"> |
| | |
| | | |
| | | <select id="selectPatFilterlistList" parameterType="com.smartor.domain.PatFilterlist" resultMap="PatFilterlistResult"> |
| | | <include refid="selectPatFilterlistVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="patid != null "> and patid = #{patid}</if> |
| | | <if test="filtertype != null and filtertype != ''"> and filtertype = #{filtertype}</if> |
| | | <if test="filterdesc != null and filterdesc != ''"> and filterdesc = #{filterdesc}</if> |
| | |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="pid != null "> and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''"> and guid = #{guid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPatFilterlistById" parameterType="Long" resultMap="PatFilterlistResult"> |
| | |
| | | <select id="selectPatTaskRelevanceList" parameterType="com.smartor.domain.PatTaskRelevance" |
| | | resultMap="PatTaskRelevanceResult"> |
| | | <include refid="selectPatTaskRelevanceVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="patid != null ">and pat_id = #{patid}</if> |
| | | <if test="orgid != null ">and orgid = #{orgid}</if> |
| | | <if test="taskId != null ">and task_id = #{taskId}</if> |
| | |
| | | <if test="visitTime != null ">and visit_time = #{visitTime}</if> |
| | | <if test="receiveTime != null ">and receive_time = #{receiveTime}</if> |
| | | <if test="operatePerson != null and operatePerson != ''">and operate_person = #{operatePerson}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPatTaskRelevanceById" parameterType="Long" resultMap="PatTaskRelevanceResult"> |
| | |
| | | <select id="selectPatMedBloodsugarList" parameterType="com.smartor.domain.PatMedBloodsugar" |
| | | resultMap="PatMedBloodsugarResult"> |
| | | <include refid="selectPatMedBloodsugarVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="serialnum != null and serialnum != ''">and serialnum = #{serialnum}</if> |
| | | <if test="recordtime != null ">and recordtime = #{recordtime}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | |
| | | <if test="sugarlevelempty != null ">and sugarlevelempty = #{sugarlevelempty}</if> |
| | | <if test="visittype != null ">and visittype = #{visittype}</if> |
| | | <if test="visitid != null ">and visitid = #{visitid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPatMedBloodsugarByBloodsugarid" parameterType="Long" resultMap="PatMedBloodsugarResult"> |
| | |
| | | |
| | | <select id="selectPatMedDrugList" parameterType="com.smartor.domain.PatMedDrug" resultMap="PatMedDrugResult"> |
| | | <include refid="selectPatMedDrugVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="serialnum != null and serialnum != ''">and serialnum = #{serialnum}</if> |
| | | <if test="patid != null ">and patid = #{patid}</if> |
| | | <if test="drugname != null and drugname != ''">and drugname like concat('%', #{drugname}, '%')</if> |
| | |
| | | <if test="visitid != null ">and visitid = #{visitid}</if> |
| | | <if test="schemestatus != null ">and schemestatus = #{schemestatus}</if> |
| | | <if test="schemetime != null ">and schemetime = #{schemetime}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPatMedDrugById" parameterType="Long" resultMap="PatMedDrugResult"> |
| | |
| | | <select id="selectPatMedHypertensionList" parameterType="com.smartor.domain.PatMedHypertension" |
| | | resultMap="PatMedHypertensionResult"> |
| | | <include refid="selectPatMedHypertensionVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="serialnum != null and serialnum != ''">and serialnum = #{serialnum}</if> |
| | | <if test="recordtime != null ">and recordtime = #{recordtime}</if> |
| | | <if test="typename != null and typename != ''">and typename like concat('%', #{typename}, '%')</if> |
| | |
| | | <if test="heartrate != null ">and heartrate = #{heartrate}</if> |
| | | <if test="visittype != null ">and visittype = #{visittype}</if> |
| | | <if test="visitid != null ">and visitid = #{visitid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPatMedHypertensionById" parameterType="Long" resultMap="PatMedHypertensionResult"> |
| | |
| | | pat_archive a ON a.id = b.patid |
| | | LEFT JOIN |
| | | pat_archivetag c ON c.patid = a.id AND (c.del_flag = 0 OR c.del_flag IS NULL) |
| | | <where> |
| | | a.del_flag = 0 |
| | | where 1=1 |
| | | AND a.del_flag = 0 |
| | | AND b.del_flag = 0 |
| | | AND a.idcardno IS NOT NULL |
| | | <if test="startOutHospTime != null ">and date_format(b.endtime,'%y%m%d') >= |
| | |
| | | #{leaveldeptcode} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | GROUP BY |
| | | b.inhospid, |
| | | a.age, |
| | |
| | | b.fuspecialadvice |
| | | FROM |
| | | pat_med_inhosp b |
| | | |
| | | <where> |
| | | <if test="serialnum != null ">and b.serialnum = #{serialnum}</if> |
| | | |
| | | </where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="serialnum != null "> |
| | | and b.serialnum = #{serialnum} |
| | | </if> |
| | | order by b.inhospid desc |
| | | </select> |
| | | |
| | |
| | | FROM |
| | | pat_med_inhosp b, |
| | | pat_archive a |
| | | <where> |
| | | a.del_flag=0 |
| | | and b.del_flag=0 |
| | | and a.id = b.patid |
| | | AND a.idcardno != '' |
| | | <if test="hospitalname != null and hospitalname != ''">and hospitalname like concat('%', #{hospitalname}, |
| | | '%') |
| | | </if> |
| | | <if test="managementDoctor != null ">and b.management_doctor = #{managementDoctor}</if> |
| | | <if test="managementDoctorCode != null ">and b.management_doctor_code = #{managementDoctorCode}</if> |
| | | <if test="patname != null and patname != ''">and patname like concat('%', #{patname}, '%')</if> |
| | | <if test="hospitaldistrictname != null and hospitaldistrictname != ''">and hospitaldistrictname like |
| | | concat('%', #{hospitaldistrictname}, '%') |
| | | </if> |
| | | <if test="endtime != null ">and b.endtime = #{endtime}</if> |
| | | <if test="serialnum != null ">and b.serialnum = #{serialnum}</if> |
| | | <if test="fuflag != null ">and b.fuflag = #{fuflag}</if> |
| | | <if test="nurseId != null ">and b.nurse_id = #{nurseId}</if> |
| | | <if test="nurseName != null ">and b.nurse_name = #{nurseName}</if> |
| | | <if test="patno != null ">and b.patno = #{patno}</if> |
| | | <if test="campusid != null ">and b.campusid = #{campusid}</if> |
| | | <if test="diagcheckFlag != null ">and b.diagcheck_flag = #{diagcheckFlag}</if> |
| | | <if test="deptcheckFlag != null ">and b.deptcheck_flag = #{deptcheckFlag}</if> |
| | | <if test="wardcheckFlag != null ">and b.wardcheck_flag = #{wardcheckFlag}</if> |
| | | <if test="inhospstate != null ">and b.inhospstate = #{inhospstate}</if> |
| | | <if test="schemestatus != null ">and b.schemestatus = #{schemestatus}</if> |
| | | <if test="leavediagname != null and leavediagname != ''">and b.leavediagname like concat('%', |
| | | #{leavediagname}, '%') |
| | | </if> |
| | | <if test="drname != null and drname != ''">and b.drname like concat('%', #{drname}, '%')</if> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size()>0"> |
| | | AND b.leavehospitaldistrictcode IN |
| | | <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator="," |
| | | close=")"> |
| | | #{leavehospitaldistrictcode} |
| | | </foreach> |
| | | </if> |
| | | <if test="leaveldeptcodes != null and leaveldeptcodes.size()>0"> |
| | | AND b.leaveldeptcode IN |
| | | <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator="," |
| | | close=")"> |
| | | #{leaveldeptcode} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | where 1=1 |
| | | and a.del_flag=0 |
| | | and b.del_flag=0 |
| | | and a.id = b.patid |
| | | AND a.idcardno != '' |
| | | <if test="orgid != null and orgid != ''"> |
| | | and a.orgid = #{orgid} |
| | | </if> |
| | | <if test="hospitalname != null and hospitalname != ''">and hospitalname like concat('%', #{hospitalname}, |
| | | '%') |
| | | </if> |
| | | <if test="managementDoctor != null ">and b.management_doctor = #{managementDoctor}</if> |
| | | <if test="managementDoctorCode != null ">and b.management_doctor_code = #{managementDoctorCode}</if> |
| | | <if test="patname != null and patname != ''">and patname like concat('%', #{patname}, '%')</if> |
| | | <if test="hospitaldistrictname != null and hospitaldistrictname != ''">and hospitaldistrictname like |
| | | concat('%', #{hospitaldistrictname}, '%') |
| | | </if> |
| | | <if test="endtime != null ">and b.endtime = #{endtime}</if> |
| | | <if test="serialnum != null ">and b.serialnum = #{serialnum}</if> |
| | | <if test="fuflag != null ">and b.fuflag = #{fuflag}</if> |
| | | <if test="nurseId != null ">and b.nurse_id = #{nurseId}</if> |
| | | <if test="nurseName != null ">and b.nurse_name = #{nurseName}</if> |
| | | <if test="patno != null ">and b.patno = #{patno}</if> |
| | | <if test="campusid != null ">and b.campusid = #{campusid}</if> |
| | | <if test="diagcheckFlag != null ">and b.diagcheck_flag = #{diagcheckFlag}</if> |
| | | <if test="deptcheckFlag != null ">and b.deptcheck_flag = #{deptcheckFlag}</if> |
| | | <if test="wardcheckFlag != null ">and b.wardcheck_flag = #{wardcheckFlag}</if> |
| | | <if test="inhospstate != null ">and b.inhospstate = #{inhospstate}</if> |
| | | <if test="schemestatus != null ">and b.schemestatus = #{schemestatus}</if> |
| | | <if test="leavediagname != null and leavediagname != ''">and b.leavediagname like concat('%', |
| | | #{leavediagname}, '%') |
| | | </if> |
| | | <if test="drname != null and drname != ''">and b.drname like concat('%', #{drname}, '%')</if> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size()>0"> |
| | | AND b.leavehospitaldistrictcode IN |
| | | <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator="," |
| | | close=")"> |
| | | #{leavehospitaldistrictcode} |
| | | </foreach> |
| | | </if> |
| | | <if test="leaveldeptcodes != null and leaveldeptcodes.size()>0"> |
| | | AND b.leaveldeptcode IN |
| | | <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator="," |
| | | close=")"> |
| | | #{leaveldeptcode} |
| | | </foreach> |
| | | </if> |
| | | order by b.inhospid desc |
| | | </select> |
| | | |
| | |
| | | <if test="mz != null"> |
| | | SELECT deptname |
| | | FROM pat_med_outhosp |
| | | <where> |
| | | del_flag=0 |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and deptcode in |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | where 1=1 |
| | | and del_flag=0 |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and deptcode in |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | </if> |
| | | <if test="mz != null and zy != null"> |
| | | UNION ALL |
| | |
| | | <if test="zy != null"> |
| | | SELECT deptname |
| | | FROM pat_med_inhosp |
| | | <where> |
| | | del_flag=0 |
| | | and inhospstate=0 |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and deptcode in |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | where 1=1 |
| | | and del_flag=0 |
| | | and inhospstate=0 |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and deptcode in |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | </if> |
| | | <if test="cy != null and zy != null"> |
| | | UNION ALL |
| | | SELECT deptname |
| | | FROM pat_med_inhosp |
| | | <where> |
| | | del_flag=0 |
| | | and inhospstate=1 |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and deptcode in |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | where 1=1 |
| | | and del_flag=0 |
| | | and inhospstate=1 |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and deptcode in |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | </if> |
| | | <if test="mz != null and zy != null and cy==null"> |
| | | UNION ALL |
| | | SELECT deptname |
| | | FROM pat_med_inhosp |
| | | <where> |
| | | del_flag=0 |
| | | and inhospstate=1 |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and deptcode in |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | where 1=1 |
| | | and del_flag=0 |
| | | and inhospstate=1 |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and deptcode in |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | </if> |
| | | ) AS combined |
| | | GROUP BY deptname; |
| | |
| | | 0 AS zbsf |
| | | FROM |
| | | pat_med_inhosp |
| | | <where> |
| | | del_flag=0 |
| | | <if test="orgid != null"> |
| | | AND orgid = #{orgid} |
| | | where 1=1 |
| | | and del_flag=0 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="zy != null"> |
| | | and inhospstate=0 |
| | | and date_format(starttime,'%y%m%d') >= date_format(#{startDate},'%y%m%d') |
| | | and date_format(starttime,'%y%m%d') <= date_format(#{endDate},'%y%m%d') |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and deptcode in |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | <if test="zy != null"> |
| | | and inhospstate=0 |
| | | and date_format(starttime,'%y%m%d') >= date_format(#{startDate},'%y%m%d') |
| | | and date_format(starttime,'%y%m%d') <= date_format(#{endDate},'%y%m%d') |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and deptcode in |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | </if> |
| | | <if test="cy != null"> |
| | | and inhospstate=1 |
| | | and date_format(endtime,'%y%m%d') >= date_format(#{startDate},'%y%m%d') |
| | | and date_format(endtime,'%y%m%d') <= date_format(#{endDate},'%y%m%d') |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and leaveldeptcode in |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | <if test="cy != null"> |
| | | and inhospstate=1 |
| | | and date_format(endtime,'%y%m%d') >= date_format(#{startDate},'%y%m%d') |
| | | and date_format(endtime,'%y%m%d') <= date_format(#{endDate},'%y%m%d') |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and leaveldeptcode in |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | </if> |
| | | </where> |
| | | </if> |
| | | <!-- 随访服务人数 --> |
| | | union all |
| | | select |
| | |
| | | 0 AS zbsf |
| | | FROM |
| | | service_subtask |
| | | <where> |
| | | del_flag = 0 |
| | | and service_type=2 |
| | | <if test="orgid != null"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="startDate != null"> |
| | | AND date_format( visit_time, '%y%m%d' ) >= date_format( #{startDate}, '%y%m%d' ) |
| | | </if> |
| | | <if test="endDate != null"> |
| | | AND date_format( visit_time, '%y%m%d' ) <= date_format(#{endDate},'%y%m%d') |
| | | </if> |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and deptcode in |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | and service_type=2 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="startDate != null"> |
| | | AND date_format( visit_time, '%y%m%d' ) >= date_format( #{startDate}, '%y%m%d' ) |
| | | </if> |
| | | <if test="endDate != null"> |
| | | AND date_format( visit_time, '%y%m%d' ) <= date_format(#{endDate},'%y%m%d') |
| | | </if> |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and deptcode in |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | <!-- 首次随访人数 --> |
| | | union all |
| | | select |
| | |
| | | 0 AS zbsf |
| | | FROM |
| | | service_subtask |
| | | <where> |
| | | del_flag = 0 |
| | | and service_type=2 |
| | | and is_visit_again = 0 |
| | | <if test="orgid != null"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="startDate != null"> |
| | | AND date_format( visit_time, '%y%m%d' ) >= date_format( #{startDate}, '%y%m%d' ) |
| | | </if> |
| | | <if test="endDate != null"> |
| | | AND date_format( visit_time, '%y%m%d' ) <= date_format(#{endDate},'%y%m%d') |
| | | </if> |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and deptcode in |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | and service_type=2 |
| | | and is_visit_again = 0 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="startDate != null"> |
| | | AND date_format( visit_time, '%y%m%d' ) >= date_format( #{startDate}, '%y%m%d' ) |
| | | </if> |
| | | <if test="endDate != null"> |
| | | AND date_format( visit_time, '%y%m%d' ) <= date_format(#{endDate},'%y%m%d') |
| | | </if> |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and deptcode in |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | <!-- 再次随访人数 --> |
| | | union all |
| | | select |
| | |
| | | 0 AS zbsf |
| | | FROM |
| | | service_subtask |
| | | <where> |
| | | del_flag = 0 |
| | | and service_type=2 |
| | | and is_visit_again = 1 |
| | | <if test="orgid != null"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="startDate != null"> |
| | | AND date_format( visit_time, '%y%m%d' ) >= date_format( #{startDate}, '%y%m%d' ) |
| | | </if> |
| | | <if test="endDate != null"> |
| | | AND date_format( visit_time, '%y%m%d' ) <= date_format(#{endDate},'%y%m%d') |
| | | </if> |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and deptcode in |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | and service_type=2 |
| | | and is_visit_again = 1 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="startDate != null"> |
| | | AND date_format( visit_time, '%y%m%d' ) >= date_format( #{startDate}, '%y%m%d' ) |
| | | </if> |
| | | <if test="endDate != null"> |
| | | AND date_format( visit_time, '%y%m%d' ) <= date_format(#{endDate},'%y%m%d') |
| | | </if> |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and deptcode in |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | <!-- 专病随访人数 --> |
| | | union all |
| | | select |
| | |
| | | count(1) AS zbsf |
| | | FROM |
| | | service_subtask |
| | | <where> |
| | | del_flag = 0 |
| | | and service_type=13 |
| | | <if test="orgid != null"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | <if test="startDate != null"> |
| | | AND date_format( visit_time, '%y%m%d' ) >= date_format( #{startDate}, '%y%m%d' ) |
| | | </if> |
| | | <if test="endDate != null"> |
| | | AND date_format( visit_time, '%y%m%d' ) <= date_format(#{endDate},'%y%m%d') |
| | | </if> |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and deptcode in |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | and service_type=13 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="startDate != null"> |
| | | AND date_format( visit_time, '%y%m%d' ) >= date_format( #{startDate}, '%y%m%d' ) |
| | | </if> |
| | | <if test="endDate != null"> |
| | | AND date_format( visit_time, '%y%m%d' ) <= date_format(#{endDate},'%y%m%d') |
| | | </if> |
| | | <if test="deptcodeList != null and deptcodeList.size() > 0"> |
| | | and deptcode in |
| | | <foreach collection="deptcodeList" item="deptcode" open="(" separator="," close=")"> |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | ) AS combined_data |
| | | </select> |
| | | |
| | |
| | | <select id="selectPatMedInspectionItemList" parameterType="com.smartor.domain.PatMedInspectionItem" |
| | | resultMap="PatMedInspectionItemResult"> |
| | | <include refid="selectPatMedInspectionItemVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="inspectionid != null and inspectionid != ''">and inspectionid = #{inspectionid}</if> |
| | | <if test="inspectionName != null and inspectionName != ''">and inspection_name = #{inspectionName}</if> |
| | | <if test="reportid != null and reportid != ''">and reportid = #{reportid}</if> |
| | |
| | | <if test="pguid != null and pguid != ''">and pguid = #{pguid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | <if test="pid != null and pid != ''">and pid = #{pid}</if> |
| | | </where> |
| | | -- order by update_time desc |
| | | </select> |
| | | |
| | |
| | | <select id="selectPatMedInspectionList" parameterType="com.smartor.domain.PatMedInspection" |
| | | resultMap="PatMedInspectionResult"> |
| | | <include refid="selectPatMedInspectionVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="projecttype != null">and projecttype = #{projecttype}</if> |
| | | <if test="inhospno != null">and inhospno = #{inhospno}</if> |
| | | <if test="patidHis != null">and patid_his = #{patidHis}</if> |
| | |
| | | <if test="pguid != null">and pguid = #{pguid}</if> |
| | | <if test="guid != null">and guid = #{guid}</if> |
| | | <if test="pid != null">and pid = #{pid}</if> |
| | | </where> |
| | | -- order by update_time desc |
| | | </select> |
| | | |
| | |
| | | <select id="selectPatMedOperationItemList" parameterType="com.smartor.domain.PatMedOperationItem" |
| | | resultMap="PatMedOperationItemResult"> |
| | | <include refid="selectPatMedOperationItemVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="operationid != null "> |
| | | and operationid = #{operationid} |
| | | </if> |
| | |
| | | <if test="pid != null "> |
| | | and pid = #{pid} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPatMedOperationItemById" parameterType="Long" |
| | |
| | | <select id="selectPatMedOperationList" parameterType="com.smartor.domain.PatMedOperation" |
| | | resultMap="PatMedOperationResult"> |
| | | <include refid="selectPatMedOperationVo"/> |
| | | <where> |
| | | del_flag='0' |
| | | where 1=1 |
| | | and del_flag='0' |
| | | <if test="patid != null "> |
| | | and patid = #{patid} |
| | | </if> |
| | |
| | | <if test="opleveldesc != null and opleveldesc != ''"> |
| | | and opleveldesc = #{opleveldesc} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPatMedOperationById" parameterType="Long" |
| | |
| | | pmo.patname, |
| | | pmo.mainsuit |
| | | from pat_med_outhosp pmo |
| | | <where> |
| | | pmo.del_flag=0 |
| | | where 1=1 |
| | | and pmo.del_flag=0 |
| | | <if test="orgid != null ">and pmo.orgid = #{orgid}</if> |
| | | <if test="serialnum != null ">and pmo.serialnum = #{serialnum}</if> |
| | | <if test="serverState != null ">and pmo.server_state = #{serverState}</if> |
| | |
| | | <if test="outhospno != null and outhospno != ''">and pmo.outhospno = #{outhospno}</if> |
| | | <if test="diagcheckFlag != null and diagcheckFlag != ''">and pmo.diagcheck_flag = #{diagcheckFlag}</if> |
| | | <if test="diagname != null and diagname != ''">and pmo.diagname like concat('%',#{diagname}, '%')</if> |
| | | </where> |
| | | order by pmo.update_time desc |
| | | </select> |
| | | |
| | |
| | | 0 AS rs |
| | | FROM |
| | | pat_med_outhosp |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="orgid != null"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | union all |
| | | select |
| | | 0 AS rc, |
| | | count(1) AS rs |
| | | FROM |
| | | service_subtask |
| | | <where> |
| | | del_flag = 0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | and service_type=3 |
| | | <if test="orgid != null"> |
| | | and orgid = #{orgid} |
| | |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | ) AS combined_data |
| | | </select> |
| | | |
| | | <select id="getDeptRanking" parameterType="com.smartor.domain.PatMedReq" resultType="com.smartor.domain.PatMedRes"> |
| | | SELECT deptname, COUNT(1) AS rc |
| | | FROM pat_med_outhosp |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="inhospstate != null"> |
| | | and inhospstate= #{inhospstate} |
| | | </if> |
| | |
| | | #{deptcode} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!-- PatMedOuthospMapper.xml --> |
| | |
| | | <select id="selectPatMedOuthospProvisionalList" parameterType="com.smartor.domain.PatMedOuthospProvisional" |
| | | resultMap="PatMedOuthospProvisionalResult"> |
| | | <include refid="selectPatMedOuthospProvisionalVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="outhospno != null and outhospno != ''"> |
| | | and outhospno = #{outhospno} |
| | | </if> |
| | |
| | | <if test="campusid != null and campusid != ''"> |
| | | and campusid = #{campusid} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPatMedOuthospProvisionalById" parameterType="Long" |
| | |
| | | |
| | | <select id="selectPatMedPhysicalList" parameterType="com.smartor.domain.PatMedPhysical" resultMap="PatMedPhysicalResult"> |
| | | <include refid="selectPatMedPhysicalVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="hospitalname != null and hospitalname != ''"> and hospitalname like concat('%', #{hospitalname}, '%')</if> |
| | | <if test="physicaldate != null "> and physicaldate = #{physicaldate}</if> |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | |
| | | <if test="deptname != null and deptname != ''"> and deptname like concat('%', #{deptname}, '%')</if> |
| | | <if test="patname != null and patname != ''"> and patname like concat('%', #{patname}, '%')</if> |
| | | <if test="projectname != null and projectname != ''"> and projectname like concat('%', #{projectname}, '%')</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPatMedPhysicalById" parameterType="Long" resultMap="PatMedPhysicalResult"> |
| | |
| | | <select id="selectPatMedRegistrationList" parameterType="com.smartor.domain.PatMedRegistration" |
| | | resultMap="PatMedRegistrationResult"> |
| | | <include refid="selectPatMedRegistrationVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="serialnum != null and serialnum != ''">and serialnum = #{serialnum}</if> |
| | | <if test="patid != null ">and patid = #{patid}</if> |
| | | <if test="hospitalname != null and hospitalname != ''">and hospitalname like concat('%', #{hospitalname}, |
| | |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | |
| | | |
| | | <select id="selectPatMedWeightList" parameterType="com.smartor.domain.PatMedWeight" resultMap="PatMedWeightResult"> |
| | | <include refid="selectPatMedWeightVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="serialnum != null and serialnum != ''"> and serialnum = #{serialnum}</if> |
| | | <if test="fatweight != null "> and fatweight = #{fatweight}</if> |
| | | <if test="bodyweight != null "> and bodyweight = #{bodyweight}</if> |
| | |
| | | <if test="sourcename != null and sourcename != ''"> and sourcename like concat('%', #{sourcename}, '%')</if> |
| | | <if test="visittype != null "> and visittype = #{visittype}</if> |
| | | <if test="visitid != null "> and visitid = #{visitid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPatMedWeightById" parameterType="Long" resultMap="PatMedWeightResult"> |
| | |
| | | <select id="selectPatSatisfactionList" parameterType="com.smartor.domain.PatSatisfaction" |
| | | resultMap="PatSatisfactionResult"> |
| | | <include refid="selectPatSatisfactionVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="patName != null and patName != ''"> |
| | | and pat_name like concat('%', #{patName}, '%') |
| | | </if> |
| | |
| | | <if test="endTime != null"> |
| | | AND date_format(update_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPatSatisfactionById" parameterType="Long" |
| | |
| | | <select id="selectPatSpeciallistCategoryList" parameterType="com.smartor.domain.PatSpeciallistCategory" |
| | | resultMap="PatSpeciallistCategoryResult"> |
| | | <include refid="selectPatSpeciallistCategoryVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if> |
| | | <if test="seqno != null ">and seqno = #{seqno}</if> |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | <if test="orgid != null ">and orgid = #{orgid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPatSpeciallistCategoryById" parameterType="Long" resultMap="PatSpeciallistCategoryResult"> |
| | |
| | | |
| | | <select id="selectPatSpeciallistList" parameterType="com.smartor.domain.PatSpeciallist" resultMap="PatSpeciallistResult"> |
| | | <include refid="selectPatSpeciallistVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="patid != null "> and patid = #{patid}</if> |
| | | <if test="sdtype != null and sdtype != ''"> and sdtype = #{sdtype}</if> |
| | | <if test="sddesc != null and sddesc != ''"> and sddesc = #{sddesc}</if> |
| | |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="pid != null "> and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''"> and guid = #{guid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPatSpeciallistById" parameterType="Long" resultMap="PatSpeciallistResult"> |
| | |
| | | |
| | | <select id="selectPatWildcardList" parameterType="com.smartor.domain.PatWildcard" resultMap="PatWildcardResult"> |
| | | <include refid="selectPatWildcardVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="wildcard != null and wildcard != ''">and wildcard = #{wildcard}</if> |
| | | <if test="patField != null and patField != ''">and pat_field = #{patField}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPatWildcardById" parameterType="Long" resultMap="PatWildcardResult"> |
| | |
| | | <select id="selectSchemeAutofinshruleList" parameterType="SchemeAutofinshrule" |
| | | resultMap="SchemeAutofinshruleResult"> |
| | | <include refid="selectSchemeAutofinshruleVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="schemeid != null ">and schemeid = #{schemeid}</if> |
| | | <if test="ruletype != null ">and ruletype = #{ruletype}</if> |
| | | <if test="rulevalue != null and rulevalue != ''">and rulevalue = #{rulevalue}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSchemeAutofinshruleById" parameterType="Long" resultMap="SchemeAutofinshruleResult"> |
| | |
| | | |
| | | <select id="selectSchemeCategoryList" parameterType="SchemeCategory" resultMap="SchemeCategoryResult"> |
| | | <include refid="selectSchemeCategoryVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="categoryname != null and categoryname != ''"> and categoryname like concat('%', #{categoryname}, '%')</if> |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="iscurrency != null "> and iscurrency = #{iscurrency}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSchemeCategoryById" parameterType="Long" resultMap="SchemeCategoryResult"> |
| | |
| | | |
| | | <select id="selectSchemeLocallibraryList" parameterType="SchemeLocallibrary" resultMap="SchemeLocallibraryResult"> |
| | | <include refid="selectSchemeLocallibraryVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="schemecategoryid != null "> and schemecategoryid = #{schemecategoryid}</if> |
| | | <if test="schemename != null and schemename != ''"> and schemename like concat('%', #{schemename}, '%')</if> |
| | | <if test="description != null and description != ''"> and description = #{description}</if> |
| | |
| | | <if test="centerlibrarycode != null and centerlibrarycode != ''"> and centerlibrarycode = #{centerlibrarycode}</if> |
| | | <if test="islocal != null "> and islocal = #{islocal}</if> |
| | | <if test="iscurrency != null "> and iscurrency = #{iscurrency}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSchemeLocallibraryById" parameterType="Long" resultMap="SchemeLocallibraryResult"> |
| | |
| | | |
| | | <select id="selectSchemePlanList" parameterType="SchemePlan" resultMap="SchemePlanResult"> |
| | | <include refid="selectSchemePlanVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="schemeid != null "> and schemeid = #{schemeid}</if> |
| | | <if test="schemecode != null and schemecode != ''"> and schemecode = #{schemecode}</if> |
| | | <if test="patientid != null "> and patientid = #{patientid}</if> |
| | |
| | | <if test="relationid != null "> and relationid = #{relationid}</if> |
| | | <if test="isupload != null "> and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSchemePlanById" parameterType="Long" resultMap="SchemePlanResult"> |
| | |
| | | |
| | | <select id="selectSchemeTaskList" parameterType="SchemeTask" resultMap="SchemeTaskResult"> |
| | | <include refid="selectSchemeTaskVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="schemeid != null "> and schemeid = #{schemeid}</if> |
| | | <if test="schemeplanid != null "> and schemeplanid = #{schemeplanid}</if> |
| | | <if test="patientid != null "> and patientid = #{patientid}</if> |
| | |
| | | <if test="ismanual != null "> and ismanual = #{ismanual}</if> |
| | | <if test="losstime != null "> and losstime = #{losstime}</if> |
| | | <if test="relationlistid != null and relationlistid != ''"> and relationlistid = #{relationlistid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSchemeTaskById" parameterType="Long" resultMap="SchemeTaskResult"> |
| | |
| | | |
| | | <select id="selectSchemeTaskconfigList" parameterType="SchemeTaskconfig" resultMap="SchemeTaskconfigResult"> |
| | | <include refid="selectSchemeTaskconfigVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="schemeid != null "> and schemeid = #{schemeid}</if> |
| | | <if test="triggersceneid != null "> and triggersceneid = #{triggersceneid}</if> |
| | | <if test="triggerruleid != null "> and triggerruleid = #{triggerruleid}</if> |
| | |
| | | <if test="relationlistid != null and relationlistid != ''"> and relationlistid = #{relationlistid}</if> |
| | | <if test="relationcode != null and relationcode != ''"> and relationcode = #{relationcode}</if> |
| | | <if test="isrepeat != null "> and isrepeat = #{isrepeat}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSchemeTaskconfigById" parameterType="Long" resultMap="SchemeTaskconfigResult"> |
| | |
| | | |
| | | <select id="selectSchemeTaskrecordCalldetailList" parameterType="SchemeTaskrecordCalldetail" resultMap="SchemeTaskrecordCalldetailResult"> |
| | | <include refid="selectSchemeTaskrecordCalldetailVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="uuid != null and uuid != ''"> and uuid = #{uuid}</if> |
| | | <if test="phone != null and phone != ''"> and phone = #{phone}</if> |
| | | <if test="operate != null and operate != ''"> and operate = #{operate}</if> |
| | |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="isupload != null "> and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSchemeTaskrecordCalldetailById" parameterType="Long" resultMap="SchemeTaskrecordCalldetailResult"> |
| | |
| | | |
| | | <select id="selectSchemeTaskrecordList" parameterType="SchemeTaskrecord" resultMap="SchemeTaskrecordResult"> |
| | | <include refid="selectSchemeTaskrecordVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="recordtype != null "> and recordtype = #{recordtype}</if> |
| | | <if test="taskid != null "> and taskid = #{taskid}</if> |
| | | <if test="result != null and result != ''"> and result = #{result}</if> |
| | |
| | | <if test="seatsid != null "> and seatsid = #{seatsid}</if> |
| | | <if test="handletype != null "> and handletype = #{handletype}</if> |
| | | <if test="guid != null "> and guid = #{guid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSchemeTaskrecordById" parameterType="Long" resultMap="SchemeTaskrecordResult"> |
| | |
| | | |
| | | <select id="selectSchemeTaskrepeatconfigList" parameterType="SchemeTaskrepeatconfig" resultMap="SchemeTaskrepeatconfigResult"> |
| | | <include refid="selectSchemeTaskrepeatconfigVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="schemeid != null "> and schemeid = #{schemeid}</if> |
| | | <if test="triggersceneid != null "> and triggersceneid = #{triggersceneid}</if> |
| | | <if test="triggerruleid != null "> and triggerruleid = #{triggerruleid}</if> |
| | |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="isupload != null "> and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSchemeTaskrepeatconfigById" parameterType="Long" resultMap="SchemeTaskrepeatconfigResult"> |
| | |
| | | |
| | | <select id="selectSchemeTriggerruleList" parameterType="SchemeTriggerrule" resultMap="SchemeTriggerruleResult"> |
| | | <include refid="selectSchemeTriggerruleVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="conditionstype != null ">and conditionstype = #{conditionstype}</if> |
| | | <if test="orand != null ">and orand = #{orand}</if> |
| | | <if test="ruleconditions != null and ruleconditions != ''">and ruleconditions = #{ruleconditions}</if> |
| | |
| | | <if test="groupnumber != null ">and groupnumber = #{groupnumber}</if> |
| | | <if test="grouporand != null ">and grouporand = #{grouporand}</if> |
| | | <if test="isrequired != null ">and isrequired = #{isrequired}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSchemeTriggerruleById" parameterType="Long" resultMap="SchemeTriggerruleResult"> |
| | |
| | | |
| | | <select id="selectSchemeTriggersceneList" parameterType="SchemeTriggerscene" resultMap="SchemeTriggersceneResult"> |
| | | <include refid="selectSchemeTriggersceneVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="schemeid != null ">and schemeid = #{schemeid}</if> |
| | | <if test="baselinetime != null ">and baselinetime = #{baselinetime}</if> |
| | | <if test="triggerornot != null ">and triggerornot = #{triggerornot}</if> |
| | |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="ismain != null ">and ismain = #{ismain}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSchemeTriggersceneById" parameterType="Long" resultMap="SchemeTriggersceneResult"> |
| | |
| | | <select id="selectServiceCheckList" parameterType="com.smartor.domain.ServiceCheck" |
| | | resultMap="ServiceCheckResult"> |
| | | <include refid="selectServiceCheckVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="deptCode != null and deptCode != ''"> |
| | | and dept_code = #{deptCode} |
| | | </if> |
| | |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectServiceCheckById" parameterType="Long" |
| | |
| | | <select id="selectServiceOutPathList" parameterType="com.smartor.domain.ServiceOutPath" |
| | | resultMap="ServiceOutPathResult"> |
| | | <include refid="selectServiceOutPathVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | and orgid is null |
| | | <if test="param1 != null "> |
| | | and param1 = #{param1} |
| | |
| | | and radix=#{radix} |
| | | </if> |
| | | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectServiceOutPathById" parameterType="Long" |
| | |
| | | <select id="selectServicePatientTempList" parameterType="com.smartor.domain.ServicePatientTemp" |
| | | resultMap="ServicePatientTempResult"> |
| | | <include refid="selectServicePatientTempVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="userId != null "> |
| | | and user_id = #{userId} |
| | | </if> |
| | |
| | | <if test="orgid != null "> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectServicePatientTempById" parameterType="Long" |
| | |
| | | <select id="selectServiceSubtaskAnswerList" parameterType="com.smartor.domain.ServiceSubtaskAnswer" |
| | | resultMap="ServiceSubtaskAnswerResult"> |
| | | <include refid="selectServiceSubtaskAnswerVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <if test="patId != null ">and pat_id = #{patId}</if> |
| | | <if test="orgid != null ">and orgid = #{orgid}</if> |
| | |
| | | <if test="pid != null and pid != ''">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | <if test="answerps != null and answerps != ''">and answerps = #{answerps}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectServiceSubtaskAnswerById" parameterType="Long" resultMap="ServiceSubtaskAnswerResult"> |
| | |
| | | <select id="selectServiceSubtaskDetailList" parameterType="com.smartor.domain.ServiceSubtaskDetail" |
| | | resultMap="ServiceSubtaskDetailResult"> |
| | | <include refid="selectServiceSubtaskDetailVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="subId != null">and sub_id = #{subId}</if> |
| | | <if test="targetid != null">and targetid = #{targetid}</if> |
| | | <if test="extemplateText != null">and extemplate_text = #{extemplateText}</if> |
| | |
| | | <if test="comment != null and comment != ''">and comment = #{comment}</if> |
| | | <if test="scriptid != null ">and scriptid = #{scriptid}</if> |
| | | <if test=" patid != null">and patid = #{patid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectServiceSubtaskDetailByCalldetailid" parameterType="String" resultMap="ServiceSubtaskDetailResult"> |
| | |
| | | |
| | | <select id="selectServiceSubtaskBySendstate" parameterType="com.smartor.domain.ServiceSubtaskVO" |
| | | resultMap="ServiceSubtaskResult"> |
| | | |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <if test="serviceType != null ">and service_type = #{serviceType}</if> |
| | | <if test="patid != null ">and patid = #{patid}</if> |
| | | <if test="sendstates!=null"> |
| | | AND sendstate IN |
| | | <foreach collection="sendstates" item="sendstate" open="(" separator="," |
| | | close=")"> |
| | | #{sendstate} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <if test="serviceType != null ">and service_type = #{serviceType}</if> |
| | | <if test="patid != null ">and patid = #{patid}</if> |
| | | <if test="sendstates!=null"> |
| | | AND sendstate IN |
| | | <foreach collection="sendstates" item="sendstate" open="(" separator="," |
| | | close=")"> |
| | | #{sendstate} |
| | | </foreach> |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="queryServiceSubtaskList" parameterType="com.smartor.domain.ServiceSubtaskVO" |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <if test="visitTime != null"> |
| | | AND date_format(visit_time,'%y%m%d') <= date_format(#{visitTime},'%y%m%d') |
| | | </if> |
| | | <if test="sendstate != null ">and sendstate = #{sendstate}</if> |
| | | </where> |
| | | |
| | | </select> |
| | | |
| | |
| | | <select id="selectServiceSubtaskList" parameterType="com.smartor.domain.ServiceSubtaskVO" |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="sendname != null and sendname != ''">and sendname like concat('%', #{sendname}, '%')</if> |
| | | <if test="phone != null and phone != ''">and phone = #{phone}</if> |
| | | <if test="leavehospitaldistrictcode != null and leavehospitaldistrictcode != ''">and |
| | |
| | | #{visitDeptCodes} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | <if test="sort != null and sort==0">order by endtime asc</if> |
| | | <if test="sort != null and sort==1">order by endtime desc</if> |
| | | <if test="sort != null and sort==2">order by long_send_time asc</if> |
| | |
| | | <select id="getCompensateServiceSubtaskList" parameterType="com.smartor.domain.ServiceSubtaskVO" |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="visitTime != null"> |
| | | AND date_format(visit_time,'%y%m%d') <= date_format(#{visitTime},'%y%m%d') |
| | | </if> |
| | | <if test="sendstate != null ">and sendstate = #{sendstate}</if> |
| | | |
| | | </where> |
| | | |
| | | </select> |
| | | |
| | | <select id="selectServiceSubtaskListByCreateTime" parameterType="com.smartor.domain.ServiceSubtaskVO" |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="createStartTime != null and createEndTime != null">and create_time BETWEEN #{createStartTime} AND |
| | | #{createEndTime} |
| | | </if> |
| | |
| | | <if test="managementDoctor != null">and management_doctor = #{managementDoctor}</if> |
| | | <if test="currentPreachform != null">and current_preachform = #{currentPreachform}</if> |
| | | <if test="isabnormal != null">and isabnormal = #{isabnormal}</if> |
| | | </where> |
| | | |
| | | </select> |
| | | |
| | |
| | | <select id="selectServiceSubtaskListAgain" parameterType="com.smartor.domain.ServiceSubtaskVO" |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | and upid is not null |
| | | and visit_count > 1 |
| | | <if test="createStartTime != null and createEndTime != null">and create_time BETWEEN #{createStartTime} AND |
| | |
| | | <if test="managementDoctorCode != null">and management_doctor_code = #{managementDoctorCode}</if> |
| | | <if test="isabnormal != null">and isabnormal = #{isabnormal}</if> |
| | | <if test="managementDoctor != null">and management_doctor like concat('%',#{managementDoctor}, '%')</if> |
| | | </where> |
| | | |
| | | </select> |
| | | |
| | |
| | | SELECT b.sendstate |
| | | from service_task a |
| | | JOIN service_subtask b on a.taskid = b.taskid and a.pat_cycle = 0 and b.del_flag = 0 |
| | | <where>b.taskid = #{taskid} |
| | | where 1=1 |
| | | and b.taskid = #{taskid} |
| | | and b.patid = #{patid} |
| | | <if test="createTime != null and createTime != ''"> |
| | | DATE_FORMAT(b.create_time, '%Y-%m-%d') LIKE CONCAT(#{createTimeNew}, '%') |
| | | </if> |
| | | <if test="sendstate != null ">and b.sendstate = #{sendstate}</if> |
| | | </where> |
| | | <if test="orgid != null and orgid != ''"> |
| | | and b.orgid = #{orgid} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectTimelyRate" parameterType="com.smartor.domain.ServiceSubtask" resultType="double"> |
| | |
| | | <select id="selectTimelyRateDetail" parameterType="com.smartor.domain.ServiceSubtask" |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | <where> |
| | | id in ( |
| | | where 1=1 |
| | | and id in ( |
| | | SELECT id FROM |
| | | (SELECT id, visit_time, finishtime, |
| | | (CASE WHEN ( DATE_FORMAT( visit_time, '%y%m%d' ) < DATE_FORMAT( IF ( ISNULL( finishtime ), NOW(), |
| | |
| | | <if test="managementDoctorCode != null">and management_doctor_code = #{managementDoctorCode}</if> |
| | | <if test="managementDoctor != null">and management_doctor like concat('%',#{managementDoctor}, '%')</if> |
| | | ) a where a.finished =1) |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectServiceSubtaskById" parameterType="Long" resultMap="ServiceSubtaskResult"> |
| | |
| | | <if test="taskSituation != null">task_situation=#{taskSituation},</if> |
| | | <if test="isabnormal != null">isabnormal=#{isabnormal},</if> |
| | | </trim> |
| | | <where> |
| | | where 1=1 |
| | | <if test="patid != null ">and patid = #{patid}</if> |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | </where> |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | </update> |
| | | |
| | | <update id="updateServiceSubtaskByCondition" parameterType="com.smartor.domain.ServiceSubtask"> |
| | |
| | | <select id="getSfStatistics" parameterType="com.smartor.domain.ServiceSubtaskCountReq" |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0"> |
| | | AND leavehospitaldistrictcode IN |
| | | <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator="," |
| | |
| | | <if test="visitDeptCode != null">and visit_dept_code = #{visitDeptCode}</if> |
| | | <if test="visitDeptName != null">abd visit_dept_name = #{visitDeptName}</if> |
| | | <if test="isabnormal != null">abd isabnormal = #{isabnormal}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="getSfStatisticsJoy" parameterType="com.smartor.domain.ServiceSubtaskCountReq" |
| | |
| | | config_key='joyCount')) joyAllCount |
| | | FROM service_subtask_detail a |
| | | WHERE sub_id IN(SELECT id FROM service_subtask t |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0"> |
| | | AND leavehospitaldistrictcode IN |
| | | <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator="," |
| | |
| | | AND date_format(visit_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d') |
| | | </if> |
| | | <if test="visitDeptCode != null">and visit_dept_code = #{visitDeptCode}</if> |
| | | <if test="visitDeptName != null">abd visit_dept_name = #{visitDeptName}</if> |
| | | <if test="isabnormal != null">abd isabnormal = #{isabnormal}</if> |
| | | </where> |
| | | <if test="visitDeptName != null">and visit_dept_name = #{visitDeptName}</if> |
| | | <if test="isabnormal != null">and isabnormal = #{isabnormal}</if> |
| | | ) |
| | | AND targetid IN ( SELECT id FROM ivr_liba_target WHERE assortid IN (SELECT config_value FROM sys_config WHERE |
| | | config_key='joyCount')) |
| | |
| | | SELECT joyName,joyCount,joyAllCount,ROUND(joyCount/joyAllCount,2) joyTotal FROM ( |
| | | SELECT targetname joyName, |
| | | (select COUNT(sub_id) FROM service_subtask_detail WHERE sub_id IN(SELECT id FROM service_subtask t |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0"> |
| | | AND leavehospitaldistrictcode IN |
| | | <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator="," |
| | |
| | | AND date_format(visit_time,'%y%m%d') >= date_format(#{startTime},'%y%m%d') |
| | | AND date_format(visit_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d') |
| | | </if> |
| | | </where> |
| | | ) AND targetid=a.id) joyCount , (SELECT COUNT(*) from (select sub_id FROM service_subtask_detail |
| | | WHERE sub_id IN(SELECT id FROM service_subtask t |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">AND |
| | | leavehospitaldistrictcode IN |
| | | <foreach |
| | |
| | | AND date_format(visit_time,'%y%m%d') >= date_format(#{startTime},'%y%m%d') |
| | | AND date_format(visit_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d') |
| | | </if> |
| | | </where> |
| | | GROUP BY sub_id ) ) ta ) joyAllCount |
| | | FROM ivr_liba_target a |
| | | WHERE assortid IN (SELECT config_value FROM sys_config WHERE config_key= |
| | |
| | | COUNT(sub_id) joyCount |
| | | FROM service_subtask_detail a |
| | | INNER JOIN service_subtask t ON a.sub_id = t.id |
| | | <where> |
| | | a.del_flag=0 |
| | | where 1=1 |
| | | and a.del_flag=0 |
| | | AND t.del_flag=0 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and a.orgid = #{orgid} |
| | | </if> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0"> |
| | | AND t.leavehospitaldistrictcode IN |
| | | <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator="," |
| | |
| | | <if test="type != null"> |
| | | and t.type = #{type} |
| | | </if> |
| | | </where> |
| | | GROUP BY a.sub_id |
| | | </select> |
| | | |
| | |
| | | FROM |
| | | service_subtask_detail ssd |
| | | INNER JOIN service_subtask ss ON ssd.sub_id = ss.id |
| | | <where> |
| | | ss.del_flag=0 |
| | | where 1=1 |
| | | and ss.del_flag=0 |
| | | <if test="orgid != null and orgid != ''"> |
| | | and ss.orgid = #{orgid} |
| | | </if> |
| | | AND IFNULL(ssd.matchedtext,ssd.asrtext) IS NOT NULL |
| | | AND IFNULL(ssd.matchedtext,ssd.asrtext) != '' |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0"> |
| | |
| | | <if test="configValue != null and configValue != ''"> |
| | | AND ssd.categoryid IN (${configValue}) |
| | | </if> |
| | | </where> |
| | | group by ssd.scriptid, IFNULL(ssd.matchedtext,ssd.asrtext) |
| | | </select> |
| | | |
| | |
| | | SUM(CASE WHEN sendstate = 1 THEN 1 ELSE 0 END) AS blq, |
| | | SUM(CASE WHEN excep IS NOT NULL AND excep != '0' THEN 1 ELSE 0 END) AS yc |
| | | FROM service_subtask |
| | | <where> |
| | | del_flag = 0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="sendname != null and sendname != ''"> |
| | | AND sendname LIKE CONCAT('%', #{sendname}, '%') |
| | | </if> |
| | |
| | | <if test="visitCount != null and visitCount > 1"> |
| | | AND visit_count > 1 |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <select id="selectServiceSubtaskPreachformList" parameterType="com.smartor.domain.ServiceSubtaskPreachform" |
| | | resultMap="ServiceSubtaskPreachformResult"> |
| | | <include refid="selectServiceSubtaskPreachformVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="subid != null "> |
| | | and subid = #{subid} |
| | | </if> |
| | |
| | | <if test="compensateTime != null "> |
| | | and compensate_time = #{compensateTime} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectServiceSubtaskPreachformById" parameterType="Long" |
| | |
| | | #{compensateTime}, |
| | | </if> |
| | | </trim> |
| | | <where> |
| | | <if test="subid != null">subid = |
| | | where 1=1 |
| | | <if test="subid != null">and subid = |
| | | #{subid}, |
| | | </if> |
| | | <if test="taskid != null">taskid = |
| | | <if test="taskid != null">and taskid = |
| | | #{taskid}, |
| | | </if> |
| | | <if test="preachform != null">preachform = |
| | | <if test="preachform != null">and preachform = |
| | | #{preachform}, |
| | | </if> |
| | | <if test="remark != null">remark = |
| | | <if test="remark != null">and remark = |
| | | #{remark}, |
| | | </if> |
| | | <if test="orgid != null">orgid = |
| | | <if test="orgid != null">and orgid = |
| | | #{orgid}, |
| | | </if> |
| | | </where> |
| | | </update> |
| | | |
| | | |
| | |
| | | <select id="selectServiceSubtaskRecordList" parameterType="com.smartor.domain.ServiceSubtaskRecord" |
| | | resultMap="ServiceSubtaskRecordResult"> |
| | | <include refid="selectServiceSubtaskRecordVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="taskid != null and taskid != ''">and taskid = #{taskid}</if> |
| | | <if test="subtaskId != null ">and subtask_id = #{subtaskId}</if> |
| | | <if test="uuid != null and uuid != ''">and uuid = #{uuid}</if> |
| | |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | <if test="remark != null and remark != ''">and remark = #{remark}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectServiceSubtaskRecordById" parameterType="Long" resultMap="ServiceSubtaskRecordResult"> |
| | |
| | | |
| | | <select id="selectServiceTaskList" parameterType="com.smartor.domain.ServiceTask" resultMap="ServiceTaskResult"> |
| | | <include refid="selectServiceTaskVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="taskName != null and taskName != ''">and task_name like concat('%', #{taskName}, '%')</if> |
| | | <if test="taskid != null">and taskid = #{taskid}</if> |
| | | <if test="sendTimeSlot != null and sendTimeSlot != ''">and send_time_slot like concat('%', #{sendTimeSlot}, |
| | |
| | | #{leaveldeptcode} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | order by update_time desc,taskid desc |
| | | </select> |
| | | |
| | |
| | | service_task.nexttaskid, |
| | | service_task.nexttaskname, |
| | | service_task.orgid from service_task |
| | | <where> |
| | | service_task.del_flag=0 |
| | | where 1=1 |
| | | and service_task.del_flag = 0 |
| | | <!-- and taskid in (--> |
| | | <!-- select task_id from service_taskdept--> |
| | | <!-- <where>--> |
| | | <!-- where 1=1--> |
| | | <!-- <if test="leaveldeptcodes != null and leaveldeptcodes.size()>0">--> |
| | | <!-- dept_code in--> |
| | | <!-- and dept_code in--> |
| | | <!-- <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","--> |
| | | <!-- close=")">--> |
| | | <!-- #{leaveldeptcode}--> |
| | | <!-- </foreach>--> |
| | | <!-- </if>--> |
| | | <!-- </where>--> |
| | | <!-- )--> |
| | | <if test="taskName != null and taskName != ''">and service_task.task_name like concat('%', #{taskName}, |
| | | '%') |
| | |
| | | <if test="leavehospitaldistrictcode != null ">and service_task.leavehospitaldistrictcode = |
| | | #{leavehospitaldistrictcode} |
| | | </if> |
| | | |
| | | </where> |
| | | order by update_time desc,taskid desc |
| | | </select> |
| | | |
| | |
| | | <select id="selectServiceTaskdeptList" parameterType="com.smartor.domain.ServiceTaskdept" |
| | | resultMap="ServiceTaskdeptResult"> |
| | | <include refid="selectServiceTaskdeptVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="taskId != null "> |
| | | and task_id = #{taskId} |
| | | </if> |
| | |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectServiceTaskdeptById" parameterType="Long" |
| | |
| | | <if test="orgid != null">orgid = #{orgid}, |
| | | </if> |
| | | </trim> |
| | | <where> |
| | | where 1=1 |
| | | <if test="id != null">and id = #{id}</if> |
| | | <if test="taskId != null">and task_id = #{taskId}</if> |
| | | </where> |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | </update> |
| | | |
| | | <update id="deleteServiceTaskdeptById" parameterType="Long"> |
| | |
| | | del_flag =1, |
| | | update_time = sysdate() |
| | | </trim> |
| | | <where> |
| | | where 1=1 |
| | | <if test="id != null">and id = #{id}</if> |
| | | <if test="taskId != null">and task_id = #{taskId}</if> |
| | | </where> |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND orgid = #{orgid} |
| | | </if> |
| | | </update> |
| | | |
| | | <update id="deleteServiceTaskdeptByIds" parameterType="String"> |
| | |
| | | <select id="selectServiceTaskdiagList" parameterType="com.smartor.domain.ServiceTaskdiag" |
| | | resultMap="ServiceTaskdiagResult"> |
| | | <include refid="selectServiceTaskdiagVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="taskId != null "> |
| | | and task_id = #{taskId} |
| | | </if> |
| | |
| | | <if test="pid != null "> |
| | | and pid = #{pid} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectServiceTaskdiagById" parameterType="Long" |
| | |
| | | <select id="selectServiceTaskoperList" parameterType="com.smartor.domain.ServiceTaskoper" |
| | | resultMap="ServiceTaskoperResult"> |
| | | <include refid="selectServiceTaskoperVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="taskId != null "> |
| | | and task_id = #{taskId} |
| | | </if> |
| | |
| | | <if test="pid != null "> |
| | | and pid = #{pid} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectServiceTaskoperById" parameterType="Long" |
| | |
| | | <select id="selectServiceThirdDataList" parameterType="com.smartor.domain.ServiceThirdData" |
| | | resultMap="ServiceThirdDataResult"> |
| | | <include refid="selectServiceThirdDataVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="dataType != null and dataType != ''">and data_type = #{dataType}</if> |
| | | <if test="dataTypeExplain != null and dataTypeExplain != ''">and data_type_explain = #{dataTypeExplain} |
| | | </if> |
| | |
| | | <if test="isDeal != null">and is_deal = #{isDeal}</if> |
| | | <if test="orgid != null">and orgid = #{orgid}</if> |
| | | <if test="createTime != null ">and create_time <= #{createTime}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <insert id="insertThirdData" parameterType="com.smartor.domain.ServiceThirdData"> |
| | |
| | | |
| | | <select id="selectSvyCategoryList" parameterType="com.smartor.domain.SvyCategory" resultMap="SvyCategoryResult"> |
| | | <include refid="selectSvyCategoryVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="categoryname != null and categoryname != ''">and categoryname like concat('%', #{categoryname}, |
| | | '%') |
| | | </if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyCategoryById" parameterType="String" resultType="com.smartor.domain.SvyCategory"> |
| | |
| | | a.upload_time, |
| | | count(b.svyid) svyNum |
| | | from svy_category a,svy_lib_title b |
| | | <where> |
| | | a.id = b.categoryid |
| | | where 1=1 |
| | | and a.id = b.categoryid |
| | | <if test="orgid != null and orgid != ''"> |
| | | and a.orgid = #{orgid} |
| | | </if> |
| | | <if test="categoryname != null and categoryname != ''"> |
| | | and categoryname = #{categoryname} |
| | | </if> |
| | | </where> |
| | | group by a.categoryname |
| | | </select> |
| | | |
| | |
| | | |
| | | <select id="selectSvyFinishList" parameterType="SvyFinish" resultMap="SvyFinishResult"> |
| | | <include refid="selectSvyFinishVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="svytitle != null and svytitle != ''"> and svytitle = #{svytitle}</if> |
| | | <if test="totalscore != null "> and totalscore = #{totalscore}</if> |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="isabnormal != null "> and isabnormal = #{isabnormal}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyFinishById" parameterType="Long" resultMap="SvyFinishResult"> |
| | |
| | | |
| | | <select id="selectSvyFinishoptionList" parameterType="SvyFinishoption" resultMap="SvyFinishoptionResult"> |
| | | <include refid="selectSvyFinishoptionVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="psqoptionid != null "> and psqoptionid = #{psqoptionid}</if> |
| | | <if test="content != null and content != ''"> and content = #{content}</if> |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="isrobot != null "> and isrobot = #{isrobot}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyFinishoptionById" parameterType="Long" resultMap="SvyFinishoptionResult"> |
| | |
| | | |
| | | <select id="selectSvyFinishtopicList" parameterType="SvyFinishtopic" resultMap="SvyFinishtopicResult"> |
| | | <include refid="selectSvyFinishtopicVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="topicid != null "> and topicid = #{topicid}</if> |
| | | <if test="score != null "> and score = #{score}</if> |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="isupload != null "> and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyFinishtopicById" parameterType="Long" resultMap="SvyFinishtopicResult"> |
| | |
| | | |
| | | <select id="selectSvyLibExceptionList" parameterType="SvyLibException" resultMap="SvyLibExceptionResult"> |
| | | <include refid="selectSvyLibExceptionVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="oldid != null "> and oldid = #{oldid}</if> |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="questionoptionid != null "> and questionoptionid = #{questionoptionid}</if> |
| | |
| | | <if test="istrack != null "> and istrack = #{istrack}</if> |
| | | <if test="isupload != null "> and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyLibExceptionByEcid" parameterType="Long" resultMap="SvyLibExceptionResult"> |
| | |
| | | |
| | | <select id="selectSvyLibResultList" parameterType="SvyLibResult" resultMap="SvyLibResultResult"> |
| | | <include refid="selectSvyLibResultVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="svyid != null "> and svyid = #{svyid}</if> |
| | | <if test="resultcontent != null and resultcontent != ''"> and resultcontent = #{resultcontent}</if> |
| | | <if test="orand != null "> and orand = #{orand}</if> |
| | |
| | | <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> |
| | | <if test="isupload != null "> and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyLibResultByResultid" parameterType="Long" resultMap="SvyLibResultResult"> |
| | |
| | | |
| | | <select id="selectSvyLibScriptList" parameterType="com.smartor.domain.SvyLibScript" resultMap="SvyLibScriptResult"> |
| | | <include refid="selectSvyLibScriptVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="id != null ">and id = #{id}</if> |
| | | <if test="scriptType != null and scriptType != ''">and script_type = #{scriptType}</if> |
| | | <if test="categoryid != null ">and categoryid = #{categoryid}</if> |
| | |
| | | <if test="targetname != null and targetname != ''">and targetname = #{targetname}</if> |
| | | <if test="targettype != null and targettype != ''">and targettype = #{targettype}</if> |
| | | <if test="targetoptions != null and targetoptions != ''">and targetoptions = #{targetoptions}</if> |
| | | </where> |
| | | order by id desc |
| | | </select> |
| | | |
| | |
| | | <select id="selectSvyLibScriptOptionList" parameterType="com.smartor.domain.SvyLibScriptOption" |
| | | resultMap="SvyLibScriptOptionResult"> |
| | | <include refid="selectSvyLibScriptOptionVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="topicid != null ">and topicid = #{topicid}</if> |
| | | <if test="svyid != null ">and svyid = #{svyid}</if> |
| | | <if test="topictype != null ">and topictype = #{topictype}</if> |
| | |
| | | <if test="appendflag != null">and appendflag = #{appendflag}</if> |
| | | <if test="appenddesc != null">and appenddesc = #{appenddesc}</if> |
| | | <if test="picturePath != null">and picture_path = #{picturePath}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyLibScriptOptionByOptionid" parameterType="Long" resultMap="SvyLibScriptOptionResult"> |
| | |
| | | <select id="selectSvyLibScriptTagList" parameterType="com.smartor.domain.SvyLibScriptTag" |
| | | resultMap="SvyLibScriptTagResult"> |
| | | <include refid="selectSvyLibScriptTagVo"/> |
| | | <where> |
| | | del_flag = 0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="tagcategoryid != null ">and tagcategoryid = #{tagcategoryid}</if> |
| | | <if test="scriptid != null ">and scriptid = #{scriptid}</if> |
| | | <if test="tagid != null ">and tagid = #{tagid}</if> |
| | |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyLibScriptTagById" parameterType="Long" resultMap="SvyLibScriptTagResult"> |
| | |
| | | <select id="selectSvyLibTemplateCategoryList" parameterType="com.smartor.domain.SvyLibTemplateCategory" |
| | | resultMap="SvyLibTemplateCategoryResult"> |
| | | <include refid="selectSvyLibTemplateCategoryVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if> |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | <if test="orgid != null ">and orgid = #{orgid}</if> |
| | | <if test="seqno != null ">and seqno = #{seqno}</if> |
| | | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyLibTemplateCategoryById" parameterType="Long" resultMap="SvyLibTemplateCategoryResult"> |
| | |
| | | LEFT JOIN (select outid,GROUP_CONCAT(icd10code) as icd10code,GROUP_CONCAT(icd10name) as icd10name from |
| | | icd10_association group by outid) b ON a.del_flag = 0 |
| | | AND a.svyid = b.outid |
| | | <where> |
| | | a.del_flag=0 |
| | | where 1=1 |
| | | and a.del_flag=0 |
| | | <if test="categoryid != null ">and a.categoryid = #{categoryid}</if> |
| | | <if test="svyid != null ">and a.svyid = #{svyid}</if> |
| | | <if test="longTemp != null ">and a.long_temp = #{longTemp}</if> |
| | |
| | | <if test="svyname != null and svyname != ''">and a.svyname like concat('%', #{svyname}, '%')</if> |
| | | <if test="description != null and description != ''">and b.icd10name like concat('%', #{description}, '%') |
| | | </if> |
| | | </where> |
| | | order by a.create_time desc |
| | | </select> |
| | | |
| | |
| | | <select id="selectSvyLibTemplateScriptList" parameterType="com.smartor.domain.SvyLibTemplateScript" |
| | | resultMap="SvyLibTemplateScriptResult"> |
| | | <include refid="selectSvyLibTemplateScriptVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="nextScriptno != null ">and next_scriptno = #{nextScriptno}</if> |
| | | <if test="scriptType != null and scriptType != ''">and script_type = #{scriptType}</if> |
| | | <if test="scriptno != null and scriptno != ''">and scriptno = #{scriptno}</if> |
| | |
| | | <if test="targetoptions != null and targetoptions != ''">and targetoptions = #{targetoptions}</if> |
| | | <if test="score != null">and score = #{score}</if> |
| | | <if test="groupName != null">and group_name = #{groupName}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyLibTemplateScriptByTopicid" parameterType="Long" resultMap="SvyLibTemplateScriptResult"> |
| | |
| | | |
| | | <select id="selectSvyLibTemplateScriptWjxList" parameterType="com.smartor.domain.SvyLibTemplateScriptWjx" resultMap="SvyLibTemplateScriptWjxResult"> |
| | | <include refid="selectSvyLibTemplateScriptWjxVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="oldid != null "> and oldid = #{oldid}</if> |
| | | <if test="svyid != null "> and svyid = #{svyid}</if> |
| | | <if test="scriptType != null and scriptType != ''"> and script_type = #{scriptType}</if> |
| | |
| | | <if test="scoretype != null and scoretype != ''"> and scoretype = #{scoretype}</if> |
| | | <if test="score != null and score != ''"> and score = #{score}</if> |
| | | <if test="scriptDesc != null and scriptDesc != ''"> and script_desc = #{scriptDesc}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyLibTemplateScriptWjxById" parameterType="Long" resultMap="SvyLibTemplateScriptWjxResult"> |
| | |
| | | <select id="selectSvyLibTemplateTagList" parameterType="com.smartor.domain.SvyLibTemplateTag" |
| | | resultMap="SvyLibTemplateTagResult"> |
| | | <include refid="selectSvyLibTemplateTagVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="tagcategoryid != null ">and tagcategoryid = #{tagcategoryid}</if> |
| | | <if test="templateid != null ">and templateid = #{templateid}</if> |
| | | <if test="tagid != null ">and tagid = #{tagid}</if> |
| | |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyLibTemplateTagById" parameterType="Long" resultMap="SvyLibTemplateTagResult"> |
| | |
| | | <select id="selectSvyLibTemplateTargetoptionList" parameterType="com.smartor.domain.SvyLibTemplateTargetoption" |
| | | resultMap="SvyLibTemplateTargetoptionResult"> |
| | | <include refid="selectSvyLibTemplateTargetoptionVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="groupid != null and groupid != ''">and groupid = #{groupid}</if> |
| | | <if test="categoryName != null and categoryName != ''">and categoryName like concat('%', #{categoryName}, |
| | | '%') |
| | |
| | | <if test="optionNo != null">and option_no = #{optionNo}</if> |
| | | <if test="sendTaskid != null">and send_taskid= #{sendTaskid}</if> |
| | | <if test="sendTaskname != null">and send_taskname = #{sendTaskname}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyLibTemplateTargetoptionById" parameterType="Long" resultMap="SvyLibTemplateTargetoptionResult"> |
| | |
| | | parameterType="com.smartor.domain.SvyLibTemplateTargetoptionWjx" |
| | | resultMap="SvyLibTemplateTargetoptionWjxResult"> |
| | | <include refid="selectSvyLibTemplateTargetoptionWjxVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="groupid != null and groupid != ''">and groupid = #{groupid}</if> |
| | | <if test="categoryName != null and categoryName != ''">and categoryName like concat('%', #{categoryName}, |
| | | '%') |
| | |
| | | <if test="appendflag != null and appendflag != ''">and appendflag = #{appendflag}</if> |
| | | <if test="appenddesc != null and appenddesc != ''">and appenddesc = #{appenddesc}</if> |
| | | <if test="sort != null">and sort = #{sort}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyLibTemplateTargetoptionWjxById" parameterType="Long" |
| | |
| | | <select id="selectSvyLibTemplateWjxList" parameterType="com.smartor.domain.SvyLibTemplateWjx" |
| | | resultMap="SvyLibTemplateWjxResult"> |
| | | <include refid="selectSvyLibTemplateWjxVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="templateid != null ">and templateid = #{templateid}</if> |
| | | <if test="categoryid != null ">and categoryid = #{categoryid}</if> |
| | | <if test="svycode != null and svycode != ''">and svycode = #{svycode}</if> |
| | |
| | | <if test="reply != null and reply != ''">and reply = #{reply}</if> |
| | | <if test="scriptScore != null and scriptScore != ''">and script_score = #{scriptScore}</if> |
| | | <if test="scoreType != null and scoreType != ''">and score_type = #{scoreType}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyLibTemplateWjxBySvyid" parameterType="Long" resultMap="SvyLibTemplateWjxResult"> |
| | |
| | | <select id="selectSvyLibScriptCategoryList" parameterType="com.smartor.domain.SvyLibScriptCategory" |
| | | resultMap="SvyLibScriptCategoryResult"> |
| | | <include refid="selectSvyLibScriptCategoryVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if> |
| | | <if test="topicid != null ">and topicid = #{topicid}</if> |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | <if test="orgid != null ">and orgid = #{orgid}</if> |
| | | <if test="seqno != null ">and seqno = #{seqno}</if> |
| | | </where> |
| | | order by seqno asc |
| | | </select> |
| | | |
| | |
| | | |
| | | <select id="selectSvyLibTopicdirectionList" parameterType="com.smartor.domain.SvyLibTopicdirection" resultMap="SvyLibTopicdirectionResult"> |
| | | <include refid="selectSvyLibTopicdirectionVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="topicid != null "> and topicid = #{topicid}</if> |
| | | <if test="transverse != null and transverse != ''"> and transverse = #{transverse}</if> |
| | | <if test="direction != null and direction != ''"> and direction = #{direction}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyLibTopicdirectionById" parameterType="Long" resultMap="SvyLibTopicdirectionResult"> |
| | |
| | | <select id="selectSvyTaskAnswerList" parameterType="com.smartor.domain.SvyTaskAnswer" |
| | | resultMap="SvyTaskAnswerResult"> |
| | | <include refid="selectSvyTaskAnswerVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <if test="singleid != null ">and singleid = #{singleid}</if> |
| | | <if test="scriptid != null ">and scriptid = #{scriptid}</if> |
| | |
| | | <if test="pid != null and pid != ''">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyTaskAnswerById" parameterType="Long" resultMap="SvyTaskAnswerResult"> |
| | |
| | | |
| | | <select id="selectSvyTaskList" parameterType="com.smartor.domain.SvyTask" resultMap="SvyTaskResult"> |
| | | <include refid="selectSvyTaskVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="svrtaskid != null ">and svrtaskid = #{svrtaskid}</if> |
| | | <if test="taskName != null and taskName != ''">and task_name like concat('%', #{taskName}, '%')</if> |
| | | <if test="templateid != null and templateid != ''">and templateid = #{templateid}</if> |
| | |
| | | </if> |
| | | <if test="libtemplateid != null ">and libtemplateid = #{libtemplateid}</if> |
| | | <if test="libtemplatename != null and libtemplatename != ''">and libtemplatename = #{libtemplatename}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyTaskByTaskid" parameterType="Long" resultMap="SvyTaskResult"> |
| | |
| | | |
| | | <select id="selectSvyTaskScriptList" parameterType="com.smartor.domain.SvyTaskScript" resultMap="SvyTaskScriptResult"> |
| | | <include refid="selectSvyTaskScriptVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="scriptType != null "> and script_type = #{scriptType}</if> |
| | | <if test="scriptCode != null and scriptCode != ''"> and script_code = #{scriptCode}</if> |
| | | <if test="script != null and script != ''"> and script = #{script}</if> |
| | |
| | | <if test="score != null and score != ''"> and score = #{score}</if> |
| | | <if test="showtype != null and showtype != ''"> and showtype = #{showtype}</if> |
| | | <if test="picturePath != null and picturePath != ''"> and picture_path = #{picturePath}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyTaskScriptById" parameterType="Long" resultMap="SvyTaskScriptResult"> |
| | |
| | | |
| | | <select id="selectSvyTaskScriptoptionList" parameterType="com.smartor.domain.SvyTaskScriptoption" resultMap="SvyTaskScriptoptionResult"> |
| | | <include refid="selectSvyTaskScriptoptionVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="taskScriptId != null "> and task_script_id = #{taskScriptId}</if> |
| | | <if test="svyid != null "> and svyid = #{svyid}</if> |
| | | <if test="scriptType != null "> and script_type = #{scriptType}</if> |
| | |
| | | <if test="scoretype != null and scoretype != ''"> and scoretype = #{scoretype}</if> |
| | | <if test="showtype != null and showtype != ''"> and showtype = #{showtype}</if> |
| | | <if test="picturePath != null and picturePath != ''"> and picture_path = #{picturePath}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyTaskScriptoptionById" parameterType="Long" resultMap="SvyTaskScriptoptionResult"> |
| | |
| | | <select id="selectSvyTaskSingleList" parameterType="com.smartor.domain.SvyTaskSingle" |
| | | resultMap="SvyTaskSingleResult"> |
| | | <include refid="selectSvyTaskSingleVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="sendname != null and sendname != ''">and sendname like concat('%', #{sendname}, '%')</if> |
| | | <if test="phone != null and phone != ''">and phone = #{phone}</if> |
| | | <if test="sex != null and sex != ''">and sex = #{sex}</if> |
| | |
| | | <if test="roomno != null and roomno != ''">and roomno = #{roomno}</if> |
| | | <if test="bedno != null and bedno != ''">and bedno = #{bedno}</if> |
| | | <if test="patid != null ">and patid = #{patid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyTaskSingleById" parameterType="Long" resultMap="SvyTaskSingleResult"> |
| | |
| | | <select id="selectSvyTaskTemplateList" parameterType="com.smartor.domain.SvyTaskTemplate" |
| | | resultMap="SvyTaskTemplateResult"> |
| | | <include refid="selectSvyTaskTemplateVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="templateid != null ">and templateid = #{templateid}</if> |
| | | <if test="id != null ">and id = #{id}</if> |
| | | <if test="categoryid != null ">and categoryid = #{categoryid}</if> |
| | |
| | | <if test="deptCode != null ">and dept_code = #{deptCode}</if> |
| | | <if test="longTemp != null ">and long_temp = #{longTemp}</if> |
| | | <if test="sendDay != null ">and send_day = #{sendDay}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyTaskTemplateBySvyid" parameterType="Long" resultMap="SvyTaskTemplateResult"> |
| | |
| | | <select id="selectSvyTaskTemplateScriptList" parameterType="com.smartor.domain.SvyTaskTemplateScript" |
| | | resultMap="SvyTaskTemplateScriptResult"> |
| | | <include refid="selectSvyTaskTemplateScriptVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <if test="categoryid != null ">and categoryid = #{categoryid}</if> |
| | | <if test="ishide != null ">and ishide = #{ishide}</if> |
| | |
| | | <if test="branchNextscriptno != null and branchNextscriptno != ''">and branch_nextscriptno = |
| | | #{branchNextscriptno} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyTaskTemplateScriptByID" parameterType="Long" resultMap="SvyTaskTemplateScriptResult"> |
| | |
| | | <select id="selectSvyTaskTemplateTargetoptionList" parameterType="com.smartor.domain.SvyTaskTemplateTargetoption" |
| | | resultMap="SvyTaskTemplateTargetoptionResult"> |
| | | <include refid="selectSvyTaskTemplateTargetoptionVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <if test="score != null ">and score = #{score}</if> |
| | | <if test="prompt != null ">and prompt = #{prompt}</if> |
| | |
| | | <if test="appenddesc != null">and appenddesc = #{appenddesc}</if> |
| | | <if test="sendTaskid != null">and send_taskid= #{sendTaskid}</if> |
| | | <if test="sendTaskname != null">and send_taskname = #{sendTaskname}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyTaskTemplateTargetoptionById" parameterType="Long" |
| | |
| | | |
| | | <select id="selectSvyTopicList" parameterType="com.smartor.domain.SvyTopic" resultMap="SvyTopicResult"> |
| | | <include refid="selectSvyTopicVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="topictype != null ">and topictype = #{topictype}</if> |
| | | <if test="topiccode != null and topiccode != ''">and topiccode = #{topiccode}</if> |
| | | <if test="topic != null and topic != ''">and topic = #{topic}</if> |
| | |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyTopicByTopicid" parameterType="Long" resultMap="SvyTopicResult"> |
| | |
| | | <select id="selectSvyTopicoptionList" parameterType="com.smartor.domain.SvyTopicoption" |
| | | resultMap="SvyTopicoptionResult"> |
| | | <include refid="selectSvyTopicoptionVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="topicid != null ">and topicid = #{topicid}</if> |
| | | <if test="svyid != null ">and svyid = #{svyid}</if> |
| | | <if test="topictype != null ">and topictype = #{topictype}</if> |
| | |
| | | <if test="oldid != null ">and oldid = #{oldid}</if> |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyTopicoptionByOptionid" parameterType="Long" resultMap="SvyTopicoptionResult"> |
| | |
| | | <select id="selectSysUserDeptList" parameterType="com.ruoyi.common.core.domain.entity.SysUserDept" |
| | | resultMap="SysUserDeptResult"> |
| | | <include refid="selectSysUserDeptVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | and orgid=#{orgid} |
| | | <if test="userId != null "> |
| | | and user_id = #{userId} |
| | |
| | | <if test="campusid != null "> |
| | | and campusid = #{campusid} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSysUserDeptById" parameterType="Long" |
| | |
| | | <select id="selectSysUserImportList" parameterType="com.smartor.domain.SysUserImport" |
| | | resultMap="SysUserImportResult"> |
| | | <include refid="selectSysUserImportVo"/> |
| | | <where> |
| | | where 1=1 |
| | | <if test="subId != null "> |
| | | and sub_id = #{subId} |
| | | </if> |
| | |
| | | <if test="defaultWardName != null and defaultWardName != ''"> |
| | | and default_ward_name = #{defaultWardName} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSysUserImportById" parameterType="Long" |
| | |
| | | <select id="selectUserRoleByRoleIdAndUserId" resultMap="SysUserRoleResult"> |
| | | select user_id,role_id,guid,orgid |
| | | from sys_user_role |
| | | <where> |
| | | where 1=1 |
| | | <if test="roleId != null ">and role_id = #{roleId}</if> |
| | | <if test="userId != null ">and user_id = #{userId}</if> |
| | | |
| | | </where> |
| | | </select> |
| | | |
| | | <delete id="deleteUserRole" parameterType="Long"> |
| | |
| | | <select id="selectTemplateDeptList" parameterType="com.smartor.domain.TemplateDept" |
| | | resultMap="TemplateDeptResult"> |
| | | <include refid="selectTemplateDeptVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | where 1=1 |
| | | and del_flag = 0 |
| | | <if test="type != null "> |
| | | and type = #{type} |
| | | </if> |
| | |
| | | <if test="longTemp != null and longTemp != ''"> |
| | | and long_temp = #{longTemp} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectTemplateDeptById" parameterType="Long" |