|
416 | 416 | where b.floor_id = a.floor_id |
417 | 417 | ) feeRoomCount, |
418 | 418 | ( |
419 | | - select ifnull(sum(t.received_amount),0.0) receivedFee |
420 | | - from pay_fee_detail t |
421 | | - INNER JOIN pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
422 | | - LEFT JOIN building_room br on pf.payer_obj_id = br.room_id and br.status_cd = '0' |
423 | | - left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
424 | | - where |
425 | | - 1=1 |
426 | | - and bu.floor_id = a.floor_id |
427 | | - and t.status_cd = '0' |
428 | | - and t.community_id= a.community_id |
429 | | - and t.create_time > #{startDate} |
430 | | - and t.create_time < #{endDate} |
431 | | - <if test="configIds !=null "> |
432 | | - and pf.config_id in |
433 | | - <foreach collection="configIds" item="item" index="index" open="(" close=")" separator=","> |
434 | | - #{item} |
435 | | - </foreach> |
436 | | - </if> |
437 | | - <if test="feeTypeCd != null and feeTypeCd != ''"> |
438 | | - and pf.fee_type_cd = #{feeTypeCd} |
439 | | - </if> |
440 | | - ) receivedFee, |
441 | | - ( |
442 | | - select ifnull(sum(t.received_amount),0.0) preReceivedFee |
443 | | - from pay_fee_detail_month t |
444 | | - where |
445 | | - 1=1 |
446 | | - and t.obj_fpc_id = a.floor_id |
447 | | - and t.status_cd = '0' |
448 | | - and t.community_id= a.community_id |
449 | | - and t.pay_fee_time > #{startDate} |
450 | | - and t.pay_fee_time < #{endDate} |
451 | | - and t.cur_month_time >= #{endDate} |
452 | | - <if test="configIds !=null "> |
453 | | - and t.config_id in |
454 | | - <foreach collection="configIds" item="item" index="index" open="(" close=")" separator=","> |
455 | | - #{item} |
456 | | - </foreach> |
457 | | - </if> |
458 | | - <if test="feeTypeCd != null and feeTypeCd != ''"> |
459 | | - and t.fee_type_cd = #{feeTypeCd} |
460 | | - </if> |
461 | | - ) preReceivedFee, |
462 | | - ( |
463 | | - select ifnull(sum(t.receivable_amount),0.0) hisOweFee |
464 | | - from pay_fee_detail_month t |
465 | | - where |
466 | | - 1=1 |
467 | | - and t.obj_fpc_id = a.floor_id |
468 | | - and t.status_cd = '0' |
469 | | - and t.community_id= a.community_id |
470 | | - and t.detail_id = '-1' |
471 | | - and t.cur_month_time < #{startDate} |
472 | | - <if test="configIds !=null "> |
473 | | - and t.config_id in |
474 | | - <foreach collection="configIds" item="item" index="index" open="(" close=")" separator=","> |
475 | | - #{item} |
476 | | - </foreach> |
477 | | - </if> |
478 | | - <if test="feeTypeCd != null and feeTypeCd != ''"> |
479 | | - and t.fee_type_cd = #{feeTypeCd} |
480 | | - </if> |
481 | | - ) hisOweFee, |
482 | | - ( |
483 | 419 | select ifnull(sum(t.receivable_amount),0.0) curReceivableFee |
484 | 420 | from pay_fee_detail_month t |
485 | 421 | where |
|
519 | 455 | <if test="feeTypeCd != null and feeTypeCd != ''"> |
520 | 456 | and t.fee_type_cd = #{feeTypeCd} |
521 | 457 | </if> |
522 | | - ) curReceivedFee, |
523 | | - ( |
524 | | - select ifnull(sum(t.received_amount),0.0) hisReceivedFee |
525 | | - from pay_fee_detail_month t |
526 | | - where |
527 | | - 1=1 |
528 | | - and t.obj_fpc_id = a.floor_id |
529 | | - and t.status_cd = '0' |
530 | | - and t.community_id= a.community_id |
531 | | - and t.pay_fee_time > #{startDate} |
532 | | - and t.pay_fee_time < #{endDate} |
533 | | - and t.cur_month_time < #{startDate} |
534 | | - and t.detail_id != '-1' |
535 | | - <if test="configIds !=null "> |
536 | | - and t.config_id in |
537 | | - <foreach collection="configIds" item="item" index="index" open="(" close=")" separator=","> |
538 | | - #{item} |
539 | | - </foreach> |
540 | | - </if> |
541 | | - <if test="feeTypeCd != null and feeTypeCd != ''"> |
542 | | - and t.fee_type_cd = #{feeTypeCd} |
543 | | - </if> |
544 | | - ) hisReceivedFee |
| 458 | + ) curReceivedFee |
545 | 459 | from f_floor a |
546 | 460 | where 1=1 |
547 | 461 | and a.status_cd = '0' |
|
0 commit comments