InpFormPrintMapper.xml 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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.InpFormPrintMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpFormPrint" >
  5. <id column="IFP_ID" property="ifpId" jdbcType="INTEGER" />
  6. <result column="DFT_ID" property="dftId" jdbcType="INTEGER" />
  7. <result column="PatientNo" property="patientno" jdbcType="VARCHAR" />
  8. <result column="HI_ID" property="hiId" jdbcType="INTEGER" />
  9. <result column="DD_DepDm" property="ddDepdm" jdbcType="VARCHAR" />
  10. <result column="DW_WardDm" property="dwWarddm" jdbcType="VARCHAR" />
  11. <result column="DB_BedNo" property="dbBedno" jdbcType="VARCHAR" />
  12. <result column="IFP_Print_Time" property="ifpPrintTime" jdbcType="TIMESTAMP" />
  13. <result column="IFP_Printer" property="ifpPrinter" jdbcType="VARCHAR" />
  14. </resultMap>
  15. <sql id="Base_Column_List" >
  16. IFP_ID, DFT_ID, PatientNo, HI_ID, DD_DepDm, DW_WardDm, DB_BedNo, IFP_Print_Time,
  17. IFP_Printer
  18. </sql>
  19. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  20. select
  21. <include refid="Base_Column_List" />
  22. from inp_form_print
  23. where IFP_ID = #{ifpId,jdbcType=INTEGER}
  24. </select>
  25. <select id="selectByDFTID" resultMap="BaseResultMap">
  26. select
  27. <include refid="Base_Column_List" />
  28. from inp_form_print
  29. where DFT_ID = #{dftId,jdbcType=INTEGER} and PatientNo = #{patientNo,jdbcType=VARCHAR}
  30. ORDER BY IFP_Print_Time DESC
  31. </select>
  32. <select id="selectByPatientNo" resultMap="BaseResultMap" parameterType="java.lang.String">
  33. select
  34. <include refid="Base_Column_List" />
  35. from inp_form_print
  36. where PatientNo = #{patientNo,jdbcType=VARCHAR}
  37. ORDER BY IFP_Print_Time DESC
  38. </select>
  39. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  40. delete from inp_form_print
  41. where IFP_ID = #{ifpId,jdbcType=INTEGER}
  42. </delete>
  43. <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpFormPrint" >
  44. insert into inp_form_print (IFP_ID, DFT_ID, PatientNo,
  45. HI_ID, DD_DepDm, DW_WardDm,
  46. DB_BedNo, IFP_Print_Time, IFP_Printer
  47. )
  48. values (#{ifpId,jdbcType=INTEGER}, #{dftId,jdbcType=INTEGER}, #{patientno,jdbcType=VARCHAR},
  49. #{hiId,jdbcType=INTEGER}, #{ddDepdm,jdbcType=VARCHAR}, #{dwWarddm,jdbcType=VARCHAR},
  50. #{dbBedno,jdbcType=VARCHAR}, #{ifpPrintTime,jdbcType=TIMESTAMP}, #{ifpPrinter,jdbcType=VARCHAR}
  51. )
  52. </insert>
  53. <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpFormPrint" >
  54. insert into inp_form_print
  55. <trim prefix="(" suffix=")" suffixOverrides="," >
  56. <if test="ifpId != null" >
  57. IFP_ID,
  58. </if>
  59. <if test="dftId != null" >
  60. DFT_ID,
  61. </if>
  62. <if test="patientno != null" >
  63. PatientNo,
  64. </if>
  65. <if test="hiId != null" >
  66. HI_ID,
  67. </if>
  68. <if test="ddDepdm != null" >
  69. DD_DepDm,
  70. </if>
  71. <if test="dwWarddm != null" >
  72. DW_WardDm,
  73. </if>
  74. <if test="dbBedno != null" >
  75. DB_BedNo,
  76. </if>
  77. IFP_Print_Time,
  78. <if test="ifpPrinter != null" >
  79. IFP_Printer,
  80. </if>
  81. </trim>
  82. <trim prefix="values (" suffix=")" suffixOverrides="," >
  83. <if test="ifpId != null" >
  84. #{ifpId,jdbcType=INTEGER},
  85. </if>
  86. <if test="dftId != null" >
  87. #{dftId,jdbcType=INTEGER},
  88. </if>
  89. <if test="patientno != null" >
  90. #{patientno,jdbcType=VARCHAR},
  91. </if>
  92. <if test="hiId != null" >
  93. #{hiId,jdbcType=INTEGER},
  94. </if>
  95. <if test="ddDepdm != null" >
  96. #{ddDepdm,jdbcType=VARCHAR},
  97. </if>
  98. <if test="dwWarddm != null" >
  99. #{dwWarddm,jdbcType=VARCHAR},
  100. </if>
  101. <if test="dbBedno != null" >
  102. #{dbBedno,jdbcType=VARCHAR},
  103. </if>
  104. now(),
  105. <if test="ifpPrinter != null" >
  106. #{ifpPrinter,jdbcType=VARCHAR},
  107. </if>
  108. </trim>
  109. </insert>
  110. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpFormPrint" >
  111. update inp_form_print
  112. <set >
  113. <if test="dftId != null" >
  114. DFT_ID = #{dftId,jdbcType=INTEGER},
  115. </if>
  116. <if test="patientno != null" >
  117. PatientNo = #{patientno,jdbcType=VARCHAR},
  118. </if>
  119. <if test="hiId != null" >
  120. HI_ID = #{hiId,jdbcType=INTEGER},
  121. </if>
  122. <if test="ddDepdm != null" >
  123. DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
  124. </if>
  125. <if test="dwWarddm != null" >
  126. DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
  127. </if>
  128. <if test="dbBedno != null" >
  129. DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
  130. </if>
  131. <if test="ifpPrintTime != null" >
  132. IFP_Print_Time = #{ifpPrintTime,jdbcType=TIMESTAMP},
  133. </if>
  134. <if test="ifpPrinter != null" >
  135. IFP_Printer = #{ifpPrinter,jdbcType=VARCHAR},
  136. </if>
  137. </set>
  138. where IFP_ID = #{ifpId,jdbcType=INTEGER}
  139. </update>
  140. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpFormPrint" >
  141. update inp_form_print
  142. set DFT_ID = #{dftId,jdbcType=INTEGER},
  143. PatientNo = #{patientno,jdbcType=VARCHAR},
  144. HI_ID = #{hiId,jdbcType=INTEGER},
  145. DD_DepDm = #{ddDepdm,jdbcType=VARCHAR},
  146. DW_WardDm = #{dwWarddm,jdbcType=VARCHAR},
  147. DB_BedNo = #{dbBedno,jdbcType=VARCHAR},
  148. IFP_Print_Time = #{ifpPrintTime,jdbcType=TIMESTAMP},
  149. IFP_Printer = #{ifpPrinter,jdbcType=VARCHAR}
  150. where IFP_ID = #{ifpId,jdbcType=INTEGER}
  151. </update>
  152. </mapper>