BdglAntiepidemicPutoutMapper.xml 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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.supervision.medicalhealth.mapper.BdglAntiepidemicPutoutMapper">
  6. <resultMap type="BdglAntiepidemicPutout" id="BdglAntiepidemicPutoutResult">
  7. <result property="id" column="id" />
  8. <result property="durgArchivesId" column="durg_archives_id" />
  9. <result property="putOut" column="put_out" />
  10. <result property="place" column="place" />
  11. <result property="putTime" column="put_time" />
  12. <result property="peopleId" column="people_id" />
  13. <result property="adminId" column="admin_id" />
  14. <result property="createtime" column="createtime" />
  15. <result property="updatetime" column="updatetime" />
  16. <result property="durgBrand" column="durg_brand" />
  17. <result property="specifications" column="specifications" />
  18. <result property="unitId" column="unit_id" />
  19. <result property="remark" column="remark" />
  20. <result property="unitId1" column="unit_id1" />
  21. <result property="storeHouse" column="store_house" />
  22. <result property="peopleName" column="people_name" />
  23. <result property="unitName" column="unit_name" />
  24. <result property="unitName1" column="unit_name1" />
  25. <result property="durgName" column="durg_name" />
  26. <result property="number" column="number" />
  27. </resultMap>
  28. <sql id="selectBdglAntiepidemicPutoutVo">
  29. select id, durg_archives_id, put_out, place, put_time, people_id, admin_id, createtime, updatetime, durg_brand, specifications, unit_id, remark, unit_id1, store_house, people_name, unit_name, unit_name1,durg_name,number from bdgl_antiepidemic_putout
  30. </sql>
  31. <select id="selectBdglAntiepidemicPutoutList" parameterType="BdglAntiepidemicPutout" resultMap="BdglAntiepidemicPutoutResult">
  32. <include refid="selectBdglAntiepidemicPutoutVo"/>
  33. <where>
  34. <if test="durgArchivesId != null "> and durg_archives_id = #{durgArchivesId}</if>
  35. <if test="putOut != null "> and put_out = #{putOut}</if>
  36. <if test="place != null and place != ''"> and place = #{place}</if>
  37. <if test="putTime != null "> and put_time = #{putTime}</if>
  38. <if test="peopleId != null "> and people_id = #{peopleId}</if>
  39. <if test="adminId != null "> and admin_id = #{adminId}</if>
  40. <if test="createtime != null and createtime != ''"> and createtime = #{createtime}</if>
  41. <if test="updatetime != null and updatetime != ''"> and updatetime = #{updatetime}</if>
  42. <if test="durgBrand != null and durgBrand != ''"> and durg_brand = #{durgBrand}</if>
  43. <if test="specifications != null and specifications != ''"> and specifications = #{specifications}</if>
  44. <if test="unitId != null "> and unit_id = #{unitId}</if>
  45. <if test="unitId1 != null "> and unit_id1 = #{unitId1}</if>
  46. <if test="storeHouse != null "> and store_house = #{storeHouse}</if>
  47. <if test="peopleName != null and peopleName != ''"> and people_name like concat('%', #{peopleName}, '%')</if>
  48. <if test="unitName != null and unitName != ''"> and unit_name like concat('%', #{unitName}, '%')</if>
  49. <if test="unitName1 != null and unitName1 != ''"> and unit_name1 = #{unitName1}</if>
  50. <if test="durgName != null and durgName != ''"> and durg_name = #{durgName}</if>
  51. <if test="number != null and number != ''"> and number = #{number}</if>
  52. </where>
  53. </select>
  54. <select id="selectBdglAntiepidemicPutoutById" parameterType="Long" resultMap="BdglAntiepidemicPutoutResult">
  55. <include refid="selectBdglAntiepidemicPutoutVo"/>
  56. where id = #{id}
  57. </select>
  58. <insert id="insertBdglAntiepidemicPutout" parameterType="BdglAntiepidemicPutout" useGeneratedKeys="true" keyProperty="id">
  59. insert into bdgl_antiepidemic_putout
  60. <trim prefix="(" suffix=")" suffixOverrides=",">
  61. <if test="durgArchivesId != null">durg_archives_id,</if>
  62. <if test="putOut != null">put_out,</if>
  63. <if test="place != null">place,</if>
  64. <if test="putTime != null">put_time,</if>
  65. <if test="peopleId != null">people_id,</if>
  66. <if test="adminId != null">admin_id,</if>
  67. <if test="createtime != null">createtime,</if>
  68. <if test="updatetime != null">updatetime,</if>
  69. <if test="durgBrand != null">durg_brand,</if>
  70. <if test="specifications != null">specifications,</if>
  71. <if test="unitId != null">unit_id,</if>
  72. <if test="remark != null">remark,</if>
  73. <if test="unitId1 != null">unit_id1,</if>
  74. <if test="storeHouse != null">store_house,</if>
  75. <if test="peopleName != null">people_name,</if>
  76. <if test="unitName != null">unit_name,</if>
  77. <if test="unitName1 != null">unit_name1,</if>
  78. <if test="durgName != null">durg_name,</if>
  79. <if test="number != null">number,</if>
  80. </trim>
  81. <trim prefix="values (" suffix=")" suffixOverrides=",">
  82. <if test="durgArchivesId != null">#{durgArchivesId},</if>
  83. <if test="putOut != null">#{putOut},</if>
  84. <if test="place != null">#{place},</if>
  85. <if test="putTime != null">#{putTime},</if>
  86. <if test="peopleId != null">#{peopleId},</if>
  87. <if test="adminId != null">#{adminId},</if>
  88. <if test="createtime != null">#{createtime},</if>
  89. <if test="updatetime != null">#{updatetime},</if>
  90. <if test="durgBrand != null">#{durgBrand},</if>
  91. <if test="specifications != null">#{specifications},</if>
  92. <if test="unitId != null">#{unitId},</if>
  93. <if test="remark != null">#{remark},</if>
  94. <if test="unitId1 != null">#{unitId1},</if>
  95. <if test="storeHouse != null">#{storeHouse},</if>
  96. <if test="peopleName != null">#{peopleName},</if>
  97. <if test="unitName != null">#{unitName},</if>
  98. <if test="unitName1 != null">#{unitName1},</if>
  99. <if test="durgName != null">#{durgName},</if>
  100. <if test="number != null">#{number},</if>
  101. </trim>
  102. </insert>
  103. <update id="updateBdglAntiepidemicPutout" parameterType="BdglAntiepidemicPutout">
  104. update bdgl_antiepidemic_putout
  105. <trim prefix="SET" suffixOverrides=",">
  106. <if test="durgArchivesId != null">durg_archives_id = #{durgArchivesId},</if>
  107. <if test="putOut != null">put_out = #{putOut},</if>
  108. <if test="place != null">place = #{place},</if>
  109. <if test="putTime != null">put_time = #{putTime},</if>
  110. <if test="peopleId != null">people_id = #{peopleId},</if>
  111. <if test="adminId != null">admin_id = #{adminId},</if>
  112. <if test="createtime != null">createtime = #{createtime},</if>
  113. <if test="updatetime != null">updatetime = #{updatetime},</if>
  114. <if test="durgBrand != null">durg_brand = #{durgBrand},</if>
  115. <if test="specifications != null">specifications = #{specifications},</if>
  116. <if test="unitId != null">unit_id = #{unitId},</if>
  117. <if test="remark != null">remark = #{remark},</if>
  118. <if test="unitId1 != null">unit_id1 = #{unitId1},</if>
  119. <if test="storeHouse != null">store_house = #{storeHouse},</if>
  120. <if test="peopleName != null">people_name = #{peopleName},</if>
  121. <if test="unitName != null">unit_name = #{unitName},</if>
  122. <if test="unitName1 != null">unit_name1 = #{unitName1},</if>
  123. <if test="durgName != null">durg_name = #{durgName},</if>
  124. <if test="number != null">number = #{number},</if>
  125. </trim>
  126. where id = #{id}
  127. </update>
  128. <delete id="deleteBdglAntiepidemicPutoutById" parameterType="Long">
  129. delete from bdgl_antiepidemic_putout where id = #{id}
  130. </delete>
  131. <delete id="deleteBdglAntiepidemicPutoutByIds" parameterType="String">
  132. delete from bdgl_antiepidemic_putout where id in
  133. <foreach item="id" collection="array" open="(" separator="," close=")">
  134. #{id}
  135. </foreach>
  136. </delete>
  137. </mapper>