InpAuditSoreMapper.xml 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699
  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.InpAuditSoreMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpAuditSore" >
  5. <id column="IAS_ID" property="iasId" jdbcType="INTEGER" />
  6. <result column="PatientNo" property="patientno" jdbcType="VARCHAR" />
  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="IAS_SoreId" property="iasSoreid" jdbcType="VARCHAR" />
  12. <result column="IAS_RiskId" property="iasRiskid" jdbcType="VARCHAR" />
  13. <result column="IAS_PressureId" property="iasPressureId" jdbcType="INTEGER"/>
  14. <result column="IAS_IsExamHZ" property="iasIsExamHlb" jdbcType="INTEGER"/>
  15. <result column="IAS_IsHzAuditor" property="iasIsHlbAuditor" jdbcType="VARCHAR"/>
  16. <result column="IAS_IsExamHLB" property="iasIsEndState" jdbcType="INTEGER"/>
  17. <result column="IAS_IsHlbAuditor" property="iasIsHlbAuditor" jdbcType="VARCHAR"/>
  18. <result column="IAS_IsEndState" property="iasIsOutComeEnd" jdbcType="INTEGER"/>
  19. <result column="IAS_AuditorPerson" property="iasAuditorPerson" jdbcType="VARCHAR"/>
  20. <result column="IAS_IsOutComeEnd" property="iasIsEndState" jdbcType="INTEGER"/>
  21. <result column="IAS_Init" property="iasInit" jdbcType="INTEGER" />
  22. <result column="IAS_Score" property="iasScore" jdbcType="DOUBLE" />
  23. <result column="IAS_Size" property="iasSize" jdbcType="VARCHAR" />
  24. <result column="IAS_Position" property="iasPosition" jdbcType="VARCHAR" />
  25. <result column="IAS_bradenSource" property="bradenSource" jdbcType="VARCHAR"/>
  26. <result column="IAS_Classification" property="iasClassification" jdbcType="VARCHAR" />
  27. <result column="IAS_Outcome" property="iasOutcome" jdbcType="VARCHAR" />
  28. <result column="IAS_Whereabouts" property="iasWhereabouts" jdbcType="VARCHAR" />
  29. <result column="IAS_IsEnd" property="iasIsend" jdbcType="INTEGER" />
  30. <result column="IAS_IsEndTime" property="iasIsendtime" jdbcType="TIMESTAMP" />
  31. <result column="IAS_IsExam" property="iasIsexam" jdbcType="INTEGER" />
  32. <result column="IAS_IsPrint" property="iasIsprint" jdbcType="INTEGER" />
  33. <result column="IAS_IsAudit" property="iasIsaudit" jdbcType="INTEGER" />
  34. <result column="IAS_Recordor" property="iasRecordor" jdbcType="VARCHAR" />
  35. <result column="IAS_Record_Time" property="iasRecordTime" jdbcType="TIMESTAMP" />
  36. <result column="IAS_Auditor1" property="iasAuditor1" jdbcType="VARCHAR" />
  37. <result column="IAS_AuditorDetail1" property="iasAuditordetail1" jdbcType="VARCHAR" />
  38. <result column="IAS_Auditor_Time1" property="iasAuditorTime1" jdbcType="TIMESTAMP" />
  39. <result column="IAS_Auditor2" property="iasAuditor2" jdbcType="VARCHAR" />
  40. <result column="IAS_AuditorDetail2" property="iasAuditordetail2" jdbcType="VARCHAR" />
  41. <result column="IAS_Auditor_Time2" property="iasAuditorTime2" jdbcType="TIMESTAMP" />
  42. <result column="IAS_Operation_Time" property="iasOperationTime" jdbcType="TIMESTAMP" />
  43. <result column="IAS_Operator" property="iasOperator" jdbcType="VARCHAR" />
  44. <result column="IAS_IsDel" property="iasIsdel" jdbcType="INTEGER" />
  45. <result column="IAS_IsEndDetail" property="iasIsEndDetail" jdbcType="VARCHAR" />
  46. </resultMap>
  47. <sql id="Base_Column_List" >
  48. IAS_ID, PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, IAS_SoreId, IAS_RiskId, IAS_PressureId,
  49. IAS_IsExamHZ,IAS_IsExamHLB,IAS_IsHzAuditor,IAS_IsHlbAuditor,IAS_IsEndState,IAS_IsOutComeEnd,IAS_Init, IAS_Score, IAS_Size, IAS_Position,
  50. IAS_Classification, IAS_bradenSource,IAS_Outcome,IAS_AuditorPerson, IAS_Whereabouts,
  51. IAS_IsEnd, IAS_IsEndTime, IAS_IsExam, IAS_IsPrint, IAS_IsAudit, IAS_Recordor, IAS_Record_Time,
  52. IAS_Auditor1, IAS_AuditorDetail1, IAS_Auditor_Time1, IAS_Auditor2, IAS_AuditorDetail2,
  53. IAS_Auditor_Time2, IAS_Operation_Time, IAS_Operator, IAS_IsDel, IAS_IsEndDetail
  54. </sql>
  55. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  56. select
  57. <include refid="Base_Column_List" />
  58. from inp_audit_sore
  59. where IAS_IsDel = 0 and IAS_ID = #{iasId,jdbcType=INTEGER}
  60. </select>
  61. <select id="selectSearchList" resultMap="BaseResultMap" parameterType="com.xinxin.topro.inpnurseservice.request.InpAuditSoreSearchRequest" >
  62. select
  63. <include refid="Base_Column_List" />
  64. from inp_audit_sore
  65. where IAS_IsDel = 0
  66. <if test="beginDate != null" >
  67. and IAS_Record_Time <![CDATA[>=]]> #{beginDate}
  68. </if>
  69. <if test="endDate != null" >
  70. and IAS_Record_Time <![CDATA[<=]]>#{endDate}
  71. </if>
  72. <if test="hiId != null" >
  73. and HI_ID = #{hiId,jdbcType=INTEGER}
  74. </if>
  75. <if test="dwWarddm != null" >
  76. and DW_WardDm = #{dwWarddm,jdbcType=VARCHAR}
  77. </if>
  78. <if test="isAuditState != null" >
  79. and
  80. <if test="isAuditState == 1">
  81. ias.IAS_IsExamHZ = 1
  82. </if>
  83. <if test="isAuditState == 2">
  84. IAS_IsExamHLB = 1
  85. </if>
  86. <if test="isAuditState == 3">
  87. IAS_IsOutComeEnd=1
  88. </if>
  89. </if>
  90. <if test="iasIsEndState != null" >
  91. and ias.IAS_IsEndState = #{iasIsEndState,jdbcType=INTEGER}
  92. </if>
  93. <if test="patientNo != null" >
  94. and PatientNo = #{patientNo,jdbcType=VARCHAR}
  95. </if>
  96. order by IAS_Record_Time desc
  97. </select>
  98. <select id="selectList" resultType="com.xinxin.topro.inpnurseservice.response.InpAuditSoreListLSResponse" parameterType="com.xinxin.topro.inpnurseservice.request.InpAuditLSSoreSearchRequest" >
  99. select
  100. ias.IAS_ID as iasId,ias.HI_ID as hiId,vp.DB_BedNo as dbBedno,ias.DW_WardDm as dwWardDm, ias.IAS_Recordor as iasRecordor,
  101. ias.IAS_SoreId as iasSoreid,ias.IAS_RiskId as iasRiskId,ias.PatientNo as patientNo,ias.IAS_PressureId as iasPressureId,
  102. ias.IAS_IsHzAuditor as iasHzAuditor,ias.IAS_IsHlbAuditor as iasHlbAuditor,ias.IAS_bradenSource as bradenSource,ias.IAS_AuditorPerson as iasAuditorPerson,
  103. ias.IAS_Init as iasInit,ias.IAS_Score as iasScore,ias.IAS_Size as iasSize,ias.IAS_Position as iasPosition,
  104. ias.IAS_Classification as iasClassification,ias.IAS_Outcome as iasOutcome,ias.IAS_Whereabouts as iasWhereabouts,
  105. ias.IAS_IsExam as iasIsexam,ias.IAS_IsPrint as iasIsprint,ias.IAS_Record_Time as iasRecordTime,ias.IAS_IsEndTime as iasIsendtime,
  106. ias.IAS_IsEndDetail as iasIsEndDetail,
  107. vp.IP_Name as ptName,(
  108. CASE vp.IP_Sex
  109. WHEN 1 THEN
  110. '男'
  111. WHEN 2 THEN
  112. '女'
  113. ELSE
  114. '未知'
  115. END
  116. ) AS `Gender`,vp.IP_Med_Rec as ChartNo,
  117. f_getAge(vp.IP_Birth,vp.IP_Admit_Time) as age,vp.IP_Admit_Time as adminTime,vp.IP_Admit_Diagnosis as DiagName,dw.DW_WardName as DepartName
  118. from inp_audit_sore ias
  119. inner join inp_patient vp on ias.PatientNo = vp.IP_PatientNo
  120. inner join dic_ward dw on ias.DW_WardDm = dw.DW_WardDm
  121. where ias.IAS_IsDel = 0
  122. <if test="beginDate != null" >
  123. and ias.IAS_Record_Time <![CDATA[>=]]> #{beginDate}
  124. </if>
  125. <if test="endDate != null" >
  126. and ias.IAS_Record_Time <![CDATA[<=]]>#{endDate}
  127. </if>
  128. <if test="hiId != null" >
  129. and ias.HI_ID = #{hiId,jdbcType=INTEGER}
  130. </if>
  131. <if test="dwWarddm != null and dwWarddm != ''" >
  132. and ias.DW_WardDm = #{dwWarddm,jdbcType=VARCHAR}
  133. </if>
  134. <if test="isAuditState != null" >
  135. and
  136. <if test="isAuditState==1">
  137. ias.IAS_IsExamHZ = 1
  138. </if>
  139. <if test="isAuditState==2">
  140. IAS_IsExamHLB = 1
  141. </if>
  142. <if test="isAuditState ==3">
  143. IAS_IsOutComeEnd=1
  144. </if>
  145. </if>
  146. <if test="iasIsEndState != null" >
  147. and ias.IAS_IsEndState = #{iasIsEndState,jdbcType=INTEGER}
  148. </if>
  149. <if test="patientNo != null" >
  150. and ias.PatientNo = #{patientNo,jdbcType=VARCHAR}
  151. </if>
  152. <if test="chartNo != null and chartNo != ''" >
  153. and vp.IP_Med_Rec = #{chartNo,jdbcType=VARCHAR}
  154. </if>
  155. order by ias.IAS_Record_Time desc
  156. </select>
  157. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  158. delete from inp_audit_sore
  159. where IAS_ID = #{iasId,jdbcType=INTEGER}
  160. </delete>
  161. <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpAuditSore" >
  162. insert into inp_audit_sore (IAS_ID, PatientNo, HI_ID,
  163. DD_DepDm, DW_WardDm, DB_BedNo,
  164. IAS_SoreId, IAS_RiskId,IAS_PressureId,
  165. IAS_IsExamHZ,IAS_IsHzAuditor,IAS_IsExamHLB,IAS_IsHlbAuditor,IAS_IsEndState,IAS_AuditorPerson,IAS_IsOutComeEnd,
  166. IAS_Init,
  167. IAS_Score, IAS_Size, IAS_Position,
  168. IAS_Classification, IAS_Outcome, IAS_Whereabouts,
  169. IAS_IsEnd, IAS_IsEndTime, IAS_IsExam,
  170. IAS_IsPrint, IAS_IsAudit, IAS_Recordor,
  171. IAS_Record_Time, IAS_Auditor1, IAS_AuditorDetail1,
  172. IAS_Auditor_Time1, IAS_Auditor2, IAS_AuditorDetail2,
  173. IAS_Auditor_Time2, IAS_Operation_Time,
  174. IAS_Operator, IAS_IsDel,IAS_IsEndDetail)
  175. values (#{iasId,jdbcType=INTEGER}, #{patientno,jdbcType=VARCHAR}, #{hiId,jdbcType=INTEGER},
  176. #{ddDepdm,jdbcType=VARCHAR}, #{dwWarddm,jdbcType=VARCHAR}, #{dbBedno,jdbcType=VARCHAR},
  177. #{iasSoreid,jdbcType=VARCHAR}, #{iasRiskid,jdbcType=VARCHAR},#{iasPressureId,jdbcType=INTEGER},
  178. #{iasIsExamHz,jdbcType=INTEGER},#{iasIsHzAuditor,jdbcType=VARCHAR},
  179. #{iasIsExamHlb,jdbcType=INTEGER},#{iasIsHlbAuditor,jdbcType=VARCHAR},#{iasIsEndState,jdbcType=INTEGER},
  180. #{iasAuditorPerson,jdbcType=VARCHAR},
  181. #{iasIsOutComeEnd,jdbcType=INTEGER},#{iasInit,jdbcType=INTEGER},
  182. #{iasScore,jdbcType=DOUBLE}, #{iasSize,jdbcType=VARCHAR}, #{iasPosition,jdbcType=VARCHAR},
  183. #{iasClassification,jdbcType=VARCHAR}, #{iasOutcome,jdbcType=VARCHAR}, #{iasWhereabouts,jdbcType=VARCHAR},
  184. #{iasIsend,jdbcType=INTEGER}, #{iasIsendtime,jdbcType=TIMESTAMP}, #{iasIsexam,jdbcType=INTEGER},
  185. #{iasIsprint,jdbcType=INTEGER}, #{iasIsaudit,jdbcType=INTEGER}, #{iasRecordor,jdbcType=VARCHAR},
  186. #{iasRecordTime,jdbcType=TIMESTAMP}, #{iasAuditor1,jdbcType=VARCHAR}, #{iasAuditordetail1,jdbcType=VARCHAR},
  187. #{iasAuditorTime1,jdbcType=TIMESTAMP}, #{iasAuditor2,jdbcType=VARCHAR}, #{iasAuditordetail2,jdbcType=VARCHAR},
  188. #{iasAuditorTime2,jdbcType=TIMESTAMP}, #{iasOperationTime,jdbcType=TIMESTAMP},
  189. #{iasOperator,jdbcType=VARCHAR}, #{iasIsdel,jdbcType=INTEGER}, #{iasIsEndDetail,jdbcType=VARCHAR})
  190. </insert>
  191. <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpAuditSore" >
  192. insert into inp_audit_sore
  193. <trim prefix="(" suffix=")" suffixOverrides="," >
  194. <if test="iasId != null" >
  195. IAS_ID,
  196. </if>
  197. <if test="patientno != null" >
  198. PatientNo,
  199. </if>
  200. <if test="hiId != null" >
  201. HI_ID,
  202. </if>
  203. <if test="ddDepdm != null" >
  204. DD_DepDm,
  205. </if>
  206. <if test="dwWarddm != null" >
  207. DW_WardDm,
  208. </if>
  209. <if test="dbBedno != null" >
  210. DB_BedNo,
  211. </if>
  212. <if test="iasSoreid != null" >
  213. IAS_SoreId,
  214. </if>
  215. <if test="iasRiskid != null" >
  216. IAS_RiskId,
  217. </if>
  218. <if test="iasPressureId != null ">
  219. IAS_PressureId,
  220. </if>
  221. <if test="iasIsExamHz != null ">
  222. IAS_IsExamHZ,
  223. </if>
  224. <if test="iasIsHzAuditor != null">
  225. IAS_IsHzAuditor,
  226. </if>
  227. <if test="iasIsExamHlb != null ">
  228. IAS_IsExamHLB,
  229. </if>
  230. <if test="iasIsHlbAuditor != null">
  231. IAS_IsHlbAuditor,
  232. </if>
  233. <if test="iasIsEndState != null ">
  234. IAS_IsEndState,
  235. </if>
  236. <if test="iasAuditorPerson != null and iasAuditorPerson != ''">
  237. IAS_AuditorPerson,
  238. </if>
  239. <if test="iasIsOutComeEnd != null ">
  240. IAS_IsOutComeEnd,
  241. </if>
  242. <if test="iasInit != null" >
  243. IAS_Init,
  244. </if>
  245. <if test="iasScore != null" >
  246. IAS_Score,
  247. </if>
  248. <if test="iasSize != null" >
  249. IAS_Size,
  250. </if>
  251. <if test="iasPosition != null" >
  252. IAS_Position,
  253. </if>
  254. <if test="bradenSource != null and bradenSource != ''">
  255. IAS_bradenSource,
  256. </if>
  257. <if test="iasClassification != null" >
  258. IAS_Classification,
  259. </if>
  260. <if test="iasOutcome != null" >
  261. IAS_Outcome,
  262. </if>
  263. <if test="iasWhereabouts != null" >
  264. IAS_Whereabouts,
  265. </if>
  266. <if test="iasIsend != null" >
  267. IAS_IsEnd,
  268. </if>
  269. <if test="iasIsendtime != null" >
  270. IAS_IsEndTime,
  271. </if>
  272. <if test="iasIsexam != null" >
  273. IAS_IsExam,
  274. </if>
  275. <if test="iasIsprint != null" >
  276. IAS_IsPrint,
  277. </if>
  278. <if test="iasIsaudit != null" >
  279. IAS_IsAudit,
  280. </if>
  281. <if test="iasRecordor != null" >
  282. IAS_Recordor,
  283. </if>
  284. <if test="iasRecordTime != null" >
  285. IAS_Record_Time,
  286. </if>
  287. <if test="iasAuditor1 != null" >
  288. IAS_Auditor1,
  289. </if>
  290. <if test="iasAuditordetail1 != null" >
  291. IAS_AuditorDetail1,
  292. </if>
  293. <if test="iasAuditorTime1 != null" >
  294. IAS_Auditor_Time1,
  295. </if>
  296. <if test="iasAuditor2 != null" >
  297. IAS_Auditor2,
  298. </if>
  299. <if test="iasAuditordetail2 != null" >
  300. IAS_AuditorDetail2,
  301. </if>
  302. <if test="iasAuditorTime2 != null" >
  303. IAS_Auditor_Time2,
  304. </if>
  305. <if test="iasOperationTime != null" >
  306. IAS_Operation_Time,
  307. </if>
  308. <if test="iasOperator != null" >
  309. IAS_Operator,
  310. </if>
  311. <if test="iasIsdel != null" >
  312. IAS_IsDel,
  313. </if>
  314. <if test="iasIsEndDetail != null" >
  315. IAS_IsEndDetail,
  316. </if>
  317. </trim>
  318. <trim prefix="values (" suffix=")" suffixOverrides="," >
  319. <if test="iasId != null" >
  320. #{iasId,jdbcType=INTEGER},
  321. </if>
  322. <if test="patientno != null" >
  323. #{patientno,jdbcType=VARCHAR},
  324. </if>
  325. <if test="hiId != null" >
  326. #{hiId,jdbcType=INTEGER},
  327. </if>
  328. <if test="ddDepdm != null" >
  329. #{ddDepdm,jdbcType=VARCHAR},
  330. </if>
  331. <if test="dwWarddm != null" >
  332. #{dwWarddm,jdbcType=VARCHAR},
  333. </if>
  334. <if test="dbBedno != null" >
  335. #{dbBedno,jdbcType=VARCHAR},
  336. </if>
  337. <if test="iasSoreid != null" >
  338. #{iasSoreid,jdbcType=VARCHAR},
  339. </if>
  340. <if test="iasRiskid != null" >
  341. #{iasRiskid,jdbcType=VARCHAR},
  342. </if>
  343. <if test="iasPressureId != null ">
  344. #{iasPressureId,jdbcType=INTEGER},
  345. </if>
  346. <if test="iasIsExamHz != null ">
  347. #{iasIsExamHz,jdbcType=INTEGER},
  348. </if>
  349. <if test="iasIsHzAuditor != null">
  350. #{iasIsHzAuditor,jdbcType=VARCHAR},
  351. </if>
  352. <if test="iasIsExamHlb != null ">
  353. #{iasIsExamHlb,jdbcType=INTEGER},
  354. </if>
  355. <if test="iasIsHlbAuditor != null">
  356. #{iasIsHlbAuditor,jdbcType=VARCHAR},
  357. </if>
  358. <if test="iasIsEndState != null ">
  359. #{iasIsEndState,jdbcType=INTEGER},
  360. </if>
  361. <if test="iasAuditorPerson != null and iasAuditorPerson != ''">
  362. #{iasAuditorPerson,jdbcType=VARCHAR},
  363. </if>
  364. <if test="iasIsOutComeEnd != null ">
  365. #{iasIsOutComeEnd,jdbcType=INTEGER},
  366. </if>
  367. <if test="iasInit != null" >
  368. #{iasInit,jdbcType=INTEGER},
  369. </if>
  370. <if test="iasScore != null" >
  371. #{iasScore,jdbcType=DOUBLE},
  372. </if>
  373. <if test="iasSize != null" >
  374. #{iasSize,jdbcType=VARCHAR},
  375. </if>
  376. <if test="iasPosition != null" >
  377. #{iasPosition,jdbcType=VARCHAR},
  378. </if>
  379. <if test="bradenSource != null and bradenSource != ''">
  380. #{bradenSource,jdbcType=VARCHAR},
  381. </if>
  382. <if test="iasClassification != null" >
  383. #{iasClassification,jdbcType=VARCHAR},
  384. </if>
  385. <if test="iasOutcome != null" >
  386. #{iasOutcome,jdbcType=VARCHAR},
  387. </if>
  388. <if test="iasWhereabouts != null" >
  389. #{iasWhereabouts,jdbcType=VARCHAR},
  390. </if>
  391. <if test="iasIsend != null" >
  392. #{iasIsend,jdbcType=INTEGER},
  393. </if>
  394. <if test="iasIsendtime != null" >
  395. #{iasIsendtime,jdbcType=TIMESTAMP},
  396. </if>
  397. <if test="iasIsexam != null" >
  398. #{iasIsexam,jdbcType=INTEGER},
  399. </if>
  400. <if test="iasIsprint != null" >
  401. #{iasIsprint,jdbcType=INTEGER},
  402. </if>
  403. <if test="iasIsaudit != null" >
  404. #{iasIsaudit,jdbcType=INTEGER},
  405. </if>
  406. <if test="iasRecordor != null" >
  407. #{iasRecordor,jdbcType=VARCHAR},
  408. </if>
  409. <if test="iasRecordTime != null" >
  410. #{iasRecordTime,jdbcType=TIMESTAMP},
  411. </if>
  412. <if test="iasAuditor1 != null" >
  413. #{iasAuditor1,jdbcType=VARCHAR},
  414. </if>
  415. <if test="iasAuditordetail1 != null" >
  416. #{iasAuditordetail1,jdbcType=VARCHAR},
  417. </if>
  418. <if test="iasAuditorTime1 != null" >
  419. #{iasAuditorTime1,jdbcType=TIMESTAMP},
  420. </if>
  421. <if test="iasAuditor2 != null" >
  422. #{iasAuditor2,jdbcType=VARCHAR},
  423. </if>
  424. <if test="iasAuditordetail2 != null" >
  425. #{iasAuditordetail2,jdbcType=VARCHAR},
  426. </if>
  427. <if test="iasAuditorTime2 != null" >
  428. #{iasAuditorTime2,jdbcType=TIMESTAMP},
  429. </if>
  430. <if test="iasOperationTime != null" >
  431. #{iasOperationTime,jdbcType=TIMESTAMP},
  432. </if>
  433. <if test="iasOperator != null" >
  434. #{iasOperator,jdbcType=VARCHAR},
  435. </if>
  436. <if test="iasIsdel != null" >
  437. #{iasIsdel,jdbcType=INTEGER},
  438. </if>
  439. <if test="iasIsEndDetail != null" >
  440. #{iasIsEndDetail,jdbcType=VARCHAR},
  441. </if>
  442. </trim>
  443. </insert>
  444. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpAuditSore" >
  445. update inp_audit_sore
  446. <set >
  447. <if test="patientno != null" >
  448. PatientNo = #{patientno,jdbcType=VARCHAR},
  449. </if>
  450. <if test="hiId != null" >
  451. HI_ID = #{hiId,jdbcType=INTEGER},
  452. </if>
  453. <if test="ddDepdm != null" >
  454. DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
  455. </if>
  456. <if test="dwWarddm != null" >
  457. DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
  458. </if>
  459. <if test="dbBedno != null" >
  460. DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
  461. </if>
  462. <if test="iasSoreid != null" >
  463. IAS_SoreId = #{iasSoreid,jdbcType=VARCHAR},
  464. </if>
  465. <if test="iasRiskid != null" >
  466. IAS_RiskId = #{iasRiskid,jdbcType=VARCHAR},
  467. </if>
  468. <if test="iasPressureId != null ">
  469. #{iasPressureId,jdbcType=INTEGER},
  470. </if>
  471. <if test="iasIsExamHz != null ">
  472. #{iasIsExamHz,jdbcType=INTEGER},
  473. </if>
  474. <if test="iasIsHzAuditor != null">
  475. #{iasIsHzAuditor,jdbcType=VARCHAR},
  476. </if>
  477. <if test="iasIsExamHlb != null ">
  478. #{iasIsExamHlb,jdbcType=INTEGER},
  479. </if>
  480. <if test="iasIsHlbAuditor != null">
  481. #{iasIsHlbAuditor,jdbcType=VARCHAR},
  482. </if>
  483. <if test="iasIsEndState != null ">
  484. #{iasIsEndState,jdbcType=INTEGER},
  485. </if>
  486. <if test="iasAuditorPerson != null and iasAuditorPerson != ''">
  487. #{iasAuditorPerson,jdbcType=VARCHAR},
  488. </if>
  489. <if test="iasIsOutComeEnd != null ">
  490. #{iasIsOutComeEnd,jdbcType=INTEGER},
  491. </if>
  492. <if test="iasInit != null" >
  493. IAS_Init = #{iasInit,jdbcType=INTEGER},
  494. </if>
  495. <if test="iasScore != null" >
  496. IAS_Score = #{iasScore,jdbcType=DOUBLE},
  497. </if>
  498. <if test="iasSize != null" >
  499. IAS_Size = #{iasSize,jdbcType=VARCHAR},
  500. </if>
  501. <if test="iasPosition != null" >
  502. IAS_Position = #{iasPosition,jdbcType=VARCHAR},
  503. </if>
  504. <if test="iasClassification != null" >
  505. IAS_Classification = #{iasClassification,jdbcType=VARCHAR},
  506. </if>
  507. <if test="iasOutcome != null" >
  508. IAS_Outcome = #{iasOutcome,jdbcType=VARCHAR},
  509. </if>
  510. <if test="iasWhereabouts != null" >
  511. IAS_Whereabouts = #{iasWhereabouts,jdbcType=VARCHAR},
  512. </if>
  513. <if test="iasIsend != null" >
  514. IAS_IsEnd = #{iasIsend,jdbcType=INTEGER},
  515. </if>
  516. <if test="iasIsendtime != null" >
  517. IAS_IsEndTime = #{iasIsendtime,jdbcType=TIMESTAMP},
  518. </if>
  519. <if test="iasIsexam != null" >
  520. IAS_IsExam = #{iasIsexam,jdbcType=INTEGER},
  521. </if>
  522. <if test="iasIsprint != null" >
  523. IAS_IsPrint = #{iasIsprint,jdbcType=INTEGER},
  524. </if>
  525. <if test="iasIsaudit != null" >
  526. IAS_IsAudit = #{iasIsaudit,jdbcType=INTEGER},
  527. </if>
  528. <if test="iasRecordor != null" >
  529. IAS_Recordor = #{iasRecordor,jdbcType=VARCHAR},
  530. </if>
  531. <if test="iasRecordTime != null" >
  532. IAS_Record_Time = #{iasRecordTime,jdbcType=TIMESTAMP},
  533. </if>
  534. <if test="iasAuditor1 != null" >
  535. IAS_Auditor1 = #{iasAuditor1,jdbcType=VARCHAR},
  536. </if>
  537. <if test="iasAuditordetail1 != null" >
  538. IAS_AuditorDetail1 = #{iasAuditordetail1,jdbcType=VARCHAR},
  539. </if>
  540. <if test="iasAuditorTime1 != null" >
  541. IAS_Auditor_Time1 = #{iasAuditorTime1,jdbcType=TIMESTAMP},
  542. </if>
  543. <if test="iasAuditor2 != null" >
  544. IAS_Auditor2 = #{iasAuditor2,jdbcType=VARCHAR},
  545. </if>
  546. <if test="iasAuditordetail2 != null" >
  547. IAS_AuditorDetail2 = #{iasAuditordetail2,jdbcType=VARCHAR},
  548. </if>
  549. <if test="iasAuditorTime2 != null" >
  550. IAS_Auditor_Time2 = #{iasAuditorTime2,jdbcType=TIMESTAMP},
  551. </if>
  552. <if test="iasOperationTime != null" >
  553. IAS_Operation_Time = #{iasOperationTime,jdbcType=TIMESTAMP},
  554. </if>
  555. <if test="iasOperator != null" >
  556. IAS_Operator = #{iasOperator,jdbcType=VARCHAR},
  557. </if>
  558. <if test="iasIsdel != null" >
  559. IAS_IsDel = #{iasIsdel,jdbcType=INTEGER},
  560. </if>
  561. <if test="iasIsEndDetail != null" >
  562. IAS_IsEndDetail = #{iasIsEndDetail,jdbcType=VARCHAR},
  563. </if>
  564. </set>
  565. where IAS_ID = #{iasId,jdbcType=INTEGER}
  566. </update>
  567. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpAuditSore" >
  568. update inp_audit_sore
  569. set PatientNo = #{patientno,jdbcType=VARCHAR},
  570. HI_ID = #{hiId,jdbcType=INTEGER},
  571. DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
  572. DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
  573. DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
  574. IAS_SoreId = #{iasSoreid,jdbcType=VARCHAR},
  575. IAS_RiskId = #{iasRiskid,jdbcType=VARCHAR},
  576. IAS_PressureId=#{iasPressureId,jdbcType=INTEGER},
  577. IAS_IsExamHZ=#{iasIsExamHz,jdbcType=INTEGER},
  578. IAS_IsHzAuditor=#{iasIsHzAuditor,jdbcType=VARCHAR},
  579. IAS_IsExamHLB=#{iasIsExamHlb,jdbcType=INTEGER},
  580. IAS_IsHlbAuditor=#{iasIsHlbAuditor,jdbcType=VARCHAR},
  581. IAS_IsEndState=#{iasIsEndState,jdbcType=INTEGER},
  582. IAS_AuditorPerson=#{iasAuditorPerson,jdbcType=VARCHAR},
  583. IAS_IsOutComeEnd=#{iasIsOutComeEnd,jdbcType=INTEGER},
  584. IAS_Init = #{iasInit,jdbcType=INTEGER},
  585. IAS_Score = #{iasScore,jdbcType=DOUBLE},
  586. IAS_Size = #{iasSize,jdbcType=VARCHAR},
  587. IAS_Position = #{iasPosition,jdbcType=VARCHAR},
  588. IAS_bradenSource = #{bradenSource,jdbcType=VARCHAR},
  589. IAS_Classification = #{iasClassification,jdbcType=VARCHAR},
  590. IAS_Outcome = #{iasOutcome,jdbcType=VARCHAR},
  591. IAS_Whereabouts = #{iasWhereabouts,jdbcType=VARCHAR},
  592. IAS_IsEnd = #{iasIsend,jdbcType=INTEGER},
  593. IAS_IsEndTime = #{iasIsendtime,jdbcType=TIMESTAMP},
  594. IAS_IsExam = #{iasIsexam,jdbcType=INTEGER},
  595. IAS_IsPrint = #{iasIsprint,jdbcType=INTEGER},
  596. IAS_IsAudit = #{iasIsaudit,jdbcType=INTEGER},
  597. IAS_Recordor = #{iasRecordor,jdbcType=VARCHAR},
  598. IAS_Record_Time = #{iasRecordTime,jdbcType=TIMESTAMP},
  599. IAS_Auditor1 = #{iasAuditor1,jdbcType=VARCHAR},
  600. IAS_AuditorDetail1 = #{iasAuditordetail1,jdbcType=VARCHAR},
  601. IAS_Auditor_Time1 = #{iasAuditorTime1,jdbcType=TIMESTAMP},
  602. IAS_Auditor2 = #{iasAuditor2,jdbcType=VARCHAR},
  603. IAS_AuditorDetail2 = #{iasAuditordetail2,jdbcType=VARCHAR},
  604. IAS_Auditor_Time2 = #{iasAuditorTime2,jdbcType=TIMESTAMP},
  605. IAS_Operation_Time = #{iasOperationTime,jdbcType=TIMESTAMP},
  606. IAS_Operator = #{iasOperator,jdbcType=VARCHAR},
  607. IAS_IsDel = #{iasIsdel,jdbcType=INTEGER},
  608. IAS_IsEndDetail = #{iasIsEndDetail,jdbcType=VARCHAR}
  609. where IAS_ID = #{iasId,jdbcType=INTEGER}
  610. </update>
  611. <update id="updateDelStatus" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpAuditSore" >
  612. update inp_audit_sore
  613. set IAS_Operation_Time = #{iasOperationTime,jdbcType=TIMESTAMP},
  614. IAS_Operator = #{iasOperator,jdbcType=VARCHAR},
  615. IAS_IsDel = -1
  616. where IAS_ID = #{iasId,jdbcType=INTEGER}
  617. </update>
  618. <select id="selectByPatientNo" resultMap="BaseResultMap">
  619. select
  620. IAS_ID,
  621. IAS_Record_Time,
  622. (select UI_Name from sys_userinfo where UI_Code = ias.IAS_Recordor and HI_ID = ias.HI_ID limit 1) IAS_Recordor
  623. from inp_audit_sore ias
  624. where IAS_IsDel = 0
  625. and PatientNo = #{patientNo,jdbcType=VARCHAR}
  626. and HI_ID = #{hiId,jdbcType=INTEGER}
  627. order by IAS_Record_Time desc
  628. </select>
  629. <select id="selectByPressureId" resultMap="BaseResultMap">
  630. select
  631. <include refid="Base_Column_List"/>
  632. from inp_audit_sore
  633. where IAS_IsDel=0
  634. <if test="iaId !=null ">
  635. AND IAS_PressureId=#{iaId,jdbcType=VARCHAR}
  636. </if>
  637. </select>
  638. <update id="updateIaDel">
  639. update inp_audit_sore
  640. set
  641. IAS_IsDel = -1
  642. where IAS_PressureId = #{iaId,jdbcType=INTEGER}
  643. </update>
  644. <update id="updateByPressureId" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpAuditSore">
  645. update inp_audit_sore
  646. set PatientNo = #{record.patientno,jdbcType=VARCHAR},
  647. HI_ID = #{record.hiId,jdbcType=INTEGER},
  648. DD_DepDm = #{record.ddDepdm,jdbcType=VARCHAR},
  649. DW_WardDm = #{record.dwWarddm,jdbcType=VARCHAR},
  650. DB_BedNo = #{record.dbBedno,jdbcType=VARCHAR},
  651. IAS_SoreId = #{record.iasSoreid,jdbcType=VARCHAR},
  652. IAS_RiskId = #{record.iasRiskid,jdbcType=VARCHAR},
  653. IAS_PressureId=#{record.iasPressureId,jdbcType=INTEGER},
  654. IAS_IsExamHZ=#{record.iasIsExamHz,jdbcType=INTEGER},
  655. IAS_IsHzAuditor=#{record.iasIsHzAuditor,jdbcType=VARCHAR},
  656. IAS_IsExamHLB=#{record.iasIsExamHlb,jdbcType=INTEGER},
  657. IAS_IsHlbAuditor=#{record.iasIsHlbAuditor,jdbcType=VARCHAR},
  658. IAS_IsEndState=#{record.iasIsEndState,jdbcType=INTEGER},
  659. IAS_AuditorPerson=#{record.iasAuditorPerson,jdbcType=VARCHAR},
  660. IAS_IsOutComeEnd=#{record.iasIsOutComeEnd,jdbcType=INTEGER},
  661. IAS_Init = #{record.iasInit,jdbcType=INTEGER},
  662. IAS_Score = #{record.iasScore,jdbcType=DOUBLE},
  663. IAS_Size = #{record.iasSize,jdbcType=VARCHAR},
  664. IAS_Position = #{record.iasPosition,jdbcType=VARCHAR},
  665. IAS_bradenSource = #{record.bradenSource,jdbcType=VARCHAR},
  666. IAS_Classification = #{record.iasClassification,jdbcType=VARCHAR},
  667. IAS_Outcome = #{record.iasOutcome,jdbcType=VARCHAR},
  668. IAS_Whereabouts = #{record.iasWhereabouts,jdbcType=VARCHAR},
  669. IAS_IsEnd = #{record.iasIsend,jdbcType=INTEGER},
  670. IAS_IsEndTime = #{record.iasIsendtime,jdbcType=TIMESTAMP},
  671. IAS_IsExam = #{record.iasIsexam,jdbcType=INTEGER},
  672. IAS_IsPrint = #{record.iasIsprint,jdbcType=INTEGER},
  673. IAS_IsAudit = #{record.iasIsaudit,jdbcType=INTEGER},
  674. IAS_Recordor = #{record.iasRecordor,jdbcType=VARCHAR},
  675. IAS_Record_Time = #{record.iasRecordTime,jdbcType=TIMESTAMP},
  676. IAS_Auditor1 = #{record.iasAuditor1,jdbcType=VARCHAR},
  677. IAS_AuditorDetail1 = #{record.iasAuditordetail1,jdbcType=VARCHAR},
  678. IAS_Auditor_Time1 = #{record.iasAuditorTime1,jdbcType=TIMESTAMP},
  679. IAS_Auditor2 = #{record.iasAuditor2,jdbcType=VARCHAR},
  680. IAS_AuditorDetail2 = #{record.iasAuditordetail2,jdbcType=VARCHAR},
  681. IAS_Auditor_Time2 = #{record.iasAuditorTime2,jdbcType=TIMESTAMP},
  682. IAS_Operation_Time = #{record.iasOperationTime,jdbcType=TIMESTAMP},
  683. IAS_Operator = #{record.iasOperator,jdbcType=VARCHAR},
  684. IAS_IsDel = #{record.iasIsdel,jdbcType=INTEGER},
  685. IAS_IsEndDetail = #{record.iasIsEndDetail,jdbcType=VARCHAR}
  686. where IAS_ID = #{record.iasId,jdbcType=INTEGER} and IAS_PressureId=#{iaId,jdbcType=INTEGER}
  687. </update>
  688. </mapper>