From d4fe921568bc29d72644a55fd194adf7f9277cb5 Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期六, 22 十一月 2025 15:28:35 +0800
Subject: [PATCH] feat: 将旧系统数据同步到新系统

---
 ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
index aa40711..9b9bce3 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -208,5 +208,25 @@
 			)
 		end
 	</select>
+	
+	<!-- 鏍规嵁缂栫爜鍒楄〃鏌ヨ鍒嗗叕鍙� -->
+	<select id="selectBranchCompaniesByOrderCodes" resultMap="SysDeptResult">
+		select dept_id, dept_name, parent_id, ancestors, service_order_class, dispatch_order_class
+		from sys_dept
+		where parent_id = 100
+		and del_flag = '0'
+		and (
+			<foreach collection="orderCodes" item="code" separator=" or ">
+				service_order_class = #{code} or dispatch_order_class = #{code}
+			</foreach>
+		)
+	</select>
+	
+	<!-- 鏍规嵁service_class鏌ヨ閮ㄩ棬淇℃伅 -->
+	<select id="selectDeptByServiceClass" parameterType="String" resultMap="SysDeptResult">
+		<include refid="selectDeptVo"/>
+		where d.service_order_class = #{serviceClass} and d.del_flag = '0'
+		limit 1
+	</select>
 
 </mapper> 
\ No newline at end of file

--
Gitblit v1.9.1