2021-07-27 15:26:35 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="com.cm.systemcity.dao.datarelease.IDataReleaseDao">
|
|
|
|
|
2022-09-06 11:01:29 +08:00
|
|
|
<select id="getAreaInfoFromCityDict" parameterType="map" resultType="map">
|
|
|
|
SELECT * FROM
|
|
|
|
city_dict
|
|
|
|
WHERE
|
|
|
|
is_delete = '0'
|
|
|
|
AND dict_parent_id = #{dictParentId}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="getCommunityInfo" parameterType="map" resultType="map">
|
|
|
|
SELECT * FROM
|
|
|
|
city_community
|
|
|
|
WHERE
|
|
|
|
is_delete = '0'
|
|
|
|
AND area_id = #{areaId}
|
|
|
|
ORDER BY community_order ASC
|
|
|
|
</select>
|
|
|
|
|
2021-07-27 15:26:35 +08:00
|
|
|
<!-- 查询上报案件 -->
|
|
|
|
<select id="listReportCase" parameterType="map" resultType="map">
|
|
|
|
SELECT
|
|
|
|
*
|
|
|
|
FROM
|
|
|
|
city_report_case
|
|
|
|
WHERE
|
|
|
|
is_delete = '0'
|
|
|
|
<if test="caseStatus != null and caseStatus != ''">
|
|
|
|
AND case_status = #{caseStatus}
|
|
|
|
</if>
|
|
|
|
<if test="dataCatalog != null and dataCatalog == 'dept'">
|
|
|
|
AND case_flow_type = '1'
|
|
|
|
</if>
|
|
|
|
<if test="dataCatalog != null and dataCatalog == 'street'">
|
|
|
|
AND case_flow_type = '2'
|
|
|
|
AND case_reporter NOT LIKE CONCAT('%',CONCAT('微信', '%'))
|
|
|
|
</if>
|
|
|
|
<if test="dataCatalog != null and dataCatalog == 'person'">
|
|
|
|
AND case_flow_type = '2'
|
|
|
|
AND case_reporter LIKE CONCAT('%',CONCAT('微信', '%'))
|
|
|
|
</if>
|
|
|
|
<if test="gmtCreateLike != null and gmtCreateLike != ''">
|
|
|
|
AND gmt_create LIKE CONCAT('%',CONCAT(#{gmtCreateLike}, '%'))
|
|
|
|
</if>
|
|
|
|
<if test="gmtModified != null and gmtModified != ''">
|
|
|
|
AND gmt_modified LIKE CONCAT('%',CONCAT(#{gmtModified}, '%'))
|
|
|
|
</if>
|
|
|
|
<if test="areaId != null and areaId !=''">
|
|
|
|
AND area_id = #{areaId}
|
|
|
|
</if>
|
|
|
|
<if test="caseStatusCompareUp != null and caseStatusCompareUp !=''">
|
|
|
|
AND case_status <![CDATA[>=]]> #{caseStatusCompareUp}
|
|
|
|
</if>
|
|
|
|
<if test="modifiedStr != null and modifiedStr !=''">
|
|
|
|
AND gmt_modified <![CDATA[>=]]> #{modifiedStr}
|
|
|
|
</if>
|
|
|
|
<if test="modifiedEnd != null and modifiedEnd !=''">
|
|
|
|
AND gmt_modified <![CDATA[<=]]> #{modifiedEnd}
|
|
|
|
</if>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="listSpecialReportCase" parameterType="map" resultType="map">
|
|
|
|
SELECT
|
|
|
|
*
|
|
|
|
FROM
|
|
|
|
city_special_report_case
|
|
|
|
WHERE
|
|
|
|
is_delete = '0'
|
|
|
|
<if test="caseStatus != null and caseStatus != ''">
|
|
|
|
AND case_status = #{caseStatus}
|
|
|
|
</if>
|
|
|
|
<if test="gmtModified != null and gmtModified != ''">
|
|
|
|
AND gmt_modified LIKE CONCAT('%',CONCAT(#{gmtModified}, '%'))
|
|
|
|
</if>
|
|
|
|
<if test="areaId != null and areaId !=''">
|
|
|
|
AND area_id = #{areaId}
|
|
|
|
</if>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="getCaseTypeTop10" parameterType="map" resultType="map">
|
|
|
|
SELECT
|
|
|
|
t1.case_type_id caseTypeId,
|
|
|
|
t2.dict_name dictName,
|
|
|
|
COUNT(t1.case_type_id) caseTypeCount
|
|
|
|
FROM
|
|
|
|
city_report_case t1
|
|
|
|
LEFT JOIN city_dict t2 ON t1.case_type_id = t2.dict_id
|
|
|
|
WHERE
|
|
|
|
t1.is_delete = '0'
|
|
|
|
GROUP BY
|
|
|
|
t1.case_type_id,
|
|
|
|
t2.dict_name
|
|
|
|
ORDER BY
|
|
|
|
caseTypeCount DESC
|
|
|
|
LIMIT 0,10
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="listReportCaseLog" parameterType="map" resultType="map">
|
|
|
|
SELECT
|
|
|
|
t1.option_type optionType,
|
|
|
|
t1.user_name userName,
|
|
|
|
t1.gmt_create gmtCreate,
|
|
|
|
t2.case_content caseContent
|
|
|
|
FROM
|
|
|
|
city_report_case_log t1
|
|
|
|
LEFT JOIN city_report_case t2 ON t1.case_id = t2.report_case_id
|
|
|
|
ORDER BY
|
|
|
|
t1.gmt_create DESC
|
|
|
|
LIMIT 0,10
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="listUserDynamicPosition" parameterType="map" resultType="map">
|
|
|
|
SELECT
|
|
|
|
creator,
|
|
|
|
user_name
|
|
|
|
FROM
|
|
|
|
city_user_location
|
|
|
|
WHERE
|
|
|
|
gmt_create <![CDATA[ >= ]]> #{timeStr}
|
|
|
|
AND gmt_create <![CDATA[ <= ]]> #{timeEnd}
|
|
|
|
GROUP BY
|
|
|
|
creator,user_name
|
|
|
|
</select>
|
2022-09-06 11:01:29 +08:00
|
|
|
|
|
|
|
<select id="listCaseInMap" parameterType="map" resultType="map">
|
|
|
|
SELECT
|
|
|
|
case_content,
|
|
|
|
case_longitude,
|
|
|
|
case_latitude,
|
|
|
|
gmt_create
|
|
|
|
FROM
|
|
|
|
city_report_case
|
|
|
|
WHERE
|
|
|
|
case_status = '3'
|
|
|
|
<if test="startTime != null and startTime != ''">
|
|
|
|
AND LEFT(gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
|
|
|
</if>
|
|
|
|
<if test="endTime != null and endTime != ''">
|
|
|
|
AND LEFT(gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
|
|
|
|
</if>
|
|
|
|
ORDER BY
|
|
|
|
gmt_create DESC
|
|
|
|
</select>
|
2021-07-27 15:26:35 +08:00
|
|
|
</mapper>
|