|
@@ -136,6 +136,107 @@
|
|
|
${ew.customSqlSegment}
|
|
|
ORDER BY a.create_time DESC
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="findList2" resultType="com.jeeplus.finance.projectReport.domain.CwProjectReportData">
|
|
|
+ SELECT
|
|
|
+ DISTINCT a.id,
|
|
|
+ a.create_by_id as createById,
|
|
|
+ a.create_time,
|
|
|
+ a.update_by_id,
|
|
|
+ a.update_time,
|
|
|
+ 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,
|
|
|
+ a.signature_contract_id,
|
|
|
+ a.real_create,
|
|
|
+ a.proc_ins_id,
|
|
|
+ a.process_definition_id,
|
|
|
+ a.signature_annotator_status,
|
|
|
+ b.project_number as projectNumber,
|
|
|
+ b.project_name as projectName,
|
|
|
+ b.project_master_id as projectMasterId,
|
|
|
+ b.real_header as projectMasterId2,
|
|
|
+ c.name as departmentName,
|
|
|
+ d.name as userName,
|
|
|
+ ifnull(cw_pa.audit_money,"0") as "auditFees",
|
|
|
+ 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,
|
|
|
+ cw_rev.new_type as newType,
|
|
|
+ cw_rev.audit_time as auditTime,
|
|
|
+ new_line.report_no as reportNo,
|
|
|
+ cwcb.name as servedUnitName,
|
|
|
+ art.ID_ as rev_task_id,
|
|
|
+ arta.ID_ as rev_task_id2,
|
|
|
+ art1.ID_ as sign_task_id1,
|
|
|
+ art2.ID_ as sign_task_id2,
|
|
|
+ art3.ID_ as sign_task_id3,
|
|
|
+ a.industry,
|
|
|
+ a.business_objects,
|
|
|
+ a.report_name,
|
|
|
+ cw_na.proc_ins_id as applyProcId,
|
|
|
+ cw_na.process_definition_id as applyProcDefId,
|
|
|
+ ifnull(cw_na.review_status,'0') as applyStatus,
|
|
|
+ ifnull(cw_na.take_number_type,'0') as takeNumberType,
|
|
|
+ cw_na.improper_take_cause as improperTakeCause,
|
|
|
+
|
|
|
+ artar.ID_ as review_task_number_id,
|
|
|
+ cw_nra.proc_ins_id as applyReviewProcId,
|
|
|
+ cw_nra.process_definition_id as applyReviewProcDefId,
|
|
|
+ ifnull(cw_nra.review_status,'0') as applyReviewStatus,
|
|
|
+ cw_ci.contract_name
|
|
|
+ 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_id = 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 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 cw_project_report_archive cw_pa on a.id = cw_pa.report_id and cw_pa.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 cw_ci on b.contract_id=cw_ci.id
|
|
|
+ LEFT JOIN cw_project_report_number_apply cw_na on a.id = cw_na.report_id
|
|
|
+ LEFT JOIN cw_project_report_number_review_apply cw_nra on a.id = cw_nra.report_id
|
|
|
+ left join act_ru_task arta ON cw_na.proc_ins_id = arta.PROC_INST_ID_
|
|
|
+ left join act_ru_task artar ON cw_nra.proc_ins_id = artar.PROC_INST_ID_
|
|
|
+ ${ew.customSqlSegment}
|
|
|
+ ORDER BY cw_rev.audit_time DESC
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="queryById" resultType="com.jeeplus.finance.projectReport.domain.CwProjectReportData">
|
|
|
SELECT
|
|
|
a.id,
|