InpRecureRecordMapper.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  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.InpRecureRecordMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRecureRecord" >
  5. <id column="id" property="id" jdbcType="INTEGER" />
  6. <result column="patient_no" property="patientNo" jdbcType="VARCHAR" />
  7. <result column="dd_dep_dm" property="ddDepDm" jdbcType="VARCHAR" />
  8. <result column="dw_ward_dm" property="dwWardDm" jdbcType="VARCHAR" />
  9. <result column="db_bed_no" property="dbBedNo" jdbcType="VARCHAR" />
  10. <result column="recure_item" property="recureItem" jdbcType="VARCHAR" />
  11. <result column="recure_name" property="recureName" jdbcType="VARCHAR" />
  12. <result column="recure_target_code" property="recureTargetCode" jdbcType="VARCHAR" />
  13. <result column="recure_target_name" property="recureTargetName" jdbcType="VARCHAR" />
  14. <result column="neat" property="neat" jdbcType="INTEGER" />
  15. <result column="coordinate" property="coordinate" jdbcType="INTEGER" />
  16. <result column="obey" property="obey" jdbcType="INTEGER" />
  17. <result column="initiative" property="initiative" jdbcType="INTEGER" />
  18. <result column="persistence" property="persistence" jdbcType="INTEGER" />
  19. <result column="attention" property="attention" jdbcType="INTEGER" />
  20. <result column="achievements" property="achievements" jdbcType="INTEGER" />
  21. <result column="communication" property="communication" jdbcType="INTEGER" />
  22. <result column="total_score" property="totalScore" jdbcType="INTEGER" />
  23. <result column="clinical_feedback" property="clinicalFeedback" jdbcType="VARCHAR" />
  24. <result column="irt_recordor" property="irtRecordor" jdbcType="VARCHAR" />
  25. <result column="irt_record_time" property="irtRecordTime" jdbcType="TIMESTAMP" />
  26. <result column="irt_operation_time" property="irtOperationTime" jdbcType="TIMESTAMP" />
  27. <result column="irt_operator" property="irtOperator" jdbcType="VARCHAR" />
  28. <result column="del_flag" property="delFlag" jdbcType="BIT" />
  29. <result column="irt_stage" property="irtStage" jdbcType="INTEGER" />
  30. <result column="irt_time" property="irtTime" jdbcType="VARCHAR" />
  31. </resultMap>
  32. <sql id="Base_Column_List" >
  33. id, patient_no, dd_dep_dm, dw_ward_dm, db_bed_no, recure_item, recure_name, recure_target_code,
  34. recure_target_name, neat, coordinate, obey, initiative, persistence, attention, achievements,
  35. communication, total_score, clinical_feedback, irt_recordor, irt_record_time, irt_operation_time,
  36. irt_operator, del_flag, irt_stage, irt_time
  37. </sql>
  38. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  39. select
  40. <include refid="Base_Column_List" />
  41. from inp_recure_record
  42. where id = #{id,jdbcType=INTEGER}
  43. </select>
  44. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  45. delete from inp_recure_record
  46. where id = #{id,jdbcType=INTEGER}
  47. </delete>
  48. <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRecureRecord" >
  49. insert into inp_recure_record (id, patient_no, dd_dep_dm,
  50. dw_ward_dm, db_bed_no, recure_item,
  51. recure_name, recure_target_code, recure_target_name,
  52. neat, coordinate, obey,
  53. initiative, persistence, attention,
  54. achievements, communication, total_score,
  55. clinical_feedback, irt_recordor, irt_record_time,
  56. irt_operation_time, irt_operator, del_flag, irt_stage, irt_time
  57. )
  58. values (#{id,jdbcType=INTEGER}, #{patientNo,jdbcType=VARCHAR}, #{ddDepDm,jdbcType=VARCHAR},
  59. #{dwWardDm,jdbcType=VARCHAR}, #{dbBedNo,jdbcType=VARCHAR}, #{recureItem,jdbcType=VARCHAR},
  60. #{recureName,jdbcType=VARCHAR}, #{recureTargetCode,jdbcType=VARCHAR}, #{recureTargetName,jdbcType=VARCHAR},
  61. #{neat,jdbcType=INTEGER}, #{coordinate,jdbcType=INTEGER}, #{obey,jdbcType=INTEGER},
  62. #{initiative,jdbcType=INTEGER}, #{persistence,jdbcType=INTEGER}, #{attention,jdbcType=INTEGER},
  63. #{achievements,jdbcType=INTEGER}, #{communication,jdbcType=INTEGER}, #{totalScore,jdbcType=INTEGER},
  64. #{clinicalFeedback,jdbcType=VARCHAR}, #{irtRecordor,jdbcType=VARCHAR}, #{irtRecordTime,jdbcType=TIMESTAMP},
  65. #{irtOperationTime,jdbcType=TIMESTAMP}, #{irtOperator,jdbcType=VARCHAR}, #{delFlag,jdbcType=BIT},
  66. #{irtStage, jdbcType=INTEGER}, #{irtTime, jdbcType=VARCHAR}
  67. )
  68. </insert>
  69. <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRecureRecord" >
  70. insert into inp_recure_record
  71. <trim prefix="(" suffix=")" suffixOverrides="," >
  72. <if test="id != null" >
  73. id,
  74. </if>
  75. <if test="patientNo != null" >
  76. patient_no,
  77. </if>
  78. <if test="ddDepDm != null" >
  79. dd_dep_dm,
  80. </if>
  81. <if test="dwWardDm != null" >
  82. dw_ward_dm,
  83. </if>
  84. <if test="dbBedNo != null" >
  85. db_bed_no,
  86. </if>
  87. <if test="recureItem != null" >
  88. recure_item,
  89. </if>
  90. <if test="recureName != null" >
  91. recure_name,
  92. </if>
  93. <if test="recureTargetCode != null" >
  94. recure_target_code,
  95. </if>
  96. <if test="recureTargetName != null" >
  97. recure_target_name,
  98. </if>
  99. <if test="neat != null" >
  100. neat,
  101. </if>
  102. <if test="coordinate != null" >
  103. coordinate,
  104. </if>
  105. <if test="obey != null" >
  106. obey,
  107. </if>
  108. <if test="initiative != null" >
  109. initiative,
  110. </if>
  111. <if test="persistence != null" >
  112. persistence,
  113. </if>
  114. <if test="attention != null" >
  115. attention,
  116. </if>
  117. <if test="achievements != null" >
  118. achievements,
  119. </if>
  120. <if test="communication != null" >
  121. communication,
  122. </if>
  123. <if test="totalScore != null" >
  124. total_score,
  125. </if>
  126. <if test="clinicalFeedback != null" >
  127. clinical_feedback,
  128. </if>
  129. <if test="irtRecordor != null" >
  130. irt_recordor,
  131. </if>
  132. <if test="irtRecordTime != null" >
  133. irt_record_time,
  134. </if>
  135. <if test="irtOperationTime != null" >
  136. irt_operation_time,
  137. </if>
  138. <if test="irtOperator != null" >
  139. irt_operator,
  140. </if>
  141. <if test="delFlag != null" >
  142. del_flag,
  143. </if>
  144. <if test="irtStage != null" >
  145. irt_stage,
  146. </if>
  147. <if test="irtTime != null" >
  148. irt_time,
  149. </if>
  150. </trim>
  151. <trim prefix="values (" suffix=")" suffixOverrides="," >
  152. <if test="id != null" >
  153. #{id,jdbcType=INTEGER},
  154. </if>
  155. <if test="patientNo != null" >
  156. #{patientNo,jdbcType=VARCHAR},
  157. </if>
  158. <if test="ddDepDm != null" >
  159. #{ddDepDm,jdbcType=VARCHAR},
  160. </if>
  161. <if test="dwWardDm != null" >
  162. #{dwWardDm,jdbcType=VARCHAR},
  163. </if>
  164. <if test="dbBedNo != null" >
  165. #{dbBedNo,jdbcType=VARCHAR},
  166. </if>
  167. <if test="recureItem != null" >
  168. #{recureItem,jdbcType=VARCHAR},
  169. </if>
  170. <if test="recureName != null" >
  171. #{recureName,jdbcType=VARCHAR},
  172. </if>
  173. <if test="recureTargetCode != null" >
  174. #{recureTargetCode,jdbcType=VARCHAR},
  175. </if>
  176. <if test="recureTargetName != null" >
  177. #{recureTargetName,jdbcType=VARCHAR},
  178. </if>
  179. <if test="neat != null" >
  180. #{neat,jdbcType=INTEGER},
  181. </if>
  182. <if test="coordinate != null" >
  183. #{coordinate,jdbcType=INTEGER},
  184. </if>
  185. <if test="obey != null" >
  186. #{obey,jdbcType=INTEGER},
  187. </if>
  188. <if test="initiative != null" >
  189. #{initiative,jdbcType=INTEGER},
  190. </if>
  191. <if test="persistence != null" >
  192. #{persistence,jdbcType=INTEGER},
  193. </if>
  194. <if test="attention != null" >
  195. #{attention,jdbcType=INTEGER},
  196. </if>
  197. <if test="achievements != null" >
  198. #{achievements,jdbcType=INTEGER},
  199. </if>
  200. <if test="communication != null" >
  201. #{communication,jdbcType=INTEGER},
  202. </if>
  203. <if test="totalScore != null" >
  204. #{totalScore,jdbcType=INTEGER},
  205. </if>
  206. <if test="clinicalFeedback != null" >
  207. #{clinicalFeedback,jdbcType=VARCHAR},
  208. </if>
  209. <if test="irtRecordor != null" >
  210. #{irtRecordor,jdbcType=VARCHAR},
  211. </if>
  212. <if test="irtRecordTime != null" >
  213. #{irtRecordTime,jdbcType=TIMESTAMP},
  214. </if>
  215. <if test="irtOperationTime != null" >
  216. #{irtOperationTime,jdbcType=TIMESTAMP},
  217. </if>
  218. <if test="irtOperator != null" >
  219. #{irtOperator,jdbcType=VARCHAR},
  220. </if>
  221. <if test="delFlag != null" >
  222. #{delFlag,jdbcType=BIT},
  223. </if>
  224. <if test="irtStage != null" >
  225. #{irtStage, jdbcType=INTEGER},
  226. </if>
  227. <if test="irtTime != null" >
  228. #{irtTime, jdbcType=VARCHAR},
  229. </if>
  230. </trim>
  231. </insert>
  232. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRecureRecord" >
  233. update inp_recure_record
  234. <set >
  235. <if test="patientNo != null" >
  236. patient_no = #{patientNo,jdbcType=VARCHAR},
  237. </if>
  238. <if test="ddDepDm != null" >
  239. dd_dep_dm = #{ddDepDm,jdbcType=VARCHAR},
  240. </if>
  241. <if test="dwWardDm != null" >
  242. dw_ward_dm = #{dwWardDm,jdbcType=VARCHAR},
  243. </if>
  244. <if test="dbBedNo != null" >
  245. db_bed_no = #{dbBedNo,jdbcType=VARCHAR},
  246. </if>
  247. <if test="recureItem != null" >
  248. recure_item = #{recureItem,jdbcType=VARCHAR},
  249. </if>
  250. <if test="recureName != null" >
  251. recure_name = #{recureName,jdbcType=VARCHAR},
  252. </if>
  253. <if test="recureTargetCode != null" >
  254. recure_target_code = #{recureTargetCode,jdbcType=VARCHAR},
  255. </if>
  256. <if test="recureTargetName != null" >
  257. recure_target_name = #{recureTargetName,jdbcType=VARCHAR},
  258. </if>
  259. <if test="neat != null" >
  260. neat = #{neat,jdbcType=INTEGER},
  261. </if>
  262. <if test="coordinate != null" >
  263. coordinate = #{coordinate,jdbcType=INTEGER},
  264. </if>
  265. <if test="obey != null" >
  266. obey = #{obey,jdbcType=INTEGER},
  267. </if>
  268. <if test="initiative != null" >
  269. initiative = #{initiative,jdbcType=INTEGER},
  270. </if>
  271. <if test="persistence != null" >
  272. persistence = #{persistence,jdbcType=INTEGER},
  273. </if>
  274. <if test="attention != null" >
  275. attention = #{attention,jdbcType=INTEGER},
  276. </if>
  277. <if test="achievements != null" >
  278. achievements = #{achievements,jdbcType=INTEGER},
  279. </if>
  280. <if test="communication != null" >
  281. communication = #{communication,jdbcType=INTEGER},
  282. </if>
  283. <if test="totalScore != null" >
  284. total_score = #{totalScore,jdbcType=INTEGER},
  285. </if>
  286. <if test="clinicalFeedback != null" >
  287. clinical_feedback = #{clinicalFeedback,jdbcType=VARCHAR},
  288. </if>
  289. <if test="irtRecordor != null" >
  290. irt_recordor = #{irtRecordor,jdbcType=VARCHAR},
  291. </if>
  292. <if test="irtRecordTime != null" >
  293. irt_record_time = #{irtRecordTime,jdbcType=TIMESTAMP},
  294. </if>
  295. <if test="irtOperationTime != null" >
  296. irt_operation_time = #{irtOperationTime,jdbcType=TIMESTAMP},
  297. </if>
  298. <if test="irtOperator != null" >
  299. irt_operator = #{irtOperator,jdbcType=VARCHAR},
  300. </if>
  301. <if test="delFlag != null" >
  302. del_flag = #{delFlag,jdbcType=BIT},
  303. </if>
  304. <if test="irtStage != null" >
  305. irt_stage = #{irtStage, jdbcType=INTEGER},
  306. </if>
  307. <if test="irtTime != null" >
  308. irt_time = #{irtTime, jdbcType=VARCHAR},
  309. </if>
  310. </set>
  311. where id = #{id,jdbcType=INTEGER}
  312. </update>
  313. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRecureRecord" >
  314. update inp_recure_record
  315. set patient_no = #{patientNo,jdbcType=VARCHAR},
  316. dd_dep_dm = #{ddDepDm,jdbcType=VARCHAR},
  317. dw_ward_dm = #{dwWardDm,jdbcType=VARCHAR},
  318. db_bed_no = #{dbBedNo,jdbcType=VARCHAR},
  319. recure_item = #{recureItem,jdbcType=VARCHAR},
  320. recure_name = #{recureName,jdbcType=VARCHAR},
  321. recure_target_code = #{recureTargetCode,jdbcType=VARCHAR},
  322. recure_target_name = #{recureTargetName,jdbcType=VARCHAR},
  323. neat = #{neat,jdbcType=INTEGER},
  324. coordinate = #{coordinate,jdbcType=INTEGER},
  325. obey = #{obey,jdbcType=INTEGER},
  326. initiative = #{initiative,jdbcType=INTEGER},
  327. persistence = #{persistence,jdbcType=INTEGER},
  328. attention = #{attention,jdbcType=INTEGER},
  329. achievements = #{achievements,jdbcType=INTEGER},
  330. communication = #{communication,jdbcType=INTEGER},
  331. total_score = #{totalScore,jdbcType=INTEGER},
  332. clinical_feedback = #{clinicalFeedback,jdbcType=VARCHAR},
  333. irt_recordor = #{irtRecordor,jdbcType=VARCHAR},
  334. irt_record_time = #{irtRecordTime,jdbcType=TIMESTAMP},
  335. irt_operation_time = #{irtOperationTime,jdbcType=TIMESTAMP},
  336. irt_operator = #{irtOperator,jdbcType=VARCHAR},
  337. del_flag = #{delFlag,jdbcType=BIT},
  338. irt_stage = #{irtStage, jdbcType=INTEGER},
  339. irt_time = #{irtTime, jdbcType=VARCHAR}
  340. where id = #{id,jdbcType=INTEGER}
  341. </update>
  342. <select id="selectByPatientNo" resultMap="BaseResultMap">
  343. select
  344. <include refid="Base_Column_List" />
  345. from inp_recure_record
  346. where patient_no = #{patientNo,jdbcType=VARCHAR}
  347. and del_flag = 0
  348. order by irt_record_time desc
  349. </select>
  350. <select id="selectSameStageIds" resultType="java.lang.Integer" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRecureRecord">
  351. SELECT id FROM inp_recure_record
  352. <where>
  353. <if test="patientNo != null">
  354. AND patient_no = #{patientNo}
  355. </if>
  356. <if test="recureItem != null ">
  357. AND recure_item = #{recureItem}
  358. </if>
  359. <if test="irtStage != null ">
  360. AND irt_stage &lt; #{irtStage}
  361. </if>
  362. and del_flag = 0
  363. </where>
  364. </select>
  365. <select id="selectByQuery" resultMap="BaseResultMap" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRecureRecord">
  366. select
  367. <include refid="Base_Column_List" />
  368. from inp_recure_record
  369. <where>
  370. <if test="patientNo != null">
  371. AND patient_no = #{patientNo}
  372. </if>
  373. <if test="recureItem != null ">
  374. AND recure_item = #{recureItem}
  375. </if>
  376. and del_flag = 0
  377. </where>
  378. order by irt_record_time desc
  379. </select>
  380. </mapper>