|
@@ -31,8 +31,33 @@
|
|
|
<result column="flow_detail" property="flowDetail" jdbcType="VARCHAR" />
|
|
|
</resultMap>
|
|
|
|
|
|
+ <resultMap id="workFlowLogResultMap" type="com.huaxu.order.entity.WorkFlowLog">
|
|
|
+ <id column="id" property="id" jdbcType="INTEGER" />
|
|
|
+ <result column="flow_id" property="flowId" jdbcType="INTEGER" />
|
|
|
+ <result column="log_process_instance_id" property="processInstanceId" jdbcType="VARCHAR" />
|
|
|
+ <result column="task_id" property="taskId" jdbcType="VARCHAR" />
|
|
|
+ <result column="handle_user_id" property="handleUserId" jdbcType="VARCHAR" />
|
|
|
+ <result column="handle_user_name" property="handleUserName" jdbcType="VARCHAR" />
|
|
|
+ <result column="flow_type" property="flowType" jdbcType="INTEGER" />
|
|
|
+ <result column="flow_result" property="flowResult" jdbcType="VARCHAR" />
|
|
|
+ <result column="log_create_by" property="createBy" jdbcType="VARCHAR" />
|
|
|
+ <result column="log_date_create" property="dateCreate" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="log_update_by" property="updateBy" jdbcType="VARCHAR" />
|
|
|
+ <result column="log_date_update" property="dateUpdate" jdbcType="TIMESTAMP" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
<resultMap id="TaskResultMap" type="com.huaxu.task.entity.TaskManage" extends="BaseResultMap">
|
|
|
- <association property="workFlowLog" javaType="com.huaxu.order.entity.WorkFlowLog">
|
|
|
+ <association property="workFlowDetail" javaType="com.huaxu.order.entity.WorkFlowDetail">
|
|
|
+ <id column="id" property="id" jdbcType="INTEGER" />
|
|
|
+ <result column="flow_id" property="flowId" jdbcType="INTEGER" />
|
|
|
+ <result column="flow_type" property="flowType" jdbcType="INTEGER" />
|
|
|
+ <result column="flow_detail" property="flowDetail" jdbcType="VARCHAR" />
|
|
|
+ <result column="detail_create_by" property="createBy" jdbcType="VARCHAR" />
|
|
|
+ <result column="detail_date_create" property="dateCreate" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="detail_update_by" property="updateBy" jdbcType="VARCHAR" />
|
|
|
+ <result column="detail_date_update" property="dateUpdate" jdbcType="TIMESTAMP" />
|
|
|
+ </association>
|
|
|
+ <collection property="workFlowLogList" ofType="com.huaxu.order.entity.WorkFlowLog" javaType="java.util.List" select="getWorkFlowLog" column="{flowId=id}">
|
|
|
<id column="id" property="id" jdbcType="INTEGER" />
|
|
|
<result column="flow_id" property="flowId" jdbcType="INTEGER" />
|
|
|
<result column="log_process_instance_id" property="processInstanceId" jdbcType="VARCHAR" />
|
|
@@ -45,17 +70,7 @@
|
|
|
<result column="log_date_create" property="dateCreate" jdbcType="TIMESTAMP" />
|
|
|
<result column="log_update_by" property="updateBy" jdbcType="VARCHAR" />
|
|
|
<result column="log_date_update" property="dateUpdate" jdbcType="TIMESTAMP" />
|
|
|
- </association>
|
|
|
- <association property="workFlowDetail" javaType="com.huaxu.order.entity.WorkFlowDetail">
|
|
|
- <id column="id" property="id" jdbcType="INTEGER" />
|
|
|
- <result column="flow_id" property="flowId" jdbcType="INTEGER" />
|
|
|
- <result column="flow_type" property="flowType" jdbcType="INTEGER" />
|
|
|
- <result column="flow_detail" property="flowDetail" jdbcType="VARCHAR" />
|
|
|
- <result column="detail_create_by" property="createBy" jdbcType="VARCHAR" />
|
|
|
- <result column="detail_date_create" property="dateCreate" jdbcType="TIMESTAMP" />
|
|
|
- <result column="detail_update_by" property="updateBy" jdbcType="VARCHAR" />
|
|
|
- <result column="detail_date_update" property="dateUpdate" jdbcType="TIMESTAMP" />
|
|
|
- </association>
|
|
|
+ </collection>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="Base_Column_List" >
|
|
@@ -66,6 +81,13 @@
|
|
|
task_checked
|
|
|
</sql>
|
|
|
|
|
|
+ <select id="getWorkFlowLog" resultMap="workFlowLogResultMap" parameterType="map">
|
|
|
+ select t3.process_instance_id log_process_instance_id,t3.task_id,t3.handle_user_id,t3.handle_user_name,t3.flow_result,t3.create_by log_create_by,
|
|
|
+ t3.date_create log_date_create,t3.update_by log_update_by,t3.date_update log_date_update
|
|
|
+ from sc_work_flow_log t3
|
|
|
+ where t3.flow_id= #{flowId,jdbcType=INTEGER} and t3.flow_type=1
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
@@ -367,13 +389,9 @@
|
|
|
task_content, task_area_shape, task_area_name, task_type, plan_status, tenant_id,
|
|
|
t1.process_instance_id, process_def_id, current_task_id, current_users, current_task_name,
|
|
|
t1.create_by, t1.date_create, t1.update_by, t1.date_update, company_org_id, department_org_id,task_checked,
|
|
|
- t2.flow_detail,t2.create_by detail_create_by,t2.date_create detail_date_create,t2.update_by detail_update_by,t2.date_update detail_date_update,
|
|
|
- t3.process_instance_id log_process_instance_id,t3.task_id,t3.handle_user_id,t3.handle_user_name,t3.flow_result,t3.create_by log_create_by,
|
|
|
- t3.date_create log_date_create,t3.update_by log_update_by,t3.date_update log_date_update
|
|
|
+ t2.flow_detail,t2.create_by detail_create_by,t2.date_create detail_date_create,t2.update_by detail_update_by,t2.date_update detail_date_update
|
|
|
from sc_plan_manage t1 left join sc_work_flow_detail t2
|
|
|
on t1.id = t2.flow_id and t2.flow_type=1
|
|
|
- left join sc_work_flow_log t3
|
|
|
- on t3.flow_id = t1.id and t3.flow_type=1
|
|
|
<where>
|
|
|
<if test="plan.tenantId != null and plan.tenantId != ''">
|
|
|
and t1.tenant_id = #{plan.tenantId}
|