From 23b688e436a89845e92d861adb5875e625e90d9f Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期五, 14 三月 2025 11:43:18 +0800
Subject: [PATCH] Merge branch 'dev'

---
 business/src/main/resources/mapper/ProjectProcessMapper.xml |   33 +++++++++++++++++++++++++++++++--
 1 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/business/src/main/resources/mapper/ProjectProcessMapper.xml b/business/src/main/resources/mapper/ProjectProcessMapper.xml
index e4f8bdc..5890f54 100644
--- a/business/src/main/resources/mapper/ProjectProcessMapper.xml
+++ b/business/src/main/resources/mapper/ProjectProcessMapper.xml
@@ -77,6 +77,8 @@
         <result column="parent_id" property="parent" />
         <result column="project_owner_unit_name" property="projectOwnerUnitName" />
         <result column="competent_department_name" property="competentDepartmentName" />
+        <result column="process_ins_id" property="processInsId" />
+        <result column="process_def_id" property="processDefId" />
     </resultMap>
 
     <select id="getProjectEngineeringList" parameterType="string" resultMap="EngineeringMap">
@@ -111,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>
@@ -169,7 +173,32 @@
 
 
     <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>
 
+    <select id="getHisByteId" resultType="com.ycl.domain.vo.FlowableVarVO">
+        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_, 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>
+
+
+    <insert id="insertHisFlowableVar" parameterType="com.ycl.domain.vo.FlowableVarVO">
+        insert into act_hi_varinst(ID_,REV_, PROC_INST_ID_, EXECUTION_ID_, NAME_, VAR_TYPE_,BYTEARRAY_ID_,DOUBLE_,LONG_, TEXT_, CREATE_TIME_, LAST_UPDATED_TIME_)
+        values (#{v.ID_}, 0,  #{v.PROC_INST_ID_}, #{v.EXECUTION_ID_}, #{v.NAME_}, #{v.VAR_TYPE_}, #{v.BYTEARRAY_ID_}, #{v.DOUBLE_}, #{v.LONG_}, #{v.TEXT_}, #{v.CREATE_TIME_}, #{v.LAST_UPDATED_TIME_})
+    </insert>
+
+    <insert id="insertRunFlowableVar" parameterType="com.ycl.domain.vo.FlowableVarVO">
+        insert into act_ru_variable(ID_,REV_, PROC_INST_ID_, EXECUTION_ID_, NAME_, TYPE_,BYTEARRAY_ID_,DOUBLE_,LONG_, TEXT_)
+        values (#{v.ID_}, 1,  #{v.PROC_INST_ID_}, #{v.EXECUTION_ID_}, #{v.NAME_}, #{v.VAR_TYPE_}, #{v.BYTEARRAY_ID_}, #{v.DOUBLE_}, #{v.LONG_}, #{v.TEXT_})
+    </insert>
+
+    <insert id="insertByteArray">
+        insert into act_ge_bytearray(ID_, REV_, NAME_, BYTES_) values (#{id_}, #{rev_}, #{name_}, #{bytes_, jdbcType=BLOB})
+    </insert>
+
 </mapper>

--
Gitblit v1.8.0