StStbprpBDao.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454
  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.StStbprpBDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.StStbprpB" id="stStbprpBResultMap">
  5. <result property="stcd" column="STCD"/>
  6. <result property="stnm" column="STNM"/>
  7. <result property="rvnm" column="RVNM"/>
  8. <result property="hnnm" column="HNNM"/>
  9. <result property="bsnm" column="BSNM"/>
  10. <result property="lgtdOld" column="LGTD_OLD"/>
  11. <result property="lttdOld" column="LTTD_OLD"/>
  12. <result property="stlc" column="STLC"/>
  13. <result property="addvcd" column="ADDVCD"/>
  14. <result property="mdbz" column="MDBZ"/>
  15. <result property="mdpr" column="MDPR"/>
  16. <result property="dtmnm" column="DTMNM"/>
  17. <result property="dtmel" column="DTMEL"/>
  18. <result property="sttp" column="STTP"/>
  19. <result property="dfrtms" column="DFRTMS"/>
  20. <result property="fritm" column="FRITM"/>
  21. <result property="frgrd" column="FRGRD"/>
  22. <result property="bgfrym" column="BGFRYM"/>
  23. <result property="edfrym" column="EDFRYM"/>
  24. <result property="admauth" column="ADMAUTH"/>
  25. <result property="stbk" column="STBK"/>
  26. <result property="phcd" column="PHCD"/>
  27. <result property="esstym" column="ESSTYM"/>
  28. <result property="lgtd1" column="LGTD1"/>
  29. <result property="lttd1" column="LTTD1"/>
  30. <result property="locality" column="LOCALITY"/>
  31. <result property="direction" column="DIRECTION"/>
  32. <result property="basincd" column="BASINCD"/>
  33. <result property="moditime" column="MODITIME"/>
  34. <result property="entpoint" column="ENTPOINT"/>
  35. <result property="stperson" column="STPERSON"/>
  36. <result property="mobphone" column="MOBPHONE"/>
  37. <result property="fieldcap" column="FIELDCAP"/>
  38. <result property="rainfall" column="RAINFALL"/>
  39. <result property="moisture" column="MOISTURE"/>
  40. <result property="comments" column="COMMENTS"/>
  41. <result property="drna" column="DRNA"/>
  42. <result property="lgtd" column="LGTD"/>
  43. <result property="lttd" column="LTTD"/>
  44. <result property="dtpr" column="DTPR"/>
  45. <result property="atcunit" column="ATCUNIT"/>
  46. <result property="stazt" column="STAZT"/>
  47. <result property="dstrvm" column="DSTRVM"/>
  48. <result property="usfl" column="USFL"/>
  49. </resultMap>
  50. <sql id="table_columns">
  51. STCD,
  52. STNM,
  53. RVNM,
  54. HNNM,
  55. BSNM,
  56. LGTD_OLD,
  57. LTTD_OLD,
  58. STLC,
  59. ADDVCD,
  60. MDBZ,
  61. MDPR,
  62. DTMNM,
  63. DTMEL,
  64. STTP,
  65. DFRTMS,
  66. FRITM,
  67. FRGRD,
  68. BGFRYM,
  69. EDFRYM,
  70. ADMAUTH,
  71. STBK,
  72. PHCD,
  73. ESSTYM,
  74. LGTD1,
  75. LTTD1,
  76. LOCALITY,
  77. DIRECTION,
  78. BASINCD,
  79. MODITIME,
  80. ENTPOINT,
  81. STPERSON,
  82. MOBPHONE,
  83. FIELDCAP,
  84. RAINFALL,
  85. MOISTURE,
  86. COMMENTS,
  87. DRNA,
  88. LGTD,
  89. LTTD,
  90. DTPR,
  91. ATCUNIT,
  92. STAZT,
  93. DSTRVM,
  94. USFL
  95. </sql>
  96. <sql id="table_columns_B">
  97. STCD,
  98. STNM,
  99. RVNM,
  100. HNNM,
  101. BSNM,
  102. LGTD_OLD,
  103. LTTD_OLD,
  104. STLC,
  105. ADDVCD,
  106. MDBZ,
  107. MDPR,
  108. DTMNM,
  109. DTMEL,
  110. STTP,
  111. DFRTMS,
  112. FRITM,
  113. FRGRD,
  114. BGFRYM,
  115. EDFRYM,
  116. ADMAUTH,
  117. PHCD,
  118. ESSTYM,
  119. LGTD1,
  120. LTTD1,
  121. LOCALITY,
  122. DIRECTION,
  123. BASINCD,
  124. MODITIME,
  125. ENTPOINT,
  126. STPERSON,
  127. MOBPHONE,
  128. FIELDCAP,
  129. RAINFALL,
  130. MOISTURE,
  131. COMMENTS,
  132. DRNA,
  133. LGTD,
  134. LTTD,
  135. DTPR,
  136. ATCUNIT,
  137. STAZT,
  138. DSTRVM,
  139. USFL
  140. </sql>
  141. <sql id="entity_properties">
  142. #{stcd},
  143. #{stnm},
  144. #{rvnm},
  145. #{hnnm},
  146. #{bsnm},
  147. #{lgtdOld},
  148. #{lttdOld},
  149. #{stlc},
  150. #{addvcd},
  151. #{mdbz},
  152. #{mdpr},
  153. #{dtmnm},
  154. #{dtmel},
  155. #{sttp},
  156. #{dfrtms},
  157. #{fritm},
  158. #{frgrd},
  159. #{bgfrym},
  160. #{edfrym},
  161. #{admauth},
  162. #{stbk},
  163. #{phcd},
  164. #{esstym},
  165. #{lgtd1},
  166. #{lttd1},
  167. #{locality},
  168. #{direction},
  169. #{basincd},
  170. #{moditime},
  171. #{entpoint},
  172. #{stperson},
  173. #{mobphone},
  174. #{fieldcap},
  175. #{rainfall},
  176. #{moisture},
  177. #{comments},
  178. #{drna},
  179. #{lgtd},
  180. #{lttd},
  181. #{dtpr},
  182. #{atcunit},
  183. #{stazt},
  184. #{dstrvm},
  185. #{usfl}
  186. </sql>
  187. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  188. <sql id="page_where">
  189. <trim prefix="where" prefixOverrides="and | or ">
  190. <if test="stnm != null and stnm != ''">and STNM = #{stnm}</if>
  191. <if test="rvnm != null and rvnm != ''">and RVNM = #{rvnm}</if>
  192. <if test="hnnm != null and hnnm != ''">and HNNM = #{hnnm}</if>
  193. <if test="bsnm != null and bsnm != ''">and BSNM = #{bsnm}</if>
  194. <if test="lgtdOld != null and lgtdOld != ''">and LGTD_OLD = #{lgtdOld}</if>
  195. <if test="lttdOld != null and lttdOld != ''">and LTTD_OLD = #{lttdOld}</if>
  196. <if test="stlc != null and stlc != ''">and STLC = #{stlc}</if>
  197. <if test="addvcd != null and addvcd != ''">and ADDVCD = #{addvcd}</if>
  198. <if test="mdbz != null and mdbz != ''">and MDBZ = #{mdbz}</if>
  199. <if test="mdpr != null and mdpr != ''">and MDPR = #{mdpr}</if>
  200. <if test="dtmnm != null and dtmnm != ''">and DTMNM = #{dtmnm}</if>
  201. <if test="dtmel != null and dtmel != ''">and DTMEL = #{dtmel}</if>
  202. <if test="sttp != null and sttp != ''">and STTP = #{sttp}</if>
  203. <if test="dfrtms != null and dfrtms != ''">and DFRTMS = #{dfrtms}</if>
  204. <if test="fritm != null and fritm != ''">and FRITM = #{fritm}</if>
  205. <if test="frgrd != null">and FRGRD = #{frgrd}</if>
  206. <if test="bgfrym != null and bgfrym != ''">and BGFRYM = #{bgfrym}</if>
  207. <if test="edfrym != null and edfrym != ''">and EDFRYM = #{edfrym}</if>
  208. <if test="admauth != null and admauth != ''">and ADMAUTH = #{admauth}</if>
  209. <if test="stbk != null">and STBK = #{stbk}</if>
  210. <if test="phcd != null and phcd != ''">and PHCD = #{phcd}</if>
  211. <if test="esstym != null and esstym != ''">and ESSTYM = #{esstym}</if>
  212. <if test="lgtd1 != null and lgtd1 != ''">and LGTD1 = #{lgtd1}</if>
  213. <if test="lttd1 != null and lttd1 != ''">and LTTD1 = #{lttd1}</if>
  214. <if test="locality != null and locality != ''">and LOCALITY = #{locality}</if>
  215. <if test="direction != null and direction != ''">and DIRECTION = #{direction}</if>
  216. <if test="basincd != null and basincd != ''">and BASINCD = #{basincd}</if>
  217. <if test="moditime != null">and MODITIME = #{moditime}</if>
  218. <if test="entpoint != null and entpoint != ''">and ENTPOINT = #{entpoint}</if>
  219. <if test="stperson != null and stperson != ''">and STPERSON = #{stperson}</if>
  220. <if test="mobphone != null and mobphone != ''">and MOBPHONE = #{mobphone}</if>
  221. <if test="fieldcap != null and fieldcap != ''">and FIELDCAP = #{fieldcap}</if>
  222. <if test="rainfall != null and rainfall != ''">and RAINFALL = #{rainfall}</if>
  223. <if test="moisture != null and moisture != ''">and MOISTURE = #{moisture}</if>
  224. <if test="comments != null and comments != ''">and COMMENTS = #{comments}</if>
  225. <if test="drna != null and drna != ''">and DRNA = #{drna}</if>
  226. <if test="lgtd != null and lgtd != ''">and LGTD = #{lgtd}</if>
  227. <if test="lttd != null and lttd != ''">and LTTD = #{lttd}</if>
  228. <if test="dtpr != null and dtpr != ''">and DTPR = #{dtpr}</if>
  229. <if test="atcunit != null and atcunit != ''">and ATCUNIT = #{atcunit}</if>
  230. <if test="stazt != null and stazt != ''">and STAZT = #{stazt}</if>
  231. <if test="dstrvm != null and dstrvm != ''">and DSTRVM = #{dstrvm}</if>
  232. <if test="usfl != null and usfl != ''">and USFL = #{usfl}</if>
  233. </trim>
  234. </sql>
  235. <select id="get" resultMap="stStbprpBResultMap" parameterType="String">
  236. select
  237. <include refid="table_columns_B"/>
  238. from ST_STBPRP_B where STCD = #{id}
  239. </select>
  240. <select id="getBy" resultMap="stStbprpBResultMap">
  241. select
  242. <include refid="table_columns"/>
  243. from ST_STBPRP_B
  244. <include refid="page_where"/>
  245. </select>
  246. <select id="findAll" resultMap="stStbprpBResultMap">
  247. select
  248. <include refid="table_columns"/>
  249. from ST_STBPRP_B
  250. </select>
  251. <select id="findList" resultMap="stStbprpBResultMap">
  252. select
  253. <include refid="table_columns"/>
  254. from ST_STBPRP_B
  255. <include refid="page_where"/>
  256. </select>
  257. <select id="selectCount" resultType="int">
  258. select count(ID) from ST_STBPRP_B
  259. <include refid="page_where"/>
  260. </select>
  261. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.StStbprpB">
  262. insert into ST_STBPRP_B(
  263. <include refid="table_columns"/>
  264. )
  265. values (
  266. <include refid="entity_properties"/>
  267. )
  268. </insert>
  269. <delete id="delete" parameterType="java.lang.String">
  270. delete from ST_STBPRP_B where ID = #{id}
  271. </delete>
  272. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.StStbprpB">
  273. delete from ST_STBPRP_B
  274. <include refid="page_where"/>
  275. </delete>
  276. <update id="deleteInFlag" parameterType="java.lang.String">
  277. update ST_STBPRP_B set flag_valid = 0 where ID = #{id}
  278. </update>
  279. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.StStbprpB">
  280. update ST_STBPRP_B
  281. <trim prefix="set" suffixOverrides=",">
  282. <if test="stnm != null and stnm != ''">STNM = #{stnm},</if>
  283. <if test="rvnm != null and rvnm != ''">RVNM = #{rvnm},</if>
  284. <if test="hnnm != null and hnnm != ''">HNNM = #{hnnm},</if>
  285. <if test="bsnm != null and bsnm != ''">BSNM = #{bsnm},</if>
  286. <if test="lgtdOld != null and lgtdOld != ''">LGTD_OLD = #{lgtdOld},</if>
  287. <if test="lttdOld != null and lttdOld != ''">LTTD_OLD = #{lttdOld},</if>
  288. <if test="stlc != null and stlc != ''">STLC = #{stlc},</if>
  289. <if test="addvcd != null and addvcd != ''">ADDVCD = #{addvcd},</if>
  290. <if test="mdbz != null and mdbz != ''">MDBZ = #{mdbz},</if>
  291. <if test="mdpr != null and mdpr != ''">MDPR = #{mdpr},</if>
  292. <if test="dtmnm != null and dtmnm != ''">DTMNM = #{dtmnm},</if>
  293. <if test="dtmel != null and dtmel != ''">DTMEL = #{dtmel},</if>
  294. <if test="sttp != null and sttp != ''">STTP = #{sttp},</if>
  295. <if test="dfrtms != null and dfrtms != ''">DFRTMS = #{dfrtms},</if>
  296. <if test="fritm != null and fritm != ''">FRITM = #{fritm},</if>
  297. <if test="frgrd != null">FRGRD = #{frgrd},</if>
  298. <if test="bgfrym != null and bgfrym != ''">BGFRYM = #{bgfrym},</if>
  299. <if test="edfrym != null and edfrym != ''">EDFRYM = #{edfrym},</if>
  300. <if test="admauth != null and admauth != ''">ADMAUTH = #{admauth},</if>
  301. <if test="stbk != null">STBK = #{stbk},</if>
  302. <if test="phcd != null and phcd != ''">PHCD = #{phcd},</if>
  303. <if test="esstym != null and esstym != ''">ESSTYM = #{esstym},</if>
  304. <if test="lgtd1 != null and lgtd1 != ''">LGTD1 = #{lgtd1},</if>
  305. <if test="lttd1 != null and lttd1 != ''">LTTD1 = #{lttd1},</if>
  306. <if test="locality != null and locality != ''">LOCALITY = #{locality},</if>
  307. <if test="direction != null and direction != ''">DIRECTION = #{direction},</if>
  308. <if test="basincd != null and basincd != ''">BASINCD = #{basincd},</if>
  309. <if test="moditime != null">MODITIME = #{moditime},</if>
  310. <if test="entpoint != null and entpoint != ''">ENTPOINT = #{entpoint},</if>
  311. <if test="stperson != null and stperson != ''">STPERSON = #{stperson},</if>
  312. <if test="mobphone != null and mobphone != ''">MOBPHONE = #{mobphone},</if>
  313. <if test="fieldcap != null and fieldcap != ''">FIELDCAP = #{fieldcap},</if>
  314. <if test="rainfall != null and rainfall != ''">RAINFALL = #{rainfall},</if>
  315. <if test="moisture != null and moisture != ''">MOISTURE = #{moisture},</if>
  316. <if test="comments != null and comments != ''">COMMENTS = #{comments},</if>
  317. <if test="drna != null and drna != ''">DRNA = #{drna},</if>
  318. <if test="lgtd != null and lgtd != ''">LGTD = #{lgtd},</if>
  319. <if test="lttd != null and lttd != ''">LTTD = #{lttd},</if>
  320. <if test="dtpr != null and dtpr != ''">DTPR = #{dtpr},</if>
  321. <if test="atcunit != null and atcunit != ''">ATCUNIT = #{atcunit},</if>
  322. <if test="stazt != null and stazt != ''">STAZT = #{stazt},</if>
  323. <if test="dstrvm != null and dstrvm != ''">DSTRVM = #{dstrvm},</if>
  324. <if test="usfl != null and usfl != ''">USFL = #{usfl},</if>
  325. </trim>
  326. <where>ID = #{id}</where>
  327. </update>
  328. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.StStbprpB">
  329. update ST_STBPRP_B
  330. <trim prefix="set" suffixOverrides=",">
  331. <if test="stnm != null and stnm != ''">STNM = #{stnm},</if>
  332. <if test="rvnm != null and rvnm != ''">RVNM = #{rvnm},</if>
  333. <if test="hnnm != null and hnnm != ''">HNNM = #{hnnm},</if>
  334. <if test="bsnm != null and bsnm != ''">BSNM = #{bsnm},</if>
  335. <if test="lgtdOld != null and lgtdOld != ''">LGTD_OLD = #{lgtdOld},</if>
  336. <if test="lttdOld != null and lttdOld != ''">LTTD_OLD = #{lttdOld},</if>
  337. <if test="stlc != null and stlc != ''">STLC = #{stlc},</if>
  338. <if test="addvcd != null and addvcd != ''">ADDVCD = #{addvcd},</if>
  339. <if test="mdbz != null and mdbz != ''">MDBZ = #{mdbz},</if>
  340. <if test="mdpr != null and mdpr != ''">MDPR = #{mdpr},</if>
  341. <if test="dtmnm != null and dtmnm != ''">DTMNM = #{dtmnm},</if>
  342. <if test="dtmel != null and dtmel != ''">DTMEL = #{dtmel},</if>
  343. <if test="sttp != null and sttp != ''">STTP = #{sttp},</if>
  344. <if test="dfrtms != null and dfrtms != ''">DFRTMS = #{dfrtms},</if>
  345. <if test="fritm != null and fritm != ''">FRITM = #{fritm},</if>
  346. <if test="frgrd != null">FRGRD = #{frgrd},</if>
  347. <if test="bgfrym != null and bgfrym != ''">BGFRYM = #{bgfrym},</if>
  348. <if test="edfrym != null and edfrym != ''">EDFRYM = #{edfrym},</if>
  349. <if test="admauth != null and admauth != ''">ADMAUTH = #{admauth},</if>
  350. <if test="stbk != null">STBK = #{stbk},</if>
  351. <if test="phcd != null and phcd != ''">PHCD = #{phcd},</if>
  352. <if test="esstym != null and esstym != ''">ESSTYM = #{esstym},</if>
  353. <if test="lgtd1 != null and lgtd1 != ''">LGTD1 = #{lgtd1},</if>
  354. <if test="lttd1 != null and lttd1 != ''">LTTD1 = #{lttd1},</if>
  355. <if test="locality != null and locality != ''">LOCALITY = #{locality},</if>
  356. <if test="direction != null and direction != ''">DIRECTION = #{direction},</if>
  357. <if test="basincd != null and basincd != ''">BASINCD = #{basincd},</if>
  358. <if test="moditime != null">MODITIME = #{moditime},</if>
  359. <if test="entpoint != null and entpoint != ''">ENTPOINT = #{entpoint},</if>
  360. <if test="stperson != null and stperson != ''">STPERSON = #{stperson},</if>
  361. <if test="mobphone != null and mobphone != ''">MOBPHONE = #{mobphone},</if>
  362. <if test="fieldcap != null and fieldcap != ''">FIELDCAP = #{fieldcap},</if>
  363. <if test="rainfall != null and rainfall != ''">RAINFALL = #{rainfall},</if>
  364. <if test="moisture != null and moisture != ''">MOISTURE = #{moisture},</if>
  365. <if test="comments != null and comments != ''">COMMENTS = #{comments},</if>
  366. <if test="drna != null and drna != ''">DRNA = #{drna},</if>
  367. <if test="lgtd != null and lgtd != ''">LGTD = #{lgtd},</if>
  368. <if test="lttd != null and lttd != ''">LTTD = #{lttd},</if>
  369. <if test="dtpr != null and dtpr != ''">DTPR = #{dtpr},</if>
  370. <if test="atcunit != null and atcunit != ''">ATCUNIT = #{atcunit},</if>
  371. <if test="stazt != null and stazt != ''">STAZT = #{stazt},</if>
  372. <if test="dstrvm != null and dstrvm != ''">DSTRVM = #{dstrvm},</if>
  373. <if test="usfl != null and usfl != ''">USFL = #{usfl},</if>
  374. </trim>
  375. <include refid="page_where"/>
  376. </update>
  377. <!-- 其他自定义SQL -->
  378. <select id="findListBy" parameterType="cn.com.goldenwater.dcproj.param.PersObjParam"
  379. resultType="cn.com.goldenwater.dcproj.model.StStbprpB">
  380. SELECT T.STCD,
  381. T.STNM,
  382. T.RVNM,
  383. T.HNNM,
  384. T.BSNM,
  385. T.LGTD_OLD,
  386. T.LTTD_OLD,
  387. T.STLC,
  388. T.ADDVCD,
  389. T.MDBZ,
  390. T.MDPR,
  391. T.DTMNM,
  392. T.DTMEL,
  393. T.STTP,
  394. T.DFRTMS,
  395. T.FRITM,
  396. T.FRGRD,
  397. T.BGFRYM,
  398. T.EDFRYM,
  399. T.ADMAUTH,
  400. T.PHCD,
  401. T.ESSTYM,
  402. T.LGTD1,
  403. T.LTTD1,
  404. T.LOCALITY,
  405. T.DIRECTION,
  406. T.BASINCD,
  407. T.MODITIME,
  408. T.ENTPOINT,
  409. T.STPERSON,
  410. T.MOBPHONE,
  411. T.FIELDCAP,
  412. T.RAINFALL,
  413. T.MOISTURE,
  414. T.COMMENTS,
  415. T.DRNA,
  416. T.LGTD,
  417. T.LTTD,
  418. T.DTPR,
  419. T.ATCUNIT,
  420. T.STAZT,
  421. T.DSTRVM,
  422. T.USFL FROM ST_STBPRP_B T WHERE 1 = 1
  423. <if test="adCode != null and adCode != ''">and T.ADDVCD LIKE '${adCode}%'</if>
  424. <if test="stnm != null and stnm != ''">and T.STNM LIKE '%${stnm}%'</if>
  425. <if test="frgrd != null and frgrd != ''">and T.FRGRD IN (${frgrd})</if>
  426. <if test="maxLgtd != null and maxLgtd != '' and minLgtd != null and minLgtd != ''">and T.lgtd BETWEEN #{minLgtd}
  427. AND #{maxLgtd}
  428. </if>
  429. <if test="maxLttd != null and maxLttd != '' and minLttd != null and minLttd != ''">and T.lttd BETWEEN #{minLttd}
  430. AND #{maxLttd}
  431. </if>
  432. </select>
  433. </mapper>