Hl7ScanMapper.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  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.pubservice.mysqlmapper.Hl7ScanMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.pubservice.mysqlModel.Hl7Scan" >
  5. <id column="SeqNo" property="seqno" jdbcType="INTEGER" />
  6. <id column="ID" property="id" jdbcType="VARCHAR" />
  7. <result column="ChartNo" property="chartno" jdbcType="VARCHAR" />
  8. <result column="VisitNo" property="visitno" jdbcType="VARCHAR" />
  9. <result column="OtherNo1" property="otherno1" jdbcType="VARCHAR" />
  10. <result column="OtherNo2" property="otherno2" jdbcType="VARCHAR" />
  11. <result column="OtherNo3" property="otherno3" jdbcType="VARCHAR" />
  12. <result column="OtherName" property="othername" jdbcType="VARCHAR" />
  13. <result column="TaskType" property="tasktype" jdbcType="VARCHAR" />
  14. <result column="TaskStatus" property="taskstatus" jdbcType="INTEGER" />
  15. <result column="UpdateUser" property="updateuser" jdbcType="VARCHAR" />
  16. <result column="UpdateTime" property="updatetime" jdbcType="TIMESTAMP" />
  17. <result column="Reserve1" property="reserve1" jdbcType="VARCHAR" />
  18. <result column="Reserve2" property="reserve2" jdbcType="VARCHAR" />
  19. <result column="Reserve3" property="reserve3" jdbcType="VARCHAR" />
  20. <result column="IP" property="ip" jdbcType="VARCHAR" />
  21. <result column="MAC" property="mac" jdbcType="VARCHAR" />
  22. <result column="BeginTime" property="begintime" jdbcType="TIMESTAMP" />
  23. <result column="EndTime" property="endtime" jdbcType="TIMESTAMP" />
  24. <result column="Result" property="result" jdbcType="INTEGER" />
  25. <result column="TaskMsg" property="taskmsg" jdbcType="VARCHAR" />
  26. <result column="ResultTime" property="resulttime" jdbcType="TIMESTAMP" />
  27. <result column="ErrNum" property="errnum" jdbcType="INTEGER" />
  28. <result column="SysTime" property="systime" jdbcType="TIMESTAMP" />
  29. </resultMap>
  30. <sql id="Base_Column_List" >
  31. SeqNo, ID, ChartNo, VisitNo, OtherNo1, OtherNo2, OtherNo3, OtherName, TaskType, TaskStatus,
  32. UpdateUser, UpdateTime, Reserve1, Reserve2, Reserve3, IP, MAC, BeginTime, EndTime,
  33. Result, TaskMsg, ResultTime, ErrNum, SysTime
  34. </sql>
  35. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="com.xinxin.topro.pubservice.mysqlModel.Hl7ScanKey" >
  36. select
  37. <include refid="Base_Column_List" />
  38. from topprohl7.hl7_scan
  39. where SeqNo = #{seqno,jdbcType=INTEGER}
  40. and ID = #{id,jdbcType=VARCHAR}
  41. </select>
  42. <delete id="deleteByPrimaryKey" parameterType="com.xinxin.topro.pubservice.mysqlModel.Hl7ScanKey" >
  43. delete from topprohl7.hl7_scan
  44. where SeqNo = #{seqno,jdbcType=INTEGER}
  45. and ID = #{id,jdbcType=VARCHAR}
  46. </delete>
  47. <delete id="deleteByNameAndId">
  48. delete from topprohl7.hl7_scan
  49. where otherNo1 in
  50. <foreach collection="list" item="item" open="(" separator="," close=")">
  51. #{item}
  52. </foreach>
  53. and otherName= #{name}
  54. </delete>
  55. <insert id="insert" parameterType="com.xinxin.topro.pubservice.mysqlModel.Hl7Scan" >
  56. insert into topprohl7.hl7_scan (SeqNo, ID, ChartNo,
  57. VisitNo, OtherNo1, OtherNo2,
  58. OtherNo3, OtherName, TaskType,
  59. TaskStatus, UpdateUser, UpdateTime,
  60. Reserve1, Reserve2, Reserve3,
  61. IP, MAC, BeginTime,
  62. EndTime, Result, TaskMsg,
  63. ResultTime, ErrNum, SysTime
  64. )
  65. values (#{seqno,jdbcType=INTEGER}, #{id,jdbcType=VARCHAR}, #{chartno,jdbcType=VARCHAR},
  66. #{visitno,jdbcType=VARCHAR}, #{otherno1,jdbcType=VARCHAR}, #{otherno2,jdbcType=VARCHAR},
  67. #{otherno3,jdbcType=VARCHAR}, #{othername,jdbcType=VARCHAR}, #{tasktype,jdbcType=VARCHAR},
  68. #{taskstatus,jdbcType=INTEGER}, #{updateuser,jdbcType=VARCHAR}, #{updatetime,jdbcType=TIMESTAMP},
  69. #{reserve1,jdbcType=VARCHAR}, #{reserve2,jdbcType=VARCHAR}, #{reserve3,jdbcType=VARCHAR},
  70. #{ip,jdbcType=VARCHAR}, #{mac,jdbcType=VARCHAR}, #{begintime,jdbcType=TIMESTAMP},
  71. #{endtime,jdbcType=TIMESTAMP}, #{result,jdbcType=INTEGER}, #{taskmsg,jdbcType=VARCHAR},
  72. #{resulttime,jdbcType=TIMESTAMP}, #{errnum,jdbcType=INTEGER}, #{systime,jdbcType=TIMESTAMP}
  73. )
  74. </insert>
  75. <insert id="batchInsert" parameterType="java.util.List" >
  76. insert into topprohl7.hl7_scan (SeqNo, ID, ChartNo,
  77. VisitNo, OtherNo1, OtherNo2,
  78. OtherNo3, OtherName, TaskType,
  79. TaskStatus, UpdateUser, UpdateTime,
  80. Reserve1, Reserve2, Reserve3,
  81. IP, MAC, BeginTime,
  82. EndTime, Result, TaskMsg,
  83. ResultTime, ErrNum, SysTime
  84. )
  85. values <foreach collection="list" item="item" separator=",">
  86. (#{item.seqno,jdbcType=INTEGER}, #{item.id,jdbcType=VARCHAR}, #{item.chartno,jdbcType=VARCHAR},
  87. #{item.visitno,jdbcType=VARCHAR}, #{item.otherno1,jdbcType=VARCHAR}, #{item.otherno2,jdbcType=VARCHAR},
  88. #{item.otherno3,jdbcType=VARCHAR}, #{item.othername,jdbcType=VARCHAR}, #{item.tasktype,jdbcType=VARCHAR},
  89. #{item.taskstatus,jdbcType=INTEGER}, #{item.updateuser,jdbcType=VARCHAR}, #{item.updatetime,jdbcType=TIMESTAMP},
  90. #{item.reserve1,jdbcType=VARCHAR}, #{item.reserve2,jdbcType=VARCHAR}, #{item.reserve3,jdbcType=VARCHAR},
  91. #{item.ip,jdbcType=VARCHAR}, #{item.mac,jdbcType=VARCHAR}, #{item.begintime,jdbcType=TIMESTAMP},
  92. #{item.endtime,jdbcType=TIMESTAMP}, #{item.result,jdbcType=INTEGER}, #{item.taskmsg,jdbcType=VARCHAR},
  93. #{item.resulttime,jdbcType=TIMESTAMP}, #{item.errnum,jdbcType=INTEGER}, #{item.systime,jdbcType=TIMESTAMP}
  94. )
  95. </foreach>
  96. </insert>
  97. <insert id="batchInsertV2" parameterType="java.util.List" >
  98. insert into topprohl7.hl7_scan (ID, ChartNo,
  99. VisitNo, OtherNo1, OtherNo2,
  100. OtherNo3, OtherName, TaskType,
  101. TaskStatus, UpdateUser, UpdateTime,
  102. Reserve1, Reserve2, Reserve3,
  103. IP, MAC, BeginTime,
  104. EndTime, Result, TaskMsg,
  105. ResultTime, ErrNum, SysTime
  106. )
  107. values <foreach collection="list" item="item" separator=",">
  108. ( UUID(), #{item.chartno,jdbcType=VARCHAR},
  109. #{item.visitno,jdbcType=VARCHAR}, #{item.otherno1,jdbcType=VARCHAR}, #{item.otherno2,jdbcType=VARCHAR},
  110. #{item.otherno3,jdbcType=VARCHAR}, #{item.othername,jdbcType=VARCHAR}, #{item.tasktype,jdbcType=VARCHAR},
  111. #{item.taskstatus,jdbcType=INTEGER}, #{item.updateuser,jdbcType=VARCHAR}, #{item.updatetime,jdbcType=TIMESTAMP},
  112. #{item.reserve1,jdbcType=VARCHAR}, #{item.reserve2,jdbcType=VARCHAR}, #{item.reserve3,jdbcType=VARCHAR},
  113. #{item.ip,jdbcType=VARCHAR}, #{item.mac,jdbcType=VARCHAR}, #{item.begintime,jdbcType=TIMESTAMP},
  114. #{item.endtime,jdbcType=TIMESTAMP}, #{item.result,jdbcType=INTEGER}, #{item.taskmsg,jdbcType=VARCHAR},
  115. #{item.resulttime,jdbcType=TIMESTAMP}, #{item.errnum,jdbcType=INTEGER}, #{item.systime,jdbcType=TIMESTAMP}
  116. )
  117. </foreach>
  118. </insert>
  119. <insert id="insertSelective" parameterType="com.xinxin.topro.pubservice.mysqlModel.Hl7Scan" >
  120. insert into topprohl7.hl7_scan
  121. <trim prefix="(" suffix=")" suffixOverrides="," >
  122. <if test="seqno != null" >
  123. SeqNo,
  124. </if>
  125. <if test="id != null" >
  126. ID,
  127. </if>
  128. <if test="chartno != null" >
  129. ChartNo,
  130. </if>
  131. <if test="visitno != null" >
  132. VisitNo,
  133. </if>
  134. <if test="otherno1 != null" >
  135. OtherNo1,
  136. </if>
  137. <if test="otherno2 != null" >
  138. OtherNo2,
  139. </if>
  140. <if test="otherno3 != null" >
  141. OtherNo3,
  142. </if>
  143. <if test="othername != null" >
  144. OtherName,
  145. </if>
  146. <if test="tasktype != null" >
  147. TaskType,
  148. </if>
  149. <if test="taskstatus != null" >
  150. TaskStatus,
  151. </if>
  152. <if test="updateuser != null" >
  153. UpdateUser,
  154. </if>
  155. <if test="updatetime != null" >
  156. UpdateTime,
  157. </if>
  158. <if test="reserve1 != null" >
  159. Reserve1,
  160. </if>
  161. <if test="reserve2 != null" >
  162. Reserve2,
  163. </if>
  164. <if test="reserve3 != null" >
  165. Reserve3,
  166. </if>
  167. <if test="ip != null" >
  168. IP,
  169. </if>
  170. <if test="mac != null" >
  171. MAC,
  172. </if>
  173. <if test="begintime != null" >
  174. BeginTime,
  175. </if>
  176. <if test="endtime != null" >
  177. EndTime,
  178. </if>
  179. <if test="result != null" >
  180. Result,
  181. </if>
  182. <if test="taskmsg != null" >
  183. TaskMsg,
  184. </if>
  185. <if test="resulttime != null" >
  186. ResultTime,
  187. </if>
  188. <if test="errnum != null" >
  189. ErrNum,
  190. </if>
  191. <if test="systime != null" >
  192. SysTime,
  193. </if>
  194. </trim>
  195. <trim prefix="values (" suffix=")" suffixOverrides="," >
  196. <if test="seqno != null" >
  197. #{seqno,jdbcType=INTEGER},
  198. </if>
  199. <if test="id != null" >
  200. #{id,jdbcType=VARCHAR},
  201. </if>
  202. <if test="chartno != null" >
  203. #{chartno,jdbcType=VARCHAR},
  204. </if>
  205. <if test="visitno != null" >
  206. #{visitno,jdbcType=VARCHAR},
  207. </if>
  208. <if test="otherno1 != null" >
  209. #{otherno1,jdbcType=VARCHAR},
  210. </if>
  211. <if test="otherno2 != null" >
  212. #{otherno2,jdbcType=VARCHAR},
  213. </if>
  214. <if test="otherno3 != null" >
  215. #{otherno3,jdbcType=VARCHAR},
  216. </if>
  217. <if test="othername != null" >
  218. #{othername,jdbcType=VARCHAR},
  219. </if>
  220. <if test="tasktype != null" >
  221. #{tasktype,jdbcType=VARCHAR},
  222. </if>
  223. <if test="taskstatus != null" >
  224. #{taskstatus,jdbcType=INTEGER},
  225. </if>
  226. <if test="updateuser != null" >
  227. #{updateuser,jdbcType=VARCHAR},
  228. </if>
  229. <if test="updatetime != null" >
  230. #{updatetime,jdbcType=TIMESTAMP},
  231. </if>
  232. <if test="reserve1 != null" >
  233. #{reserve1,jdbcType=VARCHAR},
  234. </if>
  235. <if test="reserve2 != null" >
  236. #{reserve2,jdbcType=VARCHAR},
  237. </if>
  238. <if test="reserve3 != null" >
  239. #{reserve3,jdbcType=VARCHAR},
  240. </if>
  241. <if test="ip != null" >
  242. #{ip,jdbcType=VARCHAR},
  243. </if>
  244. <if test="mac != null" >
  245. #{mac,jdbcType=VARCHAR},
  246. </if>
  247. <if test="begintime != null" >
  248. #{begintime,jdbcType=TIMESTAMP},
  249. </if>
  250. <if test="endtime != null" >
  251. #{endtime,jdbcType=TIMESTAMP},
  252. </if>
  253. <if test="result != null" >
  254. #{result,jdbcType=INTEGER},
  255. </if>
  256. <if test="taskmsg != null" >
  257. #{taskmsg,jdbcType=VARCHAR},
  258. </if>
  259. <if test="resulttime != null" >
  260. #{resulttime,jdbcType=TIMESTAMP},
  261. </if>
  262. <if test="errnum != null" >
  263. #{errnum,jdbcType=INTEGER},
  264. </if>
  265. <if test="systime != null" >
  266. #{systime,jdbcType=TIMESTAMP},
  267. </if>
  268. </trim>
  269. </insert>
  270. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.pubservice.mysqlModel.Hl7Scan" >
  271. update topprohl7.hl7_scan
  272. <set >
  273. <if test="chartno != null" >
  274. ChartNo = #{chartno,jdbcType=VARCHAR},
  275. </if>
  276. <if test="visitno != null" >
  277. VisitNo = #{visitno,jdbcType=VARCHAR},
  278. </if>
  279. <if test="otherno1 != null" >
  280. OtherNo1 = #{otherno1,jdbcType=VARCHAR},
  281. </if>
  282. <if test="otherno2 != null" >
  283. OtherNo2 = #{otherno2,jdbcType=VARCHAR},
  284. </if>
  285. <if test="otherno3 != null" >
  286. OtherNo3 = #{otherno3,jdbcType=VARCHAR},
  287. </if>
  288. <if test="othername != null" >
  289. OtherName = #{othername,jdbcType=VARCHAR},
  290. </if>
  291. <if test="tasktype != null" >
  292. TaskType = #{tasktype,jdbcType=VARCHAR},
  293. </if>
  294. <if test="taskstatus != null" >
  295. TaskStatus = #{taskstatus,jdbcType=INTEGER},
  296. </if>
  297. <if test="updateuser != null" >
  298. UpdateUser = #{updateuser,jdbcType=VARCHAR},
  299. </if>
  300. <if test="updatetime != null" >
  301. UpdateTime = #{updatetime,jdbcType=TIMESTAMP},
  302. </if>
  303. <if test="reserve1 != null" >
  304. Reserve1 = #{reserve1,jdbcType=VARCHAR},
  305. </if>
  306. <if test="reserve2 != null" >
  307. Reserve2 = #{reserve2,jdbcType=VARCHAR},
  308. </if>
  309. <if test="reserve3 != null" >
  310. Reserve3 = #{reserve3,jdbcType=VARCHAR},
  311. </if>
  312. <if test="ip != null" >
  313. IP = #{ip,jdbcType=VARCHAR},
  314. </if>
  315. <if test="mac != null" >
  316. MAC = #{mac,jdbcType=VARCHAR},
  317. </if>
  318. <if test="begintime != null" >
  319. BeginTime = #{begintime,jdbcType=TIMESTAMP},
  320. </if>
  321. <if test="endtime != null" >
  322. EndTime = #{endtime,jdbcType=TIMESTAMP},
  323. </if>
  324. <if test="result != null" >
  325. Result = #{result,jdbcType=INTEGER},
  326. </if>
  327. <if test="taskmsg != null" >
  328. TaskMsg = #{taskmsg,jdbcType=VARCHAR},
  329. </if>
  330. <if test="resulttime != null" >
  331. ResultTime = #{resulttime,jdbcType=TIMESTAMP},
  332. </if>
  333. <if test="errnum != null" >
  334. ErrNum = #{errnum,jdbcType=INTEGER},
  335. </if>
  336. <if test="systime != null" >
  337. SysTime = #{systime,jdbcType=TIMESTAMP},
  338. </if>
  339. </set>
  340. where SeqNo = #{seqno,jdbcType=INTEGER}
  341. and ID = #{id,jdbcType=VARCHAR}
  342. </update>
  343. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.pubservice.mysqlModel.Hl7Scan" >
  344. update topprohl7.hl7_scan
  345. set ChartNo = #{chartno,jdbcType=VARCHAR},
  346. VisitNo = #{visitno,jdbcType=VARCHAR},
  347. OtherNo1 = #{otherno1,jdbcType=VARCHAR},
  348. OtherNo2 = #{otherno2,jdbcType=VARCHAR},
  349. OtherNo3 = #{otherno3,jdbcType=VARCHAR},
  350. OtherName = #{othername,jdbcType=VARCHAR},
  351. TaskType = #{tasktype,jdbcType=VARCHAR},
  352. TaskStatus = #{taskstatus,jdbcType=INTEGER},
  353. UpdateUser = #{updateuser,jdbcType=VARCHAR},
  354. UpdateTime = #{updatetime,jdbcType=TIMESTAMP},
  355. Reserve1 = #{reserve1,jdbcType=VARCHAR},
  356. Reserve2 = #{reserve2,jdbcType=VARCHAR},
  357. Reserve3 = #{reserve3,jdbcType=VARCHAR},
  358. IP = #{ip,jdbcType=VARCHAR},
  359. MAC = #{mac,jdbcType=VARCHAR},
  360. BeginTime = #{begintime,jdbcType=TIMESTAMP},
  361. EndTime = #{endtime,jdbcType=TIMESTAMP},
  362. Result = #{result,jdbcType=INTEGER},
  363. TaskMsg = #{taskmsg,jdbcType=VARCHAR},
  364. ResultTime = #{resulttime,jdbcType=TIMESTAMP},
  365. ErrNum = #{errnum,jdbcType=INTEGER},
  366. SysTime = #{systime,jdbcType=TIMESTAMP}
  367. where SeqNo = #{seqno,jdbcType=INTEGER}
  368. and ID = #{id,jdbcType=VARCHAR}
  369. </update>
  370. </mapper>