<?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.FdSupplementaryContractReceivablesBMapper">
    
        <select id="queryByConId" resultType="org.jeecg.modules.finance.entity.FdSupplementaryContractReceivablesB">
        SELECT
            cc.description AS milestone,
            cc.payment_percent AS estimator,
            con.total_amount AS contractMoney
        FROM
            fd_supplementary_contract_receivables_b scrb
            LEFT JOIN fd_contract_clause cc ON scrb.pk_contract = cc.contract_id
            left join fd_contract con on scrb.pk_contract = con.id
        WHERE
            cc.contract_id = #{0}
        </select>

        <select id="queryByDict" resultType="org.jeecg.modules.finance.entity.FdSupplementaryContractReceivablesB">
        SELECT
            sdi.item_text
        FROM
            sys_dict_item sdi
        WHERE
            sdi.item_value=#{0}
        and
            sdi.dict_id = "42b3aadca10162b6225bae7b80c4b346"
        </select>
    

</mapper>