|
@@ -207,4 +207,47 @@
|
|
|
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'
|
|
|
where a.signature_contract_id = #{contractId}
|
|
|
</select>
|
|
|
+ <select id="getByProjectId" resultType="com.jeeplus.test.cw.projectReport.domain.CwProjectReportData">
|
|
|
+ SELECT
|
|
|
+ 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,
|
|
|
+ a.signature_contract_id,
|
|
|
+ a.proc_ins_id,
|
|
|
+ a.process_definition_id,
|
|
|
+ b.project_number as projectNumber,
|
|
|
+ b.project_name as projectName,
|
|
|
+ c.name as departmentName,
|
|
|
+ d.name as userName,
|
|
|
+ a.create_date,
|
|
|
+ e.name as projectMasterName,
|
|
|
+ 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
|
|
|
+ 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 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'
|
|
|
+ where a.project_id = #{projectId} and a.del_flag = '0'
|
|
|
+ </select>
|
|
|
</mapper>
|