BisInspEfpRgstrPlanComplDao.xml 7.8 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.BisInspEfpRgstrPlanComplDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspEfpRgstrPlanCompl" id="bisInspEfpRgstrPlanComplResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="inspType" column="INSP_TYPE"/>
  8. <result property="isComplPlan" column="IS_COMPL_PLAN"/>
  9. <result property="planName" column="PLAN_NAME"/>
  10. <result property="complUnit" column="COMPL_UNIT"/>
  11. <result property="pro" column="PRO"/>
  12. <result property="bas" column="BAS"/>
  13. <result property="status" column="STATUS"/>
  14. <result property="recPersId" column="REC_PERS_ID"/>
  15. <result property="recPers" column="REC_PERS"/>
  16. <result property="recPersTel" column="REC_PERS_TEL"/>
  17. <result property="intm" column="INTM"/>
  18. <result property="uptm" column="UPTM"/>
  19. <result property="proName" column="PRO_NAME"/>
  20. <result property="basName" column="BAS_NAME"/>
  21. </resultMap>
  22. <sql id="table_columns">
  23. PRO_NAME,
  24. BAS_NAME,
  25. ID,
  26. RGSTR_ID,
  27. INSP_TYPE,
  28. IS_COMPL_PLAN,
  29. PLAN_NAME,
  30. COMPL_UNIT,
  31. PRO,
  32. BAS,
  33. STATUS,
  34. REC_PERS_ID,
  35. REC_PERS,
  36. REC_PERS_TEL,
  37. INTM,
  38. UPTM
  39. </sql>
  40. <sql id="entity_properties">
  41. #{proName},
  42. #{basName},
  43. #{id},
  44. #{rgstrId},
  45. #{inspType},
  46. #{isComplPlan},
  47. #{planName},
  48. #{complUnit},
  49. #{pro},
  50. #{bas},
  51. #{status},
  52. #{recPersId},
  53. #{recPers},
  54. #{recPersTel},
  55. #{intm},
  56. #{uptm}
  57. </sql>
  58. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  59. <sql id="page_where">
  60. <trim prefix="where" prefixOverrides="and | or ">
  61. <if test="proName != null and proName != ''">and PRO_NAME = #{proName}</if>
  62. <if test="basName != null and basName != ''">and BAS_NAME = #{basName}</if>
  63. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  64. <if test="inspType != null and inspType != ''">and INSP_TYPE = #{inspType}</if>
  65. <if test="isComplPlan != null and isComplPlan != ''">and IS_COMPL_PLAN = #{isComplPlan}</if>
  66. <if test="planName != null and planName != ''">and PLAN_NAME = #{planName}</if>
  67. <if test="complUnit != null and complUnit != ''">and COMPL_UNIT = #{complUnit}</if>
  68. <if test="pro != null and pro != ''">and PRO = #{pro}</if>
  69. <if test="bas != null and bas != ''">and BAS = #{bas}</if>
  70. <if test="status != null and status != ''">and STATUS = #{status}</if>
  71. <if test="recPersId != null and recPersId != ''">and REC_PERS_ID = #{recPersId}</if>
  72. <if test="recPers != null and recPers != ''">and REC_PERS = #{recPers}</if>
  73. <if test="recPersTel != null and recPersTel != ''">and REC_PERS_TEL = #{recPersTel}</if>
  74. <if test="intm != null">and INTM = #{intm}</if>
  75. <if test="uptm != null">and UPTM = #{uptm}</if>
  76. </trim>
  77. </sql>
  78. <select id="get" resultMap="bisInspEfpRgstrPlanComplResultMap" parameterType="String" >
  79. select <include refid="table_columns" /> from BIS_INSP_EFP_RGSTR_PLAN_COMPL where ID = #{id}
  80. </select>
  81. <select id="getBy" resultMap="bisInspEfpRgstrPlanComplResultMap">
  82. select <include refid="table_columns" /> from BIS_INSP_EFP_RGSTR_PLAN_COMPL <include refid="page_where" />
  83. </select>
  84. <select id="findAll" resultMap="bisInspEfpRgstrPlanComplResultMap">
  85. select <include refid="table_columns" /> from BIS_INSP_EFP_RGSTR_PLAN_COMPL
  86. </select>
  87. <select id="findList" resultMap="bisInspEfpRgstrPlanComplResultMap">
  88. select <include refid="table_columns" /> from BIS_INSP_EFP_RGSTR_PLAN_COMPL <include refid="page_where" />
  89. </select>
  90. <select id="selectCount" resultType="int" >
  91. select count(ID) from BIS_INSP_EFP_RGSTR_PLAN_COMPL <include refid="page_where" />
  92. </select>
  93. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspEfpRgstrPlanCompl">
  94. insert into BIS_INSP_EFP_RGSTR_PLAN_COMPL( <include refid="table_columns" /> )
  95. values ( <include refid="entity_properties" /> )
  96. </insert>
  97. <delete id="delete" parameterType="java.lang.String">
  98. delete from BIS_INSP_EFP_RGSTR_PLAN_COMPL where ID = #{id}
  99. </delete>
  100. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspEfpRgstrPlanCompl">
  101. delete from BIS_INSP_EFP_RGSTR_PLAN_COMPL <include refid="page_where" />
  102. </delete>
  103. <update id="deleteInFlag" parameterType="java.lang.String">
  104. update BIS_INSP_EFP_RGSTR_PLAN_COMPL set DATA_STAT = '9' where ID = #{id}
  105. </update>
  106. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspEfpRgstrPlanCompl">
  107. update BIS_INSP_EFP_RGSTR_PLAN_COMPL
  108. <trim prefix="set" suffixOverrides=",">
  109. <if test="proName != null and proName != ''">PRO_NAME = #{proName},</if>
  110. <if test="basName != null and basName != ''">BAS_NAME = #{basName},</if>
  111. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  112. <if test="inspType != null and inspType != ''">INSP_TYPE = #{inspType},</if>
  113. <if test="isComplPlan != null and isComplPlan != ''">IS_COMPL_PLAN = #{isComplPlan},</if>
  114. <if test="planName != null and planName != ''">PLAN_NAME = #{planName},</if>
  115. <if test="complUnit != null and complUnit != ''">COMPL_UNIT = #{complUnit},</if>
  116. <if test="pro != null and pro != ''">PRO = #{pro},</if>
  117. <if test="bas != null and bas != ''">BAS = #{bas},</if>
  118. <if test="status != null and status != ''">STATUS = #{status},</if>
  119. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  120. <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
  121. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  122. <if test="intm != null">INTM = #{intm},</if>
  123. <if test="uptm != null">UPTM = #{uptm},</if>
  124. </trim>
  125. <where>ID = #{id}</where>
  126. </update>
  127. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspEfpRgstrPlanCompl">
  128. update BIS_INSP_EFP_RGSTR_PLAN_COMPL
  129. <trim prefix="set" suffixOverrides=",">
  130. <if test="proName != null and proName != ''">PRO_NAME = #{proName},</if>
  131. <if test="basName != null and basName != ''">BAS_NAME = #{basName},</if>
  132. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  133. <if test="inspType != null and inspType != ''">INSP_TYPE = #{inspType},</if>
  134. <if test="isComplPlan != null and isComplPlan != ''">IS_COMPL_PLAN = #{isComplPlan},</if>
  135. <if test="planName != null and planName != ''">PLAN_NAME = #{planName},</if>
  136. <if test="complUnit != null and complUnit != ''">COMPL_UNIT = #{complUnit},</if>
  137. <if test="pro != null and pro != ''">PRO = #{pro},</if>
  138. <if test="bas != null and bas != ''">BAS = #{bas},</if>
  139. <if test="status != null and status != ''">STATUS = #{status},</if>
  140. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  141. <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
  142. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  143. <if test="intm != null">INTM = #{intm},</if>
  144. <if test="uptm != null">UPTM = #{uptm},</if>
  145. </trim>
  146. <include refid="page_where" />
  147. </update>
  148. <!-- 其他自定义SQL -->
  149. </mapper>