InpRemarkMapper.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  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.InpRemarkMapper">
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRemark">
  5. <id column="IRM_ID" jdbcType="INTEGER" property="irmId"/>
  6. <result column="PatientNo" jdbcType="VARCHAR" property="patientno"/>
  7. <result column="HI_ID" jdbcType="INTEGER" property="hiId"/>
  8. <result column="DD_DepDm" jdbcType="VARCHAR" property="ddDepdm"/>
  9. <result column="DW_WardDm" jdbcType="VARCHAR" property="dwWarddm"/>
  10. <result column="DB_BedNo" jdbcType="VARCHAR" property="dbBedno"/>
  11. <result column="IRM_Measure_Time" jdbcType="TIMESTAMP" property="irmMeasureTime"/>
  12. <result column="IRM_Recordor" jdbcType="VARCHAR" property="irmRecordor"/>
  13. <result column="IRM_Record_Time" jdbcType="TIMESTAMP" property="irmRecordTime"/>
  14. <result column="IRM_Operation_Time" jdbcType="TIMESTAMP" property="irmOperationTime"/>
  15. <result column="IRM_Operator" jdbcType="VARCHAR" property="irmOperator"/>
  16. <result column="IRM_IsDel" jdbcType="INTEGER" property="irmIsdel"/>
  17. <result column="IRM_FormerID" jdbcType="INTEGER" property="irmFormerid"/>
  18. <result column="IRM_Record" jdbcType="VARCHAR" property="irmRecord"/>
  19. </resultMap>
  20. <sql id="Base_Column_List">
  21. IRM_ID, PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, IRM_Measure_Time, IRM_Recordor,
  22. IRM_Record_Time, IRM_Operation_Time, IRM_Operator, IRM_IsDel, IRM_FormerID, IRM_Record
  23. </sql>
  24. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  25. select
  26. <include refid="Base_Column_List"/>
  27. from inp_remark
  28. where IRM_ID = #{irmId,jdbcType=INTEGER}
  29. </select>
  30. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  31. delete from inp_remark
  32. where IRM_ID = #{irmId,jdbcType=INTEGER}
  33. </delete>
  34. <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRemark" useGeneratedKeys="true"
  35. keyColumn="IRM_ID" keyProperty="irmId">
  36. insert into inp_remark (IRM_ID, PatientNo, HI_ID,
  37. DD_DepDm, DW_WardDm, DB_BedNo,
  38. IRM_Measure_Time, IRM_Recordor, IRM_Record_Time,
  39. IRM_Operation_Time, IRM_Operator, IRM_IsDel,
  40. IRM_FormerID, IRM_Record)
  41. values (#{irmId,jdbcType=INTEGER}, #{patientno,jdbcType=VARCHAR}, #{hiId,jdbcType=INTEGER},
  42. #{ddDepdm,jdbcType=VARCHAR}, #{dwWarddm,jdbcType=VARCHAR}, #{dbBedno,jdbcType=VARCHAR},
  43. #{irmMeasureTime,jdbcType=TIMESTAMP}, #{irmRecordor,jdbcType=VARCHAR}, #{irmRecordTime,jdbcType=TIMESTAMP},
  44. #{irmOperationTime,jdbcType=TIMESTAMP}, #{irmOperator,jdbcType=VARCHAR}, #{irmIsdel,jdbcType=INTEGER},
  45. #{irmFormerid,jdbcType=INTEGER}, #{irmRecord,jdbcType=VARCHAR})
  46. </insert>
  47. <insert id="batchInsert" parameterType="java.util.List" useGeneratedKeys="true"
  48. keyColumn="IRM_ID" keyProperty="irmId">
  49. insert into inp_remark (IRM_ID, PatientNo, HI_ID,
  50. DD_DepDm, DW_WardDm, DB_BedNo,
  51. IRM_Measure_Time, IRM_Recordor, IRM_Record_Time,
  52. IRM_Operation_Time, IRM_Operator, IRM_IsDel,
  53. IRM_FormerID, IRM_Record)
  54. values
  55. <foreach separator="," item="item" index="index" collection="list">
  56. (#{item.irmId,jdbcType=INTEGER}, #{item.patientno,jdbcType=VARCHAR}, #{item.hiId,jdbcType=INTEGER},
  57. #{item.ddDepdm,jdbcType=VARCHAR}, #{item.dwWarddm,jdbcType=VARCHAR}, #{item.dbBedno,jdbcType=VARCHAR},
  58. #{item.irmMeasureTime,jdbcType=TIMESTAMP}, #{item.irmRecordor,jdbcType=VARCHAR},
  59. #{item.irmRecordTime,jdbcType=TIMESTAMP},
  60. #{item.irmOperationTime,jdbcType=TIMESTAMP}, #{item.irmOperator,jdbcType=VARCHAR},
  61. #{item.irmIsdel,jdbcType=INTEGER},
  62. #{item.irmFormerid,jdbcType=INTEGER}, #{item.irmRecord,jdbcType=VARCHAR})
  63. </foreach>
  64. </insert>
  65. <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRemark" useGeneratedKeys="true" keyColumn="IRM_ID" keyProperty="irmId">
  66. insert into inp_remark
  67. <trim prefix="(" suffix=")" suffixOverrides=",">
  68. <if test="irmId != null">
  69. IRM_ID,
  70. </if>
  71. <if test="patientno != null">
  72. PatientNo,
  73. </if>
  74. <if test="hiId != null">
  75. HI_ID,
  76. </if>
  77. <if test="ddDepdm != null">
  78. DD_DepDm,
  79. </if>
  80. <if test="dwWarddm != null">
  81. DW_WardDm,
  82. </if>
  83. <if test="dbBedno != null">
  84. DB_BedNo,
  85. </if>
  86. <if test="irmMeasureTime != null">
  87. IRM_Measure_Time,
  88. </if>
  89. <if test="irmRecordor != null">
  90. IRM_Recordor,
  91. </if>
  92. <if test="irmRecordTime != null">
  93. IRM_Record_Time,
  94. </if>
  95. <if test="irmOperationTime != null">
  96. IRM_Operation_Time,
  97. </if>
  98. <if test="irmOperator != null">
  99. IRM_Operator,
  100. </if>
  101. <if test="irmIsdel != null">
  102. IRM_IsDel,
  103. </if>
  104. <if test="irmFormerid != null">
  105. IRM_FormerID,
  106. </if>
  107. <if test="irmRecord != null">
  108. IRM_Record,
  109. </if>
  110. </trim>
  111. <trim prefix="values (" suffix=")" suffixOverrides=",">
  112. <if test="irmId != null">
  113. #{irmId,jdbcType=INTEGER},
  114. </if>
  115. <if test="patientno != null">
  116. #{patientno,jdbcType=VARCHAR},
  117. </if>
  118. <if test="hiId != null">
  119. #{hiId,jdbcType=INTEGER},
  120. </if>
  121. <if test="ddDepdm != null">
  122. #{ddDepdm,jdbcType=VARCHAR},
  123. </if>
  124. <if test="dwWarddm != null">
  125. #{dwWarddm,jdbcType=VARCHAR},
  126. </if>
  127. <if test="dbBedno != null">
  128. #{dbBedno,jdbcType=VARCHAR},
  129. </if>
  130. <if test="irmMeasureTime != null">
  131. #{irmMeasureTime,jdbcType=TIMESTAMP},
  132. </if>
  133. <if test="irmRecordor != null">
  134. #{irmRecordor,jdbcType=VARCHAR},
  135. </if>
  136. <if test="irmRecordTime != null">
  137. #{irmRecordTime,jdbcType=TIMESTAMP},
  138. </if>
  139. <if test="irmOperationTime != null">
  140. #{irmOperationTime,jdbcType=TIMESTAMP},
  141. </if>
  142. <if test="irmOperator != null">
  143. #{irmOperator,jdbcType=VARCHAR},
  144. </if>
  145. <if test="irmIsdel != null">
  146. #{irmIsdel,jdbcType=INTEGER},
  147. </if>
  148. <if test="irmFormerid != null">
  149. #{irmFormerid,jdbcType=INTEGER},
  150. </if>
  151. <if test="irmRecord != null">
  152. #{irmRecord,jdbcType=VARCHAR},
  153. </if>
  154. </trim>
  155. </insert>
  156. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRemark">
  157. update inp_remark
  158. <set>
  159. <if test="patientno != null">
  160. PatientNo = #{patientno,jdbcType=VARCHAR},
  161. </if>
  162. <if test="hiId != null">
  163. HI_ID = #{hiId,jdbcType=INTEGER},
  164. </if>
  165. <if test="ddDepdm != null">
  166. DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
  167. </if>
  168. <if test="dwWarddm != null">
  169. DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
  170. </if>
  171. <if test="dbBedno != null">
  172. DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
  173. </if>
  174. <if test="irmMeasureTime != null">
  175. IRM_Measure_Time = #{irmMeasureTime,jdbcType=TIMESTAMP},
  176. </if>
  177. <if test="irmRecordor != null">
  178. IRM_Recordor = #{irmRecordor,jdbcType=VARCHAR},
  179. </if>
  180. <if test="irmRecordTime != null">
  181. IRM_Record_Time = #{irmRecordTime,jdbcType=TIMESTAMP},
  182. </if>
  183. <if test="irmOperationTime != null">
  184. IRM_Operation_Time = #{irmOperationTime,jdbcType=TIMESTAMP},
  185. </if>
  186. <if test="irmOperator != null">
  187. IRM_Operator = #{irmOperator,jdbcType=VARCHAR},
  188. </if>
  189. <if test="irmIsdel != null">
  190. IRM_IsDel = #{irmIsdel,jdbcType=INTEGER},
  191. </if>
  192. <if test="irmFormerid != null">
  193. IRM_FormerID = #{irmFormerid,jdbcType=INTEGER},
  194. </if>
  195. <if test="irmRecord != null">
  196. IRM_Record = #{irmRecord,jdbcType=VARCHAR},
  197. </if>
  198. </set>
  199. where IRM_ID = #{irmId,jdbcType=INTEGER}
  200. </update>
  201. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRemark">
  202. update inp_remark
  203. set PatientNo = #{patientno,jdbcType=VARCHAR},
  204. HI_ID = #{hiId,jdbcType=INTEGER},
  205. DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
  206. DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
  207. DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
  208. IRM_Measure_Time = #{irmMeasureTime,jdbcType=TIMESTAMP},
  209. IRM_Recordor = #{irmRecordor,jdbcType=VARCHAR},
  210. IRM_Record_Time = #{irmRecordTime,jdbcType=TIMESTAMP},
  211. IRM_Operation_Time = #{irmOperationTime,jdbcType=TIMESTAMP},
  212. IRM_Operator = #{irmOperator,jdbcType=VARCHAR},
  213. IRM_IsDel = #{irmIsdel,jdbcType=INTEGER},
  214. IRM_FormerID = #{irmFormerid,jdbcType=INTEGER},
  215. IRM_Record = #{irmRecord,jdbcType=VARCHAR}
  216. where IRM_ID = #{irmId,jdbcType=INTEGER}
  217. </update>
  218. <select id="selectByMeasureTime" resultMap="BaseResultMap">
  219. select
  220. <include refid="Base_Column_List"/>
  221. from inp_remark
  222. where IRM_IsDel=0
  223. <if test="patientNo != null">
  224. and PatientNo = #{patientNo,jdbcType=VARCHAR}
  225. </if>
  226. <if test="measureTime != null">
  227. and IRM_Measure_Time = #{measureTime,jdbcType=TIMESTAMP}
  228. </if>
  229. limit 1
  230. </select>
  231. <select id="selectBySelective" resultMap="BaseResultMap">
  232. select
  233. <include refid="Base_Column_List"/>
  234. from inp_remark
  235. where IRM_IsDel=0
  236. and PatientNo in
  237. <foreach collection="list" item="item" index="index" separator="," open="(" close=")">
  238. #{item,jdbcType=VARCHAR}
  239. </foreach>
  240. and IRM_Measure_Time = #{measureTime,jdbcType=TIMESTAMP}
  241. </select>
  242. <select id="selectByPatientNo" resultMap="BaseResultMap">
  243. select
  244. <include refid="Base_Column_List"/>
  245. from inp_remark
  246. where IRM_IsDel=0
  247. and PatientNo = #{patientNo,jdbcType=VARCHAR}
  248. </select>
  249. <update id="updateByirmId">
  250. update inp_remark
  251. set IRM_IsDel = -1,
  252. IRM_Operation_Time = #{irmOperationTime,jdbcType=TIMESTAMP},
  253. IRM_Operator = #{irmOperator,jdbcType=VARCHAR}
  254. where IRM_ID = #{irmId,jdbcType=INTEGER}
  255. </update>
  256. <update id="updateByirmIds">
  257. update inp_remark
  258. set IRM_IsDel = -1,
  259. IRM_Operation_Time = #{irmOperationTime,jdbcType=TIMESTAMP},
  260. IRM_Operator = #{irmOperator,jdbcType=VARCHAR}
  261. where IRM_ID in
  262. <foreach collection="list" item="item" index="index" separator="," open="(" close=")">
  263. #{item,jdbcType=INTEGER}
  264. </foreach>
  265. </update>
  266. <select id="selectByPatientTime" resultMap="BaseResultMap">
  267. select
  268. <include refid="Base_Column_List"/>
  269. from inp_remark
  270. where IRM_IsDel=0
  271. and PatientNo = #{patientNo,jdbcType=VARCHAR}
  272. and IRM_Measure_Time = #{irmMeasureTime,jdbcType=TIMESTAMP}
  273. and HI_ID = #{hiId,jdbcType=INTEGER}
  274. </select>
  275. <update id="batchDel">
  276. update inp_remark
  277. set IRM_IsDel = -1,
  278. IRM_Operation_Time = #{irmOperationTime,jdbcType=TIMESTAMP},
  279. IRM_Operator = #{irmOperator,jdbcType=VARCHAR}
  280. where IRM_ID in
  281. <foreach collection="list" item="item" separator="," open="(" close=")">
  282. #{item,jdbcType=INTEGER}
  283. </foreach>
  284. </update>
  285. </mapper>