AttProjectInsuranceParticipDao.xml 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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.AttProjectInsuranceParticipDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.AttProjectInsuranceParticip" id="attProjectInsuranceParticipResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="projectId" column="PROJECT_ID"/>
  7. <result property="legalEntity" column="LEGAL_ENTITY"/>
  8. <result property="legalContactPhone" column="LEGAL_CONTACT_PHONE"/>
  9. <result property="constructorUnit" column="CONSTRUCTOR_UNIT"/>
  10. <result property="constructorContactPhone" column="CONSTRUCTOR_CONTACT_PHONE"/>
  11. <result property="supervisorUnit" column="SUPERVISOR_UNIT"/>
  12. <result property="supervisorContactPhone" column="SUPERVISOR_CONTACT_PHONE"/>
  13. <result property="designUnit" column="DESIGN_UNIT"/>
  14. <result property="designContactPhone" column="DESIGN_CONTACT_PHONE"/>
  15. <result property="otherParticipantUnit" column="OTHER_PARTICIPANT_UNIT"/>
  16. <result property="otherContactPhone" column="OTHER_CONTACT_PHONE"/>
  17. <result property="remark" column="REMARK"/>
  18. <result property="intm" column="INTM"/>
  19. <result property="uptm" column="UPTM"/>
  20. <result property="dataStat" column="DATA_STAT"/>
  21. </resultMap>
  22. <sql id="table_columns">
  23. ID,
  24. PROJECT_ID,
  25. LEGAL_ENTITY,
  26. LEGAL_CONTACT_PHONE,
  27. CONSTRUCTOR_UNIT,
  28. CONSTRUCTOR_CONTACT_PHONE,
  29. SUPERVISOR_UNIT,
  30. SUPERVISOR_CONTACT_PHONE,
  31. DESIGN_UNIT,
  32. DESIGN_CONTACT_PHONE,
  33. OTHER_PARTICIPANT_UNIT,
  34. OTHER_CONTACT_PHONE,
  35. REMARK,
  36. INTM,
  37. UPTM,
  38. DATA_STAT
  39. </sql>
  40. <sql id="entity_properties">
  41. #{id},
  42. #{projectId},
  43. #{legalEntity},
  44. #{legalContactPhone},
  45. #{constructorUnit},
  46. #{constructorContactPhone},
  47. #{supervisorUnit},
  48. #{supervisorContactPhone},
  49. #{designUnit},
  50. #{designContactPhone},
  51. #{otherParticipantUnit},
  52. #{otherContactPhone},
  53. #{remark},
  54. #{intm},
  55. #{uptm},
  56. #{dataStat}
  57. </sql>
  58. <sql id="page_where">
  59. <trim prefix="where" prefixOverrides="and | or ">
  60. <if test="projectId != null and projectId != ''">and PROJECT_ID = #{projectId}</if>
  61. <if test="legalEntity != null and legalEntity != ''">and LEGAL_ENTITY = #{legalEntity}</if>
  62. <if test="legalContactPhone != null and legalContactPhone != ''">and LEGAL_CONTACT_PHONE = #{legalContactPhone}</if>
  63. <if test="constructorUnit != null and constructorUnit != ''">and CONSTRUCTOR_UNIT = #{constructorUnit}</if>
  64. <if test="constructorContactPhone != null and constructorContactPhone != ''">and CONSTRUCTOR_CONTACT_PHONE = #{constructorContactPhone}</if>
  65. <if test="supervisorUnit != null and supervisorUnit != ''">and SUPERVISOR_UNIT = #{supervisorUnit}</if>
  66. <if test="supervisorContactPhone != null and supervisorContactPhone != ''">and SUPERVISOR_CONTACT_PHONE = #{supervisorContactPhone}</if>
  67. <if test="designUnit != null and designUnit != ''">and DESIGN_UNIT = #{designUnit}</if>
  68. <if test="designContactPhone != null and designContactPhone != ''">and DESIGN_CONTACT_PHONE = #{designContactPhone}</if>
  69. <if test="otherParticipantUnit != null and otherParticipantUnit != ''">and OTHER_PARTICIPANT_UNIT = #{otherParticipantUnit}</if>
  70. <if test="otherContactPhone != null and otherContactPhone != ''">and OTHER_CONTACT_PHONE = #{otherContactPhone}</if>
  71. <if test="remark != null and remark != ''">and REMARK = #{remark}</if>
  72. <if test="intm != null">and INTM = #{intm}</if>
  73. <if test="uptm != null">and UPTM = #{uptm}</if>
  74. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  75. and DATA_STAT='0'
  76. </trim>
  77. </sql>
  78. <select id="get" resultMap="attProjectInsuranceParticipResultMap" parameterType="String" >
  79. select <include refid="table_columns" /> from ATT_PROJECT_INSURANCE_PARTICIP where ID = #{id}
  80. </select>
  81. <select id="getBy" resultMap="attProjectInsuranceParticipResultMap">
  82. select <include refid="table_columns" /> from ATT_PROJECT_INSURANCE_PARTICIP <include refid="page_where" />
  83. </select>
  84. <select id="findAll" resultMap="attProjectInsuranceParticipResultMap">
  85. select <include refid="table_columns" /> from ATT_PROJECT_INSURANCE_PARTICIP
  86. </select>
  87. <select id="findList" resultMap="attProjectInsuranceParticipResultMap">
  88. select <include refid="table_columns" /> from ATT_PROJECT_INSURANCE_PARTICIP <include refid="page_where" />
  89. </select>
  90. <select id="selectCount" resultType="int" >
  91. select count(ID) from ATT_PROJECT_INSURANCE_PARTICIP <include refid="page_where" />
  92. </select>
  93. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttProjectInsuranceParticip">
  94. insert into ATT_PROJECT_INSURANCE_PARTICIP( <include refid="table_columns" /> )
  95. values ( <include refid="entity_properties" /> )
  96. </insert>
  97. <delete id="delete" parameterType="java.lang.String">
  98. update ATT_PROJECT_INSURANCE_PARTICIP set DATA_STAT='9' where ID = #{id}
  99. </delete>
  100. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttProjectInsuranceParticip">
  101. update ATT_PROJECT_INSURANCE_PARTICIP set DATA_STAT='9' <include refid="page_where" />
  102. </delete>
  103. <update id="deleteInFlag" parameterType="java.lang.String">
  104. update ATT_PROJECT_INSURANCE_PARTICIP set DATA_STAT = '9' where ID = #{id}
  105. </update>
  106. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttProjectInsuranceParticip">
  107. update ATT_PROJECT_INSURANCE_PARTICIP
  108. <trim prefix="set" suffixOverrides=",">
  109. <if test="projectId != null and projectId != ''">PROJECT_ID = #{projectId},</if>
  110. <if test="legalEntity != null and legalEntity != ''">LEGAL_ENTITY = #{legalEntity},</if>
  111. <if test="legalContactPhone != null and legalContactPhone != ''">LEGAL_CONTACT_PHONE = #{legalContactPhone},</if>
  112. <if test="constructorUnit != null and constructorUnit != ''">CONSTRUCTOR_UNIT = #{constructorUnit},</if>
  113. <if test="constructorContactPhone != null and constructorContactPhone != ''">CONSTRUCTOR_CONTACT_PHONE = #{constructorContactPhone},</if>
  114. <if test="supervisorUnit != null and supervisorUnit != ''">SUPERVISOR_UNIT = #{supervisorUnit},</if>
  115. <if test="supervisorContactPhone != null and supervisorContactPhone != ''">SUPERVISOR_CONTACT_PHONE = #{supervisorContactPhone},</if>
  116. <if test="designUnit != null and designUnit != ''">DESIGN_UNIT = #{designUnit},</if>
  117. <if test="designContactPhone != null and designContactPhone != ''">DESIGN_CONTACT_PHONE = #{designContactPhone},</if>
  118. <if test="otherParticipantUnit != null and otherParticipantUnit != ''">OTHER_PARTICIPANT_UNIT = #{otherParticipantUnit},</if>
  119. <if test="otherContactPhone != null and otherContactPhone != ''">OTHER_CONTACT_PHONE = #{otherContactPhone},</if>
  120. <if test="remark != null and remark != ''">REMARK = #{remark},</if>
  121. <if test="intm != null">INTM = #{intm},</if>
  122. <if test="uptm != null">UPTM = #{uptm},</if>
  123. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  124. </trim>
  125. <where>ID = #{id}</where>
  126. </update>
  127. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttProjectInsuranceParticip">
  128. update ATT_PROJECT_INSURANCE_PARTICIP
  129. <trim prefix="set" suffixOverrides=",">
  130. <if test="projectId != null and projectId != ''">PROJECT_ID = #{projectId},</if>
  131. <if test="legalEntity != null and legalEntity != ''">LEGAL_ENTITY = #{legalEntity},</if>
  132. <if test="legalContactPhone != null and legalContactPhone != ''">LEGAL_CONTACT_PHONE = #{legalContactPhone},</if>
  133. <if test="constructorUnit != null and constructorUnit != ''">CONSTRUCTOR_UNIT = #{constructorUnit},</if>
  134. <if test="constructorContactPhone != null and constructorContactPhone != ''">CONSTRUCTOR_CONTACT_PHONE = #{constructorContactPhone},</if>
  135. <if test="supervisorUnit != null and supervisorUnit != ''">SUPERVISOR_UNIT = #{supervisorUnit},</if>
  136. <if test="supervisorContactPhone != null and supervisorContactPhone != ''">SUPERVISOR_CONTACT_PHONE = #{supervisorContactPhone},</if>
  137. <if test="designUnit != null and designUnit != ''">DESIGN_UNIT = #{designUnit},</if>
  138. <if test="designContactPhone != null and designContactPhone != ''">DESIGN_CONTACT_PHONE = #{designContactPhone},</if>
  139. <if test="otherParticipantUnit != null and otherParticipantUnit != ''">OTHER_PARTICIPANT_UNIT = #{otherParticipantUnit},</if>
  140. <if test="otherContactPhone != null and otherContactPhone != ''">OTHER_CONTACT_PHONE = #{otherContactPhone},</if>
  141. <if test="remark != null and remark != ''">REMARK = #{remark},</if>
  142. <if test="intm != null">INTM = #{intm},</if>
  143. <if test="uptm != null">UPTM = #{uptm},</if>
  144. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  145. </trim>
  146. <include refid="page_where" />
  147. </update>
  148. <!-- 其他自定义SQL -->
  149. </mapper>