VHISBINGRENBDJLMapper.xml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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.sqlservermapper.VHISBINGRENBDJLMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.sqlservermodel.VHISBINGRENBDJL" >
  5. <result column="ChargeID" property="chargeid" jdbcType="VARCHAR" />
  6. <result column="patientNo" property="patientno" jdbcType="VARCHAR" />
  7. <result column="oldDeptNo" property="olddeptno" jdbcType="VARCHAR" />
  8. <result column="oldDeptName" property="olddeptname" jdbcType="VARCHAR" />
  9. <result column="oldWardNo" property="oldwardno" jdbcType="VARCHAR" />
  10. <result column="oldWardName" property="oldwardname" jdbcType="VARCHAR" />
  11. <result column="oldBedNo" property="oldbedno" jdbcType="VARCHAR" />
  12. <result column="newDeptNo" property="newdeptno" jdbcType="VARCHAR" />
  13. <result column="newDeptName" property="newdeptname" jdbcType="VARCHAR" />
  14. <result column="newWardNo" property="newwardno" jdbcType="VARCHAR" />
  15. <result column="newWardName" property="newwardname" jdbcType="VARCHAR" />
  16. <result column="newBedNo" property="newbedno" jdbcType="VARCHAR" />
  17. <result column="oldAttendDivNo" property="oldattenddivno" jdbcType="VARCHAR" />
  18. <result column="newAddendDivNo" property="newaddenddivno" jdbcType="VARCHAR" />
  19. <result column="oldChief" property="oldchief" jdbcType="VARCHAR" />
  20. <result column="newChief" property="newchief" jdbcType="VARCHAR" />
  21. <result column="oldResident" property="oldresident" jdbcType="VARCHAR" />
  22. <result column="newResident" property="newresident" jdbcType="VARCHAR" />
  23. <result column="dynamicType" property="dynamictype" jdbcType="VARCHAR" />
  24. <result column="updateUser" property="updateuser" jdbcType="VARCHAR" />
  25. <result column="updateTime" property="updatetime" jdbcType="TIMESTAMP" />
  26. <result column="dynamicTime" property="dynamictime" jdbcType="TIMESTAMP" />
  27. <result column="isDel" property="isdel" jdbcType="INTEGER" />
  28. <result column="endTime" property="endtime" jdbcType="TIMESTAMP" />
  29. </resultMap>
  30. <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.sqlservermodel.VHISBINGRENBDJL" >
  31. insert into V_HIS_BINGRENBDJL (ChargeID, patientNo, oldDeptNo,
  32. oldDeptName, oldWardNo, oldWardName,
  33. oldBedNo, newDeptNo, newDeptName,
  34. newWardNo, newWardName, newBedNo,
  35. oldAttendDivNo, newAddendDivNo, oldChief,
  36. newChief, oldResident, newResident,
  37. dynamicType, updateUser, updateTime,
  38. dynamicTime, isDel, endTime
  39. )
  40. values (#{chargeid,jdbcType=VARCHAR}, #{patientno,jdbcType=VARCHAR}, #{olddeptno,jdbcType=VARCHAR},
  41. #{olddeptname,jdbcType=VARCHAR}, #{oldwardno,jdbcType=VARCHAR}, #{oldwardname,jdbcType=VARCHAR},
  42. #{oldbedno,jdbcType=VARCHAR}, #{newdeptno,jdbcType=VARCHAR}, #{newdeptname,jdbcType=VARCHAR},
  43. #{newwardno,jdbcType=VARCHAR}, #{newwardname,jdbcType=VARCHAR}, #{newbedno,jdbcType=VARCHAR},
  44. #{oldattenddivno,jdbcType=VARCHAR}, #{newaddenddivno,jdbcType=VARCHAR}, #{oldchief,jdbcType=VARCHAR},
  45. #{newchief,jdbcType=VARCHAR}, #{oldresident,jdbcType=VARCHAR}, #{newresident,jdbcType=VARCHAR},
  46. #{dynamictype,jdbcType=VARCHAR}, #{updateuser,jdbcType=VARCHAR}, #{updatetime,jdbcType=TIMESTAMP},
  47. #{dynamictime,jdbcType=TIMESTAMP}, #{isdel,jdbcType=INTEGER}, #{endtime,jdbcType=TIMESTAMP}
  48. )
  49. </insert>
  50. <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.sqlservermodel.VHISBINGRENBDJL" >
  51. insert into V_HIS_BINGRENBDJL
  52. <trim prefix="(" suffix=")" suffixOverrides="," >
  53. <if test="chargeid != null" >
  54. ChargeID,
  55. </if>
  56. <if test="patientno != null" >
  57. patientNo,
  58. </if>
  59. <if test="olddeptno != null" >
  60. oldDeptNo,
  61. </if>
  62. <if test="olddeptname != null" >
  63. oldDeptName,
  64. </if>
  65. <if test="oldwardno != null" >
  66. oldWardNo,
  67. </if>
  68. <if test="oldwardname != null" >
  69. oldWardName,
  70. </if>
  71. <if test="oldbedno != null" >
  72. oldBedNo,
  73. </if>
  74. <if test="newdeptno != null" >
  75. newDeptNo,
  76. </if>
  77. <if test="newdeptname != null" >
  78. newDeptName,
  79. </if>
  80. <if test="newwardno != null" >
  81. newWardNo,
  82. </if>
  83. <if test="newwardname != null" >
  84. newWardName,
  85. </if>
  86. <if test="newbedno != null" >
  87. newBedNo,
  88. </if>
  89. <if test="oldattenddivno != null" >
  90. oldAttendDivNo,
  91. </if>
  92. <if test="newaddenddivno != null" >
  93. newAddendDivNo,
  94. </if>
  95. <if test="oldchief != null" >
  96. oldChief,
  97. </if>
  98. <if test="newchief != null" >
  99. newChief,
  100. </if>
  101. <if test="oldresident != null" >
  102. oldResident,
  103. </if>
  104. <if test="newresident != null" >
  105. newResident,
  106. </if>
  107. <if test="dynamictype != null" >
  108. dynamicType,
  109. </if>
  110. <if test="updateuser != null" >
  111. updateUser,
  112. </if>
  113. <if test="updatetime != null" >
  114. updateTime,
  115. </if>
  116. <if test="dynamictime != null" >
  117. dynamicTime,
  118. </if>
  119. <if test="isdel != null" >
  120. isDel,
  121. </if>
  122. <if test="endtime != null" >
  123. endTime,
  124. </if>
  125. </trim>
  126. <trim prefix="values (" suffix=")" suffixOverrides="," >
  127. <if test="chargeid != null" >
  128. #{chargeid,jdbcType=VARCHAR},
  129. </if>
  130. <if test="patientno != null" >
  131. #{patientno,jdbcType=VARCHAR},
  132. </if>
  133. <if test="olddeptno != null" >
  134. #{olddeptno,jdbcType=VARCHAR},
  135. </if>
  136. <if test="olddeptname != null" >
  137. #{olddeptname,jdbcType=VARCHAR},
  138. </if>
  139. <if test="oldwardno != null" >
  140. #{oldwardno,jdbcType=VARCHAR},
  141. </if>
  142. <if test="oldwardname != null" >
  143. #{oldwardname,jdbcType=VARCHAR},
  144. </if>
  145. <if test="oldbedno != null" >
  146. #{oldbedno,jdbcType=VARCHAR},
  147. </if>
  148. <if test="newdeptno != null" >
  149. #{newdeptno,jdbcType=VARCHAR},
  150. </if>
  151. <if test="newdeptname != null" >
  152. #{newdeptname,jdbcType=VARCHAR},
  153. </if>
  154. <if test="newwardno != null" >
  155. #{newwardno,jdbcType=VARCHAR},
  156. </if>
  157. <if test="newwardname != null" >
  158. #{newwardname,jdbcType=VARCHAR},
  159. </if>
  160. <if test="newbedno != null" >
  161. #{newbedno,jdbcType=VARCHAR},
  162. </if>
  163. <if test="oldattenddivno != null" >
  164. #{oldattenddivno,jdbcType=VARCHAR},
  165. </if>
  166. <if test="newaddenddivno != null" >
  167. #{newaddenddivno,jdbcType=VARCHAR},
  168. </if>
  169. <if test="oldchief != null" >
  170. #{oldchief,jdbcType=VARCHAR},
  171. </if>
  172. <if test="newchief != null" >
  173. #{newchief,jdbcType=VARCHAR},
  174. </if>
  175. <if test="oldresident != null" >
  176. #{oldresident,jdbcType=VARCHAR},
  177. </if>
  178. <if test="newresident != null" >
  179. #{newresident,jdbcType=VARCHAR},
  180. </if>
  181. <if test="dynamictype != null" >
  182. #{dynamictype,jdbcType=VARCHAR},
  183. </if>
  184. <if test="updateuser != null" >
  185. #{updateuser,jdbcType=VARCHAR},
  186. </if>
  187. <if test="updatetime != null" >
  188. #{updatetime,jdbcType=TIMESTAMP},
  189. </if>
  190. <if test="dynamictime != null" >
  191. #{dynamictime,jdbcType=TIMESTAMP},
  192. </if>
  193. <if test="isdel != null" >
  194. #{isdel,jdbcType=INTEGER},
  195. </if>
  196. <if test="endtime != null" >
  197. #{endtime,jdbcType=TIMESTAMP},
  198. </if>
  199. </trim>
  200. </insert>
  201. <select id="selectByPatientNo" resultMap="BaseResultMap" parameterType="com.xinxin.topro.inpnurseservice.vo.InpChargeRecordVo">
  202. select
  203. ChargeID, patientNo, oldDeptNo,
  204. oldDeptName, oldWardNo, oldWardName,
  205. oldBedNo, newDeptNo, newDeptName,
  206. newWardNo, newWardName, newBedNo,
  207. oldAttendDivNo, newAddendDivNo, oldChief,
  208. newChief, oldResident, newResident,
  209. dynamicType, updateUser, updateTime,
  210. dynamicTime, isDel, endTime
  211. from V_HIS_BINGRENBDJL where patientNo=#{patientNo,jdbcType=VARCHAR}
  212. and dynamicType=#{dynamicType,jdbcType=VARCHAR}
  213. </select>
  214. </mapper>