|
@@ -39,81 +39,83 @@
|
|
|
|
|
|
<select id="findList" resultType="com.jeeplus.test.cw.projectReport.domain.CwProjectReportData">
|
|
|
SELECT
|
|
|
- DISTINCT a.id,
|
|
|
- a.create_by as createById,
|
|
|
- a.create_date,
|
|
|
- a.update_by,
|
|
|
- a.update_date,
|
|
|
- a.del_flag,
|
|
|
- a.remarks,
|
|
|
- a.status,
|
|
|
- a.document_no,
|
|
|
- a.project_report_number,
|
|
|
- a.project_id,
|
|
|
- a.office_id,
|
|
|
- a.signature_type,
|
|
|
- a.signature_annotator1,
|
|
|
- a.signature_annotator2,
|
|
|
- g.name as "signatureAnnotator1Name",
|
|
|
- h.name as "signatureAnnotator2Name",
|
|
|
- a.signature_contract_id,
|
|
|
- a.real_create,
|
|
|
- a.proc_ins_id,
|
|
|
- a.process_definition_id,
|
|
|
- b.project_number as projectNumber,
|
|
|
- b.project_name as projectName,
|
|
|
- b.project_master_id as projectMasterId,
|
|
|
- c.name as departmentName,
|
|
|
- d.name as userName,
|
|
|
- a.audit_fees,
|
|
|
- e.name as projectMasterName,
|
|
|
- b.real_header as projectMaster2Id,
|
|
|
- f.name as projectMaster2Name,
|
|
|
- cw_prs1.proc_ins_id as proc_ins_id1,
|
|
|
- cw_prs1.process_definition_id as process_definition_id1,
|
|
|
- cw_prs1.status as status1,
|
|
|
- cw_prs1.id as sid1,
|
|
|
- cw_prs2.proc_ins_id as proc_ins_id2,
|
|
|
- cw_prs2.process_definition_id as process_definition_id2,
|
|
|
- cw_prs2.status as status2,
|
|
|
- cw_prs2.id as sid2,
|
|
|
- cw_prs3.proc_ins_id as proc_ins_ids3,
|
|
|
- cw_prs3.process_definition_id as process_definition_id3,
|
|
|
- cw_prs3.status as status3,
|
|
|
- cw_prs3.id as sid3,
|
|
|
- ifnull(cw_rev.review_status,'0') as reviewStatus,
|
|
|
- cw_rev.proc_ins_id as procInsId3,
|
|
|
- new_line.report_no as reportNo,
|
|
|
- cwcb.name as servedUnitName,
|
|
|
- art.ID_ as rev_task_id,
|
|
|
- art1.ID_ as sign_task_id1,
|
|
|
- art2.ID_ as sign_task_id2,
|
|
|
- art3.ID_ as sign_task_id3,
|
|
|
- a.industry,
|
|
|
- a.business_objects
|
|
|
+ DISTINCT a.id,
|
|
|
+ a.create_by as createById,
|
|
|
+ a.create_date,
|
|
|
+ a.update_by,
|
|
|
+ a.update_date,
|
|
|
+ a.del_flag,
|
|
|
+ a.remarks,
|
|
|
+ a.status,
|
|
|
+ a.document_no,
|
|
|
+ a.project_report_number,
|
|
|
+ a.project_id,
|
|
|
+ a.office_id,
|
|
|
+ a.signature_type,
|
|
|
+ a.signature_annotator1,
|
|
|
+ a.signature_annotator2,
|
|
|
+ g.name as "signatureAnnotator1Name",
|
|
|
+ h.name as "signatureAnnotator2Name",
|
|
|
+ a.signature_contract_id,
|
|
|
+ a.real_create,
|
|
|
+ a.proc_ins_id,
|
|
|
+ a.process_definition_id,
|
|
|
+ b.project_number as projectNumber,
|
|
|
+ b.project_name as projectName,
|
|
|
+ b.project_master_id as projectMasterId,
|
|
|
+ c.name as departmentName,
|
|
|
+ d.name as userName,
|
|
|
+ a.audit_fees,
|
|
|
+ e.name as projectMasterName,
|
|
|
+ b.real_header as projectMaster2Id,
|
|
|
+ f.name as projectMaster2Name,
|
|
|
+ cw_prs1.proc_ins_id as proc_ins_id1,
|
|
|
+ cw_prs1.process_definition_id as process_definition_id1,
|
|
|
+ cw_prs1.status as status1,
|
|
|
+ cw_prs1.id as sid1,
|
|
|
+ cw_prs2.proc_ins_id as proc_ins_id2,
|
|
|
+ cw_prs2.process_definition_id as process_definition_id2,
|
|
|
+ cw_prs2.status as status2,
|
|
|
+ cw_prs2.id as sid2,
|
|
|
+ cw_prs3.proc_ins_id as proc_ins_ids3,
|
|
|
+ cw_prs3.process_definition_id as process_definition_id3,
|
|
|
+ cw_prs3.status as status3,
|
|
|
+ cw_prs3.id as sid3,
|
|
|
+ ifnull(cw_rev.review_status,'0') as reviewStatus,
|
|
|
+ cw_rev.proc_ins_id as procInsId3,
|
|
|
+ new_line.report_no as reportNo,
|
|
|
+ cwcb.name as servedUnitName,
|
|
|
+ art.ID_ as rev_task_id,
|
|
|
+ art1.ID_ as sign_task_id1,
|
|
|
+ art2.ID_ as sign_task_id2,
|
|
|
+ art3.ID_ as sign_task_id3,
|
|
|
+ a.industry,
|
|
|
+ a.business_objects,
|
|
|
+ cwci.contract_name as contractName
|
|
|
FROM cw_project_report a
|
|
|
- left join cw_project_records b on a.project_id = b.id
|
|
|
- LEFT JOIN sys_office c on a.office_id = c.id
|
|
|
- LEFT JOIN sys_user d on a.create_by = d.id
|
|
|
- LEFT JOIN sys_user e on b.project_master_id = e.id
|
|
|
- LEFT JOIN sys_user f on b.real_header = f.id
|
|
|
- LEFT JOIN sys_user g on a.signature_annotator1 = g.id
|
|
|
- LEFT JOIN sys_user h on a.signature_annotator2 = h.id
|
|
|
+ left join cw_project_records b on a.project_id = b.id
|
|
|
+ LEFT JOIN sys_office c on a.office_id = c.id
|
|
|
+ LEFT JOIN sys_user d on a.create_by = d.id
|
|
|
+ LEFT JOIN sys_user e on b.project_master_id = e.id
|
|
|
+ LEFT JOIN sys_user f on b.real_header = f.id
|
|
|
+ LEFT JOIN sys_user g on a.signature_annotator1 = g.id
|
|
|
+ LEFT JOIN sys_user h on a.signature_annotator2 = h.id
|
|
|
|
|
|
- LEFT JOIN cw_project_report_signature cw_prs1 on cw_prs1.report_id = a.id and cw_prs1.type = '1' and cw_prs1.del_flag = '0'
|
|
|
- LEFT JOIN cw_project_report_signature cw_prs2 on cw_prs2.report_id = a.id and cw_prs2.type = '2' and cw_prs2.del_flag = '0'
|
|
|
- LEFT JOIN cw_project_report_signature cw_prs3 on cw_prs3.report_id = a.id and cw_prs3.type = '3' and cw_prs3.del_flag = '0'
|
|
|
- left join act_ru_task art1 ON cw_prs1.proc_ins_id = art1.PROC_INST_ID_
|
|
|
- left join act_ru_task art2 ON cw_prs2.proc_ins_id = art2.PROC_INST_ID_
|
|
|
- left join act_ru_task art3 ON cw_prs3.proc_ins_id = art3.PROC_INST_ID_
|
|
|
+ LEFT JOIN cw_project_report_signature cw_prs1 on cw_prs1.report_id = a.id and cw_prs1.type = '1' and cw_prs1.del_flag = '0'
|
|
|
+ LEFT JOIN cw_project_report_signature cw_prs2 on cw_prs2.report_id = a.id and cw_prs2.type = '2' and cw_prs2.del_flag = '0'
|
|
|
+ LEFT JOIN cw_project_report_signature cw_prs3 on cw_prs3.report_id = a.id and cw_prs3.type = '3' and cw_prs3.del_flag = '0'
|
|
|
+ left join act_ru_task art1 ON cw_prs1.proc_ins_id = art1.PROC_INST_ID_
|
|
|
+ left join act_ru_task art2 ON cw_prs2.proc_ins_id = art2.PROC_INST_ID_
|
|
|
+ left join act_ru_task art3 ON cw_prs3.proc_ins_id = art3.PROC_INST_ID_
|
|
|
|
|
|
- left join cw_project_report_new_line new_line on a.id = new_line.report_id and new_line.del_flag = '0'
|
|
|
- left join cw_project_report_review cw_rev on a.id = cw_rev.report_id and cw_rev.del_flag = '0'
|
|
|
- left join act_ru_task art ON cw_rev.proc_ins_id = art.PROC_INST_ID_
|
|
|
- left join cw_project_members cpm on b.id = cpm.project_id
|
|
|
- left join sys_user sub on cpm.user_id = sub.id
|
|
|
- left join sys_user_manage_office sumo on sumo.office_id = sub.office_id
|
|
|
- left join cw_work_client_base cwcb on new_line.served_unit_id = cwcb.id
|
|
|
+ left join cw_project_report_new_line new_line on a.id = new_line.report_id and new_line.del_flag = '0'
|
|
|
+ left join cw_project_report_review cw_rev on a.id = cw_rev.report_id and cw_rev.del_flag = '0'
|
|
|
+ left join act_ru_task art ON cw_rev.proc_ins_id = art.PROC_INST_ID_
|
|
|
+ left join cw_project_members cpm on b.id = cpm.project_id
|
|
|
+ left join sys_user sub on cpm.user_id = sub.id
|
|
|
+ left join sys_user_manage_office sumo on sumo.office_id = sub.office_id
|
|
|
+ left join cw_work_client_base cwcb on new_line.served_unit_id = cwcb.id
|
|
|
+ left join cw_work_contract_info cwci on b.contract_id = cwci.id
|
|
|
${ew.customSqlSegment}
|
|
|
ORDER BY a.create_date DESC
|
|
|
</select>
|