| ÎļþÃû´Ó smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml ÐÞ¸Ä |
| | |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.smartor.mapper.ServiceSubtaskMapper"> |
| | | <mapper namespace="com.ruoyi.task.mapper.ServiceSubtaskMapper"> |
| | | |
| | | <resultMap type="com.smartor.domain.ServiceSubtask" id="ServiceSubtaskResult"> |
| | | <resultMap type="com.ruoyi.task.domain.ServiceSubtask" id="ServiceSubtaskResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="sendname" column="sendname"/> |
| | | <result property="phone" column="phone"/> |
| | |
| | | <result property="campusid" column="campusid"/> |
| | | </resultMap> |
| | | |
| | | <resultMap type="com.smartor.domain.ServiceSubtaskCount" id="ServiceSubtaskResult2"> |
| | | <resultMap type="com.ruoyi.task.domain.ServiceSubtaskCount" id="ServiceSubtaskResult2"> |
| | | <result property="month" column="month"/> |
| | | <result property="serviceType" column="service_type"/> |
| | | <result property="subTaskId" column="subTaskId"/> |
| | |
| | | |
| | | </resultMap> |
| | | |
| | | <resultMap type="com.smartor.domain.ServiceSubtaskScriptCount" id="ServiceSubtaskScriptCountResult"> |
| | | <resultMap type="com.ruoyi.task.domain.ServiceSubtaskScriptCount" id="ServiceSubtaskScriptCountResult"> |
| | | <result property="scriptid" column="scriptid"/> |
| | | <result property="templateid" column="templateid"/> |
| | | <result property="scriptType" column="script_type"/> |
| | |
| | | <result property="options" column="options"/> |
| | | </resultMap> |
| | | |
| | | <resultMap type="com.smartor.domain.ServiceSubtaskStatistic" id="ServiceSubtaskStatisticResult"> |
| | | <resultMap type="com.ruoyi.task.domain.ServiceSubtaskStatistic" id="ServiceSubtaskStatisticResult"> |
| | | <result property="taskName" column="task_name"/> |
| | | <result property="drcode" column="drcode"/> |
| | | <result property="drname" column="drname"/> |
| | |
| | | from service_subtask |
| | | </sql> |
| | | |
| | | <select id="selectServiceSubtaskBySendstate" parameterType="com.smartor.domain.entity.ServiceSubtaskEntity" |
| | | <select id="selectServiceSubtaskBySendstate" parameterType="com.ruoyi.task.domain.entity.ServiceSubtaskEntity" |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | where 1=1 |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="queryServiceSubtaskList" parameterType="com.smartor.domain.entity.ServiceSubtaskEntity" |
| | | <select id="queryServiceSubtaskList" parameterType="com.ruoyi.task.domain.entity.ServiceSubtaskEntity" |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | where 1=1 |
| | |
| | | <if test="continueTimeNext != null ">and continue_time_next = #{continueTimeNext}</if> |
| | | </select> |
| | | |
| | | <select id="selectServiceSubtaskList" parameterType="com.smartor.domain.entity.ServiceSubtaskEntity" |
| | | <select id="selectServiceSubtaskList" parameterType="com.ruoyi.task.domain.entity.ServiceSubtaskEntity" |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | where del_flag = 0 |
| | |
| | | <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if> |
| | | </select> |
| | | |
| | | <select id="getCompensateServiceSubtaskList" parameterType="com.smartor.domain.entity.ServiceSubtaskEntity" |
| | | <select id="getCompensateServiceSubtaskList" parameterType="com.ruoyi.task.domain.entity.ServiceSubtaskEntity" |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | where del_flag = 0 |
| | |
| | | <if test="continueTimeNext != null ">and continue_time_next = #{continueTimeNext}</if> |
| | | </select> |
| | | |
| | | <select id="selectServiceSubtaskListByCreateTime" parameterType="com.smartor.domain.entity.ServiceSubtaskEntity" |
| | | <select id="selectServiceSubtaskListByCreateTime" parameterType="com.ruoyi.task.domain.entity.ServiceSubtaskEntity" |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | where del_flag = 0 |
| | |
| | | |
| | | </select> |
| | | |
| | | <select id="selectServiceSubtaskListAgain" parameterType="com.smartor.domain.entity.ServiceSubtaskEntity" |
| | | <select id="selectServiceSubtaskListAgain" parameterType="com.ruoyi.task.domain.entity.ServiceSubtaskEntity" |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | where 1=1 |
| | |
| | | <if test="continueTimeNext != null ">and continue_time_next = #{continueTimeNext}</if> |
| | | </select> |
| | | |
| | | <select id="selectSendstateByCondition" parameterType="com.smartor.domain.ServiceSubtask" resultType="Integer"> |
| | | <select id="selectSendstateByCondition" parameterType="com.ruoyi.task.domain.ServiceSubtask" resultType="Integer"> |
| | | 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 |
| | |
| | | <if test="campusid != null and campusid != ''">and b.campusid = #{campusid}</if> |
| | | </select> |
| | | |
| | | <select id="selectTimelyRate" parameterType="com.smartor.domain.ServiceSubtask" resultType="double"> |
| | | <select id="selectTimelyRate" parameterType="com.ruoyi.task.domain.ServiceSubtask" resultType="double"> |
| | | SELECT sum( a.finished )/ sum( 1 ) FROM |
| | | (SELECT id, visit_time, finishtime, |
| | | (CASE WHEN ( DATE_FORMAT( visit_time, '%y%m%d' )< DATE_FORMAT( IF ( ISNULL( finishtime ), NOW(), finishtime |
| | |
| | | ) a |
| | | </select> |
| | | |
| | | <select id="selectTimelyRateBatch" parameterType="com.smartor.domain.entity.ServiceSubtaskEntity" resultType="map"> |
| | | <select id="selectTimelyRateBatch" parameterType="com.ruoyi.task.domain.entity.ServiceSubtaskEntity" resultType="map"> |
| | | SELECT |
| | | <if test="groupKey != null and groupKey != ''"> |
| | | ss.${groupKey} as groupKey, |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectTimelyRateDetail" parameterType="com.smartor.domain.ServiceSubtask" |
| | | <select id="selectTimelyRateDetail" parameterType="com.ruoyi.task.domain.ServiceSubtask" |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | where 1=1 |
| | |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectServiceSubtaskByDiagname" parameterType="com.smartor.domain.ServiceSubtask" |
| | | <select id="selectServiceSubtaskByDiagname" parameterType="com.ruoyi.task.domain.ServiceSubtask" |
| | | resultMap="ServiceSubtaskResult"> |
| | | select sendstate,starttime,endtime,nurse_name,phone,sex,task_name,sendname,leavediagname,visit_time FROM |
| | | service_subtask WHERE del_flag=0 |
| | |
| | | <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if> |
| | | </select> |
| | | |
| | | <insert id="insertServiceSubtask" parameterType="com.smartor.domain.ServiceSubtask" useGeneratedKeys="true" |
| | | <insert id="insertServiceSubtask" parameterType="com.ruoyi.task.domain.ServiceSubtask" useGeneratedKeys="true" |
| | | keyProperty="id"> |
| | | insert into service_subtask |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateServiceSubtask" parameterType="com.smartor.domain.ServiceSubtask"> |
| | | <update id="updateServiceSubtask" parameterType="com.ruoyi.task.domain.ServiceSubtask"> |
| | | update service_subtask |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="sendname != null">sendname = #{sendname},</if> |
| | |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="updateServiceSubtaskByPatId" parameterType="com.smartor.domain.ServiceSubtask"> |
| | | <update id="updateServiceSubtaskByPatId" parameterType="com.ruoyi.task.domain.ServiceSubtask"> |
| | | update service_subtask |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="sendname != null">sendname = #{sendname},</if> |
| | |
| | | <if test="campusid != null and campusid != ''">and campusid = #{campusid}</if> |
| | | </update> |
| | | |
| | | <update id="updateServiceSubtaskByCondition" parameterType="com.smartor.domain.ServiceSubtask"> |
| | | <update id="updateServiceSubtaskByCondition" parameterType="com.ruoyi.task.domain.ServiceSubtask"> |
| | | update service_subtask |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="sendname != null">sendname = #{sendname},</if> |
| | |
| | | </where> |
| | | </update> |
| | | |
| | | <update id="updateServiceSubtaskByTaskGuid" parameterType="com.smartor.domain.ServiceSubtask"> |
| | | <update id="updateServiceSubtaskByTaskGuid" parameterType="com.ruoyi.task.domain.ServiceSubtask"> |
| | | update service_subtask |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="sendname != null">sendname = #{sendname},</if> |
| | |
| | | where patid = #{patid} and taskid = #{taskid} |
| | | </update> |
| | | |
| | | <select id="getSfStatistics" parameterType="com.smartor.domain.ServiceSubtaskCountReq" |
| | | <select id="getSfStatistics" parameterType="com.ruoyi.task.domain.ServiceSubtaskCountReq" |
| | | resultMap="ServiceSubtaskResult"> |
| | | select id, |
| | | visit_count, |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getSpecialSfStatistics" parameterType="com.smartor.domain.ServiceSubtaskCountReq" |
| | | <select id="getSpecialSfStatistics" parameterType="com.ruoyi.task.domain.ServiceSubtaskCountReq" |
| | | resultMap="ServiceSubtaskStatisticResult"> |
| | | select |
| | | <if test="groupKey != null and groupKey == 'task_name'"> |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getSfStatisticsGroupKey" parameterType="com.smartor.domain.ServiceSubtaskCountReq" |
| | | <select id="getSfStatisticsGroupKey" parameterType="com.ruoyi.task.domain.ServiceSubtaskCountReq" |
| | | resultType="String"> |
| | | select |
| | | <if test="groupKey != null and groupKey != ''"> |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getSfStatisticsHyperlink" parameterType="com.smartor.domain.ServiceSubtaskCountReq" |
| | | <select id="getSfStatisticsHyperlink" parameterType="com.ruoyi.task.domain.ServiceSubtaskCountReq" |
| | | resultMap="ServiceSubtaskResult"> |
| | | select id, |
| | | visit_count, |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getSfStatisticsJoy" parameterType="com.smartor.domain.ServiceSubtaskCountReq" |
| | | <select id="getSfStatisticsJoy" parameterType="com.ruoyi.task.domain.ServiceSubtaskCountReq" |
| | | resultMap="ServiceSubtaskResult2"> |
| | | SELECT sub_id as subTaskId,COUNT(sub_id) joyCount, |
| | | (SELECT COUNT(1) FROM ivr_liba_target WHERE assortid IN (SELECT config_value FROM sys_config WHERE |
| | |
| | | GROUP BY sub_id |
| | | </select> |
| | | |
| | | <select id="getSfStatisticsJoydetails" parameterType="com.smartor.domain.ServiceSubtaskCountReq" |
| | | <select id="getSfStatisticsJoydetails" parameterType="com.ruoyi.task.domain.ServiceSubtaskCountReq" |
| | | resultMap="ServiceSubtaskResult2"> |
| | | SELECT joyName,joyCount,joyAllCount,ROUND(joyCount/joyAllCount,2) joyTotal FROM ( |
| | | SELECT targetname joyName, |
| | |
| | | )a1 |
| | | </select> |
| | | |
| | | <select id="getSfStatisticsCategory" parameterType="com.smartor.domain.ServiceSubtaskCountReq" |
| | | <select id="getSfStatisticsCategory" parameterType="com.ruoyi.task.domain.ServiceSubtaskCountReq" |
| | | resultMap="ServiceSubtaskResult2"> |
| | | SELECT |
| | | <if test="configValue != null and configValue != ''"> |
| | |
| | | GROUP BY a.sub_id |
| | | </select> |
| | | |
| | | <select id="getSfStatisticsScriptDetails" parameterType="com.smartor.domain.ServiceSubtaskCountReq" |
| | | <select id="getSfStatisticsScriptDetails" parameterType="com.ruoyi.task.domain.ServiceSubtaskCountReq" |
| | | resultMap="ServiceSubtaskScriptCountResult"> |
| | | SELECT |
| | | a.id as scriptid, |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getSfStatisticsScriptItemDetails" parameterType="com.smartor.domain.ServiceSubtaskCountReq" |
| | | <select id="getSfStatisticsScriptItemDetails" parameterType="com.ruoyi.task.domain.ServiceSubtaskCountReq" |
| | | resultMap="ServiceSubtaskScriptCountResult"> |
| | | SELECT |
| | | ssd.scriptid, |
| | |
| | | </select> |
| | | |
| | | <!-- è·åé访é¨è¯æ¯æçæ°é--> |
| | | <select id="getSfFzInfoEveryMonth" parameterType="com.smartor.domain.ServiceSubtaskCountReq" |
| | | <select id="getSfFzInfoEveryMonth" parameterType="com.ruoyi.task.domain.ServiceSubtaskCountReq" |
| | | resultMap="ServiceSubtaskResult2"> |
| | | SELECT DATE_FORMAT(st.finishtime, '%Y-%m') AS month, |
| | | st.service_type as service_type, |
| | |
| | | </select> |
| | | |
| | | <!-- æå¡ç»è®¡æ¥è¯¢ - ææ¶é´ç»´åº¦ç»è®¡åºé¢/é¨è¯éè®¿æ°æ® --> |
| | | <select id="getServiceStatistics" parameterType="com.smartor.domain.ServiceStatisticsRequest" |
| | | resultType="com.smartor.domain.ServiceStatisticsResponse"> |
| | | <select id="getServiceStatistics" parameterType="com.ruoyi.task.domain.ServiceStatisticsRequest" |
| | | resultType="com.ruoyi.task.domain.ServiceStatisticsResponse"> |
| | | SELECT |
| | | timePeriod, |
| | | SUM(dischargeFollowCount) AS dischargeFollowCount, |
| | |
| | | </select> |
| | | |
| | | <!-- ä¼åçç»è®¡æ¥è¯¢ï¼ç´æ¥å¨æ°æ®åºå±å®æèåè®¡ç® --> |
| | | <select id="countByCondition" parameterType="com.smartor.domain.entity.ServiceSubtaskEntity" resultType="map"> |
| | | <select id="countByCondition" parameterType="com.ruoyi.task.domain.entity.ServiceSubtaskEntity" resultType="map"> |
| | | SELECT |
| | | SUM(CASE WHEN sendstate = 4 THEN 1 ELSE 0 END) AS wzx, |
| | | SUM(CASE WHEN sendstate != 4 AND sendstate != 2 THEN 1 ELSE 0 END) AS ysf, |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getCurrentUserServiceSubtaskCount" parameterType="com.smartor.domain.entity.ServiceSubtaskEntity" |
| | | <select id="getCurrentUserServiceSubtaskCount" parameterType="com.ruoyi.task.domain.entity.ServiceSubtaskEntity" |
| | | resultType="map"> |
| | | SELECT |
| | | COUNT(CASE WHEN sendstate = 2 AND date_format(visit_time,'%y%m%d') <= date_format(CURDATE(),'%y%m%d') THEN 1 |
| | |
| | | --> |
| | | <!-- æç
åºåç»ç»è®¡å»¶ç»æ¤çæ°é --> |
| | | <select id="getContinueNurseCount" |
| | | parameterType="com.smartor.domain.VO.ServiceSubtaskCotinueCountVO" |
| | | parameterType="com.ruoyi.task.domain.VO.ServiceSubtaskCotinueCountVO" |
| | | resultType="java.util.Map"> |
| | | SELECT |
| | | leavehospitaldistrictcode AS groupCode, |
| | |
| | | |
| | | <!-- æç§å®¤åç»ç»è®¡å»¶ç»æ¤çæ°é --> |
| | | <select id="getContinueNurseCountByDept" |
| | | parameterType="com.smartor.domain.VO.ServiceSubtaskCotinueCountVO" |
| | | parameterType="com.ruoyi.task.domain.VO.ServiceSubtaskCotinueCountVO" |
| | | resultType="java.util.Map"> |
| | | SELECT |
| | | deptcode AS groupCode, |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectServiceSubtaskListDeadLine" parameterType="com.smartor.domain.entity.ServiceSubtaskEntity" |
| | | <select id="selectServiceSubtaskListDeadLine" parameterType="com.ruoyi.task.domain.entity.ServiceSubtaskEntity" |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | where 1=1 |