소스 검색

变更令下达修改支付比例2

qianxb 1 년 전
부모
커밋
66869b9916
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      blade-service/blade-meter/src/main/java/org/springblade/meter/mapper/MiddleMeterApplyMapper.xml

+ 1 - 1
blade-service/blade-meter/src/main/java/org/springblade/meter/mapper/MiddleMeterApplyMapper.xml

@@ -137,7 +137,7 @@
                       and contract_meter_id = #{nodeId} and contract_form_id = ifa.contract_form_id and id != ifa.id),0)) as otherMeterTotal,
                (IFNULL((select sum(current_meter_total) from s_inventory_form_apply where is_deleted = 0
                       and contract_meter_id = #{nodeId} and contract_form_id = ifa.contract_form_id),0)) as allMeterTotal,
-               (IFNULL((select sum(pay_ratio) from s_inventory_form_apply where is_deleted = 0
+               (IFNULL((select sum(pay_ratio) from s_inventory_form_apply ifa2 where is_deleted = 0 and ifa2.id != ifa.id
                       and contract_meter_id = #{nodeId} and contract_form_id = ifa.contract_form_id),0)) as otherPayRatio,
                (select up_pay_ratio from s_inventory_form_meter where is_deleted = 0
                       and contract_meter_id = #{nodeId} and contract_form_id = ifa.contract_form_id) as upPayRatio