From 203acef84d19ffc01bc8d5dd8ef85f90ba400f5c Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期日, 09 三月 2025 11:49:58 +0800 Subject: [PATCH] 容缺查询 --- business/src/main/resources/mapper/ProjectProcessMapper.xml | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/business/src/main/resources/mapper/ProjectProcessMapper.xml b/business/src/main/resources/mapper/ProjectProcessMapper.xml index 0b9ec31..5008916 100644 --- a/business/src/main/resources/mapper/ProjectProcessMapper.xml +++ b/business/src/main/resources/mapper/ProjectProcessMapper.xml @@ -63,7 +63,6 @@ <result column="create_by" property="createBy" /> <result column="process_def_id" property="processDefId" /> <result column="process_ins_id" property="processInsId" /> -<!-- <collection property="children" ofType="com.ycl.domain.vo.ProjectEngineeringVO" select="getProjectEngineering" column="id"></collection>--> </resultMap> <resultMap id="EngineeringMap" type="com.ycl.domain.vo.ProjectEngineeringVO"> @@ -78,7 +77,8 @@ <result column="parent_id" property="parent" /> <result column="project_owner_unit_name" property="projectOwnerUnitName" /> <result column="competent_department_name" property="competentDepartmentName" /> -<!-- <collection property="children" ofType="com.ycl.domain.vo.ProjectEngineeringVO" select="getProjectEngineeringList" column="id"></collection>--> + <result column="process_ins_id" property="processInsId" /> + <result column="process_def_id" property="processDefId" /> </resultMap> <select id="getProjectEngineeringList" parameterType="string" resultMap="EngineeringMap"> @@ -113,9 +113,11 @@ SELECT TT.id, TT.project_info_id, TT.project_name, TT.project_type, TT.investment_amount, TT.status, TT.unit, TT.department, TT.parent_id, TT.year, TT.gmt_create, (SELECT SD.dept_name FROM sys_dept SD WHERE SD.dept_id = TT.unit) AS project_owner_unit_name, - (SELECT SD.dept_name FROM sys_dept SD WHERE SD.dept_id = TT.department) AS competent_department_name + (SELECT SD.dept_name FROM sys_dept SD WHERE SD.dept_id = TT.department) AS competent_department_name, + TPP.process_ins_id, TPP.process_def_id FROM temp_table TT + LEFT JOIN t_project_process TPP ON TPP.project_id = TT.id AND TPP.deleted = 0 AND TPP.project_type = 'ENGINEERING' ORDER BY TT.gmt_create DESC </select> @@ -171,7 +173,9 @@ <select id="getNormalInsIds" resultType="string"> - SELECT TPP.process_ins_id FROM t_project_info TPI INNER JOIN t_project_process TPP ON TPI.id = TPP.project_id AND TPI.deleted = 0 + SELECT TPP.process_ins_id FROM t_project_info TPI INNER JOIN t_project_process TPP ON TPI.id = TPP.project_id AND TPI.deleted = 0 AND TPP.project_type = 'PROJECT' + UNION ALL + SELECT TPP.process_ins_id FROM t_project_engineering TPE INNER JOIN t_project_process TPP ON TPE.id = TPP.project_id AND TPE.deleted = 0 AND TPP.project_type = 'ENGINEERING' </select> </mapper> -- Gitblit v1.8.0