ReportInfoBackCityServiceDaoImplMapper.xml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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="reportInfoBackCityServiceDaoImpl">
  6. <!-- 保存返省上报信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveReportInfoBackCityInfo" parameterType="Map">
  8. insert into report_info_back_city(
  9. back_id,id_card,name,tel,remark,source,community_id,source_city_name,user_id,source_city,back_time
  10. ) values (
  11. #{backId},#{idCard},#{name},#{tel},#{remark},#{source},#{communityId},#{sourceCityName},#{userId},#{sourceCity},#{backTime}
  12. )
  13. </insert>
  14. <!-- 查询返省上报信息 add by wuxw 2018-07-03 -->
  15. <select id="getReportInfoBackCityInfo" parameterType="Map" resultType="Map">
  16. select t.back_id,t.back_id backId,t.id_card,t.id_card idCard,t.name,t.tel,t.remark,t.status_cd,t.status_cd statusCd,t.source,t.community_id,t.community_id communityId,t.source_city_name,t.source_city_name sourceCityName,t.user_id,t.user_id userId,t.source_city,t.source_city sourceCity,t.back_time,t.back_time backTime
  17. from report_info_back_city t
  18. where 1 =1
  19. <if test="backId !=null and backId != ''">
  20. and t.back_id= #{backId}
  21. </if>
  22. <if test="idCard !=null and idCard != ''">
  23. and t.id_card= #{idCard}
  24. </if>
  25. <if test="name !=null and name != ''">
  26. and t.name= #{name}
  27. </if>
  28. <if test="tel !=null and tel != ''">
  29. and t.tel= #{tel}
  30. </if>
  31. <if test="remark !=null and remark != ''">
  32. and t.remark= #{remark}
  33. </if>
  34. <if test="statusCd !=null and statusCd != ''">
  35. and t.status_cd= #{statusCd}
  36. </if>
  37. <if test="source !=null and source != ''">
  38. and t.source= #{source}
  39. </if>
  40. <if test="communityId !=null and communityId != ''">
  41. and t.community_id= #{communityId}
  42. </if>
  43. <if test="sourceCityName !=null and sourceCityName != ''">
  44. and t.source_city_name= #{sourceCityName}
  45. </if>
  46. <if test="userId !=null and userId != ''">
  47. and t.user_id= #{userId}
  48. </if>
  49. <if test="sourceCity !=null and sourceCity != ''">
  50. and t.source_city= #{sourceCity}
  51. </if>
  52. <if test="backTime !=null and backTime != ''">
  53. and t.back_time= #{backTime}
  54. </if>
  55. order by t.create_time desc
  56. <if test="page != -1 and page != null ">
  57. limit #{page}, #{row}
  58. </if>
  59. </select>
  60. <!-- 修改返省上报信息 add by wuxw 2018-07-03 -->
  61. <update id="updateReportInfoBackCityInfo" parameterType="Map">
  62. update report_info_back_city t set t.status_cd = #{statusCd}
  63. <if test="newBId != null and newBId != ''">
  64. ,t.b_id = #{newBId}
  65. </if>
  66. <if test="idCard !=null and idCard != ''">
  67. , t.id_card= #{idCard}
  68. </if>
  69. <if test="name !=null and name != ''">
  70. , t.name= #{name}
  71. </if>
  72. <if test="tel !=null and tel != ''">
  73. , t.tel= #{tel}
  74. </if>
  75. <if test="remark !=null and remark != ''">
  76. , t.remark= #{remark}
  77. </if>
  78. <if test="source !=null and source != ''">
  79. , t.source= #{source}
  80. </if>
  81. <if test="communityId !=null and communityId != ''">
  82. , t.community_id= #{communityId}
  83. </if>
  84. <if test="sourceCityName !=null and sourceCityName != ''">
  85. , t.source_city_name= #{sourceCityName}
  86. </if>
  87. <if test="userId !=null and userId != ''">
  88. , t.user_id= #{userId}
  89. </if>
  90. <if test="sourceCity !=null and sourceCity != ''">
  91. , t.source_city= #{sourceCity}
  92. </if>
  93. <if test="backTime !=null and backTime != ''">
  94. , t.back_time= #{backTime}
  95. </if>
  96. where 1=1 <if test="backId !=null and backId != ''">
  97. and t.back_id= #{backId}
  98. </if>
  99. </update>
  100. <!-- 查询返省上报数量 add by wuxw 2018-07-03 -->
  101. <select id="queryReportInfoBackCitysCount" parameterType="Map" resultType="Map">
  102. select count(1) count
  103. from report_info_back_city t
  104. where 1 =1
  105. <if test="backId !=null and backId != ''">
  106. and t.back_id= #{backId}
  107. </if>
  108. <if test="idCard !=null and idCard != ''">
  109. and t.id_card= #{idCard}
  110. </if>
  111. <if test="name !=null and name != ''">
  112. and t.name= #{name}
  113. </if>
  114. <if test="tel !=null and tel != ''">
  115. and t.tel= #{tel}
  116. </if>
  117. <if test="remark !=null and remark != ''">
  118. and t.remark= #{remark}
  119. </if>
  120. <if test="statusCd !=null and statusCd != ''">
  121. and t.status_cd= #{statusCd}
  122. </if>
  123. <if test="source !=null and source != ''">
  124. and t.source= #{source}
  125. </if>
  126. <if test="communityId !=null and communityId != ''">
  127. and t.community_id= #{communityId}
  128. </if>
  129. <if test="sourceCityName !=null and sourceCityName != ''">
  130. and t.source_city_name= #{sourceCityName}
  131. </if>
  132. <if test="userId !=null and userId != ''">
  133. and t.user_id= #{userId}
  134. </if>
  135. <if test="sourceCity !=null and sourceCity != ''">
  136. and t.source_city= #{sourceCity}
  137. </if>
  138. <if test="backTime !=null and backTime != ''">
  139. and t.back_time= #{backTime}
  140. </if>
  141. </select>
  142. </mapper>