AttEngSdDao.xml 13 KB

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