PdaInspectionMapper.xml 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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.base.mysqlmapper.PdaInspectionMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.base.mysqlmodel.PdaInspection" >
  5. <id column="PI_ID" property="piId" jdbcType="INTEGER" />
  6. <result column="PI_PatientNo" property="piPatientno" jdbcType="INTEGER" />
  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="PI_AdviceGroupCode" property="piAdvicegroupcode" jdbcType="VARCHAR" />
  12. <result column="PI_AdviceType" property="piAdvicetype" jdbcType="VARCHAR" />
  13. <result column="PI_Inspector" property="piInspector" jdbcType="VARCHAR" />
  14. <result column="PI_InspectTime" property="piInspecttime" jdbcType="TIMESTAMP" />
  15. <result column="PI_AdviceCode" property="piAdvicecode" jdbcType="VARCHAR" />
  16. <result column="PI_BarCode" property="piBarcode" jdbcType="VARCHAR" />
  17. <result column="PI_Type" property="piType" jdbcType="INTEGER" />
  18. <result column="PI_ExceptionFlag" property="piExceptionflag" jdbcType="INTEGER" />
  19. <result column="PI_Exception_Cause" property="piExceptionCause" jdbcType="VARCHAR" />
  20. <result column="PI_Measure" property="piMeasure" jdbcType="VARCHAR" />
  21. <result column="PI_IsDel" property="piIsdel" jdbcType="INTEGER" />
  22. </resultMap>
  23. <sql id="Base_Column_List" >
  24. PI_ID, PI_PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, PI_AdviceGroupCode, PI_AdviceType,
  25. PI_Inspector, PI_InspectTime, PI_AdviceCode, PI_BarCode, PI_Type, PI_ExceptionFlag,
  26. PI_Exception_Cause, PI_Measure, PI_IsDel
  27. </sql>
  28. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  29. select
  30. <include refid="Base_Column_List" />
  31. from pda_inspection
  32. where PI_ID = #{piId,jdbcType=INTEGER}
  33. </select>
  34. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  35. delete from pda_inspection
  36. where PI_ID = #{piId,jdbcType=INTEGER}
  37. </delete>
  38. <insert id="insert" parameterType="com.xinxin.topro.base.mysqlmodel.PdaInspection" >
  39. insert into pda_inspection (PI_ID, PI_PatientNo, HI_ID,
  40. DD_DepDm, DW_WardDm, DB_BedNo,
  41. PI_AdviceGroupCode, PI_AdviceType, PI_Inspector,
  42. PI_InspectTime, PI_AdviceCode, PI_BarCode,
  43. PI_Type, PI_ExceptionFlag, PI_Exception_Cause,
  44. PI_Measure, PI_IsDel)
  45. values (#{piId,jdbcType=INTEGER}, #{piPatientno,jdbcType=INTEGER}, #{hiId,jdbcType=INTEGER},
  46. #{ddDepdm,jdbcType=VARCHAR}, #{dwWarddm,jdbcType=VARCHAR}, #{dbBedno,jdbcType=VARCHAR},
  47. #{piAdvicegroupcode,jdbcType=VARCHAR}, #{piAdvicetype,jdbcType=VARCHAR}, #{piInspector,jdbcType=VARCHAR},
  48. #{piInspecttime,jdbcType=TIMESTAMP}, #{piAdvicecode,jdbcType=VARCHAR}, #{piBarcode,jdbcType=VARCHAR},
  49. #{piType,jdbcType=INTEGER}, #{piExceptionflag,jdbcType=INTEGER}, #{piExceptionCause,jdbcType=VARCHAR},
  50. #{piMeasure,jdbcType=VARCHAR}, #{piIsdel,jdbcType=INTEGER})
  51. </insert>
  52. <insert id="insertSelective" parameterType="com.xinxin.topro.base.mysqlmodel.PdaInspection" >
  53. insert into pda_inspection
  54. <trim prefix="(" suffix=")" suffixOverrides="," >
  55. <if test="piId != null" >
  56. PI_ID,
  57. </if>
  58. <if test="piPatientno != null" >
  59. PI_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="piAdvicegroupcode != null" >
  74. PI_AdviceGroupCode,
  75. </if>
  76. <if test="piAdvicetype != null" >
  77. PI_AdviceType,
  78. </if>
  79. <if test="piInspector != null" >
  80. PI_Inspector,
  81. </if>
  82. <if test="piInspecttime != null" >
  83. PI_InspectTime,
  84. </if>
  85. <if test="piAdvicecode != null" >
  86. PI_AdviceCode,
  87. </if>
  88. <if test="piBarcode != null" >
  89. PI_BarCode,
  90. </if>
  91. <if test="piType != null" >
  92. PI_Type,
  93. </if>
  94. <if test="piExceptionflag != null" >
  95. PI_ExceptionFlag,
  96. </if>
  97. <if test="piExceptionCause != null" >
  98. PI_Exception_Cause,
  99. </if>
  100. <if test="piMeasure != null" >
  101. PI_Measure,
  102. </if>
  103. <if test="piIsdel != null" >
  104. PI_IsDel,
  105. </if>
  106. </trim>
  107. <trim prefix="values (" suffix=")" suffixOverrides="," >
  108. <if test="piId != null" >
  109. #{piId,jdbcType=INTEGER},
  110. </if>
  111. <if test="piPatientno != null" >
  112. #{piPatientno,jdbcType=INTEGER},
  113. </if>
  114. <if test="hiId != null" >
  115. #{hiId,jdbcType=INTEGER},
  116. </if>
  117. <if test="ddDepdm != null" >
  118. #{ddDepdm,jdbcType=VARCHAR},
  119. </if>
  120. <if test="dwWarddm != null" >
  121. #{dwWarddm,jdbcType=VARCHAR},
  122. </if>
  123. <if test="dbBedno != null" >
  124. #{dbBedno,jdbcType=VARCHAR},
  125. </if>
  126. <if test="piAdvicegroupcode != null" >
  127. #{piAdvicegroupcode,jdbcType=VARCHAR},
  128. </if>
  129. <if test="piAdvicetype != null" >
  130. #{piAdvicetype,jdbcType=VARCHAR},
  131. </if>
  132. <if test="piInspector != null" >
  133. #{piInspector,jdbcType=VARCHAR},
  134. </if>
  135. <if test="piInspecttime != null" >
  136. #{piInspecttime,jdbcType=TIMESTAMP},
  137. </if>
  138. <if test="piAdvicecode != null" >
  139. #{piAdvicecode,jdbcType=VARCHAR},
  140. </if>
  141. <if test="piBarcode != null" >
  142. #{piBarcode,jdbcType=VARCHAR},
  143. </if>
  144. <if test="piType != null" >
  145. #{piType,jdbcType=INTEGER},
  146. </if>
  147. <if test="piExceptionflag != null" >
  148. #{piExceptionflag,jdbcType=INTEGER},
  149. </if>
  150. <if test="piExceptionCause != null" >
  151. #{piExceptionCause,jdbcType=VARCHAR},
  152. </if>
  153. <if test="piMeasure != null" >
  154. #{piMeasure,jdbcType=VARCHAR},
  155. </if>
  156. <if test="piIsdel != null" >
  157. #{piIsdel,jdbcType=INTEGER},
  158. </if>
  159. </trim>
  160. </insert>
  161. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.base.mysqlmodel.PdaInspection" >
  162. update pda_inspection
  163. <set >
  164. <if test="piPatientno != null" >
  165. PI_PatientNo = #{piPatientno,jdbcType=INTEGER},
  166. </if>
  167. <if test="hiId != null" >
  168. HI_ID = #{hiId,jdbcType=INTEGER},
  169. </if>
  170. <if test="ddDepdm != null" >
  171. DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
  172. </if>
  173. <if test="dwWarddm != null" >
  174. DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
  175. </if>
  176. <if test="dbBedno != null" >
  177. DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
  178. </if>
  179. <if test="piAdvicegroupcode != null" >
  180. PI_AdviceGroupCode = #{piAdvicegroupcode,jdbcType=VARCHAR},
  181. </if>
  182. <if test="piAdvicetype != null" >
  183. PI_AdviceType = #{piAdvicetype,jdbcType=VARCHAR},
  184. </if>
  185. <if test="piInspector != null" >
  186. PI_Inspector = #{piInspector,jdbcType=VARCHAR},
  187. </if>
  188. <if test="piInspecttime != null" >
  189. PI_InspectTime = #{piInspecttime,jdbcType=TIMESTAMP},
  190. </if>
  191. <if test="piAdvicecode != null" >
  192. PI_AdviceCode = #{piAdvicecode,jdbcType=VARCHAR},
  193. </if>
  194. <if test="piBarcode != null" >
  195. PI_BarCode = #{piBarcode,jdbcType=VARCHAR},
  196. </if>
  197. <if test="piType != null" >
  198. PI_Type = #{piType,jdbcType=INTEGER},
  199. </if>
  200. <if test="piExceptionflag != null" >
  201. PI_ExceptionFlag = #{piExceptionflag,jdbcType=INTEGER},
  202. </if>
  203. <if test="piExceptionCause != null" >
  204. PI_Exception_Cause = #{piExceptionCause,jdbcType=VARCHAR},
  205. </if>
  206. <if test="piMeasure != null" >
  207. PI_Measure = #{piMeasure,jdbcType=VARCHAR},
  208. </if>
  209. <if test="piIsdel != null" >
  210. PI_IsDel = #{piIsdel,jdbcType=INTEGER},
  211. </if>
  212. </set>
  213. where PI_ID = #{piId,jdbcType=INTEGER}
  214. </update>
  215. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.base.mysqlmodel.PdaInspection" >
  216. update pda_inspection
  217. set PI_PatientNo = #{piPatientno,jdbcType=INTEGER},
  218. HI_ID = #{hiId,jdbcType=INTEGER},
  219. DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
  220. DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
  221. DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
  222. PI_AdviceGroupCode = #{piAdvicegroupcode,jdbcType=VARCHAR},
  223. PI_AdviceType = #{piAdvicetype,jdbcType=VARCHAR},
  224. PI_Inspector = #{piInspector,jdbcType=VARCHAR},
  225. PI_InspectTime = #{piInspecttime,jdbcType=TIMESTAMP},
  226. PI_AdviceCode = #{piAdvicecode,jdbcType=VARCHAR},
  227. PI_BarCode = #{piBarcode,jdbcType=VARCHAR},
  228. PI_Type = #{piType,jdbcType=INTEGER},
  229. PI_ExceptionFlag = #{piExceptionflag,jdbcType=INTEGER},
  230. PI_Exception_Cause = #{piExceptionCause,jdbcType=VARCHAR},
  231. PI_Measure = #{piMeasure,jdbcType=VARCHAR},
  232. PI_IsDel = #{piIsdel,jdbcType=INTEGER}
  233. where PI_ID = #{piId,jdbcType=INTEGER}
  234. </update>
  235. </mapper>