InpTempCustomMapper.xml 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  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.InpTempCustomMapper">
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpTempCustom">
  5. <id column="ITC_ID" jdbcType="INTEGER" property="itcId" />
  6. <result column="ITC_Draw_Code" jdbcType="VARCHAR" property="itcDrawCode" />
  7. <result column="ITC_Draw_Name" jdbcType="VARCHAR" property="itcDrawName" />
  8. <result column="PatientNo" jdbcType="VARCHAR" property="patientno" />
  9. <result column="HI_ID" jdbcType="INTEGER" property="hiId" />
  10. <result column="DD_DepDm" jdbcType="VARCHAR" property="ddDepdm" />
  11. <result column="DW_WardDm" jdbcType="VARCHAR" property="dwWarddm" />
  12. <result column="DB_BedNo" jdbcType="VARCHAR" property="dbBedno" />
  13. <result column="ITC_Operation_Time" jdbcType="TIMESTAMP" property="itcOperationTime" />
  14. <result column="ITC_Operator" jdbcType="VARCHAR" property="itcOperator" />
  15. <result column="ITC_IsDel" jdbcType="INTEGER" property="itcIsdel" />
  16. <result column="ITC_Recordor" jdbcType="VARCHAR" property="itcRecordor" />
  17. <result column="ITC_Record_Time" jdbcType="TIMESTAMP" property="itcRecordTime" />
  18. <result column="ITC_TRP_Flag" jdbcType="INTEGER" property="itcTrpFlag" />
  19. </resultMap>
  20. <sql id="Base_Column_List">
  21. ITC_ID, ITC_Draw_Code, ITC_Draw_Name, PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo,
  22. ITC_Operation_Time, ITC_Operator, ITC_IsDel, ITC_Recordor, ITC_Record_Time, ITC_TRP_Flag
  23. </sql>
  24. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  25. select
  26. <include refid="Base_Column_List" />
  27. from inp_temp_custom
  28. where ITC_ID = #{itcId,jdbcType=INTEGER}
  29. </select>
  30. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  31. delete from inp_temp_custom
  32. where ITC_ID = #{itcId,jdbcType=INTEGER}
  33. </delete>
  34. <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpTempCustom">
  35. insert into inp_temp_custom (ITC_ID, ITC_Draw_Code, ITC_Draw_Name,
  36. PatientNo, HI_ID, DD_DepDm,
  37. DW_WardDm, DB_BedNo, ITC_Operation_Time,
  38. ITC_Operator, ITC_IsDel, ITC_Recordor,
  39. ITC_Record_Time, ITC_TRP_Flag)
  40. values (#{itcId,jdbcType=INTEGER}, #{itcDrawCode,jdbcType=VARCHAR}, #{itcDrawName,jdbcType=VARCHAR},
  41. #{patientno,jdbcType=VARCHAR}, #{hiId,jdbcType=INTEGER}, #{ddDepdm,jdbcType=VARCHAR},
  42. #{dwWarddm,jdbcType=VARCHAR}, #{dbBedno,jdbcType=VARCHAR}, #{itcOperationTime,jdbcType=TIMESTAMP},
  43. #{itcOperator,jdbcType=VARCHAR}, #{itcIsdel,jdbcType=INTEGER}, #{itcRecordor,jdbcType=VARCHAR},
  44. #{itcRecordTime,jdbcType=TIMESTAMP}, #{itcTrpFlag,jdbcType=INTEGER})
  45. </insert>
  46. <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpTempCustom">
  47. insert into inp_temp_custom
  48. <trim prefix="(" suffix=")" suffixOverrides=",">
  49. <if test="itcId != null">
  50. ITC_ID,
  51. </if>
  52. <if test="itcDrawCode != null">
  53. ITC_Draw_Code,
  54. </if>
  55. <if test="itcDrawName != null">
  56. ITC_Draw_Name,
  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="itcOperationTime != null">
  74. ITC_Operation_Time,
  75. </if>
  76. <if test="itcOperator != null">
  77. ITC_Operator,
  78. </if>
  79. <if test="itcIsdel != null">
  80. ITC_IsDel,
  81. </if>
  82. <if test="itcRecordor != null">
  83. ITC_Recordor,
  84. </if>
  85. <if test="itcRecordTime != null">
  86. ITC_Record_Time,
  87. </if>
  88. <if test="itcTrpFlag != null">
  89. ITC_TRP_Flag,
  90. </if>
  91. </trim>
  92. <trim prefix="values (" suffix=")" suffixOverrides=",">
  93. <if test="itcId != null">
  94. #{itcId,jdbcType=INTEGER},
  95. </if>
  96. <if test="itcDrawCode != null">
  97. #{itcDrawCode,jdbcType=VARCHAR},
  98. </if>
  99. <if test="itcDrawName != null">
  100. #{itcDrawName,jdbcType=VARCHAR},
  101. </if>
  102. <if test="patientno != null">
  103. #{patientno,jdbcType=VARCHAR},
  104. </if>
  105. <if test="hiId != null">
  106. #{hiId,jdbcType=INTEGER},
  107. </if>
  108. <if test="ddDepdm != null">
  109. #{ddDepdm,jdbcType=VARCHAR},
  110. </if>
  111. <if test="dwWarddm != null">
  112. #{dwWarddm,jdbcType=VARCHAR},
  113. </if>
  114. <if test="dbBedno != null">
  115. #{dbBedno,jdbcType=VARCHAR},
  116. </if>
  117. <if test="itcOperationTime != null">
  118. #{itcOperationTime,jdbcType=TIMESTAMP},
  119. </if>
  120. <if test="itcOperator != null">
  121. #{itcOperator,jdbcType=VARCHAR},
  122. </if>
  123. <if test="itcIsdel != null">
  124. #{itcIsdel,jdbcType=INTEGER},
  125. </if>
  126. <if test="itcRecordor != null">
  127. #{itcRecordor,jdbcType=VARCHAR},
  128. </if>
  129. <if test="itcRecordTime != null">
  130. #{itcRecordTime,jdbcType=TIMESTAMP},
  131. </if>
  132. <if test="itcTrpFlag != null">
  133. #{itcTrpFlag,jdbcType=INTEGER},
  134. </if>
  135. </trim>
  136. </insert>
  137. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpTempCustom">
  138. update inp_temp_custom
  139. <set>
  140. <if test="itcDrawCode != null">
  141. ITC_Draw_Code = #{itcDrawCode,jdbcType=VARCHAR},
  142. </if>
  143. <if test="itcDrawName != null">
  144. ITC_Draw_Name = #{itcDrawName,jdbcType=VARCHAR},
  145. </if>
  146. <if test="patientno != null">
  147. PatientNo = #{patientno,jdbcType=VARCHAR},
  148. </if>
  149. <if test="hiId != null">
  150. HI_ID = #{hiId,jdbcType=INTEGER},
  151. </if>
  152. <if test="ddDepdm != null">
  153. DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
  154. </if>
  155. <if test="dwWarddm != null">
  156. DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
  157. </if>
  158. <if test="dbBedno != null">
  159. DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
  160. </if>
  161. <if test="itcOperationTime != null">
  162. ITC_Operation_Time = #{itcOperationTime,jdbcType=TIMESTAMP},
  163. </if>
  164. <if test="itcOperator != null">
  165. ITC_Operator = #{itcOperator,jdbcType=VARCHAR},
  166. </if>
  167. <if test="itcIsdel != null">
  168. ITC_IsDel = #{itcIsdel,jdbcType=INTEGER},
  169. </if>
  170. <if test="itcRecordor != null">
  171. ITC_Recordor = #{itcRecordor,jdbcType=VARCHAR},
  172. </if>
  173. <if test="itcRecordTime != null">
  174. ITC_Record_Time = #{itcRecordTime,jdbcType=TIMESTAMP},
  175. </if>
  176. <if test="itcTrpFlag != null">
  177. ITC_TRP_Flag = #{itcTrpFlag,jdbcType=INTEGER},
  178. </if>
  179. </set>
  180. where ITC_ID = #{itcId,jdbcType=INTEGER}
  181. </update>
  182. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpTempCustom">
  183. update inp_temp_custom
  184. set ITC_Draw_Code = #{itcDrawCode,jdbcType=VARCHAR},
  185. ITC_Draw_Name = #{itcDrawName,jdbcType=VARCHAR},
  186. PatientNo = #{patientno,jdbcType=VARCHAR},
  187. HI_ID = #{hiId,jdbcType=INTEGER},
  188. DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
  189. DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
  190. DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
  191. ITC_Operation_Time = #{itcOperationTime,jdbcType=TIMESTAMP},
  192. ITC_Operator = #{itcOperator,jdbcType=VARCHAR},
  193. ITC_IsDel = #{itcIsdel,jdbcType=INTEGER},
  194. ITC_Recordor = #{itcRecordor,jdbcType=VARCHAR},
  195. ITC_Record_Time = #{itcRecordTime,jdbcType=TIMESTAMP},
  196. ITC_TRP_Flag = #{itcTrpFlag,jdbcType=INTEGER}
  197. where ITC_ID = #{itcId,jdbcType=INTEGER}
  198. </update>
  199. <select id="selectByPatientNo" resultMap="BaseResultMap">
  200. select
  201. <include refid="Base_Column_List" />
  202. from inp_temp_custom
  203. where ITC_IsDel = 0
  204. <if test="patientNo != null">
  205. and PatientNo = #{patientNo,jdbcType=VARCHAR}
  206. </if>
  207. <if test="hiId != null">
  208. and HI_ID = #{hiId,jdbcType=INTEGER}
  209. </if>
  210. </select>
  211. <insert id="bulkInsert" parameterType="java.util.List">
  212. insert into inp_temp_custom (ITC_ID, ITC_Draw_Code, ITC_Draw_Name,
  213. PatientNo, HI_ID, DD_DepDm,
  214. DW_WardDm, DB_BedNo, ITC_Operation_Time,
  215. ITC_Operator, ITC_IsDel, ITC_Recordor,
  216. ITC_Record_Time, ITC_TRP_Flag)
  217. values <foreach collection="list" item="item" separator=",">
  218. (#{item.itcId,jdbcType=INTEGER}, #{item.itcDrawCode,jdbcType=VARCHAR}, #{item.itcDrawName,jdbcType=VARCHAR},
  219. #{item.patientno,jdbcType=VARCHAR}, #{item.hiId,jdbcType=INTEGER}, #{item.ddDepdm,jdbcType=VARCHAR},
  220. #{item.dwWarddm,jdbcType=VARCHAR}, #{item.dbBedno,jdbcType=VARCHAR}, #{item.itcOperationTime,jdbcType=TIMESTAMP},
  221. #{item.itcOperator,jdbcType=VARCHAR}, #{item.itcIsdel,jdbcType=INTEGER}, #{item.itcRecordor,jdbcType=VARCHAR},
  222. #{item.itcRecordTime,jdbcType=TIMESTAMP}, #{item.itcTrpFlag,jdbcType=INTEGER})
  223. </foreach>
  224. </insert>
  225. <select id="selectCountByPatientNo" resultType="java.lang.Integer">
  226. select count(1)
  227. from inp_temp_custom
  228. where ITC_IsDel = 0
  229. <if test="patientNo != null">
  230. and PatientNo = #{patientNo,jdbcType=VARCHAR}
  231. </if>
  232. <if test="hiId != null">
  233. and HI_ID = #{hiId,jdbcType=VARCHAR}
  234. </if>
  235. </select>
  236. <update id="updateIsDelByPatientNo" parameterType="com.xinxin.topro.inpnurseservice.vo.InpTprCustomUpdateVo">
  237. update inp_temp_custom
  238. set ITC_Operation_Time = #{itcOperationTime,jdbcType=TIMESTAMP},
  239. ITC_Operator = #{itcOperator,jdbcType=VARCHAR},
  240. ITC_IsDel = #{itcIsdel,jdbcType=INTEGER}
  241. where PatientNo = #{patientno,jdbcType=INTEGER}
  242. and HI_ID = #{hiId,jdbcType=INTEGER}
  243. </update>
  244. </mapper>