| | |
| | | and pfc.start_time <= #{endTime} |
| | | </if> |
| | | <if test="yearMonth !=null and yearMonth != ''"> |
| | | and concat(t.fee_year,t.fee_month) = #{yearMonth} |
| | | and concat(t.fee_year,lpad(t.fee_month,2,0)) = #{yearMonth} |
| | | </if> |
| | | |
| | | group by t.config_id,t.fee_name,pfc.start_time |
| | |
| | | and pfc.start_time <= #{endTime} |
| | | </if> |
| | | <if test="yearMonth !=null and yearMonth != ''"> |
| | | and concat(t.fee_year,t.fee_month) = #{yearMonth} |
| | | and concat(t.fee_year,lpad(t.fee_month,2,0)) = #{yearMonth} |
| | | </if> |
| | | group by t.config_id,t.fee_name,pfc.start_time |
| | | order by t.create_time desc |
| | |
| | | SUM(t.his_owe_amount + t.cur_receivable_amount) allReceivableAmount, |
| | | SUM(t.cur_received_amount+t.his_owe_received_amount+t.pre_received_amount) allReceivedAmount, |
| | | if(SUM(t.his_owe_amount + t.cur_receivable_amount - t.cur_received_amount - t.his_owe_received_amount) < 0,0, |
| | | SUM(t.his_owe_amount + t.cur_receivable_amount - t.cur_received_amount - t.his_owe_received_amount)) allOweAmount, |
| | | SUM(t.his_owe_amount + t.cur_receivable_amount - t.cur_received_amount - t.his_owe_received_amount)) |
| | | allOweAmount, |
| | | SUM(t.his_owe_received_amount) allHisOweReceivedAmount |
| | | from report_fee_month_statistics t |
| | | inner join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0' |
| | |
| | | and pfc.start_time <= #{endTime} |
| | | </if> |
| | | <if test="yearMonth !=null and yearMonth != ''"> |
| | | and concat(t.fee_year,t.fee_month) = #{yearMonth} |
| | | and concat(t.fee_year,lpad(t.fee_month,2,0)) = #{yearMonth} |
| | | </if> |
| | | order by t.create_time desc |
| | | </select> |
| | |
| | | <select id="queryFeeDetail" parameterType="Map" resultType="Map"> |
| | | select t.obj_name objName,t.fee_name feeName,t.fee_create_time feeCreateTime,pfa.`value` |
| | | ownerName,br.built_up_area builtUpArea ,max(t.deadline_time) |
| | | deadlineTime,t.create_time createTime,SUM(t.receivable_amount) receivableAmount,SUM(t.received_amount) |
| | | receivedAmount,SUM(t.owe_amount) oweAmount,max(t.update_time) updateTime |
| | | deadlineTime,t.create_time createTime,max(t.update_time) updateTime,SUM(t.his_owe_amount) |
| | | hisOweAmount,SUM(t.cur_receivable_amount) curReceivableAmount, |
| | | SUM(t.cur_received_amount) curReceivedAmount,SUM(t.his_owe_received_amount) |
| | | hisOweReceivedAmount,SUM(t.pre_received_amount) preReceivedAmount, |
| | | sum(t.his_owe_amount+t.cur_receivable_amount) receivableAmount, |
| | | sum(t.cur_received_amount+t.his_owe_received_amount+t.pre_received_amount) receivedAmount |
| | | from report_fee_month_statistics t |
| | | inner join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0' |
| | | left join building_room br on t.obj_id = br.room_id and t.obj_type = '3333' and br.status_cd = '0' |
| | |
| | | left join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0' |
| | | inner join pay_fee pf on t.fee_id = pf.fee_id and pf.community_id = t.community_id and pf.status_cd = '0' |
| | | left join pay_fee_attrs pfa on pf.fee_id = pfa.fee_id and pfa.spec_cd = '390008' and pfa.status_cd ='0' |
| | | where t.status_cd = '0' and t.receivable_amount >=0 and t.receivable_amount >= 0 |
| | | where t.status_cd = '0' |
| | | <if test="roomNum !=null and roomNum != ''"> |
| | | and br.room_num= #{roomNum} |
| | | </if> |
| | |
| | | and t.create_time <= #{endTime} |
| | | </if> |
| | | group by t.config_id,t.fee_name,t.fee_create_time,t.obj_id,t.obj_name,pfa.`value`,br.built_up_area |
| | | order by pfa.`value` |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | |
| | | |
| | | <!-- 查询费用月统计信息 add by wuxw 2018-07-03 --> |
| | | <select id="queryAllFeeDetail" parameterType="Map" resultType="Map"> |
| | | select SUM(t.receivable_amount) allReceivableAmount,SUM(t.received_amount) allReceivedAmount, |
| | | SUM(t.owe_amount) allOweAmount from report_fee_month_statistics t |
| | | select |
| | | SUM(t.his_owe_amount + t.cur_receivable_amount) allReceivableAmount, |
| | | SUM(t.cur_received_amount+t.his_owe_received_amount+t.pre_received_amount) allReceivedAmount, |
| | | if(SUM(t.his_owe_amount + t.cur_receivable_amount - t.cur_received_amount - t.his_owe_received_amount) < 0,0, |
| | | SUM(t.his_owe_amount + t.cur_receivable_amount - t.cur_received_amount - t.his_owe_received_amount)) |
| | | allOweAmount, |
| | | SUM(t.his_owe_received_amount) allHisOweReceivedAmount |
| | | from report_fee_month_statistics t |
| | | inner join pay_fee_config pfc on t.config_id = pfc.config_id and pfc.status_cd = '0' |
| | | left join building_room br on t.obj_id = br.room_id and t.obj_type = '3333' and br.status_cd = '0' |
| | | left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | |
| | | </if> |
| | | group by t.fee_name,t.payer_obj_id,t.payer_obj_name,pfa.`value`,br.built_up_area |
| | | HAVING oweAmount > 0 |
| | | order by pfa.`value` |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | |
| | | t.receivable_amount receivableAmount,t.received_amount receivedAmount,d.name,d2.name feeTypeCdName, |
| | | pfc.fee_type_cd feeTypeCd,t.state,d3.name stateName |
| | | from pay_fee_detail t |
| | | INNER JOIN pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | inner join pay_fee_config pfc on pf.config_id = pfc.config_id and pfc.status_cd = '0' |
| | | left JOIN pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | left join pay_fee_config pfc on pf.config_id = pfc.config_id and pfc.status_cd = '0' |
| | | left join building_room br on pf.payer_obj_id = br.room_id and pf.payer_obj_type = '3333' and br.status_cd = '0' |
| | | left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | left join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0' |
| | |
| | | |
| | | <!-- 查询费用月统计信息 add by wuxw 2018-07-03 --> |
| | | <select id="queryPayFeeDetail" parameterType="Map" resultType="Map"> |
| | | select pfc.fee_name feeName,f.floor_num floorNum,bu.unit_num unitNum,br.room_num roomNum,oc.car_num carNum, |
| | | select pfc.fee_name feeName,f.floor_num floorNum,bu.unit_num unitNum,br.room_num roomNum,br.built_up_area |
| | | builtUpArea ,oc.car_num carNum, |
| | | pf.payer_obj_type payerObjType,t.start_time startTime,t.end_time endTime,t.create_time createTime, |
| | | t.receivable_amount receivableAmount,t.received_amount receivedAmount,pfa.`value` |
| | | importFeeName,t.prime_rate,d.name primeRate,fdr.discount_small_type discountSmallType,fdr.rule_name |
| | | ruleName,pfdd.discount_price discountPrice,co.contract_code contractCode,pfo.`value` ownerName,cb.o_id oId, |
| | | d2.name feeTypeCdName,pfc.fee_type_cd feeTypeCd,t.state,d3.name stateName,t.fee_id feeId,pft.`value` repairId, |
| | | t.detail_id,t.detail_id detailId,pf.payer_obj_id |
| | | t.detail_id,t.detail_id detailId,pf.payer_obj_id,pfb.value ownerId,concat(pa.num,'停车场',ps.num,'车位') psName |
| | | from pay_fee_detail t |
| | | INNER JOIN pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | inner join pay_fee_config pfc on pf.config_id = pfc.config_id and pfc.status_cd = '0' |
| | | left JOIN pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | left join pay_fee_config pfc on pf.config_id = pfc.config_id and pfc.status_cd = '0' |
| | | left join building_room br on pf.payer_obj_id = br.room_id and pf.payer_obj_type = '3333' and br.status_cd = '0' |
| | | left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | left join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0' |
| | | left join owner_car oc on pf.payer_obj_id = oc.car_id and oc.car_type_cd='1001' |
| | | LEFT JOIN parking_space ps on oc.ps_id = ps.ps_id and ps.status_cd = '0' |
| | | left join parking_area pa on ps.pa_id = pa.pa_id and pa.status_cd = '0' |
| | | left join pay_fee_attrs pfa on t.fee_id = pfa.fee_id and pfa.spec_cd = '390002' |
| | | left join pay_fee_attrs pfb on t.fee_id = pfb.fee_id and pfb.spec_cd = '390007' |
| | | left join pay_fee_attrs pfo on t.fee_id = pfo.fee_id and pfo.spec_cd = '390008' |
| | | left join pay_fee_attrs pft on t.fee_id = pft.fee_id and pft.spec_cd = '390001' |
| | | left join pay_fee_detail_discount pfdd on t.detail_id = pfdd.detail_id and pfdd.status_cd = '0' |
| | |
| | | <select id="queryAllPayFeeDetail" parameterType="Map" resultType="Map"> |
| | | select SUM(t.receivable_amount) allReceivableAmount,SUM(t.received_amount) allReceivedAmount |
| | | from pay_fee_detail t |
| | | INNER JOIN pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | inner join pay_fee_config pfc on pf.config_id = pfc.config_id and pfc.status_cd = '0' |
| | | left JOIN pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | left join pay_fee_config pfc on pf.config_id = pfc.config_id and pfc.status_cd = '0' |
| | | left join building_room br on pf.payer_obj_id = br.room_id and pf.payer_obj_type = '3333' and br.status_cd = '0' |
| | | left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | left join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0' |
| | |
| | | ruleName,pfdd.discount_price, |
| | | SUM(pfdd.discount_price) discountPrice |
| | | from pay_fee_detail t |
| | | INNER JOIN pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | inner join pay_fee_config pfc on pf.config_id = pfc.config_id and pfc.status_cd = '0' |
| | | left JOIN pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | left join pay_fee_config pfc on pf.config_id = pfc.config_id and pfc.status_cd = '0' |
| | | left join building_room br on pf.payer_obj_id = br.room_id and pf.payer_obj_type = '3333' and br.status_cd = '0' |
| | | left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | left join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0' |
| | |
| | | |
| | | <select id="queryRepairForStaff" parameterType="Map" resultType="Map"> |
| | | SELECT r.staff_id staffId,r.staff_name staffName,r.state FROM r_repair_user r |
| | | inner join u_user u on u.user_id = r.staff_id and u.status_cd = '0' |
| | | WHERE r.state!='10005' AND r.state!='10009' AND r.state!='11000' AND |
| | | r.state!='12000' AND r.state != '10007' AND r.status_cd = '0' AND |
| | | r.repair_event != 'payUser' AND r.repair_event != 'startUser' AND r.staff_id != '-1' |
| | |
| | | select 1 from pay_fee pf where t.room_id = pf.payer_obj_id and pf.status_cd = '0' and pf.state = '2008001' |
| | | ) |
| | | and t.community_id = #{communityId} |
| | | order by t.create_time desc |
| | | order by bo.name |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | |
| | | and t.create_time < #{endTime} |
| | | and t.fee_id = #{feeId} |
| | | <if test="flag == 1"> |
| | | and concat(t.detail_year,t.detail_month) = #{yearMonth} |
| | | and concat(t.detail_year,lpad(t.detail_month,2,0)) = #{yearMonth} |
| | | </if> |
| | | <if test="flag == 2"> |
| | | and concat(t.detail_year,t.detail_month) < #{yearMonth} |
| | | and concat(t.detail_year,lpad(t.detail_month,2,0)) < #{yearMonth} |
| | | </if> |
| | | <if test="flag == 3"> |
| | | and concat(t.detail_year,t.detail_month) > #{yearMonth} |
| | | and concat(t.detail_year,lpad(t.detail_month,2,0)) > #{yearMonth} |
| | | </if> |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 查询费用月统计信息 add by wuxw 2018-07-03 --> |
| | | <select id="queryRoomAndParkingSpace" parameterType="Map" resultType="Map"> |
| | | select |
| | | br.room_id roomId,br.room_num roomNum,bu.unit_num unitNum,f.floor_num floorNum,t.owner_id ownerId |
| | | from building_owner_room_rel t |
| | | left join building_room br on t.room_id = br.room_id and br.status_cd = '0' |
| | | left join building_unit bu on br.unit_id = bu.unit_id and bu.status_cd = '0' |
| | | left join f_floor f on bu.floor_id = f.floor_id and f.status_cd = '0' |
| | | where t.status_cd = '0' |
| | | and t.owner_id in |
| | | <foreach collection="ownerIds" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </select> |
| | | |
| | | |
| | | |
| | | </mapper> |