FeeReceiptDetailServiceDaoImplMapper.xml 4.2 KB

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