|
|
@@ -24,34 +24,35 @@
|
|
|
<result column="duration" jdbcType="DOUBLE" property="duration" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
- id, prid, order_no, aid, aname, `type`, type_other, `status`, process_status, total_amount,
|
|
|
- attachment_url, apply_dep, pay_dep, eaaid, create_time, district_name, user_names,
|
|
|
+ id, prid, order_no, aid, aname, `type`, type_other, `status`, process_status, total_amount,
|
|
|
+ attachment_url, apply_dep, pay_dep, eaaid, create_time, district_name, user_names,
|
|
|
release_start, release_end, duration
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
- select
|
|
|
+ select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from expense_account
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
+
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
delete from expense_account
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</delete>
|
|
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.ExpenseAccount" useGeneratedKeys="true">
|
|
|
- insert into expense_account (prid, order_no, aid,
|
|
|
- aname, `type`, type_other,
|
|
|
- `status`, process_status, total_amount,
|
|
|
- attachment_url, apply_dep, pay_dep,
|
|
|
- eaaid, create_time, district_name,
|
|
|
- user_names, release_start, release_end,
|
|
|
+ insert into expense_account (prid, order_no, aid,
|
|
|
+ aname, `type`, type_other,
|
|
|
+ `status`, process_status, total_amount,
|
|
|
+ attachment_url, apply_dep, pay_dep,
|
|
|
+ eaaid, create_time, district_name,
|
|
|
+ user_names, release_start, release_end,
|
|
|
duration)
|
|
|
- values (#{prid,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR},
|
|
|
- #{aname,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{typeOther,jdbcType=VARCHAR},
|
|
|
- #{status,jdbcType=INTEGER}, #{processStatus,jdbcType=INTEGER}, #{totalAmount,jdbcType=DECIMAL},
|
|
|
- #{attachmentUrl,jdbcType=VARCHAR}, #{applyDep,jdbcType=VARCHAR}, #{payDep,jdbcType=VARCHAR},
|
|
|
- #{eaaid,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{districtName,jdbcType=VARCHAR},
|
|
|
- #{userNames,jdbcType=VARCHAR}, #{releaseStart,jdbcType=TIMESTAMP}, #{releaseEnd,jdbcType=TIMESTAMP},
|
|
|
+ values (#{prid,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR},
|
|
|
+ #{aname,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{typeOther,jdbcType=VARCHAR},
|
|
|
+ #{status,jdbcType=INTEGER}, #{processStatus,jdbcType=INTEGER}, #{totalAmount,jdbcType=DECIMAL},
|
|
|
+ #{attachmentUrl,jdbcType=VARCHAR}, #{applyDep,jdbcType=VARCHAR}, #{payDep,jdbcType=VARCHAR},
|
|
|
+ #{eaaid,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{districtName,jdbcType=VARCHAR},
|
|
|
+ #{userNames,jdbcType=VARCHAR}, #{releaseStart,jdbcType=TIMESTAMP}, #{releaseEnd,jdbcType=TIMESTAMP},
|
|
|
#{duration,jdbcType=DOUBLE})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.ExpenseAccount" useGeneratedKeys="true">
|
|
|
@@ -261,4 +262,13 @@
|
|
|
duration = #{duration,jdbcType=DOUBLE}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
-</mapper>
|
|
|
+
|
|
|
+ <select id="selectByid" resultType="com.goafanti.expenseAccount.bo.OutExpenseAccount">
|
|
|
+ SELECT a.id, a.prid, a.order_no orderNo, a.aid, a.aname, a.`type`, a.type_other typeOther , a.status, a.process_status processStatus,
|
|
|
+ a.total_amount totalAmount, a.attachment_url attachmentUrl,a.apply_dep applyDep, a.pay_dep payDep, a.eaaid,
|
|
|
+ a.district_name districtName, a.user_names userNames,a.create_time, a.release_start,a.release_end, a.duration,
|
|
|
+ b.name appDepName,c.name payDepName
|
|
|
+ FROM expense_account a left join department b on a.apply_dep =b.id left join department c on a.pay_dep =c.id
|
|
|
+ WHERE a.id= #{id}
|
|
|
+ </select>
|
|
|
+</mapper>
|