|
|
@ -21,6 +21,73 @@ |
|
|
|
<result property="updatedBy" column="UPDATED_BY"/> |
|
|
|
<result property="updatedTime" column="UPDATED_TIME"/> |
|
|
|
</resultMap> |
|
|
|
<resultMap type="com.elink.esua.epdc.dto.EpidemicDTO" id="epidemicListMap"> |
|
|
|
<result property="id" column="ID"/> |
|
|
|
<result property="reporter" column="REPORTER"/> |
|
|
|
<result property="mobile" column="MOBILE"/> |
|
|
|
<result property="address" column="ADDRESS"/> |
|
|
|
<result property="instructorFlag" column="INSTRUCTOR_FLAG"/> |
|
|
|
<result property="content" column="CONTENT"/> |
|
|
|
<result property="parentDeptIds" column="PARENT_DEPT_IDS"/> |
|
|
|
<result property="parentDeptNames" column="PARENT_DEPT_NAMES"/> |
|
|
|
<result property="allDeptIds" column="ALL_DEPT_IDS"/> |
|
|
|
<result property="allDeptNames" column="ALL_DEPT_NAMES"/> |
|
|
|
<result property="delFlag" column="DEL_FLAG"/> |
|
|
|
<result property="revision" column="REVISION"/> |
|
|
|
<result property="createdBy" column="CREATED_BY"/> |
|
|
|
<result property="createdTime" column="CREATED_TIME"/> |
|
|
|
<result property="updatedBy" column="UPDATED_BY"/> |
|
|
|
<result property="updatedTime" column="UPDATED_TIME"/> |
|
|
|
</resultMap> |
|
|
|
<select id="getEpidemicPageFromPc" resultMap="epidemicListMap"> |
|
|
|
SELECT |
|
|
|
epidemic.ID, |
|
|
|
epidemic.REPORTER, |
|
|
|
epidemic.MOBILE, |
|
|
|
epidemic.ADDRESS, |
|
|
|
epidemic.INSTRUCTOR_FLAG, |
|
|
|
epidemic.CONTENT, |
|
|
|
epidemic.PARENT_DEPT_IDS, |
|
|
|
epidemic.PARENT_DEPT_NAMES, |
|
|
|
epidemic.ALL_DEPT_IDS, |
|
|
|
epidemic.ALL_DEPT_NAMES, |
|
|
|
epidemic.DEL_FLAG, |
|
|
|
epidemic.REVISION, |
|
|
|
epidemic.CREATED_BY, |
|
|
|
epidemic.CREATED_TIME, |
|
|
|
epidemic.UPDATED_BY, |
|
|
|
epidemic.UPDATED_TIME |
|
|
|
FROM |
|
|
|
epdc_epidemic epidemic |
|
|
|
WHERE |
|
|
|
epidemic.DEL_FLAG = '0' |
|
|
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''"> |
|
|
|
AND DATE_FORMAT( epidemic.CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} |
|
|
|
</if> |
|
|
|
<if test="status != null"> |
|
|
|
AND epidemic.INSTRUCTOR_FLAG = #{status} |
|
|
|
</if> |
|
|
|
<if test="mobile != null and mobile != ''"> |
|
|
|
AND epidemic.MOBILE = #{mobile} |
|
|
|
</if> |
|
|
|
<if test="reporter != null and reporter != ''"> |
|
|
|
AND epidemic.REPORTER = #{reporter} |
|
|
|
</if> |
|
|
|
<if test="streetId != null and streetId != ''"> |
|
|
|
AND (find_in_set(#{streetId},epidemic.PARENT_DEPT_IDS) |
|
|
|
OR find_in_set(#{streetId},epidemic.ALL_DEPT_IDS)) |
|
|
|
</if> |
|
|
|
<if test="communityId != null and communityId != ''"> |
|
|
|
AND (find_in_set(#{communityId},epidemic.PARENT_DEPT_IDS) |
|
|
|
OR find_in_set(#{communityId},epidemic.ALL_DEPT_IDS)) |
|
|
|
</if> |
|
|
|
<if test="gridId != null and gridId != ''"> |
|
|
|
AND (find_in_set(#{gridId},epidemic.PARENT_DEPT_IDS) |
|
|
|
OR find_in_set(#{gridId},epidemic.ALL_DEPT_IDS)) |
|
|
|
</if> |
|
|
|
ORDER BY |
|
|
|
epidemic.CREATED_TIME DESC |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
</mapper> |