| 
					
				 | 
			
			
				@@ -25,12 +25,39 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <result column="date_create" property="dateCreate" jdbcType="TIMESTAMP" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <result column="update_by" property="updateBy" jdbcType="VARCHAR" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <result column="date_update" property="dateUpdate" jdbcType="TIMESTAMP" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <result column="company_org_id" property="companyOrgId" jdbcType="VARCHAR" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <result column="company_org_id" property="compa=nyOrgId" jdbcType="VARCHAR" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <result column="department_org_id" property="departmentOrgId" jdbcType="VARCHAR" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <result column="task_checked" property="taskChecked" jdbcType="VARCHAR" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <result column="flow_detail" property="flowDetail" jdbcType="VARCHAR" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   </resultMap> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  <resultMap id="TaskResultMap" type="com.huaxu.task.entity.TaskManage" extends="BaseResultMap"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <association property="workFlowLog" javaType="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" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </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> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  </resultMap> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   <sql id="Base_Column_List" > 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     id, plan_id, plan_name, plan_user_id, user_id, plan_date, plan_start_date, plan_end_date,  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     task_content, task_area_shape, task_area_name, task_type, plan_status, tenant_id,  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -334,10 +361,19 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     where id = #{id,jdbcType=INTEGER} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   </update> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  <select id="findPage" resultMap="BaseResultMap"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  <select id="findPage" resultMap="TaskResultMap"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     select 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <include refid="Base_Column_List"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    from sc_plan_manage t1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    t1.id, t1.plan_id, plan_name, plan_user_id, user_id, plan_date, plan_start_date, plan_end_date, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    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 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    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} 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -375,6 +411,9 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <if test="plan.planStatus != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         and t1.plan_status =  #{plan.planStatus,jdbcType=INTEGER} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <if test="plan.planStatus == null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        and t1.plan_status != 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       <if test="plan.startDate != null and plan.endDate != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         and t1.date_create >= date_format(#{plan.startDate,jdbcType=VARCHAR},'%Y-%c-%d') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         and t1.date_create <= DATE_ADD(date_format(#{plan.endDate,jdbcType=VARCHAR},'%Y-%c-%d'),INTERVAL 1 DAY) 
			 |