|
@@ -27,12 +27,13 @@
|
|
|
<result column="approval" jdbcType="INTEGER" property="approval" />
|
|
<result column="approval" jdbcType="INTEGER" property="approval" />
|
|
|
<result column="approval_aid" jdbcType="VARCHAR" property="approvalAid" />
|
|
<result column="approval_aid" jdbcType="VARCHAR" property="approvalAid" />
|
|
|
<result column="expense_finance_id" jdbcType="VARCHAR" property="expenseFinanceId" />
|
|
<result column="expense_finance_id" jdbcType="VARCHAR" property="expenseFinanceId" />
|
|
|
|
|
+ <result column="expense_retrial_finance_id" jdbcType="VARCHAR" property="expenseRetrialFinanceId" />
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
<sql id="Base_Column_List">
|
|
|
id, create_id, create_time, update_time, deleted_sign, `name`, `type`, manager_id,
|
|
id, create_id, create_time, update_time, deleted_sign, `name`, `type`, manager_id,
|
|
|
dep_no, super_id, remarks, `status`, abbreviation, finance_id, province, working_hours_type,
|
|
dep_no, super_id, remarks, `status`, abbreviation, finance_id, province, working_hours_type,
|
|
|
hide_sign, lvl, current_amount, subordinate_amount, total_amount, retrial_finance_id,
|
|
hide_sign, lvl, current_amount, subordinate_amount, total_amount, retrial_finance_id,
|
|
|
- approval, approval_aid, expense_finance_id
|
|
|
|
|
|
|
+ approval, approval_aid, expense_finance_id, expense_retrial_finance_id
|
|
|
</sql>
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
select
|
|
select
|
|
@@ -52,8 +53,8 @@
|
|
|
finance_id, province, working_hours_type,
|
|
finance_id, province, working_hours_type,
|
|
|
hide_sign, lvl, current_amount,
|
|
hide_sign, lvl, current_amount,
|
|
|
subordinate_amount, total_amount, retrial_finance_id,
|
|
subordinate_amount, total_amount, retrial_finance_id,
|
|
|
- approval, approval_aid, expense_finance_id
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ approval, approval_aid, expense_finance_id,
|
|
|
|
|
+ expense_retrial_finance_id)
|
|
|
values (#{createId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
|
|
values (#{createId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
|
|
|
#{deletedSign,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
|
#{deletedSign,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
|
|
#{managerId,jdbcType=VARCHAR}, #{depNo,jdbcType=VARCHAR}, #{superId,jdbcType=VARCHAR},
|
|
#{managerId,jdbcType=VARCHAR}, #{depNo,jdbcType=VARCHAR}, #{superId,jdbcType=VARCHAR},
|
|
@@ -61,8 +62,8 @@
|
|
|
#{financeId,jdbcType=VARCHAR}, #{province,jdbcType=INTEGER}, #{workingHoursType,jdbcType=INTEGER},
|
|
#{financeId,jdbcType=VARCHAR}, #{province,jdbcType=INTEGER}, #{workingHoursType,jdbcType=INTEGER},
|
|
|
#{hideSign,jdbcType=INTEGER}, #{lvl,jdbcType=INTEGER}, #{currentAmount,jdbcType=DECIMAL},
|
|
#{hideSign,jdbcType=INTEGER}, #{lvl,jdbcType=INTEGER}, #{currentAmount,jdbcType=DECIMAL},
|
|
|
#{subordinateAmount,jdbcType=DECIMAL}, #{totalAmount,jdbcType=DECIMAL}, #{retrialFinanceId,jdbcType=VARCHAR},
|
|
#{subordinateAmount,jdbcType=DECIMAL}, #{totalAmount,jdbcType=DECIMAL}, #{retrialFinanceId,jdbcType=VARCHAR},
|
|
|
- #{approval,jdbcType=INTEGER}, #{approvalAid,jdbcType=VARCHAR}, #{expenseFinanceId,jdbcType=VARCHAR}
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ #{approval,jdbcType=INTEGER}, #{approvalAid,jdbcType=VARCHAR}, #{expenseFinanceId,jdbcType=VARCHAR},
|
|
|
|
|
+ #{expenseRetrialFinanceId,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
</insert>
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.Department" useGeneratedKeys="true">
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.Department" useGeneratedKeys="true">
|
|
|
insert into department
|
|
insert into department
|
|
@@ -139,6 +140,9 @@
|
|
|
<if test="expenseFinanceId != null">
|
|
<if test="expenseFinanceId != null">
|
|
|
expense_finance_id,
|
|
expense_finance_id,
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="expenseRetrialFinanceId != null">
|
|
|
|
|
+ expense_retrial_finance_id,
|
|
|
|
|
+ </if>
|
|
|
</trim>
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="createId != null">
|
|
<if test="createId != null">
|
|
@@ -213,6 +217,9 @@
|
|
|
<if test="expenseFinanceId != null">
|
|
<if test="expenseFinanceId != null">
|
|
|
#{expenseFinanceId,jdbcType=VARCHAR},
|
|
#{expenseFinanceId,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="expenseRetrialFinanceId != null">
|
|
|
|
|
+ #{expenseRetrialFinanceId,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
</trim>
|
|
</trim>
|
|
|
</insert>
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Department">
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Department">
|
|
@@ -290,6 +297,9 @@
|
|
|
<if test="expenseFinanceId != null">
|
|
<if test="expenseFinanceId != null">
|
|
|
expense_finance_id = #{expenseFinanceId,jdbcType=VARCHAR},
|
|
expense_finance_id = #{expenseFinanceId,jdbcType=VARCHAR},
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="expenseRetrialFinanceId != null">
|
|
|
|
|
+ expense_retrial_finance_id = #{expenseRetrialFinanceId,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
</set>
|
|
</set>
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
</update>
|
|
@@ -318,7 +328,8 @@
|
|
|
retrial_finance_id = #{retrialFinanceId,jdbcType=VARCHAR},
|
|
retrial_finance_id = #{retrialFinanceId,jdbcType=VARCHAR},
|
|
|
approval = #{approval,jdbcType=INTEGER},
|
|
approval = #{approval,jdbcType=INTEGER},
|
|
|
approval_aid = #{approvalAid,jdbcType=VARCHAR},
|
|
approval_aid = #{approvalAid,jdbcType=VARCHAR},
|
|
|
- expense_finance_id = #{expenseFinanceId,jdbcType=VARCHAR}
|
|
|
|
|
|
|
+ expense_finance_id = #{expenseFinanceId,jdbcType=VARCHAR},
|
|
|
|
|
+ expense_retrial_finance_id = #{expenseRetrialFinanceId,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
</update>
|
|
|
<select id="selectOrganizationList" parameterType="java.lang.String" resultType="com.goafanti.organization.bo.OrganizationListOut">
|
|
<select id="selectOrganizationList" parameterType="java.lang.String" resultType="com.goafanti.organization.bo.OrganizationListOut">
|
|
@@ -433,7 +444,7 @@
|
|
|
a.retrial_finance_id retrialFinanceId, d.name retrialFinanceName,a.approval,a.approval_aid approvalAid,e.name approvalName
|
|
a.retrial_finance_id retrialFinanceId, d.name retrialFinanceName,a.approval,a.approval_aid approvalAid,e.name approvalName
|
|
|
from department a left join admin b on a.manager_id = b.id left join admin c on a.finance_id = c.id
|
|
from department a left join admin b on a.manager_id = b.id left join admin c on a.finance_id = c.id
|
|
|
left join admin d on a.retrial_finance_id=d.id left join admin e on a.approval_aid =e.id
|
|
left join admin d on a.retrial_finance_id=d.id left join admin e on a.approval_aid =e.id
|
|
|
- left join admin f on a.expense_finance_id=f.id
|
|
|
|
|
|
|
+ left join admin f on a.expense_finance_id=f.id
|
|
|
where a.id=#{id,jdbcType=VARCHAR}
|
|
where a.id=#{id,jdbcType=VARCHAR}
|
|
|
</select>
|
|
</select>
|
|
|
<delete id="deleteById" parameterType="java.lang.String">
|
|
<delete id="deleteById" parameterType="java.lang.String">
|