70 lines
3.3 KiB
XML
70 lines
3.3 KiB
XML
|
<?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.dite.znpt.mapper.ContractSettlementMapper">
|
||
|
|
||
|
<sql id="Base_Column_List">
|
||
|
a.settlement_id, a.contract_id, a.customer, a.code,
|
||
|
a.project_id, a.salesperson_id, a.department_id, a.payment_period,
|
||
|
a.payment_date, a.duration, a.product_service, a.amount,
|
||
|
a.account_number, a.notes, a.settlement_status, a.create_time,
|
||
|
a.create_by, a.update_time, a.update_by
|
||
|
</sql>
|
||
|
|
||
|
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.ContractSettlementResp">
|
||
|
select
|
||
|
<include refid="Base_Column_List"/>
|
||
|
from contract_settlement a
|
||
|
<where>
|
||
|
<if test="keyword != null and keyword != ''">
|
||
|
<!-- and (a.TODO like concat('%', #{keyword,jdbcType=VARCHAR}, '%') or a.TODO like concat('%', #{keyword,jdbcType=VARCHAR}, '%')) -->
|
||
|
</if>
|
||
|
<if test="settlementId != null and settlementId != ''">
|
||
|
and a.settlement_id like concat ('%', #{settlementId}, '%')
|
||
|
</if>
|
||
|
<if test="contractId != null and contractId != ''">
|
||
|
and a.contract_id like concat ('%', #{contractId}, '%')
|
||
|
</if>
|
||
|
<if test="customer != null and customer != ''">
|
||
|
and a.customer like concat ('%', #{customer}, '%')
|
||
|
</if>
|
||
|
<if test="code != null and code != ''">
|
||
|
and a.code like concat ('%', #{code}, '%')
|
||
|
</if>
|
||
|
<if test="projectId != null and projectId != ''">
|
||
|
and a.project_id like concat ('%', #{projectId}, '%')
|
||
|
</if>
|
||
|
<if test="salespersonId != null and salespersonId != ''">
|
||
|
and a.salesperson_id like concat ('%', #{salespersonId}, '%')
|
||
|
</if>
|
||
|
<if test="departmentId != null and departmentId != ''">
|
||
|
and a.department_id like concat ('%', #{departmentId}, '%')
|
||
|
</if>
|
||
|
<if test="paymentPeriod != null">
|
||
|
and a.payment_period = #{paymentPeriod}
|
||
|
</if>
|
||
|
<if test="paymentDate != null">
|
||
|
and a.payment_date = #{paymentDate}
|
||
|
</if>
|
||
|
<if test="duration != null and duration != ''">
|
||
|
and a.duration like concat ('%', #{duration}, '%')
|
||
|
</if>
|
||
|
<if test="productService != null and productService != ''">
|
||
|
and a.product_service like concat ('%', #{productService}, '%')
|
||
|
</if>
|
||
|
<if test="amount != null">
|
||
|
and a.amount = #{amount}
|
||
|
</if>
|
||
|
<if test="accountNumber != null and accountNumber != ''">
|
||
|
and a.account_number like concat ('%', #{accountNumber}, '%')
|
||
|
</if>
|
||
|
<if test="notes != null">
|
||
|
and a.notes = #{notes}
|
||
|
</if>
|
||
|
<if test="settlementStatus != null and settlementStatus != ''">
|
||
|
and a.settlement_status like concat ('%', #{settlementStatus}, '%')
|
||
|
</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
</mapper>
|
||
|
|