ExecRecordMapper.xml 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  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.ExecRecordMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.base.mysqlmodel.ExecRecord" >
  5. <id column="PO_ID" property="poId" jdbcType="INTEGER" />
  6. <result column="PO_PatientNo" property="poPatientno" 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="PO_AdviceGroupCode" property="poAdvicegroupcode" jdbcType="VARCHAR" />
  12. <result column="PO_AdviceType" property="poAdvicetype" jdbcType="VARCHAR" />
  13. <result column="PO_Operator" property="poOperator" jdbcType="VARCHAR" />
  14. <result column="PO_OperatTime" property="poOperattime" jdbcType="TIMESTAMP" />
  15. <result column="PO_CheckMan" property="poCheckman" jdbcType="VARCHAR" />
  16. <result column="PO_OperatType" property="poOperattype" jdbcType="INTEGER" />
  17. <result column="PO_OperatMode" property="poOperatmode" jdbcType="INTEGER" />
  18. <result column="PO_IsDel" property="poIsdel" jdbcType="INTEGER" />
  19. <result column="PO_AdviceCode" property="poAdvicecode" jdbcType="VARCHAR" />
  20. <result column="PO_BarCode" property="poBarcode" jdbcType="VARCHAR" />
  21. </resultMap>
  22. <sql id="Base_Column_List" >
  23. PO_ID, PO_PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, PO_AdviceGroupCode, PO_AdviceType,
  24. PO_Operator, PO_OperatTime, PO_CheckMan, PO_OperatType, PO_OperatMode, PO_IsDel,
  25. PO_AdviceCode, PO_BarCode
  26. </sql>
  27. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  28. select
  29. <include refid="Base_Column_List" />
  30. from pda_order
  31. where PO_ID = #{poId,jdbcType=INTEGER}
  32. </select>
  33. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  34. delete from pda_order
  35. where PO_ID = #{poId,jdbcType=INTEGER}
  36. </delete>
  37. <insert id="insert" parameterType="com.xinxin.topro.base.mysqlmodel.ExecRecord" >
  38. insert into pda_order (PO_ID, PO_PatientNo, HI_ID,
  39. DD_DepDm, DW_WardDm, DB_BedNo,
  40. PO_AdviceGroupCode, PO_AdviceType, PO_Operator,
  41. PO_OperatTime, PO_CheckMan, PO_OperatType,
  42. PO_OperatMode, PO_IsDel, PO_AdviceCode,
  43. PO_BarCode)
  44. values (#{poId,jdbcType=INTEGER}, #{poPatientno,jdbcType=INTEGER}, #{hiId,jdbcType=INTEGER},
  45. #{ddDepdm,jdbcType=VARCHAR}, #{dwWarddm,jdbcType=VARCHAR}, #{dbBedno,jdbcType=VARCHAR},
  46. #{poAdvicegroupcode,jdbcType=VARCHAR}, #{poAdvicetype,jdbcType=VARCHAR}, #{poOperator,jdbcType=VARCHAR},
  47. #{poOperattime,jdbcType=TIMESTAMP}, #{poCheckman,jdbcType=VARCHAR}, #{poOperattype,jdbcType=INTEGER},
  48. #{poOperatmode,jdbcType=INTEGER}, #{poIsdel,jdbcType=INTEGER}, #{poAdvicecode,jdbcType=VARCHAR},
  49. #{poBarcode,jdbcType=VARCHAR})
  50. </insert>
  51. <insert id="insertSelective" parameterType="com.xinxin.topro.base.mysqlmodel.ExecRecord" >
  52. insert into pda_order
  53. <trim prefix="(" suffix=")" suffixOverrides="," >
  54. <if test="poId != null" >
  55. PO_ID,
  56. </if>
  57. <if test="poPatientno != null" >
  58. PO_PatientNo,
  59. </if>
  60. <if test="hiId != null" >
  61. HI_ID,
  62. </if>
  63. <if test="ddDepdm != null" >
  64. DD_DepDm,
  65. </if>
  66. <if test="dwWarddm != null" >
  67. DW_WardDm,
  68. </if>
  69. <if test="dbBedno != null" >
  70. DB_BedNo,
  71. </if>
  72. <if test="poAdvicegroupcode != null" >
  73. PO_AdviceGroupCode,
  74. </if>
  75. <if test="poAdvicetype != null" >
  76. PO_AdviceType,
  77. </if>
  78. <if test="poOperator != null" >
  79. PO_Operator,
  80. </if>
  81. <if test="poOperattime != null" >
  82. PO_OperatTime,
  83. </if>
  84. <if test="poCheckman != null" >
  85. PO_CheckMan,
  86. </if>
  87. <if test="poOperattype != null" >
  88. PO_OperatType,
  89. </if>
  90. <if test="poOperatmode != null" >
  91. PO_OperatMode,
  92. </if>
  93. <if test="poIsdel != null" >
  94. PO_IsDel,
  95. </if>
  96. <if test="poAdvicecode != null" >
  97. PO_AdviceCode,
  98. </if>
  99. <if test="poBarcode != null" >
  100. PO_BarCode,
  101. </if>
  102. </trim>
  103. <trim prefix="values (" suffix=")" suffixOverrides="," >
  104. <if test="poId != null" >
  105. #{poId,jdbcType=INTEGER},
  106. </if>
  107. <if test="poPatientno != null" >
  108. #{poPatientno,jdbcType=INTEGER},
  109. </if>
  110. <if test="hiId != null" >
  111. #{hiId,jdbcType=INTEGER},
  112. </if>
  113. <if test="ddDepdm != null" >
  114. #{ddDepdm,jdbcType=VARCHAR},
  115. </if>
  116. <if test="dwWarddm != null" >
  117. #{dwWarddm,jdbcType=VARCHAR},
  118. </if>
  119. <if test="dbBedno != null" >
  120. #{dbBedno,jdbcType=VARCHAR},
  121. </if>
  122. <if test="poAdvicegroupcode != null" >
  123. #{poAdvicegroupcode,jdbcType=VARCHAR},
  124. </if>
  125. <if test="poAdvicetype != null" >
  126. #{poAdvicetype,jdbcType=VARCHAR},
  127. </if>
  128. <if test="poOperator != null" >
  129. #{poOperator,jdbcType=VARCHAR},
  130. </if>
  131. <if test="poOperattime != null" >
  132. #{poOperattime,jdbcType=TIMESTAMP},
  133. </if>
  134. <if test="poCheckman != null" >
  135. #{poCheckman,jdbcType=VARCHAR},
  136. </if>
  137. <if test="poOperattype != null" >
  138. #{poOperattype,jdbcType=INTEGER},
  139. </if>
  140. <if test="poOperatmode != null" >
  141. #{poOperatmode,jdbcType=INTEGER},
  142. </if>
  143. <if test="poIsdel != null" >
  144. #{poIsdel,jdbcType=INTEGER},
  145. </if>
  146. <if test="poAdvicecode != null" >
  147. #{poAdvicecode,jdbcType=VARCHAR},
  148. </if>
  149. <if test="poBarcode != null" >
  150. #{poBarcode,jdbcType=VARCHAR},
  151. </if>
  152. </trim>
  153. </insert>
  154. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.base.mysqlmodel.ExecRecord" >
  155. update pda_order
  156. <set >
  157. <if test="poPatientno != null" >
  158. PO_PatientNo = #{poPatientno,jdbcType=INTEGER},
  159. </if>
  160. <if test="hiId != null" >
  161. HI_ID = #{hiId,jdbcType=INTEGER},
  162. </if>
  163. <if test="ddDepdm != null" >
  164. DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
  165. </if>
  166. <if test="dwWarddm != null" >
  167. DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
  168. </if>
  169. <if test="dbBedno != null" >
  170. DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
  171. </if>
  172. <if test="poAdvicegroupcode != null" >
  173. PO_AdviceGroupCode = #{poAdvicegroupcode,jdbcType=VARCHAR},
  174. </if>
  175. <if test="poAdvicetype != null" >
  176. PO_AdviceType = #{poAdvicetype,jdbcType=VARCHAR},
  177. </if>
  178. <if test="poOperator != null" >
  179. PO_Operator = #{poOperator,jdbcType=VARCHAR},
  180. </if>
  181. <if test="poOperattime != null" >
  182. PO_OperatTime = #{poOperattime,jdbcType=TIMESTAMP},
  183. </if>
  184. <if test="poCheckman != null" >
  185. PO_CheckMan = #{poCheckman,jdbcType=VARCHAR},
  186. </if>
  187. <if test="poOperattype != null" >
  188. PO_OperatType = #{poOperattype,jdbcType=INTEGER},
  189. </if>
  190. <if test="poOperatmode != null" >
  191. PO_OperatMode = #{poOperatmode,jdbcType=INTEGER},
  192. </if>
  193. <if test="poIsdel != null" >
  194. PO_IsDel = #{poIsdel,jdbcType=INTEGER},
  195. </if>
  196. <if test="poAdvicecode != null" >
  197. PO_AdviceCode = #{poAdvicecode,jdbcType=VARCHAR},
  198. </if>
  199. <if test="poBarcode != null" >
  200. PO_BarCode = #{poBarcode,jdbcType=VARCHAR},
  201. </if>
  202. </set>
  203. where PO_ID = #{poId,jdbcType=INTEGER}
  204. </update>
  205. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.base.mysqlmodel.ExecRecord" >
  206. update pda_order
  207. set PO_PatientNo = #{poPatientno,jdbcType=INTEGER},
  208. HI_ID = #{hiId,jdbcType=INTEGER},
  209. DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
  210. DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
  211. DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
  212. PO_AdviceGroupCode = #{poAdvicegroupcode,jdbcType=VARCHAR},
  213. PO_AdviceType = #{poAdvicetype,jdbcType=VARCHAR},
  214. PO_Operator = #{poOperator,jdbcType=VARCHAR},
  215. PO_OperatTime = #{poOperattime,jdbcType=TIMESTAMP},
  216. PO_CheckMan = #{poCheckman,jdbcType=VARCHAR},
  217. PO_OperatType = #{poOperattype,jdbcType=INTEGER},
  218. PO_OperatMode = #{poOperatmode,jdbcType=INTEGER},
  219. PO_IsDel = #{poIsdel,jdbcType=INTEGER},
  220. PO_AdviceCode = #{poAdvicecode,jdbcType=VARCHAR},
  221. PO_BarCode = #{poBarcode,jdbcType=VARCHAR}
  222. where PO_ID = #{poId,jdbcType=INTEGER}
  223. </update>
  224. <select id="selectByBarCodes" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  225. select
  226. <include refid="Base_Column_List" />
  227. from pda_order
  228. where PO_BarCode in <foreach item='item' index='index' collection='barCodes' open='(' separator=',' close=')'> #{item} </foreach>
  229. and PO_OperatType=#{operateType,jdbcType=VARCHAR}
  230. </select>
  231. </mapper>