From e4e498bd271942d95d40809028fa8f65354c8f2c Mon Sep 17 00:00:00 2001
From: sfd <sun.sunshine@163.com>
Date: 星期五, 09 五月 2025 17:18:32 +0800
Subject: [PATCH] 调用计算延期风险接口

---
 aps-modules/aps-system/src/main/resources/mapper/system/SysDeptMapper.xml |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/aps-modules/aps-system/src/main/resources/mapper/system/SysDeptMapper.xml b/aps-modules/aps-system/src/main/resources/mapper/system/SysDeptMapper.xml
index 9b3f825..cb98780 100644
--- a/aps-modules/aps-system/src/main/resources/mapper/system/SysDeptMapper.xml
+++ b/aps-modules/aps-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -20,10 +20,13 @@
 		<result property="createTime" column="create_time" />
 		<result property="updateBy"   column="update_by"   />
 		<result property="updateTime" column="update_time" />
+		<result property="orgCode"    column="org_code"      />
 	</resultMap>
 	
 	<sql id="selectDeptVo">
-        select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time 
+        select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status,
+               d.del_flag, d.create_by, d.create_time ,
+               d.org_code
         from sys_dept d
     </sql>
     
@@ -97,6 +100,7 @@
  			<if test="email != null and email != ''">email,</if>
  			<if test="status != null">status,</if>
  			<if test="createBy != null and createBy != ''">create_by,</if>
+			<if test="orgCode != null and orgCode != ''">org_code,</if>
  			create_time
  		)values(
  			<if test="deptId != null and deptId != 0">#{deptId},</if>
@@ -109,7 +113,8 @@
  			<if test="email != null and email != ''">#{email},</if>
  			<if test="status != null">#{status},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
- 			sysdate()
+			<if test="orgCode != null and orgCode != ''">#{orgCode},</if>
+ 			now()
  		)
 	</insert>
 	
@@ -125,7 +130,8 @@
  			<if test="email != null">email = #{email},</if>
  			<if test="status != null and status != ''">status = #{status},</if>
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- 			update_time = sysdate()
+			<if test="orgCode != null and orgCode != ''">org_code = #{orgCode},</if>
+ 			update_time = now()
  		</set>
  		where dept_id = #{deptId}
 	</update>
@@ -153,5 +159,13 @@
 	<delete id="deleteDeptById" parameterType="Long">
 		update sys_dept set del_flag = '2' where dept_id = #{deptId}
 	</delete>
+	<select id="selectDeptListByIdList" parameterType="Long" resultMap="SysDeptResult">
+		<include refid="selectDeptVo"/>
+		where d.del_flag = '0' and dept_id in
+		<foreach collection="deptIdList" item="deptId" open="(" separator="," close=")">
+			#{deptId}
+		</foreach>
+		order by d.parent_id, d.order_num
+	</select>
 
 </mapper> 
\ No newline at end of file

--
Gitblit v1.9.3