|
|
@@ -7,6 +7,8 @@
|
|
|
<result column="type" jdbcType="INTEGER" property="type" />
|
|
|
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
|
|
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
|
|
+ <result column="start_district" jdbcType="VARCHAR" property="startDistrict" />
|
|
|
+ <result column="end_district" jdbcType="VARCHAR" property="endDistrict" />
|
|
|
<result column="amount" jdbcType="DECIMAL" property="amount" />
|
|
|
<result column="vehicle" jdbcType="INTEGER" property="vehicle" />
|
|
|
<result column="vehicle_other" jdbcType="VARCHAR" property="vehicleOther" />
|
|
|
@@ -23,9 +25,9 @@
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
- id, eaid, `type`, start_time, end_time, amount, vehicle, vehicle_other, remarks,
|
|
|
- agree_time, pay_type, invoice_type, invoice_no, payer_name, open_bank, bank_accounts,
|
|
|
- open_bank_address, lend_id, create_time
|
|
|
+ id, eaid, `type`, start_time, end_time, start_district, end_district, amount, vehicle,
|
|
|
+ vehicle_other, remarks, agree_time, pay_type, invoice_type, invoice_no, payer_name,
|
|
|
+ open_bank, bank_accounts, open_bank_address, lend_id, create_time
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
select
|
|
|
@@ -39,19 +41,19 @@
|
|
|
</delete>
|
|
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.ExpenseAccountDetails" useGeneratedKeys="true">
|
|
|
insert into expense_account_details (eaid, `type`, start_time,
|
|
|
- end_time, amount, vehicle,
|
|
|
- vehicle_other, remarks, agree_time,
|
|
|
- pay_type, invoice_type, invoice_no,
|
|
|
- payer_name, open_bank, bank_accounts,
|
|
|
- open_bank_address, lend_id, create_time
|
|
|
- )
|
|
|
+ end_time, start_district, end_district,
|
|
|
+ amount, vehicle, vehicle_other,
|
|
|
+ remarks, agree_time, pay_type,
|
|
|
+ invoice_type, invoice_no, payer_name,
|
|
|
+ open_bank, bank_accounts, open_bank_address,
|
|
|
+ lend_id, create_time)
|
|
|
values (#{eaid,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{startTime,jdbcType=TIMESTAMP},
|
|
|
- #{endTime,jdbcType=TIMESTAMP}, #{amount,jdbcType=DECIMAL}, #{vehicle,jdbcType=INTEGER},
|
|
|
- #{vehicleOther,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR}, #{agreeTime,jdbcType=TIMESTAMP},
|
|
|
- #{payType,jdbcType=INTEGER}, #{invoiceType,jdbcType=INTEGER}, #{invoiceNo,jdbcType=VARCHAR},
|
|
|
- #{payerName,jdbcType=VARCHAR}, #{openBank,jdbcType=VARCHAR}, #{bankAccounts,jdbcType=VARCHAR},
|
|
|
- #{openBankAddress,jdbcType=VARCHAR}, #{lendId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}
|
|
|
- )
|
|
|
+ #{endTime,jdbcType=TIMESTAMP}, #{startDistrict,jdbcType=VARCHAR}, #{endDistrict,jdbcType=VARCHAR},
|
|
|
+ #{amount,jdbcType=DECIMAL}, #{vehicle,jdbcType=INTEGER}, #{vehicleOther,jdbcType=VARCHAR},
|
|
|
+ #{remarks,jdbcType=VARCHAR}, #{agreeTime,jdbcType=TIMESTAMP}, #{payType,jdbcType=INTEGER},
|
|
|
+ #{invoiceType,jdbcType=INTEGER}, #{invoiceNo,jdbcType=VARCHAR}, #{payerName,jdbcType=VARCHAR},
|
|
|
+ #{openBank,jdbcType=VARCHAR}, #{bankAccounts,jdbcType=VARCHAR}, #{openBankAddress,jdbcType=VARCHAR},
|
|
|
+ #{lendId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.ExpenseAccountDetails" useGeneratedKeys="true">
|
|
|
insert into expense_account_details
|
|
|
@@ -68,6 +70,12 @@
|
|
|
<if test="endTime != null">
|
|
|
end_time,
|
|
|
</if>
|
|
|
+ <if test="startDistrict != null">
|
|
|
+ start_district,
|
|
|
+ </if>
|
|
|
+ <if test="endDistrict != null">
|
|
|
+ end_district,
|
|
|
+ </if>
|
|
|
<if test="amount != null">
|
|
|
amount,
|
|
|
</if>
|
|
|
@@ -124,6 +132,12 @@
|
|
|
<if test="endTime != null">
|
|
|
#{endTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="startDistrict != null">
|
|
|
+ #{startDistrict,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="endDistrict != null">
|
|
|
+ #{endDistrict,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="amount != null">
|
|
|
#{amount,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
@@ -183,6 +197,12 @@
|
|
|
<if test="endTime != null">
|
|
|
end_time = #{endTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="startDistrict != null">
|
|
|
+ start_district = #{startDistrict,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="endDistrict != null">
|
|
|
+ end_district = #{endDistrict,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="amount != null">
|
|
|
amount = #{amount,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
@@ -234,6 +254,8 @@
|
|
|
`type` = #{type,jdbcType=INTEGER},
|
|
|
start_time = #{startTime,jdbcType=TIMESTAMP},
|
|
|
end_time = #{endTime,jdbcType=TIMESTAMP},
|
|
|
+ start_district = #{startDistrict,jdbcType=VARCHAR},
|
|
|
+ end_district = #{endDistrict,jdbcType=VARCHAR},
|
|
|
amount = #{amount,jdbcType=DECIMAL},
|
|
|
vehicle = #{vehicle,jdbcType=INTEGER},
|
|
|
vehicle_other = #{vehicleOther,jdbcType=VARCHAR},
|
|
|
@@ -256,4 +278,12 @@
|
|
|
select ifnull(sum(amount),0)amount from expense_account_details
|
|
|
where eaid = #{id}
|
|
|
</select>
|
|
|
+ <select id="selectByEAid" resultType="com.goafanti.expenseAccount.bo.OutExpenseAccountDetails">
|
|
|
+ SELECT id, eaid, `type`, date_format(a.start_time,'%Y-%m-%d %H:%i:%S')startTimeStr, date_format(a.end_time,'%Y-%m-%d %H:%i:%S')endTimeStr,
|
|
|
+ start_district startDistrict, end_district endDistrict, amount, vehicle, vehicle_other vehicleOther, remarks,
|
|
|
+ date_format(a.agree_time,'%Y-%m-%d %H:%i:%S')agreeTimeStr, pay_type payType,invoice_type invoiceType, invoice_no invoiceNo,
|
|
|
+ payer_name payerName, open_bank openBank, bank_accounts bankAccounts, open_bank_address openBankAddress, lend_id lendId,
|
|
|
+ date_format(a.create_time,'%Y-%m-%d %H:%i:%S')createTimeStr
|
|
|
+ FROM expense_account_details a WHERE eaid= #{eaid}
|
|
|
+ </select>
|
|
|
</mapper>
|