|
520 | 520 | ) b |
521 | 521 | where b.fee_type_cd = a.status_cd |
522 | 522 | ) feeRoomCount, |
523 | | - ( |
524 | | - select ifnull(sum(t.received_amount),0.0) receivedFee |
525 | | - from pay_fee_detail t |
526 | | - INNER JOIN pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
527 | | - <if test="floorId != null and floorId != ''"> |
528 | | - LEFT JOIN building_room br on pf.payer_obj_id = br.room_id and br.status_cd = '0' |
529 | | - left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
530 | | - </if> |
531 | | - where |
532 | | - 1=1 |
533 | | - <if test="floorId != null and floorId != ''"> |
534 | | - and bu.floor_id = #{floorId} |
535 | | - </if> |
536 | | - and t.status_cd = '0' |
537 | | - and t.community_id= #{communityId} |
538 | | - and t.create_time > #{startDate} |
539 | | - and t.create_time < #{endDate} |
540 | | - <if test="configIds !=null "> |
541 | | - and pf.config_id in |
542 | | - <foreach collection="configIds" item="item" index="index" open="(" close=")" separator=","> |
543 | | - #{item} |
544 | | - </foreach> |
545 | | - </if> |
546 | | - and pf.fee_type_cd = a.status_cd |
547 | | - ) receivedFee, |
548 | | - ( |
549 | | - select ifnull(sum(t.received_amount),0.0) preReceivedFee |
550 | | - from pay_fee_detail_month t |
551 | | - where |
552 | | - 1=1 |
553 | | - <if test="floorId != null and floorId != ''"> |
554 | | - and t.obj_fpc_id = #{floorId} |
555 | | - </if> |
556 | | - and t.status_cd = '0' |
557 | | - and t.community_id= #{communityId} |
558 | | - and t.pay_fee_time > #{startDate} |
559 | | - and t.pay_fee_time < #{endDate} |
560 | | - and t.cur_month_time >= #{endDate} |
561 | | - and t.detail_id != '-1' |
562 | | - <if test="configIds !=null "> |
563 | | - and t.config_id in |
564 | | - <foreach collection="configIds" item="item" index="index" open="(" close=")" separator=","> |
565 | | - #{item} |
566 | | - </foreach> |
567 | | - </if> |
568 | | - and t.fee_type_cd = a.status_cd |
569 | | - ) preReceivedFee, |
570 | | - ( |
571 | | - select ifnull(sum(t.receivable_amount),0.0) hisOweFee |
572 | | - from pay_fee_detail_month t |
573 | | - where |
574 | | - 1=1 |
575 | | - <if test="floorId != null and floorId != ''"> |
576 | | - and t.obj_fpc_id = #{floorId} |
577 | | - </if> |
578 | | - and t.status_cd = '0' |
579 | | - and t.community_id= #{communityId} |
580 | | - and t.detail_id = '-1' |
581 | | - and t.cur_month_time < #{startDate} |
582 | | - <if test="configIds !=null "> |
583 | | - and t.config_id in |
584 | | - <foreach collection="configIds" item="item" index="index" open="(" close=")" separator=","> |
585 | | - #{item} |
586 | | - </foreach> |
587 | | - </if> |
588 | | - and t.fee_type_cd = a.status_cd |
589 | | - ) hisOweFee, |
| 523 | + |
590 | 524 | ( |
591 | 525 | select ifnull(sum(t.receivable_amount),0.0) curReceivableFee |
592 | 526 | from pay_fee_detail_month t |
|
627 | 561 | </foreach> |
628 | 562 | </if> |
629 | 563 | and t.fee_type_cd = a.status_cd |
630 | | - ) curReceivedFee, |
631 | | - ( |
632 | | - select ifnull(sum(t.received_amount),0.0) hisReceivedFee |
633 | | - from pay_fee_detail_month t |
634 | | - where |
635 | | - 1=1 |
636 | | - <if test="floorId != null and floorId != ''"> |
637 | | - and t.obj_fpc_id = #{floorId} |
638 | | - </if> |
639 | | - and t.status_cd = '0' |
640 | | - and t.community_id= #{communityId} |
641 | | - and t.pay_fee_time > #{startDate} |
642 | | - and t.pay_fee_time < #{endDate} |
643 | | - and t.cur_month_time < #{startDate} |
644 | | - and t.detail_id != '-1' |
645 | | - <if test="configIds !=null "> |
646 | | - and t.config_id in |
647 | | - <foreach collection="configIds" item="item" index="index" open="(" close=")" separator=","> |
648 | | - #{item} |
649 | | - </foreach> |
650 | | - </if> |
651 | | - and t.fee_type_cd = a.status_cd |
652 | | - ) hisReceivedFee |
| 564 | + ) curReceivedFee |
653 | 565 | from t_dict a |
654 | 566 | where 1=1 |
655 | 567 | and a.table_name = 'pay_fee_config' |
|
0 commit comments