InpWardShiftMapper.xml 8.4 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.mysqlmapper.InpWardShiftMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpWardShift" >
  5. <id column="IWS_ID" property="iwsId" jdbcType="INTEGER" />
  6. <result column="IWS_Time" property="iwsTime" jdbcType="TIMESTAMP" />
  7. <result column="IWS_Hander" property="iwsHander" jdbcType="VARCHAR" />
  8. <result column="IWS_Record_Time" property="iwsRecordTime" jdbcType="TIMESTAMP" />
  9. <result column="IWS_Hand_WardDm" property="iwsHandWarddm" jdbcType="VARCHAR" />
  10. <result column="IWS_Recordor" property="iwsRecordor" jdbcType="VARCHAR" />
  11. <result column="IWS_IsDel" property="iwsIsdel" jdbcType="INTEGER" />
  12. <result column="IWS_Operation_Time" property="iwsOperationTime" jdbcType="TIMESTAMP" />
  13. <result column="IWS_Operator" property="iwsOperator" jdbcType="VARCHAR" />
  14. <result column="IWS_FormerID" property="iwsFormerid" jdbcType="INTEGER" />
  15. <result column="HI_ID" property="hiId" jdbcType="INTEGER" />
  16. </resultMap>
  17. <resultMap id="ResultMapWithBLOBs" type="com.xinxin.topro.inpnurseservice.mysqlmodel.InpWardShift" extends="BaseResultMap" >
  18. <result column="IWS_Content" property="iwsContent" jdbcType="LONGVARCHAR" />
  19. </resultMap>
  20. <sql id="Base_Column_List" >
  21. IWS_ID, IWS_Time, IWS_Hander, IWS_Record_Time, IWS_Hand_WardDm, IWS_Recordor, IWS_IsDel,
  22. IWS_Operation_Time, IWS_Operator, IWS_FormerID, HI_ID
  23. </sql>
  24. <sql id="Blob_Column_List" >
  25. IWS_Content
  26. </sql>
  27. <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Integer" >
  28. select
  29. <include refid="Base_Column_List" />
  30. ,
  31. <include refid="Blob_Column_List" />
  32. from inp_ward_shift
  33. where IWS_ID = #{iwsId,jdbcType=INTEGER}
  34. </select>
  35. <select id="selectByWardHandTime" resultMap="ResultMapWithBLOBs" parameterType="java.lang.String" >
  36. select
  37. <include refid="Base_Column_List" />
  38. ,
  39. <include refid="Blob_Column_List" />
  40. from inp_ward_shift
  41. where IWS_Hand_WardDm = #{wardDm,jdbcType=VARCHAR} AND date_format(IWS_Time,'%Y-%m-%d') = #{handTime,jdbcType=VARCHAR} AND IWS_IsDel = 0 limit 1
  42. </select>
  43. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  44. delete from inp_ward_shift
  45. where IWS_ID = #{iwsId,jdbcType=INTEGER}
  46. </delete>
  47. <insert id="insert" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpWardShift" >
  48. insert into inp_ward_shift (IWS_ID, IWS_Time, IWS_Hander,
  49. IWS_Record_Time, IWS_Hand_WardDm, IWS_Recordor,
  50. IWS_IsDel, IWS_Operation_Time, IWS_Operator,
  51. IWS_FormerID, HI_ID, IWS_Content
  52. )
  53. values (#{iwsId,jdbcType=INTEGER}, #{iwsTime,jdbcType=TIMESTAMP}, #{iwsHander,jdbcType=VARCHAR},
  54. #{iwsRecordTime,jdbcType=TIMESTAMP}, #{iwsHandWarddm,jdbcType=VARCHAR}, #{iwsRecordor,jdbcType=VARCHAR},
  55. #{iwsIsdel,jdbcType=INTEGER}, #{iwsOperationTime,jdbcType=TIMESTAMP}, #{iwsOperator,jdbcType=VARCHAR},
  56. #{iwsFormerid,jdbcType=INTEGER}, #{hiId,jdbcType=INTEGER}, #{iwsContent,jdbcType=LONGVARCHAR}
  57. )
  58. </insert>
  59. <insert id="insertSelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpWardShift" >
  60. insert into inp_ward_shift
  61. <trim prefix="(" suffix=")" suffixOverrides="," >
  62. <if test="iwsId != null" >
  63. IWS_ID,
  64. </if>
  65. <if test="iwsTime != null" >
  66. IWS_Time,
  67. </if>
  68. <if test="iwsHander != null" >
  69. IWS_Hander,
  70. </if>
  71. <if test="iwsRecordTime != null" >
  72. IWS_Record_Time,
  73. </if>
  74. <if test="iwsHandWarddm != null" >
  75. IWS_Hand_WardDm,
  76. </if>
  77. <if test="iwsRecordor != null" >
  78. IWS_Recordor,
  79. </if>
  80. <if test="iwsIsdel != null" >
  81. IWS_IsDel,
  82. </if>
  83. <if test="iwsOperationTime != null" >
  84. IWS_Operation_Time,
  85. </if>
  86. <if test="iwsOperator != null" >
  87. IWS_Operator,
  88. </if>
  89. <if test="iwsFormerid != null" >
  90. IWS_FormerID,
  91. </if>
  92. <if test="hiId != null" >
  93. HI_ID,
  94. </if>
  95. <if test="iwsContent != null" >
  96. IWS_Content,
  97. </if>
  98. </trim>
  99. <trim prefix="values (" suffix=")" suffixOverrides="," >
  100. <if test="iwsId != null" >
  101. #{iwsId,jdbcType=INTEGER},
  102. </if>
  103. <if test="iwsTime != null" >
  104. #{iwsTime,jdbcType=TIMESTAMP},
  105. </if>
  106. <if test="iwsHander != null" >
  107. #{iwsHander,jdbcType=VARCHAR},
  108. </if>
  109. <if test="iwsRecordTime != null" >
  110. #{iwsRecordTime,jdbcType=TIMESTAMP},
  111. </if>
  112. <if test="iwsHandWarddm != null" >
  113. #{iwsHandWarddm,jdbcType=VARCHAR},
  114. </if>
  115. <if test="iwsRecordor != null" >
  116. #{iwsRecordor,jdbcType=VARCHAR},
  117. </if>
  118. <if test="iwsIsdel != null" >
  119. #{iwsIsdel,jdbcType=INTEGER},
  120. </if>
  121. <if test="iwsOperationTime != null" >
  122. #{iwsOperationTime,jdbcType=TIMESTAMP},
  123. </if>
  124. <if test="iwsOperator != null" >
  125. #{iwsOperator,jdbcType=VARCHAR},
  126. </if>
  127. <if test="iwsFormerid != null" >
  128. #{iwsFormerid,jdbcType=INTEGER},
  129. </if>
  130. <if test="hiId != null" >
  131. #{hiId,jdbcType=INTEGER},
  132. </if>
  133. <if test="iwsContent != null" >
  134. #{iwsContent,jdbcType=LONGVARCHAR},
  135. </if>
  136. </trim>
  137. </insert>
  138. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpWardShift" >
  139. update inp_ward_shift
  140. <set >
  141. <if test="iwsTime != null" >
  142. IWS_Time = #{iwsTime,jdbcType=TIMESTAMP},
  143. </if>
  144. <if test="iwsHander != null" >
  145. IWS_Hander = #{iwsHander,jdbcType=VARCHAR},
  146. </if>
  147. <if test="iwsRecordTime != null" >
  148. IWS_Record_Time = #{iwsRecordTime,jdbcType=TIMESTAMP},
  149. </if>
  150. <if test="iwsHandWarddm != null" >
  151. IWS_Hand_WardDm = #{iwsHandWarddm,jdbcType=VARCHAR},
  152. </if>
  153. <if test="iwsRecordor != null" >
  154. IWS_Recordor = #{iwsRecordor,jdbcType=VARCHAR},
  155. </if>
  156. <if test="iwsIsdel != null" >
  157. IWS_IsDel = #{iwsIsdel,jdbcType=INTEGER},
  158. </if>
  159. <if test="iwsOperationTime != null" >
  160. IWS_Operation_Time = #{iwsOperationTime,jdbcType=TIMESTAMP},
  161. </if>
  162. <if test="iwsOperator != null" >
  163. IWS_Operator = #{iwsOperator,jdbcType=VARCHAR},
  164. </if>
  165. <if test="iwsFormerid != null" >
  166. IWS_FormerID = #{iwsFormerid,jdbcType=INTEGER},
  167. </if>
  168. <if test="hiId != null" >
  169. HI_ID = #{hiId,jdbcType=INTEGER},
  170. </if>
  171. <if test="iwsContent != null" >
  172. IWS_Content = #{iwsContent,jdbcType=LONGVARCHAR},
  173. </if>
  174. </set>
  175. where IWS_ID = #{iwsId,jdbcType=INTEGER}
  176. </update>
  177. <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpWardShift" >
  178. update inp_ward_shift
  179. set IWS_Time = #{iwsTime,jdbcType=TIMESTAMP},
  180. IWS_Hander = #{iwsHander,jdbcType=VARCHAR},
  181. IWS_Record_Time = #{iwsRecordTime,jdbcType=TIMESTAMP},
  182. IWS_Hand_WardDm = #{iwsHandWarddm,jdbcType=VARCHAR},
  183. IWS_Recordor = #{iwsRecordor,jdbcType=VARCHAR},
  184. IWS_IsDel = #{iwsIsdel,jdbcType=INTEGER},
  185. IWS_Operation_Time = #{iwsOperationTime,jdbcType=TIMESTAMP},
  186. IWS_Operator = #{iwsOperator,jdbcType=VARCHAR},
  187. IWS_FormerID = #{iwsFormerid,jdbcType=INTEGER},
  188. HI_ID = #{hiId,jdbcType=INTEGER},
  189. IWS_Content = #{iwsContent,jdbcType=LONGVARCHAR}
  190. where IWS_ID = #{iwsId,jdbcType=INTEGER}
  191. </update>
  192. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.inpnurseservice.mysqlmodel.InpWardShift" >
  193. update inp_ward_shift
  194. set IWS_Time = #{iwsTime,jdbcType=TIMESTAMP},
  195. IWS_Hander = #{iwsHander,jdbcType=VARCHAR},
  196. IWS_Record_Time = #{iwsRecordTime,jdbcType=TIMESTAMP},
  197. IWS_Hand_WardDm = #{iwsHandWarddm,jdbcType=VARCHAR},
  198. IWS_Recordor = #{iwsRecordor,jdbcType=VARCHAR},
  199. IWS_IsDel = #{iwsIsdel,jdbcType=INTEGER},
  200. IWS_Operation_Time = #{iwsOperationTime,jdbcType=TIMESTAMP},
  201. IWS_Operator = #{iwsOperator,jdbcType=VARCHAR},
  202. IWS_FormerID = #{iwsFormerid,jdbcType=INTEGER},
  203. HI_ID = #{hiId,jdbcType=INTEGER}
  204. where IWS_ID = #{iwsId,jdbcType=INTEGER}
  205. </update>
  206. <update id="updateStatus" parameterType="java.lang.Integer" >
  207. update inp_ward_shift
  208. set
  209. IWS_IsDel = -1
  210. where IWS_ID = #{iwsId,jdbcType=INTEGER}
  211. </update>
  212. </mapper>