InpBloodMapper.xml 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="com.xinxin.topro.inpnurseservice.mysqlmapper.InpBloodMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpBlood" >
  5. <id column="ID_ID" property="idId" jdbcType="INTEGER" />
  6. <result column="IB_Pack_No" property="ibPackNo" jdbcType="VARCHAR" />
  7. <result column="IB_Blood_Name" property="ibBloodName" jdbcType="VARCHAR" />
  8. <result column="IB_Dosage" property="ibDosage" jdbcType="DOUBLE" />
  9. <result column="IB_Unit" property="ibUnit" jdbcType="VARCHAR" />
  10. <result column="IB_Pack_Blood_Type" property="ibPackBloodType" jdbcType="VARCHAR" />
  11. <result column="IB_PatientNo" property="ibPatientno" jdbcType="VARCHAR" />
  12. <result column="IB_Grant_Time" property="ibGrantTime" jdbcType="TIMESTAMP" />
  13. <result column="IB_Patient_Blood_Type" property="ibPatientBloodType" jdbcType="VARCHAR" />
  14. <result column="IB_Rh_Type" property="ibRhType" jdbcType="VARCHAR" />
  15. <result column="IB_Blood_Type_Code" property="ibBloodTypeCode" jdbcType="VARCHAR" />
  16. <result column="IB_Aead_Time" property="ibAeadTime" jdbcType="TIMESTAMP" />
  17. <result column="IB_Bcode" property="ibBcode" jdbcType="VARCHAR" />
  18. <result column="IB_OrderNo" property="ibOrderno" jdbcType="VARCHAR" />
  19. <result column="IB_Real_Trans_Num" property="ibRealTransNum" jdbcType="DOUBLE" />
  20. <result column="IB_Doctor" property="ibDoctor" jdbcType="VARCHAR" />
  21. <result column="IB_DepDm" property="ibDepdm" jdbcType="VARCHAR" />
  22. <result column="IB_WardDm" property="ibWarddm" jdbcType="VARCHAR" />
  23. </resultMap>
  24. <sql id="Base_Column_List" >
  25. ID_ID, IB_Pack_No, IB_Blood_Name, IB_Dosage, IB_Unit, IB_Pack_Blood_Type, IB_PatientNo,
  26. IB_Grant_Time, IB_Patient_Blood_Type, IB_Rh_Type, IB_Blood_Type_Code, IB_Aead_Time,
  27. IB_Bcode, IB_OrderNo, IB_Real_Trans_Num, IB_Doctor, IB_DepDm, IB_WardDm
  28. </sql>
  29. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  30. select
  31. <include refid="Base_Column_List" />
  32. from inp_blood
  33. where ID_ID = #{idId,jdbcType=INTEGER}
  34. </select>
  35. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  36. delete from inp_blood
  37. where ID_ID = #{idId,jdbcType=INTEGER}
  38. </delete>
  39. <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpBlood" >
  40. insert into inp_blood (ID_ID, IB_Pack_No, IB_Blood_Name,
  41. IB_Dosage, IB_Unit, IB_Pack_Blood_Type,
  42. IB_PatientNo, IB_Grant_Time, IB_Patient_Blood_Type,
  43. IB_Rh_Type, IB_Blood_Type_Code, IB_Aead_Time,
  44. IB_Bcode, IB_OrderNo, IB_Real_Trans_Num,
  45. IB_Doctor, IB_DepDm, IB_WardDm
  46. )
  47. values (#{idId,jdbcType=INTEGER}, #{ibPackNo,jdbcType=VARCHAR}, #{ibBloodName,jdbcType=VARCHAR},
  48. #{ibDosage,jdbcType=DOUBLE}, #{ibUnit,jdbcType=VARCHAR}, #{ibPackBloodType,jdbcType=VARCHAR},
  49. #{ibPatientno,jdbcType=VARCHAR}, #{ibGrantTime,jdbcType=TIMESTAMP}, #{ibPatientBloodType,jdbcType=VARCHAR},
  50. #{ibRhType,jdbcType=VARCHAR}, #{ibBloodTypeCode,jdbcType=VARCHAR}, #{ibAeadTime,jdbcType=TIMESTAMP},
  51. #{ibBcode,jdbcType=VARCHAR}, #{ibOrderno,jdbcType=VARCHAR}, #{ibRealTransNum,jdbcType=DOUBLE},
  52. #{ibDoctor,jdbcType=VARCHAR}, #{ibDepdm,jdbcType=VARCHAR}, #{ibWarddm,jdbcType=VARCHAR}
  53. )
  54. </insert>
  55. <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpBlood" >
  56. insert into inp_blood
  57. <trim prefix="(" suffix=")" suffixOverrides="," >
  58. <if test="idId != null" >
  59. ID_ID,
  60. </if>
  61. <if test="ibPackNo != null" >
  62. IB_Pack_No,
  63. </if>
  64. <if test="ibBloodName != null" >
  65. IB_Blood_Name,
  66. </if>
  67. <if test="ibDosage != null" >
  68. IB_Dosage,
  69. </if>
  70. <if test="ibUnit != null" >
  71. IB_Unit,
  72. </if>
  73. <if test="ibPackBloodType != null" >
  74. IB_Pack_Blood_Type,
  75. </if>
  76. <if test="ibPatientno != null" >
  77. IB_PatientNo,
  78. </if>
  79. <if test="ibGrantTime != null" >
  80. IB_Grant_Time,
  81. </if>
  82. <if test="ibPatientBloodType != null" >
  83. IB_Patient_Blood_Type,
  84. </if>
  85. <if test="ibRhType != null" >
  86. IB_Rh_Type,
  87. </if>
  88. <if test="ibBloodTypeCode != null" >
  89. IB_Blood_Type_Code,
  90. </if>
  91. <if test="ibAeadTime != null" >
  92. IB_Aead_Time,
  93. </if>
  94. <if test="ibBcode != null" >
  95. IB_Bcode,
  96. </if>
  97. <if test="ibOrderno != null" >
  98. IB_OrderNo,
  99. </if>
  100. <if test="ibRealTransNum != null" >
  101. IB_Real_Trans_Num,
  102. </if>
  103. <if test="ibDoctor != null" >
  104. IB_Doctor,
  105. </if>
  106. <if test="ibDepdm != null" >
  107. IB_DepDm,
  108. </if>
  109. <if test="ibWarddm != null" >
  110. IB_WardDm,
  111. </if>
  112. </trim>
  113. <trim prefix="values (" suffix=")" suffixOverrides="," >
  114. <if test="idId != null" >
  115. #{idId,jdbcType=INTEGER},
  116. </if>
  117. <if test="ibPackNo != null" >
  118. #{ibPackNo,jdbcType=VARCHAR},
  119. </if>
  120. <if test="ibBloodName != null" >
  121. #{ibBloodName,jdbcType=VARCHAR},
  122. </if>
  123. <if test="ibDosage != null" >
  124. #{ibDosage,jdbcType=DOUBLE},
  125. </if>
  126. <if test="ibUnit != null" >
  127. #{ibUnit,jdbcType=VARCHAR},
  128. </if>
  129. <if test="ibPackBloodType != null" >
  130. #{ibPackBloodType,jdbcType=VARCHAR},
  131. </if>
  132. <if test="ibPatientno != null" >
  133. #{ibPatientno,jdbcType=VARCHAR},
  134. </if>
  135. <if test="ibGrantTime != null" >
  136. #{ibGrantTime,jdbcType=TIMESTAMP},
  137. </if>
  138. <if test="ibPatientBloodType != null" >
  139. #{ibPatientBloodType,jdbcType=VARCHAR},
  140. </if>
  141. <if test="ibRhType != null" >
  142. #{ibRhType,jdbcType=VARCHAR},
  143. </if>
  144. <if test="ibBloodTypeCode != null" >
  145. #{ibBloodTypeCode,jdbcType=VARCHAR},
  146. </if>
  147. <if test="ibAeadTime != null" >
  148. #{ibAeadTime,jdbcType=TIMESTAMP},
  149. </if>
  150. <if test="ibBcode != null" >
  151. #{ibBcode,jdbcType=VARCHAR},
  152. </if>
  153. <if test="ibOrderno != null" >
  154. #{ibOrderno,jdbcType=VARCHAR},
  155. </if>
  156. <if test="ibRealTransNum != null" >
  157. #{ibRealTransNum,jdbcType=DOUBLE},
  158. </if>
  159. <if test="ibDoctor != null" >
  160. #{ibDoctor,jdbcType=VARCHAR},
  161. </if>
  162. <if test="ibDepdm != null" >
  163. #{ibDepdm,jdbcType=VARCHAR},
  164. </if>
  165. <if test="ibWarddm != null" >
  166. #{ibWarddm,jdbcType=VARCHAR},
  167. </if>
  168. </trim>
  169. </insert>
  170. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpBlood" >
  171. update inp_blood
  172. <set >
  173. <if test="ibPackNo != null" >
  174. IB_Pack_No = #{ibPackNo,jdbcType=VARCHAR},
  175. </if>
  176. <if test="ibBloodName != null" >
  177. IB_Blood_Name = #{ibBloodName,jdbcType=VARCHAR},
  178. </if>
  179. <if test="ibDosage != null" >
  180. IB_Dosage = #{ibDosage,jdbcType=DOUBLE},
  181. </if>
  182. <if test="ibUnit != null" >
  183. IB_Unit = #{ibUnit,jdbcType=VARCHAR},
  184. </if>
  185. <if test="ibPackBloodType != null" >
  186. IB_Pack_Blood_Type = #{ibPackBloodType,jdbcType=VARCHAR},
  187. </if>
  188. <if test="ibPatientno != null" >
  189. IB_PatientNo = #{ibPatientno,jdbcType=VARCHAR},
  190. </if>
  191. <if test="ibGrantTime != null" >
  192. IB_Grant_Time = #{ibGrantTime,jdbcType=TIMESTAMP},
  193. </if>
  194. <if test="ibPatientBloodType != null" >
  195. IB_Patient_Blood_Type = #{ibPatientBloodType,jdbcType=VARCHAR},
  196. </if>
  197. <if test="ibRhType != null" >
  198. IB_Rh_Type = #{ibRhType,jdbcType=VARCHAR},
  199. </if>
  200. <if test="ibBloodTypeCode != null" >
  201. IB_Blood_Type_Code = #{ibBloodTypeCode,jdbcType=VARCHAR},
  202. </if>
  203. <if test="ibAeadTime != null" >
  204. IB_Aead_Time = #{ibAeadTime,jdbcType=TIMESTAMP},
  205. </if>
  206. <if test="ibBcode != null" >
  207. IB_Bcode = #{ibBcode,jdbcType=VARCHAR},
  208. </if>
  209. <if test="ibOrderno != null" >
  210. IB_OrderNo = #{ibOrderno,jdbcType=VARCHAR},
  211. </if>
  212. <if test="ibRealTransNum != null" >
  213. IB_Real_Trans_Num = #{ibRealTransNum,jdbcType=DOUBLE},
  214. </if>
  215. <if test="ibDoctor != null" >
  216. IB_Doctor = #{ibDoctor,jdbcType=VARCHAR},
  217. </if>
  218. <if test="ibDepdm != null" >
  219. IB_DepDm = #{ibDepdm,jdbcType=VARCHAR},
  220. </if>
  221. <if test="ibWarddm != null" >
  222. IB_WardDm = #{ibWarddm,jdbcType=VARCHAR},
  223. </if>
  224. </set>
  225. where ID_ID = #{idId,jdbcType=INTEGER}
  226. </update>
  227. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpBlood" >
  228. update inp_blood
  229. set IB_Pack_No = #{ibPackNo,jdbcType=VARCHAR},
  230. IB_Blood_Name = #{ibBloodName,jdbcType=VARCHAR},
  231. IB_Dosage = #{ibDosage,jdbcType=DOUBLE},
  232. IB_Unit = #{ibUnit,jdbcType=VARCHAR},
  233. IB_Pack_Blood_Type = #{ibPackBloodType,jdbcType=VARCHAR},
  234. IB_PatientNo = #{ibPatientno,jdbcType=VARCHAR},
  235. IB_Grant_Time = #{ibGrantTime,jdbcType=TIMESTAMP},
  236. IB_Patient_Blood_Type = #{ibPatientBloodType,jdbcType=VARCHAR},
  237. IB_Rh_Type = #{ibRhType,jdbcType=VARCHAR},
  238. IB_Blood_Type_Code = #{ibBloodTypeCode,jdbcType=VARCHAR},
  239. IB_Aead_Time = #{ibAeadTime,jdbcType=TIMESTAMP},
  240. IB_Bcode = #{ibBcode,jdbcType=VARCHAR},
  241. IB_OrderNo = #{ibOrderno,jdbcType=VARCHAR},
  242. IB_Real_Trans_Num = #{ibRealTransNum,jdbcType=DOUBLE},
  243. IB_Doctor = #{ibDoctor,jdbcType=VARCHAR},
  244. IB_DepDm = #{ibDepdm,jdbcType=VARCHAR},
  245. IB_WardDm = #{ibWarddm,jdbcType=VARCHAR}
  246. where ID_ID = #{idId,jdbcType=INTEGER}
  247. </update>
  248. <select id="selectByBarCodes" resultMap="BaseResultMap" parameterType="java.util.List" >
  249. select
  250. <include refid="Base_Column_List" />
  251. from inp_blood
  252. where IB_Pack_No in
  253. <foreach collection="barCodes" item="item" index="index" open="(" close=")" separator=",">
  254. #{item,jdbcType=VARCHAR}
  255. </foreach>
  256. </select>
  257. </mapper>