|
@@ -0,0 +1,112 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+<!--
|
|
|
+这个文件是自动生成的。
|
|
|
+不要修改此文件。所有改动将在下次重新自动生成时丢失。
|
|
|
+-->
|
|
|
+<mapper namespace="com.ym.mec.biz.dal.dao.FinancialExpenditureDao">
|
|
|
+
|
|
|
+ <resultMap type="com.ym.mec.biz.dal.entity.FinancialExpenditure" id="FinancialExpenditure">
|
|
|
+ <result column="id_" property="id"/>
|
|
|
+ <result column="batch_no_" property="batchNo"/>
|
|
|
+ <result column="financial_process_no_" property="financialProcessNo"/>
|
|
|
+ <result column="dingtalk_process_no_" property="dingtalkProcessNo"/>
|
|
|
+ <result column="organ_id_" property="organId"/>
|
|
|
+ <result column="cooperation_organ_id_" property="cooperationOrganId"/>
|
|
|
+ <result column="apply_user_id_" property="applyUserId"/>
|
|
|
+ <result column="amount_" property="amount"/>
|
|
|
+ <result column="item_detail_" property="itemDetail"/>
|
|
|
+ <result column="payment_time_" property="paymentTime"/>
|
|
|
+ <result column="del_flag_" property="delFlag"/>
|
|
|
+ <result column="cause_" property="cause"/>
|
|
|
+ <result column="create_time_" property="createTime"/>
|
|
|
+ <result column="update_time_" property="updateTime"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <!-- 根据主键查询一条记录 -->
|
|
|
+ <select id="get" resultMap="FinancialExpenditure">
|
|
|
+ SELECT * FROM financial_expenditure WHERE id_ = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 全查询 -->
|
|
|
+ <select id="findAll" resultMap="FinancialExpenditure">
|
|
|
+ SELECT * FROM financial_expenditure WHERE del_flag_ = 0 ORDER BY id_
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 向数据库增加一条记录 -->
|
|
|
+ <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.FinancialExpenditure" useGeneratedKeys="true" keyColumn="id"
|
|
|
+ keyProperty="id">
|
|
|
+ INSERT INTO financial_expenditure (batch_no_,financial_process_no_,dingtalk_process_no_,
|
|
|
+ organ_id_,cooperation_organ_id_,apply_user_id_,amount_,item_detail_,payment_time_,cause_,create_time_,update_time_)
|
|
|
+ VALUES(#{batchNo},#{financialProcessNo},#{dingtalkProcessNo},#{organId},#{cooperationOrganId},#{applyUserId},#{amount},
|
|
|
+ #{itemDetail},#{paymentTime},#{cause},now(),now())
|
|
|
+ </insert>
|
|
|
+ <insert id="batchInsert">
|
|
|
+ INSERT INTO financial_expenditure (batch_no_,financial_process_no_,dingtalk_process_no_,
|
|
|
+ organ_id_,cooperation_organ_id_,apply_user_id_,amount_,item_detail_,payment_time_,cause_,create_time_,update_time_)
|
|
|
+ VALUES
|
|
|
+ <foreach collection="financialExpenditures" item="item" separator=",">
|
|
|
+ (#{item.batchNo},#{item.financialProcessNo},#{item.dingtalkProcessNo},#{item.organId},#{item.cooperationOrganId},#{item.applyUserId},#{item.amount},
|
|
|
+ #{item.itemDetail},#{item.paymentTime},#{item.cause},now(),now())
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <!-- 根据主键查询一条记录 -->
|
|
|
+ <update id="update" parameterType="com.ym.mec.biz.dal.entity.FinancialExpenditure">
|
|
|
+ UPDATE charge_type
|
|
|
+ <set>
|
|
|
+ <if test="delFlag != null">
|
|
|
+ del_flag_ = #{delFlag},
|
|
|
+ </if>
|
|
|
+ <if test="batchNo != null">
|
|
|
+ batch_no_ = #{batchNo},
|
|
|
+ </if>
|
|
|
+ <if test="financialProcessNo != null">
|
|
|
+ financial_process_no_ = #{financialProcessNo},
|
|
|
+ </if>
|
|
|
+ <if test="dingtalkProcessNo != null">
|
|
|
+ dingtalk_process_no_ = #{dingtalkProcessNo},
|
|
|
+ </if>
|
|
|
+ <if test="organId != null">
|
|
|
+ organ_id_ = #{organId},
|
|
|
+ </if>
|
|
|
+ <if test="cooperationOrganId != null">
|
|
|
+ cooperation_organ_id_ = #{cooperationOrganId},
|
|
|
+ </if>
|
|
|
+ <if test="applyUserId != null">
|
|
|
+ apply_user_id_ = #{applyUserId},
|
|
|
+ </if>
|
|
|
+ <if test="amount != null">
|
|
|
+ amount_ = #{amount},
|
|
|
+ </if>
|
|
|
+ <if test="itemDetail != null">
|
|
|
+ item_detail_ = #{itemDetail},
|
|
|
+ </if>
|
|
|
+ <if test="paymentTime != null">
|
|
|
+ payment_time_ = #{paymentTime},
|
|
|
+ </if>
|
|
|
+ <if test="cause != null">
|
|
|
+ cause_ = #{cause},
|
|
|
+ </if>
|
|
|
+ update_time_ = NOW()
|
|
|
+ </set>
|
|
|
+ WHERE id_ = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <!-- 根据主键删除一条记录 -->
|
|
|
+ <delete id="delete">
|
|
|
+ UPDATE charge_type SET del_flag_ = 1 WHERE id_ = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <!-- 分页查询 -->
|
|
|
+ <select id="queryPage" resultMap="FinancialExpenditure" parameterType="map">
|
|
|
+ SELECT * FROM financial_expenditure
|
|
|
+ WHERE del_flag_ = 0
|
|
|
+ <include refid="global.limit"/>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 查询当前表的总记录数 -->
|
|
|
+ <select id="queryCount" resultType="int">
|
|
|
+ SELECT COUNT(*) FROM financial_expenditure WHERE del_flag_ = 0
|
|
|
+ </select>
|
|
|
+</mapper>
|