|
@@ -4,45 +4,45 @@
|
|
|
|
|
|
<select id="selectNotice"
|
|
|
resultType="cn.iocoder.yudao.module.pms.controller.admin.stat.vo.OrderVo">
|
|
|
-select * from (select a.id,
|
|
|
- a.failure_name title,
|
|
|
- '待填写' as status,
|
|
|
- (select nickname COLLATE utf8mb4_unicode_ci from system_users mm where cast(mm.id as char) =a.maintain_person) as person,
|
|
|
- '维修工单' as type,
|
|
|
- a.create_time
|
|
|
- from rq_iot_maintain a
|
|
|
- where status = 'tx'
|
|
|
- and deleted = false
|
|
|
- union all
|
|
|
- select b.id,
|
|
|
- b.inspect_order_title title,
|
|
|
- '待执行' as status,
|
|
|
- b.charge_name person,
|
|
|
- '巡检工单' as type,
|
|
|
- b.create_time
|
|
|
- from rq_iot_inspect_order b
|
|
|
- where status = 'todo'
|
|
|
- and deleted = false
|
|
|
- union all
|
|
|
- select c.id,
|
|
|
- c.name title,
|
|
|
- '待填写' as status,
|
|
|
- (select nickname COLLATE utf8mb4_unicode_ci from system_users bb where cast(bb.id as char) = c.responsible_person) as person,
|
|
|
- '保养工单' as type,
|
|
|
- c.create_time
|
|
|
- from rq_iot_main_work_order c
|
|
|
- where result = 1
|
|
|
- and deleted = false
|
|
|
- union all
|
|
|
- select d.id,
|
|
|
- d.order_name title,
|
|
|
- '待填写' as status,
|
|
|
- user_name as person,
|
|
|
- '运行记录' as type,
|
|
|
- d.create_time
|
|
|
- from rq_iot_opeation_fill_order d
|
|
|
- where order_status = 0
|
|
|
- and deleted = false)fin
|
|
|
+ select * from (select a.id,
|
|
|
+ a.failure_name title,
|
|
|
+ '待填写' as status,
|
|
|
+ (select nickname COLLATE utf8mb4_general_ci from system_users mm where cast(mm.id COLLATE utf8mb4_general_ci as char) =a.maintain_person COLLATE utf8mb4_general_ci) as person,
|
|
|
+ '维修工单' as type,
|
|
|
+ a.create_time
|
|
|
+ from rq_iot_maintain a
|
|
|
+ where status = 'tx'
|
|
|
+ and deleted = false
|
|
|
+ union all
|
|
|
+ select b.id,
|
|
|
+ b.inspect_order_title title,
|
|
|
+ '待执行' as status,
|
|
|
+ b.charge_name person,
|
|
|
+ '巡检工单' as type,
|
|
|
+ b.create_time
|
|
|
+ from rq_iot_inspect_order b
|
|
|
+ where status = 'todo'
|
|
|
+ and deleted = false
|
|
|
+ union all
|
|
|
+ select c.id,
|
|
|
+ c.name title,
|
|
|
+ '待填写' as status,
|
|
|
+ (select nickname COLLATE utf8mb4_general_ci from system_users bb where cast(bb.id COLLATE utf8mb4_general_ci as char) = c.responsible_person COLLATE utf8mb4_general_ci) as person,
|
|
|
+ '保养工单' as type,
|
|
|
+ c.create_time
|
|
|
+ from rq_iot_main_work_order c
|
|
|
+ where result = 1
|
|
|
+ and deleted = false
|
|
|
+ union all
|
|
|
+ select d.id,
|
|
|
+ d.order_name title,
|
|
|
+ '待填写' as status,
|
|
|
+ user_name as person,
|
|
|
+ '运行记录' as type,
|
|
|
+ d.create_time
|
|
|
+ from rq_iot_opeation_fill_order d
|
|
|
+ where order_status = 0
|
|
|
+ and deleted = false)fin
|
|
|
<where>
|
|
|
<if test="reqVO.commonParam != null and reqVO.commonParam != ''">
|
|
|
(fin.title LIKE CONCAT('%', #{reqVO.commonParam}, '%')
|