From ac9efc618210e1df40dfba9f779ca27739d2b343 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期三, 08 五月 2024 17:29:00 +0800
Subject: [PATCH] 考核模板关联定时任务
---
ycl-server/src/main/resources/mapper/zgyw/YwUnitMapper.xml | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/ycl-server/src/main/resources/mapper/zgyw/YwUnitMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/YwUnitMapper.xml
index 5c7434a..4692c3d 100644
--- a/ycl-server/src/main/resources/mapper/zgyw/YwUnitMapper.xml
+++ b/ycl-server/src/main/resources/mapper/zgyw/YwUnitMapper.xml
@@ -33,6 +33,20 @@
where id = #{id}
</select>
+ <select id="workList" resultType="com.ycl.platform.domain.vo.YwUnitVO">
+ SELECT
+ a.*,
+ COUNT(b.id) AS work_order_count
+ FROM
+ t_yw_unit a
+ LEFT JOIN
+ t_work_order b ON a.id = b.unit_id AND b.deleted = 0 AND b.status = 'WAIT_DISTRIBUTE'
+ WHERE
+ a.deleted = 0
+ GROUP BY
+ a.id;
+ </select>
+
<insert id="insertYwUnit" parameterType="YwUnit" useGeneratedKeys="true" keyProperty="id">
insert into t_yw_unit
<trim prefix="(" suffix=")" suffixOverrides=",">
@@ -85,4 +99,13 @@
#{id}
</foreach>
</delete>
+
+ <select id="getByUserId" resultMap="YwUnitResult">
+ SELECT
+ tyw.*
+ FROM
+ t_yw_unit tyw
+ INNER JOIN t_unit_people tup ON tup.unit_id = tyw.id and tyw.deleted = 0
+ INNER JOIN t_yw_people typ ON tup.yw_people_id = typ.id AND typ.user_id = #{userId} AND typ.deleted = 0
+ </select>
</mapper>
--
Gitblit v1.8.0