From 3dc714284a95fe9677a964ec039b2b547547e30d Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期二, 05 十一月 2024 11:20:37 +0800 Subject: [PATCH] 工单异步获取图片、工单导出时间参数bug --- ycl-server/src/main/resources/mapper/zgyw/WorkOrderMapper.xml | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ycl-server/src/main/resources/mapper/zgyw/WorkOrderMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/WorkOrderMapper.xml index 859b1a5..fe9006f 100644 --- a/ycl-server/src/main/resources/mapper/zgyw/WorkOrderMapper.xml +++ b/ycl-server/src/main/resources/mapper/zgyw/WorkOrderMapper.xml @@ -105,6 +105,8 @@ wo.overtime, wo.deduct, u.unit_name, + u.unit_contact, + u.unit_contact_phone, p.yw_person_name, tm.name as source, GROUP_CONCAT(DISTINCT da.dict_label ORDER BY da.dict_label SEPARATOR ',') AS errorType, @@ -114,12 +116,11 @@ INNER JOIN t_monitor tm ON wo.serial_number = tm.serial_number INNER JOIN t_work_order_error_type et ON wo.work_order_no = et.work_order_no INNER JOIN t_yw_unit u ON wo.unit_id = u.id AND u.deleted = 0 - INNER JOIN sys_dict_data da ON da.dict_value = et.error_name AND da.dict_type = 'error_type' <if test="query.errorTypeList != null and query.errorTypeList.size() > 0">AND da.dict_value in <foreach - collection="query.errorTypeList" open="(" separator="," close=")" item="errorType">#{errorType}</foreach> </if> + INNER JOIN sys_dict_data da ON da.dict_value = et.error_name AND da.dict_type = 'error_type' LEFT JOIN t_work_order_check_img ci ON ci.work_order_no = wo.work_order_no LEFT JOIN t_yw_people p ON wo.yw_people_id = p.id AND p.deleted = 0 WHERE - wo.deleted = 0 + wo.deleted = 0 and wo.status != 'WAIT_DISTRIBUTE' <if test="query.unitId != null"> AND wo.unit_id = #{query.unitId} </if> @@ -132,6 +133,15 @@ <if test="query.start != null and query.end != null"> AND wo.create_time BETWEEN #{query.start} AND #{query.end} </if> + <if test="query.errorTypeList != null and query.errorTypeList.size() > 0"> + AND (EXISTS ( + SELECT 1 + FROM t_work_order_error_type twoet + WHERE twoet.work_order_no = wo.work_order_no + AND twoet.error_name in + <foreach collection="query.errorTypeList" open="(" separator="," close=")" item="errorType">#{errorType}</foreach> + )) + </if> GROUP BY wo.id, wo.status, wo.work_order_no, wo.serial_number,wo.create_time, wo.unit_id, wo.yw_people_id,tm.name, wo.yw_handle_time, wo.yw_result, wo.yw_check_result, wo.overtime, wo.deduct, u.unit_name, -- Gitblit v1.8.0