InpMattressMapper.xml 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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.InpMattressMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpMattress" >
  5. <id column="IM_ID" property="imId" jdbcType="INTEGER" />
  6. <result column="PatientNo" property="patientno" jdbcType="VARCHAR" />
  7. <result column="HI_ID" property="hiId" jdbcType="INTEGER" />
  8. <result column="DD_DepDm" property="ddDepdm" jdbcType="VARCHAR" />
  9. <result column="DW_WardDm" property="dwWarddm" jdbcType="VARCHAR" />
  10. <result column="DB_BedNo" property="dbBedno" jdbcType="VARCHAR" />
  11. <result column="IM_Import_id" property="imImportId" jdbcType="VARCHAR" />
  12. <result column="IM_Import_Time" property="imImportTime" jdbcType="TIMESTAMP" />
  13. <result column="IM_Measure_Time" property="imMeasureTime" jdbcType="TIMESTAMP" />
  14. <result column="IM_IsConfirm" property="imIsconfirm" jdbcType="INTEGER" />
  15. <result column="IM_Confirmor" property="imConfirmor" jdbcType="VARCHAR" />
  16. <result column="IM_IsDel" property="imIsdel" jdbcType="INTEGER" />
  17. <result column="IM_Time_Point" property="imTimePoint" jdbcType="VARCHAR" />
  18. <result column="IM_Original" property="imOriginal" jdbcType="VARCHAR" />
  19. <result column="IM_Original_ID" property="imOriginalId" jdbcType="INTEGER" />
  20. <result column="IM_Source" property="imSource" jdbcType="INTEGER" />
  21. </resultMap>
  22. <sql id="Base_Column_List" >
  23. IM_ID, PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, IM_Import_id, IM_Import_Time,
  24. IM_Measure_Time, IM_IsConfirm, IM_Confirmor, IM_IsDel, IM_Time_Point, IM_Original,
  25. IM_Original_ID, IM_Source
  26. </sql>
  27. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  28. select
  29. <include refid="Base_Column_List" />
  30. from inp_mattress
  31. where IM_ID = #{imId,jdbcType=INTEGER}
  32. </select>
  33. <select id="selectTimeAll" resultMap="BaseResultMap">
  34. select
  35. <include refid="Base_Column_List" />
  36. from inp_mattress
  37. where IM_IsDel = 0
  38. <if test="patientNo != null" >
  39. and PatientNo = #{patientNo,jdbcType=VARCHAR}
  40. </if>
  41. <if test="begin != null" >
  42. and IM_Measure_Time <![CDATA[>=]]> #{begin}
  43. </if>
  44. <if test="end != null" >
  45. and IM_Measure_Time <![CDATA[<=]]>#{end}
  46. </if>
  47. </select>
  48. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  49. delete from inp_mattress
  50. where IM_ID = #{imId,jdbcType=INTEGER}
  51. </delete>
  52. <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpMattress" >
  53. insert into inp_mattress
  54. <trim prefix="(" suffix=")" suffixOverrides="," >
  55. <if test="imId != null" >
  56. IM_ID,
  57. </if>
  58. <if test="patientno != null" >
  59. PatientNo,
  60. </if>
  61. <if test="hiId != null" >
  62. HI_ID,
  63. </if>
  64. <if test="ddDepdm != null" >
  65. DD_DepDm,
  66. </if>
  67. <if test="dwWarddm != null" >
  68. DW_WardDm,
  69. </if>
  70. <if test="dbBedno != null" >
  71. DB_BedNo,
  72. </if>
  73. <if test="imImportId != null" >
  74. IM_Import_id,
  75. </if>
  76. <if test="imImportTime != null" >
  77. IM_Import_Time,
  78. </if>
  79. <if test="imMeasureTime != null" >
  80. IM_Measure_Time,
  81. </if>
  82. <if test="imIsconfirm != null" >
  83. IM_IsConfirm,
  84. </if>
  85. <if test="imConfirmor != null" >
  86. IM_Confirmor,
  87. </if>
  88. <if test="imIsdel != null" >
  89. IM_IsDel,
  90. </if>
  91. <if test="imTimePoint != null" >
  92. IM_Time_Point,
  93. </if>
  94. <if test="imOriginal != null" >
  95. IM_Original,
  96. </if>
  97. <if test="imOriginalId != null" >
  98. IM_Original_ID,
  99. </if>
  100. <if test="imSource != null" >
  101. IM_Source,
  102. </if>
  103. </trim>
  104. <trim prefix="values (" suffix=")" suffixOverrides="," >
  105. <if test="imId != null" >
  106. #{imId,jdbcType=INTEGER},
  107. </if>
  108. <if test="patientno != null" >
  109. #{patientno,jdbcType=VARCHAR},
  110. </if>
  111. <if test="hiId != null" >
  112. #{hiId,jdbcType=INTEGER},
  113. </if>
  114. <if test="ddDepdm != null" >
  115. #{ddDepdm,jdbcType=VARCHAR},
  116. </if>
  117. <if test="dwWarddm != null" >
  118. #{dwWarddm,jdbcType=VARCHAR},
  119. </if>
  120. <if test="dbBedno != null" >
  121. #{dbBedno,jdbcType=VARCHAR},
  122. </if>
  123. <if test="imImportId != null" >
  124. #{imImportId,jdbcType=VARCHAR},
  125. </if>
  126. <if test="imImportTime != null" >
  127. #{imImportTime,jdbcType=TIMESTAMP},
  128. </if>
  129. <if test="imMeasureTime != null" >
  130. #{imMeasureTime,jdbcType=TIMESTAMP},
  131. </if>
  132. <if test="imIsconfirm != null" >
  133. #{imIsconfirm,jdbcType=INTEGER},
  134. </if>
  135. <if test="imConfirmor != null" >
  136. #{imConfirmor,jdbcType=VARCHAR},
  137. </if>
  138. <if test="imIsdel != null" >
  139. #{imIsdel,jdbcType=INTEGER},
  140. </if>
  141. <if test="imTimePoint != null" >
  142. #{imTimePoint,jdbcType=VARCHAR},
  143. </if>
  144. <if test="imOriginal != null" >
  145. #{imOriginal,jdbcType=VARCHAR},
  146. </if>
  147. <if test="imOriginalId != null" >
  148. #{imOriginalId,jdbcType=INTEGER},
  149. </if>
  150. <if test="imSource != null" >
  151. #{imSource,jdbcType=INTEGER},
  152. </if>
  153. </trim>
  154. </insert>
  155. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpMattress" >
  156. update inp_mattress
  157. <set >
  158. <if test="patientno != null" >
  159. PatientNo = #{patientno,jdbcType=VARCHAR},
  160. </if>
  161. <if test="hiId != null" >
  162. HI_ID = #{hiId,jdbcType=INTEGER},
  163. </if>
  164. <if test="ddDepdm != null" >
  165. DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
  166. </if>
  167. <if test="dwWarddm != null" >
  168. DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
  169. </if>
  170. <if test="dbBedno != null" >
  171. DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
  172. </if>
  173. <if test="imImportId != null" >
  174. IM_Import_id = #{imImportId,jdbcType=VARCHAR},
  175. </if>
  176. <if test="imImportTime != null" >
  177. IM_Import_Time = #{imImportTime,jdbcType=TIMESTAMP},
  178. </if>
  179. <if test="imMeasureTime != null" >
  180. IM_Measure_Time = #{imMeasureTime,jdbcType=TIMESTAMP},
  181. </if>
  182. <if test="imIsconfirm != null" >
  183. IM_IsConfirm = #{imIsconfirm,jdbcType=INTEGER},
  184. </if>
  185. <if test="imConfirmor != null" >
  186. IM_Confirmor = #{imConfirmor,jdbcType=VARCHAR},
  187. </if>
  188. <if test="imIsdel != null" >
  189. IM_IsDel = #{imIsdel,jdbcType=INTEGER},
  190. </if>
  191. <if test="imTimePoint != null" >
  192. IM_Time_Point = #{imTimePoint,jdbcType=VARCHAR},
  193. </if>
  194. <if test="imOriginal != null" >
  195. IM_Original = #{imOriginal,jdbcType=VARCHAR},
  196. </if>
  197. <if test="imOriginalId != null" >
  198. IM_Original_ID = #{imOriginalId,jdbcType=INTEGER},
  199. </if>
  200. <if test="imSource != null" >
  201. IM_Source = #{imSource,jdbcType=INTEGER},
  202. </if>
  203. </set>
  204. where IM_ID = #{imId,jdbcType=INTEGER}
  205. </update>
  206. </mapper>