FeeManualCollectionDetailServiceDaoImplMapper.xml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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="feeManualCollectionDetailServiceDaoImpl">
  6. <!-- 保存托收明细信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveFeeManualCollectionDetailInfo" parameterType="Map">
  8. insert into fee_manual_collection_detail(
  9. amount,fee_name,detail_id,start_time,end_time,state,community_id,collection_id,fee_id
  10. ) values (
  11. #{amount},#{feeName},#{detailId},#{startTime},#{endTime},#{state},#{communityId},#{collectionId},#{feeId}
  12. )
  13. </insert>
  14. <!-- 查询托收明细信息 add by wuxw 2018-07-03 -->
  15. <select id="getFeeManualCollectionDetailInfo" parameterType="Map" resultType="Map">
  16. select 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.state,t.community_id,t.community_id
  18. communityId,t.collection_id,t.collection_id collectionId,t.fee_id,t.fee_id feeId,td.name stateName,
  19. pf.config_id configId
  20. from fee_manual_collection_detail t
  21. left join t_dict td on t.state = td.status_cd and td.table_name = 'fee_manual_collection_detail' and td.table_columns = 'state'
  22. left join pay_fee pf on t.fee_id = pf.fee_id and pf.status_cd = '0' and pf.community_id = t.community_id
  23. where 1 =1
  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="state !=null and state != ''">
  43. and t.state= #{state}
  44. </if>
  45. <if test="communityId !=null and communityId != ''">
  46. and t.community_id= #{communityId}
  47. </if>
  48. <if test="collectionId !=null and collectionId != ''">
  49. and t.collection_id= #{collectionId}
  50. </if>
  51. <if test="feeId !=null and feeId != ''">
  52. and t.fee_id= #{feeId}
  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="updateFeeManualCollectionDetailInfo" parameterType="Map">
  61. update fee_manual_collection_detail t set t.status_cd = #{statusCd}
  62. <if test="newBId != null and newBId != ''">
  63. ,t.b_id = #{newBId}
  64. </if>
  65. <if test="amount !=null and amount != ''">
  66. , t.amount= #{amount}
  67. </if>
  68. <if test="feeName !=null and feeName != ''">
  69. , t.fee_name= #{feeName}
  70. </if>
  71. <if test="startTime !=null and startTime != ''">
  72. , t.start_time= #{startTime}
  73. </if>
  74. <if test="endTime !=null and endTime != ''">
  75. , t.end_time= #{endTime}
  76. </if>
  77. <if test="state !=null and state != ''">
  78. , t.state= #{state}
  79. </if>
  80. <if test="communityId !=null and communityId != ''">
  81. , t.community_id= #{communityId}
  82. </if>
  83. <if test="collectionId !=null and collectionId != ''">
  84. , t.collection_id= #{collectionId}
  85. </if>
  86. <if test="feeId !=null and feeId != ''">
  87. , t.fee_id= #{feeId}
  88. </if>
  89. where 1=1
  90. <if test="detailId !=null and detailId != ''">
  91. and t.detail_id= #{detailId}
  92. </if>
  93. <if test="collectionId !=null and collectionId != ''">
  94. and t.collection_id= #{collectionId}
  95. </if>
  96. </update>
  97. <!-- 查询托收明细数量 add by wuxw 2018-07-03 -->
  98. <select id="queryFeeManualCollectionDetailsCount" parameterType="Map" resultType="Map">
  99. select count(1) count
  100. from fee_manual_collection_detail t
  101. where 1 =1
  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="state !=null and state != ''">
  121. and t.state= #{state}
  122. </if>
  123. <if test="communityId !=null and communityId != ''">
  124. and t.community_id= #{communityId}
  125. </if>
  126. <if test="collectionId !=null and collectionId != ''">
  127. and t.collection_id= #{collectionId}
  128. </if>
  129. <if test="feeId !=null and feeId != ''">
  130. and t.fee_id= #{feeId}
  131. </if>
  132. </select>
  133. </mapper>