| | |
| | | </select> |
| | | |
| | | <select id="export" resultType="com.panzhihua.common.model.vos.community.ComActQuestnaireAnswerContentVO"> |
| | | select ac.*,t.nick_name from ( SELECT |
| | | qs.type as optionType,ac.*,ac.create_at as `time` |
| | | FROM |
| | | com_act_reserve_record carr |
| | | LEFT JOIN com_act_reserve qn ON carr.reserve_id = qn.id |
| | | LEFT JOIN com_act_reserve_sub qs ON carr.reserve_id = qs.reserve_id |
| | | LEFT JOIN com_act_reserve_answer_content ac ON qs.id = ac.reserve_sub_id |
| | | WHERE |
| | | carr.id in ( |
| | | SELECT distinct |
| | | select ac.*,ac.create_at as time,u.nick_name,cars.type as optionType from com_act_reserve_record carr |
| | | left join com_act_reserve_answer_content ac on ac.reserve_record_id = carr.id |
| | | left join sys_user u on carr.user_id = u.user_id |
| | | left join com_act_reserve_sub cars on ac.reserve_sub_id = cars.id |
| | | where carr.reserve_id = #{detailedAdminDTO.reserveId} and ac.reserve_record_id in ( SELECT DISTINCT |
| | | carr.id |
| | | FROM |
| | | com_act_reserve_record carr |
| | | LEFT JOIN com_act_reserve qn ON carr.reserve_id = qn.id |
| | | LEFT JOIN sys_user su ON carr.user_id = su.user_id |
| | | LEFT JOIN com_act_reserve_sub qs ON carr.id = qs.reserve_id |
| | | LEFT JOIN com_act_reserve_answer_content ac ON carr.id = ac.reserve_record_id |
| | | where qn.id =#{detailedAdminDTO.reserveId} |
| | | WHERE |
| | | carr.reserve_id =#{detailedAdminDTO.reserveId} |
| | | <if test='detailedAdminDTO.startTime != null and detailedAdminDTO.startTime != ""'> |
| | | AND carr.create_at <![CDATA[ >= ]]> #{detailedAdminDTO.startTime} |
| | | </if> |
| | |
| | | </if> |
| | | <if test="detailedAdminDTO.keyword!=null and detailedAdminDTO.keyword != """> |
| | | AND ac.answer_content like concat ('%',#{detailedAdminDTO.keyword},'%') |
| | | </if> |
| | | )and ac.reserve_record_id in (select distinct reserve_record_id from com_act_reserve_answer_content where answer_content like concat('%',#{detailedAdminDTO.keyword},'%') |
| | | <if test='detailedAdminDTO.startTime != null and detailedAdminDTO.startTime != ""'> |
| | | AND create_at <![CDATA[ >= ]]> #{detailedAdminDTO.startTime} |
| | | </if> |
| | | <if test='detailedAdminDTO.endTime != null and detailedAdminDTO.endTime != ""'> |
| | | AND create_at <![CDATA[ <= ]]> #{detailedAdminDTO.endTime} |
| | | </if> |
| | | <if test='detailedAdminDTO.beginTime != null and detailedAdminDTO.beginTime != ""'> |
| | | AND STR_TO_DATE(answer_content,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{detailedAdminDTO.beginTime} |
| | | </if> |
| | | <if test='detailedAdminDTO.stopTime != null and detailedAdminDTO.stopTime != ""'> |
| | | AND STR_TO_DATE(answer_content,'%Y-%m-%d %H:%i:%s') <![CDATA[ <= ]]> #{detailedAdminDTO.stopTime} |
| | | </if> |
| | | ) |
| | | GROUP BY ac.id ) ac left join sys_user t on ac.user_id = t.user_id |
| | | order by ac.reserve_record_id desc,ac.id asc |
| | | </if> order by ac.reserve_record_id DESC,ac.id ASC |
| | | </select> |
| | | <select id="pageRegisterHomeQuarantine" resultType="java.lang.String"> |
| | | SELECT answer_content FROM ( |