Browse Source

阿米巴开发

anderx 3 years ago
parent
commit
e2b11548cf

+ 7 - 2
src/main/java/com/goafanti/ambSystem/bo/OutAmb.java

@@ -11,10 +11,15 @@ public class OutAmb {
     private String ancestorsNames;
     private String leaderName;
     private String  financeName;
+    private String  accountantName;
 
+    public String getAccountantName() {
+        return accountantName;
+    }
 
-
-
+    public void setAccountantName(String accountantName) {
+        this.accountantName = accountantName;
+    }
 
     public Long getId() {
         return id;

+ 17 - 5
src/main/java/com/goafanti/common/mapper/AmbSystemMapper.xml

@@ -16,10 +16,11 @@
     <result column="lvl" jdbcType="INTEGER" property="lvl" />
     <result column="finance_id" jdbcType="VARCHAR" property="financeId" />
     <result column="ancestors_names" jdbcType="VARCHAR" property="ancestorsNames" />
+    <result column="accountant" jdbcType="VARCHAR" property="accountant" />
   </resultMap>
   <sql id="Base_Column_List">
     id, parent_id, ancestors, `name`, order_num, leader, `status`, create_by, create_time,
-    update_by, update_time, lvl, finance_id, ancestors_names
+    update_by, update_time, lvl, finance_id, ancestors_names, accountant
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     select
@@ -36,12 +37,12 @@
       order_num, leader, `status`,
       create_by, create_time, update_by,
       update_time, lvl, finance_id,
-      ancestors_names)
+      ancestors_names, accountant)
     values (#{parentId,jdbcType=BIGINT}, #{ancestors,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
       #{orderNum,jdbcType=INTEGER}, #{leader,jdbcType=VARCHAR}, #{status,jdbcType=CHAR},
       #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
       #{updateTime,jdbcType=TIMESTAMP}, #{lvl,jdbcType=INTEGER}, #{financeId,jdbcType=VARCHAR},
-      #{ancestorsNames,jdbcType=VARCHAR})
+      #{ancestorsNames,jdbcType=VARCHAR}, #{accountant,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.AmbSystem" useGeneratedKeys="true">
     insert into amb_system
@@ -85,6 +86,9 @@
       <if test="ancestorsNames != null">
         ancestors_names,
       </if>
+      <if test="accountant != null">
+        accountant,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="parentId != null">
@@ -126,6 +130,9 @@
       <if test="ancestorsNames != null">
         #{ancestorsNames,jdbcType=VARCHAR},
       </if>
+      <if test="accountant != null">
+        #{accountant,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.AmbSystem">
@@ -170,6 +177,9 @@
       <if test="ancestorsNames != null">
         ancestors_names = #{ancestorsNames,jdbcType=VARCHAR},
       </if>
+      <if test="accountant != null">
+        accountant = #{accountant,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=BIGINT}
   </update>
@@ -187,7 +197,8 @@
       update_time = #{updateTime,jdbcType=TIMESTAMP},
       lvl = #{lvl,jdbcType=INTEGER},
       finance_id = #{financeId,jdbcType=VARCHAR},
-      ancestors_names = #{ancestorsNames,jdbcType=VARCHAR}
+      ancestors_names = #{ancestorsNames,jdbcType=VARCHAR},
+      accountant = #{accountant,jdbcType=VARCHAR}
     where id = #{id,jdbcType=BIGINT}
   </update>
 
@@ -204,10 +215,11 @@
 
   <select id="selectAmbSystemList" resultType="com.goafanti.ambSystem.bo.OutAmb">
     select a.id,a.name ,a.ancestors_names ancestorsNames ,
-    b.name leaderName,c.name financeName
+    b.name leaderName,c.name financeName,d.name accountantName
     from amb_system a
     left join admin b on a.leader =b.id
     left join admin c on a.finance_id =c.id
+    left join admin d on a.accountant =d.id
     where a.status=0
     <if test="lvl !=null">
       and a.lvl= #{lvl}

+ 13 - 0
src/main/java/com/goafanti/common/model/AmbSystem.java

@@ -78,6 +78,11 @@ public class AmbSystem implements Serializable {
      */
     private String ancestorsNames;
 
+    /**
+     * 会计id
+     */
+    private String accountant;
+
     private static final long serialVersionUID = 1L;
 
     public Long getId() {
@@ -191,4 +196,12 @@ public class AmbSystem implements Serializable {
     public void setAncestorsNames(String ancestorsNames) {
         this.ancestorsNames = ancestorsNames;
     }
+
+    public String getAccountant() {
+        return accountant;
+    }
+
+    public void setAccountant(String accountant) {
+        this.accountant = accountant;
+    }
 }