ThirdPartInfoMapper.xml 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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="com.boman.web.core.mapper.ThirdPartInfoMapper">
  6. <resultMap type="com.boman.domain.ThirdPartInfo" id="ThirdPartInfoResult">
  7. <result property="id" column="id" />
  8. <result property="cremationCertificate" column="cremation_certificate" />
  9. <result property="cremationTime" column="cremation_time" />
  10. <result property="userName" column="user_name" />
  11. <result property="idCard" column="id_card" />
  12. <result property="age" column="age" />
  13. <result property="gender" column="gender" />
  14. <result property="nation" column="nation" />
  15. <result property="township" column="township" />
  16. <result property="villageGroup" column="village_group" />
  17. <result property="homePhone" column="home_phone" />
  18. <result property="isDeposit" column="is_deposit" />
  19. <result property="isColdStorage" column="is_cold_storage" />
  20. <result property="causeOfDeath" column="cause_of_death" />
  21. <result property="isHmbz" column="is_hmbz" />
  22. <result property="sjgm" column="sjgm" />
  23. <result property="jzdx" column="jzdx" />
  24. <result property="remarks" column="remarks" />
  25. <result property="isLocalAccount" column="is_local_account" />
  26. <result property="status" column="status" />
  27. <result property="createBy" column="create_by" />
  28. <result property="createTime" column="create_time" />
  29. <result property="updateBy" column="update_by" />
  30. <result property="updateTime" column="update_time" />
  31. <result property="isDel" column="is_del" />
  32. <result property="provinceId" column="province_id"/>
  33. <result property="province" column="province"/>
  34. <result property="cityId" column="city_id"/>
  35. <result property="city" column="city"/>
  36. <result property="regionId" column="region_id"/>
  37. <result property="region" column="region"/>
  38. <result property="villageTownsId" column="village_towns_id"/>
  39. <result property="villageTowns" column="village_towns"/>
  40. <result property="villageId" column="village_id"/>
  41. <result property="village" column="village"/>
  42. <result property="isLocal" column="is_local"/>
  43. <result property="source" column="source"/>
  44. </resultMap>
  45. <insert id="insertThirdPartInfoList" useGeneratedKeys="true" keyProperty="id">
  46. insert into third_part_info(cremation_certificate,
  47. cremation_time,
  48. user_name,
  49. id_card,
  50. age,
  51. gender,
  52. nation,
  53. township,
  54. village_group,
  55. home_phone,
  56. is_deposit,
  57. is_cold_storage,
  58. cause_of_death,
  59. is_hmbz,
  60. sjgm,
  61. jzdx,
  62. remarks,
  63. is_local_account,
  64. status,
  65. create_by,
  66. update_by,
  67. is_del,
  68. province_id,
  69. province,
  70. city_id,
  71. city,
  72. region_id,
  73. region,
  74. village_towns_id,
  75. village_towns,
  76. village_id,
  77. village,
  78. is_local,source,create_time,update_time)
  79. values
  80. <foreach item="thirdPartInfo" index="index" collection="thirdPartInfoList" separator=",">
  81. (#{thirdPartInfo.cremationCertificate},
  82. #{thirdPartInfo.cremationTime},
  83. #{thirdPartInfo.userName},
  84. #{thirdPartInfo.idCard},
  85. #{thirdPartInfo.age},
  86. #{thirdPartInfo.gender},
  87. #{thirdPartInfo.nation},
  88. #{thirdPartInfo.township},
  89. #{thirdPartInfo.villageGroup},
  90. #{thirdPartInfo.homePhone},
  91. #{thirdPartInfo.isDeposit},
  92. #{thirdPartInfo.isColdStorage},
  93. #{thirdPartInfo.causeOfDeath},
  94. #{thirdPartInfo.isHmbz},
  95. #{thirdPartInfo.sjgm},
  96. #{thirdPartInfo.jzdx},
  97. #{thirdPartInfo.remarks},
  98. #{thirdPartInfo.isLocalAccount},
  99. #{thirdPartInfo.status},
  100. #{thirdPartInfo.createBy},
  101. #{thirdPartInfo.updateBy},
  102. #{thirdPartInfo.isDel},
  103. #{thirdPartInfo.provinceId},
  104. #{thirdPartInfo.province},
  105. #{thirdPartInfo.cityId},
  106. #{thirdPartInfo.city},
  107. #{thirdPartInfo.regionId},
  108. #{thirdPartInfo.region},
  109. #{thirdPartInfo.villageTownsId},
  110. #{thirdPartInfo.villageTowns},
  111. #{thirdPartInfo.villageId},
  112. #{thirdPartInfo.village},
  113. #{thirdPartInfo.isLocal},
  114. #{thirdPartInfo.source},
  115. sysdate(),sysdate())
  116. </foreach>
  117. </insert>
  118. <update id="delecteDie" parameterType="java.lang.String">
  119. update third_part_info set is_del='Y' where id_card = #{idCard}
  120. </update>
  121. <select id="queryList" resultMap="ThirdPartInfoResult">
  122. select id, cremation_certificate, cremation_time, user_name, id_card, age, gender, nation, township, village_group,
  123. home_phone, is_deposit, is_cold_storage,cause_of_death,status,
  124. is_hmbz,sjgm,jzdx,remarks,is_local_account,is_local,create_time,source
  125. from third_part_info
  126. <where>
  127. is_del = 'N'
  128. and status = '4'
  129. <if test="userName != null and userName != ''">
  130. and user_name like concat(#{userName}, '%')
  131. </if>
  132. <if test="gender != null and gender != ''">and gender = #{gender}</if>
  133. <if test="age != null ">and age = #{age}</if>
  134. <if test="cremationCertificate != null and cremationCertificate != ''">and cremation_certificate = #{cremationCertificate}</if>
  135. <if test="nation != null and nation != ''">and nation = #{nation}</if>
  136. <if test="idCard != null and idCard != ''">and id_card = #{idCard}</if>
  137. <if test="township != null and township != ''">and township = #{township}</if>
  138. <if test="homePhone != null and homePhone != ''">and home_phone = #{homePhone}</if>
  139. <if test="isDeposit != null and isDeposit != ''">and is_deposit = #{isDeposit}</if>
  140. <if test="isColdStorage != null and isColdStorage != ''">and is_cold_storage = #{isColdStorage}</if>
  141. <if test="causeOfDeath != null and causeOfDeath != ''">and cause_of_death = #{causeOfDeath}</if>
  142. <if test="isHmbz != null and isHmbz != ''">and is_hmbz = #{isHmbz}</if>
  143. <if test="sjgm != null and sjgm != ''">and sjgm = #{sjgm}</if>
  144. <if test="jzdx != null and jzdx != ''">and jzdx = #{jzdx}</if>
  145. <if test="isLocalAccount != null and isLocalAccount != ''">and is_local_account = #{isLocalAccount}</if>
  146. <if test="provinceId != null and provinceId != ''">and province_id = #{provinceId}</if>
  147. <if test="cityId != null and cityId != ''">and city_id = #{cityId}</if>
  148. <if test="regionId != null and regionId != ''">and region_id = #{regionId}</if>
  149. <if test="villageTownsId != null and villageTownsId != ''">and village_towns_id = #{villageTownsId}</if>
  150. <if test="villageId != null and villageId != ''">and village_id = #{villageId}</if>
  151. <if test="isLocal != null and isLocal != ''">and is_local = #{isLocal}</if>
  152. </where>
  153. order by create_time DESC
  154. </select>
  155. </mapper>