BusDeviceHistoryMapper.xml 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.system.mapper.BusDeviceHistoryMapper">
  6. <resultMap type="BusDeviceHistory" id="BusDeviceHistoryResult">
  7. <result property="id" column="id" />
  8. <result property="dId" column="d_id" />
  9. <result property="pId" column="p_id" />
  10. <result property="signTime" column="sign_time" />
  11. <result property="treatmentProject" column="treatment_project" />
  12. <result property="alarm" column="alarm" />
  13. <result property="uploadTime" column="upload_time" />
  14. <result property="machineModel" column="machine_model" />
  15. <result property="filterModel" column="filter_model" />
  16. <result property="hemodialysisModel" column="hemodialysis_model" />
  17. <result property="treatmentTime" column="treatment_time" />
  18. <result property="targetDehydration" column="target_dehydration" />
  19. <result property="bloodPumpRate" column="blood_pump_rate" />
  20. <result property="flow" column="flow" />
  21. <result property="k" column="k" />
  22. <result property="ca" column="ca" />
  23. <result property="na" column="na" />
  24. <result property="hco3" column="hco3" />
  25. <result property="antithrombotic" column="antithrombotic" />
  26. <result property="firstDose" column="first_dose" />
  27. <result property="additionalDose" column="additional_dose" />
  28. <result property="vascularAccess" column="vascular_access" />
  29. <result property="doctor" column="doctor" />
  30. <result property="nurse" column="nurse" />
  31. <result property="verifyPrescription" column="verify_prescription" />
  32. <result property="targetWeight" column="target_weight" />
  33. <result property="lastWeight" column="last_weight" />
  34. <result property="beforeWeight" column="before_weight" />
  35. <result property="addWeight" column="add_weight" />
  36. <result property="beforeSbp" column="before_sbp" />
  37. <result property="beforeDbp" column="before_dbp" />
  38. <result property="beforeSphygmus" column="before_sphygmus" />
  39. <result property="beforeRr" column="before_rr" />
  40. <result property="beforeTemperature" column="before_temperature" />
  41. <result property="urineVolume" column="urine_volume" />
  42. <result property="gainWeight" column="gain_weight" />
  43. <result property="verifyBefore" column="verify_before" />
  44. <result property="preDialysisWeight" column="pre_dialysis_weight" />
  45. <result property="lossWeight" column="loss_weight" />
  46. <result property="afterTemperature" column="after_temperature" />
  47. <result property="afterSbp" column="after_sbp" />
  48. <result property="afterDbp" column="after_dbp" />
  49. <result property="afterSphygmus" column="after_sphygmus" />
  50. <result property="afterRr" column="after_rr" />
  51. <result property="verifyAfter" column="verify_after" />
  52. <result property="deviceId" column="device_id" />
  53. <result property="area" column="area" />
  54. <result property="bed" column="bed" />
  55. <result property="brandName" column="brand_name" />
  56. <result property="model" column="model" />
  57. <result property="manufactureId" column="manufacture_id" />
  58. <result property="price" column="price" />
  59. <result property="infection" column="infection" />
  60. <result property="code" column="code" />
  61. <result property="name" column="name" />
  62. <result property="gender" column="gender" />
  63. <result property="height" column="height" />
  64. <result property="age" column="age" />
  65. <result property="weight" column="weight" />
  66. <result property="source" column="source" />
  67. <result property="address" column="address" />
  68. <result property="createTime" column="create_time" />
  69. <result property="phone" column="phone" />
  70. <result property="relationName" column="relation_name" />
  71. <result property="relationPhone" column="relation_phone" />
  72. <result property="dieTime" column="die_time" />
  73. <result property="isDelete" column="is_delete" />
  74. <result property="status" column="status" />
  75. <result property="currentStatus" column="current_Status" />
  76. </resultMap>
  77. <sql id="selectBusDeviceHistoryVo">
  78. select id, d_id, p_id, sign_time, treatment_project, alarm, upload_time, machine_model, filter_model, hemodialysis_model, treatment_time, target_dehydration, blood_pump_rate, flow, k, ca, na, hco3, antithrombotic, first_dose, additional_dose, vascular_access, doctor, nurse, verify_prescription, target_weight, last_weight, before_weight, add_weight, before_sbp, before_dbp, before_sphygmus, before_rr, before_temperature, urine_volume, gain_weight, verify_before, pre_dialysis_weight, loss_weight, after_temperature, after_sbp, after_dbp, after_sphygmus, after_rr, verify_after, device_id, area, bed, brand_name, model, manufacture_id, price, infection, code, name, gender, height, age, weight, source, address, create_time, phone, relation_name, relation_phone, die_time, is_delete, status, current_Status from bus_device_history
  79. </sql>
  80. <select id="selectBusDeviceHistoryList" parameterType="BusDeviceHistory" resultMap="BusDeviceHistoryResult">
  81. <include refid="selectBusDeviceHistoryVo"/>
  82. <where>
  83. <if test="dId != null "> and d_id = #{dId}</if>
  84. <if test="pId != null "> and p_id = #{pId}</if>
  85. <if test="params.beginSignTime != null and params.beginSignTime != '' and params.endSignTime != null and params.endSignTime != ''"> and sign_time between #{params.beginSignTime} and #{params.endSignTime}</if>
  86. <if test="treatmentProject != null and treatmentProject != ''"> and treatment_project = #{treatmentProject}</if>
  87. <if test="alarm != null "> and alarm = #{alarm}</if>
  88. <if test="uploadTime != null "> and upload_time = #{uploadTime}</if>
  89. <if test="machineModel != null and machineModel != ''"> and machine_model = #{machineModel}</if>
  90. <if test="filterModel != null and filterModel != ''"> and filter_model = #{filterModel}</if>
  91. <if test="hemodialysisModel != null and hemodialysisModel != ''"> and hemodialysis_model = #{hemodialysisModel}</if>
  92. <if test="treatmentTime != null and treatmentTime != ''"> and treatment_time = #{treatmentTime}</if>
  93. <if test="targetDehydration != null and targetDehydration != ''"> and target_dehydration = #{targetDehydration}</if>
  94. <if test="bloodPumpRate != null and bloodPumpRate != ''"> and blood_pump_rate = #{bloodPumpRate}</if>
  95. <if test="flow != null and flow != ''"> and flow = #{flow}</if>
  96. <if test="k != null and k != ''"> and k = #{k}</if>
  97. <if test="ca != null and ca != ''"> and ca = #{ca}</if>
  98. <if test="na != null and na != ''"> and na = #{na}</if>
  99. <if test="hco3 != null and hco3 != ''"> and hco3 = #{hco3}</if>
  100. <if test="antithrombotic != null and antithrombotic != ''"> and antithrombotic = #{antithrombotic}</if>
  101. <if test="firstDose != null and firstDose != ''"> and first_dose = #{firstDose}</if>
  102. <if test="additionalDose != null and additionalDose != ''"> and additional_dose = #{additionalDose}</if>
  103. <if test="vascularAccess != null and vascularAccess != ''"> and vascular_access = #{vascularAccess}</if>
  104. <if test="doctor != null and doctor != ''"> and doctor = #{doctor}</if>
  105. <if test="nurse != null and nurse != ''"> and nurse = #{nurse}</if>
  106. <if test="verifyPrescription != null "> and verify_prescription = #{verifyPrescription}</if>
  107. <if test="targetWeight != null and targetWeight != ''"> and target_weight = #{targetWeight}</if>
  108. <if test="lastWeight != null and lastWeight != ''"> and last_weight = #{lastWeight}</if>
  109. <if test="beforeWeight != null and beforeWeight != ''"> and before_weight = #{beforeWeight}</if>
  110. <if test="addWeight != null and addWeight != ''"> and add_weight = #{addWeight}</if>
  111. <if test="beforeSbp != null and beforeSbp != ''"> and before_sbp = #{beforeSbp}</if>
  112. <if test="beforeDbp != null and beforeDbp != ''"> and before_dbp = #{beforeDbp}</if>
  113. <if test="beforeSphygmus != null and beforeSphygmus != ''"> and before_sphygmus = #{beforeSphygmus}</if>
  114. <if test="beforeRr != null and beforeRr != ''"> and before_rr = #{beforeRr}</if>
  115. <if test="beforeTemperature != null and beforeTemperature != ''"> and before_temperature = #{beforeTemperature}</if>
  116. <if test="urineVolume != null and urineVolume != ''"> and urine_volume = #{urineVolume}</if>
  117. <if test="gainWeight != null and gainWeight != ''"> and gain_weight = #{gainWeight}</if>
  118. <if test="verifyBefore != null "> and verify_before = #{verifyBefore}</if>
  119. <if test="preDialysisWeight != null and preDialysisWeight != ''"> and pre_dialysis_weight = #{preDialysisWeight}</if>
  120. <if test="lossWeight != null and lossWeight != ''"> and loss_weight = #{lossWeight}</if>
  121. <if test="afterTemperature != null and afterTemperature != ''"> and after_temperature = #{afterTemperature}</if>
  122. <if test="afterSbp != null and afterSbp != ''"> and after_sbp = #{afterSbp}</if>
  123. <if test="afterDbp != null and afterDbp != ''"> and after_dbp = #{afterDbp}</if>
  124. <if test="afterSphygmus != null and afterSphygmus != ''"> and after_sphygmus = #{afterSphygmus}</if>
  125. <if test="afterRr != null and afterRr != ''"> and after_rr = #{afterRr}</if>
  126. <if test="verifyAfter != null "> and verify_after = #{verifyAfter}</if>
  127. <if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if>
  128. <if test="area != null and area != ''"> and area = #{area}</if>
  129. <if test="bed != null and bed != ''"> and bed = #{bed}</if>
  130. <if test="brandName != null and brandName != ''"> and brand_name like concat('%', #{brandName}, '%')</if>
  131. <if test="model != null and model != ''"> and model = #{model}</if>
  132. <if test="manufactureId != null and manufactureId != ''"> and manufacture_id = #{manufactureId}</if>
  133. <if test="price != null and price != ''"> and price = #{price}</if>
  134. <if test="infection != null "> and infection = #{infection}</if>
  135. <if test="code != null and code != ''"> and code like concat('%', #{code}, '%')</if>
  136. <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
  137. <if test="gender != null "> and gender = #{gender}</if>
  138. <if test="height != null "> and height = #{height}</if>
  139. <if test="age != null "> and age = #{age}</if>
  140. <if test="weight != null "> and weight = #{weight}</if>
  141. <if test="source != null "> and source = #{source}</if>
  142. <if test="address != null and address != ''"> and address = #{address}</if>
  143. <if test="relationName != null and relationName != ''"> and relation_name like concat('%', #{relationName}, '%')</if>
  144. <if test="relationPhone != null and relationPhone != ''"> and relation_phone = #{relationPhone}</if>
  145. <if test="dieTime != null "> and die_time = #{dieTime}</if>
  146. <if test="isDelete != null "> and is_delete = #{isDelete}</if>
  147. <if test="status != null "> and status = #{status}</if>
  148. <if test="currentStatus != null and currentStatus != ''"> and current_Status = #{currentStatus}</if>
  149. </where>
  150. </select>
  151. <select id="selectBusDeviceHistoryById" parameterType="Long" resultMap="BusDeviceHistoryResult">
  152. <include refid="selectBusDeviceHistoryVo"/>
  153. where id = #{id}
  154. </select>
  155. <insert id="insertBusDeviceHistory" parameterType="BusDeviceHistory" useGeneratedKeys="true" keyProperty="id">
  156. insert into bus_device_history
  157. <trim prefix="(" suffix=")" suffixOverrides=",">
  158. <if test="dId != null">d_id,</if>
  159. <if test="pId != null">p_id,</if>
  160. <if test="signTime != null">sign_time,</if>
  161. <if test="treatmentProject != null">treatment_project,</if>
  162. <if test="alarm != null">alarm,</if>
  163. <if test="uploadTime != null">upload_time,</if>
  164. <if test="machineModel != null">machine_model,</if>
  165. <if test="filterModel != null">filter_model,</if>
  166. <if test="hemodialysisModel != null">hemodialysis_model,</if>
  167. <if test="treatmentTime != null">treatment_time,</if>
  168. <if test="targetDehydration != null">target_dehydration,</if>
  169. <if test="bloodPumpRate != null">blood_pump_rate,</if>
  170. <if test="flow != null">flow,</if>
  171. <if test="k != null">k,</if>
  172. <if test="ca != null">ca,</if>
  173. <if test="na != null">na,</if>
  174. <if test="hco3 != null">hco3,</if>
  175. <if test="antithrombotic != null">antithrombotic,</if>
  176. <if test="firstDose != null">first_dose,</if>
  177. <if test="additionalDose != null">additional_dose,</if>
  178. <if test="vascularAccess != null">vascular_access,</if>
  179. <if test="doctor != null">doctor,</if>
  180. <if test="nurse != null">nurse,</if>
  181. <if test="verifyPrescription != null">verify_prescription,</if>
  182. <if test="targetWeight != null">target_weight,</if>
  183. <if test="lastWeight != null">last_weight,</if>
  184. <if test="beforeWeight != null">before_weight,</if>
  185. <if test="addWeight != null">add_weight,</if>
  186. <if test="beforeSbp != null">before_sbp,</if>
  187. <if test="beforeDbp != null">before_dbp,</if>
  188. <if test="beforeSphygmus != null">before_sphygmus,</if>
  189. <if test="beforeRr != null">before_rr,</if>
  190. <if test="beforeTemperature != null">before_temperature,</if>
  191. <if test="urineVolume != null">urine_volume,</if>
  192. <if test="gainWeight != null">gain_weight,</if>
  193. <if test="verifyBefore != null">verify_before,</if>
  194. <if test="preDialysisWeight != null">pre_dialysis_weight,</if>
  195. <if test="lossWeight != null">loss_weight,</if>
  196. <if test="afterTemperature != null">after_temperature,</if>
  197. <if test="afterSbp != null">after_sbp,</if>
  198. <if test="afterDbp != null">after_dbp,</if>
  199. <if test="afterSphygmus != null">after_sphygmus,</if>
  200. <if test="afterRr != null">after_rr,</if>
  201. <if test="verifyAfter != null">verify_after,</if>
  202. <if test="deviceId != null">device_id,</if>
  203. <if test="area != null">area,</if>
  204. <if test="bed != null">bed,</if>
  205. <if test="brandName != null">brand_name,</if>
  206. <if test="model != null">model,</if>
  207. <if test="manufactureId != null">manufacture_id,</if>
  208. <if test="price != null">price,</if>
  209. <if test="infection != null">infection,</if>
  210. <if test="code != null">code,</if>
  211. <if test="name != null">name,</if>
  212. <if test="gender != null">gender,</if>
  213. <if test="height != null">height,</if>
  214. <if test="age != null">age,</if>
  215. <if test="weight != null">weight,</if>
  216. <if test="source != null">source,</if>
  217. <if test="address != null">address,</if>
  218. <if test="createTime != null">create_time,</if>
  219. <if test="phone != null">phone,</if>
  220. <if test="relationName != null">relation_name,</if>
  221. <if test="relationPhone != null">relation_phone,</if>
  222. <if test="dieTime != null">die_time,</if>
  223. <if test="isDelete != null">is_delete,</if>
  224. <if test="status != null">status,</if>
  225. <if test="currentStatus != null">current_Status,</if>
  226. </trim>
  227. <trim prefix="values (" suffix=")" suffixOverrides=",">
  228. <if test="dId != null">#{dId},</if>
  229. <if test="pId != null">#{pId},</if>
  230. <if test="signTime != null">#{signTime},</if>
  231. <if test="treatmentProject != null">#{treatmentProject},</if>
  232. <if test="alarm != null">#{alarm},</if>
  233. <if test="uploadTime != null">#{uploadTime},</if>
  234. <if test="machineModel != null">#{machineModel},</if>
  235. <if test="filterModel != null">#{filterModel},</if>
  236. <if test="hemodialysisModel != null">#{hemodialysisModel},</if>
  237. <if test="treatmentTime != null">#{treatmentTime},</if>
  238. <if test="targetDehydration != null">#{targetDehydration},</if>
  239. <if test="bloodPumpRate != null">#{bloodPumpRate},</if>
  240. <if test="flow != null">#{flow},</if>
  241. <if test="k != null">#{k},</if>
  242. <if test="ca != null">#{ca},</if>
  243. <if test="na != null">#{na},</if>
  244. <if test="hco3 != null">#{hco3},</if>
  245. <if test="antithrombotic != null">#{antithrombotic},</if>
  246. <if test="firstDose != null">#{firstDose},</if>
  247. <if test="additionalDose != null">#{additionalDose},</if>
  248. <if test="vascularAccess != null">#{vascularAccess},</if>
  249. <if test="doctor != null">#{doctor},</if>
  250. <if test="nurse != null">#{nurse},</if>
  251. <if test="verifyPrescription != null">#{verifyPrescription},</if>
  252. <if test="targetWeight != null">#{targetWeight},</if>
  253. <if test="lastWeight != null">#{lastWeight},</if>
  254. <if test="beforeWeight != null">#{beforeWeight},</if>
  255. <if test="addWeight != null">#{addWeight},</if>
  256. <if test="beforeSbp != null">#{beforeSbp},</if>
  257. <if test="beforeDbp != null">#{beforeDbp},</if>
  258. <if test="beforeSphygmus != null">#{beforeSphygmus},</if>
  259. <if test="beforeRr != null">#{beforeRr},</if>
  260. <if test="beforeTemperature != null">#{beforeTemperature},</if>
  261. <if test="urineVolume != null">#{urineVolume},</if>
  262. <if test="gainWeight != null">#{gainWeight},</if>
  263. <if test="verifyBefore != null">#{verifyBefore},</if>
  264. <if test="preDialysisWeight != null">#{preDialysisWeight},</if>
  265. <if test="lossWeight != null">#{lossWeight},</if>
  266. <if test="afterTemperature != null">#{afterTemperature},</if>
  267. <if test="afterSbp != null">#{afterSbp},</if>
  268. <if test="afterDbp != null">#{afterDbp},</if>
  269. <if test="afterSphygmus != null">#{afterSphygmus},</if>
  270. <if test="afterRr != null">#{afterRr},</if>
  271. <if test="verifyAfter != null">#{verifyAfter},</if>
  272. <if test="deviceId != null">#{deviceId},</if>
  273. <if test="area != null">#{area},</if>
  274. <if test="bed != null">#{bed},</if>
  275. <if test="brandName != null">#{brandName},</if>
  276. <if test="model != null">#{model},</if>
  277. <if test="manufactureId != null">#{manufactureId},</if>
  278. <if test="price != null">#{price},</if>
  279. <if test="infection != null">#{infection},</if>
  280. <if test="code != null">#{code},</if>
  281. <if test="name != null">#{name},</if>
  282. <if test="gender != null">#{gender},</if>
  283. <if test="height != null">#{height},</if>
  284. <if test="age != null">#{age},</if>
  285. <if test="weight != null">#{weight},</if>
  286. <if test="source != null">#{source},</if>
  287. <if test="address != null">#{address},</if>
  288. <if test="createTime != null">#{createTime},</if>
  289. <if test="phone != null">#{phone},</if>
  290. <if test="relationName != null">#{relationName},</if>
  291. <if test="relationPhone != null">#{relationPhone},</if>
  292. <if test="dieTime != null">#{dieTime},</if>
  293. <if test="isDelete != null">#{isDelete},</if>
  294. <if test="status != null">#{status},</if>
  295. <if test="currentStatus != null">#{currentStatus},</if>
  296. </trim>
  297. </insert>
  298. <update id="updateBusDeviceHistory" parameterType="BusDeviceHistory">
  299. update bus_device_history
  300. <trim prefix="SET" suffixOverrides=",">
  301. <if test="dId != null">d_id = #{dId},</if>
  302. <if test="pId != null">p_id = #{pId},</if>
  303. <if test="signTime != null">sign_time = #{signTime},</if>
  304. <if test="treatmentProject != null">treatment_project = #{treatmentProject},</if>
  305. <if test="alarm != null">alarm = #{alarm},</if>
  306. <if test="uploadTime != null">upload_time = #{uploadTime},</if>
  307. <if test="machineModel != null">machine_model = #{machineModel},</if>
  308. <if test="filterModel != null">filter_model = #{filterModel},</if>
  309. <if test="hemodialysisModel != null">hemodialysis_model = #{hemodialysisModel},</if>
  310. <if test="treatmentTime != null">treatment_time = #{treatmentTime},</if>
  311. <if test="targetDehydration != null">target_dehydration = #{targetDehydration},</if>
  312. <if test="bloodPumpRate != null">blood_pump_rate = #{bloodPumpRate},</if>
  313. <if test="flow != null">flow = #{flow},</if>
  314. <if test="k != null">k = #{k},</if>
  315. <if test="ca != null">ca = #{ca},</if>
  316. <if test="na != null">na = #{na},</if>
  317. <if test="hco3 != null">hco3 = #{hco3},</if>
  318. <if test="antithrombotic != null">antithrombotic = #{antithrombotic},</if>
  319. <if test="firstDose != null">first_dose = #{firstDose},</if>
  320. <if test="additionalDose != null">additional_dose = #{additionalDose},</if>
  321. <if test="vascularAccess != null">vascular_access = #{vascularAccess},</if>
  322. <if test="doctor != null">doctor = #{doctor},</if>
  323. <if test="nurse != null">nurse = #{nurse},</if>
  324. <if test="verifyPrescription != null">verify_prescription = #{verifyPrescription},</if>
  325. <if test="targetWeight != null">target_weight = #{targetWeight},</if>
  326. <if test="lastWeight != null">last_weight = #{lastWeight},</if>
  327. <if test="beforeWeight != null">before_weight = #{beforeWeight},</if>
  328. <if test="addWeight != null">add_weight = #{addWeight},</if>
  329. <if test="beforeSbp != null">before_sbp = #{beforeSbp},</if>
  330. <if test="beforeDbp != null">before_dbp = #{beforeDbp},</if>
  331. <if test="beforeSphygmus != null">before_sphygmus = #{beforeSphygmus},</if>
  332. <if test="beforeRr != null">before_rr = #{beforeRr},</if>
  333. <if test="beforeTemperature != null">before_temperature = #{beforeTemperature},</if>
  334. <if test="urineVolume != null">urine_volume = #{urineVolume},</if>
  335. <if test="gainWeight != null">gain_weight = #{gainWeight},</if>
  336. <if test="verifyBefore != null">verify_before = #{verifyBefore},</if>
  337. <if test="preDialysisWeight != null">pre_dialysis_weight = #{preDialysisWeight},</if>
  338. <if test="lossWeight != null">loss_weight = #{lossWeight},</if>
  339. <if test="afterTemperature != null">after_temperature = #{afterTemperature},</if>
  340. <if test="afterSbp != null">after_sbp = #{afterSbp},</if>
  341. <if test="afterDbp != null">after_dbp = #{afterDbp},</if>
  342. <if test="afterSphygmus != null">after_sphygmus = #{afterSphygmus},</if>
  343. <if test="afterRr != null">after_rr = #{afterRr},</if>
  344. <if test="verifyAfter != null">verify_after = #{verifyAfter},</if>
  345. <if test="deviceId != null">device_id = #{deviceId},</if>
  346. <if test="area != null">area = #{area},</if>
  347. <if test="bed != null">bed = #{bed},</if>
  348. <if test="brandName != null">brand_name = #{brandName},</if>
  349. <if test="model != null">model = #{model},</if>
  350. <if test="manufactureId != null">manufacture_id = #{manufactureId},</if>
  351. <if test="price != null">price = #{price},</if>
  352. <if test="infection != null">infection = #{infection},</if>
  353. <if test="code != null">code = #{code},</if>
  354. <if test="name != null">name = #{name},</if>
  355. <if test="gender != null">gender = #{gender},</if>
  356. <if test="height != null">height = #{height},</if>
  357. <if test="age != null">age = #{age},</if>
  358. <if test="weight != null">weight = #{weight},</if>
  359. <if test="source != null">source = #{source},</if>
  360. <if test="address != null">address = #{address},</if>
  361. <if test="createTime != null">create_time = #{createTime},</if>
  362. <if test="phone != null">phone = #{phone},</if>
  363. <if test="relationName != null">relation_name = #{relationName},</if>
  364. <if test="relationPhone != null">relation_phone = #{relationPhone},</if>
  365. <if test="dieTime != null">die_time = #{dieTime},</if>
  366. <if test="isDelete != null">is_delete = #{isDelete},</if>
  367. <if test="status != null">status = #{status},</if>
  368. <if test="currentStatus != null">current_Status = #{currentStatus},</if>
  369. </trim>
  370. where id = #{id}
  371. </update>
  372. <update id="updateStatusByIds">
  373. update bus_device_history
  374. <trim prefix="SET" suffixOverrides=",">
  375. <if test="status != null">status = #{status},</if>
  376. </trim>
  377. where id in
  378. <foreach item="id" collection="ids" open="(" separator="," close=")">
  379. #{id}
  380. </foreach>
  381. </update>
  382. <delete id="deleteBusDeviceHistoryById" parameterType="Long">
  383. delete from bus_device_history where id = #{id}
  384. </delete>
  385. <delete id="deleteBusDeviceHistoryByIds" parameterType="String">
  386. delete from bus_device_history where id in
  387. <foreach item="id" collection="array" open="(" separator="," close=")">
  388. #{id}
  389. </foreach>
  390. </delete>
  391. <select id="selectBusDeviceByDeviceId" parameterType="Long" resultMap="BusDeviceHistoryResult">
  392. <include refid="selectBusDeviceHistoryVo"/>
  393. where d_id = #{dId} and (status = 0 or status = 1)
  394. order by sign_time ASC
  395. </select>
  396. </mapper>