|
|
|
@ -94,12 +94,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<select id="getSltAgreementInfo" resultType="com.bonus.sgzb.material.domain.AgreementInfo">
|
|
|
|
<select id="getSltAgreementInfo" resultType="com.bonus.sgzb.material.domain.AgreementInfo">
|
|
|
|
SELECT bai.agreement_id, bai.agreement_code, contract_code,file_url ,file_name,sign_time,
|
|
|
|
SELECT bai.agreement_id, bai.agreement_code, contract_code,file_url ,file_name,sign_time,
|
|
|
|
bui.unit_id,bui.unit_name , bp.lot_id as projectId , bp.lot_name as projectName,
|
|
|
|
bui.unit_id,bui.unit_name , bp.lot_id as projectId , bp.lot_name as projectName,
|
|
|
|
plan_start_time,lease_day,auth_person,phone,bai.remark,bai.protocol,sar.cost as cost,
|
|
|
|
plan_start_time,lease_day,auth_person,phone,saa.remark,bai.protocol,sar.cost as cost,
|
|
|
|
case when sar.id is null then '1' when sar.status = '0' then '2' when sar.status = '1' then '3' end as sltStatus
|
|
|
|
case when sar.id is null then '1' when sar.status = '0' then '2' when sar.status = '1' then '3' end as sltStatus
|
|
|
|
FROM bm_agreement_info bai
|
|
|
|
FROM bm_agreement_info bai
|
|
|
|
LEFT JOIN bm_project_lot bp ON bp.lot_id = bai.project_id
|
|
|
|
LEFT JOIN bm_project_lot bp ON bp.lot_id = bai.project_id
|
|
|
|
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
|
|
|
|
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
|
|
|
|
left join slt_agreement_relation sar on bai.agreement_id = sar.agreement_id
|
|
|
|
LEFT JOIN slt_agreement_relation sar on bai.agreement_id = sar.agreement_id
|
|
|
|
|
|
|
|
LEFT JOIN slt_agreement_apply saa on saa.id = sar.apply_id
|
|
|
|
where bai.status = '1'
|
|
|
|
where bai.status = '1'
|
|
|
|
<if test="unitId != null and unitId != ''">
|
|
|
|
<if test="unitId != null and unitId != ''">
|
|
|
|
and bui.unit_id = #{unitId}
|
|
|
|
and bui.unit_id = #{unitId}
|
|
|
|
|