|
|
@@ -28,12 +28,13 @@
|
|
|
<result column="target_type" jdbcType="INTEGER" property="targetType" />
|
|
|
<result column="liquidation_status" jdbcType="INTEGER" property="liquidationStatus" />
|
|
|
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
|
|
+ <result column="check_no" jdbcType="VARCHAR" property="checkNo" />
|
|
|
</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,
|
|
|
release_start, release_end, duration, examine_name, settlement_amount, debit_id,
|
|
|
- target_type, liquidation_status, remarks
|
|
|
+ target_type, liquidation_status, remarks, check_no
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
select
|
|
|
@@ -54,7 +55,7 @@
|
|
|
user_names, release_start, release_end,
|
|
|
duration, examine_name, settlement_amount,
|
|
|
debit_id, target_type, liquidation_status,
|
|
|
- remarks)
|
|
|
+ remarks, check_no)
|
|
|
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},
|
|
|
@@ -63,7 +64,7 @@
|
|
|
#{userNames,jdbcType=VARCHAR}, #{releaseStart,jdbcType=TIMESTAMP}, #{releaseEnd,jdbcType=TIMESTAMP},
|
|
|
#{duration,jdbcType=DOUBLE}, #{examineName,jdbcType=VARCHAR}, #{settlementAmount,jdbcType=DECIMAL},
|
|
|
#{debitId,jdbcType=INTEGER}, #{targetType,jdbcType=INTEGER}, #{liquidationStatus,jdbcType=INTEGER},
|
|
|
- #{remarks,jdbcType=VARCHAR})
|
|
|
+ #{remarks,jdbcType=VARCHAR}, #{checkNo,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.ExpenseAccount" useGeneratedKeys="true">
|
|
|
insert into expense_account
|
|
|
@@ -143,6 +144,9 @@
|
|
|
<if test="remarks != null">
|
|
|
remarks,
|
|
|
</if>
|
|
|
+ <if test="checkNo != null">
|
|
|
+ check_no,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="prid != null">
|
|
|
@@ -220,6 +224,9 @@
|
|
|
<if test="remarks != null">
|
|
|
#{remarks,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="checkNo != null">
|
|
|
+ #{checkNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.ExpenseAccount">
|
|
|
@@ -300,6 +307,9 @@
|
|
|
<if test="remarks != null">
|
|
|
remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="checkNo != null">
|
|
|
+ check_no = #{checkNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
@@ -329,7 +339,8 @@
|
|
|
debit_id = #{debitId,jdbcType=INTEGER},
|
|
|
target_type = #{targetType,jdbcType=INTEGER},
|
|
|
liquidation_status = #{liquidationStatus,jdbcType=INTEGER},
|
|
|
- remarks = #{remarks,jdbcType=VARCHAR}
|
|
|
+ remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
+ check_no = #{checkNo,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
|
|
|
@@ -339,7 +350,7 @@
|
|
|
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,d.name ,d.bank ,d.accounts ,a.settlement_amount settlementAmount,
|
|
|
- a.liquidation_status liquidationStatus, a.remarks,
|
|
|
+ a.liquidation_status liquidationStatus, a.remarks,a.check_no checkNo,
|
|
|
date_format(a.create_time,'%Y-%m-%d %H:%i:%S')createTimeStr,
|
|
|
date_format(a.release_start,'%Y-%m-%d %H:%i:%S')releaseStartStr,
|
|
|
date_format(a.release_end,'%Y-%m-%d %H:%i:%S')releaseEndStr
|
|
|
@@ -353,10 +364,19 @@
|
|
|
WHERE a.id= #{id}
|
|
|
</select>
|
|
|
|
|
|
+ <select id="selectByCheckNo" resultType="com.goafanti.expenseAccount.bo.OutExpenseAccount">
|
|
|
+ SELECT
|
|
|
+ <include refid="selectDtailsSql"/>
|
|
|
+ FROM expense_account a left join department b on a.apply_dep =b.id left join department c on a.pay_dep =c.id
|
|
|
+ left join expense_account_private d on a.eaaid=d.id left join t_order_new o on a.order_no =o.order_no
|
|
|
+ left join t_order_mid tm on a.order_no =tm.order_no
|
|
|
+ WHERE a.check_no= #{checkNo}
|
|
|
+ </select>
|
|
|
+
|
|
|
|
|
|
<select id="selectExpenseAccountList" resultType="com.goafanti.expenseAccount.bo.OutExpenseAccountBo">
|
|
|
select a.id,a.total_amount totalAmount,a.`type`,a.process_status processStatus,a.status,a.examine_name examineName,a.type_other typeOther,
|
|
|
- a.attachment_url attachmentUrl,a.target_type targetType , e.contract_no contractNo,tm.buyer_name buyerName ,
|
|
|
+ a.attachment_url attachmentUrl,a.target_type targetType , e.contract_no contractNo,tm.buyer_name buyerName ,a.check_no checkNo,
|
|
|
<if test="processStatus ==1">
|
|
|
eae.type eaeType,
|
|
|
</if>
|
|
|
@@ -373,6 +393,12 @@
|
|
|
where 1=1
|
|
|
<if test="processStatus ==2">
|
|
|
and a.process_status>0
|
|
|
+ <if test="examineStatus ==0">
|
|
|
+ and a.status=1
|
|
|
+ </if>
|
|
|
+ <if test="examineStatus ==1">
|
|
|
+ and a.status=2
|
|
|
+ </if>
|
|
|
</if>
|
|
|
<if test=" aid !=null">
|
|
|
and a.aid= #{aid}
|
|
|
@@ -428,6 +454,12 @@
|
|
|
where 1=1
|
|
|
<if test="processStatus ==2">
|
|
|
and a.process_status>0
|
|
|
+ <if test="examineStatus ==0">
|
|
|
+ and a.status=1
|
|
|
+ </if>
|
|
|
+ <if test="examineStatus ==1">
|
|
|
+ and a.status=2
|
|
|
+ </if>
|
|
|
</if>
|
|
|
<if test=" aid !=null">
|
|
|
and a.aid= #{aid}
|
|
|
@@ -479,6 +511,12 @@
|
|
|
where 1=1
|
|
|
<if test="processStatus ==2">
|
|
|
and a.process_status>0
|
|
|
+ <if test="examineStatus ==0">
|
|
|
+ and a.status=1
|
|
|
+ </if>
|
|
|
+ <if test="examineStatus ==1">
|
|
|
+ and a.status=2
|
|
|
+ </if>
|
|
|
</if>
|
|
|
<if test=" aid !=null">
|
|
|
and a.aid= #{aid}
|
|
|
@@ -528,13 +566,15 @@
|
|
|
WHERE a.status= #{status}
|
|
|
and a.prid= #{prid} and a.aid = #{aid}
|
|
|
</select>
|
|
|
+
|
|
|
+
|
|
|
<select id="selectByaidAndType" resultType="com.goafanti.expenseAccount.bo.OutExpenseAccount">
|
|
|
SELECT
|
|
|
a.id, a.prid, a.order_no orderNo, o.contract_no contractNo ,tm.buyer_name buyerName, a.aid, a.aname, a.`type`,
|
|
|
a.type_other typeOther , a.status,a.process_status processStatus,a.total_amount totalAmount,a.debit_id debitId,
|
|
|
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,d.name ,d.bank ,d.accounts ,t0.amount settlementAmount,
|
|
|
+ c.name payDepName,d.name ,d.bank ,d.accounts ,t0.amount settlementAmount,a.check_no checkNo,
|
|
|
a.liquidation_status liquidationStatus, a.remarks,
|
|
|
date_format(a.create_time,'%Y-%m-%d %H:%i:%S')createTimeStr,
|
|
|
date_format(a.release_start,'%Y-%m-%d %H:%i:%S')releaseStartStr,
|
|
|
@@ -570,5 +610,11 @@
|
|
|
from expense_account
|
|
|
where debit_id = #{debitId}
|
|
|
</select>
|
|
|
+ <select id="selectByCheckNoNot" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from expense_account
|
|
|
+ where check_no =''
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|