40 lines
1.5 KiB
XML
40 lines
1.5 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.bonus.material.push.mapper.IwsCostPushMapper">
|
||
|
|
|
||
|
|
<select id="findAgreement" resultType="com.bonus.material.push.domain.IwsCostPushBean">
|
||
|
|
SELECT
|
||
|
|
bp.PRO_ID AS projectId,
|
||
|
|
bp.pro_name AS projectName,
|
||
|
|
bu.unit_name AS unitName,
|
||
|
|
bma.`agreement_code` AS agreementCode,
|
||
|
|
bma.is_slt AS isSettlement,
|
||
|
|
bma.sign_time AS settlementTime,
|
||
|
|
bma.is_push AS isPush
|
||
|
|
FROM bm_agreement_info bma
|
||
|
|
LEFT JOIN bm_project bp ON bp.pro_id = bma.project_id
|
||
|
|
LEFT JOIN bm_unit bu ON bu.unit_id = bma.unit_id
|
||
|
|
<where>
|
||
|
|
<if test="agreementCode != null and agreementCode != ''">
|
||
|
|
AND bma.agreement_code LIKE CONCAT('%',#{agreementCode},'%')
|
||
|
|
</if>
|
||
|
|
<if test="projectId != null and projectId != ''">
|
||
|
|
AND bma.project_id = #{projectId}
|
||
|
|
</if>
|
||
|
|
<if test="unitId != null and unitId != ''">
|
||
|
|
AND bma.unit_id = #{unitId}
|
||
|
|
</if>
|
||
|
|
<if test="isPush != null and isPush != ''">
|
||
|
|
AND bma.is_push = #{isPush}
|
||
|
|
</if>
|
||
|
|
<if test="isSettlement != null and isSettlement != ''">
|
||
|
|
AND bma.is_slt = #{isSettlement}
|
||
|
|
</if>
|
||
|
|
</where>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
</mapper>
|