MedDeathNoteMapper.xml 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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.diagbot.mapper.MedDeathNoteMapper">
  4. <!-- 通用查询映射结果 -->
  5. <resultMap id="BaseResultMap" type="com.diagbot.entity.MedDeathNote">
  6. <id column="rec_id" property="recId" />
  7. <result column="hospital_id" property="hospitalId" />
  8. <result column="behospital_code" property="behospitalCode" />
  9. <result column="name" property="name" />
  10. <result column="sex" property="sex" />
  11. <result column="age" property="age" />
  12. <result column="bed_no" property="bedNo" />
  13. <result column="dept_name" property="deptName" />
  14. <result column="record_date" property="recordDate" />
  15. <result column="behospital_date" property="behospitalDate" />
  16. <result column="death_date" property="deathDate" />
  17. <result column="behospital_situation" property="behospitalSituation" />
  18. <result column="tentative_diagnosis" property="tentativeDiagnosis" />
  19. <result column="treatment_process" property="treatmentProcess" />
  20. <result column="death_reason" property="deathReason" />
  21. <result column="death_diagnosis" property="deathDiagnosis" />
  22. <result column="rec_doctor" property="recDoctor" />
  23. <result column="rec_date" property="recDate" />
  24. <result column="audit_doctor" property="auditDoctor" />
  25. <result column="audit_date" property="auditDate" />
  26. <result column="whole_data" property="wholeData" />
  27. <result column="remark" property="remark" />
  28. <result column="is_deleted" property="isDeleted" />
  29. <result column="gmt_create" property="gmtCreate" />
  30. <result column="gmt_modified" property="gmtModified" />
  31. <result column="creator" property="creator" />
  32. <result column="modifier" property="modifier" />
  33. </resultMap>
  34. <update id="updateBatchByKey">
  35. <foreach collection="list" item="item" separator=";">
  36. update med_death_note
  37. <set>
  38. name = #{item.name},
  39. sex = #{item.sex},
  40. age = #{item.age},
  41. bed_no = #{item.bedNo},
  42. dept_name = #{item.deptName},
  43. record_date = #{item.recordDate},
  44. behospital_date = #{item.behospitalDate},
  45. death_date = #{item.deathDate},
  46. behospital_situation = #{item.behospitalSituation},
  47. tentative_diagnosis = #{item.tentativeDiagnosis},
  48. treatment_process = #{item.treatmentProcess},
  49. death_reason = #{item.deathReason},
  50. death_diagnosis = #{item.deathDiagnosis},
  51. rec_doctor = #{item.recDoctor},
  52. rec_date = #{item.recDate},
  53. audit_doctor = #{item.auditDoctor},
  54. audit_date = #{item.auditDate},
  55. whole_data = #{item.wholeData},
  56. remark = #{item.remark},
  57. <if test="item.gmtModified != null">
  58. gmt_modified = #{item.gmtModified},
  59. </if>
  60. <if test="item.modifier != null">
  61. modifier = #{item.modifier},
  62. </if>
  63. </set>
  64. where rec_id = #{item.recId} and hospital_id = #{item.hospitalId} and behospital_code = #{item.behospitalCode}
  65. </foreach>
  66. </update>
  67. <select id="getColumnZhAndCh" resultType="com.diagbot.dto.data.ColumnZhAndChDTO">
  68. select COLUMN_NAME as en,column_comment as ch from INFORMATION_SCHEMA.Columns where table_name='med_death_note'
  69. </select>
  70. </mapper>