BdglConsumePutinMapper.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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.BdglConsumePutinMapper">
  6. <resultMap type="BdglConsumePutin" id="BdglConsumePutinResult">
  7. <result property="id" column="id" />
  8. <result property="durgArchivesId" column="durg_archives_id" />
  9. <result property="putIn" column="put_in" />
  10. <result property="place" column="place" />
  11. <result property="source" column="source" />
  12. <result property="remarks" column="remarks" />
  13. <result property="overduedate" column="overduedate" />
  14. <result property="putTime" column="put_time" />
  15. <result property="adminId" column="admin_id" />
  16. <result property="createTime" column="create_time" />
  17. <result property="updateTime" column="update_time" />
  18. <result property="number" column="number" />
  19. <result property="surplus" column="surplus" />
  20. <result property="status" column="status" />
  21. <result property="durgBrand" column="durg_brand" />
  22. <result property="manufacturer" column="manufacturer" />
  23. <result property="specifications" column="specifications" />
  24. <result property="productIntroduction" column="product_introduction" />
  25. <result property="storeHouse" column="store_house" />
  26. <result property="unitId" column="unit_id" />
  27. <result property="unitName" column="unit_name" />
  28. <result property="userName" column="user_name" />
  29. <result property="durgName" column="durg_name" />
  30. <result property="expiredstatus" column="expiredstatus" />
  31. <result property="beizhu" column="beizhu" />
  32. </resultMap>
  33. <sql id="selectBdglConsumePutinVo">
  34. select id, durg_archives_id, put_in, place, source, remarks, overduedate, put_time, admin_id, create_time, update_time, number, surplus, status, durg_brand, manufacturer, specifications, product_introduction, store_house, unit_id, unit_name, user_name, durg_name, expiredstatus, beizhu from bdgl_consume_putin
  35. </sql>
  36. <select id="selectBdglConsumePutinList" parameterType="BdglConsumePutin" resultMap="BdglConsumePutinResult">
  37. <include refid="selectBdglConsumePutinVo"/>
  38. <where>
  39. <if test="durgArchivesId != null "> and durg_archives_id = #{durgArchivesId}</if>
  40. <if test="putIn != null "> and put_in = #{putIn}</if>
  41. <if test="place != null and place != ''"> and place = #{place}</if>
  42. <if test="source != null and source != ''"> and source = #{source}</if>
  43. <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
  44. <if test="overduedate != null "> and overduedate = #{overduedate}</if>
  45. <if test="putTime != null "> and put_time = #{putTime}</if>
  46. <if test="adminId != null "> and admin_id = #{adminId}</if>
  47. <if test="number != null and number != ''"> and number = #{number}</if>
  48. <if test="surplus != null "> and surplus = #{surplus}</if>
  49. <if test="status != null and status != ''"> and status = #{status}</if>
  50. <if test="durgBrand != null and durgBrand != ''"> and durg_brand = #{durgBrand}</if>
  51. <if test="manufacturer != null and manufacturer != ''"> and manufacturer = #{manufacturer}</if>
  52. <if test="specifications != null and specifications != ''"> and specifications = #{specifications}</if>
  53. <if test="productIntroduction != null and productIntroduction != ''"> and product_introduction = #{productIntroduction}</if>
  54. <if test="storeHouse != null "> and store_house = #{storeHouse}</if>
  55. <if test="unitId != null "> and unit_id = #{unitId}</if>
  56. <if test="unitName != null and unitName != ''"> and unit_name like concat('%', #{unitName}, '%')</if>
  57. <if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
  58. <if test="durgName != null and durgName != ''"> and durg_name like concat('%', #{durgName}, '%')</if>
  59. <if test="expiredstatus != null and expiredstatus != ''"> and expiredstatus = #{expiredstatus}</if>
  60. <if test="beizhu != null and beizhu != ''"> and beizhu = #{beizhu}</if>
  61. </where>
  62. </select>
  63. <select id="selectBdglConsumePutinById" parameterType="Long" resultMap="BdglConsumePutinResult">
  64. <include refid="selectBdglConsumePutinVo"/>
  65. where id = #{id}
  66. </select>
  67. <select id="selectGuoQiList" resultMap="BdglConsumePutinResult">
  68. <include refid="selectBdglConsumePutinVo"/>
  69. <where>
  70. <if test="durgArchivesId != null "> and durg_archives_id = #{durgArchivesId}</if>
  71. <if test="putIn != null "> and put_in = #{putIn}</if>
  72. <if test="place != null and place != ''"> and place = #{place}</if>
  73. <if test="source != null and source != ''"> and source = #{source}</if>
  74. <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
  75. <if test="overduedate != null "> and <![CDATA[ overduedate <= #{overduedate}]]></if>
  76. <if test="putTime != null "> and put_time = #{putTime}</if>
  77. <if test="adminId != null "> and admin_id = #{adminId}</if>
  78. <if test="number != null and number != ''"> and number = #{number}</if>
  79. <if test="surplus != null "> and surplus = #{surplus}</if>
  80. <if test="status != null and status != ''"> and status = #{status}</if>
  81. <if test="durgBrand != null and durgBrand != ''"> and durg_brand = #{durgBrand}</if>
  82. <if test="manufacturer != null and manufacturer != ''"> and manufacturer = #{manufacturer}</if>
  83. <if test="specifications != null and specifications != ''"> and specifications = #{specifications}</if>
  84. <if test="productIntroduction != null and productIntroduction != ''"> and product_introduction = #{productIntroduction}</if>
  85. <if test="storeHouse != null "> and store_house = #{storeHouse}</if>
  86. <if test="unitId != null "> and unit_id = #{unitId}</if>
  87. <if test="unitName != null and unitName != ''"> and unit_name like concat('%', #{unitName}, '%')</if>
  88. <if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
  89. <if test="durgName != null and durgName != ''"> and durg_name like concat('%', #{durgName}, '%')</if>
  90. <if test="expiredstatus != null and expiredstatus != ''"> and expiredstatus = #{expiredstatus}</if>
  91. <if test="beizhu != null and beizhu != ''"> and beizhu = #{beizhu}</if>
  92. and status='0'
  93. </where>
  94. </select>
  95. <select id="selectweiGuoQiList" resultMap="BdglConsumePutinResult">
  96. <include refid="selectBdglConsumePutinVo"/>
  97. <where>
  98. <if test="durgArchivesId != null "> and durg_archives_id = #{durgArchivesId}</if>
  99. <if test="putIn != null "> and put_in = #{putIn}</if>
  100. <if test="place != null and place != ''"> and place = #{place}</if>
  101. <if test="source != null and source != ''"> and source = #{source}</if>
  102. <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
  103. <if test="overduedate != null "> and <![CDATA[ overduedate > #{overduedate}]]></if>
  104. <if test="putTime != null "> and put_time = #{putTime}</if>
  105. <if test="adminId != null "> and admin_id = #{adminId}</if>
  106. <if test="number != null and number != ''"> and number = #{number}</if>
  107. <if test="surplus != null "> and surplus = #{surplus}</if>
  108. <if test="status != null and status != ''"> and status = #{status}</if>
  109. <if test="durgBrand != null and durgBrand != ''"> and durg_brand = #{durgBrand}</if>
  110. <if test="manufacturer != null and manufacturer != ''"> and manufacturer = #{manufacturer}</if>
  111. <if test="specifications != null and specifications != ''"> and specifications = #{specifications}</if>
  112. <if test="productIntroduction != null and productIntroduction != ''"> and product_introduction = #{productIntroduction}</if>
  113. <if test="storeHouse != null "> and store_house = #{storeHouse}</if>
  114. <if test="unitId != null "> and unit_id = #{unitId}</if>
  115. <if test="unitName != null and unitName != ''"> and unit_name like concat('%', #{unitName}, '%')</if>
  116. <if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
  117. <if test="durgName != null and durgName != ''"> and durg_name like concat('%', #{durgName}, '%')</if>
  118. <if test="expiredstatus != null and expiredstatus != ''"> and expiredstatus = #{expiredstatus}</if>
  119. <if test="beizhu != null and beizhu != ''"> and beizhu = #{beizhu}</if>
  120. and status='0'
  121. </where>
  122. </select>
  123. <insert id="insertBdglConsumePutin" parameterType="BdglConsumePutin" useGeneratedKeys="true" keyProperty="id">
  124. insert into bdgl_consume_putin
  125. <trim prefix="(" suffix=")" suffixOverrides=",">
  126. <if test="durgArchivesId != null">durg_archives_id,</if>
  127. <if test="putIn != null">put_in,</if>
  128. <if test="place != null">place,</if>
  129. <if test="source != null">source,</if>
  130. <if test="remarks != null">remarks,</if>
  131. <if test="overduedate != null">overduedate,</if>
  132. <if test="putTime != null">put_time,</if>
  133. <if test="adminId != null">admin_id,</if>
  134. <if test="createTime != null">create_time,</if>
  135. <if test="updateTime != null">update_time,</if>
  136. <if test="number != null">number,</if>
  137. <if test="surplus != null">surplus,</if>
  138. <if test="status != null">status,</if>
  139. <if test="durgBrand != null">durg_brand,</if>
  140. <if test="manufacturer != null">manufacturer,</if>
  141. <if test="specifications != null">specifications,</if>
  142. <if test="productIntroduction != null">product_introduction,</if>
  143. <if test="storeHouse != null">store_house,</if>
  144. <if test="unitId != null">unit_id,</if>
  145. <if test="unitName != null">unit_name,</if>
  146. <if test="userName != null">user_name,</if>
  147. <if test="durgName != null">durg_name,</if>
  148. <if test="expiredstatus != null">expiredstatus,</if>
  149. <if test="beizhu != null">beizhu,</if>
  150. </trim>
  151. <trim prefix="values (" suffix=")" suffixOverrides=",">
  152. <if test="durgArchivesId != null">#{durgArchivesId},</if>
  153. <if test="putIn != null">#{putIn},</if>
  154. <if test="place != null">#{place},</if>
  155. <if test="source != null">#{source},</if>
  156. <if test="remarks != null">#{remarks},</if>
  157. <if test="overduedate != null">#{overduedate},</if>
  158. <if test="putTime != null">#{putTime},</if>
  159. <if test="adminId != null">#{adminId},</if>
  160. <if test="createTime != null">#{createTime},</if>
  161. <if test="updateTime != null">#{updateTime},</if>
  162. <if test="number != null">#{number},</if>
  163. <if test="surplus != null">#{surplus},</if>
  164. <if test="status != null">#{status},</if>
  165. <if test="durgBrand != null">#{durgBrand},</if>
  166. <if test="manufacturer != null">#{manufacturer},</if>
  167. <if test="specifications != null">#{specifications},</if>
  168. <if test="productIntroduction != null">#{productIntroduction},</if>
  169. <if test="storeHouse != null">#{storeHouse},</if>
  170. <if test="unitId != null">#{unitId},</if>
  171. <if test="unitName != null">#{unitName},</if>
  172. <if test="userName != null">#{userName},</if>
  173. <if test="durgName != null">#{durgName},</if>
  174. <if test="expiredstatus != null">#{expiredstatus},</if>
  175. <if test="beizhu != null">#{beizhu},</if>
  176. </trim>
  177. </insert>
  178. <update id="updateBdglConsumePutin" parameterType="BdglConsumePutin">
  179. update bdgl_consume_putin
  180. <trim prefix="SET" suffixOverrides=",">
  181. <if test="durgArchivesId != null">durg_archives_id = #{durgArchivesId},</if>
  182. <if test="putIn != null">put_in = #{putIn},</if>
  183. <if test="place != null">place = #{place},</if>
  184. <if test="source != null">source = #{source},</if>
  185. <if test="remarks != null">remarks = #{remarks},</if>
  186. <if test="overduedate != null">overduedate = #{overduedate},</if>
  187. <if test="putTime != null">put_time = #{putTime},</if>
  188. <if test="adminId != null">admin_id = #{adminId},</if>
  189. <if test="createTime != null">create_time = #{createTime},</if>
  190. <if test="updateTime != null">update_time = #{updateTime},</if>
  191. <if test="number != null">number = #{number},</if>
  192. <if test="surplus != null">surplus = #{surplus},</if>
  193. <if test="status != null">status = #{status},</if>
  194. <if test="durgBrand != null">durg_brand = #{durgBrand},</if>
  195. <if test="manufacturer != null">manufacturer = #{manufacturer},</if>
  196. <if test="specifications != null">specifications = #{specifications},</if>
  197. <if test="productIntroduction != null">product_introduction = #{productIntroduction},</if>
  198. <if test="storeHouse != null">store_house = #{storeHouse},</if>
  199. <if test="unitId != null">unit_id = #{unitId},</if>
  200. <if test="unitName != null">unit_name = #{unitName},</if>
  201. <if test="userName != null">user_name = #{userName},</if>
  202. <if test="durgName != null">durg_name = #{durgName},</if>
  203. <if test="expiredstatus != null">expiredstatus = #{expiredstatus},</if>
  204. <if test="beizhu != null">beizhu = #{beizhu},</if>
  205. </trim>
  206. where id = #{id}
  207. </update>
  208. <delete id="deleteBdglConsumePutinById" parameterType="Long">
  209. delete from bdgl_consume_putin where id = #{id}
  210. </delete>
  211. <delete id="deleteBdglConsumePutinByIds" parameterType="String">
  212. delete from bdgl_consume_putin where id in
  213. <foreach item="id" collection="array" open="(" separator="," close=")">
  214. #{id}
  215. </foreach>
  216. </delete>
  217. </mapper>