AttEngOtheDao.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  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.AttEngOtheDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.AttEngOthe" id="attEngOtheResultMap">
  5. <result property="guid" column="GUID"/>
  6. <result property="pGuid" column="P_GUID"/>
  7. <result property="engName" column="ENG_NAME"/>
  8. <result property="engGuid" column="ENG_GUID"/>
  9. <result property="impoGrad" column="IMPO_GRAD"/>
  10. <result property="apprBudg" column="APPR_BUDG"/>
  11. <result property="startDate" column="START_DATE"/>
  12. <result property="compDate" column="COMP_DATE"/>
  13. <result property="engStat" column="ENG_STAT"/>
  14. <result property="orgGuid" column="ORG_GUID"/>
  15. <result property="oflpCode" column="OFLP_CODE"/>
  16. <result property="ifReinForce" column="IF_REIN_FORCE"/>
  17. <result property="projGuid" column="PROJ_GUID"/>
  18. <result property="stat" column="STAT"/>
  19. <result property="objCode" column="OBJ_CODE"/>
  20. <result property="cenLong" column="CEN_LONG"/>
  21. <result property="cenLat" column="CEN_LAT"/>
  22. <result property="engLoc" column="ENG_LOC"/>
  23. <result property="adGuid" column="AD_GUID"/>
  24. <result property="custom1" column="CUSTOM1"/>
  25. <result property="custom2" column="CUSTOM2"/>
  26. <result property="custom3" column="CUSTOM3"/>
  27. <result property="custom4" column="CUSTOM4"/>
  28. <result property="custom5" column="CUSTOM5"/>
  29. <result property="custom6" column="CUSTOM6"/>
  30. <result property="note" column="NOTE"/>
  31. <result property="collTime" column="COLL_TIME"/>
  32. <result property="updTime" column="UPD_TIME"/>
  33. <result property="recPers" column="REC_PERS"/>
  34. <result property="engReinForceGuid" column="ENG_REIN_FORCE_GUID"/>
  35. </resultMap>
  36. <sql id="table_columns">
  37. GUID,
  38. P_GUID,
  39. ENG_NAME,
  40. ENG_GUID,
  41. IMPO_GRAD,
  42. APPR_BUDG,
  43. START_DATE,
  44. COMP_DATE,
  45. ENG_STAT,
  46. ORG_GUID,
  47. OFLP_CODE,
  48. IF_REIN_FORCE,
  49. PROJ_GUID,
  50. STAT,
  51. OBJ_CODE,
  52. CEN_LONG,
  53. CEN_LAT,
  54. ENG_LOC,
  55. AD_GUID,
  56. CUSTOM1,
  57. CUSTOM2,
  58. CUSTOM3,
  59. CUSTOM4,
  60. CUSTOM5,
  61. CUSTOM6,
  62. NOTE,
  63. COLL_TIME,
  64. UPD_TIME,
  65. REC_PERS,
  66. ENG_REIN_FORCE_GUID
  67. </sql>
  68. <sql id="entity_properties">
  69. #{guid},
  70. #{pGuid},
  71. #{engName},
  72. #{engGuid},
  73. #{impoGrad},
  74. #{apprBudg},
  75. #{startDate},
  76. #{compDate},
  77. #{engStat},
  78. #{orgGuid},
  79. #{oflpCode},
  80. #{ifReinForce},
  81. #{projGuid},
  82. #{stat},
  83. #{objCode},
  84. #{cenLong},
  85. #{cenLat},
  86. #{engLoc},
  87. #{adGuid},
  88. #{custom1},
  89. #{custom2},
  90. #{custom3},
  91. #{custom4},
  92. #{custom5},
  93. #{custom6},
  94. #{note},
  95. #{collTime},
  96. #{updTime},
  97. #{recPers},
  98. #{engReinForceGuid}
  99. </sql>
  100. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  101. <sql id="page_where">
  102. <trim prefix="where" prefixOverrides="and | or ">
  103. <if test="pGuid != null and pGuid != ''">and P_GUID = #{pGuid}</if>
  104. <if test="engName != null and engName != ''">and ENG_NAME = #{engName}</if>
  105. <if test="engGuid != null and engGuid != ''">and ENG_GUID = #{engGuid}</if>
  106. <if test="impoGrad != null and impoGrad != ''">and IMPO_GRAD = #{impoGrad}</if>
  107. <if test="apprBudg != null and apprBudg != ''">and APPR_BUDG = #{apprBudg}</if>
  108. <if test="startDate != null">and START_DATE = #{startDate}</if>
  109. <if test="compDate != null">and COMP_DATE = #{compDate}</if>
  110. <if test="engStat != null and engStat != ''">and ENG_STAT = #{engStat}</if>
  111. <if test="orgGuid != null and orgGuid != ''">and ORG_GUID = #{orgGuid}</if>
  112. <if test="oflpCode != null and oflpCode != ''">and OFLP_CODE = #{oflpCode}</if>
  113. <if test="ifReinForce != null and ifReinForce != ''">and IF_REIN_FORCE = #{ifReinForce}</if>
  114. <if test="projGuid != null and projGuid != ''">and PROJ_GUID = #{projGuid}</if>
  115. <if test="stat != null and stat != ''">and STAT = #{stat}</if>
  116. <if test="objCode != null and objCode != ''">and OBJ_CODE = #{objCode}</if>
  117. <if test="cenLong != null and cenLong != ''">and CEN_LONG = #{cenLong}</if>
  118. <if test="cenLat != null and cenLat != ''">and CEN_LAT = #{cenLat}</if>
  119. <if test="engLoc != null and engLoc != ''">and ENG_LOC = #{engLoc}</if>
  120. <if test="adGuid != null and adGuid != ''">and AD_GUID = #{adGuid}</if>
  121. <if test="custom1 != null and custom1 != ''">and CUSTOM1 = #{custom1}</if>
  122. <if test="custom2 != null and custom2 != ''">and CUSTOM2 = #{custom2}</if>
  123. <if test="custom3 != null and custom3 != ''">and CUSTOM3 = #{custom3}</if>
  124. <if test="custom4 != null and custom4 != ''">and CUSTOM4 = #{custom4}</if>
  125. <if test="custom5 != null and custom5 != ''">and CUSTOM5 = #{custom5}</if>
  126. <if test="custom6 != null and custom6 != ''">and CUSTOM6 = #{custom6}</if>
  127. <if test="note != null and note != ''">and NOTE = #{note}</if>
  128. <if test="collTime != null">and COLL_TIME = #{collTime}</if>
  129. <if test="updTime != null">and UPD_TIME = #{updTime}</if>
  130. <if test="recPers != null and recPers != ''">and REC_PERS = #{recPers}</if>
  131. <if test="engReinForceGuid != null and engReinForceGuid != ''">and ENG_REIN_FORCE_GUID =
  132. #{engReinForceGuid}
  133. </if>
  134. </trim>
  135. </sql>
  136. <select id="get" resultMap="attEngOtheResultMap" parameterType="String">
  137. select
  138. <include refid="table_columns"/>
  139. from att_eng_othe where GUID = #{id}
  140. </select>
  141. <select id="getBy" resultMap="attEngOtheResultMap">
  142. select
  143. <include refid="table_columns"/>
  144. from att_eng_othe
  145. <include refid="page_where"/>
  146. </select>
  147. <select id="findAll" resultMap="attEngOtheResultMap">
  148. select
  149. <include refid="table_columns"/>
  150. from att_eng_othe
  151. </select>
  152. <select id="findList" resultMap="attEngOtheResultMap">
  153. select
  154. <include refid="table_columns"/>
  155. from att_eng_othe
  156. <include refid="page_where"/>
  157. </select>
  158. <select id="selectCount" resultType="int">
  159. select count(GUID) from att_eng_othe
  160. <include refid="page_where"/>
  161. </select>
  162. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttEngOthe">
  163. insert into att_eng_othe(
  164. <include refid="table_columns"/>
  165. )
  166. values (
  167. <include refid="entity_properties"/>
  168. )
  169. </insert>
  170. <delete id="delete" parameterType="java.lang.String">
  171. delete from att_eng_othe where GUID = #{id}
  172. </delete>
  173. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttEngOthe">
  174. delete from att_eng_othe
  175. <include refid="page_where"/>
  176. </delete>
  177. <update id="deleteInFlag" parameterType="java.lang.String">
  178. update att_eng_othe set flag_valid = 0 where GUID = #{id}
  179. </update>
  180. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttEngOthe">
  181. update att_eng_othe
  182. <trim prefix="set" suffixOverrides=",">
  183. <if test="pGuid != null and pGuid != ''">P_GUID = #{pGuid},</if>
  184. <if test="engName != null and engName != ''">ENG_NAME = #{engName},</if>
  185. <if test="engGuid != null and engGuid != ''">ENG_GUID = #{engGuid},</if>
  186. <if test="impoGrad != null and impoGrad != ''">IMPO_GRAD = #{impoGrad},</if>
  187. <if test="apprBudg != null and apprBudg != ''">APPR_BUDG = #{apprBudg},</if>
  188. <if test="startDate != null">START_DATE = #{startDate},</if>
  189. <if test="compDate != null">COMP_DATE = #{compDate},</if>
  190. <if test="engStat != null and engStat != ''">ENG_STAT = #{engStat},</if>
  191. <if test="orgGuid != null and orgGuid != ''">ORG_GUID = #{orgGuid},</if>
  192. <if test="oflpCode != null and oflpCode != ''">OFLP_CODE = #{oflpCode},</if>
  193. <if test="ifReinForce != null and ifReinForce != ''">IF_REIN_FORCE = #{ifReinForce},</if>
  194. <if test="projGuid != null and projGuid != ''">PROJ_GUID = #{projGuid},</if>
  195. <if test="stat != null and stat != ''">STAT = #{stat},</if>
  196. <if test="objCode != null and objCode != ''">OBJ_CODE = #{objCode},</if>
  197. <if test="cenLong != null and cenLong != ''">CEN_LONG = #{cenLong},</if>
  198. <if test="cenLat != null and cenLat != ''">CEN_LAT = #{cenLat},</if>
  199. <if test="engLoc != null and engLoc != ''">ENG_LOC = #{engLoc},</if>
  200. <if test="adGuid != null and adGuid != ''">AD_GUID = #{adGuid},</if>
  201. <if test="custom1 != null and custom1 != ''">CUSTOM1 = #{custom1},</if>
  202. <if test="custom2 != null and custom2 != ''">CUSTOM2 = #{custom2},</if>
  203. <if test="custom3 != null and custom3 != ''">CUSTOM3 = #{custom3},</if>
  204. <if test="custom4 != null and custom4 != ''">CUSTOM4 = #{custom4},</if>
  205. <if test="custom5 != null and custom5 != ''">CUSTOM5 = #{custom5},</if>
  206. <if test="custom6 != null and custom6 != ''">CUSTOM6 = #{custom6},</if>
  207. <if test="note != null and note != ''">NOTE = #{note},</if>
  208. <if test="collTime != null">COLL_TIME = #{collTime},</if>
  209. <if test="updTime != null">UPD_TIME = #{updTime},</if>
  210. <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
  211. <if test="engReinForceGuid != null and engReinForceGuid != ''">ENG_REIN_FORCE_GUID = #{engReinForceGuid},
  212. </if>
  213. </trim>
  214. <where>GUID = #{guid}</where>
  215. </update>
  216. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttEngOthe">
  217. update att_eng_othe
  218. <trim prefix="set" suffixOverrides=",">
  219. <if test="pGuid != null and pGuid != ''">P_GUID = #{pGuid},</if>
  220. <if test="engName != null and engName != ''">ENG_NAME = #{engName},</if>
  221. <if test="engGuid != null and engGuid != ''">ENG_GUID = #{engGuid},</if>
  222. <if test="impoGrad != null and impoGrad != ''">IMPO_GRAD = #{impoGrad},</if>
  223. <if test="apprBudg != null and apprBudg != ''">APPR_BUDG = #{apprBudg},</if>
  224. <if test="startDate != null">START_DATE = #{startDate},</if>
  225. <if test="compDate != null">COMP_DATE = #{compDate},</if>
  226. <if test="engStat != null and engStat != ''">ENG_STAT = #{engStat},</if>
  227. <if test="orgGuid != null and orgGuid != ''">ORG_GUID = #{orgGuid},</if>
  228. <if test="oflpCode != null and oflpCode != ''">OFLP_CODE = #{oflpCode},</if>
  229. <if test="ifReinForce != null and ifReinForce != ''">IF_REIN_FORCE = #{ifReinForce},</if>
  230. <if test="projGuid != null and projGuid != ''">PROJ_GUID = #{projGuid},</if>
  231. <if test="stat != null and stat != ''">STAT = #{stat},</if>
  232. <if test="objCode != null and objCode != ''">OBJ_CODE = #{objCode},</if>
  233. <if test="cenLong != null and cenLong != ''">CEN_LONG = #{cenLong},</if>
  234. <if test="cenLat != null and cenLat != ''">CEN_LAT = #{cenLat},</if>
  235. <if test="engLoc != null and engLoc != ''">ENG_LOC = #{engLoc},</if>
  236. <if test="adGuid != null and adGuid != ''">AD_GUID = #{adGuid},</if>
  237. <if test="custom1 != null and custom1 != ''">CUSTOM1 = #{custom1},</if>
  238. <if test="custom2 != null and custom2 != ''">CUSTOM2 = #{custom2},</if>
  239. <if test="custom3 != null and custom3 != ''">CUSTOM3 = #{custom3},</if>
  240. <if test="custom4 != null and custom4 != ''">CUSTOM4 = #{custom4},</if>
  241. <if test="custom5 != null and custom5 != ''">CUSTOM5 = #{custom5},</if>
  242. <if test="custom6 != null and custom6 != ''">CUSTOM6 = #{custom6},</if>
  243. <if test="note != null and note != ''">NOTE = #{note},</if>
  244. <if test="collTime != null">COLL_TIME = #{collTime},</if>
  245. <if test="updTime != null">UPD_TIME = #{updTime},</if>
  246. <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
  247. <if test="engReinForceGuid != null and engReinForceGuid != ''">ENG_REIN_FORCE_GUID = #{engReinForceGuid},
  248. </if>
  249. </trim>
  250. <include refid="page_where"/>
  251. </update>
  252. <!-- 其他自定义SQL -->
  253. </mapper>