FeeReceiptDetailServiceDaoImplMapper.xml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="feeReceiptDetailServiceDaoImpl">
  6. <!-- 保存收据明细信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveFeeReceiptDetailInfo" parameterType="Map">
  8. insert into fee_receipt_detail(
  9. area,amount,fee_name,detail_id,start_time,end_time,community_id,receipt_id,fee_id,cycle,square_price
  10. ) values (
  11. #{area},#{amount},#{feeName},#{detailId},#{startTime},#{endTime},#{communityId},#{receiptId},#{feeId},#{cycle},#{squarePrice}
  12. )
  13. </insert>
  14. <!-- 查询收据明细信息 add by wuxw 2018-07-03 -->
  15. <select id="getFeeReceiptDetailInfo" parameterType="Map" resultType="Map">
  16. select t.area,t.amount,t.fee_name,t.fee_name feeName,t.detail_id,t.detail_id detailId,t.start_time,t.start_time
  17. startTime,t.status_cd,t.status_cd statusCd,t.end_time,t.end_time endTime,t.community_id,t.community_id
  18. communityId,t.receipt_id,t.receipt_id receiptId,t.fee_id,t.fee_id feeId,t.cycle,t.square_price squarePrice
  19. from fee_receipt_detail t
  20. where 1 =1
  21. <if test="area !=null and area != ''">
  22. and t.area= #{area}
  23. </if>
  24. <if test="amount !=null and amount != ''">
  25. and t.amount= #{amount}
  26. </if>
  27. <if test="feeName !=null and feeName != ''">
  28. and t.fee_name= #{feeName}
  29. </if>
  30. <if test="detailId !=null and detailId != ''">
  31. and t.detail_id= #{detailId}
  32. </if>
  33. <if test="startTime !=null and startTime != ''">
  34. and t.start_time= #{startTime}
  35. </if>
  36. <if test="statusCd !=null and statusCd != ''">
  37. and t.status_cd= #{statusCd}
  38. </if>
  39. <if test="endTime !=null and endTime != ''">
  40. and t.end_time= #{endTime}
  41. </if>
  42. <if test="communityId !=null and communityId != ''">
  43. and t.community_id= #{communityId}
  44. </if>
  45. <if test="receiptId !=null and receiptId != ''">
  46. and t.receipt_id= #{receiptId}
  47. </if>
  48. <if test="feeId !=null and feeId != ''">
  49. and t.fee_id= #{feeId}
  50. </if>
  51. <if test="cycle !=null and cycle != ''">
  52. and t.cycle= #{cycle}
  53. </if>
  54. order by t.create_time desc
  55. <if test="page != -1 and page != null ">
  56. limit #{page}, #{row}
  57. </if>
  58. </select>
  59. <!-- 修改收据明细信息 add by wuxw 2018-07-03 -->
  60. <update id="updateFeeReceiptDetailInfo" parameterType="Map">
  61. update fee_receipt_detail t set t.status_cd = #{statusCd}
  62. <if test="newBId != null and newBId != ''">
  63. ,t.b_id = #{newBId}
  64. </if>
  65. <if test="area !=null and area != ''">
  66. , t.area= #{area}
  67. </if>
  68. <if test="amount !=null and amount != ''">
  69. , t.amount= #{amount}
  70. </if>
  71. <if test="feeName !=null and feeName != ''">
  72. , t.fee_name= #{feeName}
  73. </if>
  74. <if test="detailId !=null and detailId != ''">
  75. , t.detail_id= #{detailId}
  76. </if>
  77. <if test="startTime !=null and startTime != ''">
  78. , t.start_time= #{startTime}
  79. </if>
  80. <if test="endTime !=null and endTime != ''">
  81. , t.end_time= #{endTime}
  82. </if>
  83. <if test="communityId !=null and communityId != ''">
  84. , t.community_id= #{communityId}
  85. </if>
  86. <if test="feeId !=null and feeId != ''">
  87. , t.fee_id= #{feeId}
  88. </if>
  89. <if test="cycle !=null and cycle != ''">
  90. , t.cycle= #{cycle}
  91. </if>
  92. where 1=1
  93. <if test="receiptId !=null and receiptId != ''">
  94. and t.receipt_id= #{receiptId}
  95. </if>
  96. </update>
  97. <!-- 查询收据明细数量 add by wuxw 2018-07-03 -->
  98. <select id="queryFeeReceiptDetailsCount" parameterType="Map" resultType="Map">
  99. select count(1) count
  100. from fee_receipt_detail t
  101. where 1 =1
  102. <if test="area !=null and area != ''">
  103. and t.area= #{area}
  104. </if>
  105. <if test="amount !=null and amount != ''">
  106. and t.amount= #{amount}
  107. </if>
  108. <if test="feeName !=null and feeName != ''">
  109. and t.fee_name= #{feeName}
  110. </if>
  111. <if test="detailId !=null and detailId != ''">
  112. and t.detail_id= #{detailId}
  113. </if>
  114. <if test="startTime !=null and startTime != ''">
  115. and t.start_time= #{startTime}
  116. </if>
  117. <if test="statusCd !=null and statusCd != ''">
  118. and t.status_cd= #{statusCd}
  119. </if>
  120. <if test="endTime !=null and endTime != ''">
  121. and t.end_time= #{endTime}
  122. </if>
  123. <if test="communityId !=null and communityId != ''">
  124. and t.community_id= #{communityId}
  125. </if>
  126. <if test="receiptId !=null and receiptId != ''">
  127. and t.receipt_id= #{receiptId}
  128. </if>
  129. <if test="feeId !=null and feeId != ''">
  130. and t.fee_id= #{feeId}
  131. </if>
  132. <if test="cycle !=null and cycle != ''">
  133. and t.cycle= #{cycle}
  134. </if>
  135. </select>
  136. </mapper>