|
@@ -43,6 +43,7 @@
|
|
|
<result column="scenes_name" property="scenesName" jdbcType="VARCHAR" />
|
|
|
<result column="order_status_name" property="orderStatusName" jdbcType="VARCHAR" />
|
|
|
<result column="order_count" property="orderCount" jdbcType="VARCHAR" />
|
|
|
+ <result column="in_process_status" property="inProcessStatus" jdbcType="INTEGER" />
|
|
|
</resultMap>
|
|
|
|
|
|
<resultMap id="workFlowLogResultMap" type="com.huaxu.order.entity.WorkFlowLog">
|
|
@@ -93,7 +94,7 @@
|
|
|
department_org_id, order_status, event_type, order_type_id, order_pid, tenant_id,
|
|
|
process_instance_id, process_def_id, current_task_id, current_users, current_task_name,
|
|
|
create_by, date_create, update_by, date_update, geo,videos, pictures, device_id, scenes_id,
|
|
|
- device_name, scenes_name
|
|
|
+ device_name, scenes_name,in_process_status
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
|
select
|
|
@@ -465,6 +466,9 @@
|
|
|
<if test="pictures != null" >
|
|
|
pictures=#{pictures,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="inProcessStatus != null" >
|
|
|
+ in_process_status=#{inProcessStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
@@ -501,21 +505,22 @@
|
|
|
date_update = #{dateUpdate,jdbcType=TIMESTAMP},
|
|
|
geo = #{geo,jdbcType=VARCHAR},
|
|
|
videos = #{videos,jdbcType=VARCHAR},
|
|
|
- pictures = #{pictures,jdbcType=VARCHAR}
|
|
|
+ pictures = #{pictures,jdbcType=VARCHAR},
|
|
|
+ in_process_status=#{inProcessStatus,jdbcType=INTEGER}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
<select id="selectAppTodo" resultMap="BaseResultMap">
|
|
|
- select id,task_no,send_time,address,order_type_id,create_by,update_by,task_desc,order_status,current_task_name
|
|
|
+ select id,task_no,send_time,address,order_type_id,create_by,update_by,task_desc,order_status,current_task_name,in_process_status
|
|
|
from sc_work_order_manage
|
|
|
where find_in_set(#{userId},current_users) and tenant_id = #{tenantId}
|
|
|
union
|
|
|
- select id,plan_id,plan_date,task_area_name,task_type,create_by,update_by,task_content,plan_status,current_task_name
|
|
|
+ select id,plan_id,plan_date,task_area_name,task_type,create_by,update_by,task_content,plan_status,current_task_name,in_process_status
|
|
|
from sc_plan_manage
|
|
|
where find_in_set(#{userId},current_users) and tenant_id = #{tenantId}
|
|
|
order by send_time desc
|
|
|
</select>
|
|
|
<select id="selectAppAll" resultMap="BaseResultMap">
|
|
|
- select distinct t1.id,task_no,send_time,address,order_type_id,current_task_name,t1.create_by,t1.update_by,task_desc,order_status
|
|
|
+ select distinct t1.id,task_no,send_time,address,order_type_id,current_task_name,t1.create_by,t1.update_by,task_desc,order_status,in_process_status
|
|
|
from sc_work_order_manage t1
|
|
|
left join sc_work_flow_log t2 ON t1.id=t2.flow_id and flow_type=2 and find_in_set(#{userId},handle_user_id) and left(flow_result,2)='拒单'
|
|
|
where (find_in_set(#{userId},current_users)
|
|
@@ -523,7 +528,7 @@
|
|
|
and tenant_id = #{tenantId}
|
|
|
and (t2.id is null or t1.order_user_id=t2.handle_user_id)
|
|
|
union
|
|
|
- select id,plan_id,plan_date,task_area_name,task_type,current_task_name,create_by,update_by,task_content,plan_status
|
|
|
+ select id,plan_id,plan_date,task_area_name,task_type,current_task_name,create_by,update_by,task_content,plan_status,in_process_status
|
|
|
from sc_plan_manage
|
|
|
where (find_in_set(#{userId},current_users)
|
|
|
or id in(select flow_id from sc_work_flow_log where flow_type=1 and find_in_set(#{userId},handle_user_id)))
|
|
@@ -832,4 +837,29 @@
|
|
|
</where>
|
|
|
order by t1.date_create desc
|
|
|
</select>
|
|
|
+
|
|
|
+ <!--App事件列表-->
|
|
|
+ <select id="findEventListPage" resultMap="OrderResultMap">
|
|
|
+ select
|
|
|
+ t1.id, t1.task_no, t1.task_desc, t1.order_user_id, t1.send_time, t1.send_by, t1.plan_finish_date, t1.finish_date,
|
|
|
+ t1.date_limit, t1.urgency, t1.address, t1.contact_user, t1.contact_phone, t1.order_time, t1.company_org_id,
|
|
|
+ t1.department_org_id, t1.order_status, t1.event_type,case when t1.event_type=1 then '运维上报' when t1.event_type=2 then '用户上报' when t1.event_type=3 then '设备告警' end event_type_name,
|
|
|
+ t1.order_type_id, t1.order_pid, t1.tenant_id,
|
|
|
+ t1.process_instance_id, t1.process_def_id, t1.current_task_id, t1.current_users, t1.current_task_name,
|
|
|
+ t1.create_by, t1.date_create, t1.update_by, t1.date_update, t1.geo,t1.videos,t1.pictures,
|
|
|
+ t1.device_id, t1.scenes_id, t1.device_name, t1.scenes_name,
|
|
|
+ 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_work_order_manage t1 left join sc_work_flow_detail t2
|
|
|
+ on t1.id = t2.flow_id and t2.flow_type=2
|
|
|
+ <where>
|
|
|
+ t1.event_type = 1 and t1.create_by = #{order.createBy}
|
|
|
+ <if test="order.tenantId != null and order.tenantId != ''">
|
|
|
+ and t1.tenant_id = #{order.tenantId}
|
|
|
+ </if>
|
|
|
+ <if test="order.departmentOrgId != null and order.departmentOrgId != ''">
|
|
|
+ and t1.department_org_id = #{order.departmentOrgId}
|
|
|
+ </if>
|
|
|
+ order by t1.date_create desc
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
</mapper>
|