From f7df98e8a755086952dfe5eec8cefa2b56efd91e Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期五, 30 八月 2024 11:39:09 +0800
Subject: [PATCH] 工单分页bug
---
ycl-server/src/main/resources/mapper/zgyw/WorkOrderMapper.xml | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/ycl-server/src/main/resources/mapper/zgyw/WorkOrderMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/WorkOrderMapper.xml
index a8b4dc1..2dba5e9 100644
--- a/ycl-server/src/main/resources/mapper/zgyw/WorkOrderMapper.xml
+++ b/ycl-server/src/main/resources/mapper/zgyw/WorkOrderMapper.xml
@@ -17,6 +17,7 @@
<result column="errorType" property="errorType"/>
<result column="status" property="status"/>
<result column="source" property="source"/>
+ <result column="imgListStr" property="imgListStr"/>
<!-- <collection property="errorTypeList" select="getErrorType" column="{workOrderNo=work_order_no,errList=errList}" ofType="string"/>-->
</resultMap>
@@ -35,13 +36,15 @@
u.unit_name,
p.yw_person_name,
tm.name as source,
- GROUP_CONCAT(DISTINCT da.dict_label ORDER BY da.dict_label SEPARATOR ',') AS errorType
+ GROUP_CONCAT(DISTINCT da.dict_label ORDER BY da.dict_label SEPARATOR ',') AS errorType,
+ GROUP_CONCAT(DISTINCT ci.img_url ORDER BY ci.create_time DESC SEPARATOR ',') AS imgListStr
FROM
t_work_order wo
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 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>
+ LEFT JOIN t_work_order_check_img ci ON ci.work_order_no = wo.work_order_no
LEFT JOIN t_yw_unit u ON wo.unit_id = u.id AND u.deleted = 0
LEFT JOIN t_yw_people p ON wo.yw_people_id = p.id AND p.deleted = 0
WHERE
@@ -222,7 +225,8 @@
FROM
t_work_order wo
WHERE
- deleted = 0
+ wo.create_time BETWEEN #{start} AND #{end}
+ AND deleted = 0
</select>
<insert id="addMany">
--
Gitblit v1.8.0