InpRecureTreatMapper.xml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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.InpRecureTreatMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRecureTreat" >
  5. <id column="irt_id" property="irtId" 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="irt_item" property="irtItem" jdbcType="VARCHAR" />
  12. <result column="irt_item_name" property="irtItemName" jdbcType="VARCHAR" />
  13. <result column="irt_stage" property="irtStage" jdbcType="INTEGER" />
  14. <result column="irt_time" property="irtTime" jdbcType="VARCHAR" />
  15. <result column="irt_item_target" property="irtItemTarget" jdbcType="VARCHAR" />
  16. <result column="irt_former_id" property="irtFormerId" jdbcType="INTEGER" />
  17. <result column="irt_recordor" property="irtRecordor" jdbcType="VARCHAR" />
  18. <result column="irt_record_time" property="irtRecordTime" jdbcType="TIMESTAMP" />
  19. <result column="irt_operation_time" property="irtOperationTime" jdbcType="TIMESTAMP" />
  20. <result column="irt_operator" property="irtOperator" jdbcType="VARCHAR" />
  21. <result column="irt_is_del" property="irtIsDel" jdbcType="INTEGER" />
  22. </resultMap>
  23. <sql id="Base_Column_List" >
  24. irt_id, PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, irt_item, irt_item_name,
  25. irt_stage, irt_time, irt_item_target, irt_former_id, irt_recordor, irt_record_time,
  26. irt_operation_time, irt_operator, irt_is_del
  27. </sql>
  28. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  29. select
  30. <include refid="Base_Column_List" />
  31. from inp_recure_treat
  32. where irt_id = #{irtId,jdbcType=INTEGER}
  33. and irt_is_del = 0
  34. </select>
  35. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  36. delete from inp_recure_treat
  37. where irt_id = #{irtId,jdbcType=INTEGER}
  38. </delete>
  39. <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRecureTreat" useGeneratedKeys="true" keyColumn="irt_id" keyProperty="irtId">
  40. insert into inp_recure_treat (PatientNo, HI_ID,
  41. DD_DepDm, DW_WardDm, DB_BedNo,
  42. irt_item, irt_item_name, irt_stage,
  43. irt_time, irt_item_target, irt_former_id,
  44. irt_recordor, irt_record_time, irt_operation_time,
  45. irt_operator, irt_is_del)
  46. values (#{patientno,jdbcType=VARCHAR}, #{hiId,jdbcType=INTEGER},
  47. #{ddDepdm,jdbcType=VARCHAR}, #{dwWarddm,jdbcType=VARCHAR}, #{dbBedno,jdbcType=VARCHAR},
  48. #{irtItem,jdbcType=VARCHAR}, #{irtItemName,jdbcType=VARCHAR}, #{irtStage,jdbcType=INTEGER},
  49. #{irtTime,jdbcType=VARCHAR}, #{irtItemTarget,jdbcType=VARCHAR}, #{irtFormerId,jdbcType=INTEGER},
  50. #{irtRecordor,jdbcType=VARCHAR}, #{irtRecordTime,jdbcType=TIMESTAMP}, #{irtOperationTime,jdbcType=TIMESTAMP},
  51. #{irtOperator,jdbcType=VARCHAR}, 0)
  52. </insert>
  53. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRecureTreat" >
  54. update inp_recure_treat
  55. <set >
  56. <if test="patientno != null" >
  57. PatientNo = #{patientno,jdbcType=VARCHAR},
  58. </if>
  59. <if test="hiId != null" >
  60. HI_ID = #{hiId,jdbcType=INTEGER},
  61. </if>
  62. <if test="ddDepdm != null" >
  63. DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
  64. </if>
  65. <if test="dwWarddm != null" >
  66. DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
  67. </if>
  68. <if test="dbBedno != null" >
  69. DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
  70. </if>
  71. <if test="irtItem != null" >
  72. irt_item = #{irtItem,jdbcType=VARCHAR},
  73. </if>
  74. <if test="irtItemName != null" >
  75. irt_item_name = #{irtItemName,jdbcType=VARCHAR},
  76. </if>
  77. <if test="irtStage != null" >
  78. irt_stage = #{irtStage,jdbcType=INTEGER},
  79. </if>
  80. <if test="irtTime != null" >
  81. irt_time = #{irtTime,jdbcType=VARCHAR},
  82. </if>
  83. <if test="irtItemTarget != null" >
  84. irt_item_target = #{irtItemTarget,jdbcType=VARCHAR},
  85. </if>
  86. <if test="irtFormerId != null" >
  87. irt_former_id = #{irtFormerId,jdbcType=INTEGER},
  88. </if>
  89. <if test="irtRecordor != null" >
  90. irt_recordor = #{irtRecordor,jdbcType=VARCHAR},
  91. </if>
  92. <if test="irtRecordTime != null" >
  93. irt_record_time = #{irtRecordTime,jdbcType=TIMESTAMP},
  94. </if>
  95. <if test="irtOperationTime != null" >
  96. irt_operation_time = #{irtOperationTime,jdbcType=TIMESTAMP},
  97. </if>
  98. <if test="irtOperator != null" >
  99. irt_operator = #{irtOperator,jdbcType=VARCHAR},
  100. </if>
  101. <if test="irtIsDel != null" >
  102. irt_is_del = #{irtIsDel,jdbcType=INTEGER},
  103. </if>
  104. </set>
  105. where irt_id = #{irtId,jdbcType=INTEGER}
  106. </update>
  107. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpRecureTreat" >
  108. update inp_recure_treat
  109. set PatientNo = #{patientno,jdbcType=VARCHAR},
  110. HI_ID = #{hiId,jdbcType=INTEGER},
  111. DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
  112. DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
  113. DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
  114. irt_item = #{irtItem,jdbcType=VARCHAR},
  115. irt_item_name = #{irtItemName,jdbcType=VARCHAR},
  116. irt_stage = #{irtStage,jdbcType=INTEGER},
  117. irt_time = #{irtTime,jdbcType=VARCHAR},
  118. irt_item_target = #{irtItemTarget,jdbcType=VARCHAR},
  119. irt_former_id = #{irtFormerId,jdbcType=INTEGER},
  120. irt_recordor = #{irtRecordor,jdbcType=VARCHAR},
  121. irt_record_time = #{irtRecordTime,jdbcType=TIMESTAMP},
  122. irt_operation_time = #{irtOperationTime,jdbcType=TIMESTAMP},
  123. irt_operator = #{irtOperator,jdbcType=VARCHAR},
  124. irt_is_del = #{irtIsDel,jdbcType=INTEGER}
  125. where irt_id = #{irtId,jdbcType=INTEGER}
  126. </update>
  127. <update id="delById">
  128. update inp_recure_treat
  129. set
  130. irt_operation_time = #{irtOperationTime,jdbcType=TIMESTAMP},
  131. irt_operator = #{irtOperator,jdbcType=VARCHAR},
  132. irt_is_del = -1
  133. where irt_id = #{irtId,jdbcType=INTEGER}
  134. </update>
  135. <select id="selectByPatient" resultMap="BaseResultMap">
  136. select <include refid="Base_Column_List"/>
  137. from inp_recure_treat
  138. where PatientNo = #{patientNo,jdbcType=VARCHAR}
  139. and irt_is_del = 0
  140. and HI_ID = #{hiId,jdbcType=INTEGER}
  141. order by irt_record_time
  142. </select>
  143. </mapper>