old mode 100644
new mode 100755
| | |
| | | <!-- 保存收据信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveFeeReceiptInfo" parameterType="Map"> |
| | | insert into fee_receipt( |
| | | amount,obj_id,remark,obj_name,community_id,receipt_id,obj_type |
| | | amount,obj_id,remark,obj_name,community_id,receipt_id,obj_type,pay_obj_id,pay_obj_name |
| | | ) values ( |
| | | #{amount},#{objId},#{remark},#{objName},#{communityId},#{receiptId},#{objType} |
| | | #{amount},#{objId},#{remark},#{objName},#{communityId},#{receiptId},#{objType},#{payObjId},#{payObjName} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 批量插入费用 --> |
| | | <insert id="saveFeeReceipts" parameterType="Map"> |
| | | insert into fee_receipt( |
| | | amount,obj_id,remark,obj_name,community_id,receipt_id,obj_type,pay_obj_id,pay_obj_name |
| | | ) values |
| | | <foreach collection="feeReceiptPos" item="item" separator=","> |
| | | (#{item.amount},#{item.objId},#{item.remark},#{item.objName},#{item.communityId},#{item.receiptId},#{item.objType},#{item.payObjId},#{item.payObjName}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | |
| | |
| | | <select id="getFeeReceiptInfo" parameterType="Map" resultType="Map"> |
| | | select t.amount,t.obj_id,t.obj_id objId,t.remark,t.status_cd,t.status_cd statusCd,t.obj_name,t.obj_name |
| | | objName,t.community_id,t.community_id communityId,t.receipt_id,t.receipt_id receiptId,t.obj_type,t.obj_type |
| | | objType,t.create_time createTime |
| | | objType,t.create_time createTime,frd.fee_name feeName,t.pay_obj_id payObjId,t.pay_obj_name payObjName,pf.fee_type_cd feeTypeCd |
| | | from fee_receipt t |
| | | inner join fee_receipt_detail frd on t.receipt_id = frd.receipt_id and frd.status_cd = '0' |
| | | inner join pay_fee pf on frd.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | where 1 =1 |
| | | <if test="amount !=null and amount != ''"> |
| | | and t.amount= #{amount} |
| | | </if> |
| | | <if test="objId !=null and objId != ''"> |
| | | and t.obj_id= #{objId} |
| | | </if> |
| | | <if test="payObjId !=null and payObjId != ''"> |
| | | and t.pay_obj_id= #{payObjId} |
| | | </if> |
| | | <if test="payObjName !=null and payObjName != ''"> |
| | | and t.pay_obj_name= #{payObjName} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | |
| | | <if test="receiptId !=null and receiptId != ''"> |
| | | and t.receipt_id= #{receiptId} |
| | | </if> |
| | | <if test="receiptIds !=null"> |
| | | and t.receipt_id in |
| | | <foreach collection="receiptIds" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="objType !=null and objType != ''"> |
| | | and t.obj_type= #{objType} |
| | | </if> |
| | | <if test="qstartTime !=null and qstartTime != ''"> |
| | | and t.create_time >= #{qstartTime} |
| | | </if> |
| | | <if test="qendTime !=null and qendTime != ''"> |
| | | and t.create_time <= #{qendTime} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | |
| | | <if test="communityId !=null and communityId != ''"> |
| | | and t.community_id= #{communityId} |
| | | </if> |
| | | |
| | | UNION ALL |
| | | |
| | | SELECT |
| | | CONCAT( f.floor_num, '栋', bu.unit_num, '单元', b.room_num, '室' ) AS objName, |
| | | oc.car_num AS carNum, |
| | |
| | | FROM |
| | | fee_receipt t |
| | | LEFT JOIN fee_receipt_detail tt ON t.receipt_id = tt.receipt_id |
| | | LEFT JOIN owner_car oc ON oc.car_id = t.obj_id |
| | | LEFT JOIN owner_car oc ON oc.car_id = t.obj_id and oc.car_type_cd='1001' |
| | | LEFT JOIN building_owner bo ON bo.member_id = oc.owner_id |
| | | LEFT JOIN building_owner_room_rel borr ON bo.owner_id = borr.owner_id |
| | | LEFT JOIN building_room b ON borr.room_id = b.room_id |
| | |
| | | <if test="receiptId !=null and receiptId != ''"> |
| | | and t.receipt_id= #{receiptId} |
| | | </if> |
| | | |
| | | <if test="objType !=null and objType != ''"> |
| | | and t.obj_type= #{objType} |
| | | </if> |
| | |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | |
| | | <if test="receiptId !=null and receiptId != ''"> |
| | | and t.receipt_id= #{receiptId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询收据数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryFeeReceiptsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from fee_receipt t |
| | | inner join fee_receipt_detail frd on t.receipt_id = frd.receipt_id and frd.status_cd = '0' |
| | | inner join pay_fee pf on frd.fee_id = pf.fee_id and pf.status_cd = '0' |
| | | where 1 =1 |
| | | <if test="amount !=null and amount != ''"> |
| | | and t.amount= #{amount} |
| | | </if> |
| | | <if test="objId !=null and objId != ''"> |
| | | and t.obj_id= #{objId} |
| | | </if> |
| | | <if test="payObjId !=null and payObjId != ''"> |
| | | and t.pay_obj_id= #{payObjId} |
| | | </if> |
| | | <if test="payObjName !=null and payObjName != ''"> |
| | | and t.pay_obj_name= #{payObjName} |
| | | </if> |
| | | <if test="remark !=null and remark != ''"> |
| | | and t.remark= #{remark} |
| | |
| | | <if test="objType !=null and objType != ''"> |
| | | and t.obj_type= #{objType} |
| | | </if> |
| | | |
| | | |
| | | <if test="qstartTime !=null and qstartTime != ''"> |
| | | and t.create_time >= #{qstartTime} |
| | | </if> |
| | | <if test="qendTime !=null and qendTime != ''"> |
| | | and t.create_time <= #{qendTime} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |