<?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.changhong.epc.form.mapper.tenant.asset.FixedSummaryMapper">
|
|
<sql id="field">
|
id,useDepartment,originalMoney,cumulativeDepreciation,currentDepreciation
|
,netMoney,countingState,calculationData,bookkeepingState,bookkeepingData
|
,data_start,ins_p,ins_t,upd_p,upd_t,calculationPeriod,accountingTime,number
|
</sql>
|
|
<select id="getOneFixedSummary" parameterType="com.changhong.epc.bean.tenant.asset.FixedSummary" resultType="com.changhong.epc.bean.tenant.asset.FixedSummary">
|
select
|
<include refid="field"/>
|
from epc_fixed_summary_{rule}
|
where useDepartment = #{useDepartment}
|
and calculationPeriod = #{calculationPeriod}
|
and data_start = 0
|
limit 1
|
</select>
|
|
<update id="updateFixedSummary" parameterType="com.changhong.epc.bean.tenant.asset.FixedSummary" >
|
update epc_fixed_summary_{rule}
|
<set>
|
<if test="number != null">
|
number = #{number},
|
</if>
|
<if test="currentDepreciation != null">
|
currentDepreciation = #{currentDepreciation},
|
</if>
|
<if test="countingState != null">
|
countingState = #{countingState},
|
</if>
|
<if test="bookkeepingState = null">
|
bookkeepingState = #{bookkeepingState},
|
</if>
|
</set>
|
where useDepartment = #{useDepartment}
|
and calculationPeriod = #{calculationPeriod}
|
</update>
|
|
</mapper>
|