|
@@ -87,7 +87,7 @@
|
|
|
CASE when approve_status = 0 then '未上报' when approve_status = 1 then '待审批' when approve_status = 2 then '已审批'
|
|
|
else '已废除' end as approveStatusName,
|
|
|
(select period_number from s_contract_meter_period cmp where cmp.id = mma.contract_period_id) as periodNumber,
|
|
|
- (SELECT raw_url from s_interim_pay_certificate where contract_id=#{apply.contractId} and contract_period_id=#{apply.contractPeriodId} ) as periodPdfUrl
|
|
|
+ (SELECT raw_url from s_interim_pay_certificate where contract_id=#{apply.contractId} and contract_period_id=#{apply.contractPeriodId} and is_deleted=0) as periodPdfUrl
|
|
|
FROM s_middle_meter_apply mma
|
|
|
WHERE contract_id = #{apply.contractId} and is_deleted = 0
|
|
|
<if test="apply.contractPeriodId != -1">
|
|
@@ -104,7 +104,7 @@
|
|
|
CASE when approve_status = 0 then '未上报' when approve_status = 1 then '待审批' when approve_status = 2 then '已审批'
|
|
|
else '已废除' end as approveStatusName,
|
|
|
(select period_number from s_contract_meter_period cmp where cmp.id = mma.contract_period_id) as periodNumber,
|
|
|
- (SELECT raw_url from s_interim_pay_certificate where contract_id=#{apply.contractId} and contract_period_id=mma.contract_period_id ) as periodPdfUrl
|
|
|
+ (SELECT raw_url from s_interim_pay_certificate where contract_id=#{apply.contractId} and contract_period_id=mma.contract_period_id and is_deleted=0) as periodPdfUrl
|
|
|
FROM s_middle_meter_apply mma
|
|
|
WHERE contract_id = #{apply.contractId} and is_deleted = 0
|
|
|
<if test="apply.contractPeriodId != -1">
|