BisInspAllOrganizationZjDao.xml 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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="cn.com.goldenwater.dcproj.dao.BisInspAllOrganizationZjDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspAllOrganizationZj" id="bisInspAllOrganizationZjResultMap">
  5. <result property="organizationId" column="ORGANIZATION_ID"/>
  6. <result property="parentId" column="PARENT_ID"/>
  7. <result property="name" column="NAME"/>
  8. <result property="fullName" column="FULL_NAME"/>
  9. <result property="address" column="ADDRESS"/>
  10. <result property="uncode" column="UNCODE"/>
  11. <result property="orderId" column="ORDER_ID"/>
  12. <result property="chargePerson" column="CHARGE_PERSON"/>
  13. <result property="phoneNumber" column="PHONE_NUMBER"/>
  14. <result property="mobileNumber" column="MOBILE_NUMBER"/>
  15. <result property="faxNumber" column="FAX_NUMBER"/>
  16. <result property="email" column="EMAIL"/>
  17. <result property="intruduction" column="INTRUDUCTION"/>
  18. <result property="staffCount" column="STAFF_COUNT"/>
  19. <result property="unitid" column="UNITID"/>
  20. <result property="typeCode" column="TYPE_CODE"/>
  21. <result property="adcd" column="ADCD"/>
  22. <result property="adName" column="AD_NAME"/>
  23. <result property="orgRelated" column="ORG_RELATED"/>
  24. </resultMap>
  25. <sql id="table_columns">
  26. ORGANIZATION_ID,
  27. PARENT_ID,
  28. NAME,
  29. FULL_NAME,
  30. ADDRESS,
  31. UNCODE,
  32. ORDER_ID,
  33. CHARGE_PERSON,
  34. PHONE_NUMBER,
  35. MOBILE_NUMBER,
  36. FAX_NUMBER,
  37. EMAIL,
  38. INTRUDUCTION,
  39. STAFF_COUNT,
  40. UNITID,
  41. TYPE_CODE,
  42. ADCD,
  43. AD_NAME,
  44. ORG_RELATED
  45. </sql>
  46. <sql id="entity_properties">
  47. #{organizationId},
  48. #{parentId},
  49. #{name},
  50. #{fullName},
  51. #{address},
  52. #{uncode},
  53. #{orderId},
  54. #{chargePerson},
  55. #{phoneNumber},
  56. #{mobileNumber},
  57. #{faxNumber},
  58. #{email},
  59. #{intruduction},
  60. #{staffCount},
  61. #{unitid},
  62. #{typeCode},
  63. #{adcd},
  64. #{adName},
  65. #{orgRelated}
  66. </sql>
  67. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  68. <sql id="page_where">
  69. <trim prefix="where" prefixOverrides="and | or ">
  70. <if test="parentId != null and parentId != ''">and PARENT_ID = #{parentId}</if>
  71. <if test="name != null and name != ''">and NAME = #{name}</if>
  72. <if test="fullName != null and fullName != ''">and FULL_NAME = #{fullName}</if>
  73. <if test="address != null and address != ''">and ADDRESS = #{address}</if>
  74. <if test="uncode != null and uncode != ''">and UNCODE = #{uncode}</if>
  75. <if test="orderId != null and orderId != ''">and ORDER_ID = #{orderId}</if>
  76. <if test="chargePerson != null and chargePerson != ''">and CHARGE_PERSON = #{chargePerson}</if>
  77. <if test="phoneNumber != null and phoneNumber != ''">and PHONE_NUMBER = #{phoneNumber}</if>
  78. <if test="mobileNumber != null and mobileNumber != ''">and MOBILE_NUMBER = #{mobileNumber}</if>
  79. <if test="faxNumber != null and faxNumber != ''">and FAX_NUMBER = #{faxNumber}</if>
  80. <if test="email != null and email != ''">and EMAIL = #{email}</if>
  81. <if test="intruduction != null and intruduction != ''">and INTRUDUCTION = #{intruduction}</if>
  82. <if test="staffCount != null and staffCount != ''">and STAFF_COUNT = #{staffCount}</if>
  83. <if test="unitid != null and unitid != ''">and UNITID = #{unitid}</if>
  84. <if test="typeCode != null and typeCode != ''">and TYPE_CODE = #{typeCode}</if>
  85. <if test="adcd != null and adcd != ''">and ADCD = #{adcd}</if>
  86. <if test="adName != null and adName != ''">and AD_NAME = #{adName}</if>
  87. <if test="orgRelated != null and orgRelated != ''">and ORG_RELATED = #{orgRelated}</if>
  88. and DATA_STAT='0'
  89. </trim>
  90. </sql>
  91. <select id="get" resultMap="bisInspAllOrganizationZjResultMap" parameterType="String" >
  92. select <include refid="table_columns" /> from BIS_INSP_ALL_ORGANIZATION_ZJ where ORGANIZATION_ID = #{organizationId}
  93. </select>
  94. <!-- <select id="getBy" resultMap="bisInspAllOrganizationZjResultMap">
  95. select <include refid="table_columns" /> from BIS_INSP_ALL_ORGANIZATION_ZJ <include refid="page_where" />
  96. </select>-->
  97. <!-- <select id="findAll" resultMap="bisInspAllOrganizationZjResultMap">
  98. select <include refid="table_columns" /> from BIS_INSP_ALL_ORGANIZATION_ZJ
  99. </select>-->
  100. <!-- <select id="findList" resultMap="bisInspAllOrganizationZjResultMap">
  101. select <include refid="table_columns" /> from BIS_INSP_ALL_ORGANIZATION_ZJ <include refid="page_where" />
  102. </select>-->
  103. <select id="selectCount" resultType="int" >
  104. select count(ORGANIZATION_ID) from BIS_INSP_ALL_ORGANIZATION_ZJ where ORGANIZATION_ID =#{organizationId}
  105. </select>
  106. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspAllOrganizationZj">
  107. insert into BIS_INSP_ALL_ORGANIZATION_ZJ( <include refid="table_columns" /> )
  108. values ( <include refid="entity_properties" /> )
  109. </insert>
  110. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspAllOrganizationZj">
  111. update BIS_INSP_ALL_ORGANIZATION_ZJ
  112. <trim prefix="set" suffixOverrides=",">
  113. <if test="parentId != null and parentId != ''">PARENT_ID = #{parentId},</if>
  114. <if test="name != null and name != ''">NAME = #{name},</if>
  115. <if test="fullName != null and fullName != ''">FULL_NAME = #{fullName},</if>
  116. <if test="address != null and address != ''">ADDRESS = #{address},</if>
  117. <if test="uncode != null and uncode != ''">UNCODE = #{uncode},</if>
  118. <if test="orderId != null and orderId != ''">ORDER_ID = #{orderId},</if>
  119. <if test="chargePerson != null and chargePerson != ''">CHARGE_PERSON = #{chargePerson},</if>
  120. <if test="phoneNumber != null and phoneNumber != ''">PHONE_NUMBER = #{phoneNumber},</if>
  121. <if test="mobileNumber != null and mobileNumber != ''">MOBILE_NUMBER = #{mobileNumber},</if>
  122. <if test="faxNumber != null and faxNumber != ''">FAX_NUMBER = #{faxNumber},</if>
  123. <if test="email != null and email != ''">EMAIL = #{email},</if>
  124. <if test="intruduction != null and intruduction != ''">INTRUDUCTION = #{intruduction},</if>
  125. <if test="staffCount != null and staffCount != ''">STAFF_COUNT = #{staffCount},</if>
  126. <if test="unitid != null and unitid != ''">UNITID = #{unitid},</if>
  127. <if test="typeCode != null and typeCode != ''">TYPE_CODE = #{typeCode},</if>
  128. <if test="adcd != null and adcd != ''">ADCD = #{adcd},</if>
  129. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  130. <if test="orgRelated != null and orgRelated != ''">ORG_RELATED = #{orgRelated},</if>
  131. </trim>
  132. <where>ORGANIZATION_ID = #{organizationId}</where>
  133. </update>
  134. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspAllOrganizationZj">
  135. update BIS_INSP_ALL_ORGANIZATION_ZJ
  136. <trim prefix="set" suffixOverrides=",">
  137. <if test="parentId != null and parentId != ''">PARENT_ID = #{parentId},</if>
  138. <if test="name != null and name != ''">NAME = #{name},</if>
  139. <if test="fullName != null and fullName != ''">FULL_NAME = #{fullName},</if>
  140. <if test="address != null and address != ''">ADDRESS = #{address},</if>
  141. <if test="uncode != null and uncode != ''">UNCODE = #{uncode},</if>
  142. <if test="orderId != null and orderId != ''">ORDER_ID = #{orderId},</if>
  143. <if test="chargePerson != null and chargePerson != ''">CHARGE_PERSON = #{chargePerson},</if>
  144. <if test="phoneNumber != null and phoneNumber != ''">PHONE_NUMBER = #{phoneNumber},</if>
  145. <if test="mobileNumber != null and mobileNumber != ''">MOBILE_NUMBER = #{mobileNumber},</if>
  146. <if test="faxNumber != null and faxNumber != ''">FAX_NUMBER = #{faxNumber},</if>
  147. <if test="email != null and email != ''">EMAIL = #{email},</if>
  148. <if test="intruduction != null and intruduction != ''">INTRUDUCTION = #{intruduction},</if>
  149. <if test="staffCount != null and staffCount != ''">STAFF_COUNT = #{staffCount},</if>
  150. <if test="unitid != null and unitid != ''">UNITID = #{unitid},</if>
  151. <if test="typeCode != null and typeCode != ''">TYPE_CODE = #{typeCode},</if>
  152. <if test="adcd != null and adcd != ''">ADCD = #{adcd},</if>
  153. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  154. <if test="orgRelated != null and orgRelated != ''">ORG_RELATED = #{orgRelated},</if>
  155. </trim>
  156. <include refid="page_where" />
  157. </update>
  158. <!-- 其他自定义SQL -->
  159. </mapper>