SkinPopMapper.xml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  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.SkinPopMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.base.mysqlmodel.SkinPop" >
  5. <id column="PS_ID" property="psId" jdbcType="INTEGER" />
  6. <result column="PSS_ID" property="pssId" jdbcType="INTEGER" />
  7. <result column="PO_ID" property="poId" jdbcType="INTEGER" />
  8. <result column="PatientNo" property="patientno" jdbcType="INTEGER" />
  9. <result column="HI_ID" property="hiId" jdbcType="INTEGER" />
  10. <result column="DD_DepDm" property="ddDepdm" jdbcType="VARCHAR" />
  11. <result column="DW_WardDm" property="dwWarddm" jdbcType="VARCHAR" />
  12. <result column="DB_BedNo" property="dbBedno" jdbcType="VARCHAR" />
  13. <result column="PS_AdviceCode" property="psAdvicecode" jdbcType="VARCHAR" />
  14. <result column="PS_BarCode" property="psBarcode" jdbcType="VARCHAR" />
  15. <result column="PS_Recorder" property="psRecorder" jdbcType="VARCHAR" />
  16. <result column="PS_Record_Time" property="psRecordTime" jdbcType="TIMESTAMP" />
  17. <result column="PS_IsDel" property="psIsdel" jdbcType="INTEGER" />
  18. <result column="PS_Operator" property="psOperator" jdbcType="VARCHAR" />
  19. <result column="PS_OperatTime" property="psOperattime" jdbcType="TIMESTAMP" />
  20. <result column="PS_Inject_Time" property="psInjectTime" jdbcType="TIMESTAMP" />
  21. <result column="PS_Inject_Part" property="psInjectPart" jdbcType="VARCHAR" />
  22. <result column="PS_Amount" property="psAmount" jdbcType="DOUBLE" />
  23. <result column="PS_Unit" property="psUnit" jdbcType="VARCHAR" />
  24. <result column="PS_DrugCode" property="psDrugcode" jdbcType="VARCHAR" />
  25. <result column="PS_IsInsulin" property="psIsinsulin" jdbcType="INTEGER" />
  26. </resultMap>
  27. <sql id="Base_Column_List" >
  28. PS_ID, PSS_ID, PO_ID, PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, PS_AdviceCode,
  29. PS_BarCode, PS_Recorder, PS_Record_Time, PS_IsDel, PS_Operator, PS_OperatTime, PS_Inject_Time,
  30. PS_Inject_Part, PS_Amount, PS_Unit, PS_DrugCode, PS_IsInsulin
  31. </sql>
  32. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  33. select
  34. <include refid="Base_Column_List" />
  35. from pda_skinpop
  36. where PS_ID = #{psId,jdbcType=INTEGER}
  37. </select>
  38. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  39. delete from pda_skinpop
  40. where PS_ID = #{psId,jdbcType=INTEGER}
  41. </delete>
  42. <insert id="insert" parameterType="com.xinxin.topro.base.mysqlmodel.SkinPop" >
  43. insert into pda_skinpop (PS_ID, PSS_ID, PO_ID,
  44. PatientNo, HI_ID, DD_DepDm,
  45. DW_WardDm, DB_BedNo, PS_AdviceCode,
  46. PS_BarCode, PS_Recorder, PS_Record_Time,
  47. PS_IsDel, PS_Operator, PS_OperatTime,
  48. PS_Inject_Time, PS_Inject_Part, PS_Amount,
  49. PS_Unit, PS_DrugCode, PS_IsInsulin
  50. )
  51. values (#{psId,jdbcType=INTEGER}, #{pssId,jdbcType=INTEGER}, #{poId,jdbcType=INTEGER},
  52. #{patientno,jdbcType=INTEGER}, #{hiId,jdbcType=INTEGER}, #{ddDepdm,jdbcType=VARCHAR},
  53. #{dwWarddm,jdbcType=VARCHAR}, #{dbBedno,jdbcType=VARCHAR}, #{psAdvicecode,jdbcType=VARCHAR},
  54. #{psBarcode,jdbcType=VARCHAR}, #{psRecorder,jdbcType=VARCHAR}, #{psRecordTime,jdbcType=TIMESTAMP},
  55. #{psIsdel,jdbcType=INTEGER}, #{psOperator,jdbcType=VARCHAR}, #{psOperattime,jdbcType=TIMESTAMP},
  56. #{psInjectTime,jdbcType=TIMESTAMP}, #{psInjectPart,jdbcType=VARCHAR}, #{psAmount,jdbcType=DOUBLE},
  57. #{psUnit,jdbcType=VARCHAR}, #{psDrugcode,jdbcType=VARCHAR}, #{psIsinsulin,jdbcType=INTEGER}
  58. )
  59. </insert>
  60. <insert id="insertSelective" parameterType="com.xinxin.topro.base.mysqlmodel.SkinPop" >
  61. insert into pda_skinpop
  62. <trim prefix="(" suffix=")" suffixOverrides="," >
  63. <if test="psId != null" >
  64. PS_ID,
  65. </if>
  66. <if test="pssId != null" >
  67. PSS_ID,
  68. </if>
  69. <if test="poId != null" >
  70. PO_ID,
  71. </if>
  72. <if test="patientno != null" >
  73. PatientNo,
  74. </if>
  75. <if test="hiId != null" >
  76. HI_ID,
  77. </if>
  78. <if test="ddDepdm != null" >
  79. DD_DepDm,
  80. </if>
  81. <if test="dwWarddm != null" >
  82. DW_WardDm,
  83. </if>
  84. <if test="dbBedno != null" >
  85. DB_BedNo,
  86. </if>
  87. <if test="psAdvicecode != null" >
  88. PS_AdviceCode,
  89. </if>
  90. <if test="psBarcode != null" >
  91. PS_BarCode,
  92. </if>
  93. <if test="psRecorder != null" >
  94. PS_Recorder,
  95. </if>
  96. <if test="psRecordTime != null" >
  97. PS_Record_Time,
  98. </if>
  99. <if test="psIsdel != null" >
  100. PS_IsDel,
  101. </if>
  102. <if test="psOperator != null" >
  103. PS_Operator,
  104. </if>
  105. <if test="psOperattime != null" >
  106. PS_OperatTime,
  107. </if>
  108. <if test="psInjectTime != null" >
  109. PS_Inject_Time,
  110. </if>
  111. <if test="psInjectPart != null" >
  112. PS_Inject_Part,
  113. </if>
  114. <if test="psAmount != null" >
  115. PS_Amount,
  116. </if>
  117. <if test="psUnit != null" >
  118. PS_Unit,
  119. </if>
  120. <if test="psDrugcode != null" >
  121. PS_DrugCode,
  122. </if>
  123. <if test="psIsinsulin != null" >
  124. PS_IsInsulin,
  125. </if>
  126. </trim>
  127. <trim prefix="values (" suffix=")" suffixOverrides="," >
  128. <if test="psId != null" >
  129. #{psId,jdbcType=INTEGER},
  130. </if>
  131. <if test="pssId != null" >
  132. #{pssId,jdbcType=INTEGER},
  133. </if>
  134. <if test="poId != null" >
  135. #{poId,jdbcType=INTEGER},
  136. </if>
  137. <if test="patientno != null" >
  138. #{patientno,jdbcType=INTEGER},
  139. </if>
  140. <if test="hiId != null" >
  141. #{hiId,jdbcType=INTEGER},
  142. </if>
  143. <if test="ddDepdm != null" >
  144. #{ddDepdm,jdbcType=VARCHAR},
  145. </if>
  146. <if test="dwWarddm != null" >
  147. #{dwWarddm,jdbcType=VARCHAR},
  148. </if>
  149. <if test="dbBedno != null" >
  150. #{dbBedno,jdbcType=VARCHAR},
  151. </if>
  152. <if test="psAdvicecode != null" >
  153. #{psAdvicecode,jdbcType=VARCHAR},
  154. </if>
  155. <if test="psBarcode != null" >
  156. #{psBarcode,jdbcType=VARCHAR},
  157. </if>
  158. <if test="psRecorder != null" >
  159. #{psRecorder,jdbcType=VARCHAR},
  160. </if>
  161. <if test="psRecordTime != null" >
  162. #{psRecordTime,jdbcType=TIMESTAMP},
  163. </if>
  164. <if test="psIsdel != null" >
  165. #{psIsdel,jdbcType=INTEGER},
  166. </if>
  167. <if test="psOperator != null" >
  168. #{psOperator,jdbcType=VARCHAR},
  169. </if>
  170. <if test="psOperattime != null" >
  171. #{psOperattime,jdbcType=TIMESTAMP},
  172. </if>
  173. <if test="psInjectTime != null" >
  174. #{psInjectTime,jdbcType=TIMESTAMP},
  175. </if>
  176. <if test="psInjectPart != null" >
  177. #{psInjectPart,jdbcType=VARCHAR},
  178. </if>
  179. <if test="psAmount != null" >
  180. #{psAmount,jdbcType=DOUBLE},
  181. </if>
  182. <if test="psUnit != null" >
  183. #{psUnit,jdbcType=VARCHAR},
  184. </if>
  185. <if test="psDrugcode != null" >
  186. #{psDrugcode,jdbcType=VARCHAR},
  187. </if>
  188. <if test="psIsinsulin != null" >
  189. #{psIsinsulin,jdbcType=INTEGER},
  190. </if>
  191. </trim>
  192. </insert>
  193. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.base.mysqlmodel.SkinPop" >
  194. update pda_skinpop
  195. <set >
  196. <if test="pssId != null" >
  197. PSS_ID = #{pssId,jdbcType=INTEGER},
  198. </if>
  199. <if test="poId != null" >
  200. PO_ID = #{poId,jdbcType=INTEGER},
  201. </if>
  202. <if test="patientno != null" >
  203. PatientNo = #{patientno,jdbcType=INTEGER},
  204. </if>
  205. <if test="hiId != null" >
  206. HI_ID = #{hiId,jdbcType=INTEGER},
  207. </if>
  208. <if test="ddDepdm != null" >
  209. DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
  210. </if>
  211. <if test="dwWarddm != null" >
  212. DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
  213. </if>
  214. <if test="dbBedno != null" >
  215. DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
  216. </if>
  217. <if test="psAdvicecode != null" >
  218. PS_AdviceCode = #{psAdvicecode,jdbcType=VARCHAR},
  219. </if>
  220. <if test="psBarcode != null" >
  221. PS_BarCode = #{psBarcode,jdbcType=VARCHAR},
  222. </if>
  223. <if test="psRecorder != null" >
  224. PS_Recorder = #{psRecorder,jdbcType=VARCHAR},
  225. </if>
  226. <if test="psRecordTime != null" >
  227. PS_Record_Time = #{psRecordTime,jdbcType=TIMESTAMP},
  228. </if>
  229. <if test="psIsdel != null" >
  230. PS_IsDel = #{psIsdel,jdbcType=INTEGER},
  231. </if>
  232. <if test="psOperator != null" >
  233. PS_Operator = #{psOperator,jdbcType=VARCHAR},
  234. </if>
  235. <if test="psOperattime != null" >
  236. PS_OperatTime = #{psOperattime,jdbcType=TIMESTAMP},
  237. </if>
  238. <if test="psInjectTime != null" >
  239. PS_Inject_Time = #{psInjectTime,jdbcType=TIMESTAMP},
  240. </if>
  241. <if test="psInjectPart != null" >
  242. PS_Inject_Part = #{psInjectPart,jdbcType=VARCHAR},
  243. </if>
  244. <if test="psAmount != null" >
  245. PS_Amount = #{psAmount,jdbcType=DOUBLE},
  246. </if>
  247. <if test="psUnit != null" >
  248. PS_Unit = #{psUnit,jdbcType=VARCHAR},
  249. </if>
  250. <if test="psDrugcode != null" >
  251. PS_DrugCode = #{psDrugcode,jdbcType=VARCHAR},
  252. </if>
  253. <if test="psIsinsulin != null" >
  254. PS_IsInsulin = #{psIsinsulin,jdbcType=INTEGER},
  255. </if>
  256. </set>
  257. where PS_ID = #{psId,jdbcType=INTEGER}
  258. </update>
  259. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.base.mysqlmodel.SkinPop" >
  260. update pda_skinpop
  261. set PSS_ID = #{pssId,jdbcType=INTEGER},
  262. PO_ID = #{poId,jdbcType=INTEGER},
  263. PatientNo = #{patientno,jdbcType=INTEGER},
  264. HI_ID = #{hiId,jdbcType=INTEGER},
  265. DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
  266. DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
  267. DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
  268. PS_AdviceCode = #{psAdvicecode,jdbcType=VARCHAR},
  269. PS_BarCode = #{psBarcode,jdbcType=VARCHAR},
  270. PS_Recorder = #{psRecorder,jdbcType=VARCHAR},
  271. PS_Record_Time = #{psRecordTime,jdbcType=TIMESTAMP},
  272. PS_IsDel = #{psIsdel,jdbcType=INTEGER},
  273. PS_Operator = #{psOperator,jdbcType=VARCHAR},
  274. PS_OperatTime = #{psOperattime,jdbcType=TIMESTAMP},
  275. PS_Inject_Time = #{psInjectTime,jdbcType=TIMESTAMP},
  276. PS_Inject_Part = #{psInjectPart,jdbcType=VARCHAR},
  277. PS_Amount = #{psAmount,jdbcType=DOUBLE},
  278. PS_Unit = #{psUnit,jdbcType=VARCHAR},
  279. PS_DrugCode = #{psDrugcode,jdbcType=VARCHAR},
  280. PS_IsInsulin = #{psIsinsulin,jdbcType=INTEGER}
  281. where PS_ID = #{psId,jdbcType=INTEGER}
  282. </update>
  283. </mapper>