BisInspKeychkqhRegisterDao.xml 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575
  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.BisInspKeychkqhRegisterDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspKeychkqhRegister" id="bisInspKeychkqhRegisterResultMap">
  5. <result property="buidTimeYear" column="BUID_TIME_YEAR"/>
  6. <result property="engProfil" column="ENG_PROFIL"/>
  7. <result property="engBuild" column="ENG_BUILD"/>
  8. <result property="orgId" column="ORG_ID"/>
  9. <result property="id" column="ID"/>
  10. <result property="objId" column="OBJ_ID"/>
  11. <result property="ptype" column="PTYPE"/>
  12. <result property="adCode" column="AD_CODE"/>
  13. <result property="nm" column="NM"/>
  14. <result property="stwktm" column="STWKTM"/>
  15. <result property="plantm" column="PLANTM"/>
  16. <result property="estapp" column="ESTAPP"/>
  17. <result property="lgtd" column="LGTD"/>
  18. <result property="lttd" column="LTTD"/>
  19. <result property="lgtdPc" column="LGTD_PC"/>
  20. <result property="lttdPc" column="LTTD_PC"/>
  21. <result property="unitId" column="UNIT_ID"/>
  22. <result property="unitNm" column="UNIT_NM"/>
  23. <result property="groupLeaderId" column="GROUP_LEADER_ID"/>
  24. <result property="groupLeader" column="GROUP_LEADER"/>
  25. <result property="groupLeaderTel" column="GROUP_LEADER_TEL"/>
  26. <result property="recPersId" column="REC_PERS_ID"/>
  27. <result property="recPers" column="REC_PERS"/>
  28. <result property="recPersTel" column="REC_PERS_TEL"/>
  29. <result property="intm" column="INTM"/>
  30. <result property="uptm" column="UPTM"/>
  31. <result property="note" column="NOTE"/>
  32. <result property="dataStat" column="DATA_STAT"/>
  33. <result property="state" column="STATE"/>
  34. <result property="secStat" column="SEC_STAT"/>
  35. <result property="oneUnitStat" column="ONE_UNIT_STAT"/>
  36. <result property="twoUnitStat" column="TWO_UNIT_STAT"/>
  37. <result property="threeUnitStat" column="THREE_UNIT_STAT"/>
  38. <result property="engSta" column="ENG_STA"/>
  39. </resultMap>
  40. <sql id="table_columns">
  41. BUID_TIME_YEAR,
  42. ENG_PROFIL,
  43. ENG_BUILD,
  44. ORG_ID,
  45. ID,
  46. OBJ_ID,
  47. PTYPE,
  48. AD_CODE,
  49. NM,
  50. STWKTM,
  51. PLANTM,
  52. ESTAPP,
  53. LGTD,
  54. LTTD,
  55. LGTD_PC,
  56. LTTD_PC,
  57. UNIT_ID,
  58. UNIT_NM,
  59. GROUP_LEADER_ID,
  60. GROUP_LEADER,
  61. GROUP_LEADER_TEL,
  62. REC_PERS_ID,
  63. REC_PERS,
  64. REC_PERS_TEL,
  65. INTM,
  66. UPTM,
  67. NOTE,
  68. DATA_STAT,
  69. STATE,
  70. SEC_STAT,
  71. ONE_UNIT_STAT,
  72. TWO_UNIT_STAT,
  73. THREE_UNIT_STAT,
  74. ENG_STA
  75. </sql>
  76. <sql id="entity_properties">
  77. #{buidTimeYear},
  78. #{engProfil},
  79. #{engBuild},
  80. #{orgId},
  81. #{id},
  82. #{objId},
  83. #{ptype},
  84. #{adCode},
  85. #{nm},
  86. #{stwktm},
  87. #{plantm},
  88. #{estapp},
  89. #{lgtd},
  90. #{lttd},
  91. #{lgtdPc},
  92. #{lttdPc},
  93. #{unitId},
  94. #{unitNm},
  95. #{groupLeaderId},
  96. #{groupLeader},
  97. #{groupLeaderTel},
  98. #{recPersId},
  99. #{recPers},
  100. #{recPersTel},
  101. #{intm},
  102. #{uptm},
  103. #{note},
  104. #{dataStat},
  105. #{state},
  106. #{secStat},
  107. #{oneUnitStat},
  108. #{twoUnitStat},
  109. #{threeUnitStat},
  110. #{engSta}
  111. </sql>
  112. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  113. <sql id="page_where">
  114. <trim prefix="where" prefixOverrides="and | or ">
  115. <if test="buidTimeYear != null and buidTimeYear != ''">
  116. and BUID_TIME_YEAR = #{buidTimeYear}
  117. </if>
  118. <if test="engProfil != null and engProfil != ''">
  119. and ENG_PROFIL = #{engProfil}
  120. </if>
  121. <if test="engBuild != null and engBuild != ''">
  122. and ENG_BUILD = #{engBuild}
  123. </if>
  124. <if test="orgId != null and orgId != ''">
  125. and ORG_ID = #{orgId}
  126. </if>
  127. <if test="objId != null and objId != ''">
  128. and OBJ_ID = #{objId}
  129. </if>
  130. <if test="ptype != null and ptype != ''">
  131. and PTYPE = #{ptype}
  132. </if>
  133. <if test="adCode != null and adCode != ''">
  134. and AD_CODE = #{adCode}
  135. </if>
  136. <if test="nm != null and nm != ''">
  137. and NM = #{nm}
  138. </if>
  139. <if test="stwktm != null and stwktm != ''">
  140. and STWKTM = #{stwktm}
  141. </if>
  142. <if test="plantm != null and plantm != ''">
  143. and PLANTM = #{plantm}
  144. </if>
  145. <if test="estapp != null and estapp != ''">
  146. and ESTAPP = #{estapp}
  147. </if>
  148. <if test="lgtd != null and lgtd != ''">
  149. and LGTD = #{lgtd}
  150. </if>
  151. <if test="lttd != null and lttd != ''">
  152. and LTTD = #{lttd}
  153. </if>
  154. <if test="lgtdPc != null and lgtdPc != ''">
  155. and LGTD_PC = #{lgtdPc}
  156. </if>
  157. <if test="lttdPc != null and lttdPc != ''">
  158. and LTTD_PC = #{lttdPc}
  159. </if>
  160. <if test="unitId != null and unitId != ''">
  161. and UNIT_ID = #{unitId}
  162. </if>
  163. <if test="unitNm != null and unitNm != ''">
  164. and UNIT_NM = #{unitNm}
  165. </if>
  166. <if test="groupLeaderId != null and groupLeaderId != ''">
  167. and GROUP_LEADER_ID = #{groupLeaderId}
  168. </if>
  169. <if test="groupLeader != null and groupLeader != ''">
  170. and GROUP_LEADER = #{groupLeader}
  171. </if>
  172. <if test="groupLeaderTel != null and groupLeaderTel != ''">
  173. and GROUP_LEADER_TEL = #{groupLeaderTel}
  174. </if>
  175. <if test="recPersId != null and recPersId != ''">
  176. and REC_PERS_ID = #{recPersId}
  177. </if>
  178. <if test="recPers != null and recPers != ''">
  179. and REC_PERS = #{recPers}
  180. </if>
  181. <if test="recPersTel != null and recPersTel != ''">
  182. and REC_PERS_TEL = #{recPersTel}
  183. </if>
  184. <if test="intm != null">
  185. and INTM = #{intm}
  186. </if>
  187. <if test="uptm != null">
  188. and UPTM = #{uptm}
  189. </if>
  190. <if test="note != null and note != ''">
  191. and NOTE = #{note}
  192. </if>
  193. <if test="dataStat != null and dataStat != ''">
  194. and DATA_STAT = #{dataStat}
  195. </if>
  196. <if test="state != null and state != ''">
  197. and STATE = #{state}
  198. </if>
  199. <if test="secStat != null and secStat != ''">
  200. and SEC_STAT = #{secStat}
  201. </if>
  202. <if test="oneUnitStat != null and oneUnitStat != ''">
  203. and ONE_UNIT_STAT = #{oneUnitStat}
  204. </if>
  205. <if test="twoUnitStat != null and twoUnitStat != ''">
  206. and TWO_UNIT_STAT = #{twoUnitStat}
  207. </if>
  208. <if test="threeUnitStat != null and threeUnitStat != ''">
  209. and THREE_UNIT_STAT = #{threeUnitStat}
  210. </if>
  211. <if test="engSta != null and engSta != ''">
  212. and ENG_STA = #{engSta}
  213. </if>
  214. and DATA_STAT='0'
  215. </trim>
  216. </sql>
  217. <select id="get" resultMap="bisInspKeychkqhRegisterResultMap" parameterType="String">
  218. select
  219. <include refid="table_columns"/>
  220. from BIS_INSP_KEYCHKQH_REGISTER where ID = #{id}
  221. </select>
  222. <select id="getBy" resultMap="bisInspKeychkqhRegisterResultMap">
  223. select
  224. <include refid="table_columns"/>
  225. from BIS_INSP_KEYCHKQH_REGISTER
  226. <include refid="page_where"/>
  227. </select>
  228. <select id="findAll" resultMap="bisInspKeychkqhRegisterResultMap">
  229. select
  230. <include refid="table_columns"/>
  231. from BIS_INSP_KEYCHKQH_REGISTER
  232. </select>
  233. <select id="findList" resultMap="bisInspKeychkqhRegisterResultMap">
  234. select
  235. <include refid="table_columns"/>
  236. from BIS_INSP_KEYCHKQH_REGISTER
  237. <include refid="page_where"/>
  238. </select>
  239. <select id="selectCount" resultType="int">
  240. select count(ID) from BIS_INSP_KEYCHKQH_REGISTER
  241. <include refid="page_where"/>
  242. </select>
  243. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspKeychkqhRegister">
  244. insert into BIS_INSP_KEYCHKQH_REGISTER(
  245. <include refid="table_columns"/>
  246. )
  247. values (
  248. <include refid="entity_properties"/>
  249. )
  250. </insert>
  251. <delete id="delete" parameterType="java.lang.String">
  252. update BIS_INSP_KEYCHKQH_REGISTER set DATA_STAT='9' where ID = #{id}
  253. </delete>
  254. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspKeychkqhRegister">
  255. update BIS_INSP_KEYCHKQH_REGISTER set DATA_STAT='9'
  256. <include refid="page_where"/>
  257. </delete>
  258. <update id="deleteInFlag" parameterType="java.lang.String">
  259. update BIS_INSP_KEYCHKQH_REGISTER set DATA_STAT = '9' where ID = #{id}
  260. </update>
  261. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspKeychkqhRegister">
  262. update BIS_INSP_KEYCHKQH_REGISTER
  263. <trim prefix="set" suffixOverrides=",">
  264. <if test="buidTimeYear != null and buidTimeYear != ''">BUID_TIME_YEAR
  265. = #{buidTimeYear},
  266. </if>
  267. <if test="engProfil != null and engProfil != ''">ENG_PROFIL
  268. = #{engProfil},
  269. </if>
  270. <if test="engBuild != null and engBuild != ''">ENG_BUILD
  271. = #{engBuild},
  272. </if>
  273. <if test="orgId != null and orgId != ''">ORG_ID
  274. = #{orgId},
  275. </if>
  276. <if test="objId != null and objId != ''">OBJ_ID
  277. = #{objId},
  278. </if>
  279. <if test="ptype != null and ptype != ''">PTYPE
  280. = #{ptype},
  281. </if>
  282. <if test="adCode != null and adCode != ''">AD_CODE
  283. = #{adCode},
  284. </if>
  285. <if test="nm != null and nm != ''">NM
  286. = #{nm},
  287. </if>
  288. <if test="stwktm != null and stwktm != ''">STWKTM
  289. = #{stwktm},
  290. </if>
  291. <if test="plantm != null and plantm != ''">PLANTM
  292. = #{plantm},
  293. </if>
  294. <if test="estapp != null and estapp != ''">ESTAPP
  295. = #{estapp},
  296. </if>
  297. <if test="lgtd != null and lgtd != ''">LGTD
  298. = #{lgtd},
  299. </if>
  300. <if test="lttd != null and lttd != ''">LTTD
  301. = #{lttd},
  302. </if>
  303. <if test="lgtdPc != null and lgtdPc != ''">LGTD_PC
  304. = #{lgtdPc},
  305. </if>
  306. <if test="lttdPc != null and lttdPc != ''">LTTD_PC
  307. = #{lttdPc},
  308. </if>
  309. <if test="unitId != null and unitId != ''">UNIT_ID
  310. = #{unitId},
  311. </if>
  312. <if test="unitNm != null and unitNm != ''">UNIT_NM
  313. = #{unitNm},
  314. </if>
  315. <if test="groupLeaderId != null and groupLeaderId != ''">GROUP_LEADER_ID
  316. = #{groupLeaderId},
  317. </if>
  318. <if test="groupLeader != null and groupLeader != ''">GROUP_LEADER
  319. = #{groupLeader},
  320. </if>
  321. <if test="groupLeaderTel != null and groupLeaderTel != ''">GROUP_LEADER_TEL
  322. = #{groupLeaderTel},
  323. </if>
  324. <if test="recPersId != null and recPersId != ''">REC_PERS_ID
  325. = #{recPersId},
  326. </if>
  327. <if test="recPers != null and recPers != ''">REC_PERS
  328. = #{recPers},
  329. </if>
  330. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL
  331. = #{recPersTel},
  332. </if>
  333. <if test="intm != null">INTM
  334. = #{intm},
  335. </if>
  336. <if test="uptm != null">UPTM
  337. = #{uptm},
  338. </if>
  339. <if test="note != null and note != ''">NOTE
  340. = #{note},
  341. </if>
  342. <if test="dataStat != null and dataStat != ''">DATA_STAT
  343. = #{dataStat},
  344. </if>
  345. <if test="state != null and state != ''">STATE
  346. = #{state},
  347. </if>
  348. <if test="secStat != null and secStat != ''">SEC_STAT
  349. = #{secStat},
  350. </if>
  351. <if test="oneUnitStat != null and oneUnitStat != ''">ONE_UNIT_STAT
  352. = #{oneUnitStat},
  353. </if>
  354. <if test="twoUnitStat != null and twoUnitStat != ''">TWO_UNIT_STAT
  355. = #{twoUnitStat},
  356. </if>
  357. <if test="threeUnitStat != null and threeUnitStat != ''">THREE_UNIT_STAT
  358. = #{threeUnitStat},
  359. </if>
  360. <if test="engSta != null and engSta != ''">ENG_STA
  361. = #{engSta},
  362. </if>
  363. </trim>
  364. <where>ID = #{id}</where>
  365. </update>
  366. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspKeychkqhRegister">
  367. update BIS_INSP_KEYCHKQH_REGISTER
  368. <trim prefix="set" suffixOverrides=",">
  369. <if test="buidTimeYear != null and buidTimeYear != ''">BUID_TIME_YEAR
  370. = #{buidTimeYear},
  371. </if>
  372. <if test="engProfil != null and engProfil != ''">ENG_PROFIL
  373. = #{engProfil},
  374. </if>
  375. <if test="engBuild != null and engBuild != ''">ENG_BUILD
  376. = #{engBuild},
  377. </if>
  378. <if test="orgId != null and orgId != ''">ORG_ID
  379. = #{orgId},
  380. </if>
  381. <if test="objId != null and objId != ''">OBJ_ID
  382. = #{objId},
  383. </if>
  384. <if test="ptype != null and ptype != ''">PTYPE
  385. = #{ptype},
  386. </if>
  387. <if test="adCode != null and adCode != ''">AD_CODE
  388. = #{adCode},
  389. </if>
  390. <if test="nm != null and nm != ''">NM
  391. = #{nm},
  392. </if>
  393. <if test="stwktm != null and stwktm != ''">STWKTM
  394. = #{stwktm},
  395. </if>
  396. <if test="plantm != null and plantm != ''">PLANTM
  397. = #{plantm},
  398. </if>
  399. <if test="estapp != null and estapp != ''">ESTAPP
  400. = #{estapp},
  401. </if>
  402. <if test="lgtd != null and lgtd != ''">LGTD
  403. = #{lgtd},
  404. </if>
  405. <if test="lttd != null and lttd != ''">LTTD
  406. = #{lttd},
  407. </if>
  408. <if test="lgtdPc != null and lgtdPc != ''">LGTD_PC
  409. = #{lgtdPc},
  410. </if>
  411. <if test="lttdPc != null and lttdPc != ''">LTTD_PC
  412. = #{lttdPc},
  413. </if>
  414. <if test="unitId != null and unitId != ''">UNIT_ID
  415. = #{unitId},
  416. </if>
  417. <if test="unitNm != null and unitNm != ''">UNIT_NM
  418. = #{unitNm},
  419. </if>
  420. <if test="groupLeaderId != null and groupLeaderId != ''">GROUP_LEADER_ID
  421. = #{groupLeaderId},
  422. </if>
  423. <if test="groupLeader != null and groupLeader != ''">GROUP_LEADER
  424. = #{groupLeader},
  425. </if>
  426. <if test="groupLeaderTel != null and groupLeaderTel != ''">GROUP_LEADER_TEL
  427. = #{groupLeaderTel},
  428. </if>
  429. <if test="recPersId != null and recPersId != ''">REC_PERS_ID
  430. = #{recPersId},
  431. </if>
  432. <if test="recPers != null and recPers != ''">REC_PERS
  433. = #{recPers},
  434. </if>
  435. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL
  436. = #{recPersTel},
  437. </if>
  438. <if test="intm != null">INTM
  439. = #{intm},
  440. </if>
  441. <if test="uptm != null">UPTM
  442. = #{uptm},
  443. </if>
  444. <if test="note != null and note != ''">NOTE
  445. = #{note},
  446. </if>
  447. <if test="dataStat != null and dataStat != ''">DATA_STAT
  448. = #{dataStat},
  449. </if>
  450. <if test="state != null and state != ''">STATE
  451. = #{state},
  452. </if>
  453. <if test="secStat != null and secStat != ''">SEC_STAT
  454. = #{secStat},
  455. </if>
  456. <if test="oneUnitStat != null and oneUnitStat != ''">ONE_UNIT_STAT
  457. = #{oneUnitStat},
  458. </if>
  459. <if test="twoUnitStat != null and twoUnitStat != ''">TWO_UNIT_STAT
  460. = #{twoUnitStat},
  461. </if>
  462. <if test="threeUnitStat != null and threeUnitStat != ''">THREE_UNIT_STAT
  463. = #{threeUnitStat},
  464. </if>
  465. <if test="engSta != null and engSta != ''">ENG_STA
  466. = #{engSta},
  467. </if>
  468. </trim>
  469. <include refid="page_where"/>
  470. </update>
  471. <!-- 其他自定义SQL -->
  472. <select id="findPageList" resultType="cn.com.goldenwater.dcproj.dto.BisInspKeychkqhRegisterDto">
  473. SELECT * FROM (
  474. select
  475. A.CODE, A.ID nodeId, A.NM, A.ptype, ia.pnm groupName,
  476. B.id as rgstrId, (case when b.STATE is null then '0' else b.state end) STATE,
  477. AW.AD_FULL_NAME,
  478. B.BUID_TIME_YEAR,
  479. B.ENG_PROFIL,
  480. B.ENG_BUILD,
  481. B.ORG_ID,
  482. B.ID,
  483. B.OBJ_ID,
  484. B.AD_CODE,
  485. B.STWKTM,
  486. B.PLANTM,
  487. B.ESTAPP,
  488. B.LGTD,
  489. B.LTTD,
  490. B.LGTD_PC,
  491. B.LTTD_PC,
  492. B.UNIT_ID,
  493. B.UNIT_NM,
  494. B.GROUP_LEADER_ID,
  495. B.GROUP_LEADER,
  496. B.GROUP_LEADER_TEL,
  497. B.REC_PERS_ID,
  498. B.REC_PERS,
  499. B.REC_PERS_TEL,
  500. B.INTM,
  501. B.UPTM,
  502. B.NOTE,
  503. B.DATA_STAT,
  504. B.SEC_STAT,
  505. B.ONE_UNIT_STAT,
  506. B.TWO_UNIT_STAT,
  507. B.THREE_UNIT_STAT,
  508. B.ENG_STA
  509. FROM BIS_INSP_ALL_OBJ A
  510. JOIN BIS_INSP_KEYCHKQH_REGISTER B ON A.OBJ_ID = B.OBJ_ID
  511. LEFT JOIN BIS_INSP_ALL IA ON A.ID = IA.ID
  512. LEFT JOIN ATT_AD_BASE AW ON B.AD_CODE = AW.AD_CODE
  513. WHERE B.DATA_STAT = '0'
  514. <if test="adCodes ==null or adCodes ==''">
  515. <choose>
  516. <when test='isAll =="1"'>
  517. </when>
  518. <otherwise>
  519. and
  520. A.Id in (
  521. select distinct id from (
  522. SELECT P.id FROM BIS_INSP_ALL P
  523. WHERE FIND_IN_SET(P.id, getSubNodes_bis_insp_all( (SELECT group_concat(A.id) FROM BIS_INSP_ALL_RLATION A
  524. WHERE A.PERSID = #{presId} and A.TYPE = #{pType} and length(A.id) in (3,6,9) group by A.PERSID ),0,0) ) &gt; 0
  525. union all
  526. SELECT P.id FROM BIS_INSP_ALL P where p.id in (SELECT id FROM BIS_INSP_ALL_RLATION A
  527. WHERE A.PERSID =#{presId} and TYPE = #{pType} and length(id)=12 )
  528. )w
  529. )
  530. </otherwise>
  531. </choose>
  532. </if>
  533. <if test="adCodes !=null and adCodes !=''">
  534. and
  535. <foreach item="item" index="index" collection="adCodes.split(',')" open="(" separator="or" close=")">
  536. b.ad_code like concat('${item}','%')
  537. </foreach>
  538. </if>
  539. ) A
  540. <where>
  541. <if test="id !=null and id !=''">and nodeId like '${id}%'</if>
  542. <if test="plnaId !=null and plnaId !=''">and nodeId like '${plnaId}%'</if>
  543. <if test="groupId != null and groupId != ''">and nodeId like '${groupId}%'</if>
  544. <if test="code !=null and code !=''">and code = #{code}</if>
  545. <if test="nm !=null and nm !=''">and nm like '%${nm}%'</if>
  546. <if test="state !=null and state !=''">and STATE in (${state})</if>
  547. <if test="adName != null and adName != ''">and AD_NAME like '%${adName}%'</if>
  548. <if test="sttm != null and sttm != ''">and Intm &gt;= STR_TO_DATE(#{sttm},'%Y-%m-%d')</if>
  549. <if test="entm != null and entm != ''">and Intm &lt; DATE_ADD(STR_TO_DATE(#{entm},'%Y-%m-%d') ,INTERVAL 1 DAY)</if>
  550. </where>
  551. order by nodeId asc
  552. <if test="orderBy != null and orderBy != ''">
  553. ,CONVERT( nm USING gbk ) COLLATE gbk_chinese_ci ASC
  554. </if>
  555. </select>
  556. </mapper>