|
|
|
|
@ -248,4 +248,185 @@
|
|
|
|
|
ORDER BY discovery_time DESC, id DESC |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectPageWithNegative" resultType="com.biutag.supervision.pojo.dto.complaintCollection.ComplaintCollectionPageDTO"> |
|
|
|
|
SELECT |
|
|
|
|
cc.id, |
|
|
|
|
cc.source_table AS sourceTable, |
|
|
|
|
cc.source_table_sub_one AS sourceTableSubOne, |
|
|
|
|
-- source_table_path 不从数据库查,由后端计算 |
|
|
|
|
cc.origin_id AS originId, |
|
|
|
|
cc.discovery_time AS discoveryTime, |
|
|
|
|
cc.responder_name AS responderName, |
|
|
|
|
cc.responder_phone AS responderPhone, |
|
|
|
|
cc.business_type_name AS businessTypeName, |
|
|
|
|
cc.thing_desc AS thingDesc, |
|
|
|
|
cc.involved_issue AS involvedIssue, |
|
|
|
|
cc.second_depart_name AS secondDepartName, |
|
|
|
|
cc.third_depart_name AS thirdDepartName, |
|
|
|
|
cc.involve_problem AS involveProblem, |
|
|
|
|
cc.distribution_state AS distributionState, |
|
|
|
|
cc.second_depart_id AS secondDepartId, |
|
|
|
|
cc.third_depart_id AS thirdDepartId, |
|
|
|
|
cc.problem_sources_code AS problemSourcesCode, |
|
|
|
|
cc.problem_sources AS problemSources, |
|
|
|
|
cc.police_type_name AS policeTypeName, |
|
|
|
|
cc.channel_for_filing_complaints AS channelForFilingComplaints, |
|
|
|
|
cc.acceptance_level AS acceptanceLevel, |
|
|
|
|
cc.initial_petition AS initialPetition, |
|
|
|
|
cc.entanglement_visits AS entanglementVisits, |
|
|
|
|
cc.mass_visits AS massVisits, |
|
|
|
|
cc.police_type AS policeType, |
|
|
|
|
cc.responder_id_code AS responderIdCode, |
|
|
|
|
cc.people_number AS peopleNumber, |
|
|
|
|
cc.appeal AS appeal, |
|
|
|
|
cc.business_class AS businessClass, |
|
|
|
|
cc.register_depart_name AS registerDepartName, |
|
|
|
|
cc.transfer_depart AS transferDepart, |
|
|
|
|
cc.handle_method AS handleMethod, |
|
|
|
|
cc.handle_depart_name AS handleDepartName, |
|
|
|
|
cc.completed_time AS completedTime, |
|
|
|
|
cc.involve_depart_name AS involveDepartName, |
|
|
|
|
cc.receiving_leader_name AS receivingLeaderName, |
|
|
|
|
cc.is_mian_responsib AS isMianResponsib, |
|
|
|
|
cc.receiving_depart_name AS receivingDepartName, |
|
|
|
|
cc.negative_id AS negativeId, |
|
|
|
|
cc.petition_type AS petitionType, |
|
|
|
|
cc.petition_processing_status AS petitionProcessingStatus, |
|
|
|
|
cc.happen_time AS happenTime, |
|
|
|
|
cc.is_real AS isReal, |
|
|
|
|
cc.source AS source, |
|
|
|
|
cc.creator AS creator, |
|
|
|
|
cc.source_involve_depart_name AS sourceInvolveDepartName, |
|
|
|
|
cc.outer_id AS outerId, |
|
|
|
|
cc.crx_state AS crxState, |
|
|
|
|
cc.business_type_code AS businessTypeCode, |
|
|
|
|
cc.check_status AS checkStatus, |
|
|
|
|
cc.check_status_name AS checkStatusName, |
|
|
|
|
cc.check_status_desc AS checkStatusDesc, |
|
|
|
|
cc.processing_status AS processingStatus, |
|
|
|
|
cc.accountability_target AS accountabilityTarget, |
|
|
|
|
cc.crt_time AS crtTime, |
|
|
|
|
cc.repeatt AS repeatt, |
|
|
|
|
cc.lead_approval AS leadApproval, |
|
|
|
|
cc.tag AS tag, |
|
|
|
|
cc.case_number AS caseNumber, |
|
|
|
|
cc.gwf1 AS gwf1, |
|
|
|
|
cc.gwf2 AS gwf2, |
|
|
|
|
cc.gwf3 AS gwf3, |
|
|
|
|
cc.gwf4 AS gwf4, |
|
|
|
|
cc.gwf5 AS gwf5, |
|
|
|
|
cc.create_by AS createBy, |
|
|
|
|
cc.create_time AS createTime, |
|
|
|
|
cc.update_by AS updateBy, |
|
|
|
|
cc.update_time AS updateTime, |
|
|
|
|
cc.completion_status AS completionStatus, |
|
|
|
|
cc.public_recognition AS publicRecognition, |
|
|
|
|
cc.status AS status, |
|
|
|
|
cc.init_work_des AS initWorkDes, |
|
|
|
|
cc.init_problem_plan AS initProblemPlan, |
|
|
|
|
cc.init_verdict AS initVerdict |
|
|
|
|
FROM complaint_collection cc |
|
|
|
|
LEFT JOIN negative n ON cc.negative_id = n.id |
|
|
|
|
<where> |
|
|
|
|
<if test="param.sourceTable != null and param.sourceTable != ''"> |
|
|
|
|
AND cc.source_table = #{param.sourceTable} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.sourceTableList != null and param.sourceTableList.size > 0"> |
|
|
|
|
AND cc.source_table IN |
|
|
|
|
<foreach collection="param.sourceTableList" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
<if test="param.sourceTableSubOne != null and param.sourceTableSubOne != ''"> |
|
|
|
|
AND cc.source_table_sub_one = #{param.sourceTableSubOne} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.sourceTableSubOneList != null and param.sourceTableSubOneList.size > 0"> |
|
|
|
|
AND cc.source_table_sub_one IN |
|
|
|
|
<foreach collection="param.sourceTableSubOneList" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
<if test="param.originId != null and param.originId != ''"> |
|
|
|
|
AND cc.origin_id LIKE CONCAT('%', #{param.originId}, '%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.originIds != null and param.originIds.size > 0"> |
|
|
|
|
AND cc.origin_id IN |
|
|
|
|
<foreach collection="param.originIds" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
<if test="param.checkStatus != null and param.checkStatus != ''"> |
|
|
|
|
AND cc.check_status = #{param.checkStatus} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.checkStatusList != null and param.checkStatusList.size > 0"> |
|
|
|
|
AND cc.check_status IN |
|
|
|
|
<foreach collection="param.checkStatusList" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
<if test="param.secondDepartId != null and param.secondDepartId != ''"> |
|
|
|
|
AND cc.second_depart_id = #{param.secondDepartId} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.secondDepartIds != null and param.secondDepartIds.size > 0"> |
|
|
|
|
AND cc.second_depart_id IN |
|
|
|
|
<foreach collection="param.secondDepartIds" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
<if test="param.discoveryTimeList != null and param.discoveryTimeList.size == 2"> |
|
|
|
|
AND cc.discovery_time BETWEEN #{param.discoveryTimeList[0]} AND #{param.discoveryTimeList[1]} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.personInfo != null and param.personInfo != ''"> |
|
|
|
|
AND ( |
|
|
|
|
cc.responder_name LIKE CONCAT('%', #{param.personInfo}, '%') |
|
|
|
|
OR cc.responder_phone LIKE CONCAT('%', #{param.personInfo}, '%') |
|
|
|
|
OR cc.responder_id_code LIKE CONCAT('%', #{param.personInfo}, '%') |
|
|
|
|
) |
|
|
|
|
</if> |
|
|
|
|
<if test="param.handleMethod != null and param.handleMethod != ''"> |
|
|
|
|
AND cc.handle_method = #{param.handleMethod} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.thingDesc != null and param.thingDesc != ''"> |
|
|
|
|
AND cc.thing_desc LIKE CONCAT('%', #{param.thingDesc}, '%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.repeatt != null and param.repeatt != ''"> |
|
|
|
|
AND cc.repeatt = #{param.repeatt} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.leadApproval != null and param.leadApproval != ''"> |
|
|
|
|
AND cc.lead_approval = #{param.leadApproval} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.processingStatus != null and param.processingStatus != ''"> |
|
|
|
|
AND cc.processing_status = #{param.processingStatus} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.status != null and param.status != ''"> |
|
|
|
|
AND cc.status = #{param.status} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.initialReviewFileList != null and param.initialReviewFileList.size > 0"> |
|
|
|
|
AND cc.gwf3 IN |
|
|
|
|
<foreach collection="param.initialReviewFileList" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> |
|
|
|
|
</if> |
|
|
|
|
<if test="param.tags != null and param.tags.size > 0"> |
|
|
|
|
AND ( |
|
|
|
|
<foreach collection="param.tags" item="tagItem" separator=" OR "> |
|
|
|
|
FIND_IN_SET(#{tagItem}, cc.tag) |
|
|
|
|
</foreach> |
|
|
|
|
) |
|
|
|
|
</if> |
|
|
|
|
<if test="param.involveProblemIdList != null and param.involveProblemIdList.size > 0"> |
|
|
|
|
AND ( |
|
|
|
|
<foreach collection="param.involveProblemIdList" item="probItem" separator=" OR "> |
|
|
|
|
FIND_IN_SET(#{probItem}, cc.involve_problem) |
|
|
|
|
</foreach> |
|
|
|
|
) |
|
|
|
|
</if> |
|
|
|
|
<if test="param.createTimeList != null and param.createTimeList.size == 2"> |
|
|
|
|
AND cc.create_time BETWEEN #{param.createTimeList[0]} AND #{param.createTimeList[1]} |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
ORDER BY cc.create_time DESC, cc.id DESC |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
</mapper> |
|
|
|
|
|