| | |
| | | <id property="timeoutTime" column="timeout_time" /> |
| | | <id property="isPush" column="is_push" /> |
| | | <id property="isHideComments" column="is_hide_comments" /> |
| | | <id property="isRemindPush" column="is_remind_push" /> |
| | | |
| | | </resultMap> |
| | | |
| | | <sql id="selectGuideRepairOrderVo"> |
| | |
| | | AND a.guide_user_id=#{guideUserId} |
| | | </if> |
| | | <if test="matterName != null and matterName != ''"> |
| | | AND (matter_name like concat('%', #{matterName}, '%')) or |
| | | AND ( |
| | | (matter_name like concat('%', #{matterName}, '%')) or |
| | | ( classify_id in ( SELECT id FROM automessage_classify_administration WHERE classify_name like concat('%', #{matterName}, '%') ) ) |
| | | or (classify_id in (SELECT id FROM automessage_classify_administration WHERE automessage_classify_administration.parent_id in |
| | | (SELECT id FROM automessage_classify_administration WHERE classify_name like concat('%', #{matterName}, '%'))) |
| | | or (select user_name from automessage_sys_user where a.guide_user_id=automessage_sys_user.user_id ) like concat('%', #{matterName}, '%') |
| | | or order_num like concat('%', #{matterName}, '%') or |
| | | or order_num like concat('%', #{matterName}, '%') or |
| | | (select user_name from automessage_sys_user where a.submit_user_id=automessage_sys_user.user_id ) like concat('%', #{matterName}, '%') |
| | | or consult_user_name like concat('%', #{matterName}, '%') or |
| | | guide_department_id in (SELECT id FROM automessage_organization_chart WHERE organization_name like concat('%', #{matterName}, '%') ) ) |
| | | ) |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | AND a.state=#{status} |
| | |
| | | AND automessage_guide_repair_order.guide_user_id=#{guideUserId} |
| | | </if> |
| | | <if test="matterName != null and matterName != ''"> |
| | | AND (matter_name like concat('%', #{matterName}, '%')) or |
| | | AND ( |
| | | (matter_name like concat('%', #{matterName}, '%')) or |
| | | ( classify_id in ( SELECT id FROM automessage_classify_administration WHERE classify_name like concat('%', #{matterName}, '%') ) ) |
| | | or (classify_id in (SELECT id FROM automessage_classify_administration WHERE automessage_classify_administration.parent_id in |
| | | (SELECT id FROM automessage_classify_administration WHERE classify_name like concat('%', #{matterName}, '%'))) |
| | |
| | | or order_num like concat('%', #{matterName}, '%') or |
| | | (select user_name from automessage_sys_user where automessage_guide_repair_order.submit_user_id=automessage_sys_user.user_id ) like concat('%', #{matterName}, '%') |
| | | or consult_user_name like concat('%', #{matterName}, '%') or |
| | | guide_department_id in (SELECT id FROM automessage_organization_chart WHERE organization_name like concat('%', #{matterName}, '%') ) ) |
| | | guide_department_id in (SELECT id FROM automessage_organization_chart WHERE organization_name like concat('%', #{matterName}, '%') ) ) |
| | | ) |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | AND automessage_guide_repair_order.state=#{status} |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectNoticeTime" resultMap="GuideRepairOrderResult"> |
| | | <include refid="selectGuideRepairOrderVo"/> |
| | | <where> |
| | | state=2 and is_remind_push=2 and SYSDATE()>subdate(timeout_time, interval ${minute} minute ) and 1>(select count(*) from automessage_guide_evolve where state=9 and a.id=guide_id ) |
| | | </where> |
| | | </select> |
| | | <select id="selectEvaluate" resultMap="GuideRepairOrderResult"> |
| | | <include refid="selectGuideRepairOrderVo"/> |
| | | <where> |