<?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="org.jeecg.modules.finance.mapper.FdBalancePaymentSettlementMapper">

    <select id="findByPage" resultType="org.jeecg.modules.finance.entity.FdBalancePaymentSettlement">
        SELECT
            fbps.id,
            fbps.statement_no,
            fbps.bid_party_name,
            fbps.contract_code,
            fbps.contract_money,
            fbps.settlement_money,
            fbps.BD_director,
            fbps.head_of_biological_analysis,
            fbps.clinical_project_manager,
            fbps.create_time
        FROM
            fd_balance_payment_settlement AS fbps
            LEFT JOIN fd_balance_payment_settlement_item AS fbpsi ON fbpsi.balance_payment_settlement_id = fbps.id
            ${ew.customSqlSegment}
    </select>

    <update id="auditBatch" parameterType="java.util.List">
        update fd_balance_payment_settlement set status = '0' where id in
        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
            #{item}
        </foreach>
    </update>

    <update id="reviewBatch" parameterType="java.util.List">
        update fd_balance_payment_settlement set status = '1' where id in
        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
            #{item}
        </foreach>
    </update>
</mapper>