|
469 | 469 | <select id="getConfigFeeSummary" parameterType="Map" resultType="Map">
|
470 | 470 | select a.name,
|
471 | 471 | (
|
| 472 | + select ifnull(sum(t.receivable_amount),0.0) curReceivableFee |
| 473 | + from pay_fee_detail_month t force index(i_fc) |
| 474 | + where |
| 475 | + 1=1 |
| 476 | + <if test="floorId != null and floorId != ''"> |
| 477 | + and t.obj_fpc_id = #{floorId} |
| 478 | + </if> |
| 479 | + and t.status_cd = '0' |
| 480 | + and t.community_id= #{communityId} |
| 481 | + and t.cur_month_time >= #{startDate} |
| 482 | + and t.cur_month_time < #{endDate} |
| 483 | + <if test="configIds !=null "> |
| 484 | + and t.config_id in |
| 485 | + <foreach collection="configIds" item="item" index="index" open="(" close=")" separator=","> |
| 486 | + #{item} |
| 487 | + </foreach> |
| 488 | + </if> |
| 489 | + and t.fee_type_cd = a.status_cd |
| 490 | + ) curReceivableFee, |
| 491 | + ( |
| 492 | + select ifnull(sum(t.receivable_amount),0.0) curReceivedFee |
| 493 | + from pay_fee_detail_month t force index(i_fc) |
| 494 | + where |
| 495 | + 1=1 |
| 496 | + <if test="floorId != null and floorId != ''"> |
| 497 | + and t.obj_fpc_id = #{floorId} |
| 498 | + </if> |
| 499 | + and t.status_cd = '0' |
| 500 | + and t.community_id= #{communityId} |
| 501 | + and t.cur_month_time >= #{startDate} |
| 502 | + and t.cur_month_time < #{endDate} |
| 503 | + and t.detail_id != '-1' |
| 504 | + <if test="configIds !=null "> |
| 505 | + and t.config_id in |
| 506 | + <foreach collection="configIds" item="item" index="index" open="(" close=")" separator=","> |
| 507 | + #{item} |
| 508 | + </foreach> |
| 509 | + </if> |
| 510 | + and t.fee_type_cd = a.status_cd |
| 511 | + ) curReceivedFee, |
| 512 | + ( |
472 | 513 | select count(1) from (
|
473 | 514 | select pfc.fee_type_cd,t.payer_obj_id
|
474 | 515 | from report_owe_fee t
|
|
519 | 560 | group by pf.fee_type_cd,t.payer_obj_id
|
520 | 561 | ) b
|
521 | 562 | where b.fee_type_cd = a.status_cd
|
522 |
| - ) feeRoomCount, |
523 |
| - |
524 |
| - ( |
525 |
| - select ifnull(sum(t.receivable_amount),0.0) curReceivableFee |
526 |
| - from pay_fee_detail_month t force index(i_pay_fee_detail_fc) |
527 |
| - where |
528 |
| - 1=1 |
529 |
| - <if test="floorId != null and floorId != ''"> |
530 |
| - and t.obj_fpc_id = #{floorId} |
531 |
| - </if> |
532 |
| - and t.status_cd = '0' |
533 |
| - and t.community_id= #{communityId} |
534 |
| - and t.cur_month_time >= #{startDate} |
535 |
| - and t.cur_month_time < #{endDate} |
536 |
| - <if test="configIds !=null "> |
537 |
| - and t.config_id in |
538 |
| - <foreach collection="configIds" item="item" index="index" open="(" close=")" separator=","> |
539 |
| - #{item} |
540 |
| - </foreach> |
541 |
| - </if> |
542 |
| - and t.fee_type_cd = a.status_cd |
543 |
| - ) curReceivableFee, |
544 |
| - ( |
545 |
| - select ifnull(sum(t.receivable_amount),0.0) curReceivedFee |
546 |
| - from pay_fee_detail_month t force index(i_pay_fee_detail_fc) |
547 |
| - where |
548 |
| - 1=1 |
549 |
| - <if test="floorId != null and floorId != ''"> |
550 |
| - and t.obj_fpc_id = #{floorId} |
551 |
| - </if> |
552 |
| - and t.status_cd = '0' |
553 |
| - and t.community_id= #{communityId} |
554 |
| - and t.cur_month_time >= #{startDate} |
555 |
| - and t.cur_month_time < #{endDate} |
556 |
| - and t.detail_id != '-1' |
557 |
| - <if test="configIds !=null "> |
558 |
| - and t.config_id in |
559 |
| - <foreach collection="configIds" item="item" index="index" open="(" close=")" separator=","> |
560 |
| - #{item} |
561 |
| - </foreach> |
562 |
| - </if> |
563 |
| - and t.fee_type_cd = a.status_cd |
564 |
| - ) curReceivedFee |
| 563 | + ) feeRoomCount |
565 | 564 | from t_dict a
|
566 | 565 | where 1=1
|
567 | 566 | and a.table_name = 'pay_fee_config'
|
|
0 commit comments