From 8d98a3403bd8ba92ef6c29c46d810a085a3dd1be Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期二, 15 七月 2025 19:13:47 +0800 Subject: [PATCH] 文件ip迁移兼容 --- business/src/main/resources/mapper/ProjectProcessMapper.xml | 40 ++++++++++++++++++++++++++++++++++------ 1 files changed, 34 insertions(+), 6 deletions(-) diff --git a/business/src/main/resources/mapper/ProjectProcessMapper.xml b/business/src/main/resources/mapper/ProjectProcessMapper.xml index 5890f54..53e153c 100644 --- a/business/src/main/resources/mapper/ProjectProcessMapper.xml +++ b/business/src/main/resources/mapper/ProjectProcessMapper.xml @@ -79,6 +79,7 @@ <result column="competent_department_name" property="competentDepartmentName" /> <result column="process_ins_id" property="processInsId" /> <result column="process_def_id" property="processDefId" /> + <result column="build_content" property="buildContent" /> </resultMap> <select id="getProjectEngineeringList" parameterType="string" resultMap="EngineeringMap"> @@ -105,13 +106,13 @@ <select id="getEngineeringList" parameterType="long" resultMap="EngineeringMap"> WITH RECURSIVE temp_table AS ( SELECT - id, project_info_id, project_name, project_type, investment_amount, status, unit, department, parent_id, year, gmt_create FROM t_project_engineering WHERE project_info_id = #{projectId} AND parent_id = '0' AND deleted = 0 + id, project_info_id, project_name, project_type, investment_amount, status, unit, department, parent_id, year, gmt_create, build_content FROM t_project_engineering WHERE project_info_id = #{projectId} AND parent_id = '0' AND deleted = 0 UNION ALL SELECT - TPE.id, TPE.project_info_id, TPE.project_name, TPE.project_type, TPE.investment_amount, TPE.status, TPE.unit, TPE.department, TPE.parent_id, TPE.year, TPE.gmt_create FROM t_project_engineering TPE INNER JOIN temp_table tb ON TPE.parent_id = tb.id AND TPE.deleted = 0 + TPE.id, TPE.project_info_id, TPE.project_name, TPE.project_type, TPE.investment_amount, TPE.status, TPE.unit, TPE.department, TPE.parent_id, TPE.year, TPE.gmt_create, TPE.build_content FROM t_project_engineering TPE INNER JOIN temp_table tb ON TPE.parent_id = tb.id AND TPE.deleted = 0 ) 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, + 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,TT.build_content, (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, TPP.process_ins_id, TPP.process_def_id @@ -159,7 +160,7 @@ </if> ${query.params.dataScope} </where> - + ORDER BY PI.gmt_create ASC </select> @@ -178,11 +179,26 @@ 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> - <select id="getHisByteId" resultType="com.ycl.domain.vo.FlowableVarVO"> + <resultMap id="flowableVarVOResultMap" type="com.ycl.domain.vo.FlowableVarVO"> + <id property="ID_" column="ID_"/> + <result property="PROC_INST_ID_" column="PROC_INST_ID_"/> + <result property="EXECUTION_ID_" column="EXECUTION_ID_"/> + <result property="NAME_" column="NAME_"/> + <result property="VAR_TYPE_" column="VAR_TYPE_"/> + <result property="BYTEARRAY_ID_" column="BYTEARRAY_ID_"/> + <result property="DOUBLE_" column="DOUBLE_"/> + <result property="LONG_" column="LONG_"/> + <result property="TEXT_" column="TEXT_"/> + <result property="TEXT2_" column="TEXT2_"/> + <result property="CREATE_TIME_" column="CREATE_TIME_"/> + <result property="LAST_UPDATED_TIME_" column="LAST_UPDATED_TIME_"/> + </resultMap> + + <select id="getHisByteId" resultMap="flowableVarVOResultMap"> SELECT ID_, PROC_INST_ID_, EXECUTION_ID_, NAME_, VAR_TYPE_, BYTEARRAY_ID_ FROM act_hi_varinst WHERE PROC_INST_ID_ = #{processInsId} AND NAME_ = #{keyName} </select> - <select id="getRuByteId" resultType="com.ycl.domain.vo.FlowableVarVO"> + <select id="getRuByteId" resultMap="flowableVarVOResultMap"> SELECT ID_, PROC_INST_ID_, EXECUTION_ID_, NAME_, TYPE_ as VAR_TYPE_, BYTEARRAY_ID_ FROM act_ru_variable WHERE PROC_INST_ID_ = #{processInsId} AND NAME_ = #{keyName} </select> @@ -201,4 +217,16 @@ insert into act_ge_bytearray(ID_, REV_, NAME_, BYTES_) values (#{id_}, #{rev_}, #{name_}, #{bytes_, jdbcType=BLOB}) </insert> + <delete id="deleteByteArray" parameterType="string"> + DELETE FROM act_ge_bytearray WHERE ID_ = #{id} + </delete> + + <delete id="deleteRunFlowableVar" parameterType="string"> + DELETE FROM act_ru_variable WHERE ID_ = #{id} + </delete> + + <delete id="deleteHisFlowableVar" parameterType="string"> + DELETE FROM act_hi_varinst WHERE ID_ = #{id} + </delete> + </mapper> -- Gitblit v1.8.0