dyh_case_info a.id, a.status, a.status_name, a.canal, a.canal_name, a.canal_second, a.canal_second_name, a.case_level, a.case_type, a.case_type_name, a.case_type_first_name, a.input_unit_id, a.input_unit_name, a.create_time, a.plaintiffs, a.defendants, IF(c.city_name is null,a.que_city_name,c.city_name) as que_city_name, IF(c.area_name is null,a.que_area_name,c.area_name) as que_area_name, IF(c.road_name is null,a.que_road_name,c.road_name) as que_road_name, IF(c.village_name is null,a.que_village_name,c.village_name) as que_village_name, a.case_type_first, a.case_type_first_name, a.visit_time, a.occur_time, a.addr, a.people_num, a.amount, a.case_des, a.case_claim, a.case_ref, a.major_status, b.mediator, b.is_risk, b.medi_result, b.medi_result_name, b.mediate_unit_id, b.mediate_unit_name, b.assist_unit_id, b.assist_unit_name, b.close_time, b.agree_type, b.agree_type_name, b.agree_content, b.windup_content, d.id as caseTaskId id, case_title, case_ref, case_level, visit_time, visit_people_num, medi_type, medi_type_name, case_type_first, case_type_first_name, case_type, case_type_name, occur_time, addr, lng, lat, wg_addr, wg_lng, wg_lat, que_prov, que_prov_name, que_city, que_city_name, que_area, que_area_name, que_road, que_road_name, que_village, que_village_name, people_num, amount, crowd, crowd_name, canal, canal_name, visit_way, visit_way_name, zxsl_status, case_des, case_claim, major_status, source, source_name, case_no, mediate_no, mediate_book_no, civil_no, plaintiffs, pagents, defendants, dagents, input_unit_id, input_unit_name, input_user_id, input_user_name, input_way, status, status_name, process, process_name, info_process, info_process_name, want_unit_id, want_unit_name, want_user_id, want_user_name, party_show, delete_status, cust_id, create_time, update_time, sync_status, old_case_type, old_case_type_name, canal_second, canal_second_name case_title = #{entity.caseTitle}, case_ref = #{entity.caseRef}, case_level = #{entity.caseLevel}, visit_time = #{entity.visitTime}, visit_people_num = #{entity.visitPeopleNum}, medi_type = #{entity.mediType}, medi_type_name = #{entity.mediTypeName}, case_type_first = #{entity.caseTypeFirst}, case_type_first_name = #{entity.caseTypeFirstName}, case_type = #{entity.caseType}, case_type_name = #{entity.caseTypeName}, occur_time = #{entity.occurTime}, addr = #{entity.addr}, lng = #{entity.lng}, lat = #{entity.lat}, wg_addr = #{entity.wgAddr}, wg_lng = #{entity.wgLng}, wg_lat = #{entity.wgLat}, que_prov = #{entity.queProv}, que_prov_name = #{entity.queProvName}, que_city = #{entity.queCity}, que_city_name = #{entity.queCityName}, que_area = #{entity.queArea}, que_area_name = #{entity.queAreaName}, que_road = #{entity.queRoad}, que_road_name = #{entity.queRoadName}, que_village = #{entity.queVillage}, que_village_name = #{entity.queVillageName}, people_num = #{entity.peopleNum}, amount = #{entity.amount}, crowd = #{entity.crowd}, crowd_name = #{entity.crowdName}, canal = #{entity.canal}, canal_name = #{entity.canalName}, visit_way = #{entity.visitWay}, visit_way_name = #{entity.visitWayName}, zxsl_status = #{entity.zxslStatus}, case_des = #{entity.caseDes}, case_claim = #{entity.caseClaim}, major_status = #{entity.majorStatus}, source = #{entity.source}, source_name = #{entity.sourceName}, case_no = #{entity.caseNo}, mediate_no = #{entity.mediateNo}, mediate_book_no = #{entity.mediateBookNo}, civil_no = #{entity.civilNo}, plaintiffs = #{entity.plaintiffs}, pagents = #{entity.pagents}, defendants = #{entity.defendants}, dagents = #{entity.dagents}, input_unit_id = #{entity.inputUnitId}, input_unit_name = #{entity.inputUnitName}, input_user_id = #{entity.inputUserId}, input_user_name = #{entity.inputUserName}, input_way = #{entity.inputWay}, status = #{entity.status}, status_name = #{entity.statusName}, process = #{entity.process}, process_name = #{entity.processName}, info_process = #{entity.infoProcess}, info_process_name = #{entity.infoProcessName}, party_show = #{entity.partyShow}, want_unit_id = #{entity.wantUnitId}, want_unit_name = #{entity.wantUnitName}, want_user_id = #{entity.wantUserId}, want_user_name = #{entity.wantUserName}, delete_status = #{entity.deleteStatus}, cust_id = #{entity.custId}, create_time = #{entity.createTime}, update_time = #{entity.updateTime}, sync_status = #{entity.syncStatus}, old_case_type = #{entity.oldCaseType}, old_case_type_name = #{entity.oldCaseTypeName}, canal_second = #{entity.canalSecond}, canal_second_name = #{entity.canalSecond} and a.delete_status = 0 and a.id in #{id} and a.status = #{terms.status} and a.status_name = #{terms.statusName} and a.canal = #{terms.canal} and a.canal in #{canal} and a.canal_second = #{terms.canalSecond} and a.canal_second != #{terms.canalSecondNot} and (a.canal_second != #{terms.canalSecondAll} or a.canal_second is null) and a.canal_name = #{terms.canalName} and a.case_level = #{terms.caseLevel} and (a.case_type = #{terms.caseType} or a.case_type_first = #{terms.caseType}) and a.case_type_first = #{terms.caseTypeFirst} and a.case_type_first in #{caseTypeFirst} and a.case_type_name = #{terms.caseTypeName} and a.input_unit_id = #{terms.inputUnitId} and a.input_unit_name like CONCAT('%', #{terms.inputUnitName}, '%') and b.mediator = #{terms.mediator} and b.mediator_id = #{terms.mediatorId} and (b.belong_unit_id is not null and c.city = #{terms.queCity} and c.unit_grade in #{unitGrade} ) and ((b.belong_unit_id is not null and c.city = #{terms.queCity} and c.unit_grade in #{unitGrade} ) or (b.belong_unit_id is null and a.que_city = #{terms.queCity}) ) and (b.belong_unit_id is not null and c.area = #{terms.queArea} and c.unit_grade in #{unitGrade} ) and ((b.belong_unit_id is not null and c.area = #{terms.queArea} and c.unit_grade in #{unitGrade} ) or (b.belong_unit_id is null and a.que_area = #{terms.queArea}) ) and (b.belong_unit_id is not null and c.road = #{terms.queRoad} and c.unit_grade in #{unitGrade} ) and ((b.belong_unit_id is not null and c.road = #{terms.queRoad} and c.unit_grade in #{unitGrade} ) or (b.belong_unit_id is null and a.que_road = #{terms.queRoad})) and (b.belong_unit_id is not null and c.village = #{terms.queVillage} and c.unit_grade in #{unitGrade} ) and a.que_city is not null and a.que_area is not null and a.que_road is not null and a.que_area = #{terms.queArea} and a.que_road = #{terms.queRoad} and a.case_ref like CONCAT('%', #{terms.caseRef}, '%') and a.plaintiffs like CONCAT('%', #{terms.plaintiffs}, '%') and a.defendants like CONCAT('%', #{terms.defendants}, '%') and a.people_num = ]]> #{terms.peopleNumStart} and a.people_num #{terms.peopleNumEnd} and a.amount = ]]> #{terms.amountStart} and a.amount #{terms.amountEnd} and a.id in(select case_id from dyh_case_evaluate where evaluate_grade = #{terms.evaluateGrade}) and b.mediate_unit_id = #{terms.mediateUnitId} and b.assist_unit_id = #{terms.assistUnitId} and b.mediate_unit_name like CONCAT('%', #{terms.mediateUnitName}, '%') and b.assist_unit_name like CONCAT('%', #{terms.assistUnitName}, '%') and b.medi_result = #{terms.mediResult} and a.info_process 3 and a.major_status = #{terms.majorStatus} and a.info_process 3 and a.info_process = 3 and a.info_process = 4 and b.is_risk = #{terms.isRisk} and b.agree_type = #{terms.agreeType} and b.sys_source = #{systemSource} and (DATE_FORMAT(a.visit_time,'%Y-%m-%d %H:%i:%s') = ]]> #{terms.visitTimeStart} and DATE_FORMAT(a.visit_time,'%Y-%m-%d %H:%i:%s') #{terms.visitTimeEnd}) and (a.create_time = ]]> #{terms.createStart} and a.create_time #{terms.createEnd}) and (DATE_FORMAT(b.close_time,'%Y-%m-%d %H:%i:%s') = ]]> #{terms.closeStart} and DATE_FORMAT(b.close_time,'%Y-%m-%d %H:%i:%s') #{terms.closeEnd}) and (DATE_FORMAT(b.file_time,'%Y-%m-%d %H:%i:%s') = ]]> #{terms.fileStart} and DATE_FORMAT(b.file_time,'%Y-%m-%d %H:%i:%s') #{terms.fileEnd}) and id in #{id} and id = #{terms.id} and party_show = #{terms.partyShow} and case_title = #{terms.caseTitle} and case_ref = #{terms.caseRef} and case_level = #{terms.caseLevel} and visit_time = #{terms.visitTime} and visit_people_num = #{terms.visitPeopleNum} and medi_type = #{terms.mediType} and medi_type_name = #{terms.mediTypeName} and case_type_first = #{terms.caseTypeFirst} and case_type_first_name = #{terms.caseTypeFirstName} and (case_type = #{terms.caseType} or case_type_first = #{terms.caseType}) and case_type_name = #{terms.caseTypeName} and occur_time = #{terms.occurTime} and addr = #{terms.addr} and lng = #{terms.lng} and lat = #{terms.lat} and wg_addr = #{terms.wgAddr} and wg_lng = #{terms.wgLng} and wg_lat = #{terms.wgLat} and que_prov = #{terms.queProv} and que_prov_name = #{terms.queProvName} and que_city = #{terms.queCity} and que_city_name = #{terms.queCityName} and que_area = #{terms.queArea} and que_area_name = #{terms.queAreaName} and que_road = #{terms.queRoad} and que_road_name = #{terms.queRoadName} and que_village = #{terms.queVillage} and que_village_name = #{terms.queVillageName} and people_num = #{terms.peopleNum} and amount = #{terms.amount} and crowd = #{terms.crowd} and crowd_name = #{terms.crowdName} and canal = #{terms.canal} and canal_name = #{terms.canalName} and visit_way = #{terms.visitWay} and visit_way_name = #{terms.visitWayName} and zxsl_status = #{terms.zxslStatus} and case_des = #{terms.caseDes} and case_claim = #{terms.caseClaim} and major_status = #{terms.majorStatus} and source = #{terms.source} and source_name = #{terms.sourceName} and case_no = #{terms.caseNo} and mediate_no = #{terms.mediateNo} and mediate_book_no = #{terms.mediateBookNo} and civil_no = #{terms.civilNo} and plaintiffs = #{terms.plaintiffs} and pagents = #{terms.pagents} and defendants = #{terms.defendants} and dagents = #{terms.dagents} and input_unit_id = #{terms.inputUnitId} and input_unit_name = #{terms.inputUnitName} and input_user_id = #{terms.inputUserId} and input_user_name = #{terms.inputUserName} and input_way = #{terms.inputWay} and status = #{terms.status} and status_name = #{terms.statusName} and process in #{process} and process = #{terms.process} and process_name = #{terms.processName} and info_process = #{terms.infoProcess} and info_process_name = #{terms.infoProcessName} and want_unit_id = #{terms.wantUnitId} and want_unit_name = #{terms.wantUnitName} and want_user_id = #{terms.wantUserId} and want_user_name = #{terms.wantUserName} and delete_status = 0 and delete_status = #{terms.deleteStatus} and cust_id = #{terms.custId} and DATE_FORMAT(create_time,'%Y-%m-%d') = #{terms.createTime} and (DATE_FORMAT(create_time,'%Y-%m-%d') = ]]> #{terms.createStart} and DATE_FORMAT(create_time,'%Y-%m-%d') #{terms.createEnd}) and DATE_FORMAT(update_time,'%Y-%m-%d') = #{terms.updateTime} and (DATE_FORMAT(update_time,'%Y-%m-%d') = ]]> #{terms.updateStart} and DATE_FORMAT(update_time,'%Y-%m-%d') #{terms.updateEnd}) and sync_status = #{terms.syncStatus} and old_case_type = #{terms.oldCaseType} and old_case_type_name = #{terms.oldCaseTypeName} and canal_second = #{terms.canalSecond} and canal_second_name = #{terms.canalSecondName} update id IN #{id} update id = #{entity.id} update delete from where id = #{id} and t1.input_unit_id = #{terms.inputUnitId} and (DATE_FORMAT(t1.create_time,'%Y-%m-%d') = ]]> #{terms.createStart} and DATE_FORMAT(t1.create_time,'%Y-%m-%d') #{terms.createEnd}) and t1.case_level = #{terms.caseLevel} and t1.case_type_first_name = #{caseTypeFirstName} and t1.case_type = #{terms.caseType} and t1.canal = #{terms.canal} and t1.canal_name = #{terms.canalName} and t1.plaintiffs like CONCAT('%', #{terms.plaintiffs}, '%') and t1.defendants like CONCAT('%', #{terms.defendants}, '%') and t1.status_name = #{terms.statusName} and t2.medi_result_name = #{terms.mediResultName} and t2.medi_result = #{terms.mediResult} update dyh_case_info set delete_status = 1,update_time = #{updateTime} where id = #{id}