dyh_judic_info
id,
serie_status,
case_id,
judic_title,
judic_no,
mediate_judic_no,
apply_canal,
apply_canal_name,
apply_time,
apply_unit_id,
apply_unit_name,
apply_user_id,
apply_user_name,
apply_content,
audit_tag,
audit_task_id,
audit_time,
audit_user_id,
audit_user_name,
judic_audit,
judic_audit_name,
judic_handle,
judic_handle_name,
judic_audit_content,
court_id,
court_name,
dept_id,
dept_name,
judge_id,
judge_name,
judge_mobile,
process,
process_name,
judic_start_time,
judic_end_time,
judic_result,
judic_result_name,
judic_false_cause,
judic_content,
cust_id,
delete_status,
create_time,
update_time,
status,
handle_unit_id,
handle_unit_name,
handle_dept_id,
handle_dept_name,
handle_user_id,
handle_user_name,
handle_content,
handle_time
serie_status = #{entity.serieStatus},case_id = #{entity.caseId},judic_title = #{entity.judicTitle},judic_no = #{entity.judicNo},mediate_judic_no = #{entity.mediateJudicNo},apply_canal = #{entity.applyCanal},apply_canal_name = #{entity.applyCanalName},apply_time = #{entity.applyTime},apply_unit_id = #{entity.applyUnitId},apply_unit_name = #{entity.applyUnitName},apply_user_id = #{entity.applyUserId},apply_user_name = #{entity.applyUserName},apply_content = #{entity.applyContent},audit_tag = #{entity.auditTag},audit_task_id = #{entity.auditTaskId},audit_time = #{entity.auditTime},audit_user_id = #{entity.auditUserId},audit_user_name = #{entity.auditUserName},judic_audit = #{entity.judicAudit},judic_audit_name = #{entity.judicAuditName},judic_handle = #{entity.judicHandle},judic_handle_name = #{entity.judicHandleName},judic_audit_content = #{entity.judicAuditContent},court_id = #{entity.courtId},court_name = #{entity.courtName},dept_id = #{entity.deptId},dept_name = #{entity.deptName},judge_id = #{entity.judgeId},judge_name = #{entity.judgeName},judge_mobile = #{entity.judgeMobile},process = #{entity.process},process_name = #{entity.processName},judic_start_time = #{entity.judicStartTime},judic_end_time = #{entity.judicEndTime},judic_result = #{entity.judicResult},judic_result_name = #{entity.judicResultName},judic_false_cause = #{entity.judicFalseCause},judic_content = #{entity.judicContent},cust_id = #{entity.custId},delete_status = #{entity.deleteStatus},create_time = #{entity.createTime},update_time = #{entity.updateTime},status = #{entity.status},handle_unit_id = #{entity.handleUnitId},handle_unit_name = #{entity.handleUnitName},handle_dept_id = #{entity.handleDeptId},handle_dept_name = #{entity.handleDeptName},handle_user_id = #{entity.handleUserId},handle_user_name = #{entity.handleUserName},handle_content = #{entity.handleContent},handle_time = #{entity.handleTime},
and id = #{terms.id}
and serie_status = #{terms.serieStatus}
and case_id = #{terms.caseId}
and judic_title = #{terms.judicTitle}
and judic_no = #{terms.judicNo}
and mediate_judic_no = #{terms.mediateJudicNo}
and apply_canal = #{terms.applyCanal}
and apply_canal_name = #{terms.applyCanalName}
and apply_time = #{terms.applyTime}
and apply_unit_id = #{terms.applyUnitId}
and apply_unit_name = #{terms.applyUnitName}
and apply_user_id = #{terms.applyUserId}
and apply_user_name = #{terms.applyUserName}
and apply_content = #{terms.applyContent}
and audit_tag = #{terms.auditTag}
and audit_task_id = #{terms.auditTaskId}
and audit_time = #{terms.auditTime}
and audit_user_id = #{terms.auditUserId}
and audit_user_name = #{terms.auditUserName}
and judic_audit = #{terms.judicAudit}
and judic_audit_name = #{terms.judicAuditName}
and judic_handle = #{terms.judicHandle}
and judic_handle_name = #{terms.judicHandleName}
and judic_audit_content = #{terms.judicAuditContent}
and court_id = #{terms.courtId}
and court_name = #{terms.courtName}
and dept_id = #{terms.deptId}
and dept_name = #{terms.deptName}
and judge_id = #{terms.judgeId}
and judge_name = #{terms.judgeName}
and judge_mobile = #{terms.judgeMobile}
and process = #{terms.process}
and process_name = #{terms.processName}
and judic_start_time = #{terms.judicStartTime}
and judic_end_time = #{terms.judicEndTime}
and judic_result = #{terms.judicResult}
and judic_result_name = #{terms.judicResultName}
and judic_false_cause = #{terms.judicFalseCause}
and judic_content = #{terms.judicContent}
and cust_id = #{terms.custId}
and delete_status = '1'
and delete_status = #{terms.deleteStatus}
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})
update
id = #{entity.id}
update
delete from
where id = #{id}
and (t2.plaintiffs like concat('%',#{terms.plaintiffs},'%') or t2.pagents like concat('%',#{terms.plaintiffs},'%'))
and (defendants like concat('%',#{terms.defendants},'%') or dagents like concat('%',#{terms.defendants},'%'))
and (DATE_FORMAT(t1.apply_time,'%Y-%m-%d') = ]]> #{terms.applyStart}
and DATE_FORMAT(t1.apply_time,'%Y-%m-%d') #{terms.applyEnd})
and t1.judic_audit = #{terms.auditResult}
AND CONCAT(
IFNULL( t2.prov_name, '' ),
IFNULL( t2.city_name, '' ),
IFNULL( t2.area_name, '' ),
IFNULL( t2.road_name, '' ),
IFNULL( t2.village_name, '' ),
IFNULL( t2.addr, '' )) like concat('%',#{terms.addr},'%')
and t2.case_no like concat('%',#{terms.caseNo},'%')
and t1.apply_unit_id = #{terms.applyUnitId}
and t1.delete_status = '1' and t2.delete_status = '1'
and (plaintiffs like concat('%',#{terms.plaintiffs},'%') or pagents like concat('%',#{terms.plaintiffs},'%'))
and (defendants like concat('%',#{terms.defendants},'%') or dagents like concat('%',#{terms.defendants},'%'))
and (DATE_FORMAT(medi_end_time,'%Y-%m-%d') = ]]> #{terms.mediEndStart}
and DATE_FORMAT(medi_end_time,'%Y-%m-%d') #{terms.mediEndEnd})
and mediator like concat('%',#{terms.mediateUserName},'%')
AND CONCAT(
IFNULL( prov_name, '' ),
IFNULL( city_name, '' ),
IFNULL( area_name, '' ),
IFNULL( road_name, '' ),
IFNULL( village_name, '' ),
IFNULL( addr, '' )) like concat('%',#{terms.addr},'%')
and case_no like concat('%',#{terms.caseNo},'%')
and judic_apply = #{terms.judicApply}
and medi_result = #{terms.mediResult}
and mediate_unit_id = #{terms.mediateUnitId}
a.id,
a.id as case_id,
a.status_name,
a.canal,
a.canal_name,
a.case_level,
a.case_type,
a.case_type_name,
a.case_ref,
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,
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.judic_apply,
b.mediator,
d.id as caseTaskId,
j.apply_time,
j.court_name,
j.judic_audit,
j.judic_audit_name,
j.judic_result,
j.judic_result_name,
j.status,
j.process,
j.process_name,
j.judic_result_name,
j.apply_unit_name
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_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 a.case_ref like CONCAT('%', #{terms.caseRef}, '%')
and (DATE_FORMAT(a.create_time,'%Y-%m-%d') = ]]> #{terms.createStart}
and DATE_FORMAT(a.create_time,'%Y-%m-%d') #{terms.createEnd})
and (DATE_FORMAT(b.close_time,'%Y-%m-%d') = ]]> #{terms.closeStart}
and DATE_FORMAT(b.close_time,'%Y-%m-%d') #{terms.closeEnd})
and a.plaintiffs like CONCAT('%', #{terms.plaintiffs}, '%')
and a.defendants like CONCAT('%', #{terms.defendants}, '%')
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.belong_unit_id = #{terms.belongUnitId}
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 b.judic_apply = #{terms.judicApply}
and a.info_process 3
and a.info_process = #{terms.infoProcess}
and j.judic_result = #{terms.judicResult}
and (t2.plaintiffs like concat('%', #{terms.plaintiffs}, '%') or t2.pagents like concat('%', #{terms.plaintiffs}, '%'))
and (t2.defendants like concat('%', #{terms.defendants}, '%') or dagents like concat('%', #{terms.defendants}, '%'))
and (DATE_FORMAT(t1.apply_time,'%Y-%m-%d') = ]]> #{terms.applyStart}
and DATE_FORMAT(t1.apply_time,'%Y-%m-%d') #{terms.applyEnd})
and t1.judic_no like concat('%', #{terms.judicNo}, '%')
and t1.process = #{terms.process}
and t1.judic_result = #{terms.judicResult}
and t1.mediate_judic_no like concat('%', #{terms.mediateJudicNo}, '%')
AND CONCAT(
IFNULL( t2.prov_name, '' ),
IFNULL( t2.city_name, '' ),
IFNULL( t2.area_name, '' ),
IFNULL( t2.road_name, '' ),
IFNULL( t2.village_name, '' ),
IFNULL( t2.addr, '' )) like concat('%',#{terms.addr},'%')
and t1.court_name like concat('%', #{terms.courtName}, '%')
and t1.mediate_unit_name like concat('%', #{terms.mediateUnitName}, '%')
and t2.case_no like concat('%', #{terms.caseNo}, '%')
and t2.case_type = #{terms.caseType}
and t1.judge_name like concat('%', #{terms.judgeName}, '%')
and t1.apply_unit_id = #{terms.applyUnitId}
and t1.court_id = #{terms.courtId}
and t1.judge_id = #{terms.judgeId}
and t1.delete_status = '1' and t2.delete_status = '1'
and t1.process = #{terms.process}
and (t2.plaintiffs like concat('%',#{terms.plaintiffs},'%') or t2.pagents like concat('%',#{terms.plaintiffs},'%'))
and (t2.defendants like concat('%',#{terms.defendants},'%') or t2.dagents like concat('%',#{terms.defendants},'%'))
and t1.cust_id = #{terms.custId}
and t2.plaintiffs like concat('%', #{terms.plaintiffs}, '%')
and t2.defendants like concat('%', #{terms.defendants}, '%')
and (DATE_FORMAT(t1.apply_time,'%Y-%m-%d') = ]]> #{terms.applyStart}
and DATE_FORMAT(t1.apply_time,'%Y-%m-%d') #{terms.applyEnd})
and (DATE_FORMAT(t1.audit_time,'%Y-%m-%d') = ]]> #{terms.auditStart}
and DATE_FORMAT(t1.audit_time,'%Y-%m-%d') #{terms.auditEnd})
and (DATE_FORMAT(t3.close_time,'%Y-%m-%d') = ]]> #{terms.closeStart}
and DATE_FORMAT(t3.close_time,'%Y-%m-%d') #{terms.closeEnd})
and (DATE_FORMAT(t1.judic_end_time,'%Y-%m-%d') = ]]> #{terms.judicEndStart}
and DATE_FORMAT(t1.judic_end_time,'%Y-%m-%d') #{terms.judicEndEnd})
and t1.apply_unit_name like concat('%', #{terms.applyUnitName}, '%')
AND CONCAT(
IFNULL( t2.prov_name, '' ),
IFNULL( t2.city_name, '' ),
IFNULL( t2.area_name, '' ),
IFNULL( t2.road_name, '' ),
IFNULL( t2.village_name, '' ),
IFNULL( t2.addr, '' )) like concat('%',#{terms.addr},'%')
and t2.case_no like concat('%', #{terms.caseNo}, '%')
and t1.judic_no like concat('%', #{terms.judicNo}, '%')
and t1.handle_unit_id = #{terms.handlerUnitId}
and t1.handle_dept_id = #{terms.handlerDeptId}
and t1.handle_user_id = #{terms.handlerUserId}
and t1.handle_unit_id = #{terms.doUnit}
and t1.status = #{terms.status}
and t1.judic_audit = #{terms.judicAudit}
and t1.judic_result = #{terms.judicResult}
and t4.ass_user_id = #{terms.assUserId}
and t1.delete_status = '0'
and t1.process in
#{process}