Bonus-Cloud-Material/bonus-modules/bonus-material/src/main/resources/mapper/material/push/IwsCostPushMapper.xml

41 lines
1.5 KiB
XML
Raw Normal View History

<?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,
2025-01-23 16:13:37 +08:00
bp.pro_code AS projectCode,
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>
2025-01-23 16:13:37 +08:00
<if test="isPush != null">
AND bma.is_push = #{isPush}
</if>
<if test="isSettlement != null and isSettlement != ''">
AND bma.is_slt = #{isSettlement}
</if>
</where>
</select>
</mapper>