423 lines
31 KiB
XML
423 lines
31 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.xdadan.erp.emis.mapper.EmisSettleBillMapper">
|
|
|
|
<resultMap type="EmisSettleBill" id="EmisSettleBillResult" extends="com.xdadan.erp.emis.mapper.EmisBaseMapper.EmisBaseResult">
|
|
<result property="id" column="id" />
|
|
<result property="settleBillNo" column="settle_bill_no" />
|
|
<result property="settleBillName" column="settle_bill_name" />
|
|
<result property="settleType" column="settle_type" />
|
|
<result property="settleStartDate" column="settle_start_date" />
|
|
<result property="settleEndDate" column="settle_end_date" />
|
|
<result property="billMonth" column="bill_month" />
|
|
<result property="recMoney" column="rec_money" />
|
|
<result property="recedMoney" column="reced_money" />
|
|
<result property="custNo" column="cust_no" />
|
|
<result property="custName" column="cust_name" />
|
|
<result property="customerCode" column="customer_code" />
|
|
<result property="customerName" column="customer_name" />
|
|
<result property="siteCode" column="site_code" />
|
|
<result property="siteName" column="site_name" />
|
|
<result property="satisfyMoney" column="satisfy_money" />
|
|
<result property="allowanceMoney" column="allowance_money" />
|
|
<result property="deductionMoney" column="deduction_money" />
|
|
<result property="otherMoney" column="other_money" />
|
|
<result property="satisfyReason" column="satisfy_reason" />
|
|
<result property="allowanceReason" column="allowance_reason" />
|
|
<result property="deductionReason" column="deduction_reason" />
|
|
<result property="otherReason" column="other_reason" />
|
|
<result property="openBillStatus" column="open_bill_status" />
|
|
<result property="paymentStatus" column="payment_status" />
|
|
<result property="chargeStatus" column="charge_status" />
|
|
<result property="sendPieceSum" column="send_piece_sum" />
|
|
<result property="pieceNumber" column="piece_number" />
|
|
<result property="feeWeight" column="fee_weight" />
|
|
<result property="uncollectedAmount" column="uncollected_amount" />
|
|
<result property="sendMoneySum" column="send_money_sum" />
|
|
<result property="refundAmount" column="refund_amount" />
|
|
<result property="refundMoney" column="refund_money" />
|
|
<result property="payee" column="payee" />
|
|
<result property="salesmen" column="salesmen" />
|
|
<result property="blSendOms" column="bl_send_oms" />
|
|
<result property="blConfirmCenter" column="bl_confirm_center" />
|
|
<result property="confirmCenterDate" column="confirm_center_date" />
|
|
<result property="confirmCenterNote" column="confirm_center_note" />
|
|
<result property="confirmCenterManCode" column="confirm_center_man_code" />
|
|
<result property="confirmCenterCode" column="confirm_center_code" />
|
|
<result property="blConfirmSite" column="bl_confirm_site" />
|
|
<result property="confirmSiteDate" column="confirm_site_date" />
|
|
<result property="confirmSiteManCode" column="confirm_site_man_code" />
|
|
<result property="confirmSiteNote" column="confirm_site_note" />
|
|
<result property="confirmSiteCode" column="confirm_site_code" />
|
|
|
|
|
|
<association property="confirmCenterManName" column="confirm_center_man_code" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectEmpNameByCode"/>
|
|
<association property="confirmCenterName" column="confirm_center_code" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectSiteNameByCode"/>
|
|
|
|
<association property="confirmSiteManName" column="confirm_site_man_code" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectEmpNameByCode"/>
|
|
<association property="confirmSiteName" column="confirm_site_code" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectSiteNameByCode"/>
|
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectEmisSettleBillVo">
|
|
select id, settle_bill_no, settle_bill_name, settle_type, settle_start_date, settle_end_date, bill_month, rec_money, reced_money, cust_no, cust_name, customer_code, customer_name, site_code, site_name, satisfy_money, allowance_money, deduction_money, other_money, satisfy_reason, allowance_reason, deduction_reason, other_reason, open_bill_status, payment_status, charge_status, send_piece_sum, piece_number, fee_weight, uncollected_amount, send_money_sum, refund_amount, refund_money, payee, salesmen, bl_send_oms, bl_confirm_center, confirm_center_date, confirm_center_note, confirm_center_man_code, confirm_center_code, bl_confirm_site, confirm_site_date, confirm_site_man_code, confirm_site_note, confirm_site_code, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site from emis_settle_bill a
|
|
</sql>
|
|
|
|
<select id="selectEmisSettleBillList" parameterType="EmisSettleBill" resultMap="EmisSettleBillResult">
|
|
<include refid="selectEmisSettleBillVo"/>
|
|
<where>
|
|
del_flag='0'
|
|
<if test="id != null "> and id = #{id}</if>
|
|
<if test="settleBillNo != null and settleBillNo != ''"> and FIND_IN_SET(a.`settle_bill_no`,#{settleBillNo})</if>
|
|
<if test="settleBillName != null and settleBillName != ''"> and settle_bill_name like concat('%', #{settleBillName}, '%')</if>
|
|
<if test="settleType != null and settleType != ''"> and settle_type= #{settleType}</if>
|
|
<if test="settleStartDate != null "> and settle_start_date = #{settleStartDate}</if>
|
|
<if test="settleEndDate != null "> and settle_end_date = #{settleEndDate}</if>
|
|
<if test="billMonth != null and billMonth != ''"> and bill_month = #{billMonth}</if>
|
|
<if test="recMoney != null "> and rec_money = #{recMoney}</if>
|
|
<if test="recedMoney != null "> and reced_money = #{recedMoney}</if>
|
|
<if test="custNo != null and custNo != ''"> and cust_no = #{custNo}</if>
|
|
<if test="custName != null and custName != ''"> and cust_name like concat('%', #{custName}, '%')</if>
|
|
<if test="customerCode != null and customerCode != ''"> and customer_code = #{customerCode}</if>
|
|
<if test="customerName != null and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
|
|
<if test="siteCode != null and siteCode != ''"> and site_code = #{siteCode}</if>
|
|
<if test="siteName != null and siteName != ''"> and site_name like concat('%', #{siteName}, '%')</if>
|
|
<if test="satisfyMoney != null "> and satisfy_money = #{satisfyMoney}</if>
|
|
<if test="allowanceMoney != null "> and allowance_money = #{allowanceMoney}</if>
|
|
<if test="deductionMoney != null "> and deduction_money = #{deductionMoney}</if>
|
|
<if test="otherMoney != null "> and other_money = #{otherMoney}</if>
|
|
<if test="satisfyReason != null and satisfyReason != ''"> and satisfy_reason = #{satisfyReason}</if>
|
|
<if test="allowanceReason != null and allowanceReason != ''"> and allowance_reason = #{allowanceReason}</if>
|
|
<if test="deductionReason != null and deductionReason != ''"> and deduction_reason = #{deductionReason}</if>
|
|
<if test="otherReason != null and otherReason != ''"> and other_reason = #{otherReason}</if>
|
|
<if test="openBillStatus != null and openBillStatus != ''"> and open_bill_status = #{openBillStatus}</if>
|
|
<if test="paymentStatus != null and paymentStatus != ''"> and payment_status = #{paymentStatus}</if>
|
|
<if test="chargeStatus != null and chargeStatus != ''"> and charge_status = #{chargeStatus}</if>
|
|
<if test="sendPieceSum != null "> and send_piece_sum = #{sendPieceSum}</if>
|
|
<if test="pieceNumber != null "> and piece_number = #{pieceNumber}</if>
|
|
<if test="feeWeight != null "> and fee_weight = #{feeWeight}</if>
|
|
<if test="uncollectedAmount != null "> and uncollected_amount = #{uncollectedAmount}</if>
|
|
<if test="sendMoneySum != null "> and send_money_sum = #{sendMoneySum}</if>
|
|
<if test="refundAmount != null "> and refund_amount = #{refundAmount}</if>
|
|
<if test="refundMoney != null "> and refund_money = #{refundMoney}</if>
|
|
<if test="payee != null and payee != ''"> and payee = #{payee}</if>
|
|
<if test="salesmen != null and salesmen != ''"> and salesmen = #{salesmen}</if>
|
|
<if test="blSendOms != null and blSendOms != ''"> and bl_send_oms = #{blSendOms}</if>
|
|
<if test="blConfirmCenter != null and blConfirmCenter != ''"> and bl_confirm_center = #{blConfirmCenter}</if>
|
|
<if test="confirmCenterDate != null "> and confirm_center_date = #{confirmCenterDate}</if>
|
|
<if test="confirmCenterNote != null and confirmCenterNote != ''"> and confirm_center_note = #{confirmCenterNote}</if>
|
|
<if test="confirmCenterManCode != null and confirmCenterManCode != ''"> and confirm_center_man_code = #{confirmCenterManCode}</if>
|
|
<if test="confirmCenterCode != null and confirmCenterCode != ''"> and confirm_center_code = #{confirmCenterCode}</if>
|
|
<if test="blConfirmSite != null and blConfirmSite != ''"> and bl_confirm_site = #{blConfirmSite}</if>
|
|
<if test="confirmSiteDate != null "> and confirm_site_date = #{confirmSiteDate}</if>
|
|
<if test="confirmSiteManCode != null and confirmSiteManCode != ''"> and confirm_site_man_code = #{confirmSiteManCode}</if>
|
|
<if test="confirmSiteNote != null and confirmSiteNote != ''"> and confirm_site_note like concat('%', #{confirmSiteNote}, '%')</if>
|
|
<if test="confirmSiteCode != null and confirmSiteCode != ''"> and confirm_site_code = #{confirmSiteCode}</if>
|
|
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
|
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if>
|
|
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
|
|
<if test="createTime != null "> and create_time = #{createTime}</if>
|
|
<if test="updateBy != null and updateBy != ''"> and update_by = #{updateBy}</if>
|
|
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
|
<if test="createSite != null and createSite != ''"> and create_site = #{createSite}</if>
|
|
<if test="updateSite != null and updateSite != ''"> and update_site = #{updateSite}</if>
|
|
|
|
<if test="params.beginCreateTime != null and params.beginCreateTime != ''">
|
|
and create_time <![CDATA[ >= ]]> #{params.beginCreateTime}
|
|
</if>
|
|
<if test="params.endCreateTime != null and params.endCreateTime != ''">
|
|
and create_time <![CDATA[ <= ]]> #{params.endCreateTime}
|
|
</if>
|
|
|
|
|
|
<if test="params.canOpenBill != null and params.canOpenBill == 1">
|
|
and open_bill_status != '1'
|
|
</if>
|
|
|
|
<if test="params.billCode != null and params.billCode != ''">
|
|
and exists (
|
|
select 1 from emis_settle_sub_bill b
|
|
where a.settle_bill_no=b.settle_bill_no
|
|
and ( FIND_IN_SET(b.`bill_code`,#{params.billCode}) or b.bill_code like concat('%', #{params.billCode}, '%') )
|
|
)
|
|
|
|
</if>
|
|
|
|
|
|
<if test="params.privSiteCode != null and params.privSiteCode != '88888'">
|
|
and (
|
|
a.salesmen=#{params.privEmpName}
|
|
or a.payee=#{params.privEmpName}
|
|
or a.salesmen in(
|
|
select salesmen from emis_salesmen_rel where sales_ass=#{params.privEmpName}
|
|
)
|
|
)
|
|
</if>
|
|
|
|
</where>
|
|
order by create_time desc
|
|
</select>
|
|
|
|
<select id="checkUnique" parameterType="EmisSettleBill" resultType="int">
|
|
select count(1) from emis_settle_bill
|
|
where del_flag='0'
|
|
and id = #{id}
|
|
and settle_bill_no = #{settleBillNo}
|
|
and settle_bill_name = #{settleBillName}
|
|
and settle_type = #{settleType}
|
|
and settle_start_date = #{settleStartDate}
|
|
and settle_end_date = #{settleEndDate}
|
|
and bill_month = #{billMonth}
|
|
and rec_money = #{recMoney}
|
|
and reced_money = #{recedMoney}
|
|
and cust_no = #{custNo}
|
|
and customer_code = #{customerCode}
|
|
and customer_name = #{customerName}
|
|
and site_code = #{siteCode}
|
|
and site_name = #{siteName}
|
|
and satisfy_money = #{satisfyMoney}
|
|
and allowance_money = #{allowanceMoney}
|
|
and deduction_money = #{deductionMoney}
|
|
and other_money = #{otherMoney}
|
|
and satisfy_reason = #{satisfyReason}
|
|
and allowance_reason = #{allowanceReason}
|
|
and deduction_reason = #{deductionReason}
|
|
and other_reason = #{otherReason}
|
|
and open_bill_status = #{openBillStatus}
|
|
and payment_status = #{paymentStatus}
|
|
and charge_status = #{chargeStatus}
|
|
and send_piece_sum = #{sendPieceSum}
|
|
and piece_number = #{pieceNumber}
|
|
and fee_weight = #{feeWeight}
|
|
and uncollected_amount = #{uncollectedAmount}
|
|
and send_money_sum = #{sendMoneySum}
|
|
and refund_amount = #{refundAmount}
|
|
and refund_money = #{refundMoney}
|
|
and payee = #{payee}
|
|
and salesmen = #{salesmen}
|
|
and bl_send_oms = #{blSendOms}
|
|
and bl_confirm_center = #{blConfirmCenter}
|
|
and confirm_center_date = #{confirmCenterDate}
|
|
and confirm_center_note = #{confirmCenterNote}
|
|
and confirm_center_man_code = #{confirmCenterManCode}
|
|
and confirm_center_code = #{confirmCenterCode}
|
|
and bl_confirm_site = #{blConfirmSite}
|
|
and confirm_site_date = #{confirmSiteDate}
|
|
and confirm_site_man_code = #{confirmSiteManCode}
|
|
and confirm_site_note = #{confirmSiteNote}
|
|
and confirm_site_code = #{confirmSiteCode}
|
|
and remark = #{remark}
|
|
and del_flag = #{delFlag}
|
|
and create_by = #{createBy}
|
|
and create_time = #{createTime}
|
|
and update_by = #{updateBy}
|
|
and update_time = #{updateTime}
|
|
and create_site = #{createSite}
|
|
and update_site = #{updateSite}
|
|
limit 1
|
|
</select>
|
|
|
|
<select id="selectEmisSettleBillById" parameterType="Long" resultMap="EmisSettleBillResult">
|
|
select id, settle_bill_no, settle_bill_name, settle_type, settle_start_date, settle_end_date, bill_month, rec_money, reced_money, cust_no, cust_name, customer_code, customer_name, site_code, site_name, satisfy_money, allowance_money, deduction_money, other_money, satisfy_reason, allowance_reason, deduction_reason, other_reason, open_bill_status, payment_status, charge_status, send_piece_sum, piece_number, fee_weight, uncollected_amount, send_money_sum, refund_amount, refund_money, payee, salesmen, bl_send_oms, bl_confirm_center, confirm_center_date, confirm_center_note, confirm_center_man_code, confirm_center_code, bl_confirm_site, confirm_site_date, confirm_site_man_code, confirm_site_note, confirm_site_code, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
|
|
from emis_settle_bill a
|
|
where a.id = #{id}
|
|
</select>
|
|
|
|
|
|
<select id="selectSettleBillBySettleBillNo" parameterType="String" resultMap="EmisSettleBillResult">
|
|
select id, settle_bill_no, settle_bill_name, settle_type, settle_start_date, settle_end_date, bill_month, rec_money, reced_money, cust_no, cust_name, customer_code, customer_name, site_code, site_name, satisfy_money, allowance_money, deduction_money, other_money, satisfy_reason, allowance_reason, deduction_reason, other_reason, open_bill_status, payment_status, charge_status, send_piece_sum, piece_number, fee_weight, uncollected_amount, send_money_sum, refund_amount, refund_money, payee, salesmen, bl_send_oms, bl_confirm_center, confirm_center_date, confirm_center_note, confirm_center_man_code, confirm_center_code, bl_confirm_site, confirm_site_date, confirm_site_man_code, confirm_site_note, confirm_site_code, remark, del_flag, create_by, create_time, update_by, update_time, create_site, update_site
|
|
from emis_settle_bill a
|
|
where a.settle_bill_no = #{settleBillNo} and del_flag='0'
|
|
</select>
|
|
|
|
|
|
<insert id="insertEmisSettleBill" parameterType="EmisSettleBill" useGeneratedKeys="true" keyProperty="id">
|
|
insert into emis_settle_bill
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">id,</if>
|
|
<if test="settleBillNo != null and settleBillNo != ''">settle_bill_no,</if>
|
|
<if test="settleBillName != null and settleBillName != ''">settle_bill_name,</if>
|
|
<if test="settleType != null and settleType != ''">settle_type,</if>
|
|
<if test="settleStartDate != null">settle_start_date,</if>
|
|
<if test="settleEndDate != null">settle_end_date,</if>
|
|
<if test="billMonth != null and billMonth != ''">bill_month,</if>
|
|
<if test="recMoney != null">rec_money,</if>
|
|
<if test="recedMoney != null">reced_money,</if>
|
|
<if test="custNo != null and custNo != ''">cust_no,</if>
|
|
<if test="custName != null and custName != ''">cust_name,</if>
|
|
<if test="customerCode != null and customerCode != ''">customer_code,</if>
|
|
<if test="customerName != null and customerName != ''">customer_name,</if>
|
|
<if test="siteCode != null and siteCode != ''">site_code,</if>
|
|
<if test="siteName != null and siteName != ''">site_name,</if>
|
|
<if test="satisfyMoney != null">satisfy_money,</if>
|
|
<if test="allowanceMoney != null">allowance_money,</if>
|
|
<if test="deductionMoney != null">deduction_money,</if>
|
|
<if test="otherMoney != null">other_money,</if>
|
|
<if test="satisfyReason != null and satisfyReason != ''">satisfy_reason,</if>
|
|
<if test="allowanceReason != null and allowanceReason != ''">allowance_reason,</if>
|
|
<if test="deductionReason != null and deductionReason != ''">deduction_reason,</if>
|
|
<if test="otherReason != null and otherReason != ''">other_reason,</if>
|
|
<if test="openBillStatus != null and openBillStatus != ''">open_bill_status,</if>
|
|
<if test="paymentStatus != null and paymentStatus != ''">payment_status,</if>
|
|
<if test="chargeStatus != null and chargeStatus != ''">charge_status,</if>
|
|
<if test="sendPieceSum != null">send_piece_sum,</if>
|
|
<if test="pieceNumber != null">piece_number,</if>
|
|
<if test="feeWeight != null">fee_weight,</if>
|
|
<if test="uncollectedAmount != null">uncollected_amount,</if>
|
|
<if test="sendMoneySum != null">send_money_sum,</if>
|
|
<if test="refundAmount != null">refund_amount,</if>
|
|
<if test="refundMoney != null">refund_money,</if>
|
|
<if test="payee != null and payee != ''">payee,</if>
|
|
<if test="salesmen != null and salesmen != ''">salesmen,</if>
|
|
<if test="blSendOms != null and blSendOms != ''">bl_send_oms,</if>
|
|
<if test="blConfirmCenter != null and blConfirmCenter != ''">bl_confirm_center,</if>
|
|
<if test="confirmCenterDate != null">confirm_center_date,</if>
|
|
<if test="confirmCenterNote != null and confirmCenterNote != ''">confirm_center_note,</if>
|
|
<if test="confirmCenterManCode != null and confirmCenterManCode != ''">confirm_center_man_code,</if>
|
|
<if test="confirmCenterCode != null and confirmCenterCode != ''">confirm_center_code,</if>
|
|
<if test="blConfirmSite != null and blConfirmSite != ''">bl_confirm_site,</if>
|
|
<if test="confirmSiteDate != null">confirm_site_date,</if>
|
|
<if test="confirmSiteManCode != null and confirmSiteManCode != ''">confirm_site_man_code,</if>
|
|
<if test="confirmSiteNote != null and confirmSiteNote != ''">confirm_site_note,</if>
|
|
<if test="confirmSiteCode != null and confirmSiteCode != ''">confirm_site_code,</if>
|
|
<if test="remark != null and remark != ''">remark,</if>
|
|
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="createSite != null and createSite != ''">create_site,</if>
|
|
<if test="updateSite != null and updateSite != ''">update_site,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">#{id},</if>
|
|
<if test="settleBillNo != null and settleBillNo != ''">#{settleBillNo},</if>
|
|
<if test="settleBillName != null and settleBillName != ''">#{settleBillName},</if>
|
|
<if test="settleType != null and settleType != ''">#{settleType},</if>
|
|
<if test="settleStartDate != null">#{settleStartDate},</if>
|
|
<if test="settleEndDate != null">#{settleEndDate},</if>
|
|
<if test="billMonth != null and billMonth != ''">#{billMonth},</if>
|
|
<if test="recMoney != null">#{recMoney},</if>
|
|
<if test="recedMoney != null">#{recedMoney},</if>
|
|
<if test="custNo != null and custNo != ''">#{custNo},</if>
|
|
<if test="custName != null and custName != ''">#{custName},</if>
|
|
<if test="customerCode != null and customerCode != ''">#{customerCode},</if>
|
|
<if test="customerName != null and customerName != ''">#{customerName},</if>
|
|
<if test="siteCode != null and siteCode != ''">#{siteCode},</if>
|
|
<if test="siteName != null and siteName != ''">#{siteName},</if>
|
|
<if test="satisfyMoney != null">#{satisfyMoney},</if>
|
|
<if test="allowanceMoney != null">#{allowanceMoney},</if>
|
|
<if test="deductionMoney != null">#{deductionMoney},</if>
|
|
<if test="otherMoney != null">#{otherMoney},</if>
|
|
<if test="satisfyReason != null and satisfyReason != ''">#{satisfyReason},</if>
|
|
<if test="allowanceReason != null and allowanceReason != ''">#{allowanceReason},</if>
|
|
<if test="deductionReason != null and deductionReason != ''">#{deductionReason},</if>
|
|
<if test="otherReason != null and otherReason != ''">#{otherReason},</if>
|
|
<if test="openBillStatus != null and openBillStatus != ''">#{openBillStatus},</if>
|
|
<if test="paymentStatus != null and paymentStatus != ''">#{paymentStatus},</if>
|
|
<if test="chargeStatus != null and chargeStatus != ''">#{chargeStatus},</if>
|
|
<if test="sendPieceSum != null">#{sendPieceSum},</if>
|
|
<if test="pieceNumber != null">#{pieceNumber},</if>
|
|
<if test="feeWeight != null">#{feeWeight},</if>
|
|
<if test="uncollectedAmount != null">#{uncollectedAmount},</if>
|
|
<if test="sendMoneySum != null">#{sendMoneySum},</if>
|
|
<if test="refundAmount != null">#{refundAmount},</if>
|
|
<if test="refundMoney != null">#{refundMoney},</if>
|
|
<if test="payee != null and payee != ''">#{payee},</if>
|
|
<if test="salesmen != null and salesmen != ''">#{salesmen},</if>
|
|
<if test="blSendOms != null and blSendOms != ''">#{blSendOms},</if>
|
|
<if test="blConfirmCenter != null and blConfirmCenter != ''">#{blConfirmCenter},</if>
|
|
<if test="confirmCenterDate != null">#{confirmCenterDate},</if>
|
|
<if test="confirmCenterNote != null and confirmCenterNote != ''">#{confirmCenterNote},</if>
|
|
<if test="confirmCenterManCode != null and confirmCenterManCode != ''">#{confirmCenterManCode},</if>
|
|
<if test="confirmCenterCode != null and confirmCenterCode != ''">#{confirmCenterCode},</if>
|
|
<if test="blConfirmSite != null and blConfirmSite != ''">#{blConfirmSite},</if>
|
|
<if test="confirmSiteDate != null">#{confirmSiteDate},</if>
|
|
<if test="confirmSiteManCode != null and confirmSiteManCode != ''">#{confirmSiteManCode},</if>
|
|
<if test="confirmSiteNote != null and confirmSiteNote != ''">#{confirmSiteNote},</if>
|
|
<if test="confirmSiteCode != null and confirmSiteCode != ''">#{confirmSiteCode},</if>
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
|
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="createSite != null and createSite != ''">#{createSite},</if>
|
|
<if test="updateSite != null and updateSite != ''">#{updateSite},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateEmisSettleBill" parameterType="EmisSettleBill">
|
|
update emis_settle_bill
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="settleBillNo != null and settleBillNo != ''">settle_bill_no = #{settleBillNo},</if>
|
|
<if test="settleBillName != null and settleBillName != ''">settle_bill_name = #{settleBillName},</if>
|
|
<if test="settleType != null and settleType != ''">settle_type = #{settleType},</if>
|
|
<if test="settleStartDate != null">settle_start_date = #{settleStartDate},</if>
|
|
<if test="settleEndDate != null">settle_end_date = #{settleEndDate},</if>
|
|
<if test="billMonth != null and billMonth != ''">bill_month = #{billMonth},</if>
|
|
<if test="recMoney != null">rec_money = #{recMoney},</if>
|
|
<if test="recedMoney != null">reced_money = #{recedMoney},</if>
|
|
<if test="custNo != null and custNo != ''">cust_no = #{custNo},</if>
|
|
<if test="custName != null and custName != ''">cust_name = #{custName},</if>
|
|
<if test="customerCode != null and customerCode != ''">customer_code = #{customerCode},</if>
|
|
<if test="customerName != null and customerName != ''">customer_name = #{customerName},</if>
|
|
<if test="siteCode != null and siteCode != ''">site_code = #{siteCode},</if>
|
|
<if test="siteName != null and siteName != ''">site_name = #{siteName},</if>
|
|
<if test="satisfyMoney != null">satisfy_money = #{satisfyMoney},</if>
|
|
<if test="allowanceMoney != null">allowance_money = #{allowanceMoney},</if>
|
|
<if test="deductionMoney != null">deduction_money = #{deductionMoney},</if>
|
|
<if test="otherMoney != null">other_money = #{otherMoney},</if>
|
|
<if test="satisfyReason != null and satisfyReason != ''">satisfy_reason = #{satisfyReason},</if>
|
|
<if test="allowanceReason != null and allowanceReason != ''">allowance_reason = #{allowanceReason},</if>
|
|
<if test="deductionReason != null and deductionReason != ''">deduction_reason = #{deductionReason},</if>
|
|
<if test="otherReason != null and otherReason != ''">other_reason = #{otherReason},</if>
|
|
<if test="openBillStatus != null and openBillStatus != ''">open_bill_status = #{openBillStatus},</if>
|
|
<if test="paymentStatus != null and paymentStatus != ''">payment_status = #{paymentStatus},</if>
|
|
<if test="chargeStatus != null and chargeStatus != ''">charge_status = #{chargeStatus},</if>
|
|
<if test="sendPieceSum != null">send_piece_sum = #{sendPieceSum},</if>
|
|
<if test="pieceNumber != null">piece_number = #{pieceNumber},</if>
|
|
<if test="feeWeight != null">fee_weight = #{feeWeight},</if>
|
|
<if test="uncollectedAmount != null">uncollected_amount = #{uncollectedAmount},</if>
|
|
<if test="sendMoneySum != null">send_money_sum = #{sendMoneySum},</if>
|
|
<if test="refundAmount != null">refund_amount = #{refundAmount},</if>
|
|
<if test="refundMoney != null">refund_money = #{refundMoney},</if>
|
|
<if test="payee != null and payee != ''">payee = #{payee},</if>
|
|
<if test="salesmen != null and salesmen != ''">salesmen = #{salesmen},</if>
|
|
<if test="blSendOms != null and blSendOms != ''">bl_send_oms = #{blSendOms},</if>
|
|
<if test="blConfirmCenter != null and blConfirmCenter != ''">bl_confirm_center = #{blConfirmCenter},</if>
|
|
<if test="confirmCenterDate != null">confirm_center_date = #{confirmCenterDate},</if>
|
|
<if test="confirmCenterNote != null and confirmCenterNote != ''">confirm_center_note = #{confirmCenterNote},</if>
|
|
<if test="confirmCenterManCode != null and confirmCenterManCode != ''">confirm_center_man_code = #{confirmCenterManCode},</if>
|
|
<if test="confirmCenterCode != null and confirmCenterCode != ''">confirm_center_code = #{confirmCenterCode},</if>
|
|
<if test="blConfirmSite != null and blConfirmSite != ''">bl_confirm_site = #{blConfirmSite},</if>
|
|
<if test="confirmSiteDate != null">confirm_site_date = #{confirmSiteDate},</if>
|
|
<if test="confirmSiteManCode != null and confirmSiteManCode != ''">confirm_site_man_code = #{confirmSiteManCode},</if>
|
|
<if test="confirmSiteNote != null and confirmSiteNote != ''">confirm_site_note = #{confirmSiteNote},</if>
|
|
<if test="confirmSiteCode != null and confirmSiteCode != ''">confirm_site_code = #{confirmSiteCode},</if>
|
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
|
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
<if test="createSite != null and createSite != ''">create_site = #{createSite},</if>
|
|
<if test="updateSite != null and updateSite != ''">update_site = #{updateSite},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteEmisSettleBillById" parameterType="Long">
|
|
update emis_settle_bill set del_flag='1' where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteEmisSettleBillByIds" parameterType="String">
|
|
update emis_settle_bill set del_flag='1' where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
</mapper> |