WardMapper.xml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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.base.sqlservermapper.WardMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.base.sqlservermodel.Ward" >
  5. <result column="DepartNo" property="departno" jdbcType="VARCHAR" />
  6. <result column="DepartCode" property="departcode" jdbcType="VARCHAR" />
  7. <result column="DepartName" property="departname" jdbcType="VARCHAR" />
  8. <result column="SubTel" property="subtel" jdbcType="SMALLINT" />
  9. <result column="Zone" property="zone" jdbcType="VARCHAR" />
  10. <result column="Location" property="location" jdbcType="VARCHAR" />
  11. <result column="StockType" property="stocktype" jdbcType="VARCHAR" />
  12. <result column="IsDuty" property="isduty" jdbcType="BIT" />
  13. <result column="CostCenter" property="costcenter" jdbcType="VARCHAR" />
  14. <result column="StartDate" property="startdate" jdbcType="TIMESTAMP" />
  15. <result column="EndDate" property="enddate" jdbcType="TIMESTAMP" />
  16. <result column="UpdateUser" property="updateuser" jdbcType="VARCHAR" />
  17. <result column="DepartType" property="departtype" jdbcType="VARCHAR" />
  18. <result column="UpdateTime" property="updatetime" jdbcType="TIMESTAMP" />
  19. <result column="EmergencyFlag" property="emergencyflag" jdbcType="INTEGER" />
  20. </resultMap>
  21. <insert id="insert" parameterType="com.xinxin.topro.base.sqlservermodel.Ward" >
  22. insert into V_Ward (DepartNo, DepartCode, DepartName,
  23. SubTel, Zone, Location,
  24. StockType, IsDuty, CostCenter,
  25. StartDate, EndDate, UpdateUser,
  26. DepartType, UpdateTime, EmergencyFlag
  27. )
  28. values (#{departno,jdbcType=VARCHAR}, #{departcode,jdbcType=VARCHAR}, #{departname,jdbcType=VARCHAR},
  29. #{subtel,jdbcType=SMALLINT}, #{zone,jdbcType=VARCHAR}, #{location,jdbcType=VARCHAR},
  30. #{stocktype,jdbcType=VARCHAR}, #{isduty,jdbcType=BIT}, #{costcenter,jdbcType=VARCHAR},
  31. #{startdate,jdbcType=TIMESTAMP}, #{enddate,jdbcType=TIMESTAMP}, #{updateuser,jdbcType=VARCHAR},
  32. #{departtype,jdbcType=VARCHAR}, #{updatetime,jdbcType=TIMESTAMP}, #{emergencyflag,jdbcType=INTEGER}
  33. )
  34. </insert>
  35. <insert id="insertSelective" parameterType="com.xinxin.topro.base.sqlservermodel.Ward" >
  36. insert into V_Ward
  37. <trim prefix="(" suffix=")" suffixOverrides="," >
  38. <if test="departno != null" >
  39. DepartNo,
  40. </if>
  41. <if test="departcode != null" >
  42. DepartCode,
  43. </if>
  44. <if test="departname != null" >
  45. DepartName,
  46. </if>
  47. <if test="subtel != null" >
  48. SubTel,
  49. </if>
  50. <if test="zone != null" >
  51. Zone,
  52. </if>
  53. <if test="location != null" >
  54. Location,
  55. </if>
  56. <if test="stocktype != null" >
  57. StockType,
  58. </if>
  59. <if test="isduty != null" >
  60. IsDuty,
  61. </if>
  62. <if test="costcenter != null" >
  63. CostCenter,
  64. </if>
  65. <if test="startdate != null" >
  66. StartDate,
  67. </if>
  68. <if test="enddate != null" >
  69. EndDate,
  70. </if>
  71. <if test="updateuser != null" >
  72. UpdateUser,
  73. </if>
  74. <if test="departtype != null" >
  75. DepartType,
  76. </if>
  77. <if test="updatetime != null" >
  78. UpdateTime,
  79. </if>
  80. <if test="emergencyflag != null" >
  81. EmergencyFlag,
  82. </if>
  83. </trim>
  84. <trim prefix="values (" suffix=")" suffixOverrides="," >
  85. <if test="departno != null" >
  86. #{departno,jdbcType=VARCHAR},
  87. </if>
  88. <if test="departcode != null" >
  89. #{departcode,jdbcType=VARCHAR},
  90. </if>
  91. <if test="departname != null" >
  92. #{departname,jdbcType=VARCHAR},
  93. </if>
  94. <if test="subtel != null" >
  95. #{subtel,jdbcType=SMALLINT},
  96. </if>
  97. <if test="zone != null" >
  98. #{zone,jdbcType=VARCHAR},
  99. </if>
  100. <if test="location != null" >
  101. #{location,jdbcType=VARCHAR},
  102. </if>
  103. <if test="stocktype != null" >
  104. #{stocktype,jdbcType=VARCHAR},
  105. </if>
  106. <if test="isduty != null" >
  107. #{isduty,jdbcType=BIT},
  108. </if>
  109. <if test="costcenter != null" >
  110. #{costcenter,jdbcType=VARCHAR},
  111. </if>
  112. <if test="startdate != null" >
  113. #{startdate,jdbcType=TIMESTAMP},
  114. </if>
  115. <if test="enddate != null" >
  116. #{enddate,jdbcType=TIMESTAMP},
  117. </if>
  118. <if test="updateuser != null" >
  119. #{updateuser,jdbcType=VARCHAR},
  120. </if>
  121. <if test="departtype != null" >
  122. #{departtype,jdbcType=VARCHAR},
  123. </if>
  124. <if test="updatetime != null" >
  125. #{updatetime,jdbcType=TIMESTAMP},
  126. </if>
  127. <if test="emergencyflag != null" >
  128. #{emergencyflag,jdbcType=INTEGER},
  129. </if>
  130. </trim>
  131. </insert>
  132. </mapper>