|
|
@@ -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}
|