PayFeeRuleBillV1ServiceDaoImplMapper.xml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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="payFeeRuleBillV1ServiceDaoImpl">
  6. <!-- 保存费用账单信息 add by wuxw 2018-07-03 -->
  7. <insert id="savePayFeeRuleBillInfo" parameterType="Map">
  8. insert into pay_fee_rule_bill(
  9. bill_name,config_id,bill_id,cur_year_month,remark,rule_id,community_id,batch_id,fee_id
  10. ) values (
  11. #{billName},#{configId},#{billId},#{curYearMonth},#{remark},#{ruleId},#{communityId},#{batchId},#{feeId}
  12. )
  13. </insert>
  14. <!-- 查询费用账单信息 add by wuxw 2018-07-03 -->
  15. <select id="getPayFeeRuleBillInfo" parameterType="Map" resultType="Map">
  16. select t.bill_name,t.bill_name billName,t.config_id,t.config_id configId,t.bill_id,t.bill_id
  17. billId,t.cur_year_month,t.cur_year_month curYearMonth,t.status_cd,t.status_cd
  18. statusCd,t.remark,t.rule_id,t.rule_id ruleId,t.community_id,t.community_id communityId,t.batch_id,t.batch_id
  19. batchId,t.fee_id,t.fee_id feeId
  20. from pay_fee_rule_bill t
  21. where 1 =1
  22. <if test="billName !=null and billName != ''">
  23. and t.bill_name= #{billName}
  24. </if>
  25. <if test="configId !=null and configId != ''">
  26. and t.config_id= #{configId}
  27. </if>
  28. <if test="billId !=null and billId != ''">
  29. and t.bill_id= #{billId}
  30. </if>
  31. <if test="curYearMonth !=null and curYearMonth != ''">
  32. and t.cur_year_month= #{curYearMonth}
  33. </if>
  34. <if test="statusCd !=null and statusCd != ''">
  35. and t.status_cd= #{statusCd}
  36. </if>
  37. <if test="remark !=null and remark != ''">
  38. and t.remark= #{remark}
  39. </if>
  40. <if test="ruleId !=null and ruleId != ''">
  41. and t.rule_id= #{ruleId}
  42. </if>
  43. <if test="communityId !=null and communityId != ''">
  44. and t.community_id= #{communityId}
  45. </if>
  46. <if test="batchId !=null and batchId != ''">
  47. and t.batch_id= #{batchId}
  48. </if>
  49. <if test="feeId !=null and feeId != ''">
  50. and t.fee_id= #{feeId}
  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="updatePayFeeRuleBillInfo" parameterType="Map">
  59. update pay_fee_rule_bill t set t.status_cd = #{statusCd}
  60. <if test="newBId != null and newBId != ''">
  61. ,t.b_id = #{newBId}
  62. </if>
  63. <if test="billName !=null and billName != ''">
  64. , t.bill_name= #{billName}
  65. </if>
  66. <if test="configId !=null and configId != ''">
  67. , t.config_id= #{configId}
  68. </if>
  69. <if test="curYearMonth !=null and curYearMonth != ''">
  70. , t.cur_year_month= #{curYearMonth}
  71. </if>
  72. <if test="remark !=null and remark != ''">
  73. , t.remark= #{remark}
  74. </if>
  75. <if test="ruleId !=null and ruleId != ''">
  76. , t.rule_id= #{ruleId}
  77. </if>
  78. <if test="communityId !=null and communityId != ''">
  79. , t.community_id= #{communityId}
  80. </if>
  81. <if test="batchId !=null and batchId != ''">
  82. , t.batch_id= #{batchId}
  83. </if>
  84. <if test="feeId !=null and feeId != ''">
  85. , t.fee_id= #{feeId}
  86. </if>
  87. where 1=1
  88. <if test="billId !=null and billId != ''">
  89. and t.bill_id= #{billId}
  90. </if>
  91. </update>
  92. <!-- 查询费用账单数量 add by wuxw 2018-07-03 -->
  93. <select id="queryPayFeeRuleBillsCount" parameterType="Map" resultType="Map">
  94. select count(1) count
  95. from pay_fee_rule_bill t
  96. where 1 =1
  97. <if test="billName !=null and billName != ''">
  98. and t.bill_name= #{billName}
  99. </if>
  100. <if test="configId !=null and configId != ''">
  101. and t.config_id= #{configId}
  102. </if>
  103. <if test="billId !=null and billId != ''">
  104. and t.bill_id= #{billId}
  105. </if>
  106. <if test="curYearMonth !=null and curYearMonth != ''">
  107. and t.cur_year_month= #{curYearMonth}
  108. </if>
  109. <if test="statusCd !=null and statusCd != ''">
  110. and t.status_cd= #{statusCd}
  111. </if>
  112. <if test="remark !=null and remark != ''">
  113. and t.remark= #{remark}
  114. </if>
  115. <if test="ruleId !=null and ruleId != ''">
  116. and t.rule_id= #{ruleId}
  117. </if>
  118. <if test="communityId !=null and communityId != ''">
  119. and t.community_id= #{communityId}
  120. </if>
  121. <if test="batchId !=null and batchId != ''">
  122. and t.batch_id= #{batchId}
  123. </if>
  124. <if test="feeId !=null and feeId != ''">
  125. and t.fee_id= #{feeId}
  126. </if>
  127. </select>
  128. </mapper>