Browse Source

绩效考核

lihui007 4 năm trước cách đây
mục cha
commit
ec80dba337

+ 19 - 0
operation_manager/src/main/resources/mapper/order/WorkOrderManageMapper.xml

@@ -907,4 +907,23 @@
       </where>
     ) a
   </select>
+
+  <select id="selectByTime" 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,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)
+       or t1.id in(select flow_id from sc_work_flow_log where flow_type=2 and find_in_set(#{userId},handle_user_id)))
+      and tenant_id = #{tenantId}
+      and (t2.id is null or t1.order_user_id=t2.handle_user_id)
+      and t1.date_create between #{startTime} and #{endTime}
+    union
+    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)))
+      and tenant_id = #{tenantId}
+      and date_create between #{startTime} and #{endTime}
+    order by send_time desc
+  </select>
 </mapper>