Преглед изворни кода

新增部门科研平台编号

anderx пре 4 месеци
родитељ
комит
c2bb11c193

+ 9 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java

@@ -68,6 +68,15 @@ public class SysDept extends BaseEntity
     private String endTime;
     private String companyLogo;
     private String companyFullName;
+    private String kyId;
+
+    public String getKyId() {
+        return kyId;
+    }
+
+    public void setKyId(String kyId) {
+        this.kyId = kyId;
+    }
 
     public String getCompanyLogo() {
         return companyLogo;

+ 9 - 5
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.system.mapper.SysDeptMapper">
 
-	<resultMap type="SysDept" id="SysDeptResult">
+	<resultMap type="com.ruoyi.common.core.domain.entity.SysDept" id="SysDeptResult">
 		<id     property="deptId"     column="dept_id"     />
 		<result property="parentId"   column="parent_id"   />
 		<result property="ancestors"  column="ancestors"   />
@@ -25,16 +25,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<result property="maxDuration" column="max_duration" />
 		<result property="companyLogo" column="company_logo" />
 		<result property="companyFullName" column="company_full_name" />
+		<result property="kyId" column="ky_id" />
 	</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,d.company_id,d.company_name,d.max_duration,sd.dept_name companyName,
-               d.company_logo ,d.company_full_name
+               d.company_logo ,d.company_full_name,d.ky_id
         from sys_dept d left join sys_dept sd on d.company_id = sd.dept_id
     </sql>
 
-	<select id="selectDeptList" parameterType="SysDept" resultMap="SysDeptResult">
+	<select id="selectDeptList" parameterType="com.ruoyi.common.core.domain.entity.SysDept" resultMap="SysDeptResult">
         <include refid="selectDeptVo"/>
         where d.del_flag = '0'
 		<if test="deptId != null and deptId != 0">
@@ -118,7 +119,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</select>
 
 
-    <insert id="insertDept" parameterType="SysDept">
+    <insert id="insertDept" parameterType="com.ruoyi.common.core.domain.entity.SysDept">
  		insert into sys_dept(
  			<if test="deptId != null and deptId != 0">dept_id,</if>
  			<if test="parentId != null and parentId != 0">parent_id,</if>
@@ -135,6 +136,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="companyName != null ">company_name,</if>
 			<if test="companyLogo != null ">company_logo,</if>
 			<if test="companyFullName != null ">company_full_name,</if>
+			<if test="kyId != null ">ky_id,</if>
  			create_time
  		)values(
  			<if test="deptId != null and deptId != 0">#{deptId},</if>
@@ -152,11 +154,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="companyName != null ">#{companyName},</if>
 			<if test="companyLogo != null ">#{companyLogo},</if>
 			<if test="companyFullName != null ">#{companyFullName},</if>
+ 		    <if test="kyId != null ">#{kyId},</if>
  			sysdate()
  		)
 	</insert>
 
-	<update id="updateDept" parameterType="SysDept">
+	<update id="updateDept" parameterType="com.ruoyi.common.core.domain.entity.SysDept">
  		update sys_dept
  		<set>
  			<if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
@@ -173,6 +176,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="companyName != null ">company_name = #{companyName},</if>
 			<if test="companyLogo != null ">company_logo = #{companyLogo},</if>
 			<if test="companyFullName != null ">company_full_name = #{companyFullName},</if>
+ 		    <if test="kyId != null ">ky_id = #{kyId},</if>
  			update_time = sysdate()
  		</set>
  		where dept_id = #{deptId}