From 1eb6f4824c270de1a3d0bf766d44f1abb2c7f55d Mon Sep 17 00:00:00 2001
From: shiyunteng <shiyunteng@example.com>
Date: 星期四, 24 四月 2025 17:30:07 +0800
Subject: [PATCH] 巡检任务  设备维修新增是否生成工单字段 及 生成工单

---
 platformx-device-biz/src/main/resources/mapper/DeviceMapper.xml |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/platformx-device-biz/src/main/resources/mapper/DeviceMapper.xml b/platformx-device-biz/src/main/resources/mapper/DeviceMapper.xml
index 2d6d259..c3a261f 100644
--- a/platformx-device-biz/src/main/resources/mapper/DeviceMapper.xml
+++ b/platformx-device-biz/src/main/resources/mapper/DeviceMapper.xml
@@ -49,4 +49,38 @@
 					dll.id = #{ledgerId}
 				  and	d.id = ci.device_id );
 	</select>
+    <select id="getDeviceListByContractId" resultType="com.by4cloud.platformx.device.entity.Device">
+		select
+			*
+		from
+			device d
+		where
+			d.del_flag = '0'
+		  and exists (
+				select
+					ci.device_id
+				from
+					contract_item ci
+				where
+					ci.del_flag = '0'
+				  and ci.contract_id = #{contractId}
+				  and ci.device_id = d.id )
+	</select>
+    <select id="getDropdownnByWinningId" resultType="com.by4cloud.platformx.device.entity.Device">
+		select
+			*
+		from
+			device d
+		where
+			d.del_flag = '0'
+		  and exists (
+				select
+					pwl.device_id
+				from
+					purchase_winning_letter pwl
+				where
+					pwl.del_flag = '0'
+				  and pwl.id = #{id}
+				  and pwl.device_id = d.id )
+	</select>
 </mapper>

--
Gitblit v1.9.1