|
@ -26,35 +26,36 @@ |
|
|
<select id="pageList" parameterType="com.epmet.dto.form.PageTripReportFormDTO" resultType="com.epmet.dto.IcTripReportRecordDTO"> |
|
|
<select id="pageList" parameterType="com.epmet.dto.form.PageTripReportFormDTO" resultType="com.epmet.dto.IcTripReportRecordDTO"> |
|
|
SELECT |
|
|
SELECT |
|
|
r.*, |
|
|
r.*, |
|
|
|
|
|
a.ID AS epidemicId, |
|
|
r.CREATED_TIME AS reportTime |
|
|
r.CREATED_TIME AS reportTime |
|
|
FROM |
|
|
FROM ic_trip_report_record r |
|
|
ic_trip_report_record r |
|
|
LEFT JOIN ic_epidemic_special_attention a ON (a.ID_CARD = r.ID_CARD AND a.DEL_FLAG = 0 AND a.IS_ATTENTION = 1 AND a.ATTENTION_TYPE = 2) |
|
|
WHERE |
|
|
WHERE |
|
|
r.DEL_FLAG = '0' |
|
|
r.DEL_FLAG = '0' |
|
|
AND r.CUSTOMER_ID = #{customerId} |
|
|
AND r.CUSTOMER_ID = #{customerId} |
|
|
<if test='null != agencyId and "" != agencyId'> |
|
|
<if test='null != agencyId and "" != agencyId'> |
|
|
AND (AGENCY_ID = #{agencyId} OR pids like concat('%', #{agencyId}, '%')) |
|
|
AND (r.AGENCY_ID = #{agencyId} OR r.pids like concat('%', #{agencyId}, '%')) |
|
|
</if> |
|
|
</if> |
|
|
<if test='null != name and "" != name'> |
|
|
<if test='null != name and "" != name'> |
|
|
AND NAME like concat('%',#{name},'%') |
|
|
AND r.NAME like concat('%',#{name},'%') |
|
|
</if> |
|
|
</if> |
|
|
<if test='null != mobile and "" != mobile'> |
|
|
<if test='null != mobile and "" != mobile'> |
|
|
AND MOBILE like concat('%',#{mobile},'%') |
|
|
AND r.MOBILE like concat('%',#{mobile},'%') |
|
|
</if> |
|
|
</if> |
|
|
<if test='null != idCard and "" != idCard'> |
|
|
<if test='null != idCard and "" != idCard'> |
|
|
AND ID_CARD like concat('%',#{idCard},'%') |
|
|
AND r.ID_CARD like concat('%',#{idCard},'%') |
|
|
</if> |
|
|
</if> |
|
|
<if test='null != sourceAddressCode and "" != sourceAddressCode'> |
|
|
<if test='null != sourceAddressCode and "" != sourceAddressCode'> |
|
|
AND SOURCE_ADDRESS_CODE like concat(#{sourceAddressCode},'%') |
|
|
AND r.SOURCE_ADDRESS_CODE like concat(#{sourceAddressCode},'%') |
|
|
</if> |
|
|
</if> |
|
|
<if test='null != sourceAddress and "" != sourceAddress'> |
|
|
<if test='null != sourceAddress and "" != sourceAddress'> |
|
|
AND SOURCE_ADDRESS like concat('%',#{sourceAddress},'%') |
|
|
AND r.SOURCE_ADDRESS like concat('%',#{sourceAddress},'%') |
|
|
</if> |
|
|
</if> |
|
|
<if test='null != startDate and "" != startDate'> |
|
|
<if test='null != startDate and "" != startDate'> |
|
|
AND ARRIVE_DATE <![CDATA[ >= ]]> #{startDate} |
|
|
AND r.ARRIVE_DATE <![CDATA[ >= ]]> #{startDate} |
|
|
</if> |
|
|
</if> |
|
|
<if test='null != endDate and "" != endDate'> |
|
|
<if test='null != endDate and "" != endDate'> |
|
|
AND ARRIVE_DATE <![CDATA[ <= ]]> #{endDate} |
|
|
AND r.ARRIVE_DATE <![CDATA[ <= ]]> #{endDate} |
|
|
</if> |
|
|
</if> |
|
|
<if test='null != id and "" != id'> |
|
|
<if test='null != id and "" != id'> |
|
|
AND r.id=#{id} |
|
|
AND r.id=#{id} |
|
|